@templatical/editor 0.61.0 → 0.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -109
- package/README.md +3 -3
- package/dist/{AiAltTextPopover-DSA1wiiW.js → AiAltTextPopover-C1Ike67q.js} +3 -4
- package/dist/{AiAltTextReview-B9-vfzCj.js → AiAltTextReview-BjT7_PoG.js} +2 -3
- package/dist/{AiChatPanel-DF5TvO9H.js → AiChatPanel-C82fJozf.js} +3 -4
- package/dist/{AiPanels-zRqC5DIP.js → AiPanels-sam_GMNs.js} +1 -1
- package/dist/{AiRewriteMenu-CmZKTO-O.js → AiRewriteMenu-CpBcT6QL.js} +3 -4
- package/dist/{BlockIssueBadge-Bug5iqcK.js → BlockIssueBadge-D3OmWkCh.js} +2 -3
- package/dist/{BlockPreviewCanvas-knSyWaCP.js → BlockPreviewCanvas-BHRmnq0w.js} +6 -6
- package/dist/{CollaborationNotices-BM35YG72.js → CollaborationNotices-Cmc7Ziuf.js} +1 -1
- package/dist/{CollaboratorBar-DMsEOndt.js → CollaboratorBar-DVtWefk1.js} +1 -1
- package/dist/{CommentsPanel-BMYvXRKK.js → CommentsPanel-BSt22Zw9.js} +1 -1
- package/dist/{cdn/chunks/CommentsSidebar-BEiOQ_zT.js → CommentsSidebar-C8qbxjyN.js} +228 -205
- package/dist/{CountdownBlock-AYPypmcX.js → CountdownBlock-bFAELCB6.js} +3 -4
- package/dist/{CountdownToolbar-BprSuPJk.js → CountdownToolbar-CJbPEVV5.js} +4 -4
- package/dist/{IssuesPanel-CeCvUfa7.js → IssuesPanel-CKYf6K84.js} +4 -5
- package/dist/{LanguageMenu-CkGqLYjf.js → LanguageMenu-BFOEQEPy.js} +5 -6
- package/dist/{LocaleNotices-D0be8ovO.js → LocaleNotices-24UYFxo2.js} +7 -8
- package/dist/{LogicTagInsertButton-BzEZUTRZ.js → LogicTagInsertButton-DdaafrjI.js} +95 -96
- package/dist/{MergeTagInput-By2FSStk.js → MergeTagInput-BXM6-eF-.js} +1 -1
- package/dist/{MergeTagModeToggle-DtjOZhoD.js → MergeTagModeToggle-ooA_Ytfq.js} +2 -3
- package/dist/{MergeTagTextarea-BjHlamJv.js → MergeTagTextarea-B86MPY89.js} +3 -4
- package/dist/{ParagraphEditor-Ctu4fSsl.js → ParagraphEditor-C15Glzy_.js} +78 -79
- package/dist/{RestoreVersionDialog-DvZoTJVa.js → RestoreVersionDialog-C13Bo4b0.js} +2 -2
- package/dist/{RichTextEditorContent-B1p7Ykq8.js → RichTextEditorContent-BNMBOkdy.js} +5 -6
- package/dist/{SaveBlockDialog-DHfT-Tpx.js → SaveBlockDialog-lm_1-2w2.js} +23 -24
- package/dist/{SavedBlocksBrowserModal-BjJuuXQv.js → SavedBlocksBrowserModal-BjUZG5_S.js} +8 -9
- package/dist/{SavedBlocksPanels-D6eiMQZ3.js → SavedBlocksPanels-Bj3LAXcL.js} +1 -1
- package/dist/{SavedBlocksPickBar-BkgCDSXe.js → SavedBlocksPickBar-DOTr0Imx.js} +2 -2
- package/dist/{TemplateSettings-DQAbNsiS.js → TemplateSettings-Z-i-_xF5.js} +19 -20
- package/dist/{TestEmailModal-m_AEa36T.js → TestEmailModal-ClEnoNEB.js} +17 -18
- package/dist/{TestEmailPanel-OApkuaVd.js → TestEmailPanel-CVmrt-d9.js} +1 -1
- package/dist/{TitleEditor-Cwdtfk15.js → TitleEditor-BHZF5C6q.js} +8 -9
- package/dist/{Toolbar-D_T55elL.js → Toolbar-bwAdFK4A.js} +308 -310
- package/dist/{TplModal-2MKm5y6r.js → TplModal-QWmSO1nR.js} +4 -4
- package/dist/{VersionHistoryMenu-B3-xJ7GO.js → VersionHistoryMenu-qoOkZKal.js} +6 -7
- package/dist/{VersionHistoryPanels-CCM0IQBg.js → VersionHistoryPanels-D82hgc2v.js} +1 -1
- package/dist/{VersionPreviewBanner-DLAB4ZbS.js → VersionPreviewBanner-DEN9rl6y.js} +1 -1
- package/dist/{WrapperBlock-BZl10HLy.js → WrapperBlock-32v93A9w.js} +4 -4
- package/dist/{blockTypeIcons-C691ZY1l.js → blockTypeIcons-C1S2wVx8.js} +4 -4
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-C8N05sCU.js → ca-BIseSbs-.js} +1 -2
- package/dist/cdn/chunks/{AiAltTextPopover-BLNN_Pnd.js → AiAltTextPopover-mDx_knAl.js} +4 -5
- package/dist/cdn/chunks/{AiAltTextPopover-BLNN_Pnd.js.map → AiAltTextPopover-mDx_knAl.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-Db8vSNpe.js → AiAltTextReview-Dmg8iVWD.js} +3 -4
- package/dist/cdn/chunks/{AiAltTextReview-Db8vSNpe.js.map → AiAltTextReview-Dmg8iVWD.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-BYAsgmoC.js → AiChatPanel-CEDr_x8G.js} +4 -5
- package/dist/cdn/chunks/{AiChatPanel-BYAsgmoC.js.map → AiChatPanel-CEDr_x8G.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-MY_YPls8.js → AiPanels-qJgLTYPs.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-MY_YPls8.js.map → AiPanels-qJgLTYPs.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BSePiXe_.js → AiRewriteMenu-2a9WjizC.js} +4 -5
- package/dist/cdn/chunks/{AiRewriteMenu-BSePiXe_.js.map → AiRewriteMenu-2a9WjizC.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-fYeNnepj.js → BlockIssueBadge-D87CYoPw.js} +3 -4
- package/dist/cdn/chunks/{BlockIssueBadge-fYeNnepj.js.map → BlockIssueBadge-D87CYoPw.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-B153A3hu.js → BlockPreviewCanvas-DDDKuWJz.js} +8 -8
- package/dist/cdn/chunks/{BlockPreviewCanvas-B153A3hu.js.map → BlockPreviewCanvas-DDDKuWJz.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-COkmBmps.js → CollaborationNotices-DyzhN_Ns.js} +2 -2
- package/dist/cdn/chunks/{CollaborationNotices-COkmBmps.js.map → CollaborationNotices-DyzhN_Ns.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BSzI8YIU.js → CollaboratorBar-bNFuQxxP.js} +2 -2
- package/dist/cdn/chunks/{CollaboratorBar-BSzI8YIU.js.map → CollaboratorBar-bNFuQxxP.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-R27fqh9O.js → CommentsPanel-D-D2qsS6.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-R27fqh9O.js.map → CommentsPanel-D-D2qsS6.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-CCVp8M2T.js +479 -0
- package/dist/cdn/chunks/CommentsSidebar-CCVp8M2T.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock--hlKE2aj.js → CountdownBlock-5hUzymeP.js} +4 -5
- package/dist/cdn/chunks/{CountdownBlock--hlKE2aj.js.map → CountdownBlock-5hUzymeP.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DOhXnbsq.js → CountdownToolbar-DaGxwKfG.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DOhXnbsq.js.map → CountdownToolbar-DaGxwKfG.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DgxiS3hF.js → IssuesPanel-DQQo1B1z.js} +10 -11
- package/dist/cdn/chunks/IssuesPanel-DQQo1B1z.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-B6kt8SgX.js → LanguageMenu-2Er64H2b.js} +6 -7
- package/dist/cdn/chunks/{LanguageMenu-B6kt8SgX.js.map → LanguageMenu-2Er64H2b.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-Bleg4gTu.js → LocaleNotices-DSfOyyyf.js} +8 -9
- package/dist/cdn/chunks/{LocaleNotices-Bleg4gTu.js.map → LocaleNotices-DSfOyyyf.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DGg1Wvhp.js → LogicTagInsertButton-CumMM1rP.js} +7 -8
- package/dist/cdn/chunks/{LogicTagInsertButton-DGg1Wvhp.js.map → LogicTagInsertButton-CumMM1rP.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-BVfTwujW.js → MergeTagInput-Dm_QiG96.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-BVfTwujW.js.map → MergeTagInput-Dm_QiG96.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BoI0C1Y6.js → MergeTagModeToggle-Bir7lkLe.js} +3 -4
- package/dist/cdn/chunks/{MergeTagModeToggle-BoI0C1Y6.js.map → MergeTagModeToggle-Bir7lkLe.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DGDv-pdn.js → MergeTagTextarea-B_IFeWfZ.js} +4 -5
- package/dist/cdn/chunks/{MergeTagTextarea-DGDv-pdn.js.map → MergeTagTextarea-B_IFeWfZ.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D0q36Myd.js → ParagraphEditor-CWjMxuy0.js} +135 -136
- package/dist/cdn/chunks/{ParagraphEditor-D0q36Myd.js.map → ParagraphEditor-CWjMxuy0.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-CJggFdbi.js → RestoreVersionDialog-BsfulSK7.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-CJggFdbi.js.map → RestoreVersionDialog-BsfulSK7.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-D3ihUF8v.js → RichTextEditorContent-CuvFVxEq.js} +6 -7
- package/dist/cdn/chunks/{RichTextEditorContent-D3ihUF8v.js.map → RichTextEditorContent-CuvFVxEq.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BzES5tqd.js → SaveBlockDialog-8zxJlHw2.js} +25 -26
- package/dist/cdn/chunks/{SaveBlockDialog-BzES5tqd.js.map → SaveBlockDialog-8zxJlHw2.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CLNcZcLd.js → SavedBlocksBrowserModal-DtaGW2H4.js} +9 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CLNcZcLd.js.map → SavedBlocksBrowserModal-DtaGW2H4.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-R0W9LElD.js → SavedBlocksPanels-CtDhdbiD.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-R0W9LElD.js.map → SavedBlocksPanels-CtDhdbiD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-JNi5Rx4V.js → SavedBlocksPickBar-DovcCaoW.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-JNi5Rx4V.js.map → SavedBlocksPickBar-DovcCaoW.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-C5wsNcgX.js → TemplateSettings-B8Ch5ps8.js} +20 -21
- package/dist/cdn/chunks/{TemplateSettings-C5wsNcgX.js.map → TemplateSettings-B8Ch5ps8.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-BxIAwjww.js → TestEmailModal-D1EuQSgA.js} +16 -17
- package/dist/cdn/chunks/{TestEmailModal-BxIAwjww.js.map → TestEmailModal-D1EuQSgA.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-B8BsWXjE.js → TestEmailPanel-0iG-utN7.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-B8BsWXjE.js.map → TestEmailPanel-0iG-utN7.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DhcI1aRS.js → TitleEditor-k2vSwKxN.js} +17 -18
- package/dist/cdn/chunks/{TitleEditor-DhcI1aRS.js.map → TitleEditor-k2vSwKxN.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-Ch3h2BUs.js → Toolbar-BnTSuZQb.js} +310 -312
- package/dist/cdn/chunks/Toolbar-BnTSuZQb.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CPOqOxVf.js → TplModal-iRdN04Sa.js} +5 -5
- package/dist/cdn/chunks/{TplModal-CPOqOxVf.js.map → TplModal-iRdN04Sa.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DTDO48HI.js → VersionHistoryMenu-DlPr3twf.js} +7 -8
- package/dist/cdn/chunks/{VersionHistoryMenu-DTDO48HI.js.map → VersionHistoryMenu-DlPr3twf.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-CVrXHYxT.js → VersionHistoryPanels-Bw5UHEvo.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-CVrXHYxT.js.map → VersionHistoryPanels-Bw5UHEvo.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-C1H_fYAr.js → VersionPreviewBanner-anJgZOcw.js} +2 -2
- package/dist/cdn/chunks/VersionPreviewBanner-anJgZOcw.js.map +1 -0
- package/dist/cdn/chunks/{WrapperBlock-B8SJ7Q4w.js → WrapperBlock-CFjCtyvx.js} +5 -5
- package/dist/cdn/chunks/{WrapperBlock-B8SJ7Q4w.js.map → WrapperBlock-CFjCtyvx.js.map} +1 -1
- package/dist/cdn/chunks/{ca-C8N05sCU.js → ca-BIseSbs-.js} +2 -3
- package/dist/cdn/chunks/{ca-C8N05sCU.js.map → ca-BIseSbs-.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CKXPwWo9.js → composables-Nir0umYc.js} +444 -464
- package/dist/cdn/chunks/composables-Nir0umYc.js.map +1 -0
- package/dist/{da-Dno_4nGy.js → cdn/chunks/da-DN46iRXS.js} +3 -2
- package/dist/cdn/chunks/{da-Dno_4nGy.js.map → da-DN46iRXS.js.map} +1 -1
- package/dist/{de-DRR5JSkh.js → cdn/chunks/de-Dyk8PPCm.js} +3 -2
- package/dist/cdn/chunks/{de-DRR5JSkh.js.map → de-Dyk8PPCm.js.map} +1 -1
- package/dist/{en-DAcLbbpg.js → cdn/chunks/en-BzMbMmgz.js} +3 -2
- package/dist/cdn/chunks/{en-DAcLbbpg.js.map → en-BzMbMmgz.js.map} +1 -1
- package/dist/{es-BcEQLQxe.js → cdn/chunks/es-KSHEXYyf.js} +3 -2
- package/dist/cdn/chunks/{es-BcEQLQxe.js.map → es-KSHEXYyf.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-Bq9nXmBP.js → extensions-Br2hHeiR.js} +5 -5
- package/dist/cdn/chunks/{extensions-Bq9nXmBP.js.map → extensions-Br2hHeiR.js.map} +1 -1
- package/dist/{fr-CNQG7ESr.js → cdn/chunks/fr-DtKHfZyk.js} +3 -2
- package/dist/cdn/chunks/{fr-CNQG7ESr.js.map → fr-DtKHfZyk.js.map} +1 -1
- package/dist/{ja-CMxWxqSH.js → cdn/chunks/ja-DUSaDVPA.js} +3 -2
- package/dist/cdn/chunks/{ja-CMxWxqSH.js.map → ja-DUSaDVPA.js.map} +1 -1
- package/dist/{nl-BjyYZDkC.js → cdn/chunks/nl-DQbuxzD6.js} +3 -2
- package/dist/cdn/chunks/{nl-BjyYZDkC.js.map → nl-DQbuxzD6.js.map} +1 -1
- package/dist/{pt-BR-DC2A3C0v.js → cdn/chunks/pt-BR-CxpxBtvc.js} +3 -2
- package/dist/cdn/chunks/{pt-BR-DC2A3C0v.js.map → pt-BR-CxpxBtvc.js.map} +1 -1
- package/dist/cdn/chunks/rolldown-runtime-CGnMp29N.js +10 -0
- package/dist/cdn/chunks/{socialIcons-CSe4YJ52.js → socialIcons-CXQfKLUV.js} +156 -136
- package/dist/cdn/chunks/socialIcons-CXQfKLUV.js.map +1 -0
- package/dist/cdn/chunks/{src-Bk1LF1np.js → src-9e0wFfHH.js} +4 -2
- package/dist/cdn/chunks/src-9e0wFfHH.js.map +1 -0
- package/dist/cdn/chunks/src-A0kzK-pR.js.map +1 -1
- package/dist/cdn/chunks/{src-edESkGqO.js → src-C9jjLNMg.js} +2 -2
- package/dist/cdn/chunks/{src-edESkGqO.js.map → src-C9jjLNMg.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-DDhueoan.js → tiptap-DLW5XdqI.js} +2 -2
- package/dist/cdn/chunks/{tiptap-DDhueoan.js.map → tiptap-DLW5XdqI.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-D0Lp2x4_.js → useEditorRoot-BPVxLYFD.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-D0Lp2x4_.js.map → useEditorRoot-BPVxLYFD.js.map} +1 -1
- package/dist/cdn/chunks/useI18n-DwP1ksBW.js +24 -0
- package/dist/cdn/chunks/{keys-ywH4jHJ2.js.map → useI18n-DwP1ksBW.js.map} +1 -1
- package/dist/cdn/chunks/{useLanguageName-DDhdVpqh.js → useLanguageName-CeuoO9WZ.js} +2 -2
- package/dist/cdn/chunks/{useLanguageName-DDhdVpqh.js.map → useLanguageName-CeuoO9WZ.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-CKtQlJDa.js → useLogicTag-gphGbQfy.js} +3 -3
- package/dist/cdn/chunks/{useLogicTag-CKtQlJDa.js.map → useLogicTag-gphGbQfy.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dwy3U0PI.js → useMergeTag-QM-tkBc6.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-Dwy3U0PI.js.map → useMergeTag-QM-tkBc6.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-CBp9uwjV.js → usePopoverPosition-Cg8LR0W4.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-CBp9uwjV.js.map → usePopoverPosition-Cg8LR0W4.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-32EnuMwu.js → useScrollToBlock-CS7zo4oQ.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-32EnuMwu.js.map → useScrollToBlock-CS7zo4oQ.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +877 -975
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-26aR45W3.js → composables-6SKZrQs-.js} +817 -837
- package/dist/{cdn/chunks/da-Dno_4nGy.js → da-DN46iRXS.js} +1 -4
- package/dist/{cdn/chunks/de-DRR5JSkh.js → de-Dyk8PPCm.js} +1 -4
- package/dist/{cdn/chunks/en-DAcLbbpg.js → en-BzMbMmgz.js} +1 -4
- package/dist/{cdn/chunks/es-BcEQLQxe.js → es-KSHEXYyf.js} +1 -4
- package/dist/{extensions-zHf8YFRw.js → extensions-D74nAP73.js} +3 -3
- package/dist/{cdn/chunks/fr-CNQG7ESr.js → fr-DtKHfZyk.js} +1 -4
- package/dist/index.d.ts +33 -405
- package/dist/{cdn/chunks/ja-CMxWxqSH.js → ja-DUSaDVPA.js} +1 -4
- package/dist/{cdn/chunks/nl-BjyYZDkC.js → nl-DQbuxzD6.js} +1 -4
- package/dist/{cdn/chunks/pt-BR-DC2A3C0v.js → pt-BR-CxpxBtvc.js} +1 -4
- package/dist/{socialIcons-mWE33bOn.js → socialIcons-K89pe-h2.js} +84 -64
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1060 -1158
- package/dist/{useEditorRoot-DWfC2CVC.js → useEditorRoot-CQeutW_s.js} +1 -1
- package/dist/useI18n-B05qsAsl.js +22 -0
- package/dist/{useLanguageName-CEFzafHB.js → useLanguageName-CnpG7FD5.js} +1 -1
- package/dist/{useLogicTag-K5CPoMTk.js → useLogicTag-DSa1si4o.js} +2 -2
- package/dist/{useMergeTag-tsU_Sw2x.js → useMergeTag-DwxbvRZI.js} +2 -2
- package/dist/{usePopoverPosition-DF0ZYH7g.js → usePopoverPosition-B8CXTr8v.js} +1 -1
- package/dist/{useScrollToBlock-eZXiGa8o.js → useScrollToBlock-ZZBBGFan.js} +1 -1
- package/package.json +11 -13
- package/dist/CloudHeaderExtras-DC_oNrxz.js +0 -22
- package/dist/CloudPanels-BbHJHZri.js +0 -167
- package/dist/CommentsSidebar-_8at1Rug.js +0 -516
- package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js +0 -24
- package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-Bv26_Sd8.js +0 -167
- package/dist/cdn/chunks/CloudPanels-Bv26_Sd8.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-BEiOQ_zT.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-DgxiS3hF.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-Ch3h2BUs.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-C1H_fYAr.js.map +0 -1
- package/dist/cdn/chunks/composables-CKXPwWo9.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-CUlw09ix.js +0 -1405
- package/dist/cdn/chunks/createCloudRuntime-CUlw09ix.js.map +0 -1
- package/dist/cdn/chunks/de-6M4JoHoD.js +0 -21
- package/dist/cdn/chunks/de-6M4JoHoD.js.map +0 -1
- package/dist/cdn/chunks/en-FzUuJ8HW.js +0 -21
- package/dist/cdn/chunks/en-FzUuJ8HW.js.map +0 -1
- package/dist/cdn/chunks/keys-ywH4jHJ2.js +0 -11
- package/dist/cdn/chunks/logger-CqQTfJGx.js +0 -26
- package/dist/cdn/chunks/logger-CqQTfJGx.js.map +0 -1
- package/dist/cdn/chunks/preRenderCustomBlocks-BLVFtvl8.js +0 -22
- package/dist/cdn/chunks/preRenderCustomBlocks-BLVFtvl8.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-Bp92Fc6J.js +0 -21
- package/dist/cdn/chunks/pt-BR-Bp92Fc6J.js.map +0 -1
- package/dist/cdn/chunks/pusher-x9rNqzon.js +0 -2473
- package/dist/cdn/chunks/pusher-x9rNqzon.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-QGRDbDUS.js +0 -19
- package/dist/cdn/chunks/socialIcons-CSe4YJ52.js.map +0 -1
- package/dist/cdn/chunks/src-Bk1LF1np.js.map +0 -1
- package/dist/cdn/chunks/useCloudI18n-BTV9uu3c.js +0 -24
- package/dist/cdn/chunks/useCloudI18n-BTV9uu3c.js.map +0 -1
- package/dist/cdn/chunks/useI18n-DPg6rPbu.js +0 -18
- package/dist/cdn/chunks/useI18n-DPg6rPbu.js.map +0 -1
- package/dist/createCloudRuntime-CiEo0wkr.js +0 -1389
- package/dist/de-6M4JoHoD.js +0 -19
- package/dist/en-FzUuJ8HW.js +0 -19
- package/dist/keys-B4DimcgX.js +0 -9
- package/dist/logger-BOu7oEtk.js +0 -24
- package/dist/preRenderCustomBlocks-6CLw2rP6.js +0 -20
- package/dist/pt-BR-Bp92Fc6J.js +0 -19
- package/dist/useCloudI18n-BnuOL1YS.js +0 -22
- package/dist/useI18n-Cx9W7OWb.js +0 -16
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, l as r } from "./dist-B6ptxfPo.js";
|
|
2
2
|
import { c as i, o as a, s as o } from "./runtime-dom.esm-bundler-nN-jsqr1.js";
|
|
3
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 R, v as oe, w as z, y as B } from "./vue.runtime.esm-bundler-BE5V8ADU.js";
|
|
4
|
-
import { t as se } from "./useEditorRoot-
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { $ as Lt, A as Rt, B as zt, C as Bt, D as Vt, F as Ht, G as Ut, H as Wt, I as Gt, J as Kt, K as qt, L as Jt, M as Yt, N as Xt, O as Zt, P as Qt, R as $t, S as en, T as tn, U as nn, V as rn, W as an, X as on, Y as sn, Z as cn, _ as ln, a as un, at as dn, b as fn, c as pn, ct as mn, d as hn, et as gn, g as _n, h as vn, i as yn, it as bn, j as xn, k as Sn, l as Cn, lt as wn, m as Tn, nt as En, ot as Dn, p as On, q as kn, r as An, rt as jn, s as Mn, st as Nn, u as Pn, ut as Fn, v as In, w as Ln, x as Rn, y as zn, z as Bn } from "./keys-B4DimcgX.js";
|
|
14
|
-
import { t as Vn } from "./useLogicTag-K5CPoMTk.js";
|
|
15
|
-
import { B as Hn, C as Un, D as Wn, E as Gn, F as Kn, H as qn, O as Jn, P as Yn, T as Xn, U as Zn, _ as Qn, a as $n, f as er, h as tr, k as nr, n as rr, o as ir, t as ar, u as or, v as sr, w as cr, x as lr, y as ur, z as dr } from "./socialIcons-mWE33bOn.js";
|
|
4
|
+
import { t as se } from "./useEditorRoot-CQeutW_s.js";
|
|
5
|
+
import { $ as ce, A as V, B as le, C as ue, D as de, E as fe, F as pe, G as me, H as he, I as ge, J as _e, K as ve, L as ye, M as be, N as xe, O as Se, P as Ce, Q as we, R as Te, S as Ee, U as De, V as Oe, W as ke, X as Ae, Y as je, _ as Me, a as Ne, at as Pe, b as Fe, c as Ie, ct as Le, d as Re, f as ze, g as Be, h as Ve, i as He, it as Ue, j as We, k as Ge, l as Ke, lt as qe, m as Je, nt as Ye, o as Xe, ot as Ze, p as Qe, q as $e, rt as et, s as tt, st as nt, t as rt, tt as it, u as at, v as ot, w as st, x as ct, y as lt, z as ut } from "./useI18n-B05qsAsl.js";
|
|
6
|
+
import { t as dt } from "./useMergeTag-DwxbvRZI.js";
|
|
7
|
+
import { _ as ft, h as pt, v as mt, y as ht } from "./dist-A328tG0Z.js";
|
|
8
|
+
import { $ as gt, B as _t, Bt as vt, C as yt, Et as bt, Ft as xt, G as St, Gt as Ct, H as wt, I as Tt, Jt as Et, K as Dt, Kt as Ot, L as kt, Lt as At, Nt as jt, P as Mt, Q as Nt, Qt as Pt, R as Ft, St as It, Tt as Lt, U as Rt, Ut as zt, W as Bt, Wt as Vt, X as Ht, Xt as Ut, Yt as Wt, Z as Gt, Zt as Kt, an as qt, b as Jt, c as Yt, cn as Xt, ct as Zt, dn as Qt, en as $t, et as en, fn as tn, ft as nn, gn as rn, gt as an, h as on, ht as sn, in as cn, it as ln, j as un, l as dn, ln as fn, lt as pn, m as mn, mt as hn, nn as gn, nt as _n, on as vn, q as yn, qt as bn, rn as xn, st as Sn, tn as Cn, u as wn, un as Tn, ut as En, v as Dn, vt as On, wt as kn, x as An, yt as jn, z as Mn } from "./dist-DX_IQgcU.js";
|
|
9
|
+
import { A as Nn, B as Pn, C as Fn, D as In, E as Ln, F as Rn, H as zn, O as Bn, P as Vn, T as Hn, U as Un, _ as Wn, a as Gn, f as Kn, h as qn, k as Jn, n as Yn, o as Xn, t as Zn, u as Qn, v as $n, w as er, x as tr, y as nr, z as rr } from "./socialIcons-K89pe-h2.js";
|
|
10
|
+
import { a as ir, c as ar, i as or, n as sr, o as cr, t as lr } from "./usePopoverPosition-B8CXTr8v.js";
|
|
11
|
+
import { n as ur } from "./useLocalizedDisplay-DfiE-KjV.js";
|
|
12
|
+
import { t as dr } from "./useLogicTag-DSa1si4o.js";
|
|
16
13
|
import { r as fr, t as pr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
17
14
|
import { i as mr, r as hr, t as gr } from "./sanitizeHtml-DxmFirMi.js";
|
|
18
15
|
import { t as _r } from "./createLucideIcon-BKeRiObH.js";
|
|
@@ -21,7 +18,7 @@ import { t as yr } from "./triangle-exclamation-point-Bi7ZKTZU.js";
|
|
|
21
18
|
import { t as br } from "./image-g47lDP0J.js";
|
|
22
19
|
import { t as xr } from "./clock-DOOnNINY.js";
|
|
23
20
|
import { t as Sr } from "./pencil-D1HBG4pb.js";
|
|
24
|
-
import { t as Cr } from "./useLanguageName-
|
|
21
|
+
import { t as Cr } from "./useLanguageName-CnpG7FD5.js";
|
|
25
22
|
import { t as wr } from "./plural-CyxrJXL1.js";
|
|
26
23
|
import { m as Tr, w as Er, x as Dr } from "./styleConstants-Br6CIRoS.js";
|
|
27
24
|
import { t as Or } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
@@ -178,7 +175,7 @@ function Vr(t, n) {
|
|
|
178
175
|
}
|
|
179
176
|
// src/composables/useEmoji.ts
|
|
180
177
|
function Hr() {
|
|
181
|
-
let [e, t] =
|
|
178
|
+
let [e, t] = mt(!1), n = ie([]), r = !1;
|
|
182
179
|
T(() => {
|
|
183
180
|
r = !0;
|
|
184
181
|
}), c(e, async (e) => {
|
|
@@ -210,7 +207,7 @@ function Ur() {
|
|
|
210
207
|
function n(t, n) {
|
|
211
208
|
let r = `custom:${t.type}`, i = {
|
|
212
209
|
component: n,
|
|
213
|
-
createBlock: () =>
|
|
210
|
+
createBlock: () => Mn(t),
|
|
214
211
|
definition: t
|
|
215
212
|
};
|
|
216
213
|
e.value.set(r, i), ae(e);
|
|
@@ -236,9 +233,9 @@ function Ur() {
|
|
|
236
233
|
let t = a(e.customType);
|
|
237
234
|
if (!t) return o("Block definition not found");
|
|
238
235
|
try {
|
|
239
|
-
return await
|
|
236
|
+
return await _t(await import("./liquid.browser-DUXEekoN.js")).parseAndRender(t.template, e.fieldValues);
|
|
240
237
|
} catch (t) {
|
|
241
|
-
return
|
|
238
|
+
return Ln.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
242
239
|
}
|
|
243
240
|
}
|
|
244
241
|
function c(t) {
|
|
@@ -291,7 +288,7 @@ function Kr(e) {
|
|
|
291
288
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
292
289
|
for (let i of e) {
|
|
293
290
|
let e = i.toLowerCase(), a = Wr.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),
|
|
291
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), Ln.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Wr.map((e) => e.value).join(", ")}.`));
|
|
295
292
|
}
|
|
296
293
|
return t;
|
|
297
294
|
}
|
|
@@ -308,7 +305,7 @@ function qr(e) {
|
|
|
308
305
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
309
306
|
}
|
|
310
307
|
let s = e?.defaultFont ?? Gr.split(",")[0].trim();
|
|
311
|
-
o(s) ||
|
|
308
|
+
o(s) || Ln.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
309
|
function c() {
|
|
313
310
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
314
311
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
@@ -318,7 +315,7 @@ function qr(e) {
|
|
|
318
315
|
}
|
|
319
316
|
let l = k(() => c());
|
|
320
317
|
function u(e) {
|
|
321
|
-
return
|
|
318
|
+
return bn(e, {
|
|
322
319
|
customFonts: t.value,
|
|
323
320
|
defaultFallback: i.value
|
|
324
321
|
});
|
|
@@ -337,7 +334,7 @@ function qr(e) {
|
|
|
337
334
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
338
335
|
});
|
|
339
336
|
} catch (t) {
|
|
340
|
-
|
|
337
|
+
Ln.warn(`Failed to load custom font "${e.name}":`, t);
|
|
341
338
|
}
|
|
342
339
|
});
|
|
343
340
|
await Promise.allSettled(e), f || (n.value = !0);
|
|
@@ -397,11 +394,11 @@ function Yr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
397
394
|
}
|
|
398
395
|
// src/utils/mergeTagNodeSpec.ts
|
|
399
396
|
function Xr(e, t, n) {
|
|
400
|
-
return
|
|
397
|
+
return kn(e, n) ? {
|
|
401
398
|
type: "logicMergeTagNode",
|
|
402
399
|
attrs: {
|
|
403
400
|
value: e,
|
|
404
|
-
keyword:
|
|
401
|
+
keyword: hn(e, n)
|
|
405
402
|
}
|
|
406
403
|
} : {
|
|
407
404
|
type: "mergeTagNode",
|
|
@@ -435,7 +432,7 @@ function ei(e) {
|
|
|
435
432
|
...this.parent?.(),
|
|
436
433
|
color: {
|
|
437
434
|
default: null,
|
|
438
|
-
parseHTML: (e) => $r(
|
|
435
|
+
parseHTML: (e) => $r(cr(e.style.color)),
|
|
439
436
|
renderHTML: (e) => {
|
|
440
437
|
let t = $r(e.color);
|
|
441
438
|
return t ? { style: `color: ${t}` } : {};
|
|
@@ -445,7 +442,7 @@ function ei(e) {
|
|
|
445
442
|
} });
|
|
446
443
|
}
|
|
447
444
|
// src/composables/useRichTextLinkDialog.ts
|
|
448
|
-
function ti(e, t =
|
|
445
|
+
function ti(e, t = Dn.liquid, n = () => !0) {
|
|
449
446
|
let r = M(!1), i = M(""), a = M(""), o = M(null);
|
|
450
447
|
Vr(o, r);
|
|
451
448
|
function s() {
|
|
@@ -475,8 +472,8 @@ function ti(e, t = Ct.liquid, n = () => !0) {
|
|
|
475
472
|
if (t.startsWith("#")) return t;
|
|
476
473
|
if (t.startsWith("//")) return `https:${t}`;
|
|
477
474
|
if (l.test(t)) return t;
|
|
478
|
-
let n =
|
|
479
|
-
return n ?
|
|
475
|
+
let n = Zt(t);
|
|
476
|
+
return n ? on.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
480
477
|
}
|
|
481
478
|
function f() {
|
|
482
479
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -501,7 +498,7 @@ function ti(e, t = Ct.liquid, n = () => !0) {
|
|
|
501
498
|
}
|
|
502
499
|
// src/composables/useRichTextEditor.ts
|
|
503
500
|
function ni(t) {
|
|
504
|
-
let n = z(
|
|
501
|
+
let n = z(Me, null), r = ar(), i = z(_e, null), a = k(() => r.value && !i?.value), { mergeTags: o, canRequestMergeTag: s, isRequesting: l, requestMergeTag: u, syntax: d, autocomplete: f } = dt(), { canInsertLogicTag: p, isRequesting: m, requestLogicTag: h } = dr(), g = z(Ue, null), _ = (w(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = On(d), y = ie(null), b = n?.content ? ur(n) : null, x = () => Ot(b?.settings.value ?? { locale: "en" });
|
|
505
502
|
c(x, (e) => {
|
|
506
503
|
let t = y.value?.view.dom;
|
|
507
504
|
t && t.setAttribute("dir", e);
|
|
@@ -514,7 +511,7 @@ function ni(t) {
|
|
|
514
511
|
e && e.view.dispatch(e.state.tr);
|
|
515
512
|
}
|
|
516
513
|
});
|
|
517
|
-
let { start: N, stop: te } =
|
|
514
|
+
let { start: N, stop: te } = ft(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), ne = ie(null), P = M(!0), F = M(null), I = !1, L = null;
|
|
518
515
|
async function ae() {
|
|
519
516
|
F.value = null, P.value = !0;
|
|
520
517
|
try {
|
|
@@ -545,7 +542,7 @@ function ni(t) {
|
|
|
545
542
|
y.value = c, P.value = !1, N();
|
|
546
543
|
} catch (e) {
|
|
547
544
|
if (I) return;
|
|
548
|
-
|
|
545
|
+
Ln.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
546
|
}
|
|
550
547
|
}
|
|
551
548
|
function R() {
|
|
@@ -645,7 +642,7 @@ function li(e) {
|
|
|
645
642
|
let c = ++o;
|
|
646
643
|
r.value = !0;
|
|
647
644
|
let l = {
|
|
648
|
-
content:
|
|
645
|
+
content: $t(e.getContent()),
|
|
649
646
|
surface: e.surface,
|
|
650
647
|
trigger: t,
|
|
651
648
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
@@ -653,7 +650,7 @@ function li(e) {
|
|
|
653
650
|
try {
|
|
654
651
|
let e = await s(l);
|
|
655
652
|
if (c !== o) return;
|
|
656
|
-
if (!
|
|
653
|
+
if (!bt(e)) {
|
|
657
654
|
i.value = !0, n.value = null;
|
|
658
655
|
return;
|
|
659
656
|
}
|
|
@@ -774,10 +771,10 @@ function mi(e) {
|
|
|
774
771
|
try {
|
|
775
772
|
let t = await import("@templatical/quality");
|
|
776
773
|
if (d) return;
|
|
777
|
-
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u =
|
|
774
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u = ht(n, p, { debounce: e.debounce ?? 500 });
|
|
778
775
|
} catch {
|
|
779
776
|
if (d) return;
|
|
780
|
-
o.value = !0, pi || (pi = !0,
|
|
777
|
+
o.value = !0, pi || (pi = !0, Ln.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."));
|
|
781
778
|
}
|
|
782
779
|
}
|
|
783
780
|
function p() {
|
|
@@ -843,7 +840,7 @@ function hi(e, t, n = []) {
|
|
|
843
840
|
let i = o(r);
|
|
844
841
|
if (!i) return "";
|
|
845
842
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
846
|
-
return a ?
|
|
843
|
+
return a ? nr(a, t.t, n) : "";
|
|
847
844
|
}
|
|
848
845
|
function c(t, n) {
|
|
849
846
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -935,66 +932,66 @@ function vi(e) {
|
|
|
935
932
|
return yi(e, t), t;
|
|
936
933
|
}
|
|
937
934
|
function yi(e, t) {
|
|
938
|
-
for (let n of e) if (
|
|
935
|
+
for (let n of e) if (It(n)) t.add(n.customType);
|
|
939
936
|
else if (n.type === "section") {
|
|
940
937
|
let e = n.children;
|
|
941
938
|
if (!e) continue;
|
|
942
939
|
for (let n of e) yi(n, t);
|
|
943
|
-
} else
|
|
940
|
+
} else jt(n) && yi(n.children, t);
|
|
944
941
|
}
|
|
945
942
|
// src/utils/registerBuiltInBlocks.ts
|
|
946
943
|
var bi = [
|
|
947
944
|
{
|
|
948
945
|
type: "section",
|
|
949
|
-
createBlock:
|
|
946
|
+
createBlock: yn
|
|
950
947
|
},
|
|
951
948
|
{
|
|
952
949
|
type: "title",
|
|
953
|
-
createBlock:
|
|
950
|
+
createBlock: gt
|
|
954
951
|
},
|
|
955
952
|
{
|
|
956
953
|
type: "paragraph",
|
|
957
|
-
createBlock:
|
|
954
|
+
createBlock: Dt
|
|
958
955
|
},
|
|
959
956
|
{
|
|
960
957
|
type: "image",
|
|
961
|
-
createBlock:
|
|
958
|
+
createBlock: Bt
|
|
962
959
|
},
|
|
963
960
|
{
|
|
964
961
|
type: "button",
|
|
965
|
-
createBlock:
|
|
962
|
+
createBlock: kt
|
|
966
963
|
},
|
|
967
964
|
{
|
|
968
965
|
type: "divider",
|
|
969
|
-
createBlock:
|
|
966
|
+
createBlock: wt
|
|
970
967
|
},
|
|
971
968
|
{
|
|
972
969
|
type: "video",
|
|
973
|
-
createBlock:
|
|
970
|
+
createBlock: en
|
|
974
971
|
},
|
|
975
972
|
{
|
|
976
973
|
type: "social",
|
|
977
|
-
createBlock:
|
|
974
|
+
createBlock: Ht
|
|
978
975
|
},
|
|
979
976
|
{
|
|
980
977
|
type: "menu",
|
|
981
|
-
createBlock:
|
|
978
|
+
createBlock: St
|
|
982
979
|
},
|
|
983
980
|
{
|
|
984
981
|
type: "table",
|
|
985
|
-
createBlock:
|
|
982
|
+
createBlock: Nt
|
|
986
983
|
},
|
|
987
984
|
{
|
|
988
985
|
type: "spacer",
|
|
989
|
-
createBlock:
|
|
986
|
+
createBlock: Gt
|
|
990
987
|
},
|
|
991
988
|
{
|
|
992
989
|
type: "html",
|
|
993
|
-
createBlock:
|
|
990
|
+
createBlock: Rt
|
|
994
991
|
},
|
|
995
992
|
{
|
|
996
993
|
type: "countdown",
|
|
997
|
-
createBlock:
|
|
994
|
+
createBlock: Ft
|
|
998
995
|
}
|
|
999
996
|
];
|
|
1000
997
|
function xi(e, t) {
|
|
@@ -1015,10 +1012,10 @@ function Ci(e) {
|
|
|
1015
1012
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1016
1013
|
}
|
|
1017
1014
|
function wi(e, t, n) {
|
|
1018
|
-
let r = new Set(e.map((e) =>
|
|
1019
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1015
|
+
let r = new Set(e.map((e) => ir(e))), i = [], a = (e, t) => {
|
|
1016
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(ir(o)) && i.push(`${t}.${n}: ${o}`) : Ci(o) && a(o, `${t}.${n}`);
|
|
1020
1017
|
}, o = t;
|
|
1021
|
-
for (let [e, t] of Object.entries(
|
|
1018
|
+
for (let [e, t] of Object.entries(Yt)) {
|
|
1022
1019
|
let n = o?.[e];
|
|
1023
1020
|
a({
|
|
1024
1021
|
...t,
|
|
@@ -1026,7 +1023,7 @@ function wi(e, t, n) {
|
|
|
1026
1023
|
}, e);
|
|
1027
1024
|
}
|
|
1028
1025
|
return a({
|
|
1029
|
-
...
|
|
1026
|
+
...dn,
|
|
1030
1027
|
...n ?? {}
|
|
1031
1028
|
}, "template"), i;
|
|
1032
1029
|
}
|
|
@@ -1040,62 +1037,48 @@ function Ti(e) {
|
|
|
1040
1037
|
}
|
|
1041
1038
|
// src/i18n/index.ts
|
|
1042
1039
|
var Ei = /* #__PURE__ */ Object.assign({
|
|
1043
|
-
"./locales/ca.ts": () => import("./ca-
|
|
1044
|
-
"./locales/da.ts": () => import("./da-
|
|
1045
|
-
"./locales/de.ts": () => import("./de-
|
|
1046
|
-
"./locales/en.ts": () => import("./en-
|
|
1047
|
-
"./locales/es.ts": () => import("./es-
|
|
1048
|
-
"./locales/fr.ts": () => import("./fr-
|
|
1049
|
-
"./locales/ja.ts": () => import("./ja-
|
|
1050
|
-
"./locales/nl.ts": () => import("./nl-
|
|
1051
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
1052
|
-
}), Di = /* #__PURE__ */ Object.assign({
|
|
1053
|
-
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
1054
|
-
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
1055
|
-
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
1040
|
+
"./locales/ca.ts": () => import("./ca-BIseSbs-.js"),
|
|
1041
|
+
"./locales/da.ts": () => import("./da-DN46iRXS.js"),
|
|
1042
|
+
"./locales/de.ts": () => import("./de-Dyk8PPCm.js"),
|
|
1043
|
+
"./locales/en.ts": () => import("./en-BzMbMmgz.js"),
|
|
1044
|
+
"./locales/es.ts": () => import("./es-KSHEXYyf.js"),
|
|
1045
|
+
"./locales/fr.ts": () => import("./fr-DtKHfZyk.js"),
|
|
1046
|
+
"./locales/ja.ts": () => import("./ja-DUSaDVPA.js"),
|
|
1047
|
+
"./locales/nl.ts": () => import("./nl-DQbuxzD6.js"),
|
|
1048
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-CxpxBtvc.js")
|
|
1056
1049
|
});
|
|
1057
|
-
function
|
|
1050
|
+
function Di(e) {
|
|
1058
1051
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1059
1052
|
}
|
|
1060
|
-
var
|
|
1061
|
-
function
|
|
1053
|
+
var Oi = Di(Ei);
|
|
1054
|
+
function ki(e) {
|
|
1062
1055
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1063
1056
|
}
|
|
1064
|
-
function
|
|
1065
|
-
let n =
|
|
1066
|
-
return t.find((e) =>
|
|
1067
|
-
}
|
|
1068
|
-
function Ni(e) {
|
|
1069
|
-
return ji(e).split("-")[0];
|
|
1057
|
+
function Ai(e, t) {
|
|
1058
|
+
let n = ki(e);
|
|
1059
|
+
return t.find((e) => ki(e) === n);
|
|
1070
1060
|
}
|
|
1071
|
-
function
|
|
1072
|
-
return
|
|
1061
|
+
function ji(e) {
|
|
1062
|
+
return ki(e).split("-")[0];
|
|
1073
1063
|
}
|
|
1074
|
-
function
|
|
1075
|
-
return
|
|
1064
|
+
function Mi(e, t) {
|
|
1065
|
+
return Ai(e, t) ?? Ai(ji(e), t);
|
|
1076
1066
|
}
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
return (await t()).default;
|
|
1067
|
+
function Ni(e, t) {
|
|
1068
|
+
return Mi(e, t) ?? "en";
|
|
1080
1069
|
}
|
|
1081
|
-
async function
|
|
1082
|
-
let t =
|
|
1070
|
+
async function Pi(e) {
|
|
1071
|
+
let t = Ei[`./locales/${Ni(e, Oi)}.ts`];
|
|
1083
1072
|
return (await t()).default;
|
|
1084
1073
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
1074
|
+
function Fi(e) {
|
|
1075
|
+
return Mi(e, Oi) !== void 0;
|
|
1087
1076
|
}
|
|
1088
|
-
function
|
|
1089
|
-
return
|
|
1090
|
-
}
|
|
1091
|
-
function Bi() {
|
|
1092
|
-
return [...ki];
|
|
1093
|
-
}
|
|
1094
|
-
function Vi() {
|
|
1095
|
-
return [...Ai];
|
|
1077
|
+
function Ii() {
|
|
1078
|
+
return [...Oi];
|
|
1096
1079
|
}
|
|
1097
1080
|
// src/i18n/contentDefaults.ts
|
|
1098
|
-
var
|
|
1081
|
+
var Li = {
|
|
1099
1082
|
en: {
|
|
1100
1083
|
video: "Video",
|
|
1101
1084
|
days: "Days",
|
|
@@ -1169,17 +1152,17 @@ var Hi = {
|
|
|
1169
1152
|
expired: "Dette tilbud er udløbet"
|
|
1170
1153
|
}
|
|
1171
1154
|
};
|
|
1172
|
-
Object.keys(
|
|
1173
|
-
var
|
|
1174
|
-
function
|
|
1175
|
-
if (!e) return
|
|
1176
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1177
|
-
if (n) return
|
|
1178
|
-
let r =
|
|
1179
|
-
return r ?
|
|
1180
|
-
}
|
|
1181
|
-
function
|
|
1182
|
-
let t =
|
|
1155
|
+
Object.keys(Li);
|
|
1156
|
+
var Ri = new Map(Object.keys(Li).map((e) => [e.toLowerCase(), e]));
|
|
1157
|
+
function zi(e) {
|
|
1158
|
+
if (!e) return Li.en;
|
|
1159
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Ri.get(t);
|
|
1160
|
+
if (n) return Li[n];
|
|
1161
|
+
let r = Ri.get(ji(t));
|
|
1162
|
+
return r ? Li[r] : Li.en;
|
|
1163
|
+
}
|
|
1164
|
+
function Bi(e) {
|
|
1165
|
+
let t = zi(e);
|
|
1183
1166
|
return {
|
|
1184
1167
|
video: { alt: t.video },
|
|
1185
1168
|
countdown: {
|
|
@@ -1192,9 +1175,9 @@ function Gi(e) {
|
|
|
1192
1175
|
};
|
|
1193
1176
|
}
|
|
1194
1177
|
// src/utils/collectColorFieldIssues.ts
|
|
1195
|
-
function
|
|
1178
|
+
function Vi(e, t) {
|
|
1196
1179
|
let n = [], r = (r, i) => {
|
|
1197
|
-
let a =
|
|
1180
|
+
let a = $n(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1198
1181
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1199
1182
|
id: s("invalid-presets"),
|
|
1200
1183
|
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." : "")
|
|
@@ -1205,8 +1188,8 @@ function Ki(e, t) {
|
|
|
1205
1188
|
id: s("allow-custom-ignored"),
|
|
1206
1189
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1207
1190
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1208
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1209
|
-
e !== "" && !t.has(
|
|
1191
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => ir(e)));
|
|
1192
|
+
e !== "" && !t.has(ir(e)) && n.push({
|
|
1210
1193
|
id: s("off-palette-default"),
|
|
1211
1194
|
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.`
|
|
1212
1195
|
});
|
|
@@ -1217,7 +1200,7 @@ function Ki(e, t) {
|
|
|
1217
1200
|
return n;
|
|
1218
1201
|
}
|
|
1219
1202
|
// src/utils/keyboardShortcuts.ts
|
|
1220
|
-
function
|
|
1203
|
+
function Hi(e) {
|
|
1221
1204
|
for (let t of e.composedPath()) {
|
|
1222
1205
|
if (!(t instanceof HTMLElement)) continue;
|
|
1223
1206
|
if (t.isContentEditable) return !0;
|
|
@@ -1226,14 +1209,14 @@ function qi(e) {
|
|
|
1226
1209
|
}
|
|
1227
1210
|
return !1;
|
|
1228
1211
|
}
|
|
1229
|
-
function
|
|
1212
|
+
function Ui(e, t) {
|
|
1230
1213
|
let n = e.metaKey || e.ctrlKey;
|
|
1231
1214
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1232
1215
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1233
|
-
if (
|
|
1216
|
+
if (Hi(e)) return;
|
|
1234
1217
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1235
1218
|
} else {
|
|
1236
|
-
if (t.isPicking?.() && !
|
|
1219
|
+
if (t.isPicking?.() && !Hi(e)) {
|
|
1237
1220
|
if (e.key === "Escape") {
|
|
1238
1221
|
e.preventDefault(), t.onCancelPick?.();
|
|
1239
1222
|
return;
|
|
@@ -1247,139 +1230,139 @@ function Ji(e, t) {
|
|
|
1247
1230
|
return;
|
|
1248
1231
|
}
|
|
1249
1232
|
}
|
|
1250
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1233
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Hi(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1251
1234
|
}
|
|
1252
1235
|
}
|
|
1253
1236
|
// src/utils/blockComponentResolver.ts
|
|
1254
|
-
function
|
|
1237
|
+
function Wi(e, t) {
|
|
1255
1238
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1256
1239
|
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;
|
|
1257
1240
|
}
|
|
1258
|
-
function
|
|
1241
|
+
function Gi(e, t, n) {
|
|
1259
1242
|
if (t) {
|
|
1260
1243
|
let n = t.getComponent(e);
|
|
1261
1244
|
if (n) return n;
|
|
1262
1245
|
}
|
|
1263
1246
|
return n[e.type] ?? null;
|
|
1264
1247
|
}
|
|
1265
|
-
var
|
|
1266
|
-
function
|
|
1248
|
+
var Ki = "--tpl-block-bg-layer", qi = "--tpl-email-frame-width", Ji = "tpl-has-bg-image";
|
|
1249
|
+
function Yi(e, t) {
|
|
1267
1250
|
if (t === null) return {};
|
|
1268
|
-
let n =
|
|
1251
|
+
let n = Ct(e);
|
|
1269
1252
|
if (n === null) return {};
|
|
1270
|
-
let r = t?.trim(), i = r ?
|
|
1253
|
+
let r = t?.trim(), i = r ? Sn(r) : n.url;
|
|
1271
1254
|
return {
|
|
1272
1255
|
backgroundImage: `url("${i}")`,
|
|
1273
1256
|
backgroundSize: n.size,
|
|
1274
1257
|
backgroundPosition: n.position,
|
|
1275
1258
|
backgroundRepeat: n.repeat,
|
|
1276
|
-
[
|
|
1259
|
+
[Ki]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1277
1260
|
};
|
|
1278
1261
|
}
|
|
1279
|
-
function
|
|
1280
|
-
return e &&
|
|
1262
|
+
function Xi(e) {
|
|
1263
|
+
return e && Ki in e ? Ji : void 0;
|
|
1281
1264
|
}
|
|
1282
|
-
var
|
|
1265
|
+
var Zi = {
|
|
1283
1266
|
top: "flex-start",
|
|
1284
1267
|
middle: "center",
|
|
1285
1268
|
bottom: "flex-end"
|
|
1286
1269
|
};
|
|
1287
|
-
function
|
|
1288
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1270
|
+
function Qi(e, t) {
|
|
1271
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${$i(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1289
1272
|
return {
|
|
1290
1273
|
display: "flex",
|
|
1291
1274
|
flexDirection: "column",
|
|
1292
|
-
justifyContent:
|
|
1275
|
+
justifyContent: Zi[e.verticalAlign],
|
|
1293
1276
|
boxSizing: "border-box",
|
|
1294
1277
|
...n
|
|
1295
1278
|
};
|
|
1296
1279
|
}
|
|
1297
|
-
function
|
|
1280
|
+
function $i(e, t) {
|
|
1298
1281
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1299
1282
|
}
|
|
1300
|
-
function
|
|
1283
|
+
function ea(e, t = {}) {
|
|
1301
1284
|
if (e.type === "wrapper") return {};
|
|
1302
1285
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1303
1286
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1304
1287
|
backgroundColor: r || "transparent"
|
|
1305
1288
|
};
|
|
1306
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1307
|
-
let n =
|
|
1289
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? mn.paragraphGap : mn.paragraphGap}px`), e.type === "section") {
|
|
1290
|
+
let n = tn(e.borderRadius);
|
|
1308
1291
|
n !== null && (i.borderRadius = n);
|
|
1309
|
-
let r =
|
|
1310
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1292
|
+
let r = Et(e);
|
|
1293
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Qi(r, t.heroBoxWidth)), Object.assign(i, Yi({
|
|
1311
1294
|
...e.backgroundImage,
|
|
1312
1295
|
size: "cover",
|
|
1313
1296
|
repeat: !1
|
|
1314
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1297
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, na(e.border)), Object.assign(i, Yi(e.backgroundImage, t.backgroundImageUrl)));
|
|
1315
1298
|
}
|
|
1316
1299
|
return i;
|
|
1317
1300
|
}
|
|
1318
|
-
function
|
|
1319
|
-
return e.type === "section" ?
|
|
1320
|
-
backgroundImageUrl:
|
|
1301
|
+
function ta(e, t, n, r) {
|
|
1302
|
+
return e.type === "section" ? ea(e, {
|
|
1303
|
+
backgroundImageUrl: Fn(t, e.backgroundImage, n),
|
|
1321
1304
|
heroBoxWidth: r
|
|
1322
|
-
}) :
|
|
1305
|
+
}) : ea(e);
|
|
1323
1306
|
}
|
|
1324
|
-
function
|
|
1307
|
+
function na(e) {
|
|
1325
1308
|
let t = {};
|
|
1326
|
-
for (let [n, r] of Object.entries(
|
|
1309
|
+
for (let [n, r] of Object.entries(Qt(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1327
1310
|
return t;
|
|
1328
1311
|
}
|
|
1329
|
-
var
|
|
1312
|
+
var ra = {
|
|
1330
1313
|
width: "100cqw",
|
|
1331
1314
|
maxWidth: "none",
|
|
1332
1315
|
marginInline: "calc(50% - 50cqw)",
|
|
1333
1316
|
boxSizing: "border-box"
|
|
1334
1317
|
};
|
|
1335
|
-
function
|
|
1318
|
+
function ia(e) {
|
|
1336
1319
|
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1337
1320
|
}
|
|
1338
|
-
function
|
|
1321
|
+
function aa(e) {
|
|
1339
1322
|
let t = {
|
|
1340
1323
|
width: "var(--tpl-email-frame-width)",
|
|
1341
1324
|
maxWidth: "100%",
|
|
1342
1325
|
marginInline: "auto",
|
|
1343
1326
|
boxSizing: "border-box"
|
|
1344
1327
|
};
|
|
1345
|
-
return e && (t.padding =
|
|
1328
|
+
return e && (t.padding = ia(e)), t;
|
|
1346
1329
|
}
|
|
1347
|
-
function
|
|
1330
|
+
function oa(e, t = {}) {
|
|
1348
1331
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1349
1332
|
let n = e.wrapper, r = {};
|
|
1350
|
-
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding =
|
|
1351
|
-
let e =
|
|
1333
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = ia(n.padding)), !n.fullWidth) {
|
|
1334
|
+
let e = tn(n.borderRadius);
|
|
1352
1335
|
e !== null && (r.borderRadius = e);
|
|
1353
1336
|
}
|
|
1354
|
-
return Object.assign(r,
|
|
1337
|
+
return Object.assign(r, Yi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, ra), r;
|
|
1355
1338
|
}
|
|
1356
|
-
function
|
|
1339
|
+
function sa(e, t = {}) {
|
|
1357
1340
|
if (e.type !== "wrapper") return null;
|
|
1358
1341
|
let n = {};
|
|
1359
|
-
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding =
|
|
1342
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = ia(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Yi(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, ra), n;
|
|
1360
1343
|
}
|
|
1361
1344
|
// src/utils/mergeTagLabelSegments.ts
|
|
1362
|
-
function
|
|
1345
|
+
function ca(e, t, n, r = !1) {
|
|
1363
1346
|
if (!e) return [];
|
|
1364
1347
|
let i = [], a = 0;
|
|
1365
|
-
for (let o of
|
|
1348
|
+
for (let o of Cn(e, n)) {
|
|
1366
1349
|
o.index > a && i.push({
|
|
1367
1350
|
type: "text",
|
|
1368
1351
|
value: e.slice(a, o.index)
|
|
1369
1352
|
});
|
|
1370
1353
|
let s = o.value;
|
|
1371
|
-
if (
|
|
1372
|
-
let e = r ?
|
|
1354
|
+
if (Lt(s, n)) {
|
|
1355
|
+
let e = r ? an(s, t) : void 0;
|
|
1373
1356
|
i.push(e === void 0 ? {
|
|
1374
1357
|
type: "tag",
|
|
1375
|
-
value:
|
|
1358
|
+
value: sn(s, t)
|
|
1376
1359
|
} : {
|
|
1377
1360
|
type: "text",
|
|
1378
1361
|
value: e
|
|
1379
1362
|
});
|
|
1380
|
-
} else
|
|
1363
|
+
} else kn(s, n) ? i.push({
|
|
1381
1364
|
type: "tag",
|
|
1382
|
-
value:
|
|
1365
|
+
value: hn(s, n)
|
|
1383
1366
|
}) : i.push({
|
|
1384
1367
|
type: "text",
|
|
1385
1368
|
value: s
|
|
@@ -1392,27 +1375,27 @@ function pa(e, t, n, r = !1) {
|
|
|
1392
1375
|
}), i;
|
|
1393
1376
|
}
|
|
1394
1377
|
// src/components/MergeTagPreviewText.vue
|
|
1395
|
-
var
|
|
1378
|
+
var la = B({
|
|
1396
1379
|
name: "MergeTagPreviewText",
|
|
1397
1380
|
props: { text: {
|
|
1398
1381
|
type: String,
|
|
1399
1382
|
required: !0
|
|
1400
1383
|
} },
|
|
1401
1384
|
setup(e) {
|
|
1402
|
-
let t = z(
|
|
1385
|
+
let t = z(xe, le), n = z(ut, Dn.liquid), r = z(Le, null), i = k(() => ca(e.text, t.value, n, r?.value ?? !1));
|
|
1403
1386
|
return () => i.value.map((e, t) => e.type === "tag" ? x("span", {
|
|
1404
1387
|
key: t,
|
|
1405
1388
|
class: "tpl-merge-tag-label"
|
|
1406
1389
|
}, e.value) : e.value);
|
|
1407
1390
|
}
|
|
1408
|
-
}),
|
|
1391
|
+
}), ua = ["href"], da = /* @__PURE__ */ B({
|
|
1409
1392
|
__name: "ButtonBlock",
|
|
1410
1393
|
props: {
|
|
1411
1394
|
block: {},
|
|
1412
1395
|
viewport: {}
|
|
1413
1396
|
},
|
|
1414
1397
|
setup(e) {
|
|
1415
|
-
let t = e, n =
|
|
1398
|
+
let t = e, n = qe(lt, "ButtonBlock");
|
|
1416
1399
|
function r(e) {
|
|
1417
1400
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1418
1401
|
}
|
|
@@ -1423,26 +1406,26 @@ var ma = B({
|
|
|
1423
1406
|
backgroundColor: t.block.backgroundColor,
|
|
1424
1407
|
color: t.block.textColor,
|
|
1425
1408
|
fontSize: `${t.block.fontSize}px`,
|
|
1426
|
-
lineHeight: String(
|
|
1409
|
+
lineHeight: String(un(t.block)),
|
|
1427
1410
|
fontWeight: r(t.block.fontWeight),
|
|
1428
1411
|
textDecoration: "none",
|
|
1429
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1412
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : tn(t.block.borderRadius) ?? "0px",
|
|
1430
1413
|
textAlign: "center"
|
|
1431
1414
|
};
|
|
1432
|
-
return Object.assign(e,
|
|
1415
|
+
return Object.assign(e, na(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") : typeof t.block.width == "string" && vt(t.block.width) !== null && (e.width = t.block.width, e.boxSizing = "border-box"), e;
|
|
1433
1416
|
}), o = k(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1434
1417
|
return (t, n) => (m(), N("div", { style: y(o.value) }, [P("a", {
|
|
1435
1418
|
href: e.block.url || "#",
|
|
1436
1419
|
style: y(a.value),
|
|
1437
1420
|
class: "tpl:cursor-default",
|
|
1438
1421
|
onClick: n[0] ||= i(() => {}, ["prevent"])
|
|
1439
|
-
}, [E(
|
|
1422
|
+
}, [E(la, { text: e.block.text }, null, 8, ["text"])], 12, ua)], 4));
|
|
1440
1423
|
}
|
|
1441
|
-
}),
|
|
1424
|
+
}), fa = ["innerHTML"], pa = [
|
|
1442
1425
|
"src",
|
|
1443
1426
|
"width",
|
|
1444
1427
|
"height"
|
|
1445
|
-
],
|
|
1428
|
+
], ma = /* @__PURE__ */ B({
|
|
1446
1429
|
__name: "CustomBlockIcon",
|
|
1447
1430
|
props: {
|
|
1448
1431
|
icon: {},
|
|
@@ -1458,33 +1441,33 @@ var ma = B({
|
|
|
1458
1441
|
height: `${n.value}px`
|
|
1459
1442
|
}),
|
|
1460
1443
|
innerHTML: a.value
|
|
1461
|
-
}, null, 12,
|
|
1444
|
+
}, null, 12, fa)) : i.value ? (m(), N("img", {
|
|
1462
1445
|
key: 1,
|
|
1463
1446
|
src: e.icon,
|
|
1464
1447
|
width: n.value,
|
|
1465
1448
|
height: n.value,
|
|
1466
1449
|
class: "tpl:inline-block",
|
|
1467
1450
|
alt: ""
|
|
1468
|
-
}, null, 8,
|
|
1451
|
+
}, null, 8, pa)) : (m(), R(A(Pr), {
|
|
1469
1452
|
key: 2,
|
|
1470
1453
|
size: n.value,
|
|
1471
1454
|
"stroke-width": 1.5
|
|
1472
1455
|
}, null, 8, ["size"]));
|
|
1473
1456
|
}
|
|
1474
|
-
}),
|
|
1457
|
+
}), ha = { class: "tpl:w-full" }, ga = {
|
|
1475
1458
|
key: 0,
|
|
1476
1459
|
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)]"
|
|
1477
|
-
},
|
|
1460
|
+
}, _a = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, va = {
|
|
1478
1461
|
key: 1,
|
|
1479
1462
|
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)]"
|
|
1480
|
-
},
|
|
1463
|
+
}, ya = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ba = {
|
|
1481
1464
|
key: 2,
|
|
1482
1465
|
class: "tpl:relative"
|
|
1483
|
-
},
|
|
1466
|
+
}, xa = ["innerHTML"], Sa = {
|
|
1484
1467
|
key: 0,
|
|
1485
1468
|
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]",
|
|
1486
1469
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1487
|
-
},
|
|
1470
|
+
}, Ca = /* @__PURE__ */ B({
|
|
1488
1471
|
__name: "CustomBlock",
|
|
1489
1472
|
props: {
|
|
1490
1473
|
block: {},
|
|
@@ -1492,7 +1475,7 @@ var ma = B({
|
|
|
1492
1475
|
},
|
|
1493
1476
|
emits: ["fetchData"],
|
|
1494
1477
|
setup(e, { emit: t }) {
|
|
1495
|
-
let n = e, r = t, { t: a } =
|
|
1478
|
+
let n = e, r = t, { t: a } = rt(), o = z(Ke, null), l = M(""), u = k(() => gr(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 } = Pn({
|
|
1496
1479
|
definition: p,
|
|
1497
1480
|
block: g,
|
|
1498
1481
|
onUpdate: (e, t) => {
|
|
@@ -1501,10 +1484,10 @@ var ma = B({
|
|
|
1501
1484
|
dataSourceFetched: t
|
|
1502
1485
|
});
|
|
1503
1486
|
}
|
|
1504
|
-
}), x = z(
|
|
1487
|
+
}), x = z(xe, le), S = z(Le, null), C = k(() => {
|
|
1505
1488
|
if (!S?.value) return n.block;
|
|
1506
1489
|
let e = {};
|
|
1507
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1490
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? fn(r, x.value) : r;
|
|
1508
1491
|
return {
|
|
1509
1492
|
...n.block,
|
|
1510
1493
|
fieldValues: e
|
|
@@ -1521,17 +1504,17 @@ var ma = B({
|
|
|
1521
1504
|
}
|
|
1522
1505
|
}
|
|
1523
1506
|
}
|
|
1524
|
-
let T =
|
|
1507
|
+
let T = pt(w, 150);
|
|
1525
1508
|
return s(() => {
|
|
1526
1509
|
w();
|
|
1527
1510
|
}), c(() => n.block.fieldValues, () => {
|
|
1528
1511
|
T();
|
|
1529
1512
|
}, { deep: !0 }), c(() => S?.value, () => {
|
|
1530
1513
|
T();
|
|
1531
|
-
}), (e, t) => (m(), N("div",
|
|
1514
|
+
}), (e, t) => (m(), N("div", ha, [h.value ? f.value ? (m(), N("div", va, [E(A(yr), {
|
|
1532
1515
|
size: 24,
|
|
1533
1516
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1534
|
-
}), P("span",
|
|
1517
|
+
}), P("span", ya, d(A(a).customBlocks.renderError), 1)])) : (m(), N("div", ba, [P("div", { innerHTML: u.value }, null, 8, xa), A(b) && A(y) ? (m(), N("div", Sa, [A(_) ? (m(), R(vr, {
|
|
1535
1518
|
key: 1,
|
|
1536
1519
|
class: "tpl:w-48"
|
|
1537
1520
|
})) : (m(), N("button", {
|
|
@@ -1539,16 +1522,16 @@ var ma = B({
|
|
|
1539
1522
|
type: "button",
|
|
1540
1523
|
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)]",
|
|
1541
1524
|
onClick: t[0] ||= i((...e) => A(v) && A(v)(...e), ["stop"])
|
|
1542
|
-
}, [p.value?.icon ? (m(), R(
|
|
1525
|
+
}, [p.value?.icon ? (m(), R(ma, {
|
|
1543
1526
|
key: 0,
|
|
1544
1527
|
icon: p.value.icon,
|
|
1545
1528
|
size: 16
|
|
1546
|
-
}, null, 8, ["icon"])) : j("", !0), te(" " + d(p.value?.dataSource?.label || A(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (m(), N("div",
|
|
1529
|
+
}, null, 8, ["icon"])) : j("", !0), te(" " + d(p.value?.dataSource?.label || A(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (m(), N("div", ga, [E(A(Rr), {
|
|
1547
1530
|
size: 24,
|
|
1548
1531
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1549
|
-
}), P("span",
|
|
1532
|
+
}), P("span", _a, d(A(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1550
1533
|
}
|
|
1551
|
-
}),
|
|
1534
|
+
}), wa = { class: "tpl:w-full" }, Ta = /* @__PURE__ */ B({
|
|
1552
1535
|
__name: "DividerBlock",
|
|
1553
1536
|
props: {
|
|
1554
1537
|
block: {},
|
|
@@ -1560,28 +1543,28 @@ var ma = B({
|
|
|
1560
1543
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1561
1544
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1562
1545
|
}));
|
|
1563
|
-
return (e, t) => (m(), N("div",
|
|
1546
|
+
return (e, t) => (m(), N("div", wa, [P("hr", {
|
|
1564
1547
|
class: "tpl:m-0 tpl:border-none",
|
|
1565
1548
|
style: y(n.value)
|
|
1566
1549
|
}, null, 4)]));
|
|
1567
1550
|
}
|
|
1568
|
-
}),
|
|
1551
|
+
}), Ea = { class: "tpl:w-full" }, Da = ["srcdoc", "title"], Oa = {
|
|
1569
1552
|
key: 1,
|
|
1570
1553
|
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)]"
|
|
1571
|
-
},
|
|
1554
|
+
}, ka = {
|
|
1572
1555
|
key: 0,
|
|
1573
1556
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1574
|
-
},
|
|
1557
|
+
}, Aa = {
|
|
1575
1558
|
key: 1,
|
|
1576
1559
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1577
|
-
},
|
|
1560
|
+
}, ja = /* @__PURE__ */ B({
|
|
1578
1561
|
__name: "HtmlBlock",
|
|
1579
1562
|
props: {
|
|
1580
1563
|
block: {},
|
|
1581
1564
|
viewport: {}
|
|
1582
1565
|
},
|
|
1583
1566
|
setup(e) {
|
|
1584
|
-
let t = e, { t: n } =
|
|
1567
|
+
let t = e, { t: n } = rt(), r = z(ct, !1), i = k(() => t.block.content.trim().length > 0), a = k(() => r && i.value), o = z(xe, le), s = z(Le, null), l = k(() => s?.value ? fn(t.block.content, o.value) : t.block.content), u = M(null), f = M(60), p = null;
|
|
1585
1568
|
function h() {
|
|
1586
1569
|
let e = u.value?.contentDocument;
|
|
1587
1570
|
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1595,7 +1578,7 @@ var ma = B({
|
|
|
1595
1578
|
e || (p?.disconnect(), p = null);
|
|
1596
1579
|
}), re(() => {
|
|
1597
1580
|
p?.disconnect(), p = null;
|
|
1598
|
-
}), (e, t) => (m(), N("div",
|
|
1581
|
+
}), (e, t) => (m(), N("div", Ea, [a.value ? (m(), N("iframe", {
|
|
1599
1582
|
key: 0,
|
|
1600
1583
|
ref_key: "iframeRef",
|
|
1601
1584
|
ref: u,
|
|
@@ -1605,18 +1588,18 @@ var ma = B({
|
|
|
1605
1588
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1606
1589
|
style: y({ height: `${f.value}px` }),
|
|
1607
1590
|
onLoad: g
|
|
1608
|
-
}, null, 44,
|
|
1591
|
+
}, null, 44, Da)) : (m(), N("div", Oa, [E(A(Nn), {
|
|
1609
1592
|
size: 24,
|
|
1610
1593
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1611
|
-
}), i.value ? (m(), N("span",
|
|
1594
|
+
}), i.value ? (m(), N("span", ka, d(A(n).html.preview), 1)) : (m(), N("span", Aa, d(A(n).html.empty), 1))]))]));
|
|
1612
1595
|
}
|
|
1613
|
-
}),
|
|
1596
|
+
}), Ma = ["data-drop-enabled"], Na = ["href"], Pa = ["src", "alt"], Fa = ["src", "alt"], Ia = {
|
|
1614
1597
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1615
1598
|
style: { opacity: "0.7" }
|
|
1616
|
-
},
|
|
1599
|
+
}, La = ["href"], Ra = ["src", "alt"], za = ["src", "alt"], Ba = {
|
|
1617
1600
|
key: 4,
|
|
1618
1601
|
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)]"
|
|
1619
|
-
},
|
|
1602
|
+
}, Va = ["aria-label"], Ha = { key: 1 }, Ua = /* @__PURE__ */ B({
|
|
1620
1603
|
__name: "ImageBlock",
|
|
1621
1604
|
props: {
|
|
1622
1605
|
block: {},
|
|
@@ -1624,21 +1607,21 @@ var ma = B({
|
|
|
1624
1607
|
},
|
|
1625
1608
|
emits: ["update"],
|
|
1626
1609
|
setup(e, { emit: t }) {
|
|
1627
|
-
let n = e, r = t, { t: a } =
|
|
1610
|
+
let n = e, r = t, { t: a } = rt(), { syntax: o } = dt(), s = k(() => Mt(n.block.src, o));
|
|
1628
1611
|
function c(e) {
|
|
1629
1612
|
let t = {
|
|
1630
1613
|
src: e.url,
|
|
1631
|
-
...
|
|
1614
|
+
...qn(Wn(e.width, e.height))
|
|
1632
1615
|
};
|
|
1633
1616
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1634
1617
|
}
|
|
1635
|
-
let l = M(), { canBrowse: u, dropEnabled: f, isUploading: p, showOverlay: h, openMediaBrowser: g } =
|
|
1618
|
+
let l = M(), { canBrowse: u, dropEnabled: f, isUploading: p, showOverlay: h, openMediaBrowser: g } = Qn({
|
|
1636
1619
|
target: l,
|
|
1637
1620
|
value: () => n.block.src,
|
|
1638
1621
|
blocked: s,
|
|
1639
1622
|
apply: c
|
|
1640
1623
|
}), _ = k(() => ({ textAlign: n.block.align })), v = k(() => {
|
|
1641
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1624
|
+
let e = n.block.border, t = ["left", "right"].map((t) => Tn(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1642
1625
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1643
1626
|
}), b = k(() => {
|
|
1644
1627
|
let e = n.block.align;
|
|
@@ -1646,13 +1629,13 @@ var ma = B({
|
|
|
1646
1629
|
maxWidth: "100%",
|
|
1647
1630
|
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1648
1631
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1649
|
-
borderRadius:
|
|
1650
|
-
...
|
|
1632
|
+
borderRadius: tn(n.block.borderRadius) ?? void 0,
|
|
1633
|
+
...na(n.block.border),
|
|
1651
1634
|
display: "block",
|
|
1652
1635
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1653
1636
|
marginRight: e === "center" ? "auto" : void 0
|
|
1654
1637
|
};
|
|
1655
|
-
}), x =
|
|
1638
|
+
}), x = Hn(() => s.value ? void 0 : n.block.src), S = Hn(() => s.value ? n.block.placeholderUrl : void 0);
|
|
1656
1639
|
return (t, n) => (m(), N("div", {
|
|
1657
1640
|
ref_key: "dropZoneRef",
|
|
1658
1641
|
ref: l,
|
|
@@ -1660,7 +1643,7 @@ var ma = B({
|
|
|
1660
1643
|
"data-drop-enabled": A(f),
|
|
1661
1644
|
class: "tpl:relative tpl:w-full",
|
|
1662
1645
|
style: y(_.value)
|
|
1663
|
-
}, [A(h) ? (m(), R(
|
|
1646
|
+
}, [A(h) ? (m(), R(Kn, {
|
|
1664
1647
|
key: 0,
|
|
1665
1648
|
uploading: A(p),
|
|
1666
1649
|
size: "canvas"
|
|
@@ -1676,13 +1659,13 @@ var ma = B({
|
|
|
1676
1659
|
src: A(S),
|
|
1677
1660
|
alt: e.block.alt || A(a).image.altTextPlaceholder,
|
|
1678
1661
|
style: y(b.value)
|
|
1679
|
-
}, null, 12,
|
|
1662
|
+
}, null, 12, Pa)], 8, Na)) : (m(), N("img", {
|
|
1680
1663
|
key: 1,
|
|
1681
1664
|
class: "tpl:border-0",
|
|
1682
1665
|
src: A(S),
|
|
1683
1666
|
alt: e.block.alt,
|
|
1684
1667
|
style: y(b.value)
|
|
1685
|
-
}, null, 12,
|
|
1668
|
+
}, null, 12, Fa))], 64)) : e.block.src && s.value ? (m(), N("div", {
|
|
1686
1669
|
key: 2,
|
|
1687
1670
|
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)]",
|
|
1688
1671
|
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, b.value])
|
|
@@ -1691,7 +1674,7 @@ var ma = B({
|
|
|
1691
1674
|
"stroke-width": 1.5,
|
|
1692
1675
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1693
1676
|
style: { opacity: "0.5" }
|
|
1694
|
-
}), P("span",
|
|
1677
|
+
}), P("span", Ia, [E(la, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (m(), N(L, { key: 3 }, [e.block.linkUrl ? (m(), N("a", {
|
|
1695
1678
|
key: 0,
|
|
1696
1679
|
href: e.block.linkUrl,
|
|
1697
1680
|
target: "_blank",
|
|
@@ -1703,13 +1686,13 @@ var ma = B({
|
|
|
1703
1686
|
src: A(x),
|
|
1704
1687
|
alt: e.block.alt || A(a).image.altTextPlaceholder,
|
|
1705
1688
|
style: y(b.value)
|
|
1706
|
-
}, null, 12,
|
|
1689
|
+
}, null, 12, Ra)], 8, La)) : (m(), N("img", {
|
|
1707
1690
|
key: 1,
|
|
1708
1691
|
class: "tpl:border-0",
|
|
1709
1692
|
src: A(x),
|
|
1710
1693
|
alt: e.block.alt,
|
|
1711
1694
|
style: y(b.value)
|
|
1712
|
-
}, null, 12,
|
|
1695
|
+
}, null, 12, za))], 64)) : (m(), N("div", Ba, [A(u) ? (m(), N("button", {
|
|
1713
1696
|
key: 0,
|
|
1714
1697
|
"aria-label": A(a).image.browseMedia,
|
|
1715
1698
|
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)]",
|
|
@@ -1717,19 +1700,19 @@ var ma = B({
|
|
|
1717
1700
|
}, [E(A(br), {
|
|
1718
1701
|
size: 14,
|
|
1719
1702
|
"stroke-width": 1.5
|
|
1720
|
-
}), te(" " + d(A(a).image.browseMedia), 1)], 8,
|
|
1703
|
+
}), te(" " + d(A(a).image.browseMedia), 1)], 8, Va)) : (m(), N("span", Ha, d(A(a).image.clickToAdd), 1))]))], 12, Ma));
|
|
1721
1704
|
}
|
|
1722
|
-
}),
|
|
1705
|
+
}), Wa = { class: "tpl:w-full" }, Ga = ["href"], Ka = {
|
|
1723
1706
|
key: 1,
|
|
1724
1707
|
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)]"
|
|
1725
|
-
},
|
|
1708
|
+
}, qa = /* @__PURE__ */ B({
|
|
1726
1709
|
__name: "MenuBlock",
|
|
1727
1710
|
props: {
|
|
1728
1711
|
block: {},
|
|
1729
1712
|
viewport: {}
|
|
1730
1713
|
},
|
|
1731
1714
|
setup(e) {
|
|
1732
|
-
let t = e, { t: n } =
|
|
1715
|
+
let t = e, { t: n } = rt(), r = qe(lt, "MenuBlock"), a = k(() => ({
|
|
1733
1716
|
display: "flex",
|
|
1734
1717
|
flexWrap: "wrap",
|
|
1735
1718
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1741,7 +1724,7 @@ var ma = B({
|
|
|
1741
1724
|
function s(e) {
|
|
1742
1725
|
return e || t.block.linkColor || t.block.color;
|
|
1743
1726
|
}
|
|
1744
|
-
return (t, r) => (m(), N("div",
|
|
1727
|
+
return (t, r) => (m(), N("div", Wa, [o.value ? (m(), N("div", {
|
|
1745
1728
|
key: 0,
|
|
1746
1729
|
style: y(a.value)
|
|
1747
1730
|
}, [(m(!0), N(L, null, v(e.block.items, (t, n) => (m(), N(L, { key: t.id }, [P("a", {
|
|
@@ -1753,22 +1736,22 @@ var ma = B({
|
|
|
1753
1736
|
textDecoration: t.underline ? "underline" : "none"
|
|
1754
1737
|
}),
|
|
1755
1738
|
onClick: r[0] ||= i(() => {}, ["prevent"])
|
|
1756
|
-
}, [E(
|
|
1739
|
+
}, [E(la, { text: t.text || "..." }, null, 8, ["text"])], 12, Ga), n < e.block.items.length - 1 ? (m(), N("span", {
|
|
1757
1740
|
key: 0,
|
|
1758
1741
|
style: y({
|
|
1759
1742
|
color: e.block.separatorColor,
|
|
1760
1743
|
padding: `0 ${e.block.spacing}px`
|
|
1761
1744
|
})
|
|
1762
|
-
}, d(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (m(), N("div",
|
|
1745
|
+
}, d(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (m(), N("div", Ka, [E(A(Jn), { size: 16 }), P("span", null, d(A(n).menu.addLinks), 1)]))]));
|
|
1763
1746
|
}
|
|
1764
1747
|
});
|
|
1765
1748
|
// src/composables/useEditableTextBlock.ts
|
|
1766
|
-
function
|
|
1767
|
-
let t = z(
|
|
1749
|
+
function Ja(e) {
|
|
1750
|
+
let t = z(xe, le), r = z(Le, null), i = z(ce, null), a = z(_e, null), { syntax: o } = dt(), s = k(() => r?.value ? Xt(e(), t.value) : Ut(e(), t.value)), l = k(() => i?.value ? rn(e(), t.value, o) : Wt(s.value, o)), u = k(() => pn(gr(l.value))), d = M(!1);
|
|
1768
1751
|
c(() => a?.value, (e) => {
|
|
1769
1752
|
e && (d.value = !1);
|
|
1770
1753
|
});
|
|
1771
|
-
let f = M(null), { top: p, left: m } = n(f), { toLocal: h } =
|
|
1754
|
+
let f = M(null), { top: p, left: m } = n(f), { toLocal: h } = lr(), g = k(() => h({
|
|
1772
1755
|
top: p.value - 8,
|
|
1773
1756
|
left: m.value
|
|
1774
1757
|
}));
|
|
@@ -1788,14 +1771,14 @@ function $a(e) {
|
|
|
1788
1771
|
};
|
|
1789
1772
|
}
|
|
1790
1773
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1791
|
-
var
|
|
1774
|
+
var Ya = ["innerHTML"], Xa = /* @__PURE__ */ B({
|
|
1792
1775
|
__name: "ParagraphBlock",
|
|
1793
1776
|
props: {
|
|
1794
1777
|
block: {},
|
|
1795
1778
|
viewport: {}
|
|
1796
1779
|
},
|
|
1797
1780
|
setup(e) {
|
|
1798
|
-
let t = e, n = oe(() => import("./ParagraphEditor-
|
|
1781
|
+
let t = e, n = oe(() => import("./ParagraphEditor-C15Glzy_.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ja(() => t.block.content);
|
|
1799
1782
|
return (t, l) => (m(), N("div", {
|
|
1800
1783
|
ref_key: "blockRef",
|
|
1801
1784
|
ref: i,
|
|
@@ -1814,11 +1797,11 @@ var eo = ["innerHTML"], to = /* @__PURE__ */ B({
|
|
|
1814
1797
|
key: 1,
|
|
1815
1798
|
class: "tpl-text-content tpl:outline-none",
|
|
1816
1799
|
innerHTML: A(o)
|
|
1817
|
-
}, null, 8,
|
|
1800
|
+
}, null, 8, Ya))], 544));
|
|
1818
1801
|
}
|
|
1819
1802
|
});
|
|
1820
1803
|
// src/utils/updateBlockList.ts
|
|
1821
|
-
function
|
|
1804
|
+
function Za(e, t, n, r = 0, i) {
|
|
1822
1805
|
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);
|
|
1823
1806
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1824
1807
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1831,19 +1814,19 @@ function no(e, t, n, r = 0, i) {
|
|
|
1831
1814
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1832
1815
|
}
|
|
1833
1816
|
// src/utils/mergeTagTokens.ts
|
|
1834
|
-
function
|
|
1817
|
+
function Qa(e, t, n) {
|
|
1835
1818
|
let r = [], i = "\0MT";
|
|
1836
1819
|
for (; e.includes(i);) i += "_";
|
|
1837
|
-
let a = n === "html" ?
|
|
1820
|
+
let a = n === "html" ? Vt(e, (e) => {
|
|
1838
1821
|
let t = r.push(e) - 1;
|
|
1839
1822
|
return `${i}${t}\u0000`;
|
|
1840
1823
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1841
1824
|
start: e.index,
|
|
1842
1825
|
end: e.index + e[0].length
|
|
1843
|
-
})), s = [], c =
|
|
1826
|
+
})), s = [], c = gn(a, t, "logic"), l = [], u = 0;
|
|
1844
1827
|
for (let e of ["logic", "value"]) {
|
|
1845
1828
|
let r = 0;
|
|
1846
|
-
for (let i of e === "logic" ? c :
|
|
1829
|
+
for (let i of e === "logic" ? c : gn(a, t, "value")) {
|
|
1847
1830
|
let t = i.index, a = t + i.value.length;
|
|
1848
1831
|
for (; o[r]?.end <= t;) r++;
|
|
1849
1832
|
let c = o[r];
|
|
@@ -1859,51 +1842,51 @@ function ro(e, t, n) {
|
|
|
1859
1842
|
}), s.push({
|
|
1860
1843
|
start: t,
|
|
1861
1844
|
end: a,
|
|
1862
|
-
value: n === "html" ?
|
|
1845
|
+
value: n === "html" ? _n(i.value) : i.value
|
|
1863
1846
|
});
|
|
1864
1847
|
}
|
|
1865
1848
|
}
|
|
1866
1849
|
}
|
|
1867
1850
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1868
1851
|
}
|
|
1869
|
-
function
|
|
1870
|
-
return JSON.stringify(
|
|
1852
|
+
function $a(e, t, n, r) {
|
|
1853
|
+
return JSON.stringify(Qa(e, n, r)) !== JSON.stringify(Qa(t, n, r));
|
|
1871
1854
|
}
|
|
1872
1855
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1873
|
-
var
|
|
1856
|
+
var eo = [
|
|
1874
1857
|
"data-state",
|
|
1875
1858
|
"aria-label",
|
|
1876
1859
|
"title",
|
|
1877
1860
|
"aria-expanded",
|
|
1878
1861
|
"aria-controls",
|
|
1879
1862
|
"onKeydown"
|
|
1880
|
-
],
|
|
1863
|
+
], to = [
|
|
1881
1864
|
"aria-label",
|
|
1882
1865
|
"aria-labelledby",
|
|
1883
1866
|
"aria-describedby",
|
|
1884
1867
|
"onKeydown"
|
|
1885
|
-
],
|
|
1868
|
+
], no = ["id"], ro = ["id"], io = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, ao = ["disabled"], oo = {
|
|
1886
1869
|
key: 0,
|
|
1887
1870
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1888
|
-
},
|
|
1871
|
+
}, so = {
|
|
1889
1872
|
key: 1,
|
|
1890
1873
|
class: "tpl:m-0"
|
|
1891
|
-
},
|
|
1874
|
+
}, co = { class: "tpl:m-0" }, lo = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, uo = {
|
|
1892
1875
|
key: 3,
|
|
1893
1876
|
class: "tpl:m-0"
|
|
1894
|
-
},
|
|
1877
|
+
}, fo = {
|
|
1895
1878
|
key: 4,
|
|
1896
1879
|
class: "tpl:m-0"
|
|
1897
|
-
},
|
|
1880
|
+
}, po = {
|
|
1898
1881
|
key: 5,
|
|
1899
1882
|
class: "tpl:m-0"
|
|
1900
|
-
},
|
|
1883
|
+
}, mo = {
|
|
1901
1884
|
key: 6,
|
|
1902
1885
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1903
|
-
},
|
|
1886
|
+
}, ho = ["onClick"], go = {
|
|
1904
1887
|
key: 7,
|
|
1905
1888
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1906
|
-
},
|
|
1889
|
+
}, _o = ["data-testid", "disabled"], vo = /*#__PURE__*/ Or(/* @__PURE__ */ B({
|
|
1907
1890
|
__name: "LocaleStatusChip",
|
|
1908
1891
|
props: {
|
|
1909
1892
|
blockId: {},
|
|
@@ -1923,13 +1906,13 @@ var ao = [
|
|
|
1923
1906
|
},
|
|
1924
1907
|
emits: ["target"],
|
|
1925
1908
|
setup(e, { emit: t }) {
|
|
1926
|
-
let n = e, r = t, a = z(
|
|
1909
|
+
let n = e, r = t, a = z(Me, null), s = Cr(a), l = z(Pe, null), u = z(fe, null), f = z(Ze, "en") ?? "en", { t: g, format: b } = rt(), x = se(), S = sr(), { toLocal: C } = lr(), w = M(null), T = M(null), E = M(!1), D = M(!1), O = M(null), te = M(null), re = null, ie = M({
|
|
1927
1910
|
top: 0,
|
|
1928
1911
|
left: 0
|
|
1929
1912
|
}), F = M({
|
|
1930
1913
|
maxHeight: 0,
|
|
1931
1914
|
maxWidth: 0
|
|
1932
|
-
}), I = `tpl-locale-popover-${
|
|
1915
|
+
}), I = `tpl-locale-popover-${nn()}`, ae = k(() => s(a?.activeLocale?.value ?? "")), oe = k(() => s(a?.content.value.settings.locale ?? "en"));
|
|
1933
1916
|
function B(e, t) {
|
|
1934
1917
|
switch (e) {
|
|
1935
1918
|
case "tags-differ": return g.localization.tagsDiffer;
|
|
@@ -1940,7 +1923,7 @@ var ao = [
|
|
|
1940
1923
|
default: return t === 1 ? g.localization.outOfDate : wr(g.localization.staleCount, t, f);
|
|
1941
1924
|
}
|
|
1942
1925
|
}
|
|
1943
|
-
let
|
|
1926
|
+
let ce = k(() => B(n.state, n.count)), V = k(() => n.popoverState ?? n.state), le = k(() => n.popoverCount ?? n.count), ue = k(() => B(V.value, le.value)), de = k(() => n.state === "hidden" ? Fr : n.state === "changed" ? Sr : n.state === "default-stale" ? mr : n.state === "stale" ? xr : yr), pe = k(() => V.value === "default-stale" || (V.value === "missing" || V.value === "stale") && le.value > 1), me = k(() => n.editable && n.eligibleGaps && l?.isAvailable.value);
|
|
1944
1927
|
function he(e = !1) {
|
|
1945
1928
|
E.value = !1, D.value = !1, re = null, e && w.value?.focus({ preventScroll: !0 });
|
|
1946
1929
|
}
|
|
@@ -2037,19 +2020,19 @@ var ao = [
|
|
|
2037
2020
|
type: "button",
|
|
2038
2021
|
"data-testid": "locale-chip",
|
|
2039
2022
|
"data-state": e.state,
|
|
2040
|
-
"aria-label":
|
|
2041
|
-
title:
|
|
2023
|
+
"aria-label": ce.value,
|
|
2024
|
+
title: ce.value,
|
|
2042
2025
|
"aria-expanded": E.value,
|
|
2043
2026
|
"aria-controls": E.value ? I : void 0,
|
|
2044
2027
|
"aria-haspopup": "dialog",
|
|
2045
2028
|
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)]",
|
|
2046
2029
|
onClick: i(ge, ["stop"]),
|
|
2047
2030
|
onKeydown: [o(i(ge, ["stop", "prevent"]), ["enter"]), o(i(Oe, ["stop", "prevent"]), ["esc"])]
|
|
2048
|
-
}, [(m(), R(p(
|
|
2031
|
+
}, [(m(), R(p(de.value), {
|
|
2049
2032
|
size: 12,
|
|
2050
2033
|
"stroke-width": 2,
|
|
2051
2034
|
"aria-hidden": "true"
|
|
2052
|
-
}))], 40,
|
|
2035
|
+
}))], 40, eo), A(S) && E.value ? (m(), R(ee, {
|
|
2053
2036
|
key: 0,
|
|
2054
2037
|
to: A(S)
|
|
2055
2038
|
}, [P("div", {
|
|
@@ -2057,7 +2040,7 @@ var ao = [
|
|
|
2057
2040
|
ref_key: "popover",
|
|
2058
2041
|
ref: T,
|
|
2059
2042
|
role: "dialog",
|
|
2060
|
-
"aria-label": D.value ? void 0 :
|
|
2043
|
+
"aria-label": D.value ? void 0 : ue.value,
|
|
2061
2044
|
"aria-labelledby": D.value ? `${I}-question` : void 0,
|
|
2062
2045
|
"aria-describedby": D.value ? `${I}-warning` : void 0,
|
|
2063
2046
|
tabindex: "-1",
|
|
@@ -2075,12 +2058,12 @@ var ao = [
|
|
|
2075
2058
|
P("h3", {
|
|
2076
2059
|
id: `${I}-question`,
|
|
2077
2060
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
2078
|
-
}, d(A(wr)(A(g).localization.translationConfirmation, e.translationCount ?? 0, A(f))), 9,
|
|
2061
|
+
}, d(A(wr)(A(g).localization.translationConfirmation, e.translationCount ?? 0, A(f))), 9, no),
|
|
2079
2062
|
P("p", {
|
|
2080
2063
|
id: `${I}-warning`,
|
|
2081
2064
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
2082
|
-
}, d(A(b)(A(g).localization.translationDescription, { language: ae.value })), 9,
|
|
2083
|
-
P("div",
|
|
2065
|
+
}, d(A(b)(A(g).localization.translationDescription, { language: ae.value })), 9, ro),
|
|
2066
|
+
P("div", io, [P("button", {
|
|
2084
2067
|
ref_key: "confirmationCancel",
|
|
2085
2068
|
ref: te,
|
|
2086
2069
|
type: "button",
|
|
@@ -2093,18 +2076,18 @@ var ao = [
|
|
|
2093
2076
|
class: h(A(Dr)),
|
|
2094
2077
|
disabled: !me.value || !!A(l)?.running.value || !e.translationCount,
|
|
2095
2078
|
onClick: ke
|
|
2096
|
-
}, d(A(wr)(A(g).localization.translateAllFields, e.translationCount ?? 0, A(f))), 11,
|
|
2079
|
+
}, d(A(wr)(A(g).localization.translateAllFields, e.translationCount ?? 0, A(f))), 11, ao)])
|
|
2097
2080
|
], 64)) : (m(), N(L, { key: 1 }, [
|
|
2098
|
-
pe.value ? (m(), N("p",
|
|
2099
|
-
V.value === "missing" ? (m(), N("p",
|
|
2081
|
+
pe.value ? (m(), N("p", oo, d(ue.value), 1)) : j("", !0),
|
|
2082
|
+
V.value === "missing" ? (m(), N("p", so, d(A(b)(A(g).localization.missingExplanation, { default: oe.value })), 1)) : V.value === "stale" ? (m(), N(L, { key: 2 }, [P("p", co, d(A(b)(A(g).localization.staleExplanation, { default: oe.value })), 1), P("p", lo, d(A(b)(A(g).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : V.value === "tags-differ" ? (m(), N("p", uo, d(A(b)(A(g).localization.tagsDifferExplanation, { default: oe.value })), 1)) : V.value === "changed" ? (m(), N("p", fo, d(A(wr)(A(g).localization.changedProperties, le.value, A(f), { default: oe.value })), 1)) : V.value === "hidden" ? (m(), N("p", po, d(A(b)(A(g).localization.hiddenExplanation, { language: ae.value })), 1)) : (m(), N("ul", mo, [(m(!0), N(L, null, v(e.staleLocales, (e) => (m(), N("li", {
|
|
2100
2083
|
key: e,
|
|
2101
2084
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
2102
2085
|
}, [P("span", null, d(A(s)(e)), 1), P("button", {
|
|
2103
2086
|
type: "button",
|
|
2104
2087
|
class: h(A(Tr)),
|
|
2105
2088
|
onClick: (t) => Te(e)
|
|
2106
|
-
}, d(A(g).localization.open), 11,
|
|
2107
|
-
e.editable && V.value !== "default-stale" ? (m(), N("div",
|
|
2089
|
+
}, d(A(g).localization.open), 11, ho)]))), 128))])),
|
|
2090
|
+
e.editable && V.value !== "default-stale" ? (m(), N("div", go, [
|
|
2108
2091
|
me.value && (V.value === "missing" || V.value === "stale" || V.value === "tags-differ") ? (m(), N("button", {
|
|
2109
2092
|
key: 0,
|
|
2110
2093
|
type: "button",
|
|
@@ -2114,7 +2097,7 @@ var ao = [
|
|
|
2114
2097
|
class: h(A(Er)),
|
|
2115
2098
|
disabled: !!A(l)?.running.value,
|
|
2116
2099
|
onClick: Ee
|
|
2117
|
-
}, d(V.value === "missing" ? A(g).localization.translate : A(g).localization.retranslate), 11,
|
|
2100
|
+
}, d(V.value === "missing" ? A(g).localization.translate : A(g).localization.retranslate), 11, _o)) : j("", !0),
|
|
2118
2101
|
V.value === "stale" || V.value === "tags-differ" ? (m(), N(L, { key: 1 }, [V.value === "stale" ? (m(), N("button", {
|
|
2119
2102
|
key: 0,
|
|
2120
2103
|
type: "button",
|
|
@@ -2142,13 +2125,13 @@ var ao = [
|
|
|
2142
2125
|
onClick: we
|
|
2143
2126
|
}, d(A(g).localization.show), 3)) : j("", !0)
|
|
2144
2127
|
])) : j("", !0)
|
|
2145
|
-
], 64))], 44,
|
|
2128
|
+
], 64))], 44, to)], 8, ["to"])) : j("", !0)], 64));
|
|
2146
2129
|
}
|
|
2147
|
-
}), [["__scopeId", "data-v-1ea4fa72"]]),
|
|
2130
|
+
}), [["__scopeId", "data-v-1ea4fa72"]]), yo = /* @__PURE__ */ B({
|
|
2148
2131
|
__name: "LocaleMarkers",
|
|
2149
2132
|
props: { block: {} },
|
|
2150
2133
|
setup(e) {
|
|
2151
|
-
let t = e, n = z(
|
|
2134
|
+
let t = e, n = z(Me, null), r = z(de, void 0), i = z(Je, []), a = z(ut, Dn.liquid), o = z(Ne, k(() => /* @__PURE__ */ new Set())), s = k(() => n?.activeLocale?.value), l = k(() => s.value ? t.block.l10n?.[s.value] : void 0), u = k(() => ({
|
|
2152
2135
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2153
2136
|
...t.block,
|
|
2154
2137
|
children: []
|
|
@@ -2157,14 +2140,14 @@ var ao = [
|
|
|
2157
2140
|
locale: n.content.value.settings.locale,
|
|
2158
2141
|
locales: n.content.value.settings.locales
|
|
2159
2142
|
}
|
|
2160
|
-
})), d = k(() => n && s.value && !o.value.has(s.value) ?
|
|
2143
|
+
})), d = k(() => n && s.value && !o.value.has(s.value) ? xt(u.value, s.value, i) : {
|
|
2161
2144
|
missing: [],
|
|
2162
2145
|
stale: [],
|
|
2163
2146
|
translated: []
|
|
2164
2147
|
}), f = k(() => d.value.stale.map((e) => e.slice(t.block.id.length + 1))), p = k(() => d.value.translated.flatMap((e) => {
|
|
2165
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2166
|
-
return typeof r == "string" && i !== void 0 &&
|
|
2167
|
-
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ?
|
|
2148
|
+
let n = e.slice(t.block.id.length + 1), r = zt(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || An[t.block.type]?.includes(n) ? "html" : "text";
|
|
2149
|
+
return typeof r == "string" && i !== void 0 && $a(r, i, a, o) ? [n] : [];
|
|
2150
|
+
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ? At(u.value, s.value, {
|
|
2168
2151
|
syntax: a,
|
|
2169
2152
|
definitions: i,
|
|
2170
2153
|
doNotTranslate: r?.doNotTranslate,
|
|
@@ -2174,9 +2157,9 @@ var ao = [
|
|
|
2174
2157
|
let n = e.slice(t.block.id.length + 1);
|
|
2175
2158
|
return d.value.translated.includes(e) && !p.value.includes(n);
|
|
2176
2159
|
})), v = k(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2177
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2178
|
-
return Array.isArray(i) ?
|
|
2179
|
-
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) &&
|
|
2160
|
+
let n = e.split("."), r = n.pop(), i = n.length ? zt(t.block, n.join(".")) : t.block;
|
|
2161
|
+
return Array.isArray(i) ? zt(i, r) !== void 0 : i !== void 0;
|
|
2162
|
+
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && xt(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);
|
|
2180
2163
|
function x(e) {
|
|
2181
2164
|
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;
|
|
2182
2165
|
}
|
|
@@ -2185,12 +2168,12 @@ var ao = [
|
|
|
2185
2168
|
h.value = null;
|
|
2186
2169
|
});
|
|
2187
2170
|
let T = k(() => {
|
|
2188
|
-
let e =
|
|
2171
|
+
let e = zt(t.block, f.value[0] ?? "");
|
|
2189
2172
|
if (typeof e != "string") return "";
|
|
2190
2173
|
let n = e.split(/<[^>]*>/).join("");
|
|
2191
2174
|
return Array.from(n).slice(0, 60).join("");
|
|
2192
2175
|
});
|
|
2193
|
-
return (t, n) => A(r) && b.value ? (m(), R(
|
|
2176
|
+
return (t, n) => A(r) && b.value ? (m(), R(vo, {
|
|
2194
2177
|
key: 0,
|
|
2195
2178
|
"block-id": e.block.id,
|
|
2196
2179
|
state: b.value,
|
|
@@ -2224,21 +2207,21 @@ var ao = [
|
|
|
2224
2207
|
"editable"
|
|
2225
2208
|
])) : j("", !0);
|
|
2226
2209
|
}
|
|
2227
|
-
}),
|
|
2210
|
+
}), bo = [
|
|
2228
2211
|
"data-block-id",
|
|
2229
2212
|
"data-block-type",
|
|
2230
2213
|
"data-tpl-picked"
|
|
2231
|
-
],
|
|
2214
|
+
], xo = ["aria-label"], So = ["data-lock-holder"], Co = ["aria-label"], wo = [
|
|
2232
2215
|
"aria-label",
|
|
2233
2216
|
"aria-pressed",
|
|
2234
2217
|
"title"
|
|
2235
|
-
],
|
|
2218
|
+
], To = ["aria-label", "title"], Eo = ["aria-label", "title"], Do = ["aria-label", "title"], Oo = {
|
|
2236
2219
|
key: 3,
|
|
2237
2220
|
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"
|
|
2238
|
-
},
|
|
2221
|
+
}, ko = { 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)]" }, Ao = {
|
|
2239
2222
|
key: 4,
|
|
2240
2223
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2241
|
-
},
|
|
2224
|
+
}, jo = ["aria-label", "title"], Mo = /*#__PURE__*/ Or(/* @__PURE__ */ B({
|
|
2242
2225
|
__name: "BlockWrapper",
|
|
2243
2226
|
props: {
|
|
2244
2227
|
block: {},
|
|
@@ -2251,7 +2234,7 @@ var ao = [
|
|
|
2251
2234
|
},
|
|
2252
2235
|
emits: ["select"],
|
|
2253
2236
|
setup(t, { emit: n }) {
|
|
2254
|
-
let a = oe(() => import("./BlockIssueBadge-
|
|
2237
|
+
let a = oe(() => import("./BlockIssueBadge-D3OmWkCh.js")), o = t, s = k(() => o.displayBlock ?? o.block), l = n, { t: p, format: g } = rt(), v = z(ue, 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);
|
|
2255
2238
|
async function C() {
|
|
2256
2239
|
await _(), b.value?.focus();
|
|
2257
2240
|
}
|
|
@@ -2261,12 +2244,12 @@ var ao = [
|
|
|
2261
2244
|
let T = k(() => !o.viewport || !s.value.visibility ? !1 : s.value.visibility[o.viewport] === !1), ee = k(() => !!(xe?.activeLocale?.value && o.block.l10n?.[xe.activeLocale.value]?.hidden)), D = k(() => o.previewMode === !0 && (T.value || ee.value)), O = k(() => o.viewport ? {
|
|
2262
2245
|
desktop: p.viewport.desktop,
|
|
2263
2246
|
mobile: p.viewport.mobile
|
|
2264
|
-
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re = z(
|
|
2247
|
+
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re = z(tt, null), ie = z(Qe, null), F = z(Re, {}), 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), B = k(() => F.comments?.getBlockCount(o.block.id) ?? 0), se = M(null), ce = M(null), V = M(null), le = M(null), de = M({
|
|
2265
2248
|
left: "calc(100% + 8px)",
|
|
2266
2249
|
top: "50%"
|
|
2267
|
-
}), fe = M(!1), pe = k(() =>
|
|
2250
|
+
}), fe = M(!1), pe = k(() => ce.value ?? le.value), me = k(() => pe.value?.closest(".tpl-body"));
|
|
2268
2251
|
function he() {
|
|
2269
|
-
let e = fe.value, t =
|
|
2252
|
+
let e = fe.value, t = ce.value, n = le.value, r = se.value;
|
|
2270
2253
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2271
2254
|
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = me.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2272
2255
|
if (n?.offsetWidth) {
|
|
@@ -2296,33 +2279,33 @@ var ao = [
|
|
|
2296
2279
|
}
|
|
2297
2280
|
f(he), r(k(() => pe.value ? [
|
|
2298
2281
|
se.value,
|
|
2299
|
-
|
|
2282
|
+
ce.value,
|
|
2300
2283
|
V.value,
|
|
2301
|
-
|
|
2284
|
+
le.value,
|
|
2302
2285
|
me.value
|
|
2303
2286
|
].filter((e) => !!e) : []), he), e(me, "scroll", he, { passive: !0 });
|
|
2304
|
-
let ge = k(() => F.collaboration?.lockOf(o.block.id) ?? null), _e = k(() => ge.value?.holder.type === "guest" ? p.collaboration.guest : ge.value?.holder.name ?? ""), ve = k(() => F.collaboration?.agentHighlightOf(o.block.id) ?? F.ai?.highlightOf(o.block.id) ?? null), ye =
|
|
2305
|
-
c([() => xe?.activeLocale?.value, () =>
|
|
2306
|
-
let
|
|
2287
|
+
let ge = k(() => F.collaboration?.lockOf(o.block.id) ?? null), _e = k(() => ge.value?.holder.type === "guest" ? p.collaboration.guest : ge.value?.holder.name ?? ""), ve = k(() => F.collaboration?.agentHighlightOf(o.block.id) ?? F.ai?.highlightOf(o.block.id) ?? null), ye = er(() => s.value.type === "section" ? s.value.backgroundImage : void 0), be = er(() => s.value.type === "section" ? s.value.wrapper?.backgroundImage : void 0), xe = z(Me, null), Ce = xe ? ur(xe) : null, we = z(Se, null) ?? Ce?.content ?? null;
|
|
2288
|
+
c([() => xe?.activeLocale?.value, () => Ce && Ot(Ce.settings.value)], he, { flush: "post" });
|
|
2289
|
+
let Te = z(st, void 0), Ee = k(() => ea(s.value, {
|
|
2307
2290
|
backgroundImageUrl: ye.value,
|
|
2308
|
-
heroBoxWidth:
|
|
2309
|
-
})), De = k(() =>
|
|
2291
|
+
heroBoxWidth: Gn(s.value) ? Xn(s.value, we?.value, Te) : void 0
|
|
2292
|
+
})), De = k(() => oa(s.value, { backgroundImageUrl: be.value })), Oe = k(() => {
|
|
2310
2293
|
let e = s.value;
|
|
2311
2294
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2312
|
-
}), ke = k(() =>
|
|
2295
|
+
}), ke = k(() => aa(Oe.value?.wrapper?.padding));
|
|
2313
2296
|
function Ae(e) {
|
|
2314
2297
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), l("select"));
|
|
2315
2298
|
}
|
|
2316
2299
|
function je() {
|
|
2317
2300
|
re?.deleteBlock(o.block.id);
|
|
2318
2301
|
}
|
|
2319
|
-
function
|
|
2302
|
+
function Ne() {
|
|
2320
2303
|
re?.duplicateBlock(o.block);
|
|
2321
2304
|
}
|
|
2322
|
-
function
|
|
2305
|
+
function Pe() {
|
|
2323
2306
|
F.savedBlocks?.startPicking(o.block.id);
|
|
2324
2307
|
}
|
|
2325
|
-
function
|
|
2308
|
+
function Fe() {
|
|
2326
2309
|
ie?.toggleBlock(o.block.id);
|
|
2327
2310
|
}
|
|
2328
2311
|
return (e, n) => D.value ? j("", !0) : (m(), N("div", {
|
|
@@ -2349,16 +2332,16 @@ var ao = [
|
|
|
2349
2332
|
B.value > 0 && !T.value ? (m(), N("button", {
|
|
2350
2333
|
key: 0,
|
|
2351
2334
|
ref_key: "commentElement",
|
|
2352
|
-
ref:
|
|
2335
|
+
ref: le,
|
|
2353
2336
|
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)]", fe.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2354
2337
|
"aria-label": A(g)(A(p).blockActions.comments, { count: String(B.value) }),
|
|
2355
2338
|
onClick: n[0] ||= i((e) => A(F).comments?.openForBlock(t.block.id), ["stop"])
|
|
2356
2339
|
}, [E(A(Ar), {
|
|
2357
2340
|
size: 12,
|
|
2358
2341
|
"stroke-width": 2.5
|
|
2359
|
-
}), te(" " + d(B.value), 1)], 10,
|
|
2342
|
+
}), te(" " + d(B.value), 1)], 10, xo)) : j("", !0),
|
|
2360
2343
|
E(A(a), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2361
|
-
t.previewMode ? j("", !0) : (m(), R(
|
|
2344
|
+
t.previewMode ? j("", !0) : (m(), R(yo, {
|
|
2362
2345
|
key: 1,
|
|
2363
2346
|
block: t.block
|
|
2364
2347
|
}, null, 8, ["block"]))
|
|
@@ -2378,7 +2361,7 @@ var ao = [
|
|
|
2378
2361
|
backgroundColor: ge.value.holder.color,
|
|
2379
2362
|
color: A(Mr)(ge.value.holder.color)
|
|
2380
2363
|
})
|
|
2381
|
-
}, d(A(g)(A(p).collaboration.editing, { name: _e.value })), 5)], 12,
|
|
2364
|
+
}, d(A(g)(A(p).collaboration.editing, { name: _e.value })), 5)], 12, So)) : j("", !0),
|
|
2382
2365
|
ve.value === null ? j("", !0) : (m(), N("div", {
|
|
2383
2366
|
key: ve.value,
|
|
2384
2367
|
"data-testid": "block-agent-highlight",
|
|
@@ -2388,7 +2371,7 @@ var ao = [
|
|
|
2388
2371
|
ae.value ? (m(), N("div", {
|
|
2389
2372
|
key: 2,
|
|
2390
2373
|
ref_key: "actionsElement",
|
|
2391
|
-
ref:
|
|
2374
|
+
ref: ce,
|
|
2392
2375
|
style: y(de.value),
|
|
2393
2376
|
role: "toolbar",
|
|
2394
2377
|
"aria-label": A(p).blockActions.drag,
|
|
@@ -2406,26 +2389,26 @@ var ao = [
|
|
|
2406
2389
|
}, [E(A(Lr), {
|
|
2407
2390
|
size: 14,
|
|
2408
2391
|
"stroke-width": 1.5
|
|
2409
|
-
})], 40,
|
|
2392
|
+
})], 40, wo),
|
|
2410
2393
|
P("button", {
|
|
2411
2394
|
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",
|
|
2412
2395
|
"aria-label": A(p).blockActions.duplicate,
|
|
2413
2396
|
title: A(p).blockActions.duplicate,
|
|
2414
|
-
onClick: i(
|
|
2397
|
+
onClick: i(Ne, ["stop"])
|
|
2415
2398
|
}, [E(A(kr), {
|
|
2416
2399
|
size: 14,
|
|
2417
2400
|
"stroke-width": 1.5
|
|
2418
|
-
})], 8,
|
|
2401
|
+
})], 8, To),
|
|
2419
2402
|
L.value ? (m(), N("button", {
|
|
2420
2403
|
key: 0,
|
|
2421
2404
|
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",
|
|
2422
2405
|
"aria-label": A(p).blockActions.saveAsBlock,
|
|
2423
2406
|
title: A(p).blockActions.saveAsBlock,
|
|
2424
|
-
onClick: i(
|
|
2407
|
+
onClick: i(Pe, ["stop"])
|
|
2425
2408
|
}, [E(A(Nr), {
|
|
2426
2409
|
size: 14,
|
|
2427
2410
|
"stroke-width": 1.5
|
|
2428
|
-
})], 8,
|
|
2411
|
+
})], 8, Eo)) : j("", !0),
|
|
2429
2412
|
P("button", {
|
|
2430
2413
|
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",
|
|
2431
2414
|
"aria-label": A(p).blockActions.delete,
|
|
@@ -2434,50 +2417,50 @@ var ao = [
|
|
|
2434
2417
|
}, [E(A(jr), {
|
|
2435
2418
|
size: 14,
|
|
2436
2419
|
"stroke-width": 1.5
|
|
2437
|
-
})], 8,
|
|
2438
|
-
], 12,
|
|
2439
|
-
T.value ? (m(), N("div",
|
|
2420
|
+
})], 8, Do)
|
|
2421
|
+
], 12, Co)) : j("", !0),
|
|
2422
|
+
T.value ? (m(), N("div", Oo, [P("span", ko, [E(A(Fr), {
|
|
2440
2423
|
size: 12,
|
|
2441
2424
|
"stroke-width": 1.5
|
|
2442
2425
|
}), te(" " + d(A(g)(A(p).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : j("", !0),
|
|
2443
|
-
ne.value && !T.value ? (m(), N("div",
|
|
2426
|
+
ne.value && !T.value ? (m(), N("div", Ao, [P("button", {
|
|
2444
2427
|
"data-testid": "condition-toggle",
|
|
2445
2428
|
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)]",
|
|
2446
2429
|
"aria-label": A(p).blockActions.conditionToggle,
|
|
2447
2430
|
title: t.block.displayCondition?.label,
|
|
2448
|
-
onClick: i(
|
|
2431
|
+
onClick: i(Fe, ["stop"])
|
|
2449
2432
|
}, [E(A(Ir), {
|
|
2450
2433
|
size: 12,
|
|
2451
2434
|
"stroke-width": 2
|
|
2452
|
-
})], 8,
|
|
2435
|
+
})], 8, jo)])) : j("", !0),
|
|
2453
2436
|
De.value ? (m(), N("div", {
|
|
2454
2437
|
key: 5,
|
|
2455
|
-
class: h(["tpl-section-wrapper tpl-email-surface", A(
|
|
2438
|
+
class: h(["tpl-section-wrapper tpl-email-surface", A(Xi)(De.value)]),
|
|
2456
2439
|
style: y(De.value)
|
|
2457
2440
|
}, [Oe.value ? (m(), N("div", {
|
|
2458
2441
|
key: 0,
|
|
2459
2442
|
class: "tpl-band-frame",
|
|
2460
2443
|
style: y(ke.value)
|
|
2461
2444
|
}, [P("div", {
|
|
2462
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2445
|
+
class: h(["tpl-block-content tpl-email-surface", A(Xi)(Ee.value)]),
|
|
2463
2446
|
style: y(Ee.value)
|
|
2464
2447
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (m(), N("div", {
|
|
2465
2448
|
key: 1,
|
|
2466
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2449
|
+
class: h(["tpl-block-content tpl-email-surface", A(Xi)(Ee.value)]),
|
|
2467
2450
|
style: y(Ee.value)
|
|
2468
2451
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (m(), N("div", {
|
|
2469
2452
|
key: 6,
|
|
2470
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2453
|
+
class: h(["tpl-block-content tpl-email-surface", A(Xi)(Ee.value)]),
|
|
2471
2454
|
style: y(Ee.value)
|
|
2472
2455
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2473
|
-
], 10,
|
|
2456
|
+
], 10, bo));
|
|
2474
2457
|
}
|
|
2475
2458
|
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2476
2459
|
// src/utils/unwrapParagraph.ts
|
|
2477
|
-
function
|
|
2460
|
+
function No(e) {
|
|
2478
2461
|
let t = /^\s*<p\b/.exec(e);
|
|
2479
2462
|
if (!t) return e;
|
|
2480
|
-
let n =
|
|
2463
|
+
let n = En(e, t[0].length);
|
|
2481
2464
|
if (n === -1) return e;
|
|
2482
2465
|
let r = /<\/p>\s*$/.exec(e);
|
|
2483
2466
|
if (!r || r.index <= n) return e;
|
|
@@ -2485,22 +2468,22 @@ function Ro(e) {
|
|
|
2485
2468
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2486
2469
|
}
|
|
2487
2470
|
// src/components/blocks/TitleBlock.vue
|
|
2488
|
-
var
|
|
2471
|
+
var Po = /* @__PURE__ */ B({
|
|
2489
2472
|
__name: "TitleBlock",
|
|
2490
2473
|
props: {
|
|
2491
2474
|
block: {},
|
|
2492
2475
|
viewport: {}
|
|
2493
2476
|
},
|
|
2494
2477
|
setup(e) {
|
|
2495
|
-
let t = e, n = oe(() => import("./TitleEditor-
|
|
2478
|
+
let t = e, n = oe(() => import("./TitleEditor-BHZF5C6q.js")), r = qe(lt, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Ja(() => t.block.content), u = k(() => {
|
|
2496
2479
|
let e = {
|
|
2497
|
-
fontSize: `${
|
|
2498
|
-
lineHeight: String(
|
|
2480
|
+
fontSize: `${wn[t.block.level]}px`,
|
|
2481
|
+
lineHeight: String(Jt),
|
|
2499
2482
|
fontWeight: "700",
|
|
2500
2483
|
textAlign: t.block.textAlign
|
|
2501
2484
|
};
|
|
2502
2485
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2503
|
-
}), d = k(() => `h${t.block.level}`), f = k(() => gr(
|
|
2486
|
+
}), d = k(() => `h${t.block.level}`), f = k(() => gr(No(s.value)));
|
|
2504
2487
|
return (t, r) => (m(), N("div", {
|
|
2505
2488
|
ref_key: "blockRef",
|
|
2506
2489
|
ref: a,
|
|
@@ -2526,14 +2509,14 @@ var zo = /* @__PURE__ */ B({
|
|
|
2526
2509
|
innerHTML: f.value
|
|
2527
2510
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2528
2511
|
}
|
|
2529
|
-
}),
|
|
2530
|
-
function
|
|
2531
|
-
let n =
|
|
2532
|
-
n.color =
|
|
2533
|
-
let r =
|
|
2534
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2535
|
-
let i =
|
|
2536
|
-
return i.align = "center",
|
|
2512
|
+
}), Fo = "hero", Io = "#1f2937", Lo = "#ffffff";
|
|
2513
|
+
function Ro(e, t) {
|
|
2514
|
+
let n = Tt("title", e);
|
|
2515
|
+
n.color = Lo, n.textAlign = "center";
|
|
2516
|
+
let r = Tt("paragraph", e);
|
|
2517
|
+
r.content = `<p style="text-align: center"><span style="color: ${Lo}">${zo(t)}</span></p>`;
|
|
2518
|
+
let i = Tt("button", e);
|
|
2519
|
+
return i.align = "center", yn({
|
|
2537
2520
|
columns: "1",
|
|
2538
2521
|
children: [[
|
|
2539
2522
|
n,
|
|
@@ -2551,96 +2534,96 @@ function Uo(e, t) {
|
|
|
2551
2534
|
bottom: 48,
|
|
2552
2535
|
left: 24
|
|
2553
2536
|
},
|
|
2554
|
-
backgroundColor:
|
|
2537
|
+
backgroundColor: Io
|
|
2555
2538
|
}
|
|
2556
2539
|
});
|
|
2557
2540
|
}
|
|
2558
|
-
function
|
|
2541
|
+
function zo(e) {
|
|
2559
2542
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2560
2543
|
}
|
|
2561
2544
|
// src/utils/sectionColumnDrop.ts
|
|
2562
|
-
var
|
|
2563
|
-
function
|
|
2564
|
-
return e.dataset.blockType !== "section" && !
|
|
2545
|
+
var Bo = /* @__PURE__ */ new Set(["section", Fo]);
|
|
2546
|
+
function Vo(e) {
|
|
2547
|
+
return e.dataset.blockType !== "section" && !Bo.has(e.dataset.paletteType ?? "");
|
|
2565
2548
|
}
|
|
2566
2549
|
// ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2567
|
-
var
|
|
2550
|
+
var Ho = Object.defineProperty, Uo = Object.getOwnPropertySymbols, Wo = Object.prototype.hasOwnProperty, Go = Object.prototype.propertyIsEnumerable, Ko = (e, t, n) => t in e ? Ho(e, t, {
|
|
2568
2551
|
enumerable: !0,
|
|
2569
2552
|
configurable: !0,
|
|
2570
2553
|
writable: !0,
|
|
2571
2554
|
value: n
|
|
2572
|
-
}) : e[t] = n,
|
|
2573
|
-
for (var n in t ||= {})
|
|
2574
|
-
if (
|
|
2555
|
+
}) : e[t] = n, qo = (e, t) => {
|
|
2556
|
+
for (var n in t ||= {}) Wo.call(t, n) && Ko(e, n, t[n]);
|
|
2557
|
+
if (Uo) for (var n of Uo(t)) Go.call(t, n) && Ko(e, n, t[n]);
|
|
2575
2558
|
return e;
|
|
2576
|
-
},
|
|
2559
|
+
}, Jo = (e, t) => {
|
|
2577
2560
|
var n = {};
|
|
2578
|
-
for (var r in e)
|
|
2579
|
-
if (e != null &&
|
|
2561
|
+
for (var r in e) Wo.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2562
|
+
if (e != null && Uo) for (var r of Uo(e)) t.indexOf(r) < 0 && Go.call(e, r) && (n[r] = e[r]);
|
|
2580
2563
|
return n;
|
|
2581
|
-
},
|
|
2582
|
-
function
|
|
2583
|
-
console.warn(
|
|
2564
|
+
}, Yo = "[vue-draggable-plus]: ";
|
|
2565
|
+
function Xo(e) {
|
|
2566
|
+
console.warn(Yo + e);
|
|
2584
2567
|
}
|
|
2585
|
-
function
|
|
2586
|
-
console.error(
|
|
2568
|
+
function Zo(e) {
|
|
2569
|
+
console.error(Yo + e);
|
|
2587
2570
|
}
|
|
2588
|
-
function
|
|
2571
|
+
function Qo(e, t, n) {
|
|
2589
2572
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2590
2573
|
}
|
|
2591
|
-
function
|
|
2574
|
+
function $o(e) {
|
|
2592
2575
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2593
2576
|
}
|
|
2594
|
-
function
|
|
2595
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2577
|
+
function es(e) {
|
|
2578
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[$o(n)] = e[n]), t), {});
|
|
2596
2579
|
}
|
|
2597
|
-
function
|
|
2580
|
+
function ts(e, t) {
|
|
2598
2581
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2599
2582
|
}
|
|
2600
|
-
function
|
|
2583
|
+
function ns(e, t, n) {
|
|
2601
2584
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2602
2585
|
}
|
|
2603
|
-
function
|
|
2586
|
+
function rs(e) {
|
|
2604
2587
|
return e === void 0;
|
|
2605
2588
|
}
|
|
2606
|
-
function
|
|
2589
|
+
function is(e) {
|
|
2607
2590
|
return typeof e == "string";
|
|
2608
2591
|
}
|
|
2609
|
-
function
|
|
2592
|
+
function as(e, t, n) {
|
|
2610
2593
|
let r = e.children[n];
|
|
2611
2594
|
e.insertBefore(t, r);
|
|
2612
2595
|
}
|
|
2613
|
-
function
|
|
2596
|
+
function os(e) {
|
|
2614
2597
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2615
2598
|
}
|
|
2616
|
-
function
|
|
2599
|
+
function ss(e, t = document) {
|
|
2617
2600
|
let n = null;
|
|
2618
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2601
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Xo(`Element not found: ${e}`), n;
|
|
2619
2602
|
}
|
|
2620
|
-
function
|
|
2603
|
+
function cs(e, t, n = null) {
|
|
2621
2604
|
return function(...r) {
|
|
2622
2605
|
return e.apply(n, r), t.apply(n, r);
|
|
2623
2606
|
};
|
|
2624
2607
|
}
|
|
2625
|
-
function
|
|
2626
|
-
let n =
|
|
2608
|
+
function ls(e, t) {
|
|
2609
|
+
let n = qo({}, e);
|
|
2627
2610
|
return Object.keys(t).forEach((r) => {
|
|
2628
|
-
n[r] ? n[r] =
|
|
2611
|
+
n[r] ? n[r] = cs(e[r], t[r]) : n[r] = t[r];
|
|
2629
2612
|
}), n;
|
|
2630
2613
|
}
|
|
2631
|
-
function
|
|
2614
|
+
function us(e) {
|
|
2632
2615
|
return e instanceof HTMLElement;
|
|
2633
2616
|
}
|
|
2634
|
-
function
|
|
2617
|
+
function ds(e, t) {
|
|
2635
2618
|
Object.keys(e).forEach((n) => {
|
|
2636
2619
|
t(n, e[n]);
|
|
2637
2620
|
});
|
|
2638
2621
|
}
|
|
2639
|
-
function
|
|
2622
|
+
function fs(e) {
|
|
2640
2623
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2641
2624
|
}
|
|
2642
|
-
var
|
|
2643
|
-
function
|
|
2625
|
+
var ps = Object.assign;
|
|
2626
|
+
function ms(e, t) {
|
|
2644
2627
|
var n = Object.keys(e);
|
|
2645
2628
|
if (Object.getOwnPropertySymbols) {
|
|
2646
2629
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2650,26 +2633,26 @@ function ys(e, t) {
|
|
|
2650
2633
|
}
|
|
2651
2634
|
return n;
|
|
2652
2635
|
}
|
|
2653
|
-
function
|
|
2636
|
+
function hs(e) {
|
|
2654
2637
|
for (var t = 1; t < arguments.length; t++) {
|
|
2655
2638
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2656
|
-
t % 2 ?
|
|
2657
|
-
|
|
2658
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2639
|
+
t % 2 ? ms(Object(n), !0).forEach(function(t) {
|
|
2640
|
+
_s(e, t, n[t]);
|
|
2641
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ms(Object(n)).forEach(function(t) {
|
|
2659
2642
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2660
2643
|
});
|
|
2661
2644
|
}
|
|
2662
2645
|
return e;
|
|
2663
2646
|
}
|
|
2664
|
-
function
|
|
2647
|
+
function gs(e) {
|
|
2665
2648
|
"@babel/helpers - typeof";
|
|
2666
|
-
return
|
|
2649
|
+
return gs = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2667
2650
|
return typeof e;
|
|
2668
2651
|
} : function(e) {
|
|
2669
2652
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2670
|
-
},
|
|
2653
|
+
}, gs(e);
|
|
2671
2654
|
}
|
|
2672
|
-
function
|
|
2655
|
+
function _s(e, t, n) {
|
|
2673
2656
|
return t in e ? Object.defineProperty(e, t, {
|
|
2674
2657
|
value: n,
|
|
2675
2658
|
enumerable: !0,
|
|
@@ -2677,44 +2660,44 @@ function Ss(e, t, n) {
|
|
|
2677
2660
|
writable: !0
|
|
2678
2661
|
}) : e[t] = n, e;
|
|
2679
2662
|
}
|
|
2680
|
-
function
|
|
2681
|
-
return
|
|
2663
|
+
function vs() {
|
|
2664
|
+
return vs = Object.assign || function(e) {
|
|
2682
2665
|
for (var t = 1; t < arguments.length; t++) {
|
|
2683
2666
|
var n = arguments[t];
|
|
2684
2667
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2685
2668
|
}
|
|
2686
2669
|
return e;
|
|
2687
|
-
},
|
|
2670
|
+
}, vs.apply(this, arguments);
|
|
2688
2671
|
}
|
|
2689
|
-
function
|
|
2672
|
+
function ys(e, t) {
|
|
2690
2673
|
if (e == null) return {};
|
|
2691
2674
|
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]);
|
|
2692
2675
|
return n;
|
|
2693
2676
|
}
|
|
2694
|
-
function
|
|
2677
|
+
function bs(e, t) {
|
|
2695
2678
|
if (e == null) return {};
|
|
2696
|
-
var n =
|
|
2679
|
+
var n = ys(e, t), r, i;
|
|
2697
2680
|
if (Object.getOwnPropertySymbols) {
|
|
2698
2681
|
var a = Object.getOwnPropertySymbols(e);
|
|
2699
2682
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2700
2683
|
}
|
|
2701
2684
|
return n;
|
|
2702
2685
|
}
|
|
2703
|
-
var
|
|
2704
|
-
function
|
|
2686
|
+
var xs = "1.15.2";
|
|
2687
|
+
function Ss(e) {
|
|
2705
2688
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2706
2689
|
}
|
|
2707
|
-
var
|
|
2690
|
+
var Cs = Ss(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ws = Ss(/Edge/i), Ts = Ss(/firefox/i), Es = Ss(/safari/i) && !Ss(/chrome/i) && !Ss(/android/i), Ds = Ss(/iP(ad|od|hone)/i), Os = Ss(/chrome/i) && Ss(/android/i), ks = {
|
|
2708
2691
|
capture: !1,
|
|
2709
2692
|
passive: !1
|
|
2710
2693
|
};
|
|
2711
2694
|
function H(e, t, n) {
|
|
2712
|
-
e.addEventListener(t, n, !
|
|
2695
|
+
e.addEventListener(t, n, !Cs && ks);
|
|
2713
2696
|
}
|
|
2714
2697
|
function U(e, t, n) {
|
|
2715
|
-
e.removeEventListener(t, n, !
|
|
2698
|
+
e.removeEventListener(t, n, !Cs && ks);
|
|
2716
2699
|
}
|
|
2717
|
-
function
|
|
2700
|
+
function As(e, t) {
|
|
2718
2701
|
if (t) {
|
|
2719
2702
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2720
2703
|
if (e.matches) return e.matches(t);
|
|
@@ -2726,22 +2709,22 @@ function Fs(e, t) {
|
|
|
2726
2709
|
return !1;
|
|
2727
2710
|
}
|
|
2728
2711
|
}
|
|
2729
|
-
function
|
|
2712
|
+
function js(e) {
|
|
2730
2713
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2731
2714
|
}
|
|
2732
|
-
function
|
|
2715
|
+
function Ms(e, t, n, r) {
|
|
2733
2716
|
if (e) {
|
|
2734
2717
|
n ||= document;
|
|
2735
2718
|
do {
|
|
2736
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2719
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && As(e, t) : As(e, t)) || r && e === n) return e;
|
|
2737
2720
|
if (e === n) break;
|
|
2738
|
-
} while (e =
|
|
2721
|
+
} while (e = js(e));
|
|
2739
2722
|
}
|
|
2740
2723
|
return null;
|
|
2741
2724
|
}
|
|
2742
|
-
var
|
|
2743
|
-
function
|
|
2744
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2725
|
+
var Ns = /\s+/g;
|
|
2726
|
+
function Ps(e, t, n) {
|
|
2727
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Ns, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Ns, " "));
|
|
2745
2728
|
}
|
|
2746
2729
|
function W(e, t, n) {
|
|
2747
2730
|
var r = e && e.style;
|
|
@@ -2750,7 +2733,7 @@ function W(e, t, n) {
|
|
|
2750
2733
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2751
2734
|
}
|
|
2752
2735
|
}
|
|
2753
|
-
function
|
|
2736
|
+
function Fs(e, t) {
|
|
2754
2737
|
var n = "";
|
|
2755
2738
|
if (typeof e == "string") n = e;
|
|
2756
2739
|
else do {
|
|
@@ -2760,7 +2743,7 @@ function Bs(e, t) {
|
|
|
2760
2743
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2761
2744
|
return i && new i(n);
|
|
2762
2745
|
}
|
|
2763
|
-
function
|
|
2746
|
+
function Is(e, t, n) {
|
|
2764
2747
|
if (e) {
|
|
2765
2748
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2766
2749
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2768,13 +2751,13 @@ function Vs(e, t, n) {
|
|
|
2768
2751
|
}
|
|
2769
2752
|
return [];
|
|
2770
2753
|
}
|
|
2771
|
-
function
|
|
2754
|
+
function Ls() {
|
|
2772
2755
|
return document.scrollingElement || document.documentElement;
|
|
2773
2756
|
}
|
|
2774
2757
|
function G(e, t, n, r, i) {
|
|
2775
2758
|
if (e.getBoundingClientRect || e === window) {
|
|
2776
2759
|
var a, o, s, c, l, u, d;
|
|
2777
|
-
if (e !== window && e.parentNode && e !==
|
|
2760
|
+
if (e !== window && e.parentNode && e !== Ls() ? (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, !Cs)) do
|
|
2778
2761
|
if (i && i.getBoundingClientRect && (W(i, "transform") !== "none" || n && W(i, "position") !== "static")) {
|
|
2779
2762
|
var f = i.getBoundingClientRect();
|
|
2780
2763
|
o -= f.top + parseInt(W(i, "border-top-width")), s -= f.left + parseInt(W(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2782,7 +2765,7 @@ function G(e, t, n, r, i) {
|
|
|
2782
2765
|
}
|
|
2783
2766
|
while (i = i.parentNode);
|
|
2784
2767
|
if (r && e !== window) {
|
|
2785
|
-
var p =
|
|
2768
|
+
var p = Fs(i || e), m = p && p.a, h = p && p.d;
|
|
2786
2769
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2787
2770
|
}
|
|
2788
2771
|
return {
|
|
@@ -2795,18 +2778,18 @@ function G(e, t, n, r, i) {
|
|
|
2795
2778
|
};
|
|
2796
2779
|
}
|
|
2797
2780
|
}
|
|
2798
|
-
function
|
|
2799
|
-
for (var r =
|
|
2781
|
+
function Rs(e, t, n) {
|
|
2782
|
+
for (var r = Ws(e, !0), i = G(e)[t]; r;) {
|
|
2800
2783
|
var a = G(r)[n], o = void 0;
|
|
2801
2784
|
if (o = i >= a, !o) return r;
|
|
2802
|
-
if (r ===
|
|
2803
|
-
r =
|
|
2785
|
+
if (r === Ls()) break;
|
|
2786
|
+
r = Ws(r, !1);
|
|
2804
2787
|
}
|
|
2805
2788
|
return !1;
|
|
2806
2789
|
}
|
|
2807
|
-
function
|
|
2790
|
+
function zs(e, t, n, r) {
|
|
2808
2791
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2809
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2792
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ms(o[a], n.draggable, e, !1)) {
|
|
2810
2793
|
if (i === t) return o[a];
|
|
2811
2794
|
i++;
|
|
2812
2795
|
}
|
|
@@ -2814,84 +2797,84 @@ function Ws(e, t, n, r) {
|
|
|
2814
2797
|
}
|
|
2815
2798
|
return null;
|
|
2816
2799
|
}
|
|
2817
|
-
function
|
|
2818
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || W(n, "display") === "none" || t && !
|
|
2800
|
+
function Bs(e, t) {
|
|
2801
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || W(n, "display") === "none" || t && !As(n, t));) n = n.previousElementSibling;
|
|
2819
2802
|
return n || null;
|
|
2820
2803
|
}
|
|
2821
|
-
function
|
|
2804
|
+
function Vs(e, t) {
|
|
2822
2805
|
var n = 0;
|
|
2823
2806
|
if (!e || !e.parentNode) return -1;
|
|
2824
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2807
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || As(e, t)) && n++;
|
|
2825
2808
|
return n;
|
|
2826
2809
|
}
|
|
2827
|
-
function
|
|
2828
|
-
var t = 0, n = 0, r =
|
|
2810
|
+
function Hs(e) {
|
|
2811
|
+
var t = 0, n = 0, r = Ls();
|
|
2829
2812
|
if (e) do {
|
|
2830
|
-
var i =
|
|
2813
|
+
var i = Fs(e), a = i.a, o = i.d;
|
|
2831
2814
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2832
2815
|
} while (e !== r && (e = e.parentNode));
|
|
2833
2816
|
return [t, n];
|
|
2834
2817
|
}
|
|
2835
|
-
function
|
|
2818
|
+
function Us(e, t) {
|
|
2836
2819
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2837
2820
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2838
2821
|
}
|
|
2839
2822
|
return -1;
|
|
2840
2823
|
}
|
|
2841
|
-
function
|
|
2842
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2824
|
+
function Ws(e, t) {
|
|
2825
|
+
if (!e || !e.getBoundingClientRect) return Ls();
|
|
2843
2826
|
var n = e, r = !1;
|
|
2844
2827
|
do
|
|
2845
2828
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2846
2829
|
var i = W(n);
|
|
2847
2830
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2848
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2831
|
+
if (!n.getBoundingClientRect || n === document.body) return Ls();
|
|
2849
2832
|
if (r || t) return n;
|
|
2850
2833
|
r = !0;
|
|
2851
2834
|
}
|
|
2852
2835
|
}
|
|
2853
2836
|
while (n = n.parentNode);
|
|
2854
|
-
return
|
|
2837
|
+
return Ls();
|
|
2855
2838
|
}
|
|
2856
|
-
function
|
|
2839
|
+
function Gs(e, t) {
|
|
2857
2840
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2858
2841
|
return e;
|
|
2859
2842
|
}
|
|
2860
|
-
function
|
|
2843
|
+
function Ks(e, t) {
|
|
2861
2844
|
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);
|
|
2862
2845
|
}
|
|
2863
|
-
var
|
|
2864
|
-
function
|
|
2846
|
+
var qs;
|
|
2847
|
+
function Js(e, t) {
|
|
2865
2848
|
return function() {
|
|
2866
|
-
if (!
|
|
2849
|
+
if (!qs) {
|
|
2867
2850
|
var n = arguments, r = this;
|
|
2868
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2869
|
-
|
|
2851
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), qs = setTimeout(function() {
|
|
2852
|
+
qs = void 0;
|
|
2870
2853
|
}, t);
|
|
2871
2854
|
}
|
|
2872
2855
|
};
|
|
2873
2856
|
}
|
|
2874
|
-
function
|
|
2875
|
-
clearTimeout(
|
|
2857
|
+
function Ys() {
|
|
2858
|
+
clearTimeout(qs), qs = void 0;
|
|
2876
2859
|
}
|
|
2877
|
-
function
|
|
2860
|
+
function Xs(e, t, n) {
|
|
2878
2861
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2879
2862
|
}
|
|
2880
|
-
function
|
|
2863
|
+
function Zs(e) {
|
|
2881
2864
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2882
2865
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2883
2866
|
}
|
|
2884
|
-
function
|
|
2867
|
+
function Qs(e, t, n) {
|
|
2885
2868
|
var r = {};
|
|
2886
2869
|
return Array.from(e.children).forEach(function(i) {
|
|
2887
|
-
if (
|
|
2870
|
+
if (Ms(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2888
2871
|
var a = G(i);
|
|
2889
2872
|
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);
|
|
2890
2873
|
}
|
|
2891
2874
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2892
2875
|
}
|
|
2893
|
-
var
|
|
2894
|
-
function
|
|
2876
|
+
var $s = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2877
|
+
function ec() {
|
|
2895
2878
|
var e = [], t;
|
|
2896
2879
|
return {
|
|
2897
2880
|
captureAnimationState: function() {
|
|
@@ -2901,9 +2884,9 @@ function ac() {
|
|
|
2901
2884
|
target: t,
|
|
2902
2885
|
rect: G(t)
|
|
2903
2886
|
});
|
|
2904
|
-
var n =
|
|
2887
|
+
var n = hs({}, e[e.length - 1].rect);
|
|
2905
2888
|
if (t.thisAnimationDuration) {
|
|
2906
|
-
var r =
|
|
2889
|
+
var r = Fs(t, !0);
|
|
2907
2890
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2908
2891
|
}
|
|
2909
2892
|
t.fromRect = n;
|
|
@@ -2914,7 +2897,7 @@ function ac() {
|
|
|
2914
2897
|
e.push(t);
|
|
2915
2898
|
},
|
|
2916
2899
|
removeAnimationState: function(t) {
|
|
2917
|
-
e.splice(
|
|
2900
|
+
e.splice(Us(e, { target: t }), 1);
|
|
2918
2901
|
},
|
|
2919
2902
|
animateAll: function(n) {
|
|
2920
2903
|
var r = this;
|
|
@@ -2922,8 +2905,8 @@ function ac() {
|
|
|
2922
2905
|
else {
|
|
2923
2906
|
var i = !1, a = 0;
|
|
2924
2907
|
e.forEach(function(e) {
|
|
2925
|
-
var t = 0, n = e.target, o = n.fromRect, s = G(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2926
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2908
|
+
var t = 0, n = e.target, o = n.fromRect, s = G(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Fs(n, !0);
|
|
2909
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Ks(c, s) && !Ks(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = nc(u, c, l, r.options)), Ks(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() {
|
|
2927
2910
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2928
2911
|
}, t), n.thisAnimationDuration = t);
|
|
2929
2912
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2934,26 +2917,26 @@ function ac() {
|
|
|
2934
2917
|
animate: function(e, t, n, r) {
|
|
2935
2918
|
if (r) {
|
|
2936
2919
|
W(e, "transition", ""), W(e, "transform", "");
|
|
2937
|
-
var i =
|
|
2938
|
-
e.animatingX = !!s, e.animatingY = !!c, W(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2920
|
+
var i = Fs(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2921
|
+
e.animatingX = !!s, e.animatingY = !!c, W(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = tc(e), W(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), W(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2939
2922
|
W(e, "transition", ""), W(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2940
2923
|
}, r);
|
|
2941
2924
|
}
|
|
2942
2925
|
}
|
|
2943
2926
|
};
|
|
2944
2927
|
}
|
|
2945
|
-
function
|
|
2928
|
+
function tc(e) {
|
|
2946
2929
|
return e.offsetWidth;
|
|
2947
2930
|
}
|
|
2948
|
-
function
|
|
2931
|
+
function nc(e, t, n, r) {
|
|
2949
2932
|
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;
|
|
2950
2933
|
}
|
|
2951
|
-
var
|
|
2934
|
+
var rc = [], ic = { initializeByDefault: !0 }, ac = {
|
|
2952
2935
|
mount: function(e) {
|
|
2953
|
-
for (var t in
|
|
2954
|
-
|
|
2936
|
+
for (var t in ic) ic.hasOwnProperty(t) && !(t in e) && (e[t] = ic[t]);
|
|
2937
|
+
rc.forEach(function(t) {
|
|
2955
2938
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2956
|
-
}),
|
|
2939
|
+
}), rc.push(e);
|
|
2957
2940
|
},
|
|
2958
2941
|
pluginEvent: function(e, t, n) {
|
|
2959
2942
|
var r = this;
|
|
@@ -2961,16 +2944,16 @@ var cc = [], lc = { initializeByDefault: !0 }, uc = {
|
|
|
2961
2944
|
r.eventCanceled = !0;
|
|
2962
2945
|
};
|
|
2963
2946
|
var i = e + "Global";
|
|
2964
|
-
|
|
2965
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2947
|
+
rc.forEach(function(r) {
|
|
2948
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](hs({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](hs({ sortable: t }, n)));
|
|
2966
2949
|
});
|
|
2967
2950
|
},
|
|
2968
2951
|
initializePlugins: function(e, t, n, r) {
|
|
2969
|
-
for (var i in
|
|
2952
|
+
for (var i in rc.forEach(function(r) {
|
|
2970
2953
|
var i = r.pluginName;
|
|
2971
2954
|
if (e.options[i] || r.initializeByDefault) {
|
|
2972
2955
|
var a = new r(e, t, e.options);
|
|
2973
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2956
|
+
a.sortable = e, a.options = e.options, e[i] = a, vs(n, a.defaults);
|
|
2974
2957
|
}
|
|
2975
2958
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2976
2959
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2979,59 +2962,59 @@ var cc = [], lc = { initializeByDefault: !0 }, uc = {
|
|
|
2979
2962
|
},
|
|
2980
2963
|
getEventProperties: function(e, t) {
|
|
2981
2964
|
var n = {};
|
|
2982
|
-
return
|
|
2983
|
-
typeof r.eventProperties == "function" &&
|
|
2965
|
+
return rc.forEach(function(r) {
|
|
2966
|
+
typeof r.eventProperties == "function" && vs(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2984
2967
|
}), n;
|
|
2985
2968
|
},
|
|
2986
2969
|
modifyOption: function(e, t, n) {
|
|
2987
2970
|
var r;
|
|
2988
|
-
return
|
|
2971
|
+
return rc.forEach(function(i) {
|
|
2989
2972
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2990
2973
|
}), r;
|
|
2991
2974
|
}
|
|
2992
2975
|
};
|
|
2993
|
-
function
|
|
2976
|
+
function oc(e) {
|
|
2994
2977
|
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;
|
|
2995
|
-
if (t ||= n && n[
|
|
2978
|
+
if (t ||= n && n[$s], t) {
|
|
2996
2979
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2997
|
-
window.CustomEvent && !
|
|
2980
|
+
window.CustomEvent && !Cs && !ws ? h = new CustomEvent(r, {
|
|
2998
2981
|
bubbles: !0,
|
|
2999
2982
|
cancelable: !0
|
|
3000
2983
|
}) : (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;
|
|
3001
|
-
var v =
|
|
2984
|
+
var v = hs(hs({}, m), ac.getEventProperties(r, t));
|
|
3002
2985
|
for (var y in v) h[y] = v[y];
|
|
3003
2986
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
3004
2987
|
}
|
|
3005
2988
|
}
|
|
3006
|
-
var
|
|
3007
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
3008
|
-
|
|
2989
|
+
var sc = ["evt"], cc = function(e, t) {
|
|
2990
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = bs(n, sc);
|
|
2991
|
+
ac.pluginEvent.bind(Q)(e, t, hs({
|
|
3009
2992
|
dragEl: K,
|
|
3010
2993
|
parentEl: q,
|
|
3011
2994
|
ghostEl: J,
|
|
3012
2995
|
rootEl: Y,
|
|
3013
|
-
nextEl:
|
|
3014
|
-
lastDownEl:
|
|
2996
|
+
nextEl: uc,
|
|
2997
|
+
lastDownEl: dc,
|
|
3015
2998
|
cloneEl: X,
|
|
3016
|
-
cloneHidden:
|
|
3017
|
-
dragStarted:
|
|
2999
|
+
cloneHidden: fc,
|
|
3000
|
+
dragStarted: Dc,
|
|
3018
3001
|
putSortable: Z,
|
|
3019
3002
|
activeSortable: Q.active,
|
|
3020
3003
|
originalEvent: r,
|
|
3021
|
-
oldIndex:
|
|
3022
|
-
oldDraggableIndex:
|
|
3023
|
-
newIndex:
|
|
3024
|
-
newDraggableIndex:
|
|
3025
|
-
hideGhostForTarget:
|
|
3026
|
-
unhideGhostForTarget:
|
|
3004
|
+
oldIndex: pc,
|
|
3005
|
+
oldDraggableIndex: hc,
|
|
3006
|
+
newIndex: mc,
|
|
3007
|
+
newDraggableIndex: gc,
|
|
3008
|
+
hideGhostForTarget: Kc,
|
|
3009
|
+
unhideGhostForTarget: qc,
|
|
3027
3010
|
cloneNowHidden: function() {
|
|
3028
|
-
|
|
3011
|
+
fc = !0;
|
|
3029
3012
|
},
|
|
3030
3013
|
cloneNowShown: function() {
|
|
3031
|
-
|
|
3014
|
+
fc = !1;
|
|
3032
3015
|
},
|
|
3033
3016
|
dispatchSortableEvent: function(e) {
|
|
3034
|
-
|
|
3017
|
+
lc({
|
|
3035
3018
|
sortable: t,
|
|
3036
3019
|
name: e,
|
|
3037
3020
|
originalEvent: r
|
|
@@ -3039,46 +3022,46 @@ var fc = ["evt"], pc = function(e, t) {
|
|
|
3039
3022
|
}
|
|
3040
3023
|
}, i));
|
|
3041
3024
|
};
|
|
3042
|
-
function
|
|
3043
|
-
|
|
3025
|
+
function lc(e) {
|
|
3026
|
+
oc(hs({
|
|
3044
3027
|
putSortable: Z,
|
|
3045
3028
|
cloneEl: X,
|
|
3046
3029
|
targetEl: K,
|
|
3047
3030
|
rootEl: Y,
|
|
3048
|
-
oldIndex:
|
|
3049
|
-
oldDraggableIndex:
|
|
3050
|
-
newIndex:
|
|
3051
|
-
newDraggableIndex:
|
|
3031
|
+
oldIndex: pc,
|
|
3032
|
+
oldDraggableIndex: hc,
|
|
3033
|
+
newIndex: mc,
|
|
3034
|
+
newDraggableIndex: gc
|
|
3052
3035
|
}, e));
|
|
3053
3036
|
}
|
|
3054
|
-
var K, q, J, Y,
|
|
3055
|
-
if (
|
|
3056
|
-
if (
|
|
3037
|
+
var K, q, J, Y, uc, dc, X, fc, pc, mc, hc, gc, _c, Z, vc = !1, yc = !1, bc = [], xc, Sc, Cc, wc, Tc, Ec, Dc, Oc, kc, Ac = !1, jc = !1, Mc, Nc, Pc = [], Fc = !1, Ic = [], Lc = typeof document < "u", Rc = Ds, zc = ws || Cs ? "cssFloat" : "float", Bc = Lc && !Os && !Ds && "draggable" in document.createElement("div"), Vc = function() {
|
|
3038
|
+
if (Lc) {
|
|
3039
|
+
if (Cs) return !1;
|
|
3057
3040
|
var e = document.createElement("x");
|
|
3058
3041
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3059
3042
|
}
|
|
3060
|
-
}(),
|
|
3061
|
-
var n = W(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
3043
|
+
}(), Hc = function(e, t) {
|
|
3044
|
+
var n = W(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = zs(e, 0, t), a = zs(e, 1, t), o = i && W(i), s = a && W(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + G(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + G(a).width;
|
|
3062
3045
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3063
3046
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3064
3047
|
if (i && o.float && o.float !== "none") {
|
|
3065
3048
|
var u = o.float === "left" ? "left" : "right";
|
|
3066
3049
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3067
3050
|
}
|
|
3068
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3069
|
-
},
|
|
3051
|
+
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";
|
|
3052
|
+
}, Uc = function(e, t, n) {
|
|
3070
3053
|
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;
|
|
3071
3054
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3072
|
-
},
|
|
3055
|
+
}, Wc = function(e, t) {
|
|
3073
3056
|
var n;
|
|
3074
|
-
return
|
|
3075
|
-
var i = r[
|
|
3076
|
-
if (i && !
|
|
3057
|
+
return bc.some(function(r) {
|
|
3058
|
+
var i = r[$s].options.emptyInsertThreshold;
|
|
3059
|
+
if (i && !Bs(r)) {
|
|
3077
3060
|
var a = G(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3078
3061
|
if (o && s) return n = r;
|
|
3079
3062
|
}
|
|
3080
3063
|
}), n;
|
|
3081
|
-
},
|
|
3064
|
+
}, Gc = function(e) {
|
|
3082
3065
|
function t(e, n) {
|
|
3083
3066
|
return function(r, i, a, o) {
|
|
3084
3067
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3091,31 +3074,31 @@ var K, q, J, Y, hc, gc, X, _c, vc, yc, bc, xc, Sc, Z, Cc = !1, wc = !1, Tc = [],
|
|
|
3091
3074
|
};
|
|
3092
3075
|
}
|
|
3093
3076
|
var n = {}, r = e.group;
|
|
3094
|
-
r &&
|
|
3095
|
-
},
|
|
3096
|
-
!
|
|
3097
|
-
},
|
|
3098
|
-
!
|
|
3077
|
+
r && gs(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;
|
|
3078
|
+
}, Kc = function() {
|
|
3079
|
+
!Vc && J && W(J, "display", "none");
|
|
3080
|
+
}, qc = function() {
|
|
3081
|
+
!Vc && J && W(J, "display", "");
|
|
3099
3082
|
};
|
|
3100
|
-
|
|
3101
|
-
if (
|
|
3083
|
+
Lc && !Os && document.addEventListener("click", function(e) {
|
|
3084
|
+
if (yc) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), yc = !1, !1;
|
|
3102
3085
|
}, !0);
|
|
3103
|
-
var
|
|
3086
|
+
var Jc = function(e) {
|
|
3104
3087
|
if (K) {
|
|
3105
3088
|
e = e.touches ? e.touches[0] : e;
|
|
3106
|
-
var t =
|
|
3089
|
+
var t = Wc(e.clientX, e.clientY);
|
|
3107
3090
|
if (t) {
|
|
3108
3091
|
var n = {};
|
|
3109
3092
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3110
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3093
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[$s]._onDragOver(n);
|
|
3111
3094
|
}
|
|
3112
3095
|
}
|
|
3113
|
-
},
|
|
3114
|
-
K && K.parentNode[
|
|
3096
|
+
}, Yc = function(e) {
|
|
3097
|
+
K && K.parentNode[$s]._isOutsideThisEl(e.target);
|
|
3115
3098
|
};
|
|
3116
3099
|
function Q(e, t) {
|
|
3117
3100
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3118
|
-
this.el = e, this.options = t =
|
|
3101
|
+
this.el = e, this.options = t = vs({}, t), e[$s] = this;
|
|
3119
3102
|
var n = {
|
|
3120
3103
|
group: null,
|
|
3121
3104
|
sort: !0,
|
|
@@ -3128,7 +3111,7 @@ function Q(e, t) {
|
|
|
3128
3111
|
invertedSwapThreshold: null,
|
|
3129
3112
|
removeCloneOnHide: !0,
|
|
3130
3113
|
direction: function() {
|
|
3131
|
-
return
|
|
3114
|
+
return Hc(e, this.options);
|
|
3132
3115
|
},
|
|
3133
3116
|
ghostClass: "sortable-ghost",
|
|
3134
3117
|
chosenClass: "sortable-chosen",
|
|
@@ -3155,17 +3138,17 @@ function Q(e, t) {
|
|
|
3155
3138
|
x: 0,
|
|
3156
3139
|
y: 0
|
|
3157
3140
|
},
|
|
3158
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3141
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Es,
|
|
3159
3142
|
emptyInsertThreshold: 5
|
|
3160
3143
|
};
|
|
3161
|
-
for (var r in
|
|
3162
|
-
for (var i in
|
|
3163
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3144
|
+
for (var r in ac.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3145
|
+
for (var i in Gc(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3146
|
+
this.nativeDraggable = !t.forceFallback && Bc, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? H(e, "pointerdown", this._onTapStart) : (H(e, "mousedown", this._onTapStart), H(e, "touchstart", this._onTapStart)), this.nativeDraggable && (H(e, "dragover", this), H(e, "dragenter", this)), bc.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), vs(this, ec());
|
|
3164
3147
|
}
|
|
3165
3148
|
Q.prototype = {
|
|
3166
3149
|
constructor: Q,
|
|
3167
3150
|
_isOutsideThisEl: function(e) {
|
|
3168
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3151
|
+
!this.el.contains(e) && e !== this.el && (Oc = null);
|
|
3169
3152
|
},
|
|
3170
3153
|
_getDirection: function(e, t) {
|
|
3171
3154
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, K) : this.options.direction;
|
|
@@ -3173,33 +3156,33 @@ Q.prototype = {
|
|
|
3173
3156
|
_onTapStart: function(e) {
|
|
3174
3157
|
if (e.cancelable) {
|
|
3175
3158
|
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;
|
|
3176
|
-
if (
|
|
3177
|
-
if (
|
|
3159
|
+
if (al(n), !K && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Es && s && s.tagName.toUpperCase() === "SELECT") && (s = Ms(s, r.draggable, n, !1), !(s && s.animated) && dc !== s)) {
|
|
3160
|
+
if (pc = Vs(s), hc = Vs(s, r.draggable), typeof l == "function") {
|
|
3178
3161
|
if (l.call(this, e, s, this)) {
|
|
3179
|
-
|
|
3162
|
+
lc({
|
|
3180
3163
|
sortable: t,
|
|
3181
3164
|
rootEl: c,
|
|
3182
3165
|
name: "filter",
|
|
3183
3166
|
targetEl: s,
|
|
3184
3167
|
toEl: n,
|
|
3185
3168
|
fromEl: n
|
|
3186
|
-
}),
|
|
3169
|
+
}), cc("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3187
3170
|
return;
|
|
3188
3171
|
}
|
|
3189
3172
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3190
|
-
if (r =
|
|
3173
|
+
if (r = Ms(c, r.trim(), n, !1), r) return lc({
|
|
3191
3174
|
sortable: t,
|
|
3192
3175
|
rootEl: r,
|
|
3193
3176
|
name: "filter",
|
|
3194
3177
|
targetEl: s,
|
|
3195
3178
|
fromEl: n,
|
|
3196
3179
|
toEl: n
|
|
3197
|
-
}),
|
|
3180
|
+
}), cc("filter", t, { evt: e }), !0;
|
|
3198
3181
|
}), l)) {
|
|
3199
3182
|
i && e.cancelable && e.preventDefault();
|
|
3200
3183
|
return;
|
|
3201
3184
|
}
|
|
3202
|
-
r.handle && !
|
|
3185
|
+
r.handle && !Ms(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3203
3186
|
}
|
|
3204
3187
|
}
|
|
3205
3188
|
},
|
|
@@ -3207,19 +3190,19 @@ Q.prototype = {
|
|
|
3207
3190
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3208
3191
|
if (n && !K && n.parentNode === i) {
|
|
3209
3192
|
var c = G(n);
|
|
3210
|
-
if (Y = i, K = n, q = K.parentNode,
|
|
3193
|
+
if (Y = i, K = n, q = K.parentNode, uc = K.nextSibling, dc = n, _c = a.group, Q.dragged = K, xc = {
|
|
3211
3194
|
target: K,
|
|
3212
3195
|
clientX: (t || e).clientX,
|
|
3213
3196
|
clientY: (t || e).clientY
|
|
3214
|
-
},
|
|
3215
|
-
|
|
3197
|
+
}, Tc = xc.clientX - c.left, Ec = xc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, K.style["will-change"] = "all", s = function() {
|
|
3198
|
+
cc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Ts && r.nativeDraggable && (K.draggable = !0), r._triggerDragStart(e, t), lc({
|
|
3216
3199
|
sortable: r,
|
|
3217
3200
|
name: "choose",
|
|
3218
3201
|
originalEvent: e
|
|
3219
|
-
}),
|
|
3202
|
+
}), Ps(K, a.chosenClass, !0));
|
|
3220
3203
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3221
|
-
|
|
3222
|
-
}), H(o, "dragover",
|
|
3204
|
+
Is(K, e.trim(), Qc);
|
|
3205
|
+
}), H(o, "dragover", Jc), H(o, "mousemove", Jc), H(o, "touchmove", Jc), H(o, "mouseup", r._onDrop), H(o, "touchend", r._onDrop), H(o, "touchcancel", r._onDrop), Ts && this.nativeDraggable && (this.options.touchStartThreshold = 4, K.draggable = !0), cc("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ws || Cs))) {
|
|
3223
3206
|
if (Q.eventCanceled) {
|
|
3224
3207
|
this._onDrop();
|
|
3225
3208
|
return;
|
|
@@ -3233,7 +3216,7 @@ Q.prototype = {
|
|
|
3233
3216
|
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();
|
|
3234
3217
|
},
|
|
3235
3218
|
_disableDelayedDrag: function() {
|
|
3236
|
-
K &&
|
|
3219
|
+
K && Qc(K), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3237
3220
|
},
|
|
3238
3221
|
_disableDelayedDragEvents: function() {
|
|
3239
3222
|
var e = this.el.ownerDocument;
|
|
@@ -3242,16 +3225,16 @@ Q.prototype = {
|
|
|
3242
3225
|
_triggerDragStart: function(e, t) {
|
|
3243
3226
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? H(document, "pointermove", this._onTouchMove) : t ? H(document, "touchmove", this._onTouchMove) : H(document, "mousemove", this._onTouchMove) : (H(K, "dragend", this), H(Y, "dragstart", this._onDragStart));
|
|
3244
3227
|
try {
|
|
3245
|
-
document.selection ?
|
|
3228
|
+
document.selection ? ol(function() {
|
|
3246
3229
|
document.selection.empty();
|
|
3247
3230
|
}) : window.getSelection().removeAllRanges();
|
|
3248
3231
|
} catch {}
|
|
3249
3232
|
},
|
|
3250
3233
|
_dragStarted: function(e, t) {
|
|
3251
|
-
if (
|
|
3252
|
-
|
|
3234
|
+
if (vc = !1, Y && K) {
|
|
3235
|
+
cc("dragStarted", this, { evt: t }), this.nativeDraggable && H(document, "dragover", Yc);
|
|
3253
3236
|
var n = this.options;
|
|
3254
|
-
!e &&
|
|
3237
|
+
!e && Ps(K, n.dragClass, !1), Ps(K, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), lc({
|
|
3255
3238
|
sortable: this,
|
|
3256
3239
|
name: "start",
|
|
3257
3240
|
originalEvent: t
|
|
@@ -3259,33 +3242,33 @@ Q.prototype = {
|
|
|
3259
3242
|
} else this._nulling();
|
|
3260
3243
|
},
|
|
3261
3244
|
_emulateDragOver: function() {
|
|
3262
|
-
if (
|
|
3263
|
-
this._lastX =
|
|
3264
|
-
for (var e = document.elementFromPoint(
|
|
3265
|
-
if (K.parentNode[
|
|
3266
|
-
if (t[
|
|
3245
|
+
if (Sc) {
|
|
3246
|
+
this._lastX = Sc.clientX, this._lastY = Sc.clientY, Kc();
|
|
3247
|
+
for (var e = document.elementFromPoint(Sc.clientX, Sc.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Sc.clientX, Sc.clientY), e !== t);) t = e;
|
|
3248
|
+
if (K.parentNode[$s]._isOutsideThisEl(e), t) do {
|
|
3249
|
+
if (t[$s]) {
|
|
3267
3250
|
var n = void 0;
|
|
3268
|
-
if (n = t[
|
|
3269
|
-
clientX:
|
|
3270
|
-
clientY:
|
|
3251
|
+
if (n = t[$s]._onDragOver({
|
|
3252
|
+
clientX: Sc.clientX,
|
|
3253
|
+
clientY: Sc.clientY,
|
|
3271
3254
|
target: e,
|
|
3272
3255
|
rootEl: t
|
|
3273
3256
|
}), n && !this.options.dragoverBubble) break;
|
|
3274
3257
|
}
|
|
3275
3258
|
e = t;
|
|
3276
3259
|
} while (t = t.parentNode);
|
|
3277
|
-
|
|
3260
|
+
qc();
|
|
3278
3261
|
}
|
|
3279
3262
|
},
|
|
3280
3263
|
_onTouchMove: function(e) {
|
|
3281
|
-
if (
|
|
3282
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = J &&
|
|
3283
|
-
if (!Q.active && !
|
|
3264
|
+
if (xc) {
|
|
3265
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = J && Fs(J, !0), o = J && a && a.a, s = J && a && a.d, c = Rc && Nc && Hs(Nc), l = (i.clientX - xc.clientX + r.x) / (o || 1) + (c ? c[0] - Pc[0] : 0) / (o || 1), u = (i.clientY - xc.clientY + r.y) / (s || 1) + (c ? c[1] - Pc[1] : 0) / (s || 1);
|
|
3266
|
+
if (!Q.active && !vc) {
|
|
3284
3267
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3285
3268
|
this._onDragStart(e, !0);
|
|
3286
3269
|
}
|
|
3287
3270
|
if (J) {
|
|
3288
|
-
a ? (a.e += l - (
|
|
3271
|
+
a ? (a.e += l - (Cc || 0), a.f += u - (wc || 0)) : a = {
|
|
3289
3272
|
a: 1,
|
|
3290
3273
|
b: 0,
|
|
3291
3274
|
c: 0,
|
|
@@ -3294,35 +3277,35 @@ Q.prototype = {
|
|
|
3294
3277
|
f: u
|
|
3295
3278
|
};
|
|
3296
3279
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3297
|
-
W(J, "webkitTransform", d), W(J, "mozTransform", d), W(J, "msTransform", d), W(J, "transform", d),
|
|
3280
|
+
W(J, "webkitTransform", d), W(J, "mozTransform", d), W(J, "msTransform", d), W(J, "transform", d), Cc = l, wc = u, Sc = i;
|
|
3298
3281
|
}
|
|
3299
3282
|
e.cancelable && e.preventDefault();
|
|
3300
3283
|
}
|
|
3301
3284
|
},
|
|
3302
3285
|
_appendGhost: function() {
|
|
3303
3286
|
if (!J) {
|
|
3304
|
-
var e = this.options.fallbackOnBody ? document.body : Y, t = G(K, !0,
|
|
3305
|
-
if (
|
|
3306
|
-
for (
|
|
3307
|
-
|
|
3287
|
+
var e = this.options.fallbackOnBody ? document.body : Y, t = G(K, !0, Rc, !0, e), n = this.options;
|
|
3288
|
+
if (Rc) {
|
|
3289
|
+
for (Nc = e; W(Nc, "position") === "static" && W(Nc, "transform") === "none" && Nc !== document;) Nc = Nc.parentNode;
|
|
3290
|
+
Nc !== document.body && Nc !== document.documentElement ? (Nc === document && (Nc = Ls()), t.top += Nc.scrollTop, t.left += Nc.scrollLeft) : Nc = Ls(), Pc = Hs(Nc);
|
|
3308
3291
|
}
|
|
3309
|
-
J = K.cloneNode(!0),
|
|
3292
|
+
J = K.cloneNode(!0), Ps(J, n.ghostClass, !1), Ps(J, n.fallbackClass, !0), Ps(J, n.dragClass, !0), W(J, "transition", ""), W(J, "transform", ""), W(J, "box-sizing", "border-box"), W(J, "margin", 0), W(J, "top", t.top), W(J, "left", t.left), W(J, "width", t.width), W(J, "height", t.height), W(J, "opacity", "0.8"), W(J, "position", Rc ? "absolute" : "fixed"), W(J, "zIndex", "100000"), W(J, "pointerEvents", "none"), Q.ghost = J, e.appendChild(J), W(J, "transform-origin", Tc / parseInt(J.style.width) * 100 + "% " + Ec / parseInt(J.style.height) * 100 + "%");
|
|
3310
3293
|
}
|
|
3311
3294
|
},
|
|
3312
3295
|
_onDragStart: function(e, t) {
|
|
3313
3296
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3314
|
-
|
|
3315
|
-
|
|
3297
|
+
cc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (cc("setupClone", this), Q.eventCanceled || (X = Zs(K), X.removeAttribute("id"), X.draggable = !1, X.style["will-change"] = "", this._hideClone(), Ps(X, this.options.chosenClass, !1), Q.clone = X), n.cloneId = ol(function() {
|
|
3298
|
+
cc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || Y.insertBefore(X, K), n._hideClone(), lc({
|
|
3316
3299
|
sortable: n,
|
|
3317
3300
|
name: "clone"
|
|
3318
3301
|
}));
|
|
3319
|
-
}), !t &&
|
|
3302
|
+
}), !t && Ps(K, i.dragClass, !0), t ? (yc = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (U(document, "mouseup", n._onDrop), U(document, "touchend", n._onDrop), U(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, K)), H(document, "drop", n), W(K, "transform", "translateZ(0)")), vc = !0, n._dragStartId = ol(n._dragStarted.bind(n, t, e)), H(document, "selectstart", n), Dc = !0, Es && W(document.body, "user-select", "none"));
|
|
3320
3303
|
},
|
|
3321
3304
|
_onDragOver: function(e) {
|
|
3322
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3323
|
-
if (
|
|
3305
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = _c === s, u = o.sort, d = Z || c, f, p = this, m = !1;
|
|
3306
|
+
if (Fc) return;
|
|
3324
3307
|
function h(o, s) {
|
|
3325
|
-
|
|
3308
|
+
cc(o, p, hs({
|
|
3326
3309
|
evt: e,
|
|
3327
3310
|
isOwner: l,
|
|
3328
3311
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3334,7 +3317,7 @@ Q.prototype = {
|
|
|
3334
3317
|
target: n,
|
|
3335
3318
|
completed: _,
|
|
3336
3319
|
onMove: function(n, i) {
|
|
3337
|
-
return
|
|
3320
|
+
return Zc(Y, t, K, r, n, G(n), e, i);
|
|
3338
3321
|
},
|
|
3339
3322
|
changed: v
|
|
3340
3323
|
}, s));
|
|
@@ -3343,50 +3326,50 @@ Q.prototype = {
|
|
|
3343
3326
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3344
3327
|
}
|
|
3345
3328
|
function _(r) {
|
|
3346
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3329
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Ps(K, Z ? Z.options.ghostClass : c.options.ghostClass, !1), Ps(K, o.ghostClass, !0)), Z !== p && p !== Q.active ? Z = p : p === Q.active && Z && (Z = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3347
3330
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3348
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === K && !K.animated || n === t && !n.animated) && (
|
|
3331
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === K && !K.animated || n === t && !n.animated) && (Oc = null), !o.dragoverBubble && !e.rootEl && n !== document && (K.parentNode[$s]._isOutsideThisEl(e.target), !r && Jc(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3349
3332
|
}
|
|
3350
3333
|
function v() {
|
|
3351
|
-
|
|
3334
|
+
mc = Vs(K), gc = Vs(K, o.draggable), lc({
|
|
3352
3335
|
sortable: p,
|
|
3353
3336
|
name: "change",
|
|
3354
3337
|
toEl: t,
|
|
3355
|
-
newIndex:
|
|
3356
|
-
newDraggableIndex:
|
|
3338
|
+
newIndex: mc,
|
|
3339
|
+
newDraggableIndex: gc,
|
|
3357
3340
|
originalEvent: e
|
|
3358
3341
|
});
|
|
3359
3342
|
}
|
|
3360
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3343
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ms(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3361
3344
|
if (K.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3362
|
-
if (
|
|
3345
|
+
if (yc = !1, c && !o.disabled && (l ? u || (a = q !== Y) : Z === this || (this.lastPutMode = _c.checkPull(this, c, K, e)) && s.checkPut(this, c, K, e))) {
|
|
3363
3346
|
if (f = this._getDirection(e, n) === "vertical", r = G(K), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3364
|
-
if (a) return q = Y, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3365
|
-
var y =
|
|
3366
|
-
if (!y ||
|
|
3347
|
+
if (a) return q = Y, g(), this._hideClone(), h("revert"), Q.eventCanceled || (uc ? Y.insertBefore(K, uc) : Y.appendChild(K)), _(!0);
|
|
3348
|
+
var y = Bs(t, o.draggable);
|
|
3349
|
+
if (!y || tl(e, f, this) && !y.animated) {
|
|
3367
3350
|
if (y === K) return _(!1);
|
|
3368
|
-
if (y && t === e.target && (n = y), n && (i = G(n)),
|
|
3369
|
-
} else if (y &&
|
|
3370
|
-
var b =
|
|
3351
|
+
if (y && t === e.target && (n = y), n && (i = G(n)), Zc(Y, t, K, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(K, y.nextSibling) : t.appendChild(K), q = t, v(), _(!0);
|
|
3352
|
+
} else if (y && el(e, f, this)) {
|
|
3353
|
+
var b = zs(t, 0, o, !0);
|
|
3371
3354
|
if (b === K) return _(!1);
|
|
3372
|
-
if (n = b, i = G(n),
|
|
3355
|
+
if (n = b, i = G(n), Zc(Y, t, K, r, n, i, e, !1) !== !1) return g(), t.insertBefore(K, b), q = t, v(), _(!0);
|
|
3373
3356
|
} else if (n.parentNode === t) {
|
|
3374
3357
|
i = G(n);
|
|
3375
|
-
var x = 0, S, C = K.parentNode !== t, w = !
|
|
3376
|
-
|
|
3358
|
+
var x = 0, S, C = K.parentNode !== t, w = !Uc(K.animated && K.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Rs(n, "top", "top") || Rs(K, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
3359
|
+
Oc !== n && (S = i[T], Ac = !1, jc = !w && o.invertSwap || C), x = nl(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, jc, Oc === n);
|
|
3377
3360
|
var D;
|
|
3378
3361
|
if (x !== 0) {
|
|
3379
|
-
var O =
|
|
3362
|
+
var O = Vs(K);
|
|
3380
3363
|
do
|
|
3381
3364
|
O -= x, D = q.children[O];
|
|
3382
3365
|
while (D && (W(D, "display") === "none" || D === J));
|
|
3383
3366
|
}
|
|
3384
3367
|
if (x === 0 || D === n) return _(!1);
|
|
3385
|
-
|
|
3368
|
+
Oc = n, kc = x;
|
|
3386
3369
|
var k = n.nextElementSibling, A = !1;
|
|
3387
3370
|
A = x === 1;
|
|
3388
|
-
var j =
|
|
3389
|
-
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1),
|
|
3371
|
+
var j = Zc(Y, t, K, r, n, i, e, A);
|
|
3372
|
+
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1), Fc = !0, setTimeout($c, 30), g(), A && !k ? t.appendChild(K) : n.parentNode.insertBefore(K, A ? k : n), E && Xs(E, 0, ee - E.scrollTop), q = K.parentNode, S !== void 0 && !jc && (Mc = Math.abs(S - G(n)[T])), v(), _(!0);
|
|
3390
3373
|
}
|
|
3391
3374
|
if (t.contains(K)) return _(!1);
|
|
3392
3375
|
}
|
|
@@ -3394,7 +3377,7 @@ Q.prototype = {
|
|
|
3394
3377
|
},
|
|
3395
3378
|
_ignoreWhileAnimating: null,
|
|
3396
3379
|
_offMoveEvents: function() {
|
|
3397
|
-
U(document, "mousemove", this._onTouchMove), U(document, "touchmove", this._onTouchMove), U(document, "pointermove", this._onTouchMove), U(document, "dragover",
|
|
3380
|
+
U(document, "mousemove", this._onTouchMove), U(document, "touchmove", this._onTouchMove), U(document, "pointermove", this._onTouchMove), U(document, "dragover", Jc), U(document, "mousemove", Jc), U(document, "touchmove", Jc);
|
|
3398
3381
|
},
|
|
3399
3382
|
_offUpEvents: function() {
|
|
3400
3383
|
var e = this.el.ownerDocument;
|
|
@@ -3402,46 +3385,46 @@ Q.prototype = {
|
|
|
3402
3385
|
},
|
|
3403
3386
|
_onDrop: function(e) {
|
|
3404
3387
|
var t = this.el, n = this.options;
|
|
3405
|
-
|
|
3388
|
+
mc = Vs(K), gc = Vs(K, n.draggable), cc("drop", this, { evt: e }), q = K && K.parentNode, mc = Vs(K), gc = Vs(K, n.draggable), Q.eventCanceled || (vc = !1, jc = !1, Ac = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), sl(this.cloneId), sl(this._dragStartId), this.nativeDraggable && (U(document, "drop", this), U(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Es && W(document.body, "user-select", ""), W(K, "transform", ""), e && (Dc && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), J && J.parentNode && J.parentNode.removeChild(J), (Y === q || Z && Z.lastPutMode !== "clone") && X && X.parentNode && X.parentNode.removeChild(X), K && (this.nativeDraggable && U(K, "dragend", this), Qc(K), K.style["will-change"] = "", Dc && !vc && Ps(K, Z ? Z.options.ghostClass : this.options.ghostClass, !1), Ps(K, this.options.chosenClass, !1), lc({
|
|
3406
3389
|
sortable: this,
|
|
3407
3390
|
name: "unchoose",
|
|
3408
3391
|
toEl: q,
|
|
3409
3392
|
newIndex: null,
|
|
3410
3393
|
newDraggableIndex: null,
|
|
3411
3394
|
originalEvent: e
|
|
3412
|
-
}), Y === q ?
|
|
3395
|
+
}), Y === q ? mc !== pc && mc >= 0 && (lc({
|
|
3413
3396
|
sortable: this,
|
|
3414
3397
|
name: "update",
|
|
3415
3398
|
toEl: q,
|
|
3416
3399
|
originalEvent: e
|
|
3417
|
-
}),
|
|
3400
|
+
}), lc({
|
|
3418
3401
|
sortable: this,
|
|
3419
3402
|
name: "sort",
|
|
3420
3403
|
toEl: q,
|
|
3421
3404
|
originalEvent: e
|
|
3422
|
-
})) : (
|
|
3405
|
+
})) : (mc >= 0 && (lc({
|
|
3423
3406
|
rootEl: q,
|
|
3424
3407
|
name: "add",
|
|
3425
3408
|
toEl: q,
|
|
3426
3409
|
fromEl: Y,
|
|
3427
3410
|
originalEvent: e
|
|
3428
|
-
}),
|
|
3411
|
+
}), lc({
|
|
3429
3412
|
sortable: this,
|
|
3430
3413
|
name: "remove",
|
|
3431
3414
|
toEl: q,
|
|
3432
3415
|
originalEvent: e
|
|
3433
|
-
}),
|
|
3416
|
+
}), lc({
|
|
3434
3417
|
rootEl: q,
|
|
3435
3418
|
name: "sort",
|
|
3436
3419
|
toEl: q,
|
|
3437
3420
|
fromEl: Y,
|
|
3438
3421
|
originalEvent: e
|
|
3439
|
-
}),
|
|
3422
|
+
}), lc({
|
|
3440
3423
|
sortable: this,
|
|
3441
3424
|
name: "sort",
|
|
3442
3425
|
toEl: q,
|
|
3443
3426
|
originalEvent: e
|
|
3444
|
-
})), Z && Z.save()), Q.active && ((
|
|
3427
|
+
})), Z && Z.save()), Q.active && ((mc == null || mc === -1) && (mc = pc, gc = hc), lc({
|
|
3445
3428
|
sortable: this,
|
|
3446
3429
|
name: "end",
|
|
3447
3430
|
toEl: q,
|
|
@@ -3449,9 +3432,9 @@ Q.prototype = {
|
|
|
3449
3432
|
}), this.save())))), this._nulling();
|
|
3450
3433
|
},
|
|
3451
3434
|
_nulling: function() {
|
|
3452
|
-
|
|
3435
|
+
cc("nulling", this), Y = K = q = J = uc = X = dc = fc = xc = Sc = Dc = mc = gc = pc = hc = Oc = kc = Z = _c = Q.dragged = Q.ghost = Q.clone = Q.active = null, Ic.forEach(function(e) {
|
|
3453
3436
|
e.checked = !0;
|
|
3454
|
-
}),
|
|
3437
|
+
}), Ic.length = Cc = wc = 0;
|
|
3455
3438
|
},
|
|
3456
3439
|
handleEvent: function(e) {
|
|
3457
3440
|
switch (e.type) {
|
|
@@ -3461,20 +3444,20 @@ Q.prototype = {
|
|
|
3461
3444
|
break;
|
|
3462
3445
|
case "dragenter":
|
|
3463
3446
|
case "dragover":
|
|
3464
|
-
K && (this._onDragOver(e),
|
|
3447
|
+
K && (this._onDragOver(e), Xc(e));
|
|
3465
3448
|
break;
|
|
3466
3449
|
case "selectstart": e.preventDefault();
|
|
3467
3450
|
}
|
|
3468
3451
|
},
|
|
3469
3452
|
toArray: function() {
|
|
3470
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3453
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ms(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || il(t));
|
|
3471
3454
|
return e;
|
|
3472
3455
|
},
|
|
3473
3456
|
sort: function(e, t) {
|
|
3474
3457
|
var n = {}, r = this.el;
|
|
3475
3458
|
this.toArray().forEach(function(e, t) {
|
|
3476
3459
|
var i = r.children[t];
|
|
3477
|
-
|
|
3460
|
+
Ms(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3478
3461
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3479
3462
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3480
3463
|
}), t && this.animateAll();
|
|
@@ -3484,122 +3467,122 @@ Q.prototype = {
|
|
|
3484
3467
|
e && e.set && e.set(this);
|
|
3485
3468
|
},
|
|
3486
3469
|
closest: function(e, t) {
|
|
3487
|
-
return
|
|
3470
|
+
return Ms(e, t || this.options.draggable, this.el, !1);
|
|
3488
3471
|
},
|
|
3489
3472
|
option: function(e, t) {
|
|
3490
3473
|
var n = this.options;
|
|
3491
3474
|
if (t === void 0) return n[e];
|
|
3492
|
-
var r =
|
|
3493
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3475
|
+
var r = ac.modifyOption(this, e, t);
|
|
3476
|
+
n[e] = r === void 0 ? t : r, e === "group" && Gc(n);
|
|
3494
3477
|
},
|
|
3495
3478
|
destroy: function() {
|
|
3496
|
-
|
|
3479
|
+
cc("destroy", this);
|
|
3497
3480
|
var e = this.el;
|
|
3498
|
-
e[
|
|
3481
|
+
e[$s] = null, U(e, "mousedown", this._onTapStart), U(e, "touchstart", this._onTapStart), U(e, "pointerdown", this._onTapStart), this.nativeDraggable && (U(e, "dragover", this), U(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3499
3482
|
e.removeAttribute("draggable");
|
|
3500
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3483
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), bc.splice(bc.indexOf(this.el), 1), this.el = e = null;
|
|
3501
3484
|
},
|
|
3502
3485
|
_hideClone: function() {
|
|
3503
|
-
if (!
|
|
3504
|
-
if (
|
|
3505
|
-
W(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X),
|
|
3486
|
+
if (!fc) {
|
|
3487
|
+
if (cc("hideClone", this), Q.eventCanceled) return;
|
|
3488
|
+
W(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X), fc = !0;
|
|
3506
3489
|
}
|
|
3507
3490
|
},
|
|
3508
3491
|
_showClone: function(e) {
|
|
3509
3492
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3510
|
-
else if (
|
|
3511
|
-
if (
|
|
3512
|
-
K.parentNode == Y && !this.options.group.revertClone ? Y.insertBefore(X, K) :
|
|
3493
|
+
else if (fc) {
|
|
3494
|
+
if (cc("showClone", this), Q.eventCanceled) return;
|
|
3495
|
+
K.parentNode == Y && !this.options.group.revertClone ? Y.insertBefore(X, K) : uc ? Y.insertBefore(X, uc) : Y.appendChild(X), this.options.group.revertClone && this.animate(K, X), W(X, "display", ""), fc = !1;
|
|
3513
3496
|
}
|
|
3514
3497
|
}
|
|
3515
3498
|
};
|
|
3516
|
-
function
|
|
3499
|
+
function Xc(e) {
|
|
3517
3500
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3518
3501
|
}
|
|
3519
|
-
function
|
|
3520
|
-
var c, l = e[
|
|
3521
|
-
return window.CustomEvent && !
|
|
3502
|
+
function Zc(e, t, n, r, i, a, o, s) {
|
|
3503
|
+
var c, l = e[$s], u = l.options.onMove, d;
|
|
3504
|
+
return window.CustomEvent && !Cs && !ws ? c = new CustomEvent("move", {
|
|
3522
3505
|
bubbles: !0,
|
|
3523
3506
|
cancelable: !0
|
|
3524
3507
|
}) : (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 || G(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3525
3508
|
}
|
|
3526
|
-
function
|
|
3509
|
+
function Qc(e) {
|
|
3527
3510
|
e.draggable = !1;
|
|
3528
3511
|
}
|
|
3529
|
-
function
|
|
3530
|
-
|
|
3512
|
+
function $c() {
|
|
3513
|
+
Fc = !1;
|
|
3531
3514
|
}
|
|
3532
|
-
function
|
|
3533
|
-
var r = G(
|
|
3515
|
+
function el(e, t, n) {
|
|
3516
|
+
var r = G(zs(n.el, 0, n.options, !0)), i = Qs(n.el, n.options, J), a = 10;
|
|
3534
3517
|
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;
|
|
3535
3518
|
}
|
|
3536
|
-
function
|
|
3537
|
-
var r = G(
|
|
3519
|
+
function tl(e, t, n) {
|
|
3520
|
+
var r = G(Bs(n.el, n.options.draggable)), i = Qs(n.el, n.options, J), a = 10;
|
|
3538
3521
|
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;
|
|
3539
3522
|
}
|
|
3540
|
-
function
|
|
3523
|
+
function nl(e, t, n, r, i, a, o, s) {
|
|
3541
3524
|
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;
|
|
3542
3525
|
if (!o) {
|
|
3543
|
-
if (s &&
|
|
3544
|
-
if (!
|
|
3545
|
-
else if (
|
|
3546
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3526
|
+
if (s && Mc < l * i) {
|
|
3527
|
+
if (!Ac && (kc === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Ac = !0), Ac) f = !0;
|
|
3528
|
+
else if (kc === 1 ? c < u + Mc : c > d - Mc) return -kc;
|
|
3529
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return rl(t);
|
|
3547
3530
|
}
|
|
3548
3531
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3549
3532
|
}
|
|
3550
|
-
function
|
|
3551
|
-
return
|
|
3533
|
+
function rl(e) {
|
|
3534
|
+
return Vs(K) < Vs(e) ? 1 : -1;
|
|
3552
3535
|
}
|
|
3553
|
-
function
|
|
3536
|
+
function il(e) {
|
|
3554
3537
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3555
3538
|
return r.toString(36);
|
|
3556
3539
|
}
|
|
3557
|
-
function
|
|
3558
|
-
|
|
3540
|
+
function al(e) {
|
|
3541
|
+
Ic.length = 0;
|
|
3559
3542
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3560
3543
|
var r = t[n];
|
|
3561
|
-
r.checked &&
|
|
3544
|
+
r.checked && Ic.push(r);
|
|
3562
3545
|
}
|
|
3563
3546
|
}
|
|
3564
|
-
function
|
|
3547
|
+
function ol(e) {
|
|
3565
3548
|
return setTimeout(e, 0);
|
|
3566
3549
|
}
|
|
3567
|
-
function
|
|
3550
|
+
function sl(e) {
|
|
3568
3551
|
return clearTimeout(e);
|
|
3569
3552
|
}
|
|
3570
|
-
|
|
3571
|
-
(Q.active ||
|
|
3553
|
+
Lc && H(document, "touchmove", function(e) {
|
|
3554
|
+
(Q.active || vc) && e.cancelable && e.preventDefault();
|
|
3572
3555
|
}), Q.utils = {
|
|
3573
3556
|
on: H,
|
|
3574
3557
|
off: U,
|
|
3575
3558
|
css: W,
|
|
3576
|
-
find:
|
|
3559
|
+
find: Is,
|
|
3577
3560
|
is: function(e, t) {
|
|
3578
|
-
return !!
|
|
3561
|
+
return !!Ms(e, t, e, !1);
|
|
3579
3562
|
},
|
|
3580
|
-
extend:
|
|
3581
|
-
throttle:
|
|
3582
|
-
closest:
|
|
3583
|
-
toggleClass:
|
|
3584
|
-
clone:
|
|
3585
|
-
index:
|
|
3586
|
-
nextTick:
|
|
3587
|
-
cancelNextTick:
|
|
3588
|
-
detectDirection:
|
|
3589
|
-
getChild:
|
|
3563
|
+
extend: Gs,
|
|
3564
|
+
throttle: Js,
|
|
3565
|
+
closest: Ms,
|
|
3566
|
+
toggleClass: Ps,
|
|
3567
|
+
clone: Zs,
|
|
3568
|
+
index: Vs,
|
|
3569
|
+
nextTick: ol,
|
|
3570
|
+
cancelNextTick: sl,
|
|
3571
|
+
detectDirection: Hc,
|
|
3572
|
+
getChild: zs
|
|
3590
3573
|
}, Q.get = function(e) {
|
|
3591
|
-
return e[
|
|
3574
|
+
return e[$s];
|
|
3592
3575
|
}, Q.mount = function() {
|
|
3593
3576
|
var e = [...arguments];
|
|
3594
3577
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3595
3578
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3596
|
-
e.utils && (Q.utils =
|
|
3579
|
+
e.utils && (Q.utils = hs(hs({}, Q.utils), e.utils)), ac.mount(e);
|
|
3597
3580
|
});
|
|
3598
3581
|
}, Q.create = function(e, t) {
|
|
3599
3582
|
return new Q(e, t);
|
|
3600
|
-
}, Q.version =
|
|
3601
|
-
var $ = [],
|
|
3602
|
-
function
|
|
3583
|
+
}, Q.version = xs;
|
|
3584
|
+
var $ = [], cl, ll, ul = !1, dl, fl, pl, ml;
|
|
3585
|
+
function hl() {
|
|
3603
3586
|
function e() {
|
|
3604
3587
|
for (var e in this.defaults = {
|
|
3605
3588
|
scroll: !0,
|
|
@@ -3619,63 +3602,63 @@ function bl() {
|
|
|
3619
3602
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3620
3603
|
},
|
|
3621
3604
|
drop: function() {
|
|
3622
|
-
this.sortable.nativeDraggable ? U(document, "dragover", this._handleAutoScroll) : (U(document, "pointermove", this._handleFallbackAutoScroll), U(document, "touchmove", this._handleFallbackAutoScroll), U(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3605
|
+
this.sortable.nativeDraggable ? U(document, "dragover", this._handleAutoScroll) : (U(document, "pointermove", this._handleFallbackAutoScroll), U(document, "touchmove", this._handleFallbackAutoScroll), U(document, "mousemove", this._handleFallbackAutoScroll)), _l(), gl(), Ys();
|
|
3623
3606
|
},
|
|
3624
3607
|
nulling: function() {
|
|
3625
|
-
|
|
3608
|
+
pl = ll = cl = ul = ml = dl = fl = null, $.length = 0;
|
|
3626
3609
|
},
|
|
3627
3610
|
_handleFallbackAutoScroll: function(e) {
|
|
3628
3611
|
this._handleAutoScroll(e, !0);
|
|
3629
3612
|
},
|
|
3630
3613
|
_handleAutoScroll: function(e, t) {
|
|
3631
3614
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3632
|
-
if (
|
|
3633
|
-
|
|
3634
|
-
var o =
|
|
3635
|
-
|
|
3636
|
-
var a =
|
|
3637
|
-
a !== o && (o = a,
|
|
3638
|
-
}, 10),
|
|
3615
|
+
if (pl = e, t || this.options.forceAutoScrollFallback || ws || Cs || Es) {
|
|
3616
|
+
vl(e, this.options, a, t);
|
|
3617
|
+
var o = Ws(a, !0);
|
|
3618
|
+
ul && (!ml || r !== dl || i !== fl) && (ml && _l(), ml = setInterval(function() {
|
|
3619
|
+
var a = Ws(document.elementFromPoint(r, i), !0);
|
|
3620
|
+
a !== o && (o = a, gl()), vl(e, n.options, a, t);
|
|
3621
|
+
}, 10), dl = r, fl = i);
|
|
3639
3622
|
} else {
|
|
3640
|
-
if (!this.options.bubbleScroll ||
|
|
3641
|
-
|
|
3623
|
+
if (!this.options.bubbleScroll || Ws(a, !0) === Ls()) {
|
|
3624
|
+
gl();
|
|
3642
3625
|
return;
|
|
3643
3626
|
}
|
|
3644
|
-
|
|
3627
|
+
vl(e, this.options, Ws(a, !1), !1);
|
|
3645
3628
|
}
|
|
3646
3629
|
}
|
|
3647
|
-
},
|
|
3630
|
+
}, vs(e, {
|
|
3648
3631
|
pluginName: "scroll",
|
|
3649
3632
|
initializeByDefault: !0
|
|
3650
3633
|
});
|
|
3651
3634
|
}
|
|
3652
|
-
function
|
|
3635
|
+
function gl() {
|
|
3653
3636
|
$.forEach(function(e) {
|
|
3654
3637
|
clearInterval(e.pid);
|
|
3655
3638
|
}), $ = [];
|
|
3656
3639
|
}
|
|
3657
|
-
function
|
|
3658
|
-
clearInterval(
|
|
3640
|
+
function _l() {
|
|
3641
|
+
clearInterval(ml);
|
|
3659
3642
|
}
|
|
3660
|
-
var
|
|
3643
|
+
var vl = Js(function(e, t, n, r) {
|
|
3661
3644
|
if (t.scroll) {
|
|
3662
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3663
|
-
|
|
3664
|
-
var d = 0, f =
|
|
3645
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Ls(), l = !1, u;
|
|
3646
|
+
ll !== n && (ll = n, gl(), cl = t.scroll, u = t.scrollFn, cl === !0 && (cl = Ws(n, !0)));
|
|
3647
|
+
var d = 0, f = cl;
|
|
3665
3648
|
do {
|
|
3666
3649
|
var p = f, m = G(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 = W(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
3667
3650
|
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"));
|
|
3668
3651
|
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);
|
|
3669
3652
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3670
3653
|
($[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() {
|
|
3671
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3654
|
+
r && this.layer === 0 && Q.active._onTouchMove(pl);
|
|
3672
3655
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3673
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3656
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[$s], n, t, e, pl, $[this.layer].el) !== "continue" || Xs($[this.layer].el, n, t);
|
|
3674
3657
|
}.bind({ layer: d }), 24))), d++;
|
|
3675
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3676
|
-
|
|
3658
|
+
} while (t.bubbleScroll && f !== c && (f = Ws(f, !1)));
|
|
3659
|
+
ul = l;
|
|
3677
3660
|
}
|
|
3678
|
-
}, 30),
|
|
3661
|
+
}, 30), yl = function(e) {
|
|
3679
3662
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3680
3663
|
if (t) {
|
|
3681
3664
|
var c = n || i;
|
|
@@ -3687,8 +3670,8 @@ var Cl = $s(function(e, t, n, r) {
|
|
|
3687
3670
|
}));
|
|
3688
3671
|
}
|
|
3689
3672
|
};
|
|
3690
|
-
function
|
|
3691
|
-
|
|
3673
|
+
function bl() {}
|
|
3674
|
+
bl.prototype = {
|
|
3692
3675
|
startIndex: null,
|
|
3693
3676
|
dragStart: function(e) {
|
|
3694
3677
|
var t = e.oldDraggableIndex;
|
|
@@ -3697,67 +3680,67 @@ Tl.prototype = {
|
|
|
3697
3680
|
onSpill: function(e) {
|
|
3698
3681
|
var t = e.dragEl, n = e.putSortable;
|
|
3699
3682
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3700
|
-
var r =
|
|
3683
|
+
var r = zs(this.sortable.el, this.startIndex, this.options);
|
|
3701
3684
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3702
3685
|
},
|
|
3703
|
-
drop:
|
|
3704
|
-
},
|
|
3705
|
-
function
|
|
3706
|
-
|
|
3686
|
+
drop: yl
|
|
3687
|
+
}, vs(bl, { pluginName: "revertOnSpill" });
|
|
3688
|
+
function xl() {}
|
|
3689
|
+
xl.prototype = {
|
|
3707
3690
|
onSpill: function(e) {
|
|
3708
3691
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3709
3692
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3710
3693
|
},
|
|
3711
|
-
drop:
|
|
3712
|
-
},
|
|
3713
|
-
function
|
|
3694
|
+
drop: yl
|
|
3695
|
+
}, vs(xl, { pluginName: "removeOnSpill" }), Q.mount(new hl()), Q.mount(xl, bl);
|
|
3696
|
+
function Sl(e) {
|
|
3714
3697
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3715
3698
|
}
|
|
3716
|
-
function
|
|
3699
|
+
function Cl(e) {
|
|
3717
3700
|
O() && ne(e);
|
|
3718
3701
|
}
|
|
3719
|
-
function
|
|
3702
|
+
function wl(e) {
|
|
3720
3703
|
O() ? s(e) : _(e);
|
|
3721
3704
|
}
|
|
3722
|
-
var
|
|
3723
|
-
function
|
|
3724
|
-
|
|
3705
|
+
var Tl = null, El = null;
|
|
3706
|
+
function Dl(e = null, t = null) {
|
|
3707
|
+
Tl = e, El = t;
|
|
3725
3708
|
}
|
|
3726
|
-
function
|
|
3709
|
+
function Ol() {
|
|
3727
3710
|
return {
|
|
3728
|
-
data:
|
|
3729
|
-
clonedData:
|
|
3711
|
+
data: Tl,
|
|
3712
|
+
clonedData: El
|
|
3730
3713
|
};
|
|
3731
3714
|
}
|
|
3732
|
-
var
|
|
3733
|
-
function
|
|
3715
|
+
var kl = Symbol("cloneElement");
|
|
3716
|
+
function Al(...e) {
|
|
3734
3717
|
let t = O()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3735
3718
|
Array.isArray(A(i)) || (a = i, i = null);
|
|
3736
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3719
|
+
let o = null, { immediate: s = !0, clone: l = Sl, forceFallback: u, fallbackOnBody: d, customUpdate: f } = A(a) ?? {};
|
|
3737
3720
|
function p(e) {
|
|
3738
3721
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3739
3722
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3740
3723
|
let s = A(A(i)?.[r]), c = l(s);
|
|
3741
|
-
|
|
3724
|
+
Dl(s, c), a[kl] = c;
|
|
3742
3725
|
}
|
|
3743
3726
|
function m(e) {
|
|
3744
|
-
let t = e.item[
|
|
3745
|
-
if (!
|
|
3746
|
-
if (
|
|
3727
|
+
let t = e.item[kl];
|
|
3728
|
+
if (!rs(t)) {
|
|
3729
|
+
if (os(e.item), w(i)) {
|
|
3747
3730
|
let n = [...A(i)];
|
|
3748
|
-
i.value =
|
|
3731
|
+
i.value = ns(n, e.newDraggableIndex, t);
|
|
3749
3732
|
return;
|
|
3750
3733
|
}
|
|
3751
|
-
|
|
3734
|
+
ns(A(i), e.newDraggableIndex, t);
|
|
3752
3735
|
}
|
|
3753
3736
|
}
|
|
3754
3737
|
function h(e) {
|
|
3755
3738
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3756
|
-
if (
|
|
3739
|
+
if (as(t, n, r), o === "clone") os(s);
|
|
3757
3740
|
else if (w(i)) {
|
|
3758
3741
|
let e = [...A(i)];
|
|
3759
|
-
i.value =
|
|
3760
|
-
} else
|
|
3742
|
+
i.value = ts(e, a);
|
|
3743
|
+
} else ts(A(i), a);
|
|
3761
3744
|
}
|
|
3762
3745
|
function g(e) {
|
|
3763
3746
|
if (f) {
|
|
@@ -3765,10 +3748,10 @@ function Fl(...e) {
|
|
|
3765
3748
|
return;
|
|
3766
3749
|
}
|
|
3767
3750
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3768
|
-
if (
|
|
3751
|
+
if (os(n), as(t, n, r), w(i)) {
|
|
3769
3752
|
let e = [...A(i)];
|
|
3770
|
-
i.value =
|
|
3771
|
-
} else
|
|
3753
|
+
i.value = Qo(e, a, o);
|
|
3754
|
+
} else Qo(A(i), a, o);
|
|
3772
3755
|
}
|
|
3773
3756
|
function v(e) {
|
|
3774
3757
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3787,7 +3770,7 @@ function Fl(...e) {
|
|
|
3787
3770
|
n = null;
|
|
3788
3771
|
}
|
|
3789
3772
|
_(() => {
|
|
3790
|
-
if (
|
|
3773
|
+
if (Dl(), o) throw o;
|
|
3791
3774
|
});
|
|
3792
3775
|
}
|
|
3793
3776
|
let y = {
|
|
@@ -3799,19 +3782,19 @@ function Fl(...e) {
|
|
|
3799
3782
|
};
|
|
3800
3783
|
function b(e) {
|
|
3801
3784
|
let n = A(r);
|
|
3802
|
-
return e ||=
|
|
3785
|
+
return e ||= is(n) ? ss(n, t?.$el) : n, e && !us(e) && (e = e.$el), e || Zo("Root element not found"), e;
|
|
3803
3786
|
}
|
|
3804
3787
|
function x() {
|
|
3805
|
-
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3806
|
-
return
|
|
3807
|
-
|
|
3808
|
-
}),
|
|
3788
|
+
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r = Jo(e, ["immediate", "clone"]);
|
|
3789
|
+
return ds(r, (e, t) => {
|
|
3790
|
+
fs(e) && (r[e] = (e, ...n) => (ps(e, Ol()), t(e, ...n)));
|
|
3791
|
+
}), ls(i === null ? {} : y, r);
|
|
3809
3792
|
}
|
|
3810
3793
|
let S = (e) => {
|
|
3811
3794
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3812
3795
|
};
|
|
3813
3796
|
c(() => a, () => {
|
|
3814
|
-
o &&
|
|
3797
|
+
o && ds(x(), (e, t) => {
|
|
3815
3798
|
o?.option(e, t);
|
|
3816
3799
|
});
|
|
3817
3800
|
}, { deep: !0 });
|
|
@@ -3824,15 +3807,15 @@ function Fl(...e) {
|
|
|
3824
3807
|
toArray: () => o?.toArray(),
|
|
3825
3808
|
closest: (...e) => o?.closest(...e)
|
|
3826
3809
|
};
|
|
3827
|
-
return
|
|
3810
|
+
return wl(() => {
|
|
3828
3811
|
s && S();
|
|
3829
|
-
}),
|
|
3812
|
+
}), Cl(C.destroy), qo({
|
|
3830
3813
|
start: S,
|
|
3831
3814
|
pause: () => C?.option("disabled", !0),
|
|
3832
3815
|
resume: () => C?.option("disabled", !1)
|
|
3833
3816
|
}, C);
|
|
3834
3817
|
}
|
|
3835
|
-
var
|
|
3818
|
+
var jl = [
|
|
3836
3819
|
"update",
|
|
3837
3820
|
"start",
|
|
3838
3821
|
"add",
|
|
@@ -3845,7 +3828,7 @@ var Il = [
|
|
|
3845
3828
|
"clone",
|
|
3846
3829
|
"move",
|
|
3847
3830
|
"change"
|
|
3848
|
-
],
|
|
3831
|
+
], Ml = [
|
|
3849
3832
|
"clone",
|
|
3850
3833
|
"animation",
|
|
3851
3834
|
"ghostClass",
|
|
@@ -3889,46 +3872,46 @@ var Il = [
|
|
|
3889
3872
|
"tag",
|
|
3890
3873
|
"target",
|
|
3891
3874
|
"customUpdate",
|
|
3892
|
-
...
|
|
3893
|
-
],
|
|
3875
|
+
...jl.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3876
|
+
], Nl = B({
|
|
3894
3877
|
name: "VueDraggable",
|
|
3895
3878
|
model: {
|
|
3896
3879
|
prop: "modelValue",
|
|
3897
3880
|
event: "update:modelValue"
|
|
3898
3881
|
},
|
|
3899
|
-
props:
|
|
3900
|
-
emits: ["update:modelValue", ...
|
|
3882
|
+
props: Ml,
|
|
3883
|
+
emits: ["update:modelValue", ...jl],
|
|
3901
3884
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3902
|
-
let a =
|
|
3885
|
+
let a = jl.reduce((e, t) => {
|
|
3903
3886
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3904
3887
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3905
3888
|
}, {}), o = k(() => {
|
|
3906
|
-
let t = D(e), { modelValue: n } = t, r =
|
|
3889
|
+
let t = D(e), { modelValue: n } = t, r = Jo(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3907
3890
|
let r = A(n);
|
|
3908
3891
|
return r !== void 0 && (e[t] = r), e;
|
|
3909
3892
|
}, {});
|
|
3910
|
-
return
|
|
3893
|
+
return qo(qo({}, a), es(qo(qo({}, i), o)));
|
|
3911
3894
|
}), s = k({
|
|
3912
3895
|
get: () => e.modelValue,
|
|
3913
3896
|
set: (e) => n("update:modelValue", e)
|
|
3914
|
-
}), c = M(), l = b(
|
|
3897
|
+
}), c = M(), l = b(Al(e.target || c, s, o));
|
|
3915
3898
|
return r(l), () => x(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3916
3899
|
}
|
|
3917
|
-
}),
|
|
3900
|
+
}), Pl = {
|
|
3918
3901
|
mounted: "mounted",
|
|
3919
3902
|
unmounted: "unmounted"
|
|
3920
3903
|
};
|
|
3921
|
-
|
|
3904
|
+
Pl.mounted, Pl.unmounted;
|
|
3922
3905
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3923
|
-
var
|
|
3906
|
+
var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
3924
3907
|
key: 0,
|
|
3925
3908
|
"data-testid": "hero-image-hint",
|
|
3926
3909
|
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)]"
|
|
3927
|
-
},
|
|
3910
|
+
}, Ll = {
|
|
3928
3911
|
key: 0,
|
|
3929
3912
|
"data-testid": "section-drop-hint",
|
|
3930
3913
|
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)]"
|
|
3931
|
-
},
|
|
3914
|
+
}, Rl = /* @__PURE__ */ B({
|
|
3932
3915
|
__name: "SectionBlock",
|
|
3933
3916
|
props: {
|
|
3934
3917
|
block: {},
|
|
@@ -3937,21 +3920,21 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
3937
3920
|
},
|
|
3938
3921
|
setup(e) {
|
|
3939
3922
|
let t = {
|
|
3940
|
-
title:
|
|
3941
|
-
paragraph:
|
|
3942
|
-
image:
|
|
3943
|
-
button:
|
|
3944
|
-
divider:
|
|
3945
|
-
custom:
|
|
3946
|
-
}, n = e, { t: r } =
|
|
3947
|
-
g(
|
|
3948
|
-
let u = z(
|
|
3923
|
+
title: Po,
|
|
3924
|
+
paragraph: Xa,
|
|
3925
|
+
image: Ua,
|
|
3926
|
+
button: da,
|
|
3927
|
+
divider: Ta,
|
|
3928
|
+
custom: Ca
|
|
3929
|
+
}, n = e, { t: r } = rt(), i = qe(Me, "SectionBlock"), { displayBlock: o } = ur(i), s = k(() => n.sourceBlock ?? n.block), c = z(Ne, k(() => /* @__PURE__ */ new Set()));
|
|
3930
|
+
g(Ne, k(() => /* @__PURE__ */ new Set([...c.value, ...Object.entries(s.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
3931
|
+
let u = z(Qe, null), f = z(Ke, null), _ = z(Re, {}), b = z(_e, null), x = z(Xe, null);
|
|
3949
3932
|
function w(e) {
|
|
3950
3933
|
if (b?.value) return;
|
|
3951
3934
|
let t = _.savedBlocks;
|
|
3952
3935
|
t?.isPicking.value ? t.togglePick(n.block.id) : i.selectBlock(e);
|
|
3953
3936
|
}
|
|
3954
|
-
let T = k(() =>
|
|
3937
|
+
let T = k(() => xn(n.block).map((e) => `${e}%`)), ee = k(() => {
|
|
3955
3938
|
let e = T.value.length, t = [...(i.state.previewMode ? n.block : s.value).children];
|
|
3956
3939
|
for (; t.length < e;) t.push([]);
|
|
3957
3940
|
return t.slice(0, e);
|
|
@@ -3971,7 +3954,7 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
3971
3954
|
}
|
|
3972
3955
|
let F = k(() => {
|
|
3973
3956
|
if (i.state.previewMode) return !1;
|
|
3974
|
-
let e =
|
|
3957
|
+
let e = Et(n.block);
|
|
3975
3958
|
return e !== null && !e.applied && e.reason === "image";
|
|
3976
3959
|
});
|
|
3977
3960
|
function I(e) {
|
|
@@ -3981,10 +3964,10 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
3981
3964
|
return O(e).length === 0 && i.state.previewMode;
|
|
3982
3965
|
}
|
|
3983
3966
|
function oe(e, t) {
|
|
3984
|
-
b?.value ||
|
|
3967
|
+
b?.value || Za(i, t, n.block.id, e);
|
|
3985
3968
|
}
|
|
3986
3969
|
function B(e) {
|
|
3987
|
-
return
|
|
3970
|
+
return Gi(e, f, t);
|
|
3988
3971
|
}
|
|
3989
3972
|
function se(e, t) {
|
|
3990
3973
|
b?.value || e.type !== "custom" || i.updateBlock(e.id, {
|
|
@@ -3992,17 +3975,17 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
3992
3975
|
dataSourceFetched: t.dataSourceFetched
|
|
3993
3976
|
});
|
|
3994
3977
|
}
|
|
3995
|
-
return (t, s) => (m(), N("div",
|
|
3978
|
+
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", {
|
|
3996
3979
|
key: c,
|
|
3997
3980
|
class: h(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", I(c) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3998
3981
|
style: y({ width: D.value ? "100%" : T.value[c] })
|
|
3999
|
-
}, [E(A(
|
|
3982
|
+
}, [E(A(Nl), {
|
|
4000
3983
|
disabled: A(b) ?? !1,
|
|
4001
3984
|
"model-value": O(c),
|
|
4002
3985
|
group: {
|
|
4003
3986
|
name: "blocks",
|
|
4004
3987
|
pull: !0,
|
|
4005
|
-
put: (e, t, n) => A(
|
|
3988
|
+
put: (e, t, n) => A(Vo)(n)
|
|
4006
3989
|
},
|
|
4007
3990
|
animation: 150,
|
|
4008
3991
|
"ghost-class": "tpl-ghost",
|
|
@@ -4016,12 +3999,12 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4016
3999
|
"tpl:min-h-[60px]": ie(c),
|
|
4017
4000
|
"tpl:min-h-[34px]": ae(c)
|
|
4018
4001
|
}]),
|
|
4019
|
-
onUpdate: (e) => !A(b) && A(
|
|
4002
|
+
onUpdate: (e) => !A(b) && A(Za)(A(i), O(c), n.block.id, c, e),
|
|
4020
4003
|
onStart: (e) => re.value = c,
|
|
4021
4004
|
onEnd: s[0] ||= (e) => re.value = null,
|
|
4022
4005
|
"onUpdate:modelValue": (e) => oe(c, e)
|
|
4023
4006
|
}, {
|
|
4024
|
-
default: S(() => [(m(!0), N(L, null, v(O(c), (t) => C((m(), N("div", { key: t.id }, [E(
|
|
4007
|
+
default: S(() => [(m(!0), N(L, null, v(O(c), (t) => C((m(), N("div", { key: t.id }, [E(Mo, {
|
|
4025
4008
|
block: t,
|
|
4026
4009
|
"display-block": A(o)(t),
|
|
4027
4010
|
"is-selected": A(i).state.selectedBlockId === t.id,
|
|
@@ -4058,20 +4041,20 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4058
4041
|
"onUpdate",
|
|
4059
4042
|
"onStart",
|
|
4060
4043
|
"onUpdate:modelValue"
|
|
4061
|
-
]), I(c) ? (m(), N("div",
|
|
4044
|
+
]), I(c) ? (m(), N("div", Ll, [P("span", null, d(A(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))], 2)]));
|
|
4062
4045
|
}
|
|
4063
|
-
}),
|
|
4046
|
+
}), zl = [
|
|
4064
4047
|
"src",
|
|
4065
4048
|
"alt",
|
|
4066
4049
|
"width"
|
|
4067
|
-
],
|
|
4050
|
+
], Bl = ["aria-label"], Vl = /* @__PURE__ */ B({
|
|
4068
4051
|
__name: "SocialCustomIconImage",
|
|
4069
4052
|
props: {
|
|
4070
4053
|
icon: {},
|
|
4071
4054
|
iconSize: {}
|
|
4072
4055
|
},
|
|
4073
4056
|
setup(e) {
|
|
4074
|
-
let t = e, { t: n } =
|
|
4057
|
+
let t = e, { t: n } = rt(), { syntax: r } = dt(), i = k(() => Zn[t.iconSize]), a = k(() => Math.round(i.value / 2)), o = k(() => typeof t.icon.imageUrl == "string" ? t.icon.imageUrl : ""), s = k(() => Mt(o.value, r)), c = Hn(() => s.value || o.value.trim() === "" ? void 0 : o.value);
|
|
4075
4058
|
return (t, r) => A(c) ? (m(), N("img", {
|
|
4076
4059
|
key: 0,
|
|
4077
4060
|
src: A(c),
|
|
@@ -4081,7 +4064,7 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4081
4064
|
display: "block",
|
|
4082
4065
|
height: "auto"
|
|
4083
4066
|
}
|
|
4084
|
-
}, null, 8,
|
|
4067
|
+
}, null, 8, zl)) : (m(), N("div", {
|
|
4085
4068
|
key: 1,
|
|
4086
4069
|
role: "img",
|
|
4087
4070
|
"aria-label": A(n).social.customIconMissing,
|
|
@@ -4094,14 +4077,14 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4094
4077
|
size: a.value,
|
|
4095
4078
|
"stroke-width": 1.5,
|
|
4096
4079
|
"aria-hidden": "true"
|
|
4097
|
-
}, null, 8, ["size"])], 12,
|
|
4080
|
+
}, null, 8, ["size"])], 12, Bl));
|
|
4098
4081
|
}
|
|
4099
|
-
}),
|
|
4082
|
+
}), Hl = ["width", "height"], Ul = [
|
|
4100
4083
|
"d",
|
|
4101
4084
|
"stroke",
|
|
4102
4085
|
"stroke-opacity",
|
|
4103
4086
|
"stroke-width"
|
|
4104
|
-
],
|
|
4087
|
+
], Wl = ["d", "fill"], Gl = /* @__PURE__ */ B({
|
|
4105
4088
|
__name: "SocialIconSvg",
|
|
4106
4089
|
props: {
|
|
4107
4090
|
platform: {},
|
|
@@ -4110,7 +4093,7 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4110
4093
|
iconSize: {}
|
|
4111
4094
|
},
|
|
4112
4095
|
setup(e) {
|
|
4113
|
-
let t = e, n = k(() =>
|
|
4096
|
+
let t = e, n = k(() => Yn[t.platform]), r = k(() => Zn[t.iconSize]), i = k(() => cn(t.platform, t.iconTone)), a = k(() => vn(t.iconStyle, t.iconTone)), o = k(() => {
|
|
4114
4097
|
let e = {
|
|
4115
4098
|
display: "inline-flex",
|
|
4116
4099
|
alignItems: "center",
|
|
@@ -4148,7 +4131,7 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4148
4131
|
};
|
|
4149
4132
|
default: return e;
|
|
4150
4133
|
}
|
|
4151
|
-
}), s = k(() =>
|
|
4134
|
+
}), s = k(() => qt(t.iconStyle)), c = k(() => Math.floor(r.value * s.value));
|
|
4152
4135
|
function l(e) {
|
|
4153
4136
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
4154
4137
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -4169,22 +4152,22 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4169
4152
|
"stroke-opacity": a.value.opacity,
|
|
4170
4153
|
"stroke-width": a.value.width / s.value,
|
|
4171
4154
|
"stroke-linejoin": "round"
|
|
4172
|
-
}, null, 8,
|
|
4155
|
+
}, null, 8, Ul)) : j("", !0), P("path", {
|
|
4173
4156
|
d: n.value.path,
|
|
4174
4157
|
fill: u.value
|
|
4175
|
-
}, null, 8,
|
|
4158
|
+
}, null, 8, Wl)], 8, Hl))], 4));
|
|
4176
4159
|
}
|
|
4177
|
-
}),
|
|
4160
|
+
}), Kl = { class: "tpl:w-full" }, ql = ["href"], Jl = {
|
|
4178
4161
|
key: 1,
|
|
4179
4162
|
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)]"
|
|
4180
|
-
},
|
|
4163
|
+
}, Yl = /* @__PURE__ */ B({
|
|
4181
4164
|
__name: "SocialIconsBlock",
|
|
4182
4165
|
props: {
|
|
4183
4166
|
block: {},
|
|
4184
4167
|
viewport: {}
|
|
4185
4168
|
},
|
|
4186
4169
|
setup(e) {
|
|
4187
|
-
let t = e, { t: n } =
|
|
4170
|
+
let t = e, { t: n } = rt(), r = k(() => ({
|
|
4188
4171
|
display: "flex",
|
|
4189
4172
|
flexWrap: "wrap",
|
|
4190
4173
|
gap: `${t.block.spacing}px`,
|
|
@@ -4193,7 +4176,7 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4193
4176
|
function o(e) {
|
|
4194
4177
|
return e.platform === "custom";
|
|
4195
4178
|
}
|
|
4196
|
-
return (t, s) => (m(), N("div",
|
|
4179
|
+
return (t, s) => (m(), N("div", Kl, [a.value ? (m(), N("div", {
|
|
4197
4180
|
key: 0,
|
|
4198
4181
|
style: y(r.value)
|
|
4199
4182
|
}, [(m(!0), N(L, null, v(e.block.icons, (t) => (m(), N("a", {
|
|
@@ -4201,11 +4184,11 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4201
4184
|
href: t.url || "#",
|
|
4202
4185
|
class: "tpl:cursor-default",
|
|
4203
4186
|
onClick: s[0] ||= i(() => {}, ["prevent"])
|
|
4204
|
-
}, [o(t) ? (m(), R(
|
|
4187
|
+
}, [o(t) ? (m(), R(Vl, {
|
|
4205
4188
|
key: 0,
|
|
4206
4189
|
icon: t,
|
|
4207
4190
|
"icon-size": e.block.iconSize
|
|
4208
|
-
}, null, 8, ["icon", "icon-size"])) : (m(), R(
|
|
4191
|
+
}, null, 8, ["icon", "icon-size"])) : (m(), R(Gl, {
|
|
4209
4192
|
key: 1,
|
|
4210
4193
|
platform: t.platform,
|
|
4211
4194
|
"icon-style": e.block.iconStyle,
|
|
@@ -4216,46 +4199,46 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4216
4199
|
"icon-style",
|
|
4217
4200
|
"icon-tone",
|
|
4218
4201
|
"icon-size"
|
|
4219
|
-
]))], 8,
|
|
4202
|
+
]))], 8, ql))), 128))], 4)) : (m(), N("div", Jl, [E(A(Bn), { size: 16 }), P("span", null, d(A(n).social.addIcons), 1)]))]));
|
|
4220
4203
|
}
|
|
4221
|
-
}),
|
|
4204
|
+
}), Xl = { class: "tpl:w-full" }, Zl = {
|
|
4222
4205
|
key: 0,
|
|
4223
4206
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4224
4207
|
style: {
|
|
4225
4208
|
"background-color": "var(--tpl-bg-hover)",
|
|
4226
4209
|
color: "var(--tpl-text-dim)"
|
|
4227
4210
|
}
|
|
4228
|
-
},
|
|
4211
|
+
}, Ql = /* @__PURE__ */ B({
|
|
4229
4212
|
__name: "SpacerBlock",
|
|
4230
4213
|
props: {
|
|
4231
4214
|
block: {},
|
|
4232
4215
|
viewport: {}
|
|
4233
4216
|
},
|
|
4234
4217
|
setup(e) {
|
|
4235
|
-
let t = e, n =
|
|
4218
|
+
let t = e, n = qe(Me, "SpacerBlock"), r = k(() => ({
|
|
4236
4219
|
height: `${t.block.height}px`,
|
|
4237
4220
|
minHeight: `${t.block.height}px`,
|
|
4238
4221
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4239
4222
|
}));
|
|
4240
|
-
return (t, i) => (m(), N("div",
|
|
4223
|
+
return (t, i) => (m(), N("div", Xl, [P("div", {
|
|
4241
4224
|
style: y(r.value),
|
|
4242
4225
|
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 }])
|
|
4243
|
-
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span",
|
|
4226
|
+
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span", Zl, d(e.block.height) + "px ", 1))], 6)]));
|
|
4244
4227
|
}
|
|
4245
|
-
}),
|
|
4228
|
+
}), $l = { class: "tpl:w-full" }, eu = { key: 0 }, tu = [
|
|
4246
4229
|
"aria-label",
|
|
4247
4230
|
"contenteditable",
|
|
4248
4231
|
"data-placeholder",
|
|
4249
4232
|
"onBlur"
|
|
4250
|
-
],
|
|
4233
|
+
], nu = [
|
|
4251
4234
|
"aria-label",
|
|
4252
4235
|
"contenteditable",
|
|
4253
4236
|
"data-placeholder",
|
|
4254
4237
|
"onBlur"
|
|
4255
|
-
],
|
|
4238
|
+
], ru = {
|
|
4256
4239
|
key: 1,
|
|
4257
4240
|
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)]"
|
|
4258
|
-
},
|
|
4241
|
+
}, iu = /*#__PURE__*/ Or(/* @__PURE__ */ B({
|
|
4259
4242
|
__name: "TableBlock",
|
|
4260
4243
|
props: {
|
|
4261
4244
|
block: {},
|
|
@@ -4269,7 +4252,7 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4269
4252
|
updated(e, t) {
|
|
4270
4253
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4271
4254
|
}
|
|
4272
|
-
}, n = e, { t: r } =
|
|
4255
|
+
}, n = e, { t: r } = rt(), a = qe(Me, "TableBlock"), s = qe(lt, "TableBlock"), c = z(_e, null), l = k(() => n.block.rows.length > 0), u = k(() => {
|
|
4273
4256
|
let e = {
|
|
4274
4257
|
width: "100%",
|
|
4275
4258
|
borderCollapse: "collapse",
|
|
@@ -4301,11 +4284,11 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4301
4284
|
} : n);
|
|
4302
4285
|
a.updateBlock(n.block.id, { rows: o });
|
|
4303
4286
|
}
|
|
4304
|
-
return (e, n) => (m(), N("div",
|
|
4287
|
+
return (e, n) => (m(), N("div", $l, [l.value ? (m(), N("table", {
|
|
4305
4288
|
key: 0,
|
|
4306
4289
|
style: y(u.value),
|
|
4307
4290
|
class: "tpl-table-editable"
|
|
4308
|
-
}, [h.value ? (m(), N("thead",
|
|
4291
|
+
}, [h.value ? (m(), N("thead", eu, [P("tr", null, [(m(!0), N(L, null, v(h.value.cells, (e) => C((m(), N("th", {
|
|
4309
4292
|
key: e.id,
|
|
4310
4293
|
style: y(p.value),
|
|
4311
4294
|
"aria-label": A(r).table.cellPlaceholder,
|
|
@@ -4314,7 +4297,7 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4314
4297
|
onBlur: (t) => b(h.value.id, e.id, t),
|
|
4315
4298
|
onKeydown: n[0] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4316
4299
|
onClick: i(_, ["stop"])
|
|
4317
|
-
}, null, 44,
|
|
4300
|
+
}, null, 44, tu)), [[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", {
|
|
4318
4301
|
key: a.id,
|
|
4319
4302
|
style: y(f.value),
|
|
4320
4303
|
"aria-label": A(r).table.cellPlaceholder,
|
|
@@ -4323,9 +4306,9 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4323
4306
|
onBlur: (t) => b(e.id, a.id, t),
|
|
4324
4307
|
onKeydown: n[1] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4325
4308
|
onClick: i(_, ["stop"])
|
|
4326
|
-
}, null, 44,
|
|
4309
|
+
}, null, 44, nu)), [[t, a.content]])), 128))]))), 128))])], 4)) : (m(), N("div", ru, [E(A(In), { size: 16 }), P("span", null, d(A(r).table.empty), 1)]))]));
|
|
4327
4310
|
}
|
|
4328
|
-
}), [["__scopeId", "data-v-73b9f5e5"]]),
|
|
4311
|
+
}), [["__scopeId", "data-v-73b9f5e5"]]), au = /* @__PURE__ */ B({
|
|
4329
4312
|
__name: "VideoPlayButton",
|
|
4330
4313
|
props: { hoverEffect: {
|
|
4331
4314
|
type: Boolean,
|
|
@@ -4342,7 +4325,7 @@ var Bl = { class: "tpl:relative tpl:w-full" }, Vl = {
|
|
|
4342
4325
|
}
|
|
4343
4326
|
});
|
|
4344
4327
|
// src/utils/videoThumbnail.ts
|
|
4345
|
-
function
|
|
4328
|
+
function ou(e) {
|
|
4346
4329
|
if (!e) return {
|
|
4347
4330
|
platform: "unknown",
|
|
4348
4331
|
videoId: null,
|
|
@@ -4374,24 +4357,24 @@ function du(e) {
|
|
|
4374
4357
|
thumbnailUrl: null
|
|
4375
4358
|
};
|
|
4376
4359
|
}
|
|
4377
|
-
function
|
|
4378
|
-
return t ||
|
|
4360
|
+
function su(e, t) {
|
|
4361
|
+
return t || ou(e).thumbnailUrl;
|
|
4379
4362
|
}
|
|
4380
4363
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4381
|
-
var
|
|
4364
|
+
var cu = ["src", "alt"], lu = {
|
|
4382
4365
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4383
4366
|
style: { opacity: "0.7" }
|
|
4384
|
-
},
|
|
4367
|
+
}, uu = ["href"], du = ["src", "alt"], fu = ["src", "alt"], pu = {
|
|
4385
4368
|
key: 3,
|
|
4386
4369
|
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)]"
|
|
4387
|
-
},
|
|
4370
|
+
}, mu = /* @__PURE__ */ B({
|
|
4388
4371
|
__name: "VideoBlock",
|
|
4389
4372
|
props: {
|
|
4390
4373
|
block: {},
|
|
4391
4374
|
viewport: {}
|
|
4392
4375
|
},
|
|
4393
4376
|
setup(e) {
|
|
4394
|
-
let t = e, { t: n } =
|
|
4377
|
+
let t = e, { t: n } = rt(), { syntax: r } = dt(), a = k(() => Mt(t.block.url, r) || Mt(t.block.thumbnailUrl, r)), o = Hn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = Hn(() => a.value ? t.block.placeholderUrl : void 0), c = k(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : su(t.block.url)), l = k(() => ({ textAlign: t.block.align })), u = k(() => {
|
|
4395
4378
|
let e = t.block.align;
|
|
4396
4379
|
return {
|
|
4397
4380
|
maxWidth: "100%",
|
|
@@ -4401,7 +4384,7 @@ var pu = ["src", "alt"], mu = {
|
|
|
4401
4384
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4402
4385
|
marginRight: e === "center" ? "auto" : void 0
|
|
4403
4386
|
};
|
|
4404
|
-
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() =>
|
|
4387
|
+
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() => Mt(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4405
4388
|
return (t, r) => (m(), N("div", {
|
|
4406
4389
|
class: "tpl:w-full",
|
|
4407
4390
|
style: y(l.value)
|
|
@@ -4414,7 +4397,7 @@ var pu = ["src", "alt"], mu = {
|
|
|
4414
4397
|
src: A(s),
|
|
4415
4398
|
alt: e.block.alt,
|
|
4416
4399
|
style: y(f.value)
|
|
4417
|
-
}, null, 12,
|
|
4400
|
+
}, null, 12, cu), E(au)], 4)) : a.value ? (m(), N("div", {
|
|
4418
4401
|
key: 1,
|
|
4419
4402
|
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)]",
|
|
4420
4403
|
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
@@ -4423,7 +4406,7 @@ var pu = ["src", "alt"], mu = {
|
|
|
4423
4406
|
"stroke-width": 1.5,
|
|
4424
4407
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4425
4408
|
style: { opacity: "0.5" }
|
|
4426
|
-
}), P("span",
|
|
4409
|
+
}), P("span", lu, [E(la, { text: p.value }, null, 8, ["text"])])], 4)) : c.value ? (m(), N(L, { key: 2 }, [e.block.url ? (m(), N("a", {
|
|
4427
4410
|
key: 0,
|
|
4428
4411
|
href: e.block.url,
|
|
4429
4412
|
target: "_blank",
|
|
@@ -4436,7 +4419,7 @@ var pu = ["src", "alt"], mu = {
|
|
|
4436
4419
|
src: c.value,
|
|
4437
4420
|
alt: e.block.alt,
|
|
4438
4421
|
style: y(f.value)
|
|
4439
|
-
}, null, 12,
|
|
4422
|
+
}, null, 12, du), E(au, { "hover-effect": "" })], 12, uu)) : (m(), N("div", {
|
|
4440
4423
|
key: 1,
|
|
4441
4424
|
class: "tpl:relative tpl:inline-block",
|
|
4442
4425
|
style: y(u.value)
|
|
@@ -4445,29 +4428,29 @@ var pu = ["src", "alt"], mu = {
|
|
|
4445
4428
|
src: c.value,
|
|
4446
4429
|
alt: e.block.alt,
|
|
4447
4430
|
style: y(f.value)
|
|
4448
|
-
}, null, 12,
|
|
4431
|
+
}, null, 12, fu), E(au)], 4))], 64)) : (m(), N("div", pu, [E(A(zr), {
|
|
4449
4432
|
size: 40,
|
|
4450
4433
|
"stroke-width": 1.5,
|
|
4451
4434
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4452
4435
|
}), P("span", null, d(A(n).video.addVideo), 1)]))], 4));
|
|
4453
4436
|
}
|
|
4454
|
-
}),
|
|
4455
|
-
section:
|
|
4456
|
-
title:
|
|
4457
|
-
paragraph:
|
|
4458
|
-
image:
|
|
4459
|
-
button:
|
|
4460
|
-
divider:
|
|
4461
|
-
video:
|
|
4462
|
-
social:
|
|
4463
|
-
menu:
|
|
4464
|
-
table:
|
|
4465
|
-
spacer:
|
|
4466
|
-
html:
|
|
4467
|
-
countdown: oe(() => import("./CountdownBlock-
|
|
4437
|
+
}), hu = {
|
|
4438
|
+
section: Rl,
|
|
4439
|
+
title: Po,
|
|
4440
|
+
paragraph: Xa,
|
|
4441
|
+
image: Ua,
|
|
4442
|
+
button: da,
|
|
4443
|
+
divider: Ta,
|
|
4444
|
+
video: mu,
|
|
4445
|
+
social: Yl,
|
|
4446
|
+
menu: qa,
|
|
4447
|
+
table: iu,
|
|
4448
|
+
spacer: Ql,
|
|
4449
|
+
html: ja,
|
|
4450
|
+
countdown: oe(() => import("./CountdownBlock-bFAELCB6.js"))
|
|
4468
4451
|
};
|
|
4469
|
-
function
|
|
4470
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } =
|
|
4452
|
+
function gu(t) {
|
|
4453
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = rt(i), l = k(() => ln(ln(ln(Ti(i), Bi(n.content.value.settings?.locale)), Ot(n.content.value.settings) === "rtl" ? {
|
|
4471
4454
|
title: { textAlign: "right" },
|
|
4472
4455
|
table: { textAlign: "right" }
|
|
4473
4456
|
} : {}), r.blockDefaults ?? {}));
|
|
@@ -4475,23 +4458,20 @@ function xu(t) {
|
|
|
4475
4458
|
let { resolvedTheme: u } = gi(k(() => n.state.uiTheme)), d = M(r.theme ?? {}), { themeStyles: f } = Yr({
|
|
4476
4459
|
themeOverrides: d,
|
|
4477
4460
|
resolvedTheme: u,
|
|
4478
|
-
extraStyles: () => ({
|
|
4479
|
-
|
|
4480
|
-
...t.themeExtraStyles?.()
|
|
4481
|
-
})
|
|
4482
|
-
}), p = t.history ?? qn({
|
|
4461
|
+
extraStyles: () => ({ "--tpl-drop-text": `"${i.canvas.dropHere}"` })
|
|
4462
|
+
}), p = t.history ?? zn({
|
|
4483
4463
|
content: n.content,
|
|
4484
4464
|
setContent: (e, t) => n.setContent(e, t)
|
|
4485
4465
|
});
|
|
4486
|
-
t.history ? n.contentReplaced && c(n.contentReplaced, () => p.clear(), { flush: "sync" }) :
|
|
4487
|
-
let m =
|
|
4466
|
+
t.history ? n.contentReplaced && c(n.contentReplaced, () => p.clear(), { flush: "sync" }) : Un(n, p);
|
|
4467
|
+
let m = Rn({
|
|
4488
4468
|
addBlock: n.addBlock,
|
|
4489
4469
|
removeBlock: n.removeBlock,
|
|
4490
4470
|
updateBlock: n.updateBlock,
|
|
4491
4471
|
selectBlock: n.selectBlock,
|
|
4492
4472
|
findBlockLocation: n.findBlockLocation,
|
|
4493
4473
|
blockDefaults: () => l.value
|
|
4494
|
-
}), h =
|
|
4474
|
+
}), h = rr(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? Vn({
|
|
4495
4475
|
content: n.content,
|
|
4496
4476
|
isDirty: () => n.state.isDirty,
|
|
4497
4477
|
...t.autoSaveOptions
|
|
@@ -4502,20 +4482,20 @@ function xu(t) {
|
|
|
4502
4482
|
let y = hi(n, {
|
|
4503
4483
|
t: o,
|
|
4504
4484
|
format: s
|
|
4505
|
-
}, r.customBlocks ?? []), b =
|
|
4506
|
-
if (b.allowCustomIgnored &&
|
|
4485
|
+
}, r.customBlocks ?? []), b = or(r.colors);
|
|
4486
|
+
if (b.allowCustomIgnored && Ln.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 && Ln.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4507
4487
|
let e = wi(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4508
|
-
e.length > 0 &&
|
|
4488
|
+
e.length > 0 && Ln.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.`);
|
|
4509
4489
|
}
|
|
4510
4490
|
let x = fr(r.templateSettings);
|
|
4511
|
-
for (let e of x.unknown)
|
|
4491
|
+
for (let e of x.unknown) Ln.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${pr.join(", ")}) — skipping it.`);
|
|
4512
4492
|
let S = Ur();
|
|
4513
|
-
xi(S,
|
|
4493
|
+
xi(S, hu);
|
|
4514
4494
|
let C = /* @__PURE__ */ new Set();
|
|
4515
4495
|
function w(e) {
|
|
4516
4496
|
for (let t of e) {
|
|
4517
|
-
S.registerCustom(t,
|
|
4518
|
-
for (let e of
|
|
4497
|
+
S.registerCustom(t, Ca);
|
|
4498
|
+
for (let e of Vi(t, b)) C.has(e.id) || (C.add(e.id), Ln.warn(e.message));
|
|
4519
4499
|
}
|
|
4520
4500
|
}
|
|
4521
4501
|
r.customBlocks?.length && w(r.customBlocks);
|
|
@@ -4532,7 +4512,7 @@ function xu(t) {
|
|
|
4532
4512
|
e ? e.save() : _?.flush();
|
|
4533
4513
|
}
|
|
4534
4514
|
function D(e) {
|
|
4535
|
-
E.isActive() &&
|
|
4515
|
+
E.isActive() && Ui(e, {
|
|
4536
4516
|
history: p,
|
|
4537
4517
|
selectBlock: (e) => n.selectBlock(e),
|
|
4538
4518
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4545,41 +4525,41 @@ function xu(t) {
|
|
|
4545
4525
|
}
|
|
4546
4526
|
e(document, "keydown", D);
|
|
4547
4527
|
let O = M(null), A = t.editorRoot ?? document;
|
|
4548
|
-
g(
|
|
4549
|
-
let j =
|
|
4528
|
+
g(ot, A), g(ve, O), g(fe, /* @__PURE__ */ new Map()), g(Ue, i), g(Me, n), g(Fe, p), g(tt, m), g(Qe, h), g(lt, a), g(et, f), g(nt, u), g(Ie, l), g(Ze, r.locale), g(Ke, S), g(Je, r.customBlocks ?? []), g(me, r.paletteBlocks), g(ct, Si(r.htmlBlockPreview)), g(st, r.layout), g(we, r.sectionWrapper), g(ze, b), g(Ye, x.fields), g(Ve, _i(n.content, S));
|
|
4529
|
+
let j = Pt(r.mergeTags?.syntax);
|
|
4550
4530
|
for (let e of ["opener", "closer"]) {
|
|
4551
4531
|
let t = j[e];
|
|
4552
|
-
typeof t == "string" && t.trim() === "" &&
|
|
4532
|
+
typeof t == "string" && t.trim() === "" && Ln.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
4553
4533
|
}
|
|
4554
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
4534
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && On(j) === null && Ln.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
4555
4535
|
let N = ie(r.mergeTags?.tags ?? []);
|
|
4556
4536
|
function te(e) {
|
|
4557
|
-
Array.isArray(e) ? N.value = e :
|
|
4537
|
+
Array.isArray(e) ? N.value = e : Ln.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4558
4538
|
}
|
|
4559
|
-
g(
|
|
4560
|
-
let ne = M(
|
|
4561
|
-
g(
|
|
4539
|
+
g(xe, N), g(ut, j), g(ke, r.mergeTags?.onRequest ?? null), g(Ce, r.mergeTags?.autocomplete !== !1), g(Te, r.mergeTags?.showRawValue !== !1);
|
|
4540
|
+
let ne = M(jn(r.mergeTags?.tags ?? []));
|
|
4541
|
+
g(ye, ne);
|
|
4562
4542
|
let re = li({
|
|
4563
4543
|
resolvePreview: r.resolvePreview,
|
|
4564
4544
|
surface: "preview",
|
|
4565
4545
|
getContent: () => {
|
|
4566
4546
|
let e = n.content.value;
|
|
4567
4547
|
if (!n.state.previewMode) return e;
|
|
4568
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
4569
|
-
return r.layout ?
|
|
4548
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = Kt(e, t);
|
|
4549
|
+
return r.layout ? yt(Kt(r.layout, t, { missing: "default" }), i) : i;
|
|
4570
4550
|
},
|
|
4571
4551
|
isActive: () => n.state.previewMode,
|
|
4572
4552
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
4573
4553
|
});
|
|
4574
|
-
g(
|
|
4554
|
+
g($e, re), g(Ae, r.resolvePreview);
|
|
4575
4555
|
let P = null;
|
|
4576
|
-
g(
|
|
4556
|
+
g(je, (e) => (P = e, () => {
|
|
4577
4557
|
P === e && (P = null);
|
|
4578
4558
|
}));
|
|
4579
4559
|
let F = () => (P ?? re.refresh)(), L = k(() => !(n.state.previewMode && re.isConfigured));
|
|
4580
|
-
g(
|
|
4560
|
+
g(Xe, L);
|
|
4581
4561
|
let ae = ui();
|
|
4582
|
-
g(
|
|
4562
|
+
g(pe, ae), g(ge, M(!1)), g(be, M(!1)), g(V, r.logicTags?.tags ?? []), g(Ge, r.logicTags?.pairs ?? []), g(he, r.logicTags?.onRequest ?? null), g(We, di()), g(De, r.onRequestMedia ?? null), g(at, r.canDropMedia ?? null), g(Ee, r.resolveImageUrl ? tr(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && Ln.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), g(Be, r.displayConditions?.conditions ?? []), g(He, r.displayConditions?.allowCustom ?? !1), g(Oe, r.displayConditions?.onRequest ?? null), g(Re, t.capabilities ?? {}), g(ue, y);
|
|
4583
4563
|
let R = fi(r.lint) ? null : mi({
|
|
4584
4564
|
content: n.content,
|
|
4585
4565
|
get options() {
|
|
@@ -4595,7 +4575,7 @@ function xu(t) {
|
|
|
4595
4575
|
updateSettings: n.updateSettings,
|
|
4596
4576
|
removeBlock: n.removeBlock
|
|
4597
4577
|
});
|
|
4598
|
-
g(
|
|
4578
|
+
g(it, R);
|
|
4599
4579
|
function oe() {
|
|
4600
4580
|
v?.(), R?.destroy(), _?.destroy(), p.destroy();
|
|
4601
4581
|
}
|
|
@@ -4626,12 +4606,12 @@ function xu(t) {
|
|
|
4626
4606
|
};
|
|
4627
4607
|
}
|
|
4628
4608
|
// src/composables/useSmallScreenNotice.ts
|
|
4629
|
-
var
|
|
4630
|
-
function
|
|
4631
|
-
let n = t(
|
|
4609
|
+
var _u = "(max-width: 767px)";
|
|
4610
|
+
function vu(e) {
|
|
4611
|
+
let n = t(_u);
|
|
4632
4612
|
return {
|
|
4633
4613
|
isSmallScreen: n,
|
|
4634
4614
|
showNotice: k(() => (F(e) ?? !0) && n.value)
|
|
4635
4615
|
};
|
|
4636
4616
|
}
|
|
4637
|
-
export {
|
|
4617
|
+
export { ji as A, Vr as B, Xi as C, Wi as D, ta as E, si as F, Fr as H, ni as I, ei as L, Fi as M, Pi as N, sa as O, li as P, qr as R, qi as S, ea as T, Nr as U, Lr as V, ja as _, Ql as a, ma as b, Nl as c, Po as d, Mo as f, Ua as g, qa as h, iu as i, Ii as j, Gi as k, Fo as l, Xa as m, gu as n, Yl as o, Za as p, mu as r, Rl as s, vu as t, Ro as u, Ta as v, aa as w, da as x, Ca as y, Hr as z };
|