@templatical/editor 0.59.0 → 0.59.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-CwyKz_9U.js → AiAltTextPopover-BhWHOOKX.js} +3 -3
- package/dist/{AiAltTextReview-DNFnR1PN.js → AiAltTextReview-CmW7pLmo.js} +3 -3
- package/dist/{AiChatPanel-DWWVvJIP.js → AiChatPanel-CV0mCtad.js} +2 -2
- package/dist/{AiPanels-CESbBB63.js → AiPanels-C8M7q_vM.js} +1 -1
- package/dist/{AiRewriteMenu-CjXiI-n4.js → AiRewriteMenu-DC2ZLH5L.js} +7 -7
- package/dist/{BlockIssueBadge-3k568_Od.js → BlockIssueBadge-B8sl9BM1.js} +2 -2
- package/dist/{BlockPreviewCanvas-3FzYSsPm.js → BlockPreviewCanvas-yhOQAQhJ.js} +22 -18
- package/dist/{CloudHeaderExtras-xrHubAHL.js → CloudHeaderExtras-DC_oNrxz.js} +1 -1
- package/dist/{CloudPanels-CSFN-eLV.js → CloudPanels-CD0lsL0R.js} +2 -2
- package/dist/{CollaborationNotices-D9GQ477K.js → CollaborationNotices-DrMrP73M.js} +1 -1
- package/dist/{CollaboratorBar-DsRjAaqd.js → CollaboratorBar-TsK872uC.js} +1 -1
- package/dist/{CommentsPanel-lb-IFzjl.js → CommentsPanel-BX8JVrXU.js} +1 -1
- package/dist/{CommentsSidebar-CVVTCWBH.js → CommentsSidebar-BUlseNwL.js} +2 -2
- package/dist/{CountdownBlock-CSEq79Nc.js → CountdownBlock-AYPypmcX.js} +2 -2
- package/dist/{CountdownToolbar-BV9yQi9k.js → CountdownToolbar-dx3FVRjh.js} +5 -5
- package/dist/{IssuesPanel-pxcWAQJM.js → IssuesPanel-BwnvXxBC.js} +5 -5
- package/dist/{LanguageMenu-CEKRbNhA.js → LanguageMenu-Cf5bKocE.js} +5 -5
- package/dist/{LocaleNotices-j4aMFfmc.js → LocaleNotices-CGEp0pQ8.js} +2 -2
- package/dist/{LogicTagInsertButton-BDIsyl3C.js → LogicTagInsertButton-BdDe-vrZ.js} +8 -8
- package/dist/{MergeTagInput-De1yWoc2.js → MergeTagInput-CTTi-eB0.js} +1 -1
- package/dist/{MergeTagModeToggle-CL96pI1E.js → MergeTagModeToggle-Bd0svGQm.js} +3 -3
- package/dist/{MergeTagTextarea-DDyV8U44.js → MergeTagTextarea-DiahMV-3.js} +4 -4
- package/dist/{ParagraphEditor-Vz90-hhN.js → ParagraphEditor-Db1cmj8Y.js} +11 -11
- package/dist/{RestoreVersionDialog-BgrtpVl1.js → RestoreVersionDialog-DA1Z0q9Z.js} +2 -2
- package/dist/{RichTextEditorContent-C2Yj1-ZA.js → RichTextEditorContent-CyO6e4ZG.js} +6 -6
- package/dist/{SaveBlockDialog-DRvLFKWJ.js → SaveBlockDialog-D7SaFxa_.js} +6 -6
- package/dist/{SavedBlocksBrowserModal-Dw0uF-NT.js → SavedBlocksBrowserModal-B5r3LWWG.js} +6 -6
- package/dist/{SavedBlocksPanels-BReNi8sg.js → SavedBlocksPanels-BH2f7jm-.js} +1 -1
- package/dist/{SavedBlocksPickBar-BQX4g7OE.js → SavedBlocksPickBar-B24TScw0.js} +2 -2
- package/dist/{TemplateSettings-CBCaybvd.js → TemplateSettings-CuN9Vkl_.js} +8 -8
- package/dist/{TestEmailModal-BiCUiRFo.js → TestEmailModal-C4DAaohi.js} +12 -9
- package/dist/{TestEmailPanel-Bfr-sGrI.js → TestEmailPanel-DoMcVJSE.js} +1 -1
- package/dist/{TitleEditor-B8thQPgg.js → TitleEditor-b5Pr_m9j.js} +8 -8
- package/dist/{Toolbar-FIYSw3Us.js → Toolbar-BOf7Y862.js} +14 -14
- package/dist/{TplModal-BIqO0owX.js → TplModal-DAcXzBJh.js} +4 -4
- package/dist/{VersionHistoryMenu-6jMve6By.js → VersionHistoryMenu-TbIGteNi.js} +2 -2
- package/dist/{VersionHistoryPanels-C91mfsMA.js → VersionHistoryPanels-Ia6ipOqG.js} +1 -1
- package/dist/{VersionPreviewBanner-Bq8z1SUc.js → VersionPreviewBanner-CRfu6quf.js} +1 -1
- package/dist/{WrapperBlock-BAqgP8hm.js → WrapperBlock-BZenrXM6.js} +4 -4
- package/dist/{blockTypeIcons-VX_8UQ21.js → blockTypeIcons-DdYZy8yG.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-Dj-VLU88.js → AiAltTextPopover-CcX_OMUU.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-Dj-VLU88.js.map → AiAltTextPopover-CcX_OMUU.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-tVkJPOk6.js → AiAltTextReview-Dmm3h0jd.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextReview-tVkJPOk6.js.map → AiAltTextReview-Dmm3h0jd.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-CYPvHQGQ.js → AiChatPanel-DV23DJ-2.js} +3 -3
- package/dist/cdn/chunks/{AiChatPanel-CYPvHQGQ.js.map → AiChatPanel-DV23DJ-2.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-ChTLCmMS.js → AiPanels-CxhOpMAp.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-ChTLCmMS.js.map → AiPanels-CxhOpMAp.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-99qbfCZI.js → AiRewriteMenu-87-O514r.js} +8 -8
- package/dist/cdn/chunks/{AiRewriteMenu-99qbfCZI.js.map → AiRewriteMenu-87-O514r.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BKO4Mr8f.js → BlockIssueBadge-Dp06vQd3.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-BKO4Mr8f.js.map → BlockIssueBadge-Dp06vQd3.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-BF0yCTKP.js → BlockPreviewCanvas-DQGzUvZ5.js} +23 -19
- package/dist/cdn/chunks/BlockPreviewCanvas-DQGzUvZ5.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-O_K3jmgO.js → CloudHeaderExtras-Cd-ePldd.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-O_K3jmgO.js.map → CloudHeaderExtras-Cd-ePldd.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-gV2WFHQk.js → CloudPanels-D8fchoYt.js} +3 -3
- package/dist/cdn/chunks/{CloudPanels-gV2WFHQk.js.map → CloudPanels-D8fchoYt.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-CwAoa-73.js → CollaborationNotices-DNEs3g9B.js} +2 -2
- package/dist/cdn/chunks/{CollaborationNotices-CwAoa-73.js.map → CollaborationNotices-DNEs3g9B.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DdQQwtwd.js → CollaboratorBar-CN6XAlbn.js} +2 -2
- package/dist/cdn/chunks/{CollaboratorBar-DdQQwtwd.js.map → CollaboratorBar-CN6XAlbn.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-C8AKtxiG.js → CommentsPanel-CxZ1kFcK.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-C8AKtxiG.js.map → CommentsPanel-CxZ1kFcK.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-FxY0RHSq.js → CommentsSidebar-DCr2mV8b.js} +3 -3
- package/dist/cdn/chunks/{CommentsSidebar-FxY0RHSq.js.map → CommentsSidebar-DCr2mV8b.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DGgnPUlu.js → CountdownBlock--hlKE2aj.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DGgnPUlu.js.map → CountdownBlock--hlKE2aj.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-9PtYUgCW.js → CountdownToolbar-CUTbVPPV.js} +6 -6
- package/dist/cdn/chunks/{CountdownToolbar-9PtYUgCW.js.map → CountdownToolbar-CUTbVPPV.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Co-ffgWa.js → IssuesPanel-BhcSzwuL.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-Co-ffgWa.js.map → IssuesPanel-BhcSzwuL.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-fL4DRGGQ.js → LanguageMenu-6wGhkyFT.js} +99 -99
- package/dist/cdn/chunks/{LanguageMenu-fL4DRGGQ.js.map → LanguageMenu-6wGhkyFT.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-BVDJ7kyj.js → LocaleNotices-Br92Xueo.js} +3 -3
- package/dist/cdn/chunks/{LocaleNotices-BVDJ7kyj.js.map → LocaleNotices-Br92Xueo.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DPYA8LJW.js → LogicTagInsertButton-r2EVUtDU.js} +9 -9
- package/dist/cdn/chunks/{LogicTagInsertButton-DPYA8LJW.js.map → LogicTagInsertButton-r2EVUtDU.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-Cxfjq3tx.js → MergeTagInput-Dh3N6CEV.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-Cxfjq3tx.js.map → MergeTagInput-Dh3N6CEV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BmNGV3yc.js → MergeTagModeToggle-D6u3hMrI.js} +4 -4
- package/dist/cdn/chunks/{MergeTagModeToggle-BmNGV3yc.js.map → MergeTagModeToggle-D6u3hMrI.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DmwrPAss.js → MergeTagTextarea-BpVtpiNL.js} +8 -8
- package/dist/cdn/chunks/{MergeTagTextarea-DmwrPAss.js.map → MergeTagTextarea-BpVtpiNL.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-A_OEuQ1Q.js → ParagraphEditor-DGJmPAC1.js} +12 -12
- package/dist/cdn/chunks/{ParagraphEditor-A_OEuQ1Q.js.map → ParagraphEditor-DGJmPAC1.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-Ca_lUsk4.js → RestoreVersionDialog-D5qeCa0F.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-Ca_lUsk4.js.map → RestoreVersionDialog-D5qeCa0F.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Dq4TROOg.js → RichTextEditorContent-DyGiXKKI.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-Dq4TROOg.js.map → RichTextEditorContent-DyGiXKKI.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BXRCqrZX.js → SaveBlockDialog-B0TJYxd8.js} +7 -7
- package/dist/cdn/chunks/{SaveBlockDialog-BXRCqrZX.js.map → SaveBlockDialog-B0TJYxd8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DdaBcSOI.js → SavedBlocksBrowserModal-D8Ly7LrA.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DdaBcSOI.js.map → SavedBlocksBrowserModal-D8Ly7LrA.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BcVFZDKI.js → SavedBlocksPanels-Co1cbWR8.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-BcVFZDKI.js.map → SavedBlocksPanels-Co1cbWR8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-o66PhlTo.js → SavedBlocksPickBar-DNtVbpm-.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-o66PhlTo.js.map → SavedBlocksPickBar-DNtVbpm-.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-uoiUkd2l.js → TemplateSettings-BRc878ZF.js} +9 -9
- package/dist/cdn/chunks/{TemplateSettings-uoiUkd2l.js.map → TemplateSettings-BRc878ZF.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-WOC7bmF_.js → TestEmailModal-CIui7VfS.js} +13 -10
- package/dist/cdn/chunks/TestEmailModal-CIui7VfS.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-DUWH9xsZ.js → TestEmailPanel-vKvruW_r.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-DUWH9xsZ.js.map → TestEmailPanel-vKvruW_r.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-EHW0lgG4.js → TitleEditor-BI-9Nnj3.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-EHW0lgG4.js.map → TitleEditor-BI-9Nnj3.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BzAuH2G4.js → Toolbar-CYnnArxv.js} +418 -418
- package/dist/cdn/chunks/{Toolbar-BzAuH2G4.js.map → Toolbar-CYnnArxv.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-B9DVglkN.js → TplModal-B3nZeGWK.js} +5 -5
- package/dist/cdn/chunks/{TplModal-B9DVglkN.js.map → TplModal-B3nZeGWK.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DDqYMqC2.js → VersionHistoryMenu-CMGfAKuV.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-DDqYMqC2.js.map → VersionHistoryMenu-CMGfAKuV.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DO-kcL28.js → VersionHistoryPanels-Bb2ouQg7.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-DO-kcL28.js.map → VersionHistoryPanels-Bb2ouQg7.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CYT5QUoc.js → VersionPreviewBanner-573UP-g4.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-CYT5QUoc.js.map → VersionPreviewBanner-573UP-g4.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-CyD_pW18.js → WrapperBlock-DVu632LD.js} +5 -5
- package/dist/cdn/chunks/{WrapperBlock-CyD_pW18.js.map → WrapperBlock-DVu632LD.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CN9j_FH4.js → composables-DY3anqHO.js} +574 -571
- package/dist/cdn/chunks/composables-DY3anqHO.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js → createCloudRuntime-B5numxlW.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js.map → createCloudRuntime-B5numxlW.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BYJPv1sA.js → extensions-BWVlr8Ga.js} +5 -5
- package/dist/cdn/chunks/{extensions-BYJPv1sA.js.map → extensions-BWVlr8Ga.js.map} +1 -1
- package/dist/cdn/chunks/keys-ywH4jHJ2.js +11 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js → normalizeMergeTagMarkup-Dw3rFvyd.js} +40 -40
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js.map → normalizeMergeTagMarkup-Dw3rFvyd.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-CxwYcAQe.js → preRenderCustomBlocks-BGtb8Xbp.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-CxwYcAQe.js.map → preRenderCustomBlocks-BGtb8Xbp.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js → sanitizeHtml-CLRY8s2s.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js.map → sanitizeHtml-CLRY8s2s.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-bvQ57o1m.js → socialIcons-kYhdXJ9P.js} +255 -255
- package/dist/cdn/chunks/{socialIcons-bvQ57o1m.js.map → socialIcons-kYhdXJ9P.js.map} +1 -1
- package/dist/cdn/chunks/{src-BXrhjqCv.js → src-B7X7x_ST.js} +154 -154
- package/dist/cdn/chunks/{src-BXrhjqCv.js.map → src-B7X7x_ST.js.map} +1 -1
- package/dist/cdn/chunks/{src-BRyzUujm.js → src-BmzzkUf7.js} +539 -539
- package/dist/cdn/chunks/{src-BRyzUujm.js.map → src-BmzzkUf7.js.map} +1 -1
- package/dist/cdn/chunks/{src-CVHGPKSW.js → src-DY2kMjoD.js} +593 -589
- package/dist/cdn/chunks/src-DY2kMjoD.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js → useCloudI18n-BTV9uu3c.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js.map → useCloudI18n-BTV9uu3c.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js → useEditorRoot-D0Lp2x4_.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js.map → useEditorRoot-D0Lp2x4_.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js → useI18n-DPg6rPbu.js} +2 -2
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js.map → useI18n-DPg6rPbu.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-B5wMJLru.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-7iwZ1UhB.js.map → useLocalizedDisplay-B5wMJLru.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js → useLogicTag-0wkSxy3z.js} +3 -3
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js.map → useLogicTag-0wkSxy3z.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js → useMergeTag-y3bX8M_6.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js.map → useMergeTag-y3bX8M_6.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js → usePopoverPosition-CBp9uwjV.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js.map → usePopoverPosition-CBp9uwjV.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js → useScrollToBlock-32EnuMwu.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js.map → useScrollToBlock-32EnuMwu.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js → withCurrentFont-B42BKo9N.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js.map → withCurrentFont-B42BKo9N.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +600 -600
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-DbqKYIRE.js → composables-CFTH0Nqb.js} +867 -864
- package/dist/{createCloudRuntime-DiUnYjKr.js → createCloudRuntime-BvWlm_38.js} +3 -3
- package/dist/{dist-BTjObRcv.js → dist-CMo4K5So.js} +277 -273
- package/dist/{extensions-CAuXwpbI.js → extensions-BPVackEE.js} +4 -4
- package/dist/index.d.ts +29 -7
- package/dist/keys-B4DimcgX.js +9 -0
- package/dist/{normalizeMergeTagMarkup-fgoVMKAc.js → normalizeMergeTagMarkup-PQqrbfmt.js} +1 -1
- package/dist/{preRenderCustomBlocks-CgPtlLGL.js → preRenderCustomBlocks-Dg5GBNi2.js} +1 -1
- package/dist/{sanitizeHtml-D2wueiEe.js → sanitizeHtml-DVdfdxOz.js} +1 -1
- package/dist/{socialIcons-RKdTgJip.js → socialIcons-DBHv_ntg.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +563 -563
- package/dist/{useCloudI18n-nMZ9f_4b.js → useCloudI18n-BnuOL1YS.js} +1 -1
- package/dist/{useEditorRoot-DpssP9rX.js → useEditorRoot-DWfC2CVC.js} +1 -1
- package/dist/{useI18n-C2p-qHeb.js → useI18n-Cx9W7OWb.js} +1 -1
- package/dist/{useLocalizedDisplay-9RqT2y_Y.js → useLocalizedDisplay-CbFM0cCV.js} +1 -1
- package/dist/{useLogicTag-59fmujI7.js → useLogicTag-CVOj0VUv.js} +2 -2
- package/dist/{useMergeTag-M1vauWet.js → useMergeTag-Bams_kam.js} +2 -2
- package/dist/{usePopoverPosition-L9MOHBM-.js → usePopoverPosition-DF0ZYH7g.js} +1 -1
- package/dist/{useScrollToBlock-BMF0Dt5l.js → useScrollToBlock-CwUQ_nKz.js} +1 -1
- package/dist/{withCurrentFont-BXZ7g-K6.js → withCurrentFont-y0O5kOLW.js} +1 -1
- package/package.json +7 -7
- package/dist/cdn/chunks/BlockPreviewCanvas-BF0yCTKP.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-WOC7bmF_.js.map +0 -1
- package/dist/cdn/chunks/composables-CN9j_FH4.js.map +0 -1
- package/dist/cdn/chunks/keys-DNv3xXxI.js +0 -11
- package/dist/cdn/chunks/keys-DNv3xXxI.js.map +0 -1
- package/dist/cdn/chunks/src-CVHGPKSW.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-7iwZ1UhB.js +0 -33
- package/dist/keys-BeQy64On.js +0 -9
|
@@ -1,42 +1,42 @@
|
|
|
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 { t as ce } from "./useI18n-
|
|
6
|
-
import "./useCloudI18n-
|
|
7
|
-
import { t as V } from "./useMergeTag-
|
|
4
|
+
import { t as se } from "./useEditorRoot-DWfC2CVC.js";
|
|
5
|
+
import { t as ce } from "./useI18n-Cx9W7OWb.js";
|
|
6
|
+
import "./useCloudI18n-BnuOL1YS.js";
|
|
7
|
+
import { t as V } from "./useMergeTag-Bams_kam.js";
|
|
8
8
|
import { _ as le, h as ue, v as de, y as fe } from "./dist-A328tG0Z.js";
|
|
9
|
-
import { $ as pe, $t as me, At as he, B as ge, Bt as _e, Ct as ve, F as ye, Gt as be, H as xe, Ht as Se, I as Ce, J as we, Jt as Te, Kt as Ee, L as De, Mt as Oe, N as ke, P as Ae, Pt as je, Qt as Me, S as Ne, St as Pe, U as Fe, Ut as Ie, V as Le, Vt as Re, W as ze, Wt as Be, X as Ve, Xt as He, Y as Ue, Yt as We, Z as Ge, Zt as Ke, _ as qe, a as Je, an as Ye, at as Xe, b as Ze, c as Qe, dt as $e, en as et, ft as tt, gt as nt, ht as rt, in as it, it as at, j as ot, l as st, lt as ct, m as lt, nn as ut, on as dt, ot as ft, p as pt, pt as mt, q as ht, qt as gt, rn as _t, s as vt, st as yt, tt as bt, xt,
|
|
10
|
-
import { t as
|
|
11
|
-
import { a as
|
|
12
|
-
import { n as
|
|
13
|
-
import { $ as
|
|
14
|
-
import { t as
|
|
15
|
-
import { B as
|
|
16
|
-
import { r as
|
|
17
|
-
import { i as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
26
|
-
import { m as
|
|
27
|
-
import { t as
|
|
28
|
-
import { n as
|
|
29
|
-
import { t as
|
|
30
|
-
import { t as
|
|
31
|
-
import { t as
|
|
32
|
-
var
|
|
9
|
+
import { $ as pe, $t as me, At as he, B as ge, Bt as _e, Ct as ve, F as ye, Gt as be, H as xe, Ht as Se, I as Ce, J as we, Jt as Te, Kt as Ee, L as De, Mt as Oe, N as ke, P as Ae, Pt as je, Qt as Me, S as Ne, St as Pe, U as Fe, Ut as Ie, V as Le, Vt as Re, W as ze, Wt as Be, X as Ve, Xt as He, Y as Ue, Yt as We, Z as Ge, Zt as Ke, _ as qe, a as Je, an as Ye, at as Xe, b as Ze, c as Qe, dt as $e, en as et, ft as tt, gt as nt, ht as rt, in as it, it as at, j as ot, l as st, lt as ct, m as lt, nn as ut, on as dt, ot as ft, p as pt, pt as mt, q as ht, qt as gt, rn as _t, s as vt, st as yt, tt as bt, un as xt, xt as St, y as Ct, yt as wt, z as Tt, zt as Et } from "./dist-CMo4K5So.js";
|
|
10
|
+
import { t as Dt } from "./logger-BOu7oEtk.js";
|
|
11
|
+
import { a as Ot, c as kt, i as At, n as jt, o as Mt, t as Nt } from "./usePopoverPosition-DF0ZYH7g.js";
|
|
12
|
+
import { n as Pt } from "./useLocalizedDisplay-CbFM0cCV.js";
|
|
13
|
+
import { $ as Ft, A as It, B as Lt, C as Rt, D as zt, F as Bt, G as Vt, H as Ht, I as Ut, J as Wt, K as Gt, L as Kt, M as qt, N as Jt, O as Yt, P as Xt, R as Zt, S as Qt, T as $t, U as en, V as tn, W as nn, X as rn, Y as an, Z as on, _ as sn, a as cn, at as ln, b as un, c as dn, ct as fn, d as pn, et as mn, g as hn, h as gn, i as _n, it as vn, j as yn, k as bn, l as xn, lt as Sn, m as Cn, nt as wn, ot as Tn, p as En, q as Dn, r as On, rt as kn, s as An, st as jn, u as Mn, ut as Nn, v as Pn, w as Fn, x as In, y as Ln, z as Rn } from "./keys-B4DimcgX.js";
|
|
14
|
+
import { t as zn } from "./useLogicTag-CVOj0VUv.js";
|
|
15
|
+
import { B as Bn, C as Vn, D as Hn, E as Un, F as Wn, H as Gn, O as Kn, P as qn, T as Jn, U as Yn, _ as Xn, a as Zn, f as Qn, h as $n, k as er, n as tr, o as nr, t as rr, u as ir, v as ar, w as or, x as sr, y as cr, z as lr } from "./socialIcons-DBHv_ntg.js";
|
|
16
|
+
import { r as ur, t as dr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
17
|
+
import { i as fr, r as pr, t as mr } from "./sanitizeHtml-DVdfdxOz.js";
|
|
18
|
+
import { t as hr } from "./createLucideIcon-CssArtUe.js";
|
|
19
|
+
import { t as gr } from "./LoadingTrack-c4SeD16s.js";
|
|
20
|
+
import { t as _r } from "./triangle-exclamation-point-_YYWE2ZH.js";
|
|
21
|
+
import { t as vr } from "./image-B5pJOw5Q.js";
|
|
22
|
+
import { t as yr } from "./clock-tnC1IvZk.js";
|
|
23
|
+
import { t as br } from "./pencil-BNdkJyfY.js";
|
|
24
|
+
import { t as xr } from "./languageName-DEEOhDWI.js";
|
|
25
|
+
import { t as Sr } from "./plural-CyxrJXL1.js";
|
|
26
|
+
import { m as Cr, w as wr, x as Tr } from "./styleConstants-Br6CIRoS.js";
|
|
27
|
+
import { t as Er } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
28
|
+
import { n as Dr } from "./upload-BWYXWYHb.js";
|
|
29
|
+
import { t as Or } from "./message-circle-D_TpvAJh.js";
|
|
30
|
+
import { t as kr } from "./trash-t6XXliVc.js";
|
|
31
|
+
import { t as Ar } from "./readableTextColor-BfZUGnVj.js";
|
|
32
|
+
var jr = hr({
|
|
33
33
|
name: "bookmark",
|
|
34
34
|
size: 24,
|
|
35
35
|
node: [["path", {
|
|
36
36
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
37
37
|
key: "oz39mx"
|
|
38
38
|
}]]
|
|
39
|
-
}),
|
|
39
|
+
}), Mr = hr({
|
|
40
40
|
name: "box",
|
|
41
41
|
size: 24,
|
|
42
42
|
node: [
|
|
@@ -53,7 +53,7 @@ var kr = pr({
|
|
|
53
53
|
key: "d0xqtd"
|
|
54
54
|
}]
|
|
55
55
|
]
|
|
56
|
-
}),
|
|
56
|
+
}), Nr = hr({
|
|
57
57
|
name: "eye-off",
|
|
58
58
|
size: 24,
|
|
59
59
|
node: [
|
|
@@ -74,7 +74,7 @@ var kr = pr({
|
|
|
74
74
|
key: "1ooewy"
|
|
75
75
|
}]
|
|
76
76
|
]
|
|
77
|
-
}),
|
|
77
|
+
}), Pr = hr({
|
|
78
78
|
name: "funnel",
|
|
79
79
|
size: 24,
|
|
80
80
|
node: [["path", {
|
|
@@ -82,7 +82,7 @@ var kr = pr({
|
|
|
82
82
|
key: "sc7q7i"
|
|
83
83
|
}]],
|
|
84
84
|
aliases: ["filter"]
|
|
85
|
-
}),
|
|
85
|
+
}), Fr = hr({
|
|
86
86
|
name: "grip-vertical",
|
|
87
87
|
size: 24,
|
|
88
88
|
node: [
|
|
@@ -123,14 +123,14 @@ var kr = pr({
|
|
|
123
123
|
key: "f4zoj3"
|
|
124
124
|
}]
|
|
125
125
|
]
|
|
126
|
-
}),
|
|
126
|
+
}), Ir = hr({
|
|
127
127
|
name: "puzzle",
|
|
128
128
|
size: 24,
|
|
129
129
|
node: [["path", {
|
|
130
130
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
131
131
|
key: "w46dr5"
|
|
132
132
|
}]]
|
|
133
|
-
}),
|
|
133
|
+
}), Lr = hr({
|
|
134
134
|
name: "video",
|
|
135
135
|
size: 24,
|
|
136
136
|
node: [["path", {
|
|
@@ -144,11 +144,11 @@ var kr = pr({
|
|
|
144
144
|
rx: "2",
|
|
145
145
|
key: "158x01"
|
|
146
146
|
}]]
|
|
147
|
-
}),
|
|
148
|
-
function
|
|
147
|
+
}), Rr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
148
|
+
function zr(t, n) {
|
|
149
149
|
let r = se(), i = null, a = null, o = null;
|
|
150
150
|
function s() {
|
|
151
|
-
return t.value ? Array.from(t.value.querySelectorAll(
|
|
151
|
+
return t.value ? Array.from(t.value.querySelectorAll(Rr)).filter((e) => e.offsetParent !== null) : [];
|
|
152
152
|
}
|
|
153
153
|
function l(e) {
|
|
154
154
|
if (e.key !== "Tab") return;
|
|
@@ -177,7 +177,7 @@ function Lr(t, n) {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
// src/composables/useEmoji.ts
|
|
180
|
-
function
|
|
180
|
+
function Br() {
|
|
181
181
|
let [e, t] = de(!1), n = ie([]), r = !1;
|
|
182
182
|
T(() => {
|
|
183
183
|
r = !0;
|
|
@@ -202,7 +202,7 @@ function Rr() {
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
// src/composables/useBlockRegistry.ts
|
|
205
|
-
function
|
|
205
|
+
function Vr() {
|
|
206
206
|
let e = ie(/* @__PURE__ */ new Map());
|
|
207
207
|
function t(t, n) {
|
|
208
208
|
e.value.set(t, n), ae(e);
|
|
@@ -238,7 +238,7 @@ function zr() {
|
|
|
238
238
|
try {
|
|
239
239
|
return await De(await import("./liquid.browser-DUXEekoN.js")).parseAndRender(t.template, e.fieldValues);
|
|
240
240
|
} catch (t) {
|
|
241
|
-
return
|
|
241
|
+
return Dt.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function c(t) {
|
|
@@ -255,7 +255,7 @@ function zr() {
|
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
// src/composables/useFonts.ts
|
|
258
|
-
var
|
|
258
|
+
var Hr = [
|
|
259
259
|
{
|
|
260
260
|
value: "Arial",
|
|
261
261
|
label: "Arial"
|
|
@@ -284,19 +284,19 @@ var Br = [
|
|
|
284
284
|
value: "Courier New",
|
|
285
285
|
label: "Courier New"
|
|
286
286
|
}
|
|
287
|
-
],
|
|
288
|
-
function
|
|
289
|
-
if (e === void 0 || e === !0) return [...
|
|
287
|
+
], Ur = "Arial, sans-serif";
|
|
288
|
+
function Wr(e) {
|
|
289
|
+
if (e === void 0 || e === !0) return [...Hr];
|
|
290
290
|
if (e === !1) return [];
|
|
291
291
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
292
292
|
for (let i of e) {
|
|
293
|
-
let e = i.toLowerCase(), a =
|
|
294
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
293
|
+
let e = i.toLowerCase(), a = Hr.find((t) => t.value.toLowerCase() === e);
|
|
294
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), Dt.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Hr.map((e) => e.value).join(", ")}.`));
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
let t = M(e?.customFonts ?? []), n = M(!1), r =
|
|
298
|
+
function Gr(e) {
|
|
299
|
+
let t = M(e?.customFonts ?? []), n = M(!1), r = Wr(e?.builtIns), i = k(() => e?.defaultFallback ?? Ur), a = k(() => {
|
|
300
300
|
let e = [...r], n = t.value.map((e) => ({
|
|
301
301
|
value: e.name,
|
|
302
302
|
label: e.name,
|
|
@@ -307,14 +307,14 @@ function Ur(e) {
|
|
|
307
307
|
function o(e) {
|
|
308
308
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
309
309
|
}
|
|
310
|
-
let s = e?.defaultFont ??
|
|
311
|
-
o(s) ||
|
|
310
|
+
let s = e?.defaultFont ?? Ur.split(",")[0].trim();
|
|
311
|
+
o(s) || Dt.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
312
312
|
function c() {
|
|
313
313
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
314
314
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
315
315
|
if (t) return t.value;
|
|
316
316
|
}
|
|
317
|
-
return
|
|
317
|
+
return Ur;
|
|
318
318
|
}
|
|
319
319
|
let l = k(() => c());
|
|
320
320
|
function u(e) {
|
|
@@ -337,7 +337,7 @@ function Ur(e) {
|
|
|
337
337
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
338
338
|
});
|
|
339
339
|
} catch (t) {
|
|
340
|
-
|
|
340
|
+
Dt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
await Promise.allSettled(e), f || (n.value = !0);
|
|
@@ -361,7 +361,7 @@ function Ur(e) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
// src/composables/useThemeStyles.ts
|
|
364
|
-
var
|
|
364
|
+
var Kr = {
|
|
365
365
|
bg: "--tpl-bg",
|
|
366
366
|
bgElevated: "--tpl-bg-elevated",
|
|
367
367
|
bgHover: "--tpl-bg-hover",
|
|
@@ -385,10 +385,10 @@ var Wr = {
|
|
|
385
385
|
dangerLight: "--tpl-danger-light",
|
|
386
386
|
canvasBg: "--tpl-canvas-bg"
|
|
387
387
|
};
|
|
388
|
-
function
|
|
388
|
+
function qr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
389
389
|
return { themeStyles: k(() => {
|
|
390
390
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
391
|
-
if (a) for (let [e, t] of Object.entries(
|
|
391
|
+
if (a) for (let [e, t] of Object.entries(Kr)) {
|
|
392
392
|
let n = a[e];
|
|
393
393
|
n && (r[t] = n);
|
|
394
394
|
}
|
|
@@ -396,8 +396,8 @@ function Gr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
396
396
|
}) };
|
|
397
397
|
}
|
|
398
398
|
// src/utils/mergeTagNodeSpec.ts
|
|
399
|
-
function
|
|
400
|
-
return
|
|
399
|
+
function Jr(e, t, n) {
|
|
400
|
+
return St(e, n) ? {
|
|
401
401
|
type: "logicMergeTagNode",
|
|
402
402
|
attrs: {
|
|
403
403
|
value: e,
|
|
@@ -412,32 +412,32 @@ function Kr(e, t, n) {
|
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
// src/utils/insertLogicTag.ts
|
|
415
|
-
function
|
|
415
|
+
function Yr(e) {
|
|
416
416
|
return "before" in e && "after" in e;
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
if (!
|
|
420
|
-
e.chain().focus().insertContent(
|
|
418
|
+
function Xr(e, t, n) {
|
|
419
|
+
if (!Yr(t)) {
|
|
420
|
+
e.chain().focus().insertContent(Jr(t.value, t.label, n)).run();
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
let r =
|
|
423
|
+
let r = Jr(t.before, t.label, n), i = Jr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
424
424
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
425
425
|
}
|
|
426
426
|
// src/utils/linkColorExtension.ts
|
|
427
|
-
function
|
|
427
|
+
function Zr(e) {
|
|
428
428
|
if (!e) return null;
|
|
429
429
|
let t = e.trim();
|
|
430
430
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function Qr(e) {
|
|
433
433
|
return e.extend({ addAttributes() {
|
|
434
434
|
return {
|
|
435
435
|
...this.parent?.(),
|
|
436
436
|
color: {
|
|
437
437
|
default: null,
|
|
438
|
-
parseHTML: (e) =>
|
|
438
|
+
parseHTML: (e) => Zr(Mt(e.style.color)),
|
|
439
439
|
renderHTML: (e) => {
|
|
440
|
-
let t =
|
|
440
|
+
let t = Zr(e.color);
|
|
441
441
|
return t ? { style: `color: ${t}` } : {};
|
|
442
442
|
}
|
|
443
443
|
}
|
|
@@ -445,9 +445,9 @@ function Xr(e) {
|
|
|
445
445
|
} });
|
|
446
446
|
}
|
|
447
447
|
// src/composables/useRichTextLinkDialog.ts
|
|
448
|
-
function
|
|
448
|
+
function $r(e, t = qe.liquid, n = () => !0) {
|
|
449
449
|
let r = M(!1), i = M(""), a = M(""), o = M(null);
|
|
450
|
-
|
|
450
|
+
zr(o, r);
|
|
451
451
|
function s() {
|
|
452
452
|
if (!n()) return;
|
|
453
453
|
let t = e.value?.getAttributes("link") ?? {};
|
|
@@ -458,7 +458,7 @@ function Zr(e, t = qe.liquid, n = () => !0) {
|
|
|
458
458
|
if (i.value) {
|
|
459
459
|
let t = d(i.value);
|
|
460
460
|
if (t !== null) {
|
|
461
|
-
let n =
|
|
461
|
+
let n = Zr(a.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
462
462
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
463
463
|
}
|
|
464
464
|
}
|
|
@@ -500,13 +500,13 @@ function Zr(e, t = qe.liquid, n = () => !0) {
|
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
// src/composables/useRichTextEditor.ts
|
|
503
|
-
function
|
|
504
|
-
let n = z(
|
|
503
|
+
function ei(t) {
|
|
504
|
+
let n = z(Pn, null), r = kt(), i = z(an, null), a = k(() => r.value && !i?.value), { mergeTags: o, canRequestMergeTag: s, isRequesting: l, requestMergeTag: u, syntax: d, autocomplete: f } = V(), { canInsertLogicTag: p, isRequesting: m, requestLogicTag: h } = zn(), g = z(ln, null), _ = (w(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = rt(d), y = ie(null), b = n?.content ? Pt(n) : null, x = () => Se(b?.settings.value ?? { locale: "en" });
|
|
505
505
|
c(x, (e) => {
|
|
506
506
|
let t = y.value?.view.dom;
|
|
507
507
|
t && t.setAttribute("dir", e);
|
|
508
508
|
});
|
|
509
|
-
let { showLinkDialog: S, linkUrl: C, linkColor: T, linkDialogRef: E, openLinkDialog: ee, insertLink: D, removeLink: O, closeLinkDialog: A, handleLinkKeydown: j } =
|
|
509
|
+
let { showLinkDialog: S, linkUrl: C, linkColor: T, linkDialogRef: E, openLinkDialog: ee, insertLink: D, removeLink: O, closeLinkDialog: A, handleLinkKeydown: j } = $r(y, d, () => a.value);
|
|
510
510
|
c(a, (e) => {
|
|
511
511
|
if (y.value?.setEditable(e, !1), !e) {
|
|
512
512
|
A();
|
|
@@ -545,7 +545,7 @@ function Qr(t) {
|
|
|
545
545
|
y.value = c, P.value = !1, N();
|
|
546
546
|
} catch (e) {
|
|
547
547
|
if (I) return;
|
|
548
|
-
|
|
548
|
+
Dt.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
function R() {
|
|
@@ -577,7 +577,7 @@ function Qr(t) {
|
|
|
577
577
|
async function ce() {
|
|
578
578
|
if (!a.value) return;
|
|
579
579
|
let e = await h();
|
|
580
|
-
!I && a.value && (e && y.value ?
|
|
580
|
+
!I && a.value && (e && y.value ? Xr(y.value, e, d) : y.value?.commands.focus());
|
|
581
581
|
}
|
|
582
582
|
return {
|
|
583
583
|
editor: y,
|
|
@@ -606,25 +606,25 @@ function Qr(t) {
|
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
// src/utils/activeEditorTracker.ts
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
let e = ++
|
|
612
|
-
return
|
|
609
|
+
var ti = /* @__PURE__ */ new Set(), ni = 0, ri = 0;
|
|
610
|
+
function ii() {
|
|
611
|
+
let e = ++ri;
|
|
612
|
+
return ti.add(e), ni === 0 && (ni = e), {
|
|
613
613
|
id: e,
|
|
614
|
-
isActive: () =>
|
|
614
|
+
isActive: () => ti.size <= 1 || ni === e,
|
|
615
615
|
claim: () => {
|
|
616
|
-
|
|
616
|
+
ni = e;
|
|
617
617
|
},
|
|
618
618
|
dispose: () => {
|
|
619
|
-
if (
|
|
620
|
-
let e = Array.from(
|
|
621
|
-
|
|
619
|
+
if (ti.delete(e), ni === e) {
|
|
620
|
+
let e = Array.from(ti);
|
|
621
|
+
ni = e[e.length - 1] ?? 0;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
// src/utils/resolveLintOptions.ts
|
|
627
|
-
function
|
|
627
|
+
function ai(e) {
|
|
628
628
|
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
629
629
|
return {
|
|
630
630
|
...e.lint,
|
|
@@ -633,8 +633,8 @@ function ri(e) {
|
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
// src/composables/usePreviewResolution.ts
|
|
636
|
-
var
|
|
637
|
-
function
|
|
636
|
+
var oi = 500;
|
|
637
|
+
function si(e) {
|
|
638
638
|
let t = typeof e.resolvePreview == "function", n = M(null), r = M(!1), i = M(!1), a = M(!1), o = 0, s = null;
|
|
639
639
|
function l() {
|
|
640
640
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -646,6 +646,7 @@ function ai(e) {
|
|
|
646
646
|
r.value = !0;
|
|
647
647
|
let l = {
|
|
648
648
|
content: We(e.getContent()),
|
|
649
|
+
surface: e.surface,
|
|
649
650
|
trigger: t,
|
|
650
651
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
651
652
|
};
|
|
@@ -667,7 +668,7 @@ function ai(e) {
|
|
|
667
668
|
function d(e) {
|
|
668
669
|
t && (l(), !a.value && e !== "recipient" ? u(e) : s = setTimeout(() => {
|
|
669
670
|
s = null, u(e);
|
|
670
|
-
},
|
|
671
|
+
}, oi));
|
|
671
672
|
}
|
|
672
673
|
function f() {
|
|
673
674
|
t && e.isActive() && (l(), u("refresh"));
|
|
@@ -694,12 +695,13 @@ function ai(e) {
|
|
|
694
695
|
isResolving: r,
|
|
695
696
|
isInitialResolve: k(() => r.value && !a.value),
|
|
696
697
|
hasFailed: i,
|
|
698
|
+
isShowingResolved: k(() => n.value !== null),
|
|
697
699
|
supersedesSamples: k(() => t),
|
|
698
700
|
refresh: f
|
|
699
701
|
};
|
|
700
702
|
}
|
|
701
703
|
// src/composables/useMergeTagPicker.ts
|
|
702
|
-
function
|
|
704
|
+
function ci() {
|
|
703
705
|
let e = M(!1), t = M([]), n = M(null), r = null;
|
|
704
706
|
function i(i, a) {
|
|
705
707
|
if (r) {
|
|
@@ -729,7 +731,7 @@ function oi() {
|
|
|
729
731
|
};
|
|
730
732
|
}
|
|
731
733
|
// src/composables/useLogicTagPicker.ts
|
|
732
|
-
function
|
|
734
|
+
function li() {
|
|
733
735
|
let e = M(!1), t = M([]), n = M([]), r = null;
|
|
734
736
|
function i(i, a) {
|
|
735
737
|
if (r) {
|
|
@@ -759,14 +761,14 @@ function si() {
|
|
|
759
761
|
};
|
|
760
762
|
}
|
|
761
763
|
// src/composables/useTemplateLint.ts
|
|
762
|
-
function
|
|
764
|
+
function ui(e) {
|
|
763
765
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
764
766
|
}
|
|
765
|
-
var
|
|
766
|
-
function
|
|
767
|
+
var di = !1;
|
|
768
|
+
function fi(e) {
|
|
767
769
|
let t = M([]), n = M(0), r = M(-1), i = c(e.content, () => {
|
|
768
770
|
n.value++;
|
|
769
|
-
}, { deep: !0 }), a = M(!1), o = M(!1), s = ie(null), l =
|
|
771
|
+
}, { deep: !0 }), a = M(!1), o = M(!1), s = ie(null), l = ui(e.options), u = null, d = !1;
|
|
770
772
|
l || f();
|
|
771
773
|
async function f() {
|
|
772
774
|
try {
|
|
@@ -775,7 +777,7 @@ function ui(e) {
|
|
|
775
777
|
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u = fe(n, p, { debounce: e.debounce ?? 500 });
|
|
776
778
|
} catch {
|
|
777
779
|
if (d) return;
|
|
778
|
-
o.value = !0,
|
|
780
|
+
o.value = !0, di || (di = !0, Dt.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
779
781
|
}
|
|
780
782
|
}
|
|
781
783
|
function p() {
|
|
@@ -814,7 +816,7 @@ function ui(e) {
|
|
|
814
816
|
};
|
|
815
817
|
}
|
|
816
818
|
// src/composables/useKeyboardReorder.ts
|
|
817
|
-
function
|
|
819
|
+
function pi(e, t, n = []) {
|
|
818
820
|
let r = M(null), i = M(""), a = null;
|
|
819
821
|
function o(t) {
|
|
820
822
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -841,7 +843,7 @@ function di(e, t, n = []) {
|
|
|
841
843
|
let i = o(r);
|
|
842
844
|
if (!i) return "";
|
|
843
845
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
844
|
-
return a ?
|
|
846
|
+
return a ? cr(a, t.t, n) : "";
|
|
845
847
|
}
|
|
846
848
|
function c(t, n) {
|
|
847
849
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -909,14 +911,14 @@ function di(e, t, n = []) {
|
|
|
909
911
|
};
|
|
910
912
|
}
|
|
911
913
|
// src/composables/useUiTheme.ts
|
|
912
|
-
function
|
|
914
|
+
function mi(e) {
|
|
913
915
|
let n = t("(prefers-color-scheme: dark)");
|
|
914
916
|
return { resolvedTheme: k(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
|
|
915
917
|
}
|
|
916
918
|
// src/composables/useCustomBlockStylesheets.ts
|
|
917
|
-
function
|
|
919
|
+
function hi(e, t) {
|
|
918
920
|
return k(() => {
|
|
919
|
-
let n =
|
|
921
|
+
let n = gi(e.value.blocks);
|
|
920
922
|
if (n.size === 0) return [];
|
|
921
923
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
922
924
|
for (let e of n) {
|
|
@@ -928,20 +930,20 @@ function pi(e, t) {
|
|
|
928
930
|
return i;
|
|
929
931
|
});
|
|
930
932
|
}
|
|
931
|
-
function
|
|
933
|
+
function gi(e) {
|
|
932
934
|
let t = /* @__PURE__ */ new Set();
|
|
933
|
-
return
|
|
935
|
+
return _i(e, t), t;
|
|
934
936
|
}
|
|
935
|
-
function
|
|
936
|
-
for (let n of e) if (
|
|
937
|
+
function _i(e, t) {
|
|
938
|
+
for (let n of e) if (wt(n)) t.add(n.customType);
|
|
937
939
|
else if (n.type === "section") {
|
|
938
940
|
let e = n.children;
|
|
939
941
|
if (!e) continue;
|
|
940
|
-
for (let n of e)
|
|
941
|
-
} else he(n) &&
|
|
942
|
+
for (let n of e) _i(n, t);
|
|
943
|
+
} else he(n) && _i(n.children, t);
|
|
942
944
|
}
|
|
943
945
|
// src/utils/registerBuiltInBlocks.ts
|
|
944
|
-
var
|
|
946
|
+
var vi = [
|
|
945
947
|
{
|
|
946
948
|
type: "section",
|
|
947
949
|
createBlock: ze
|
|
@@ -964,7 +966,7 @@ var gi = [
|
|
|
964
966
|
},
|
|
965
967
|
{
|
|
966
968
|
type: "divider",
|
|
967
|
-
createBlock:
|
|
969
|
+
createBlock: Tt
|
|
968
970
|
},
|
|
969
971
|
{
|
|
970
972
|
type: "video",
|
|
@@ -995,8 +997,8 @@ var gi = [
|
|
|
995
997
|
createBlock: ye
|
|
996
998
|
}
|
|
997
999
|
];
|
|
998
|
-
function
|
|
999
|
-
for (let n of
|
|
1000
|
+
function yi(e, t) {
|
|
1001
|
+
for (let n of vi) {
|
|
1000
1002
|
let r = t[n.type];
|
|
1001
1003
|
r && e.registerBuiltIn(n.type, {
|
|
1002
1004
|
component: r,
|
|
@@ -1005,22 +1007,22 @@ function _i(e, t) {
|
|
|
1005
1007
|
}
|
|
1006
1008
|
}
|
|
1007
1009
|
// src/utils/resolveHtmlBlockPreview.ts
|
|
1008
|
-
function
|
|
1010
|
+
function bi(e) {
|
|
1009
1011
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1010
1012
|
}
|
|
1011
1013
|
// src/utils/collectOffPaletteDefaults.ts
|
|
1012
|
-
function
|
|
1014
|
+
function xi(e) {
|
|
1013
1015
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1014
1016
|
}
|
|
1015
|
-
function
|
|
1016
|
-
let r = new Set(e.map((e) =>
|
|
1017
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1017
|
+
function Si(e, t, n) {
|
|
1018
|
+
let r = new Set(e.map((e) => Ot(e))), i = [], a = (e, t) => {
|
|
1019
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Ot(o)) && i.push(`${t}.${n}: ${o}`) : xi(o) && a(o, `${t}.${n}`);
|
|
1018
1020
|
}, o = t;
|
|
1019
1021
|
for (let [e, t] of Object.entries(vt)) {
|
|
1020
1022
|
let n = o?.[e];
|
|
1021
1023
|
a({
|
|
1022
1024
|
...t,
|
|
1023
|
-
...
|
|
1025
|
+
...xi(n) ? n : {}
|
|
1024
1026
|
}, e);
|
|
1025
1027
|
}
|
|
1026
1028
|
return a({
|
|
@@ -1029,7 +1031,7 @@ function bi(e, t, n) {
|
|
|
1029
1031
|
}, "template"), i;
|
|
1030
1032
|
}
|
|
1031
1033
|
// src/utils/localizedBlockDefaults.ts
|
|
1032
|
-
function
|
|
1034
|
+
function Ci(e) {
|
|
1033
1035
|
return {
|
|
1034
1036
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1035
1037
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -1037,7 +1039,7 @@ function xi(e) {
|
|
|
1037
1039
|
};
|
|
1038
1040
|
}
|
|
1039
1041
|
// src/i18n/index.ts
|
|
1040
|
-
var
|
|
1042
|
+
var wi = /* #__PURE__ */ Object.assign({
|
|
1041
1043
|
"./locales/ca.ts": () => import("./ca-YfIxwO1G.js"),
|
|
1042
1044
|
"./locales/da.ts": () => import("./da-CM6DCvRG.js"),
|
|
1043
1045
|
"./locales/de.ts": () => import("./de-Dugz1zXC.js"),
|
|
@@ -1047,53 +1049,53 @@ var Si = /* #__PURE__ */ Object.assign({
|
|
|
1047
1049
|
"./locales/ja.ts": () => import("./ja-BH4MS1Ye.js"),
|
|
1048
1050
|
"./locales/nl.ts": () => import("./nl-BQl1_UHv.js"),
|
|
1049
1051
|
"./locales/pt-BR.ts": () => import("./pt-BR-eyzmU9Vs.js")
|
|
1050
|
-
}),
|
|
1052
|
+
}), Ti = /* #__PURE__ */ Object.assign({
|
|
1051
1053
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
1052
1054
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
1053
1055
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
1054
1056
|
});
|
|
1055
|
-
function
|
|
1057
|
+
function Ei(e) {
|
|
1056
1058
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1057
1059
|
}
|
|
1058
|
-
var
|
|
1059
|
-
function
|
|
1060
|
+
var Di = Ei(wi), Oi = Ei(Ti);
|
|
1061
|
+
function ki(e) {
|
|
1060
1062
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1061
1063
|
}
|
|
1062
|
-
function
|
|
1063
|
-
let n =
|
|
1064
|
-
return t.find((e) =>
|
|
1064
|
+
function Ai(e, t) {
|
|
1065
|
+
let n = ki(e);
|
|
1066
|
+
return t.find((e) => ki(e) === n);
|
|
1065
1067
|
}
|
|
1066
|
-
function
|
|
1067
|
-
return
|
|
1068
|
+
function ji(e) {
|
|
1069
|
+
return ki(e).split("-")[0];
|
|
1068
1070
|
}
|
|
1069
|
-
function
|
|
1070
|
-
return
|
|
1071
|
+
function Mi(e, t) {
|
|
1072
|
+
return Ai(e, t) ?? Ai(ji(e), t);
|
|
1071
1073
|
}
|
|
1072
|
-
function
|
|
1073
|
-
return
|
|
1074
|
+
function Ni(e, t) {
|
|
1075
|
+
return Mi(e, t) ?? "en";
|
|
1074
1076
|
}
|
|
1075
|
-
async function
|
|
1076
|
-
let t =
|
|
1077
|
+
async function Pi(e) {
|
|
1078
|
+
let t = wi[`./locales/${Ni(e, Di)}.ts`];
|
|
1077
1079
|
return (await t()).default;
|
|
1078
1080
|
}
|
|
1079
|
-
async function
|
|
1080
|
-
let t =
|
|
1081
|
+
async function Fi(e) {
|
|
1082
|
+
let t = Ti[`./locales/cloud/${Ni(e, Oi)}.ts`];
|
|
1081
1083
|
return (await t()).default;
|
|
1082
1084
|
}
|
|
1083
|
-
function
|
|
1084
|
-
return
|
|
1085
|
+
function Ii(e) {
|
|
1086
|
+
return Mi(e, Di) !== void 0;
|
|
1085
1087
|
}
|
|
1086
|
-
function
|
|
1087
|
-
return
|
|
1088
|
+
function Li(e) {
|
|
1089
|
+
return Mi(e, Oi) !== void 0;
|
|
1088
1090
|
}
|
|
1089
|
-
function
|
|
1090
|
-
return [...
|
|
1091
|
+
function Ri() {
|
|
1092
|
+
return [...Di];
|
|
1091
1093
|
}
|
|
1092
|
-
function
|
|
1093
|
-
return [...
|
|
1094
|
+
function zi() {
|
|
1095
|
+
return [...Oi];
|
|
1094
1096
|
}
|
|
1095
1097
|
// src/i18n/contentDefaults.ts
|
|
1096
|
-
var
|
|
1098
|
+
var Bi = {
|
|
1097
1099
|
en: {
|
|
1098
1100
|
video: "Video",
|
|
1099
1101
|
days: "Days",
|
|
@@ -1167,17 +1169,17 @@ var Ri = {
|
|
|
1167
1169
|
expired: "Dette tilbud er udløbet"
|
|
1168
1170
|
}
|
|
1169
1171
|
};
|
|
1170
|
-
Object.keys(
|
|
1171
|
-
var
|
|
1172
|
-
function
|
|
1173
|
-
if (!e) return
|
|
1174
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1175
|
-
if (n) return
|
|
1176
|
-
let r =
|
|
1177
|
-
return r ?
|
|
1178
|
-
}
|
|
1179
|
-
function
|
|
1180
|
-
let t =
|
|
1172
|
+
Object.keys(Bi);
|
|
1173
|
+
var Vi = new Map(Object.keys(Bi).map((e) => [e.toLowerCase(), e]));
|
|
1174
|
+
function Hi(e) {
|
|
1175
|
+
if (!e) return Bi.en;
|
|
1176
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Vi.get(t);
|
|
1177
|
+
if (n) return Bi[n];
|
|
1178
|
+
let r = Vi.get(ji(t));
|
|
1179
|
+
return r ? Bi[r] : Bi.en;
|
|
1180
|
+
}
|
|
1181
|
+
function Ui(e) {
|
|
1182
|
+
let t = Hi(e);
|
|
1181
1183
|
return {
|
|
1182
1184
|
video: { alt: t.video },
|
|
1183
1185
|
countdown: {
|
|
@@ -1190,9 +1192,9 @@ function Vi(e) {
|
|
|
1190
1192
|
};
|
|
1191
1193
|
}
|
|
1192
1194
|
// src/utils/collectColorFieldIssues.ts
|
|
1193
|
-
function
|
|
1195
|
+
function Wi(e, t) {
|
|
1194
1196
|
let n = [], r = (r, i) => {
|
|
1195
|
-
let a =
|
|
1197
|
+
let a = ar(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1196
1198
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1197
1199
|
id: s("invalid-presets"),
|
|
1198
1200
|
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." : "")
|
|
@@ -1203,8 +1205,8 @@ function Hi(e, t) {
|
|
|
1203
1205
|
id: s("allow-custom-ignored"),
|
|
1204
1206
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1205
1207
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1206
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1207
|
-
e !== "" && !t.has(
|
|
1208
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Ot(e)));
|
|
1209
|
+
e !== "" && !t.has(Ot(e)) && n.push({
|
|
1208
1210
|
id: s("off-palette-default"),
|
|
1209
1211
|
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.`
|
|
1210
1212
|
});
|
|
@@ -1215,7 +1217,7 @@ function Hi(e, t) {
|
|
|
1215
1217
|
return n;
|
|
1216
1218
|
}
|
|
1217
1219
|
// src/utils/keyboardShortcuts.ts
|
|
1218
|
-
function
|
|
1220
|
+
function Gi(e) {
|
|
1219
1221
|
for (let t of e.composedPath()) {
|
|
1220
1222
|
if (!(t instanceof HTMLElement)) continue;
|
|
1221
1223
|
if (t.isContentEditable) return !0;
|
|
@@ -1224,14 +1226,14 @@ function Ui(e) {
|
|
|
1224
1226
|
}
|
|
1225
1227
|
return !1;
|
|
1226
1228
|
}
|
|
1227
|
-
function
|
|
1229
|
+
function Ki(e, t) {
|
|
1228
1230
|
let n = e.metaKey || e.ctrlKey;
|
|
1229
1231
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1230
1232
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1231
|
-
if (
|
|
1233
|
+
if (Gi(e)) return;
|
|
1232
1234
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1233
1235
|
} else {
|
|
1234
|
-
if (t.isPicking?.() && !
|
|
1236
|
+
if (t.isPicking?.() && !Gi(e)) {
|
|
1235
1237
|
if (e.key === "Escape") {
|
|
1236
1238
|
e.preventDefault(), t.onCancelPick?.();
|
|
1237
1239
|
return;
|
|
@@ -1245,23 +1247,23 @@ function Wi(e, t) {
|
|
|
1245
1247
|
return;
|
|
1246
1248
|
}
|
|
1247
1249
|
}
|
|
1248
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1250
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Gi(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1249
1251
|
}
|
|
1250
1252
|
}
|
|
1251
1253
|
// src/utils/blockComponentResolver.ts
|
|
1252
|
-
function
|
|
1254
|
+
function qi(e, t) {
|
|
1253
1255
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1254
1256
|
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;
|
|
1255
1257
|
}
|
|
1256
|
-
function
|
|
1258
|
+
function Ji(e, t, n) {
|
|
1257
1259
|
if (t) {
|
|
1258
1260
|
let n = t.getComponent(e);
|
|
1259
1261
|
if (n) return n;
|
|
1260
1262
|
}
|
|
1261
1263
|
return n[e.type] ?? null;
|
|
1262
1264
|
}
|
|
1263
|
-
var
|
|
1264
|
-
function
|
|
1265
|
+
var Yi = "--tpl-block-bg-layer", Xi = "--tpl-email-frame-width", Zi = "tpl-has-bg-image";
|
|
1266
|
+
function Qi(e, t) {
|
|
1265
1267
|
if (t === null) return {};
|
|
1266
1268
|
let n = Re(e);
|
|
1267
1269
|
if (n === null) return {};
|
|
@@ -1271,31 +1273,31 @@ function Xi(e, t) {
|
|
|
1271
1273
|
backgroundSize: n.size,
|
|
1272
1274
|
backgroundPosition: n.position,
|
|
1273
1275
|
backgroundRepeat: n.repeat,
|
|
1274
|
-
[
|
|
1276
|
+
[Yi]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1275
1277
|
};
|
|
1276
1278
|
}
|
|
1277
|
-
function
|
|
1278
|
-
return e &&
|
|
1279
|
+
function $i(e) {
|
|
1280
|
+
return e && Yi in e ? Zi : void 0;
|
|
1279
1281
|
}
|
|
1280
|
-
var
|
|
1282
|
+
var ea = {
|
|
1281
1283
|
top: "flex-start",
|
|
1282
1284
|
middle: "center",
|
|
1283
1285
|
bottom: "flex-end"
|
|
1284
1286
|
};
|
|
1285
|
-
function
|
|
1286
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1287
|
+
function ta(e, t) {
|
|
1288
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${na(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1287
1289
|
return {
|
|
1288
1290
|
display: "flex",
|
|
1289
1291
|
flexDirection: "column",
|
|
1290
|
-
justifyContent:
|
|
1292
|
+
justifyContent: ea[e.verticalAlign],
|
|
1291
1293
|
boxSizing: "border-box",
|
|
1292
1294
|
...n
|
|
1293
1295
|
};
|
|
1294
1296
|
}
|
|
1295
|
-
function
|
|
1297
|
+
function na(e, t) {
|
|
1296
1298
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1297
1299
|
}
|
|
1298
|
-
function
|
|
1300
|
+
function ra(e, t = {}) {
|
|
1299
1301
|
if (e.type === "wrapper") return {};
|
|
1300
1302
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1301
1303
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
@@ -1305,59 +1307,59 @@ function ta(e, t = {}) {
|
|
|
1305
1307
|
let n = dt(e.borderRadius);
|
|
1306
1308
|
n !== null && (i.borderRadius = n);
|
|
1307
1309
|
let r = Be(e);
|
|
1308
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1310
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, ta(r, t.heroBoxWidth)), Object.assign(i, Qi({
|
|
1309
1311
|
...e.backgroundImage,
|
|
1310
1312
|
size: "cover",
|
|
1311
1313
|
repeat: !1
|
|
1312
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1314
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, aa(e.border)), Object.assign(i, Qi(e.backgroundImage, t.backgroundImageUrl)));
|
|
1313
1315
|
}
|
|
1314
1316
|
return i;
|
|
1315
1317
|
}
|
|
1316
|
-
function
|
|
1317
|
-
return e.type === "section" ?
|
|
1318
|
-
backgroundImageUrl:
|
|
1318
|
+
function ia(e, t, n, r) {
|
|
1319
|
+
return e.type === "section" ? ra(e, {
|
|
1320
|
+
backgroundImageUrl: Vn(t, e.backgroundImage, n),
|
|
1319
1321
|
heroBoxWidth: r
|
|
1320
|
-
}) :
|
|
1322
|
+
}) : ra(e);
|
|
1321
1323
|
}
|
|
1322
|
-
function
|
|
1324
|
+
function aa(e) {
|
|
1323
1325
|
let t = {};
|
|
1324
1326
|
for (let [n, r] of Object.entries(Ye(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1325
1327
|
return t;
|
|
1326
1328
|
}
|
|
1327
|
-
var
|
|
1329
|
+
var oa = {
|
|
1328
1330
|
width: "100cqw",
|
|
1329
1331
|
maxWidth: "none",
|
|
1330
1332
|
marginInline: "calc(50% - 50cqw)",
|
|
1331
1333
|
boxSizing: "border-box"
|
|
1332
1334
|
};
|
|
1333
|
-
function
|
|
1335
|
+
function sa(e) {
|
|
1334
1336
|
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1335
1337
|
}
|
|
1336
|
-
function
|
|
1338
|
+
function ca(e) {
|
|
1337
1339
|
let t = {
|
|
1338
1340
|
width: "var(--tpl-email-frame-width)",
|
|
1339
1341
|
maxWidth: "100%",
|
|
1340
1342
|
marginInline: "auto",
|
|
1341
1343
|
boxSizing: "border-box"
|
|
1342
1344
|
};
|
|
1343
|
-
return e && (t.padding =
|
|
1345
|
+
return e && (t.padding = sa(e)), t;
|
|
1344
1346
|
}
|
|
1345
|
-
function
|
|
1347
|
+
function la(e, t = {}) {
|
|
1346
1348
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1347
1349
|
let n = e.wrapper, r = {};
|
|
1348
|
-
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding =
|
|
1350
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = sa(n.padding)), !n.fullWidth) {
|
|
1349
1351
|
let e = dt(n.borderRadius);
|
|
1350
1352
|
e !== null && (r.borderRadius = e);
|
|
1351
1353
|
}
|
|
1352
|
-
return Object.assign(r,
|
|
1354
|
+
return Object.assign(r, Qi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, oa), r;
|
|
1353
1355
|
}
|
|
1354
|
-
function
|
|
1356
|
+
function ua(e, t = {}) {
|
|
1355
1357
|
if (e.type !== "wrapper") return null;
|
|
1356
1358
|
let n = {};
|
|
1357
|
-
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding =
|
|
1359
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = sa(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Qi(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, oa), n;
|
|
1358
1360
|
}
|
|
1359
1361
|
// src/utils/mergeTagLabelSegments.ts
|
|
1360
|
-
function
|
|
1362
|
+
function da(e, t, n, r = !1) {
|
|
1361
1363
|
if (!e) return [];
|
|
1362
1364
|
let i = [], a = 0;
|
|
1363
1365
|
for (let o of He(e, n)) {
|
|
@@ -1375,7 +1377,7 @@ function la(e, t, n, r = !1) {
|
|
|
1375
1377
|
type: "text",
|
|
1376
1378
|
value: e
|
|
1377
1379
|
});
|
|
1378
|
-
} else
|
|
1380
|
+
} else St(s, n) ? i.push({
|
|
1379
1381
|
type: "tag",
|
|
1380
1382
|
value: $e(s, n)
|
|
1381
1383
|
}) : i.push({
|
|
@@ -1390,27 +1392,27 @@ function la(e, t, n, r = !1) {
|
|
|
1390
1392
|
}), i;
|
|
1391
1393
|
}
|
|
1392
1394
|
// src/components/MergeTagPreviewText.vue
|
|
1393
|
-
var
|
|
1395
|
+
var fa = B({
|
|
1394
1396
|
name: "MergeTagPreviewText",
|
|
1395
1397
|
props: { text: {
|
|
1396
1398
|
type: String,
|
|
1397
1399
|
required: !0
|
|
1398
1400
|
} },
|
|
1399
1401
|
setup(e) {
|
|
1400
|
-
let t = z(
|
|
1402
|
+
let t = z(Xt, tn), n = z(Lt, qe.liquid), r = z(Sn, null), i = k(() => da(e.text, t.value, n, r?.value ?? !1));
|
|
1401
1403
|
return () => i.value.map((e, t) => e.type === "tag" ? x("span", {
|
|
1402
1404
|
key: t,
|
|
1403
1405
|
class: "tpl-merge-tag-label"
|
|
1404
1406
|
}, e.value) : e.value);
|
|
1405
1407
|
}
|
|
1406
|
-
}),
|
|
1408
|
+
}), pa = ["href"], ma = /* @__PURE__ */ B({
|
|
1407
1409
|
__name: "ButtonBlock",
|
|
1408
1410
|
props: {
|
|
1409
1411
|
block: {},
|
|
1410
1412
|
viewport: {}
|
|
1411
1413
|
},
|
|
1412
1414
|
setup(e) {
|
|
1413
|
-
let t = e, n =
|
|
1415
|
+
let t = e, n = Nn(un, "ButtonBlock");
|
|
1414
1416
|
function r(e) {
|
|
1415
1417
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1416
1418
|
}
|
|
@@ -1427,27 +1429,27 @@ var ua = B({
|
|
|
1427
1429
|
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : dt(t.block.borderRadius) ?? "0px",
|
|
1428
1430
|
textAlign: "center"
|
|
1429
1431
|
};
|
|
1430
|
-
return Object.assign(e,
|
|
1432
|
+
return Object.assign(e, aa(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1431
1433
|
}), o = k(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1432
1434
|
return (t, n) => (m(), N("div", { style: y(o.value) }, [P("a", {
|
|
1433
1435
|
href: e.block.url || "#",
|
|
1434
1436
|
style: y(a.value),
|
|
1435
1437
|
class: "tpl:cursor-default",
|
|
1436
1438
|
onClick: n[0] ||= i(() => {}, ["prevent"])
|
|
1437
|
-
}, [E(
|
|
1439
|
+
}, [E(fa, { text: e.block.text }, null, 8, ["text"])], 12, pa)], 4));
|
|
1438
1440
|
}
|
|
1439
|
-
}),
|
|
1441
|
+
}), ha = ["innerHTML"], ga = [
|
|
1440
1442
|
"src",
|
|
1441
1443
|
"width",
|
|
1442
1444
|
"height"
|
|
1443
|
-
],
|
|
1445
|
+
], _a = /* @__PURE__ */ B({
|
|
1444
1446
|
__name: "CustomBlockIcon",
|
|
1445
1447
|
props: {
|
|
1446
1448
|
icon: {},
|
|
1447
1449
|
size: {}
|
|
1448
1450
|
},
|
|
1449
1451
|
setup(e) {
|
|
1450
|
-
let t = e, n = k(() => t.size ?? 20), r = k(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = k(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = k(() => r.value ?
|
|
1452
|
+
let t = e, n = k(() => t.size ?? 20), r = k(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = k(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = k(() => r.value ? pr(t.icon ?? "") : "");
|
|
1451
1453
|
return (t, o) => r.value ? (m(), N("span", {
|
|
1452
1454
|
key: 0,
|
|
1453
1455
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1456,33 +1458,33 @@ var ua = B({
|
|
|
1456
1458
|
height: `${n.value}px`
|
|
1457
1459
|
}),
|
|
1458
1460
|
innerHTML: a.value
|
|
1459
|
-
}, null, 12,
|
|
1461
|
+
}, null, 12, ha)) : i.value ? (m(), N("img", {
|
|
1460
1462
|
key: 1,
|
|
1461
1463
|
src: e.icon,
|
|
1462
1464
|
width: n.value,
|
|
1463
1465
|
height: n.value,
|
|
1464
1466
|
class: "tpl:inline-block",
|
|
1465
1467
|
alt: ""
|
|
1466
|
-
}, null, 8,
|
|
1468
|
+
}, null, 8, ga)) : (m(), R(A(Mr), {
|
|
1467
1469
|
key: 2,
|
|
1468
1470
|
size: n.value,
|
|
1469
1471
|
"stroke-width": 1.5
|
|
1470
1472
|
}, null, 8, ["size"]));
|
|
1471
1473
|
}
|
|
1472
|
-
}),
|
|
1474
|
+
}), va = { class: "tpl:w-full" }, ya = {
|
|
1473
1475
|
key: 0,
|
|
1474
1476
|
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)]"
|
|
1475
|
-
},
|
|
1477
|
+
}, ba = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xa = {
|
|
1476
1478
|
key: 1,
|
|
1477
1479
|
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)]"
|
|
1478
|
-
},
|
|
1480
|
+
}, Sa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ca = {
|
|
1479
1481
|
key: 2,
|
|
1480
1482
|
class: "tpl:relative"
|
|
1481
|
-
},
|
|
1483
|
+
}, wa = ["innerHTML"], Ta = {
|
|
1482
1484
|
key: 0,
|
|
1483
1485
|
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]",
|
|
1484
1486
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1485
|
-
},
|
|
1487
|
+
}, Ea = /* @__PURE__ */ B({
|
|
1486
1488
|
__name: "CustomBlock",
|
|
1487
1489
|
props: {
|
|
1488
1490
|
block: {},
|
|
@@ -1490,7 +1492,7 @@ var ua = B({
|
|
|
1490
1492
|
},
|
|
1491
1493
|
emits: ["fetchData"],
|
|
1492
1494
|
setup(e, { emit: t }) {
|
|
1493
|
-
let n = e, r = t, { t: a } = ce(), o = z(
|
|
1495
|
+
let n = e, r = t, { t: a } = ce(), o = z(xn, null), l = M(""), u = k(() => mr(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 } = Bn({
|
|
1494
1496
|
definition: p,
|
|
1495
1497
|
block: g,
|
|
1496
1498
|
onUpdate: (e, t) => {
|
|
@@ -1499,7 +1501,7 @@ var ua = B({
|
|
|
1499
1501
|
dataSourceFetched: t
|
|
1500
1502
|
});
|
|
1501
1503
|
}
|
|
1502
|
-
}), x = z(
|
|
1504
|
+
}), x = z(Xt, tn), S = z(Sn, null), C = k(() => {
|
|
1503
1505
|
if (!S?.value) return n.block;
|
|
1504
1506
|
let e = {};
|
|
1505
1507
|
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? _t(r, x.value) : r;
|
|
@@ -1526,10 +1528,10 @@ var ua = B({
|
|
|
1526
1528
|
T();
|
|
1527
1529
|
}, { deep: !0 }), c(() => S?.value, () => {
|
|
1528
1530
|
T();
|
|
1529
|
-
}), (e, t) => (m(), N("div",
|
|
1531
|
+
}), (e, t) => (m(), N("div", va, [h.value ? f.value ? (m(), N("div", xa, [E(A(_r), {
|
|
1530
1532
|
size: 24,
|
|
1531
1533
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1532
|
-
}), P("span",
|
|
1534
|
+
}), P("span", Sa, d(A(a).customBlocks.renderError), 1)])) : (m(), N("div", Ca, [P("div", { innerHTML: u.value }, null, 8, wa), A(b) && A(y) ? (m(), N("div", Ta, [A(_) ? (m(), R(gr, {
|
|
1533
1535
|
key: 1,
|
|
1534
1536
|
class: "tpl:w-48"
|
|
1535
1537
|
})) : (m(), N("button", {
|
|
@@ -1537,16 +1539,16 @@ var ua = B({
|
|
|
1537
1539
|
type: "button",
|
|
1538
1540
|
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)]",
|
|
1539
1541
|
onClick: t[0] ||= i((...e) => A(v) && A(v)(...e), ["stop"])
|
|
1540
|
-
}, [p.value?.icon ? (m(), R(
|
|
1542
|
+
}, [p.value?.icon ? (m(), R(_a, {
|
|
1541
1543
|
key: 0,
|
|
1542
1544
|
icon: p.value.icon,
|
|
1543
1545
|
size: 16
|
|
1544
|
-
}, null, 8, ["icon"])) : j("", !0), te(" " + d(p.value?.dataSource?.label || A(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (m(), N("div",
|
|
1546
|
+
}, null, 8, ["icon"])) : j("", !0), te(" " + d(p.value?.dataSource?.label || A(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (m(), N("div", ya, [E(A(Ir), {
|
|
1545
1547
|
size: 24,
|
|
1546
1548
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1547
|
-
}), P("span",
|
|
1549
|
+
}), P("span", ba, d(A(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1548
1550
|
}
|
|
1549
|
-
}),
|
|
1551
|
+
}), Da = { class: "tpl:w-full" }, Oa = /* @__PURE__ */ B({
|
|
1550
1552
|
__name: "DividerBlock",
|
|
1551
1553
|
props: {
|
|
1552
1554
|
block: {},
|
|
@@ -1558,28 +1560,28 @@ var ua = B({
|
|
|
1558
1560
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1559
1561
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1560
1562
|
}));
|
|
1561
|
-
return (e, t) => (m(), N("div",
|
|
1563
|
+
return (e, t) => (m(), N("div", Da, [P("hr", {
|
|
1562
1564
|
class: "tpl:m-0 tpl:border-none",
|
|
1563
1565
|
style: y(n.value)
|
|
1564
1566
|
}, null, 4)]));
|
|
1565
1567
|
}
|
|
1566
|
-
}),
|
|
1568
|
+
}), ka = { class: "tpl:w-full" }, Aa = ["srcdoc", "title"], ja = {
|
|
1567
1569
|
key: 1,
|
|
1568
1570
|
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)]"
|
|
1569
|
-
},
|
|
1571
|
+
}, Ma = {
|
|
1570
1572
|
key: 0,
|
|
1571
1573
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1572
|
-
},
|
|
1574
|
+
}, Na = {
|
|
1573
1575
|
key: 1,
|
|
1574
1576
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1575
|
-
},
|
|
1577
|
+
}, Pa = /* @__PURE__ */ B({
|
|
1576
1578
|
__name: "HtmlBlock",
|
|
1577
1579
|
props: {
|
|
1578
1580
|
block: {},
|
|
1579
1581
|
viewport: {}
|
|
1580
1582
|
},
|
|
1581
1583
|
setup(e) {
|
|
1582
|
-
let t = e, { t: n } = ce(), r = z(
|
|
1584
|
+
let t = e, { t: n } = ce(), r = z(Qt, !1), i = k(() => t.block.content.trim().length > 0), a = k(() => r && i.value), o = z(Xt, tn), s = z(Sn, null), l = k(() => s?.value ? _t(t.block.content, o.value) : t.block.content), u = M(null), f = M(60), p = null;
|
|
1583
1585
|
function h() {
|
|
1584
1586
|
let e = u.value?.contentDocument;
|
|
1585
1587
|
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1593,7 +1595,7 @@ var ua = B({
|
|
|
1593
1595
|
e || (p?.disconnect(), p = null);
|
|
1594
1596
|
}), re(() => {
|
|
1595
1597
|
p?.disconnect(), p = null;
|
|
1596
|
-
}), (e, t) => (m(), N("div",
|
|
1598
|
+
}), (e, t) => (m(), N("div", ka, [a.value ? (m(), N("iframe", {
|
|
1597
1599
|
key: 0,
|
|
1598
1600
|
ref_key: "iframeRef",
|
|
1599
1601
|
ref: u,
|
|
@@ -1603,18 +1605,18 @@ var ua = B({
|
|
|
1603
1605
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1604
1606
|
style: y({ height: `${f.value}px` }),
|
|
1605
1607
|
onLoad: g
|
|
1606
|
-
}, null, 44,
|
|
1608
|
+
}, null, 44, Aa)) : (m(), N("div", ja, [E(A(er), {
|
|
1607
1609
|
size: 24,
|
|
1608
1610
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1609
|
-
}), i.value ? (m(), N("span",
|
|
1611
|
+
}), i.value ? (m(), N("span", Ma, d(A(n).html.preview), 1)) : (m(), N("span", Na, d(A(n).html.empty), 1))]))]));
|
|
1610
1612
|
}
|
|
1611
|
-
}),
|
|
1613
|
+
}), Fa = ["data-drop-enabled"], Ia = ["href"], La = ["src", "alt"], Ra = ["src", "alt"], za = {
|
|
1612
1614
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1613
1615
|
style: { opacity: "0.7" }
|
|
1614
|
-
},
|
|
1616
|
+
}, Ba = ["href"], Va = ["src", "alt"], Ha = ["src", "alt"], Ua = {
|
|
1615
1617
|
key: 4,
|
|
1616
1618
|
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)]"
|
|
1617
|
-
},
|
|
1619
|
+
}, Wa = ["aria-label"], Ga = { key: 1 }, Ka = /* @__PURE__ */ B({
|
|
1618
1620
|
__name: "ImageBlock",
|
|
1619
1621
|
props: {
|
|
1620
1622
|
block: {},
|
|
@@ -1626,11 +1628,11 @@ var ua = B({
|
|
|
1626
1628
|
function c(e) {
|
|
1627
1629
|
let t = {
|
|
1628
1630
|
src: e.url,
|
|
1629
|
-
|
|
1631
|
+
...$n(Xn(e.width, e.height))
|
|
1630
1632
|
};
|
|
1631
1633
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1632
1634
|
}
|
|
1633
|
-
let l = M(), { canBrowse: u, dropEnabled: f, isUploading: p, showOverlay: h, openMediaBrowser: g } =
|
|
1635
|
+
let l = M(), { canBrowse: u, dropEnabled: f, isUploading: p, showOverlay: h, openMediaBrowser: g } = ir({
|
|
1634
1636
|
target: l,
|
|
1635
1637
|
blocked: s,
|
|
1636
1638
|
apply: c
|
|
@@ -1644,12 +1646,12 @@ var ua = B({
|
|
|
1644
1646
|
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1645
1647
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1646
1648
|
borderRadius: dt(n.block.borderRadius) ?? void 0,
|
|
1647
|
-
...
|
|
1649
|
+
...aa(n.block.border),
|
|
1648
1650
|
display: "block",
|
|
1649
1651
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1650
1652
|
marginRight: e === "center" ? "auto" : void 0
|
|
1651
1653
|
};
|
|
1652
|
-
}), x =
|
|
1654
|
+
}), x = Jn(() => s.value ? void 0 : n.block.src), S = Jn(() => s.value ? n.block.placeholderUrl : void 0);
|
|
1653
1655
|
return (t, n) => (m(), N("div", {
|
|
1654
1656
|
ref_key: "dropZoneRef",
|
|
1655
1657
|
ref: l,
|
|
@@ -1657,7 +1659,7 @@ var ua = B({
|
|
|
1657
1659
|
"data-drop-enabled": A(f),
|
|
1658
1660
|
class: "tpl:relative tpl:w-full",
|
|
1659
1661
|
style: y(_.value)
|
|
1660
|
-
}, [A(h) ? (m(), R(
|
|
1662
|
+
}, [A(h) ? (m(), R(Qn, {
|
|
1661
1663
|
key: 0,
|
|
1662
1664
|
uploading: A(p),
|
|
1663
1665
|
size: "canvas"
|
|
@@ -1673,22 +1675,22 @@ var ua = B({
|
|
|
1673
1675
|
src: A(S),
|
|
1674
1676
|
alt: e.block.alt || A(a).image.altTextPlaceholder,
|
|
1675
1677
|
style: y(b.value)
|
|
1676
|
-
}, null, 12,
|
|
1678
|
+
}, null, 12, La)], 8, Ia)) : (m(), N("img", {
|
|
1677
1679
|
key: 1,
|
|
1678
1680
|
class: "tpl:border-0",
|
|
1679
1681
|
src: A(S),
|
|
1680
1682
|
alt: e.block.alt,
|
|
1681
1683
|
style: y(b.value)
|
|
1682
|
-
}, null, 12,
|
|
1684
|
+
}, null, 12, Ra))], 64)) : e.block.src && s.value ? (m(), N("div", {
|
|
1683
1685
|
key: 2,
|
|
1684
1686
|
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)]",
|
|
1685
1687
|
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, b.value])
|
|
1686
|
-
}, [E(A(
|
|
1688
|
+
}, [E(A(vr), {
|
|
1687
1689
|
size: 32,
|
|
1688
1690
|
"stroke-width": 1.5,
|
|
1689
1691
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1690
1692
|
style: { opacity: "0.5" }
|
|
1691
|
-
}), P("span",
|
|
1693
|
+
}), P("span", za, [E(fa, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (m(), N(L, { key: 3 }, [e.block.linkUrl ? (m(), N("a", {
|
|
1692
1694
|
key: 0,
|
|
1693
1695
|
href: e.block.linkUrl,
|
|
1694
1696
|
target: "_blank",
|
|
@@ -1700,33 +1702,33 @@ var ua = B({
|
|
|
1700
1702
|
src: A(x),
|
|
1701
1703
|
alt: e.block.alt || A(a).image.altTextPlaceholder,
|
|
1702
1704
|
style: y(b.value)
|
|
1703
|
-
}, null, 12,
|
|
1705
|
+
}, null, 12, Va)], 8, Ba)) : (m(), N("img", {
|
|
1704
1706
|
key: 1,
|
|
1705
1707
|
class: "tpl:border-0",
|
|
1706
1708
|
src: A(x),
|
|
1707
1709
|
alt: e.block.alt,
|
|
1708
1710
|
style: y(b.value)
|
|
1709
|
-
}, null, 12,
|
|
1711
|
+
}, null, 12, Ha))], 64)) : (m(), N("div", Ua, [A(u) ? (m(), N("button", {
|
|
1710
1712
|
key: 0,
|
|
1711
1713
|
"aria-label": A(a).image.browseMedia,
|
|
1712
1714
|
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)]",
|
|
1713
1715
|
onClick: n[2] ||= i((...e) => A(g) && A(g)(...e), ["stop"])
|
|
1714
|
-
}, [E(A(
|
|
1716
|
+
}, [E(A(vr), {
|
|
1715
1717
|
size: 14,
|
|
1716
1718
|
"stroke-width": 1.5
|
|
1717
|
-
}), te(" " + d(A(a).image.browseMedia), 1)], 8,
|
|
1719
|
+
}), te(" " + d(A(a).image.browseMedia), 1)], 8, Wa)) : (m(), N("span", Ga, d(A(a).image.clickToAdd), 1))]))], 12, Fa));
|
|
1718
1720
|
}
|
|
1719
|
-
}),
|
|
1721
|
+
}), qa = { class: "tpl:w-full" }, Ja = ["href"], Ya = {
|
|
1720
1722
|
key: 1,
|
|
1721
1723
|
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)]"
|
|
1722
|
-
},
|
|
1724
|
+
}, Xa = /* @__PURE__ */ B({
|
|
1723
1725
|
__name: "MenuBlock",
|
|
1724
1726
|
props: {
|
|
1725
1727
|
block: {},
|
|
1726
1728
|
viewport: {}
|
|
1727
1729
|
},
|
|
1728
1730
|
setup(e) {
|
|
1729
|
-
let t = e, { t: n } = ce(), r =
|
|
1731
|
+
let t = e, { t: n } = ce(), r = Nn(un, "MenuBlock"), a = k(() => ({
|
|
1730
1732
|
display: "flex",
|
|
1731
1733
|
flexWrap: "wrap",
|
|
1732
1734
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1738,7 +1740,7 @@ var ua = B({
|
|
|
1738
1740
|
function s(e) {
|
|
1739
1741
|
return e || t.block.linkColor || t.block.color;
|
|
1740
1742
|
}
|
|
1741
|
-
return (t, r) => (m(), N("div",
|
|
1743
|
+
return (t, r) => (m(), N("div", qa, [o.value ? (m(), N("div", {
|
|
1742
1744
|
key: 0,
|
|
1743
1745
|
style: y(a.value)
|
|
1744
1746
|
}, [(m(!0), N(L, null, v(e.block.items, (t, n) => (m(), N(L, { key: t.id }, [P("a", {
|
|
@@ -1750,49 +1752,49 @@ var ua = B({
|
|
|
1750
1752
|
textDecoration: t.underline ? "underline" : "none"
|
|
1751
1753
|
}),
|
|
1752
1754
|
onClick: r[0] ||= i(() => {}, ["prevent"])
|
|
1753
|
-
}, [E(
|
|
1755
|
+
}, [E(fa, { text: t.text || "..." }, null, 8, ["text"])], 12, Ja), n < e.block.items.length - 1 ? (m(), N("span", {
|
|
1754
1756
|
key: 0,
|
|
1755
1757
|
style: y({
|
|
1756
1758
|
color: e.block.separatorColor,
|
|
1757
1759
|
padding: `0 ${e.block.spacing}px`
|
|
1758
1760
|
})
|
|
1759
|
-
}, d(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (m(), N("div",
|
|
1761
|
+
}, d(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (m(), N("div", Ya, [E(A(Kn), { size: 16 }), P("span", null, d(A(n).menu.addLinks), 1)]))]));
|
|
1760
1762
|
}
|
|
1761
1763
|
});
|
|
1762
1764
|
// src/composables/useEditableTextBlock.ts
|
|
1763
|
-
function
|
|
1764
|
-
let t = z(
|
|
1765
|
-
c(() =>
|
|
1766
|
-
e && (
|
|
1765
|
+
function Za(e) {
|
|
1766
|
+
let t = z(Xt, tn), r = z(Sn, null), i = z(mn, null), a = z(an, null), { syntax: o } = V(), s = k(() => r?.value ? ut(e(), t.value) : Ee(e(), t.value)), l = k(() => i?.value ? xt(e(), t.value, o) : be(s.value, o)), u = k(() => ft(mr(l.value))), d = M(!1);
|
|
1767
|
+
c(() => a?.value, (e) => {
|
|
1768
|
+
e && (d.value = !1);
|
|
1767
1769
|
});
|
|
1768
|
-
let
|
|
1769
|
-
top:
|
|
1770
|
-
left:
|
|
1770
|
+
let f = M(null), { top: p, left: m } = n(f), { toLocal: h } = Nt(), g = k(() => h({
|
|
1771
|
+
top: p.value - 8,
|
|
1772
|
+
left: m.value
|
|
1771
1773
|
}));
|
|
1772
|
-
function
|
|
1773
|
-
|
|
1774
|
+
function _() {
|
|
1775
|
+
a?.value || (d.value = !0);
|
|
1774
1776
|
}
|
|
1775
|
-
function
|
|
1776
|
-
|
|
1777
|
+
function v() {
|
|
1778
|
+
d.value = !1;
|
|
1777
1779
|
}
|
|
1778
1780
|
return {
|
|
1779
|
-
isEditing:
|
|
1780
|
-
blockRef:
|
|
1781
|
-
toolbarPosition:
|
|
1782
|
-
resolvedContent:
|
|
1783
|
-
handleDoubleClick:
|
|
1784
|
-
handleEditorDone:
|
|
1781
|
+
isEditing: d,
|
|
1782
|
+
blockRef: f,
|
|
1783
|
+
toolbarPosition: g,
|
|
1784
|
+
resolvedContent: u,
|
|
1785
|
+
handleDoubleClick: _,
|
|
1786
|
+
handleEditorDone: v
|
|
1785
1787
|
};
|
|
1786
1788
|
}
|
|
1787
1789
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1788
|
-
var
|
|
1790
|
+
var Qa = ["innerHTML"], $a = /* @__PURE__ */ B({
|
|
1789
1791
|
__name: "ParagraphBlock",
|
|
1790
1792
|
props: {
|
|
1791
1793
|
block: {},
|
|
1792
1794
|
viewport: {}
|
|
1793
1795
|
},
|
|
1794
1796
|
setup(e) {
|
|
1795
|
-
let t = e, n = oe(() => import("./ParagraphEditor-
|
|
1797
|
+
let t = e, n = oe(() => import("./ParagraphEditor-Db1cmj8Y.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Za(() => t.block.content);
|
|
1796
1798
|
return (t, l) => (m(), N("div", {
|
|
1797
1799
|
ref_key: "blockRef",
|
|
1798
1800
|
ref: i,
|
|
@@ -1811,11 +1813,11 @@ var Xa = ["innerHTML"], Za = /* @__PURE__ */ B({
|
|
|
1811
1813
|
key: 1,
|
|
1812
1814
|
class: "tpl-text-content tpl:outline-none",
|
|
1813
1815
|
innerHTML: A(o)
|
|
1814
|
-
}, null, 8,
|
|
1816
|
+
}, null, 8, Qa))], 544));
|
|
1815
1817
|
}
|
|
1816
1818
|
});
|
|
1817
1819
|
// src/utils/updateBlockList.ts
|
|
1818
|
-
function
|
|
1820
|
+
function eo(e, t, n, r = 0, i) {
|
|
1819
1821
|
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);
|
|
1820
1822
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1821
1823
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1828,7 +1830,7 @@ function Qa(e, t, n, r = 0, i) {
|
|
|
1828
1830
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1829
1831
|
}
|
|
1830
1832
|
// src/utils/mergeTagTokens.ts
|
|
1831
|
-
function
|
|
1833
|
+
function to(e, t, n) {
|
|
1832
1834
|
let r = [], i = "\0MT";
|
|
1833
1835
|
for (; e.includes(i);) i += "_";
|
|
1834
1836
|
let a = n === "html" ? _e(e, (e) => {
|
|
@@ -1863,44 +1865,44 @@ function $a(e, t, n) {
|
|
|
1863
1865
|
}
|
|
1864
1866
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1865
1867
|
}
|
|
1866
|
-
function
|
|
1867
|
-
return JSON.stringify(
|
|
1868
|
+
function no(e, t, n, r) {
|
|
1869
|
+
return JSON.stringify(to(e, n, r)) !== JSON.stringify(to(t, n, r));
|
|
1868
1870
|
}
|
|
1869
1871
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1870
|
-
var
|
|
1872
|
+
var ro = [
|
|
1871
1873
|
"data-state",
|
|
1872
1874
|
"aria-label",
|
|
1873
1875
|
"title",
|
|
1874
1876
|
"aria-expanded",
|
|
1875
1877
|
"aria-controls",
|
|
1876
1878
|
"onKeydown"
|
|
1877
|
-
],
|
|
1879
|
+
], io = [
|
|
1878
1880
|
"aria-label",
|
|
1879
1881
|
"aria-labelledby",
|
|
1880
1882
|
"aria-describedby",
|
|
1881
1883
|
"onKeydown"
|
|
1882
|
-
],
|
|
1884
|
+
], ao = ["id"], oo = ["id"], so = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, co = ["disabled"], lo = {
|
|
1883
1885
|
key: 0,
|
|
1884
1886
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1885
|
-
},
|
|
1887
|
+
}, uo = {
|
|
1886
1888
|
key: 1,
|
|
1887
1889
|
class: "tpl:m-0"
|
|
1888
|
-
},
|
|
1890
|
+
}, fo = { class: "tpl:m-0" }, po = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, mo = {
|
|
1889
1891
|
key: 3,
|
|
1890
1892
|
class: "tpl:m-0"
|
|
1891
|
-
},
|
|
1893
|
+
}, ho = {
|
|
1892
1894
|
key: 4,
|
|
1893
1895
|
class: "tpl:m-0"
|
|
1894
|
-
},
|
|
1896
|
+
}, go = {
|
|
1895
1897
|
key: 5,
|
|
1896
1898
|
class: "tpl:m-0"
|
|
1897
|
-
},
|
|
1899
|
+
}, _o = {
|
|
1898
1900
|
key: 6,
|
|
1899
1901
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1900
|
-
},
|
|
1902
|
+
}, vo = ["onClick"], yo = {
|
|
1901
1903
|
key: 7,
|
|
1902
1904
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1903
|
-
},
|
|
1905
|
+
}, bo = ["data-testid", "disabled"], xo = /*#__PURE__*/ Er(/* @__PURE__ */ B({
|
|
1904
1906
|
__name: "LocaleStatusChip",
|
|
1905
1907
|
props: {
|
|
1906
1908
|
blockId: {},
|
|
@@ -1920,24 +1922,24 @@ var to = [
|
|
|
1920
1922
|
},
|
|
1921
1923
|
emits: ["target"],
|
|
1922
1924
|
setup(e, { emit: t }) {
|
|
1923
|
-
let n = e, r = t, a = z(
|
|
1925
|
+
let n = e, r = t, a = z(Pn, null), s = z(Tn, null), l = z(zt, null), u = z(jn, "en") ?? "en", { t: f, format: g } = ce(), b = se(), x = jt(), { toLocal: S } = Nt(), C = M(null), w = M(null), T = M(!1), E = M(!1), D = M(null), O = M(null), te = null, re = M({
|
|
1924
1926
|
top: 0,
|
|
1925
1927
|
left: 0
|
|
1926
1928
|
}), ie = M({
|
|
1927
1929
|
maxHeight: 0,
|
|
1928
1930
|
maxWidth: 0
|
|
1929
|
-
}), F = `tpl-locale-popover-${ct()}`, I = k(() =>
|
|
1931
|
+
}), F = `tpl-locale-popover-${ct()}`, I = k(() => xr(a?.activeLocale?.value ?? "")), ae = k(() => xr(a?.content.value.settings.locale ?? "en"));
|
|
1930
1932
|
function oe(e, t) {
|
|
1931
1933
|
switch (e) {
|
|
1932
1934
|
case "tags-differ": return f.localization.tagsDiffer;
|
|
1933
1935
|
case "hidden": return g(f.localization.hidden, { language: I.value });
|
|
1934
1936
|
case "changed": return g(f.localization.changed, { language: I.value });
|
|
1935
|
-
case "default-stale": return
|
|
1936
|
-
case "missing": return t === 1 ? f.localization.notTranslated :
|
|
1937
|
-
default: return t === 1 ? f.localization.outOfDate :
|
|
1937
|
+
case "default-stale": return Sr(f.localization.staleLanguages, t, u);
|
|
1938
|
+
case "missing": return t === 1 ? f.localization.notTranslated : Sr(f.localization.notTranslatedCount, t, u);
|
|
1939
|
+
default: return t === 1 ? f.localization.outOfDate : Sr(f.localization.staleCount, t, u);
|
|
1938
1940
|
}
|
|
1939
1941
|
}
|
|
1940
|
-
let B = k(() => oe(n.state, n.count)), V = k(() => n.popoverState ?? n.state), le = k(() => n.popoverCount ?? n.count), ue = k(() => oe(V.value, le.value)), de = k(() => n.state === "hidden" ?
|
|
1942
|
+
let B = k(() => oe(n.state, n.count)), V = k(() => n.popoverState ?? n.state), le = k(() => n.popoverCount ?? n.count), ue = k(() => oe(V.value, le.value)), de = k(() => n.state === "hidden" ? Nr : n.state === "changed" ? br : n.state === "default-stale" ? fr : n.state === "stale" ? yr : _r), fe = k(() => V.value === "default-stale" || (V.value === "missing" || V.value === "stale") && le.value > 1), pe = k(() => n.editable && n.eligibleGaps && s?.isAvailable.value);
|
|
1941
1943
|
function me(e = !1) {
|
|
1942
1944
|
T.value = !1, E.value = !1, te = null, e && C.value?.focus({ preventScroll: !0 });
|
|
1943
1945
|
}
|
|
@@ -2046,7 +2048,7 @@ var to = [
|
|
|
2046
2048
|
size: 12,
|
|
2047
2049
|
"stroke-width": 2,
|
|
2048
2050
|
"aria-hidden": "true"
|
|
2049
|
-
}))], 40,
|
|
2051
|
+
}))], 40, ro), A(x) && T.value ? (m(), R(ee, {
|
|
2050
2052
|
key: 0,
|
|
2051
2053
|
to: A(x)
|
|
2052
2054
|
}, [P("div", {
|
|
@@ -2072,80 +2074,80 @@ var to = [
|
|
|
2072
2074
|
P("h3", {
|
|
2073
2075
|
id: `${F}-question`,
|
|
2074
2076
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
2075
|
-
}, d(A(
|
|
2077
|
+
}, d(A(Sr)(A(f).localization.translationConfirmation, e.translationCount ?? 0, A(u))), 9, ao),
|
|
2076
2078
|
P("p", {
|
|
2077
2079
|
id: `${F}-warning`,
|
|
2078
2080
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
2079
|
-
}, d(A(g)(A(f).localization.translationDescription, { language: I.value })), 9,
|
|
2080
|
-
P("div",
|
|
2081
|
+
}, d(A(g)(A(f).localization.translationDescription, { language: I.value })), 9, oo),
|
|
2082
|
+
P("div", so, [P("button", {
|
|
2081
2083
|
ref_key: "confirmationCancel",
|
|
2082
2084
|
ref: O,
|
|
2083
2085
|
type: "button",
|
|
2084
2086
|
"data-testid": "translation-confirm-cancel",
|
|
2085
|
-
class: h(A(
|
|
2087
|
+
class: h(A(wr)),
|
|
2086
2088
|
onClick: Ee
|
|
2087
2089
|
}, d(A(f).localization.cancel), 3), P("button", {
|
|
2088
2090
|
type: "button",
|
|
2089
2091
|
"data-testid": "translation-confirm",
|
|
2090
|
-
class: h(A(
|
|
2092
|
+
class: h(A(Tr)),
|
|
2091
2093
|
disabled: !pe.value || !!A(s)?.running.value || !e.translationCount,
|
|
2092
2094
|
onClick: Oe
|
|
2093
|
-
}, d(A(
|
|
2095
|
+
}, d(A(Sr)(A(f).localization.translateAllFields, e.translationCount ?? 0, A(u))), 11, co)])
|
|
2094
2096
|
], 64)) : (m(), N(L, { key: 1 }, [
|
|
2095
|
-
fe.value ? (m(), N("p",
|
|
2096
|
-
V.value === "missing" ? (m(), N("p",
|
|
2097
|
+
fe.value ? (m(), N("p", lo, d(ue.value), 1)) : j("", !0),
|
|
2098
|
+
V.value === "missing" ? (m(), N("p", uo, d(A(g)(A(f).localization.missingExplanation, { default: ae.value })), 1)) : V.value === "stale" ? (m(), N(L, { key: 2 }, [P("p", fo, d(A(g)(A(f).localization.staleExplanation, { default: ae.value })), 1), P("p", po, d(A(g)(A(f).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : V.value === "tags-differ" ? (m(), N("p", mo, d(A(g)(A(f).localization.tagsDifferExplanation, { default: ae.value })), 1)) : V.value === "changed" ? (m(), N("p", ho, d(A(Sr)(A(f).localization.changedProperties, le.value, A(u), { default: ae.value })), 1)) : V.value === "hidden" ? (m(), N("p", go, d(A(g)(A(f).localization.hiddenExplanation, { language: I.value })), 1)) : (m(), N("ul", _o, [(m(!0), N(L, null, v(e.staleLocales, (e) => (m(), N("li", {
|
|
2097
2099
|
key: e,
|
|
2098
2100
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
2099
|
-
}, [P("span", null, d(A(
|
|
2101
|
+
}, [P("span", null, d(A(xr)(e)), 1), P("button", {
|
|
2100
2102
|
type: "button",
|
|
2101
|
-
class: h(A(
|
|
2103
|
+
class: h(A(Cr)),
|
|
2102
2104
|
onClick: (t) => we(e)
|
|
2103
|
-
}, d(A(f).localization.open), 11,
|
|
2104
|
-
e.editable && V.value !== "default-stale" ? (m(), N("div",
|
|
2105
|
+
}, d(A(f).localization.open), 11, vo)]))), 128))])),
|
|
2106
|
+
e.editable && V.value !== "default-stale" ? (m(), N("div", yo, [
|
|
2105
2107
|
pe.value && (V.value === "missing" || V.value === "stale" || V.value === "tags-differ") ? (m(), N("button", {
|
|
2106
2108
|
key: 0,
|
|
2107
2109
|
type: "button",
|
|
2108
2110
|
ref_key: "retranslate",
|
|
2109
2111
|
ref: D,
|
|
2110
2112
|
"data-testid": V.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
2111
|
-
class: h(A(
|
|
2113
|
+
class: h(A(wr)),
|
|
2112
2114
|
disabled: !!A(s)?.running.value,
|
|
2113
2115
|
onClick: Te
|
|
2114
|
-
}, d(V.value === "missing" ? A(f).localization.translate : A(f).localization.retranslate), 11,
|
|
2116
|
+
}, d(V.value === "missing" ? A(f).localization.translate : A(f).localization.retranslate), 11, bo)) : j("", !0),
|
|
2115
2117
|
V.value === "stale" || V.value === "tags-differ" ? (m(), N(L, { key: 1 }, [V.value === "stale" ? (m(), N("button", {
|
|
2116
2118
|
key: 0,
|
|
2117
2119
|
type: "button",
|
|
2118
2120
|
"data-testid": "locale-keep",
|
|
2119
|
-
class: h(pe.value ? A(
|
|
2121
|
+
class: h(pe.value ? A(Cr) : A(wr)),
|
|
2120
2122
|
onClick: xe
|
|
2121
2123
|
}, d(A(f).localization.keep), 3)) : j("", !0), P("button", {
|
|
2122
2124
|
type: "button",
|
|
2123
2125
|
"data-testid": "locale-use-default",
|
|
2124
|
-
class: h(V.value === "tags-differ" && !pe.value ? A(
|
|
2126
|
+
class: h(V.value === "tags-differ" && !pe.value ? A(wr) : A(Cr)),
|
|
2125
2127
|
onClick: n[0] ||= (t) => Se(V.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2126
2128
|
}, d(A(g)(A(f).localization.useDefaultLanguage, { default: ae.value })), 3)], 64)) : j("", !0),
|
|
2127
2129
|
V.value === "changed" ? (m(), N("button", {
|
|
2128
2130
|
key: 2,
|
|
2129
2131
|
type: "button",
|
|
2130
2132
|
"data-testid": "locale-reset",
|
|
2131
|
-
class: h(A(
|
|
2133
|
+
class: h(A(wr)),
|
|
2132
2134
|
onClick: n[1] ||= (t) => Se(e.setPaths)
|
|
2133
2135
|
}, d(A(f).localization.resetChanges), 3)) : j("", !0),
|
|
2134
2136
|
V.value === "hidden" ? (m(), N("button", {
|
|
2135
2137
|
key: 3,
|
|
2136
2138
|
type: "button",
|
|
2137
2139
|
"data-testid": "locale-show",
|
|
2138
|
-
class: h(A(
|
|
2140
|
+
class: h(A(wr)),
|
|
2139
2141
|
onClick: Ce
|
|
2140
2142
|
}, d(A(f).localization.show), 3)) : j("", !0)
|
|
2141
2143
|
])) : j("", !0)
|
|
2142
|
-
], 64))], 44,
|
|
2144
|
+
], 64))], 44, io)], 8, ["to"])) : j("", !0)], 64));
|
|
2143
2145
|
}
|
|
2144
|
-
}), [["__scopeId", "data-v-3343ae7d"]]),
|
|
2146
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), So = /* @__PURE__ */ B({
|
|
2145
2147
|
__name: "LocaleMarkers",
|
|
2146
2148
|
props: { block: {} },
|
|
2147
2149
|
setup(e) {
|
|
2148
|
-
let t = e, n = z(
|
|
2150
|
+
let t = e, n = z(Pn, null), r = z(Yt, void 0), i = z(gn, []), a = z(Lt, qe.liquid), o = z(_n, k(() => /* @__PURE__ */ new Set())), s = k(() => n?.activeLocale?.value), l = k(() => s.value ? t.block.l10n?.[s.value] : void 0), u = k(() => ({
|
|
2149
2151
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2150
2152
|
...t.block,
|
|
2151
2153
|
children: []
|
|
@@ -2159,8 +2161,8 @@ var to = [
|
|
|
2159
2161
|
stale: [],
|
|
2160
2162
|
translated: []
|
|
2161
2163
|
}), f = k(() => d.value.stale.map((e) => e.slice(t.block.id.length + 1))), p = k(() => d.value.translated.flatMap((e) => {
|
|
2162
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2163
|
-
return typeof r == "string" && i !== void 0 &&
|
|
2164
|
+
let n = e.slice(t.block.id.length + 1), r = Et(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || Ze[t.block.type]?.includes(n) ? "html" : "text";
|
|
2165
|
+
return typeof r == "string" && i !== void 0 && no(r, i, a, o) ? [n] : [];
|
|
2164
2166
|
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ? je(u.value, s.value, {
|
|
2165
2167
|
syntax: a,
|
|
2166
2168
|
definitions: i,
|
|
@@ -2171,8 +2173,8 @@ var to = [
|
|
|
2171
2173
|
let n = e.slice(t.block.id.length + 1);
|
|
2172
2174
|
return d.value.translated.includes(e) && !p.value.includes(n);
|
|
2173
2175
|
})), v = k(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2174
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2175
|
-
return Array.isArray(i) ?
|
|
2176
|
+
let n = e.split("."), r = n.pop(), i = n.length ? Et(t.block, n.join(".")) : t.block;
|
|
2177
|
+
return Array.isArray(i) ? Et(i, r) !== void 0 : i !== void 0;
|
|
2176
2178
|
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && Oe(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);
|
|
2177
2179
|
function x(e) {
|
|
2178
2180
|
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,12 +2184,12 @@ var to = [
|
|
|
2182
2184
|
h.value = null;
|
|
2183
2185
|
});
|
|
2184
2186
|
let T = k(() => {
|
|
2185
|
-
let e =
|
|
2187
|
+
let e = Et(t.block, f.value[0] ?? "");
|
|
2186
2188
|
if (typeof e != "string") return "";
|
|
2187
2189
|
let n = e.split(/<[^>]*>/).join("");
|
|
2188
2190
|
return Array.from(n).slice(0, 60).join("");
|
|
2189
2191
|
});
|
|
2190
|
-
return (t, n) => A(r) && b.value ? (m(), R(
|
|
2192
|
+
return (t, n) => A(r) && b.value ? (m(), R(xo, {
|
|
2191
2193
|
key: 0,
|
|
2192
2194
|
"block-id": e.block.id,
|
|
2193
2195
|
state: b.value,
|
|
@@ -2221,21 +2223,21 @@ var to = [
|
|
|
2221
2223
|
"editable"
|
|
2222
2224
|
])) : j("", !0);
|
|
2223
2225
|
}
|
|
2224
|
-
}),
|
|
2226
|
+
}), Co = [
|
|
2225
2227
|
"data-block-id",
|
|
2226
2228
|
"data-block-type",
|
|
2227
2229
|
"data-tpl-picked"
|
|
2228
|
-
],
|
|
2230
|
+
], wo = ["aria-label"], To = ["data-lock-holder"], Eo = ["aria-label"], Do = [
|
|
2229
2231
|
"aria-label",
|
|
2230
2232
|
"aria-pressed",
|
|
2231
2233
|
"title"
|
|
2232
|
-
],
|
|
2234
|
+
], Oo = ["aria-label", "title"], ko = ["aria-label", "title"], Ao = ["aria-label", "title"], jo = {
|
|
2233
2235
|
key: 3,
|
|
2234
2236
|
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"
|
|
2235
|
-
},
|
|
2237
|
+
}, Mo = { 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)]" }, No = {
|
|
2236
2238
|
key: 4,
|
|
2237
2239
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2238
|
-
},
|
|
2240
|
+
}, Po = ["aria-label", "title"], Fo = /*#__PURE__*/ Er(/* @__PURE__ */ B({
|
|
2239
2241
|
__name: "BlockWrapper",
|
|
2240
2242
|
props: {
|
|
2241
2243
|
block: {},
|
|
@@ -2248,7 +2250,7 @@ var to = [
|
|
|
2248
2250
|
},
|
|
2249
2251
|
emits: ["select"],
|
|
2250
2252
|
setup(t, { emit: n }) {
|
|
2251
|
-
let a = oe(() => import("./BlockIssueBadge-
|
|
2253
|
+
let a = oe(() => import("./BlockIssueBadge-B8sl9BM1.js")), o = t, s = k(() => o.displayBlock ?? o.block), l = n, { t: p, format: g } = ce(), v = z(Fn, 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);
|
|
2252
2254
|
async function C() {
|
|
2253
2255
|
await _(), b.value?.focus();
|
|
2254
2256
|
}
|
|
@@ -2258,7 +2260,7 @@ var to = [
|
|
|
2258
2260
|
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 ? {
|
|
2259
2261
|
desktop: p.viewport.desktop,
|
|
2260
2262
|
mobile: p.viewport.mobile
|
|
2261
|
-
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re = z(
|
|
2263
|
+
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re = z(An, null), ie = z(Cn, null), F = z(pn, {}), 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), V = M(null), le = M(null), ue = M(null), de = M({
|
|
2262
2264
|
left: "calc(100% + 8px)",
|
|
2263
2265
|
top: "50%"
|
|
2264
2266
|
}), fe = M(!1), pe = k(() => V.value ?? ue.value), me = k(() => pe.value?.closest(".tpl-body"));
|
|
@@ -2298,15 +2300,15 @@ var to = [
|
|
|
2298
2300
|
ue.value,
|
|
2299
2301
|
me.value
|
|
2300
2302
|
].filter((e) => !!e) : []), he), e(me, "scroll", he, { passive: !0 });
|
|
2301
|
-
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 =
|
|
2303
|
+
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 = or(() => s.value.type === "section" ? s.value.backgroundImage : void 0), be = or(() => s.value.type === "section" ? s.value.wrapper?.backgroundImage : void 0), xe = z(Pn, null), Ce = xe ? Pt(xe) : null, we = z(bn, null) ?? Ce?.content ?? null;
|
|
2302
2304
|
c([() => xe?.activeLocale?.value, () => Ce && Se(Ce.settings.value)], he, { flush: "post" });
|
|
2303
|
-
let Te = z(
|
|
2305
|
+
let Te = z($t, void 0), Ee = k(() => ra(s.value, {
|
|
2304
2306
|
backgroundImageUrl: ye.value,
|
|
2305
|
-
heroBoxWidth:
|
|
2306
|
-
})), De = k(() =>
|
|
2307
|
+
heroBoxWidth: Zn(s.value) ? nr(s.value, we?.value, Te) : void 0
|
|
2308
|
+
})), De = k(() => la(s.value, { backgroundImageUrl: be.value })), Oe = k(() => {
|
|
2307
2309
|
let e = s.value;
|
|
2308
2310
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2309
|
-
}), ke = k(() =>
|
|
2311
|
+
}), ke = k(() => ca(Oe.value?.wrapper?.padding));
|
|
2310
2312
|
function Ae(e) {
|
|
2311
2313
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), l("select"));
|
|
2312
2314
|
}
|
|
@@ -2350,12 +2352,12 @@ var to = [
|
|
|
2350
2352
|
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"]),
|
|
2351
2353
|
"aria-label": A(g)(A(p).blockActions.comments, { count: String(B.value) }),
|
|
2352
2354
|
onClick: n[0] ||= i((e) => A(F).comments?.openForBlock(t.block.id), ["stop"])
|
|
2353
|
-
}, [E(A(
|
|
2355
|
+
}, [E(A(Or), {
|
|
2354
2356
|
size: 12,
|
|
2355
2357
|
"stroke-width": 2.5
|
|
2356
|
-
}), te(" " + d(B.value), 1)], 10,
|
|
2358
|
+
}), te(" " + d(B.value), 1)], 10, wo)) : j("", !0),
|
|
2357
2359
|
E(A(a), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2358
|
-
t.previewMode ? j("", !0) : (m(), R(
|
|
2360
|
+
t.previewMode ? j("", !0) : (m(), R(So, {
|
|
2359
2361
|
key: 1,
|
|
2360
2362
|
block: t.block
|
|
2361
2363
|
}, null, 8, ["block"]))
|
|
@@ -2373,9 +2375,9 @@ var to = [
|
|
|
2373
2375
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2374
2376
|
style: y({
|
|
2375
2377
|
backgroundColor: ge.value.holder.color,
|
|
2376
|
-
color: A(
|
|
2378
|
+
color: A(Ar)(ge.value.holder.color)
|
|
2377
2379
|
})
|
|
2378
|
-
}, d(A(g)(A(p).collaboration.editing, { name: _e.value })), 5)], 12,
|
|
2380
|
+
}, d(A(g)(A(p).collaboration.editing, { name: _e.value })), 5)], 12, To)) : j("", !0),
|
|
2379
2381
|
ve.value === null ? j("", !0) : (m(), N("div", {
|
|
2380
2382
|
key: ve.value,
|
|
2381
2383
|
"data-testid": "block-agent-highlight",
|
|
@@ -2400,78 +2402,78 @@ var to = [
|
|
|
2400
2402
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2401
2403
|
title: A(p).blockActions.drag,
|
|
2402
2404
|
onKeydown: w
|
|
2403
|
-
}, [E(A(
|
|
2405
|
+
}, [E(A(Fr), {
|
|
2404
2406
|
size: 14,
|
|
2405
2407
|
"stroke-width": 1.5
|
|
2406
|
-
})], 40,
|
|
2408
|
+
})], 40, Do),
|
|
2407
2409
|
P("button", {
|
|
2408
2410
|
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",
|
|
2409
2411
|
"aria-label": A(p).blockActions.duplicate,
|
|
2410
2412
|
title: A(p).blockActions.duplicate,
|
|
2411
2413
|
onClick: i(Me, ["stop"])
|
|
2412
|
-
}, [E(A(
|
|
2414
|
+
}, [E(A(Dr), {
|
|
2413
2415
|
size: 14,
|
|
2414
2416
|
"stroke-width": 1.5
|
|
2415
|
-
})], 8,
|
|
2417
|
+
})], 8, Oo),
|
|
2416
2418
|
L.value ? (m(), N("button", {
|
|
2417
2419
|
key: 0,
|
|
2418
2420
|
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",
|
|
2419
2421
|
"aria-label": A(p).blockActions.saveAsBlock,
|
|
2420
2422
|
title: A(p).blockActions.saveAsBlock,
|
|
2421
2423
|
onClick: i(Ne, ["stop"])
|
|
2422
|
-
}, [E(A(
|
|
2424
|
+
}, [E(A(jr), {
|
|
2423
2425
|
size: 14,
|
|
2424
2426
|
"stroke-width": 1.5
|
|
2425
|
-
})], 8,
|
|
2427
|
+
})], 8, ko)) : j("", !0),
|
|
2426
2428
|
P("button", {
|
|
2427
2429
|
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",
|
|
2428
2430
|
"aria-label": A(p).blockActions.delete,
|
|
2429
2431
|
title: A(p).blockActions.delete,
|
|
2430
2432
|
onClick: i(je, ["stop"])
|
|
2431
|
-
}, [E(A(
|
|
2433
|
+
}, [E(A(kr), {
|
|
2432
2434
|
size: 14,
|
|
2433
2435
|
"stroke-width": 1.5
|
|
2434
|
-
})], 8,
|
|
2435
|
-
], 12,
|
|
2436
|
-
T.value ? (m(), N("div",
|
|
2436
|
+
})], 8, Ao)
|
|
2437
|
+
], 12, Eo)) : j("", !0),
|
|
2438
|
+
T.value ? (m(), N("div", jo, [P("span", Mo, [E(A(Nr), {
|
|
2437
2439
|
size: 12,
|
|
2438
2440
|
"stroke-width": 1.5
|
|
2439
2441
|
}), te(" " + d(A(g)(A(p).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : j("", !0),
|
|
2440
|
-
ne.value && !T.value ? (m(), N("div",
|
|
2442
|
+
ne.value && !T.value ? (m(), N("div", No, [P("button", {
|
|
2441
2443
|
"data-testid": "condition-toggle",
|
|
2442
2444
|
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)]",
|
|
2443
2445
|
"aria-label": A(p).blockActions.conditionToggle,
|
|
2444
2446
|
title: t.block.displayCondition?.label,
|
|
2445
2447
|
onClick: i(Pe, ["stop"])
|
|
2446
|
-
}, [E(A(
|
|
2448
|
+
}, [E(A(Pr), {
|
|
2447
2449
|
size: 12,
|
|
2448
2450
|
"stroke-width": 2
|
|
2449
|
-
})], 8,
|
|
2451
|
+
})], 8, Po)])) : j("", !0),
|
|
2450
2452
|
De.value ? (m(), N("div", {
|
|
2451
2453
|
key: 5,
|
|
2452
|
-
class: h(["tpl-section-wrapper tpl-email-surface", A(
|
|
2454
|
+
class: h(["tpl-section-wrapper tpl-email-surface", A($i)(De.value)]),
|
|
2453
2455
|
style: y(De.value)
|
|
2454
2456
|
}, [Oe.value ? (m(), N("div", {
|
|
2455
2457
|
key: 0,
|
|
2456
2458
|
class: "tpl-band-frame",
|
|
2457
2459
|
style: y(ke.value)
|
|
2458
2460
|
}, [P("div", {
|
|
2459
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2461
|
+
class: h(["tpl-block-content tpl-email-surface", A($i)(Ee.value)]),
|
|
2460
2462
|
style: y(Ee.value)
|
|
2461
2463
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (m(), N("div", {
|
|
2462
2464
|
key: 1,
|
|
2463
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2465
|
+
class: h(["tpl-block-content tpl-email-surface", A($i)(Ee.value)]),
|
|
2464
2466
|
style: y(Ee.value)
|
|
2465
2467
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (m(), N("div", {
|
|
2466
2468
|
key: 6,
|
|
2467
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2469
|
+
class: h(["tpl-block-content tpl-email-surface", A($i)(Ee.value)]),
|
|
2468
2470
|
style: y(Ee.value)
|
|
2469
2471
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2470
|
-
], 10,
|
|
2472
|
+
], 10, Co));
|
|
2471
2473
|
}
|
|
2472
2474
|
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2473
2475
|
// src/utils/unwrapParagraph.ts
|
|
2474
|
-
function
|
|
2476
|
+
function Io(e) {
|
|
2475
2477
|
let t = /^\s*<p\b/.exec(e);
|
|
2476
2478
|
if (!t) return e;
|
|
2477
2479
|
let n = yt(e, t[0].length);
|
|
@@ -2482,22 +2484,22 @@ function Po(e) {
|
|
|
2482
2484
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2483
2485
|
}
|
|
2484
2486
|
// src/components/blocks/TitleBlock.vue
|
|
2485
|
-
var
|
|
2487
|
+
var Lo = /* @__PURE__ */ B({
|
|
2486
2488
|
__name: "TitleBlock",
|
|
2487
2489
|
props: {
|
|
2488
2490
|
block: {},
|
|
2489
2491
|
viewport: {}
|
|
2490
2492
|
},
|
|
2491
2493
|
setup(e) {
|
|
2492
|
-
let t = e, n = oe(() => import("./TitleEditor-
|
|
2494
|
+
let t = e, n = oe(() => import("./TitleEditor-b5Pr_m9j.js")), r = Nn(un, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Za(() => t.block.content), u = k(() => {
|
|
2493
2495
|
let e = {
|
|
2494
2496
|
fontSize: `${st[t.block.level]}px`,
|
|
2495
|
-
lineHeight: String(
|
|
2497
|
+
lineHeight: String(Ct),
|
|
2496
2498
|
fontWeight: "700",
|
|
2497
2499
|
textAlign: t.block.textAlign
|
|
2498
2500
|
};
|
|
2499
2501
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2500
|
-
}), d = k(() => `h${t.block.level}`), f = k(() =>
|
|
2502
|
+
}), d = k(() => `h${t.block.level}`), f = k(() => mr(Io(s.value)));
|
|
2501
2503
|
return (t, r) => (m(), N("div", {
|
|
2502
2504
|
ref_key: "blockRef",
|
|
2503
2505
|
ref: a,
|
|
@@ -2523,12 +2525,12 @@ var Fo = /* @__PURE__ */ B({
|
|
|
2523
2525
|
innerHTML: f.value
|
|
2524
2526
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2525
2527
|
}
|
|
2526
|
-
}),
|
|
2527
|
-
function
|
|
2528
|
+
}), Ro = "hero", zo = "#1f2937", Bo = "#ffffff";
|
|
2529
|
+
function Vo(e, t) {
|
|
2528
2530
|
let n = ke("title", e);
|
|
2529
|
-
n.color =
|
|
2531
|
+
n.color = Bo, n.textAlign = "center";
|
|
2530
2532
|
let r = ke("paragraph", e);
|
|
2531
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2533
|
+
r.content = `<p style="text-align: center"><span style="color: ${Bo}">${Ho(t)}</span></p>`;
|
|
2532
2534
|
let i = ke("button", e);
|
|
2533
2535
|
return i.align = "center", ze({
|
|
2534
2536
|
columns: "1",
|
|
@@ -2548,96 +2550,96 @@ function zo(e, t) {
|
|
|
2548
2550
|
bottom: 48,
|
|
2549
2551
|
left: 24
|
|
2550
2552
|
},
|
|
2551
|
-
backgroundColor:
|
|
2553
|
+
backgroundColor: zo
|
|
2552
2554
|
}
|
|
2553
2555
|
});
|
|
2554
2556
|
}
|
|
2555
|
-
function
|
|
2557
|
+
function Ho(e) {
|
|
2556
2558
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2557
2559
|
}
|
|
2558
2560
|
// src/utils/sectionColumnDrop.ts
|
|
2559
|
-
var
|
|
2560
|
-
function
|
|
2561
|
-
return e.dataset.blockType !== "section" && !
|
|
2561
|
+
var Uo = /* @__PURE__ */ new Set(["section", Ro]);
|
|
2562
|
+
function Wo(e) {
|
|
2563
|
+
return e.dataset.blockType !== "section" && !Uo.has(e.dataset.paletteType ?? "");
|
|
2562
2564
|
}
|
|
2563
2565
|
// ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2564
|
-
var
|
|
2566
|
+
var Go = Object.defineProperty, Ko = Object.getOwnPropertySymbols, qo = Object.prototype.hasOwnProperty, Jo = Object.prototype.propertyIsEnumerable, Yo = (e, t, n) => t in e ? Go(e, t, {
|
|
2565
2567
|
enumerable: !0,
|
|
2566
2568
|
configurable: !0,
|
|
2567
2569
|
writable: !0,
|
|
2568
2570
|
value: n
|
|
2569
|
-
}) : e[t] = n,
|
|
2570
|
-
for (var n in t ||= {})
|
|
2571
|
-
if (
|
|
2571
|
+
}) : e[t] = n, Xo = (e, t) => {
|
|
2572
|
+
for (var n in t ||= {}) qo.call(t, n) && Yo(e, n, t[n]);
|
|
2573
|
+
if (Ko) for (var n of Ko(t)) Jo.call(t, n) && Yo(e, n, t[n]);
|
|
2572
2574
|
return e;
|
|
2573
|
-
},
|
|
2575
|
+
}, Zo = (e, t) => {
|
|
2574
2576
|
var n = {};
|
|
2575
|
-
for (var r in e)
|
|
2576
|
-
if (e != null &&
|
|
2577
|
+
for (var r in e) qo.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2578
|
+
if (e != null && Ko) for (var r of Ko(e)) t.indexOf(r) < 0 && Jo.call(e, r) && (n[r] = e[r]);
|
|
2577
2579
|
return n;
|
|
2578
|
-
},
|
|
2579
|
-
function
|
|
2580
|
-
console.warn(
|
|
2580
|
+
}, Qo = "[vue-draggable-plus]: ";
|
|
2581
|
+
function $o(e) {
|
|
2582
|
+
console.warn(Qo + e);
|
|
2581
2583
|
}
|
|
2582
|
-
function
|
|
2583
|
-
console.error(
|
|
2584
|
+
function es(e) {
|
|
2585
|
+
console.error(Qo + e);
|
|
2584
2586
|
}
|
|
2585
|
-
function
|
|
2587
|
+
function ts(e, t, n) {
|
|
2586
2588
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2587
2589
|
}
|
|
2588
|
-
function
|
|
2590
|
+
function ns(e) {
|
|
2589
2591
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2590
2592
|
}
|
|
2591
|
-
function
|
|
2592
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2593
|
+
function rs(e) {
|
|
2594
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[ns(n)] = e[n]), t), {});
|
|
2593
2595
|
}
|
|
2594
|
-
function
|
|
2596
|
+
function is(e, t) {
|
|
2595
2597
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2596
2598
|
}
|
|
2597
|
-
function
|
|
2599
|
+
function as(e, t, n) {
|
|
2598
2600
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2599
2601
|
}
|
|
2600
|
-
function
|
|
2602
|
+
function os(e) {
|
|
2601
2603
|
return e === void 0;
|
|
2602
2604
|
}
|
|
2603
|
-
function
|
|
2605
|
+
function ss(e) {
|
|
2604
2606
|
return typeof e == "string";
|
|
2605
2607
|
}
|
|
2606
|
-
function
|
|
2608
|
+
function cs(e, t, n) {
|
|
2607
2609
|
let r = e.children[n];
|
|
2608
2610
|
e.insertBefore(t, r);
|
|
2609
2611
|
}
|
|
2610
|
-
function
|
|
2612
|
+
function ls(e) {
|
|
2611
2613
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2612
2614
|
}
|
|
2613
|
-
function
|
|
2615
|
+
function us(e, t = document) {
|
|
2614
2616
|
let n = null;
|
|
2615
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2617
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || $o(`Element not found: ${e}`), n;
|
|
2616
2618
|
}
|
|
2617
|
-
function
|
|
2619
|
+
function ds(e, t, n = null) {
|
|
2618
2620
|
return function(...r) {
|
|
2619
2621
|
return e.apply(n, r), t.apply(n, r);
|
|
2620
2622
|
};
|
|
2621
2623
|
}
|
|
2622
|
-
function
|
|
2623
|
-
let n =
|
|
2624
|
+
function fs(e, t) {
|
|
2625
|
+
let n = Xo({}, e);
|
|
2624
2626
|
return Object.keys(t).forEach((r) => {
|
|
2625
|
-
n[r] ? n[r] =
|
|
2627
|
+
n[r] ? n[r] = ds(e[r], t[r]) : n[r] = t[r];
|
|
2626
2628
|
}), n;
|
|
2627
2629
|
}
|
|
2628
|
-
function
|
|
2630
|
+
function ps(e) {
|
|
2629
2631
|
return e instanceof HTMLElement;
|
|
2630
2632
|
}
|
|
2631
|
-
function
|
|
2633
|
+
function ms(e, t) {
|
|
2632
2634
|
Object.keys(e).forEach((n) => {
|
|
2633
2635
|
t(n, e[n]);
|
|
2634
2636
|
});
|
|
2635
2637
|
}
|
|
2636
|
-
function
|
|
2638
|
+
function hs(e) {
|
|
2637
2639
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2638
2640
|
}
|
|
2639
|
-
var
|
|
2640
|
-
function
|
|
2641
|
+
var gs = Object.assign;
|
|
2642
|
+
function _s(e, t) {
|
|
2641
2643
|
var n = Object.keys(e);
|
|
2642
2644
|
if (Object.getOwnPropertySymbols) {
|
|
2643
2645
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2647,26 +2649,26 @@ function hs(e, t) {
|
|
|
2647
2649
|
}
|
|
2648
2650
|
return n;
|
|
2649
2651
|
}
|
|
2650
|
-
function
|
|
2652
|
+
function vs(e) {
|
|
2651
2653
|
for (var t = 1; t < arguments.length; t++) {
|
|
2652
2654
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2653
|
-
t % 2 ?
|
|
2654
|
-
|
|
2655
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2655
|
+
t % 2 ? _s(Object(n), !0).forEach(function(t) {
|
|
2656
|
+
bs(e, t, n[t]);
|
|
2657
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _s(Object(n)).forEach(function(t) {
|
|
2656
2658
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2657
2659
|
});
|
|
2658
2660
|
}
|
|
2659
2661
|
return e;
|
|
2660
2662
|
}
|
|
2661
|
-
function
|
|
2663
|
+
function ys(e) {
|
|
2662
2664
|
"@babel/helpers - typeof";
|
|
2663
|
-
return
|
|
2665
|
+
return ys = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2664
2666
|
return typeof e;
|
|
2665
2667
|
} : function(e) {
|
|
2666
2668
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2667
|
-
},
|
|
2669
|
+
}, ys(e);
|
|
2668
2670
|
}
|
|
2669
|
-
function
|
|
2671
|
+
function bs(e, t, n) {
|
|
2670
2672
|
return t in e ? Object.defineProperty(e, t, {
|
|
2671
2673
|
value: n,
|
|
2672
2674
|
enumerable: !0,
|
|
@@ -2674,44 +2676,44 @@ function vs(e, t, n) {
|
|
|
2674
2676
|
writable: !0
|
|
2675
2677
|
}) : e[t] = n, e;
|
|
2676
2678
|
}
|
|
2677
|
-
function
|
|
2678
|
-
return
|
|
2679
|
+
function xs() {
|
|
2680
|
+
return xs = Object.assign || function(e) {
|
|
2679
2681
|
for (var t = 1; t < arguments.length; t++) {
|
|
2680
2682
|
var n = arguments[t];
|
|
2681
2683
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2682
2684
|
}
|
|
2683
2685
|
return e;
|
|
2684
|
-
},
|
|
2686
|
+
}, xs.apply(this, arguments);
|
|
2685
2687
|
}
|
|
2686
|
-
function
|
|
2688
|
+
function Ss(e, t) {
|
|
2687
2689
|
if (e == null) return {};
|
|
2688
2690
|
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]);
|
|
2689
2691
|
return n;
|
|
2690
2692
|
}
|
|
2691
|
-
function
|
|
2693
|
+
function Cs(e, t) {
|
|
2692
2694
|
if (e == null) return {};
|
|
2693
|
-
var n =
|
|
2695
|
+
var n = Ss(e, t), r, i;
|
|
2694
2696
|
if (Object.getOwnPropertySymbols) {
|
|
2695
2697
|
var a = Object.getOwnPropertySymbols(e);
|
|
2696
2698
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2697
2699
|
}
|
|
2698
2700
|
return n;
|
|
2699
2701
|
}
|
|
2700
|
-
var
|
|
2701
|
-
function
|
|
2702
|
+
var ws = "1.15.2";
|
|
2703
|
+
function Ts(e) {
|
|
2702
2704
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2703
2705
|
}
|
|
2704
|
-
var
|
|
2706
|
+
var Es = Ts(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ds = Ts(/Edge/i), Os = Ts(/firefox/i), ks = Ts(/safari/i) && !Ts(/chrome/i) && !Ts(/android/i), As = Ts(/iP(ad|od|hone)/i), js = Ts(/chrome/i) && Ts(/android/i), Ms = {
|
|
2705
2707
|
capture: !1,
|
|
2706
2708
|
passive: !1
|
|
2707
2709
|
};
|
|
2708
2710
|
function H(e, t, n) {
|
|
2709
|
-
e.addEventListener(t, n, !
|
|
2711
|
+
e.addEventListener(t, n, !Es && Ms);
|
|
2710
2712
|
}
|
|
2711
2713
|
function U(e, t, n) {
|
|
2712
|
-
e.removeEventListener(t, n, !
|
|
2714
|
+
e.removeEventListener(t, n, !Es && Ms);
|
|
2713
2715
|
}
|
|
2714
|
-
function
|
|
2716
|
+
function Ns(e, t) {
|
|
2715
2717
|
if (t) {
|
|
2716
2718
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2717
2719
|
if (e.matches) return e.matches(t);
|
|
@@ -2723,22 +2725,22 @@ function js(e, t) {
|
|
|
2723
2725
|
return !1;
|
|
2724
2726
|
}
|
|
2725
2727
|
}
|
|
2726
|
-
function
|
|
2728
|
+
function Ps(e) {
|
|
2727
2729
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2728
2730
|
}
|
|
2729
|
-
function
|
|
2731
|
+
function Fs(e, t, n, r) {
|
|
2730
2732
|
if (e) {
|
|
2731
2733
|
n ||= document;
|
|
2732
2734
|
do {
|
|
2733
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2735
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Ns(e, t) : Ns(e, t)) || r && e === n) return e;
|
|
2734
2736
|
if (e === n) break;
|
|
2735
|
-
} while (e =
|
|
2737
|
+
} while (e = Ps(e));
|
|
2736
2738
|
}
|
|
2737
2739
|
return null;
|
|
2738
2740
|
}
|
|
2739
|
-
var
|
|
2740
|
-
function
|
|
2741
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2741
|
+
var Is = /\s+/g;
|
|
2742
|
+
function Ls(e, t, n) {
|
|
2743
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Is, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Is, " "));
|
|
2742
2744
|
}
|
|
2743
2745
|
function W(e, t, n) {
|
|
2744
2746
|
var r = e && e.style;
|
|
@@ -2747,7 +2749,7 @@ function W(e, t, n) {
|
|
|
2747
2749
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2748
2750
|
}
|
|
2749
2751
|
}
|
|
2750
|
-
function
|
|
2752
|
+
function Rs(e, t) {
|
|
2751
2753
|
var n = "";
|
|
2752
2754
|
if (typeof e == "string") n = e;
|
|
2753
2755
|
else do {
|
|
@@ -2757,7 +2759,7 @@ function Is(e, t) {
|
|
|
2757
2759
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2758
2760
|
return i && new i(n);
|
|
2759
2761
|
}
|
|
2760
|
-
function
|
|
2762
|
+
function zs(e, t, n) {
|
|
2761
2763
|
if (e) {
|
|
2762
2764
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2763
2765
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2765,13 +2767,13 @@ function Ls(e, t, n) {
|
|
|
2765
2767
|
}
|
|
2766
2768
|
return [];
|
|
2767
2769
|
}
|
|
2768
|
-
function
|
|
2770
|
+
function Bs() {
|
|
2769
2771
|
return document.scrollingElement || document.documentElement;
|
|
2770
2772
|
}
|
|
2771
2773
|
function G(e, t, n, r, i) {
|
|
2772
2774
|
if (e.getBoundingClientRect || e === window) {
|
|
2773
2775
|
var a, o, s, c, l, u, d;
|
|
2774
|
-
if (e !== window && e.parentNode && e !==
|
|
2776
|
+
if (e !== window && e.parentNode && e !== Bs() ? (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, !Es)) do
|
|
2775
2777
|
if (i && i.getBoundingClientRect && (W(i, "transform") !== "none" || n && W(i, "position") !== "static")) {
|
|
2776
2778
|
var f = i.getBoundingClientRect();
|
|
2777
2779
|
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;
|
|
@@ -2779,7 +2781,7 @@ function G(e, t, n, r, i) {
|
|
|
2779
2781
|
}
|
|
2780
2782
|
while (i = i.parentNode);
|
|
2781
2783
|
if (r && e !== window) {
|
|
2782
|
-
var p =
|
|
2784
|
+
var p = Rs(i || e), m = p && p.a, h = p && p.d;
|
|
2783
2785
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2784
2786
|
}
|
|
2785
2787
|
return {
|
|
@@ -2792,18 +2794,18 @@ function G(e, t, n, r, i) {
|
|
|
2792
2794
|
};
|
|
2793
2795
|
}
|
|
2794
2796
|
}
|
|
2795
|
-
function
|
|
2796
|
-
for (var r =
|
|
2797
|
+
function Vs(e, t, n) {
|
|
2798
|
+
for (var r = qs(e, !0), i = G(e)[t]; r;) {
|
|
2797
2799
|
var a = G(r)[n], o = void 0;
|
|
2798
2800
|
if (o = i >= a, !o) return r;
|
|
2799
|
-
if (r ===
|
|
2800
|
-
r =
|
|
2801
|
+
if (r === Bs()) break;
|
|
2802
|
+
r = qs(r, !1);
|
|
2801
2803
|
}
|
|
2802
2804
|
return !1;
|
|
2803
2805
|
}
|
|
2804
|
-
function
|
|
2806
|
+
function Hs(e, t, n, r) {
|
|
2805
2807
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2806
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2808
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Fs(o[a], n.draggable, e, !1)) {
|
|
2807
2809
|
if (i === t) return o[a];
|
|
2808
2810
|
i++;
|
|
2809
2811
|
}
|
|
@@ -2811,84 +2813,84 @@ function Bs(e, t, n, r) {
|
|
|
2811
2813
|
}
|
|
2812
2814
|
return null;
|
|
2813
2815
|
}
|
|
2814
|
-
function
|
|
2815
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || W(n, "display") === "none" || t && !
|
|
2816
|
+
function Us(e, t) {
|
|
2817
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || W(n, "display") === "none" || t && !Ns(n, t));) n = n.previousElementSibling;
|
|
2816
2818
|
return n || null;
|
|
2817
2819
|
}
|
|
2818
|
-
function
|
|
2820
|
+
function Ws(e, t) {
|
|
2819
2821
|
var n = 0;
|
|
2820
2822
|
if (!e || !e.parentNode) return -1;
|
|
2821
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2823
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Ns(e, t)) && n++;
|
|
2822
2824
|
return n;
|
|
2823
2825
|
}
|
|
2824
|
-
function
|
|
2825
|
-
var t = 0, n = 0, r =
|
|
2826
|
+
function Gs(e) {
|
|
2827
|
+
var t = 0, n = 0, r = Bs();
|
|
2826
2828
|
if (e) do {
|
|
2827
|
-
var i =
|
|
2829
|
+
var i = Rs(e), a = i.a, o = i.d;
|
|
2828
2830
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2829
2831
|
} while (e !== r && (e = e.parentNode));
|
|
2830
2832
|
return [t, n];
|
|
2831
2833
|
}
|
|
2832
|
-
function
|
|
2834
|
+
function Ks(e, t) {
|
|
2833
2835
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2834
2836
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2835
2837
|
}
|
|
2836
2838
|
return -1;
|
|
2837
2839
|
}
|
|
2838
|
-
function
|
|
2839
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2840
|
+
function qs(e, t) {
|
|
2841
|
+
if (!e || !e.getBoundingClientRect) return Bs();
|
|
2840
2842
|
var n = e, r = !1;
|
|
2841
2843
|
do
|
|
2842
2844
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2843
2845
|
var i = W(n);
|
|
2844
2846
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2845
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2847
|
+
if (!n.getBoundingClientRect || n === document.body) return Bs();
|
|
2846
2848
|
if (r || t) return n;
|
|
2847
2849
|
r = !0;
|
|
2848
2850
|
}
|
|
2849
2851
|
}
|
|
2850
2852
|
while (n = n.parentNode);
|
|
2851
|
-
return
|
|
2853
|
+
return Bs();
|
|
2852
2854
|
}
|
|
2853
|
-
function
|
|
2855
|
+
function Js(e, t) {
|
|
2854
2856
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2855
2857
|
return e;
|
|
2856
2858
|
}
|
|
2857
|
-
function
|
|
2859
|
+
function Ys(e, t) {
|
|
2858
2860
|
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);
|
|
2859
2861
|
}
|
|
2860
|
-
var
|
|
2861
|
-
function
|
|
2862
|
+
var Xs;
|
|
2863
|
+
function Zs(e, t) {
|
|
2862
2864
|
return function() {
|
|
2863
|
-
if (!
|
|
2865
|
+
if (!Xs) {
|
|
2864
2866
|
var n = arguments, r = this;
|
|
2865
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2866
|
-
|
|
2867
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Xs = setTimeout(function() {
|
|
2868
|
+
Xs = void 0;
|
|
2867
2869
|
}, t);
|
|
2868
2870
|
}
|
|
2869
2871
|
};
|
|
2870
2872
|
}
|
|
2871
|
-
function
|
|
2872
|
-
clearTimeout(
|
|
2873
|
+
function Qs() {
|
|
2874
|
+
clearTimeout(Xs), Xs = void 0;
|
|
2873
2875
|
}
|
|
2874
|
-
function
|
|
2876
|
+
function $s(e, t, n) {
|
|
2875
2877
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2876
2878
|
}
|
|
2877
|
-
function
|
|
2879
|
+
function ec(e) {
|
|
2878
2880
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2879
2881
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2880
2882
|
}
|
|
2881
|
-
function
|
|
2883
|
+
function tc(e, t, n) {
|
|
2882
2884
|
var r = {};
|
|
2883
2885
|
return Array.from(e.children).forEach(function(i) {
|
|
2884
|
-
if (
|
|
2886
|
+
if (Fs(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2885
2887
|
var a = G(i);
|
|
2886
2888
|
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);
|
|
2887
2889
|
}
|
|
2888
2890
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2889
2891
|
}
|
|
2890
|
-
var
|
|
2891
|
-
function
|
|
2892
|
+
var nc = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2893
|
+
function rc() {
|
|
2892
2894
|
var e = [], t;
|
|
2893
2895
|
return {
|
|
2894
2896
|
captureAnimationState: function() {
|
|
@@ -2898,9 +2900,9 @@ function tc() {
|
|
|
2898
2900
|
target: t,
|
|
2899
2901
|
rect: G(t)
|
|
2900
2902
|
});
|
|
2901
|
-
var n =
|
|
2903
|
+
var n = vs({}, e[e.length - 1].rect);
|
|
2902
2904
|
if (t.thisAnimationDuration) {
|
|
2903
|
-
var r =
|
|
2905
|
+
var r = Rs(t, !0);
|
|
2904
2906
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2905
2907
|
}
|
|
2906
2908
|
t.fromRect = n;
|
|
@@ -2911,7 +2913,7 @@ function tc() {
|
|
|
2911
2913
|
e.push(t);
|
|
2912
2914
|
},
|
|
2913
2915
|
removeAnimationState: function(t) {
|
|
2914
|
-
e.splice(
|
|
2916
|
+
e.splice(Ks(e, { target: t }), 1);
|
|
2915
2917
|
},
|
|
2916
2918
|
animateAll: function(n) {
|
|
2917
2919
|
var r = this;
|
|
@@ -2919,8 +2921,8 @@ function tc() {
|
|
|
2919
2921
|
else {
|
|
2920
2922
|
var i = !1, a = 0;
|
|
2921
2923
|
e.forEach(function(e) {
|
|
2922
|
-
var t = 0, n = e.target, o = n.fromRect, s = G(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2923
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2924
|
+
var t = 0, n = e.target, o = n.fromRect, s = G(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Rs(n, !0);
|
|
2925
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Ys(c, s) && !Ys(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = ac(u, c, l, r.options)), Ys(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() {
|
|
2924
2926
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2925
2927
|
}, t), n.thisAnimationDuration = t);
|
|
2926
2928
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2931,26 +2933,26 @@ function tc() {
|
|
|
2931
2933
|
animate: function(e, t, n, r) {
|
|
2932
2934
|
if (r) {
|
|
2933
2935
|
W(e, "transition", ""), W(e, "transform", "");
|
|
2934
|
-
var i =
|
|
2935
|
-
e.animatingX = !!s, e.animatingY = !!c, W(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2936
|
+
var i = Rs(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2937
|
+
e.animatingX = !!s, e.animatingY = !!c, W(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = ic(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() {
|
|
2936
2938
|
W(e, "transition", ""), W(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2937
2939
|
}, r);
|
|
2938
2940
|
}
|
|
2939
2941
|
}
|
|
2940
2942
|
};
|
|
2941
2943
|
}
|
|
2942
|
-
function
|
|
2944
|
+
function ic(e) {
|
|
2943
2945
|
return e.offsetWidth;
|
|
2944
2946
|
}
|
|
2945
|
-
function
|
|
2947
|
+
function ac(e, t, n, r) {
|
|
2946
2948
|
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;
|
|
2947
2949
|
}
|
|
2948
|
-
var
|
|
2950
|
+
var oc = [], sc = { initializeByDefault: !0 }, cc = {
|
|
2949
2951
|
mount: function(e) {
|
|
2950
|
-
for (var t in
|
|
2951
|
-
|
|
2952
|
+
for (var t in sc) sc.hasOwnProperty(t) && !(t in e) && (e[t] = sc[t]);
|
|
2953
|
+
oc.forEach(function(t) {
|
|
2952
2954
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2953
|
-
}),
|
|
2955
|
+
}), oc.push(e);
|
|
2954
2956
|
},
|
|
2955
2957
|
pluginEvent: function(e, t, n) {
|
|
2956
2958
|
var r = this;
|
|
@@ -2958,16 +2960,16 @@ var ic = [], ac = { initializeByDefault: !0 }, oc = {
|
|
|
2958
2960
|
r.eventCanceled = !0;
|
|
2959
2961
|
};
|
|
2960
2962
|
var i = e + "Global";
|
|
2961
|
-
|
|
2962
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2963
|
+
oc.forEach(function(r) {
|
|
2964
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](vs({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](vs({ sortable: t }, n)));
|
|
2963
2965
|
});
|
|
2964
2966
|
},
|
|
2965
2967
|
initializePlugins: function(e, t, n, r) {
|
|
2966
|
-
for (var i in
|
|
2968
|
+
for (var i in oc.forEach(function(r) {
|
|
2967
2969
|
var i = r.pluginName;
|
|
2968
2970
|
if (e.options[i] || r.initializeByDefault) {
|
|
2969
2971
|
var a = new r(e, t, e.options);
|
|
2970
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2972
|
+
a.sortable = e, a.options = e.options, e[i] = a, xs(n, a.defaults);
|
|
2971
2973
|
}
|
|
2972
2974
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2973
2975
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2976,59 +2978,59 @@ var ic = [], ac = { initializeByDefault: !0 }, oc = {
|
|
|
2976
2978
|
},
|
|
2977
2979
|
getEventProperties: function(e, t) {
|
|
2978
2980
|
var n = {};
|
|
2979
|
-
return
|
|
2980
|
-
typeof r.eventProperties == "function" &&
|
|
2981
|
+
return oc.forEach(function(r) {
|
|
2982
|
+
typeof r.eventProperties == "function" && xs(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2981
2983
|
}), n;
|
|
2982
2984
|
},
|
|
2983
2985
|
modifyOption: function(e, t, n) {
|
|
2984
2986
|
var r;
|
|
2985
|
-
return
|
|
2987
|
+
return oc.forEach(function(i) {
|
|
2986
2988
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2987
2989
|
}), r;
|
|
2988
2990
|
}
|
|
2989
2991
|
};
|
|
2990
|
-
function
|
|
2992
|
+
function lc(e) {
|
|
2991
2993
|
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;
|
|
2992
|
-
if (t ||= n && n[
|
|
2994
|
+
if (t ||= n && n[nc], t) {
|
|
2993
2995
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2994
|
-
window.CustomEvent && !
|
|
2996
|
+
window.CustomEvent && !Es && !Ds ? h = new CustomEvent(r, {
|
|
2995
2997
|
bubbles: !0,
|
|
2996
2998
|
cancelable: !0
|
|
2997
2999
|
}) : (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;
|
|
2998
|
-
var v =
|
|
3000
|
+
var v = vs(vs({}, m), cc.getEventProperties(r, t));
|
|
2999
3001
|
for (var y in v) h[y] = v[y];
|
|
3000
3002
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
3001
3003
|
}
|
|
3002
3004
|
}
|
|
3003
|
-
var
|
|
3004
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
3005
|
-
|
|
3005
|
+
var uc = ["evt"], dc = function(e, t) {
|
|
3006
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Cs(n, uc);
|
|
3007
|
+
cc.pluginEvent.bind(Q)(e, t, vs({
|
|
3006
3008
|
dragEl: K,
|
|
3007
3009
|
parentEl: q,
|
|
3008
3010
|
ghostEl: J,
|
|
3009
3011
|
rootEl: Y,
|
|
3010
|
-
nextEl:
|
|
3011
|
-
lastDownEl:
|
|
3012
|
+
nextEl: pc,
|
|
3013
|
+
lastDownEl: mc,
|
|
3012
3014
|
cloneEl: X,
|
|
3013
|
-
cloneHidden:
|
|
3014
|
-
dragStarted:
|
|
3015
|
+
cloneHidden: hc,
|
|
3016
|
+
dragStarted: Ac,
|
|
3015
3017
|
putSortable: Z,
|
|
3016
3018
|
activeSortable: Q.active,
|
|
3017
3019
|
originalEvent: r,
|
|
3018
|
-
oldIndex:
|
|
3019
|
-
oldDraggableIndex:
|
|
3020
|
-
newIndex:
|
|
3021
|
-
newDraggableIndex:
|
|
3022
|
-
hideGhostForTarget:
|
|
3023
|
-
unhideGhostForTarget:
|
|
3020
|
+
oldIndex: gc,
|
|
3021
|
+
oldDraggableIndex: vc,
|
|
3022
|
+
newIndex: _c,
|
|
3023
|
+
newDraggableIndex: yc,
|
|
3024
|
+
hideGhostForTarget: Yc,
|
|
3025
|
+
unhideGhostForTarget: Xc,
|
|
3024
3026
|
cloneNowHidden: function() {
|
|
3025
|
-
|
|
3027
|
+
hc = !0;
|
|
3026
3028
|
},
|
|
3027
3029
|
cloneNowShown: function() {
|
|
3028
|
-
|
|
3030
|
+
hc = !1;
|
|
3029
3031
|
},
|
|
3030
3032
|
dispatchSortableEvent: function(e) {
|
|
3031
|
-
|
|
3033
|
+
fc({
|
|
3032
3034
|
sortable: t,
|
|
3033
3035
|
name: e,
|
|
3034
3036
|
originalEvent: r
|
|
@@ -3036,46 +3038,46 @@ var cc = ["evt"], lc = function(e, t) {
|
|
|
3036
3038
|
}
|
|
3037
3039
|
}, i));
|
|
3038
3040
|
};
|
|
3039
|
-
function
|
|
3040
|
-
|
|
3041
|
+
function fc(e) {
|
|
3042
|
+
lc(vs({
|
|
3041
3043
|
putSortable: Z,
|
|
3042
3044
|
cloneEl: X,
|
|
3043
3045
|
targetEl: K,
|
|
3044
3046
|
rootEl: Y,
|
|
3045
|
-
oldIndex:
|
|
3046
|
-
oldDraggableIndex:
|
|
3047
|
-
newIndex:
|
|
3048
|
-
newDraggableIndex:
|
|
3047
|
+
oldIndex: gc,
|
|
3048
|
+
oldDraggableIndex: vc,
|
|
3049
|
+
newIndex: _c,
|
|
3050
|
+
newDraggableIndex: yc
|
|
3049
3051
|
}, e));
|
|
3050
3052
|
}
|
|
3051
|
-
var K, q, J, Y,
|
|
3052
|
-
if (
|
|
3053
|
-
if (
|
|
3053
|
+
var K, q, J, Y, pc, mc, X, hc, gc, _c, vc, yc, bc, Z, xc = !1, Sc = !1, Cc = [], wc, Tc, Ec, Dc, Oc, kc, Ac, jc, Mc, Nc = !1, Pc = !1, Fc, Ic, Lc = [], Rc = !1, zc = [], Bc = typeof document < "u", Vc = As, Hc = Ds || Es ? "cssFloat" : "float", Uc = Bc && !js && !As && "draggable" in document.createElement("div"), Wc = function() {
|
|
3054
|
+
if (Bc) {
|
|
3055
|
+
if (Es) return !1;
|
|
3054
3056
|
var e = document.createElement("x");
|
|
3055
3057
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3056
3058
|
}
|
|
3057
|
-
}(),
|
|
3058
|
-
var n = W(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
3059
|
+
}(), Gc = function(e, t) {
|
|
3060
|
+
var n = W(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Hs(e, 0, t), a = Hs(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;
|
|
3059
3061
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3060
3062
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3061
3063
|
if (i && o.float && o.float !== "none") {
|
|
3062
3064
|
var u = o.float === "left" ? "left" : "right";
|
|
3063
3065
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3064
3066
|
}
|
|
3065
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3066
|
-
},
|
|
3067
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Hc] === "none" || a && n[Hc] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3068
|
+
}, Kc = function(e, t, n) {
|
|
3067
3069
|
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;
|
|
3068
3070
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3069
|
-
},
|
|
3071
|
+
}, qc = function(e, t) {
|
|
3070
3072
|
var n;
|
|
3071
|
-
return
|
|
3072
|
-
var i = r[
|
|
3073
|
-
if (i && !
|
|
3073
|
+
return Cc.some(function(r) {
|
|
3074
|
+
var i = r[nc].options.emptyInsertThreshold;
|
|
3075
|
+
if (i && !Us(r)) {
|
|
3074
3076
|
var a = G(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3075
3077
|
if (o && s) return n = r;
|
|
3076
3078
|
}
|
|
3077
3079
|
}), n;
|
|
3078
|
-
},
|
|
3080
|
+
}, Jc = function(e) {
|
|
3079
3081
|
function t(e, n) {
|
|
3080
3082
|
return function(r, i, a, o) {
|
|
3081
3083
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3088,31 +3090,31 @@ var K, q, J, Y, dc, fc, X, pc, mc, hc, gc, _c, vc, Z, yc = !1, bc = !1, xc = [],
|
|
|
3088
3090
|
};
|
|
3089
3091
|
}
|
|
3090
3092
|
var n = {}, r = e.group;
|
|
3091
|
-
r &&
|
|
3092
|
-
},
|
|
3093
|
-
!
|
|
3094
|
-
},
|
|
3095
|
-
!
|
|
3093
|
+
r && ys(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;
|
|
3094
|
+
}, Yc = function() {
|
|
3095
|
+
!Wc && J && W(J, "display", "none");
|
|
3096
|
+
}, Xc = function() {
|
|
3097
|
+
!Wc && J && W(J, "display", "");
|
|
3096
3098
|
};
|
|
3097
|
-
|
|
3098
|
-
if (
|
|
3099
|
+
Bc && !js && document.addEventListener("click", function(e) {
|
|
3100
|
+
if (Sc) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Sc = !1, !1;
|
|
3099
3101
|
}, !0);
|
|
3100
|
-
var
|
|
3102
|
+
var Zc = function(e) {
|
|
3101
3103
|
if (K) {
|
|
3102
3104
|
e = e.touches ? e.touches[0] : e;
|
|
3103
|
-
var t =
|
|
3105
|
+
var t = qc(e.clientX, e.clientY);
|
|
3104
3106
|
if (t) {
|
|
3105
3107
|
var n = {};
|
|
3106
3108
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3107
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3109
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[nc]._onDragOver(n);
|
|
3108
3110
|
}
|
|
3109
3111
|
}
|
|
3110
|
-
},
|
|
3111
|
-
K && K.parentNode[
|
|
3112
|
+
}, Qc = function(e) {
|
|
3113
|
+
K && K.parentNode[nc]._isOutsideThisEl(e.target);
|
|
3112
3114
|
};
|
|
3113
3115
|
function Q(e, t) {
|
|
3114
3116
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3115
|
-
this.el = e, this.options = t =
|
|
3117
|
+
this.el = e, this.options = t = xs({}, t), e[nc] = this;
|
|
3116
3118
|
var n = {
|
|
3117
3119
|
group: null,
|
|
3118
3120
|
sort: !0,
|
|
@@ -3125,7 +3127,7 @@ function Q(e, t) {
|
|
|
3125
3127
|
invertedSwapThreshold: null,
|
|
3126
3128
|
removeCloneOnHide: !0,
|
|
3127
3129
|
direction: function() {
|
|
3128
|
-
return
|
|
3130
|
+
return Gc(e, this.options);
|
|
3129
3131
|
},
|
|
3130
3132
|
ghostClass: "sortable-ghost",
|
|
3131
3133
|
chosenClass: "sortable-chosen",
|
|
@@ -3152,17 +3154,17 @@ function Q(e, t) {
|
|
|
3152
3154
|
x: 0,
|
|
3153
3155
|
y: 0
|
|
3154
3156
|
},
|
|
3155
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3157
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ks,
|
|
3156
3158
|
emptyInsertThreshold: 5
|
|
3157
3159
|
};
|
|
3158
|
-
for (var r in
|
|
3159
|
-
for (var i in
|
|
3160
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3160
|
+
for (var r in cc.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3161
|
+
for (var i in Jc(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3162
|
+
this.nativeDraggable = !t.forceFallback && Uc, 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)), Cc.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), xs(this, rc());
|
|
3161
3163
|
}
|
|
3162
3164
|
Q.prototype = {
|
|
3163
3165
|
constructor: Q,
|
|
3164
3166
|
_isOutsideThisEl: function(e) {
|
|
3165
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3167
|
+
!this.el.contains(e) && e !== this.el && (jc = null);
|
|
3166
3168
|
},
|
|
3167
3169
|
_getDirection: function(e, t) {
|
|
3168
3170
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, K) : this.options.direction;
|
|
@@ -3170,33 +3172,33 @@ Q.prototype = {
|
|
|
3170
3172
|
_onTapStart: function(e) {
|
|
3171
3173
|
if (e.cancelable) {
|
|
3172
3174
|
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;
|
|
3173
|
-
if (
|
|
3174
|
-
if (
|
|
3175
|
+
if (cl(n), !K && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ks && s && s.tagName.toUpperCase() === "SELECT") && (s = Fs(s, r.draggable, n, !1), !(s && s.animated) && mc !== s)) {
|
|
3176
|
+
if (gc = Ws(s), vc = Ws(s, r.draggable), typeof l == "function") {
|
|
3175
3177
|
if (l.call(this, e, s, this)) {
|
|
3176
|
-
|
|
3178
|
+
fc({
|
|
3177
3179
|
sortable: t,
|
|
3178
3180
|
rootEl: c,
|
|
3179
3181
|
name: "filter",
|
|
3180
3182
|
targetEl: s,
|
|
3181
3183
|
toEl: n,
|
|
3182
3184
|
fromEl: n
|
|
3183
|
-
}),
|
|
3185
|
+
}), dc("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3184
3186
|
return;
|
|
3185
3187
|
}
|
|
3186
3188
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3187
|
-
if (r =
|
|
3189
|
+
if (r = Fs(c, r.trim(), n, !1), r) return fc({
|
|
3188
3190
|
sortable: t,
|
|
3189
3191
|
rootEl: r,
|
|
3190
3192
|
name: "filter",
|
|
3191
3193
|
targetEl: s,
|
|
3192
3194
|
fromEl: n,
|
|
3193
3195
|
toEl: n
|
|
3194
|
-
}),
|
|
3196
|
+
}), dc("filter", t, { evt: e }), !0;
|
|
3195
3197
|
}), l)) {
|
|
3196
3198
|
i && e.cancelable && e.preventDefault();
|
|
3197
3199
|
return;
|
|
3198
3200
|
}
|
|
3199
|
-
r.handle && !
|
|
3201
|
+
r.handle && !Fs(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3200
3202
|
}
|
|
3201
3203
|
}
|
|
3202
3204
|
},
|
|
@@ -3204,19 +3206,19 @@ Q.prototype = {
|
|
|
3204
3206
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3205
3207
|
if (n && !K && n.parentNode === i) {
|
|
3206
3208
|
var c = G(n);
|
|
3207
|
-
if (Y = i, K = n, q = K.parentNode,
|
|
3209
|
+
if (Y = i, K = n, q = K.parentNode, pc = K.nextSibling, mc = n, bc = a.group, Q.dragged = K, wc = {
|
|
3208
3210
|
target: K,
|
|
3209
3211
|
clientX: (t || e).clientX,
|
|
3210
3212
|
clientY: (t || e).clientY
|
|
3211
|
-
},
|
|
3212
|
-
|
|
3213
|
+
}, Oc = wc.clientX - c.left, kc = wc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, K.style["will-change"] = "all", s = function() {
|
|
3214
|
+
dc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Os && r.nativeDraggable && (K.draggable = !0), r._triggerDragStart(e, t), fc({
|
|
3213
3215
|
sortable: r,
|
|
3214
3216
|
name: "choose",
|
|
3215
3217
|
originalEvent: e
|
|
3216
|
-
}),
|
|
3218
|
+
}), Ls(K, a.chosenClass, !0));
|
|
3217
3219
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3218
|
-
|
|
3219
|
-
}), H(o, "dragover",
|
|
3220
|
+
zs(K, e.trim(), tl);
|
|
3221
|
+
}), H(o, "dragover", Zc), H(o, "mousemove", Zc), H(o, "touchmove", Zc), H(o, "mouseup", r._onDrop), H(o, "touchend", r._onDrop), H(o, "touchcancel", r._onDrop), Os && this.nativeDraggable && (this.options.touchStartThreshold = 4, K.draggable = !0), dc("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ds || Es))) {
|
|
3220
3222
|
if (Q.eventCanceled) {
|
|
3221
3223
|
this._onDrop();
|
|
3222
3224
|
return;
|
|
@@ -3230,7 +3232,7 @@ Q.prototype = {
|
|
|
3230
3232
|
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();
|
|
3231
3233
|
},
|
|
3232
3234
|
_disableDelayedDrag: function() {
|
|
3233
|
-
K &&
|
|
3235
|
+
K && tl(K), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3234
3236
|
},
|
|
3235
3237
|
_disableDelayedDragEvents: function() {
|
|
3236
3238
|
var e = this.el.ownerDocument;
|
|
@@ -3239,16 +3241,16 @@ Q.prototype = {
|
|
|
3239
3241
|
_triggerDragStart: function(e, t) {
|
|
3240
3242
|
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));
|
|
3241
3243
|
try {
|
|
3242
|
-
document.selection ?
|
|
3244
|
+
document.selection ? ll(function() {
|
|
3243
3245
|
document.selection.empty();
|
|
3244
3246
|
}) : window.getSelection().removeAllRanges();
|
|
3245
3247
|
} catch {}
|
|
3246
3248
|
},
|
|
3247
3249
|
_dragStarted: function(e, t) {
|
|
3248
|
-
if (
|
|
3249
|
-
|
|
3250
|
+
if (xc = !1, Y && K) {
|
|
3251
|
+
dc("dragStarted", this, { evt: t }), this.nativeDraggable && H(document, "dragover", Qc);
|
|
3250
3252
|
var n = this.options;
|
|
3251
|
-
!e &&
|
|
3253
|
+
!e && Ls(K, n.dragClass, !1), Ls(K, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), fc({
|
|
3252
3254
|
sortable: this,
|
|
3253
3255
|
name: "start",
|
|
3254
3256
|
originalEvent: t
|
|
@@ -3256,33 +3258,33 @@ Q.prototype = {
|
|
|
3256
3258
|
} else this._nulling();
|
|
3257
3259
|
},
|
|
3258
3260
|
_emulateDragOver: function() {
|
|
3259
|
-
if (
|
|
3260
|
-
this._lastX =
|
|
3261
|
-
for (var e = document.elementFromPoint(
|
|
3262
|
-
if (K.parentNode[
|
|
3263
|
-
if (t[
|
|
3261
|
+
if (Tc) {
|
|
3262
|
+
this._lastX = Tc.clientX, this._lastY = Tc.clientY, Yc();
|
|
3263
|
+
for (var e = document.elementFromPoint(Tc.clientX, Tc.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Tc.clientX, Tc.clientY), e !== t);) t = e;
|
|
3264
|
+
if (K.parentNode[nc]._isOutsideThisEl(e), t) do {
|
|
3265
|
+
if (t[nc]) {
|
|
3264
3266
|
var n = void 0;
|
|
3265
|
-
if (n = t[
|
|
3266
|
-
clientX:
|
|
3267
|
-
clientY:
|
|
3267
|
+
if (n = t[nc]._onDragOver({
|
|
3268
|
+
clientX: Tc.clientX,
|
|
3269
|
+
clientY: Tc.clientY,
|
|
3268
3270
|
target: e,
|
|
3269
3271
|
rootEl: t
|
|
3270
3272
|
}), n && !this.options.dragoverBubble) break;
|
|
3271
3273
|
}
|
|
3272
3274
|
e = t;
|
|
3273
3275
|
} while (t = t.parentNode);
|
|
3274
|
-
|
|
3276
|
+
Xc();
|
|
3275
3277
|
}
|
|
3276
3278
|
},
|
|
3277
3279
|
_onTouchMove: function(e) {
|
|
3278
|
-
if (
|
|
3279
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = J &&
|
|
3280
|
-
if (!Q.active && !
|
|
3280
|
+
if (wc) {
|
|
3281
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = J && Rs(J, !0), o = J && a && a.a, s = J && a && a.d, c = Vc && Ic && Gs(Ic), l = (i.clientX - wc.clientX + r.x) / (o || 1) + (c ? c[0] - Lc[0] : 0) / (o || 1), u = (i.clientY - wc.clientY + r.y) / (s || 1) + (c ? c[1] - Lc[1] : 0) / (s || 1);
|
|
3282
|
+
if (!Q.active && !xc) {
|
|
3281
3283
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3282
3284
|
this._onDragStart(e, !0);
|
|
3283
3285
|
}
|
|
3284
3286
|
if (J) {
|
|
3285
|
-
a ? (a.e += l - (
|
|
3287
|
+
a ? (a.e += l - (Ec || 0), a.f += u - (Dc || 0)) : a = {
|
|
3286
3288
|
a: 1,
|
|
3287
3289
|
b: 0,
|
|
3288
3290
|
c: 0,
|
|
@@ -3291,35 +3293,35 @@ Q.prototype = {
|
|
|
3291
3293
|
f: u
|
|
3292
3294
|
};
|
|
3293
3295
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3294
|
-
W(J, "webkitTransform", d), W(J, "mozTransform", d), W(J, "msTransform", d), W(J, "transform", d),
|
|
3296
|
+
W(J, "webkitTransform", d), W(J, "mozTransform", d), W(J, "msTransform", d), W(J, "transform", d), Ec = l, Dc = u, Tc = i;
|
|
3295
3297
|
}
|
|
3296
3298
|
e.cancelable && e.preventDefault();
|
|
3297
3299
|
}
|
|
3298
3300
|
},
|
|
3299
3301
|
_appendGhost: function() {
|
|
3300
3302
|
if (!J) {
|
|
3301
|
-
var e = this.options.fallbackOnBody ? document.body : Y, t = G(K, !0,
|
|
3302
|
-
if (
|
|
3303
|
-
for (
|
|
3304
|
-
|
|
3303
|
+
var e = this.options.fallbackOnBody ? document.body : Y, t = G(K, !0, Vc, !0, e), n = this.options;
|
|
3304
|
+
if (Vc) {
|
|
3305
|
+
for (Ic = e; W(Ic, "position") === "static" && W(Ic, "transform") === "none" && Ic !== document;) Ic = Ic.parentNode;
|
|
3306
|
+
Ic !== document.body && Ic !== document.documentElement ? (Ic === document && (Ic = Bs()), t.top += Ic.scrollTop, t.left += Ic.scrollLeft) : Ic = Bs(), Lc = Gs(Ic);
|
|
3305
3307
|
}
|
|
3306
|
-
J = K.cloneNode(!0),
|
|
3308
|
+
J = K.cloneNode(!0), Ls(J, n.ghostClass, !1), Ls(J, n.fallbackClass, !0), Ls(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", Vc ? "absolute" : "fixed"), W(J, "zIndex", "100000"), W(J, "pointerEvents", "none"), Q.ghost = J, e.appendChild(J), W(J, "transform-origin", Oc / parseInt(J.style.width) * 100 + "% " + kc / parseInt(J.style.height) * 100 + "%");
|
|
3307
3309
|
}
|
|
3308
3310
|
},
|
|
3309
3311
|
_onDragStart: function(e, t) {
|
|
3310
3312
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
+
dc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (dc("setupClone", this), Q.eventCanceled || (X = ec(K), X.removeAttribute("id"), X.draggable = !1, X.style["will-change"] = "", this._hideClone(), Ls(X, this.options.chosenClass, !1), Q.clone = X), n.cloneId = ll(function() {
|
|
3314
|
+
dc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || Y.insertBefore(X, K), n._hideClone(), fc({
|
|
3313
3315
|
sortable: n,
|
|
3314
3316
|
name: "clone"
|
|
3315
3317
|
}));
|
|
3316
|
-
}), !t &&
|
|
3318
|
+
}), !t && Ls(K, i.dragClass, !0), t ? (Sc = !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)")), xc = !0, n._dragStartId = ll(n._dragStarted.bind(n, t, e)), H(document, "selectstart", n), Ac = !0, ks && W(document.body, "user-select", "none"));
|
|
3317
3319
|
},
|
|
3318
3320
|
_onDragOver: function(e) {
|
|
3319
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3320
|
-
if (
|
|
3321
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = bc === s, u = o.sort, d = Z || c, f, p = this, m = !1;
|
|
3322
|
+
if (Rc) return;
|
|
3321
3323
|
function h(o, s) {
|
|
3322
|
-
|
|
3324
|
+
dc(o, p, vs({
|
|
3323
3325
|
evt: e,
|
|
3324
3326
|
isOwner: l,
|
|
3325
3327
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3331,7 +3333,7 @@ Q.prototype = {
|
|
|
3331
3333
|
target: n,
|
|
3332
3334
|
completed: _,
|
|
3333
3335
|
onMove: function(n, i) {
|
|
3334
|
-
return
|
|
3336
|
+
return el(Y, t, K, r, n, G(n), e, i);
|
|
3335
3337
|
},
|
|
3336
3338
|
changed: v
|
|
3337
3339
|
}, s));
|
|
@@ -3340,50 +3342,50 @@ Q.prototype = {
|
|
|
3340
3342
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3341
3343
|
}
|
|
3342
3344
|
function _(r) {
|
|
3343
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3345
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Ls(K, Z ? Z.options.ghostClass : c.options.ghostClass, !1), Ls(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() {
|
|
3344
3346
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3345
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === K && !K.animated || n === t && !n.animated) && (
|
|
3347
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === K && !K.animated || n === t && !n.animated) && (jc = null), !o.dragoverBubble && !e.rootEl && n !== document && (K.parentNode[nc]._isOutsideThisEl(e.target), !r && Zc(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3346
3348
|
}
|
|
3347
3349
|
function v() {
|
|
3348
|
-
|
|
3350
|
+
_c = Ws(K), yc = Ws(K, o.draggable), fc({
|
|
3349
3351
|
sortable: p,
|
|
3350
3352
|
name: "change",
|
|
3351
3353
|
toEl: t,
|
|
3352
|
-
newIndex:
|
|
3353
|
-
newDraggableIndex:
|
|
3354
|
+
newIndex: _c,
|
|
3355
|
+
newDraggableIndex: yc,
|
|
3354
3356
|
originalEvent: e
|
|
3355
3357
|
});
|
|
3356
3358
|
}
|
|
3357
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3359
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Fs(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3358
3360
|
if (K.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3359
|
-
if (
|
|
3361
|
+
if (Sc = !1, c && !o.disabled && (l ? u || (a = q !== Y) : Z === this || (this.lastPutMode = bc.checkPull(this, c, K, e)) && s.checkPut(this, c, K, e))) {
|
|
3360
3362
|
if (f = this._getDirection(e, n) === "vertical", r = G(K), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3361
|
-
if (a) return q = Y, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3362
|
-
var y =
|
|
3363
|
-
if (!y ||
|
|
3363
|
+
if (a) return q = Y, g(), this._hideClone(), h("revert"), Q.eventCanceled || (pc ? Y.insertBefore(K, pc) : Y.appendChild(K)), _(!0);
|
|
3364
|
+
var y = Us(t, o.draggable);
|
|
3365
|
+
if (!y || il(e, f, this) && !y.animated) {
|
|
3364
3366
|
if (y === K) return _(!1);
|
|
3365
|
-
if (y && t === e.target && (n = y), n && (i = G(n)),
|
|
3366
|
-
} else if (y &&
|
|
3367
|
-
var b =
|
|
3367
|
+
if (y && t === e.target && (n = y), n && (i = G(n)), el(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);
|
|
3368
|
+
} else if (y && rl(e, f, this)) {
|
|
3369
|
+
var b = Hs(t, 0, o, !0);
|
|
3368
3370
|
if (b === K) return _(!1);
|
|
3369
|
-
if (n = b, i = G(n),
|
|
3371
|
+
if (n = b, i = G(n), el(Y, t, K, r, n, i, e, !1) !== !1) return g(), t.insertBefore(K, b), q = t, v(), _(!0);
|
|
3370
3372
|
} else if (n.parentNode === t) {
|
|
3371
3373
|
i = G(n);
|
|
3372
|
-
var x = 0, S, C = K.parentNode !== t, w = !
|
|
3373
|
-
|
|
3374
|
+
var x = 0, S, C = K.parentNode !== t, w = !Kc(K.animated && K.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Vs(n, "top", "top") || Vs(K, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
3375
|
+
jc !== n && (S = i[T], Nc = !1, Pc = !w && o.invertSwap || C), x = al(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Pc, jc === n);
|
|
3374
3376
|
var D;
|
|
3375
3377
|
if (x !== 0) {
|
|
3376
|
-
var O =
|
|
3378
|
+
var O = Ws(K);
|
|
3377
3379
|
do
|
|
3378
3380
|
O -= x, D = q.children[O];
|
|
3379
3381
|
while (D && (W(D, "display") === "none" || D === J));
|
|
3380
3382
|
}
|
|
3381
3383
|
if (x === 0 || D === n) return _(!1);
|
|
3382
|
-
|
|
3384
|
+
jc = n, Mc = x;
|
|
3383
3385
|
var k = n.nextElementSibling, A = !1;
|
|
3384
3386
|
A = x === 1;
|
|
3385
|
-
var j =
|
|
3386
|
-
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1),
|
|
3387
|
+
var j = el(Y, t, K, r, n, i, e, A);
|
|
3388
|
+
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1), Rc = !0, setTimeout(nl, 30), g(), A && !k ? t.appendChild(K) : n.parentNode.insertBefore(K, A ? k : n), E && $s(E, 0, ee - E.scrollTop), q = K.parentNode, S !== void 0 && !Pc && (Fc = Math.abs(S - G(n)[T])), v(), _(!0);
|
|
3387
3389
|
}
|
|
3388
3390
|
if (t.contains(K)) return _(!1);
|
|
3389
3391
|
}
|
|
@@ -3391,7 +3393,7 @@ Q.prototype = {
|
|
|
3391
3393
|
},
|
|
3392
3394
|
_ignoreWhileAnimating: null,
|
|
3393
3395
|
_offMoveEvents: function() {
|
|
3394
|
-
U(document, "mousemove", this._onTouchMove), U(document, "touchmove", this._onTouchMove), U(document, "pointermove", this._onTouchMove), U(document, "dragover",
|
|
3396
|
+
U(document, "mousemove", this._onTouchMove), U(document, "touchmove", this._onTouchMove), U(document, "pointermove", this._onTouchMove), U(document, "dragover", Zc), U(document, "mousemove", Zc), U(document, "touchmove", Zc);
|
|
3395
3397
|
},
|
|
3396
3398
|
_offUpEvents: function() {
|
|
3397
3399
|
var e = this.el.ownerDocument;
|
|
@@ -3399,46 +3401,46 @@ Q.prototype = {
|
|
|
3399
3401
|
},
|
|
3400
3402
|
_onDrop: function(e) {
|
|
3401
3403
|
var t = this.el, n = this.options;
|
|
3402
|
-
|
|
3404
|
+
_c = Ws(K), yc = Ws(K, n.draggable), dc("drop", this, { evt: e }), q = K && K.parentNode, _c = Ws(K), yc = Ws(K, n.draggable), Q.eventCanceled || (xc = !1, Pc = !1, Nc = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ul(this.cloneId), ul(this._dragStartId), this.nativeDraggable && (U(document, "drop", this), U(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ks && W(document.body, "user-select", ""), W(K, "transform", ""), e && (Ac && (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), tl(K), K.style["will-change"] = "", Ac && !xc && Ls(K, Z ? Z.options.ghostClass : this.options.ghostClass, !1), Ls(K, this.options.chosenClass, !1), fc({
|
|
3403
3405
|
sortable: this,
|
|
3404
3406
|
name: "unchoose",
|
|
3405
3407
|
toEl: q,
|
|
3406
3408
|
newIndex: null,
|
|
3407
3409
|
newDraggableIndex: null,
|
|
3408
3410
|
originalEvent: e
|
|
3409
|
-
}), Y === q ?
|
|
3411
|
+
}), Y === q ? _c !== gc && _c >= 0 && (fc({
|
|
3410
3412
|
sortable: this,
|
|
3411
3413
|
name: "update",
|
|
3412
3414
|
toEl: q,
|
|
3413
3415
|
originalEvent: e
|
|
3414
|
-
}),
|
|
3416
|
+
}), fc({
|
|
3415
3417
|
sortable: this,
|
|
3416
3418
|
name: "sort",
|
|
3417
3419
|
toEl: q,
|
|
3418
3420
|
originalEvent: e
|
|
3419
|
-
})) : (
|
|
3421
|
+
})) : (_c >= 0 && (fc({
|
|
3420
3422
|
rootEl: q,
|
|
3421
3423
|
name: "add",
|
|
3422
3424
|
toEl: q,
|
|
3423
3425
|
fromEl: Y,
|
|
3424
3426
|
originalEvent: e
|
|
3425
|
-
}),
|
|
3427
|
+
}), fc({
|
|
3426
3428
|
sortable: this,
|
|
3427
3429
|
name: "remove",
|
|
3428
3430
|
toEl: q,
|
|
3429
3431
|
originalEvent: e
|
|
3430
|
-
}),
|
|
3432
|
+
}), fc({
|
|
3431
3433
|
rootEl: q,
|
|
3432
3434
|
name: "sort",
|
|
3433
3435
|
toEl: q,
|
|
3434
3436
|
fromEl: Y,
|
|
3435
3437
|
originalEvent: e
|
|
3436
|
-
}),
|
|
3438
|
+
}), fc({
|
|
3437
3439
|
sortable: this,
|
|
3438
3440
|
name: "sort",
|
|
3439
3441
|
toEl: q,
|
|
3440
3442
|
originalEvent: e
|
|
3441
|
-
})), Z && Z.save()), Q.active && ((
|
|
3443
|
+
})), Z && Z.save()), Q.active && ((_c == null || _c === -1) && (_c = gc, yc = vc), fc({
|
|
3442
3444
|
sortable: this,
|
|
3443
3445
|
name: "end",
|
|
3444
3446
|
toEl: q,
|
|
@@ -3446,9 +3448,9 @@ Q.prototype = {
|
|
|
3446
3448
|
}), this.save())))), this._nulling();
|
|
3447
3449
|
},
|
|
3448
3450
|
_nulling: function() {
|
|
3449
|
-
|
|
3451
|
+
dc("nulling", this), Y = K = q = J = pc = X = mc = hc = wc = Tc = Ac = _c = yc = gc = vc = jc = Mc = Z = bc = Q.dragged = Q.ghost = Q.clone = Q.active = null, zc.forEach(function(e) {
|
|
3450
3452
|
e.checked = !0;
|
|
3451
|
-
}),
|
|
3453
|
+
}), zc.length = Ec = Dc = 0;
|
|
3452
3454
|
},
|
|
3453
3455
|
handleEvent: function(e) {
|
|
3454
3456
|
switch (e.type) {
|
|
@@ -3458,20 +3460,20 @@ Q.prototype = {
|
|
|
3458
3460
|
break;
|
|
3459
3461
|
case "dragenter":
|
|
3460
3462
|
case "dragover":
|
|
3461
|
-
K && (this._onDragOver(e),
|
|
3463
|
+
K && (this._onDragOver(e), $c(e));
|
|
3462
3464
|
break;
|
|
3463
3465
|
case "selectstart": e.preventDefault();
|
|
3464
3466
|
}
|
|
3465
3467
|
},
|
|
3466
3468
|
toArray: function() {
|
|
3467
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3469
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Fs(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || sl(t));
|
|
3468
3470
|
return e;
|
|
3469
3471
|
},
|
|
3470
3472
|
sort: function(e, t) {
|
|
3471
3473
|
var n = {}, r = this.el;
|
|
3472
3474
|
this.toArray().forEach(function(e, t) {
|
|
3473
3475
|
var i = r.children[t];
|
|
3474
|
-
|
|
3476
|
+
Fs(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3475
3477
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3476
3478
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3477
3479
|
}), t && this.animateAll();
|
|
@@ -3481,122 +3483,122 @@ Q.prototype = {
|
|
|
3481
3483
|
e && e.set && e.set(this);
|
|
3482
3484
|
},
|
|
3483
3485
|
closest: function(e, t) {
|
|
3484
|
-
return
|
|
3486
|
+
return Fs(e, t || this.options.draggable, this.el, !1);
|
|
3485
3487
|
},
|
|
3486
3488
|
option: function(e, t) {
|
|
3487
3489
|
var n = this.options;
|
|
3488
3490
|
if (t === void 0) return n[e];
|
|
3489
|
-
var r =
|
|
3490
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3491
|
+
var r = cc.modifyOption(this, e, t);
|
|
3492
|
+
n[e] = r === void 0 ? t : r, e === "group" && Jc(n);
|
|
3491
3493
|
},
|
|
3492
3494
|
destroy: function() {
|
|
3493
|
-
|
|
3495
|
+
dc("destroy", this);
|
|
3494
3496
|
var e = this.el;
|
|
3495
|
-
e[
|
|
3497
|
+
e[nc] = 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) {
|
|
3496
3498
|
e.removeAttribute("draggable");
|
|
3497
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3499
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Cc.splice(Cc.indexOf(this.el), 1), this.el = e = null;
|
|
3498
3500
|
},
|
|
3499
3501
|
_hideClone: function() {
|
|
3500
|
-
if (!
|
|
3501
|
-
if (
|
|
3502
|
-
W(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X),
|
|
3502
|
+
if (!hc) {
|
|
3503
|
+
if (dc("hideClone", this), Q.eventCanceled) return;
|
|
3504
|
+
W(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X), hc = !0;
|
|
3503
3505
|
}
|
|
3504
3506
|
},
|
|
3505
3507
|
_showClone: function(e) {
|
|
3506
3508
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3507
|
-
else if (
|
|
3508
|
-
if (
|
|
3509
|
-
K.parentNode == Y && !this.options.group.revertClone ? Y.insertBefore(X, K) :
|
|
3509
|
+
else if (hc) {
|
|
3510
|
+
if (dc("showClone", this), Q.eventCanceled) return;
|
|
3511
|
+
K.parentNode == Y && !this.options.group.revertClone ? Y.insertBefore(X, K) : pc ? Y.insertBefore(X, pc) : Y.appendChild(X), this.options.group.revertClone && this.animate(K, X), W(X, "display", ""), hc = !1;
|
|
3510
3512
|
}
|
|
3511
3513
|
}
|
|
3512
3514
|
};
|
|
3513
|
-
function
|
|
3515
|
+
function $c(e) {
|
|
3514
3516
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3515
3517
|
}
|
|
3516
|
-
function
|
|
3517
|
-
var c, l = e[
|
|
3518
|
-
return window.CustomEvent && !
|
|
3518
|
+
function el(e, t, n, r, i, a, o, s) {
|
|
3519
|
+
var c, l = e[nc], u = l.options.onMove, d;
|
|
3520
|
+
return window.CustomEvent && !Es && !Ds ? c = new CustomEvent("move", {
|
|
3519
3521
|
bubbles: !0,
|
|
3520
3522
|
cancelable: !0
|
|
3521
3523
|
}) : (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;
|
|
3522
3524
|
}
|
|
3523
|
-
function
|
|
3525
|
+
function tl(e) {
|
|
3524
3526
|
e.draggable = !1;
|
|
3525
3527
|
}
|
|
3526
|
-
function
|
|
3527
|
-
|
|
3528
|
+
function nl() {
|
|
3529
|
+
Rc = !1;
|
|
3528
3530
|
}
|
|
3529
|
-
function
|
|
3530
|
-
var r = G(
|
|
3531
|
+
function rl(e, t, n) {
|
|
3532
|
+
var r = G(Hs(n.el, 0, n.options, !0)), i = tc(n.el, n.options, J), a = 10;
|
|
3531
3533
|
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;
|
|
3532
3534
|
}
|
|
3533
|
-
function
|
|
3534
|
-
var r = G(
|
|
3535
|
+
function il(e, t, n) {
|
|
3536
|
+
var r = G(Us(n.el, n.options.draggable)), i = tc(n.el, n.options, J), a = 10;
|
|
3535
3537
|
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;
|
|
3536
3538
|
}
|
|
3537
|
-
function
|
|
3539
|
+
function al(e, t, n, r, i, a, o, s) {
|
|
3538
3540
|
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;
|
|
3539
3541
|
if (!o) {
|
|
3540
|
-
if (s &&
|
|
3541
|
-
if (!
|
|
3542
|
-
else if (
|
|
3543
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3542
|
+
if (s && Fc < l * i) {
|
|
3543
|
+
if (!Nc && (Mc === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Nc = !0), Nc) f = !0;
|
|
3544
|
+
else if (Mc === 1 ? c < u + Fc : c > d - Fc) return -Mc;
|
|
3545
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return ol(t);
|
|
3544
3546
|
}
|
|
3545
3547
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3546
3548
|
}
|
|
3547
|
-
function
|
|
3548
|
-
return
|
|
3549
|
+
function ol(e) {
|
|
3550
|
+
return Ws(K) < Ws(e) ? 1 : -1;
|
|
3549
3551
|
}
|
|
3550
|
-
function
|
|
3552
|
+
function sl(e) {
|
|
3551
3553
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3552
3554
|
return r.toString(36);
|
|
3553
3555
|
}
|
|
3554
|
-
function
|
|
3555
|
-
|
|
3556
|
+
function cl(e) {
|
|
3557
|
+
zc.length = 0;
|
|
3556
3558
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3557
3559
|
var r = t[n];
|
|
3558
|
-
r.checked &&
|
|
3560
|
+
r.checked && zc.push(r);
|
|
3559
3561
|
}
|
|
3560
3562
|
}
|
|
3561
|
-
function
|
|
3563
|
+
function ll(e) {
|
|
3562
3564
|
return setTimeout(e, 0);
|
|
3563
3565
|
}
|
|
3564
|
-
function
|
|
3566
|
+
function ul(e) {
|
|
3565
3567
|
return clearTimeout(e);
|
|
3566
3568
|
}
|
|
3567
|
-
|
|
3568
|
-
(Q.active ||
|
|
3569
|
+
Bc && H(document, "touchmove", function(e) {
|
|
3570
|
+
(Q.active || xc) && e.cancelable && e.preventDefault();
|
|
3569
3571
|
}), Q.utils = {
|
|
3570
3572
|
on: H,
|
|
3571
3573
|
off: U,
|
|
3572
3574
|
css: W,
|
|
3573
|
-
find:
|
|
3575
|
+
find: zs,
|
|
3574
3576
|
is: function(e, t) {
|
|
3575
|
-
return !!
|
|
3577
|
+
return !!Fs(e, t, e, !1);
|
|
3576
3578
|
},
|
|
3577
|
-
extend:
|
|
3578
|
-
throttle:
|
|
3579
|
-
closest:
|
|
3580
|
-
toggleClass:
|
|
3581
|
-
clone:
|
|
3582
|
-
index:
|
|
3583
|
-
nextTick:
|
|
3584
|
-
cancelNextTick:
|
|
3585
|
-
detectDirection:
|
|
3586
|
-
getChild:
|
|
3579
|
+
extend: Js,
|
|
3580
|
+
throttle: Zs,
|
|
3581
|
+
closest: Fs,
|
|
3582
|
+
toggleClass: Ls,
|
|
3583
|
+
clone: ec,
|
|
3584
|
+
index: Ws,
|
|
3585
|
+
nextTick: ll,
|
|
3586
|
+
cancelNextTick: ul,
|
|
3587
|
+
detectDirection: Gc,
|
|
3588
|
+
getChild: Hs
|
|
3587
3589
|
}, Q.get = function(e) {
|
|
3588
|
-
return e[
|
|
3590
|
+
return e[nc];
|
|
3589
3591
|
}, Q.mount = function() {
|
|
3590
3592
|
var e = [...arguments];
|
|
3591
3593
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3592
3594
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3593
|
-
e.utils && (Q.utils =
|
|
3595
|
+
e.utils && (Q.utils = vs(vs({}, Q.utils), e.utils)), cc.mount(e);
|
|
3594
3596
|
});
|
|
3595
3597
|
}, Q.create = function(e, t) {
|
|
3596
3598
|
return new Q(e, t);
|
|
3597
|
-
}, Q.version =
|
|
3598
|
-
var $ = [],
|
|
3599
|
-
function
|
|
3599
|
+
}, Q.version = ws;
|
|
3600
|
+
var $ = [], dl, fl, pl = !1, ml, hl, gl, _l;
|
|
3601
|
+
function vl() {
|
|
3600
3602
|
function e() {
|
|
3601
3603
|
for (var e in this.defaults = {
|
|
3602
3604
|
scroll: !0,
|
|
@@ -3616,63 +3618,63 @@ function gl() {
|
|
|
3616
3618
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3617
3619
|
},
|
|
3618
3620
|
drop: function() {
|
|
3619
|
-
this.sortable.nativeDraggable ? U(document, "dragover", this._handleAutoScroll) : (U(document, "pointermove", this._handleFallbackAutoScroll), U(document, "touchmove", this._handleFallbackAutoScroll), U(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3621
|
+
this.sortable.nativeDraggable ? U(document, "dragover", this._handleAutoScroll) : (U(document, "pointermove", this._handleFallbackAutoScroll), U(document, "touchmove", this._handleFallbackAutoScroll), U(document, "mousemove", this._handleFallbackAutoScroll)), bl(), yl(), Qs();
|
|
3620
3622
|
},
|
|
3621
3623
|
nulling: function() {
|
|
3622
|
-
|
|
3624
|
+
gl = fl = dl = pl = _l = ml = hl = null, $.length = 0;
|
|
3623
3625
|
},
|
|
3624
3626
|
_handleFallbackAutoScroll: function(e) {
|
|
3625
3627
|
this._handleAutoScroll(e, !0);
|
|
3626
3628
|
},
|
|
3627
3629
|
_handleAutoScroll: function(e, t) {
|
|
3628
3630
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3629
|
-
if (
|
|
3630
|
-
|
|
3631
|
-
var o =
|
|
3632
|
-
|
|
3633
|
-
var a =
|
|
3634
|
-
a !== o && (o = a,
|
|
3635
|
-
}, 10),
|
|
3631
|
+
if (gl = e, t || this.options.forceAutoScrollFallback || Ds || Es || ks) {
|
|
3632
|
+
xl(e, this.options, a, t);
|
|
3633
|
+
var o = qs(a, !0);
|
|
3634
|
+
pl && (!_l || r !== ml || i !== hl) && (_l && bl(), _l = setInterval(function() {
|
|
3635
|
+
var a = qs(document.elementFromPoint(r, i), !0);
|
|
3636
|
+
a !== o && (o = a, yl()), xl(e, n.options, a, t);
|
|
3637
|
+
}, 10), ml = r, hl = i);
|
|
3636
3638
|
} else {
|
|
3637
|
-
if (!this.options.bubbleScroll ||
|
|
3638
|
-
|
|
3639
|
+
if (!this.options.bubbleScroll || qs(a, !0) === Bs()) {
|
|
3640
|
+
yl();
|
|
3639
3641
|
return;
|
|
3640
3642
|
}
|
|
3641
|
-
|
|
3643
|
+
xl(e, this.options, qs(a, !1), !1);
|
|
3642
3644
|
}
|
|
3643
3645
|
}
|
|
3644
|
-
},
|
|
3646
|
+
}, xs(e, {
|
|
3645
3647
|
pluginName: "scroll",
|
|
3646
3648
|
initializeByDefault: !0
|
|
3647
3649
|
});
|
|
3648
3650
|
}
|
|
3649
|
-
function
|
|
3651
|
+
function yl() {
|
|
3650
3652
|
$.forEach(function(e) {
|
|
3651
3653
|
clearInterval(e.pid);
|
|
3652
3654
|
}), $ = [];
|
|
3653
3655
|
}
|
|
3654
|
-
function
|
|
3655
|
-
clearInterval(
|
|
3656
|
+
function bl() {
|
|
3657
|
+
clearInterval(_l);
|
|
3656
3658
|
}
|
|
3657
|
-
var
|
|
3659
|
+
var xl = Zs(function(e, t, n, r) {
|
|
3658
3660
|
if (t.scroll) {
|
|
3659
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3660
|
-
|
|
3661
|
-
var d = 0, f =
|
|
3661
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Bs(), l = !1, u;
|
|
3662
|
+
fl !== n && (fl = n, yl(), dl = t.scroll, u = t.scrollFn, dl === !0 && (dl = qs(n, !0)));
|
|
3663
|
+
var d = 0, f = dl;
|
|
3662
3664
|
do {
|
|
3663
3665
|
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;
|
|
3664
3666
|
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"));
|
|
3665
3667
|
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);
|
|
3666
3668
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3667
3669
|
($[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() {
|
|
3668
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3670
|
+
r && this.layer === 0 && Q.active._onTouchMove(gl);
|
|
3669
3671
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3670
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3672
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[nc], n, t, e, gl, $[this.layer].el) !== "continue" || $s($[this.layer].el, n, t);
|
|
3671
3673
|
}.bind({ layer: d }), 24))), d++;
|
|
3672
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3673
|
-
|
|
3674
|
+
} while (t.bubbleScroll && f !== c && (f = qs(f, !1)));
|
|
3675
|
+
pl = l;
|
|
3674
3676
|
}
|
|
3675
|
-
}, 30),
|
|
3677
|
+
}, 30), Sl = function(e) {
|
|
3676
3678
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3677
3679
|
if (t) {
|
|
3678
3680
|
var c = n || i;
|
|
@@ -3684,8 +3686,8 @@ var yl = Ys(function(e, t, n, r) {
|
|
|
3684
3686
|
}));
|
|
3685
3687
|
}
|
|
3686
3688
|
};
|
|
3687
|
-
function
|
|
3688
|
-
|
|
3689
|
+
function Cl() {}
|
|
3690
|
+
Cl.prototype = {
|
|
3689
3691
|
startIndex: null,
|
|
3690
3692
|
dragStart: function(e) {
|
|
3691
3693
|
var t = e.oldDraggableIndex;
|
|
@@ -3694,67 +3696,67 @@ xl.prototype = {
|
|
|
3694
3696
|
onSpill: function(e) {
|
|
3695
3697
|
var t = e.dragEl, n = e.putSortable;
|
|
3696
3698
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3697
|
-
var r =
|
|
3699
|
+
var r = Hs(this.sortable.el, this.startIndex, this.options);
|
|
3698
3700
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3699
3701
|
},
|
|
3700
|
-
drop:
|
|
3701
|
-
},
|
|
3702
|
-
function
|
|
3703
|
-
|
|
3702
|
+
drop: Sl
|
|
3703
|
+
}, xs(Cl, { pluginName: "revertOnSpill" });
|
|
3704
|
+
function wl() {}
|
|
3705
|
+
wl.prototype = {
|
|
3704
3706
|
onSpill: function(e) {
|
|
3705
3707
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3706
3708
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3707
3709
|
},
|
|
3708
|
-
drop:
|
|
3709
|
-
},
|
|
3710
|
-
function
|
|
3710
|
+
drop: Sl
|
|
3711
|
+
}, xs(wl, { pluginName: "removeOnSpill" }), Q.mount(new vl()), Q.mount(wl, Cl);
|
|
3712
|
+
function Tl(e) {
|
|
3711
3713
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3712
3714
|
}
|
|
3713
|
-
function
|
|
3715
|
+
function El(e) {
|
|
3714
3716
|
O() && ne(e);
|
|
3715
3717
|
}
|
|
3716
|
-
function
|
|
3718
|
+
function Dl(e) {
|
|
3717
3719
|
O() ? s(e) : _(e);
|
|
3718
3720
|
}
|
|
3719
|
-
var
|
|
3720
|
-
function
|
|
3721
|
-
|
|
3721
|
+
var Ol = null, kl = null;
|
|
3722
|
+
function Al(e = null, t = null) {
|
|
3723
|
+
Ol = e, kl = t;
|
|
3722
3724
|
}
|
|
3723
|
-
function
|
|
3725
|
+
function jl() {
|
|
3724
3726
|
return {
|
|
3725
|
-
data:
|
|
3726
|
-
clonedData:
|
|
3727
|
+
data: Ol,
|
|
3728
|
+
clonedData: kl
|
|
3727
3729
|
};
|
|
3728
3730
|
}
|
|
3729
|
-
var
|
|
3730
|
-
function
|
|
3731
|
+
var Ml = Symbol("cloneElement");
|
|
3732
|
+
function Nl(...e) {
|
|
3731
3733
|
let t = O()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3732
3734
|
Array.isArray(A(i)) || (a = i, i = null);
|
|
3733
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3735
|
+
let o = null, { immediate: s = !0, clone: l = Tl, forceFallback: u, fallbackOnBody: d, customUpdate: f } = A(a) ?? {};
|
|
3734
3736
|
function p(e) {
|
|
3735
3737
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3736
3738
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3737
3739
|
let s = A(A(i)?.[r]), c = l(s);
|
|
3738
|
-
|
|
3740
|
+
Al(s, c), a[Ml] = c;
|
|
3739
3741
|
}
|
|
3740
3742
|
function m(e) {
|
|
3741
|
-
let t = e.item[
|
|
3742
|
-
if (!
|
|
3743
|
-
if (
|
|
3743
|
+
let t = e.item[Ml];
|
|
3744
|
+
if (!os(t)) {
|
|
3745
|
+
if (ls(e.item), w(i)) {
|
|
3744
3746
|
let n = [...A(i)];
|
|
3745
|
-
i.value =
|
|
3747
|
+
i.value = as(n, e.newDraggableIndex, t);
|
|
3746
3748
|
return;
|
|
3747
3749
|
}
|
|
3748
|
-
|
|
3750
|
+
as(A(i), e.newDraggableIndex, t);
|
|
3749
3751
|
}
|
|
3750
3752
|
}
|
|
3751
3753
|
function h(e) {
|
|
3752
3754
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3753
|
-
if (
|
|
3755
|
+
if (cs(t, n, r), o === "clone") ls(s);
|
|
3754
3756
|
else if (w(i)) {
|
|
3755
3757
|
let e = [...A(i)];
|
|
3756
|
-
i.value =
|
|
3757
|
-
} else
|
|
3758
|
+
i.value = is(e, a);
|
|
3759
|
+
} else is(A(i), a);
|
|
3758
3760
|
}
|
|
3759
3761
|
function g(e) {
|
|
3760
3762
|
if (f) {
|
|
@@ -3762,10 +3764,10 @@ function jl(...e) {
|
|
|
3762
3764
|
return;
|
|
3763
3765
|
}
|
|
3764
3766
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3765
|
-
if (
|
|
3767
|
+
if (ls(n), cs(t, n, r), w(i)) {
|
|
3766
3768
|
let e = [...A(i)];
|
|
3767
|
-
i.value =
|
|
3768
|
-
} else
|
|
3769
|
+
i.value = ts(e, a, o);
|
|
3770
|
+
} else ts(A(i), a, o);
|
|
3769
3771
|
}
|
|
3770
3772
|
function v(e) {
|
|
3771
3773
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3784,7 +3786,7 @@ function jl(...e) {
|
|
|
3784
3786
|
n = null;
|
|
3785
3787
|
}
|
|
3786
3788
|
_(() => {
|
|
3787
|
-
if (
|
|
3789
|
+
if (Al(), o) throw o;
|
|
3788
3790
|
});
|
|
3789
3791
|
}
|
|
3790
3792
|
let y = {
|
|
@@ -3796,19 +3798,19 @@ function jl(...e) {
|
|
|
3796
3798
|
};
|
|
3797
3799
|
function b(e) {
|
|
3798
3800
|
let n = A(r);
|
|
3799
|
-
return e ||=
|
|
3801
|
+
return e ||= ss(n) ? us(n, t?.$el) : n, e && !ps(e) && (e = e.$el), e || es("Root element not found"), e;
|
|
3800
3802
|
}
|
|
3801
3803
|
function x() {
|
|
3802
|
-
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3803
|
-
return
|
|
3804
|
-
|
|
3805
|
-
}),
|
|
3804
|
+
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r = Zo(e, ["immediate", "clone"]);
|
|
3805
|
+
return ms(r, (e, t) => {
|
|
3806
|
+
hs(e) && (r[e] = (e, ...n) => (gs(e, jl()), t(e, ...n)));
|
|
3807
|
+
}), fs(i === null ? {} : y, r);
|
|
3806
3808
|
}
|
|
3807
3809
|
let S = (e) => {
|
|
3808
3810
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3809
3811
|
};
|
|
3810
3812
|
c(() => a, () => {
|
|
3811
|
-
o &&
|
|
3813
|
+
o && ms(x(), (e, t) => {
|
|
3812
3814
|
o?.option(e, t);
|
|
3813
3815
|
});
|
|
3814
3816
|
}, { deep: !0 });
|
|
@@ -3821,15 +3823,15 @@ function jl(...e) {
|
|
|
3821
3823
|
toArray: () => o?.toArray(),
|
|
3822
3824
|
closest: (...e) => o?.closest(...e)
|
|
3823
3825
|
};
|
|
3824
|
-
return
|
|
3826
|
+
return Dl(() => {
|
|
3825
3827
|
s && S();
|
|
3826
|
-
}),
|
|
3828
|
+
}), El(C.destroy), Xo({
|
|
3827
3829
|
start: S,
|
|
3828
3830
|
pause: () => C?.option("disabled", !0),
|
|
3829
3831
|
resume: () => C?.option("disabled", !1)
|
|
3830
3832
|
}, C);
|
|
3831
3833
|
}
|
|
3832
|
-
var
|
|
3834
|
+
var Pl = [
|
|
3833
3835
|
"update",
|
|
3834
3836
|
"start",
|
|
3835
3837
|
"add",
|
|
@@ -3842,7 +3844,7 @@ var Ml = [
|
|
|
3842
3844
|
"clone",
|
|
3843
3845
|
"move",
|
|
3844
3846
|
"change"
|
|
3845
|
-
],
|
|
3847
|
+
], Fl = [
|
|
3846
3848
|
"clone",
|
|
3847
3849
|
"animation",
|
|
3848
3850
|
"ghostClass",
|
|
@@ -3886,46 +3888,46 @@ var Ml = [
|
|
|
3886
3888
|
"tag",
|
|
3887
3889
|
"target",
|
|
3888
3890
|
"customUpdate",
|
|
3889
|
-
...
|
|
3890
|
-
],
|
|
3891
|
+
...Pl.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3892
|
+
], Il = B({
|
|
3891
3893
|
name: "VueDraggable",
|
|
3892
3894
|
model: {
|
|
3893
3895
|
prop: "modelValue",
|
|
3894
3896
|
event: "update:modelValue"
|
|
3895
3897
|
},
|
|
3896
|
-
props:
|
|
3897
|
-
emits: ["update:modelValue", ...
|
|
3898
|
+
props: Fl,
|
|
3899
|
+
emits: ["update:modelValue", ...Pl],
|
|
3898
3900
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3899
|
-
let a =
|
|
3901
|
+
let a = Pl.reduce((e, t) => {
|
|
3900
3902
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3901
3903
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3902
3904
|
}, {}), o = k(() => {
|
|
3903
|
-
let t = D(e), { modelValue: n } = t, r =
|
|
3905
|
+
let t = D(e), { modelValue: n } = t, r = Zo(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3904
3906
|
let r = A(n);
|
|
3905
3907
|
return r !== void 0 && (e[t] = r), e;
|
|
3906
3908
|
}, {});
|
|
3907
|
-
return
|
|
3909
|
+
return Xo(Xo({}, a), rs(Xo(Xo({}, i), o)));
|
|
3908
3910
|
}), s = k({
|
|
3909
3911
|
get: () => e.modelValue,
|
|
3910
3912
|
set: (e) => n("update:modelValue", e)
|
|
3911
|
-
}), c = M(), l = b(
|
|
3913
|
+
}), c = M(), l = b(Nl(e.target || c, s, o));
|
|
3912
3914
|
return r(l), () => x(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3913
3915
|
}
|
|
3914
|
-
}),
|
|
3916
|
+
}), Ll = {
|
|
3915
3917
|
mounted: "mounted",
|
|
3916
3918
|
unmounted: "unmounted"
|
|
3917
3919
|
};
|
|
3918
|
-
|
|
3920
|
+
Ll.mounted, Ll.unmounted;
|
|
3919
3921
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3920
|
-
var
|
|
3922
|
+
var Rl = { class: "tpl:relative tpl:w-full" }, zl = {
|
|
3921
3923
|
key: 0,
|
|
3922
3924
|
"data-testid": "hero-image-hint",
|
|
3923
3925
|
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)]"
|
|
3924
|
-
},
|
|
3926
|
+
}, Bl = {
|
|
3925
3927
|
key: 0,
|
|
3926
3928
|
"data-testid": "section-drop-hint",
|
|
3927
3929
|
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)]"
|
|
3928
|
-
},
|
|
3930
|
+
}, Vl = /* @__PURE__ */ B({
|
|
3929
3931
|
__name: "SectionBlock",
|
|
3930
3932
|
props: {
|
|
3931
3933
|
block: {},
|
|
@@ -3934,15 +3936,15 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
3934
3936
|
},
|
|
3935
3937
|
setup(e) {
|
|
3936
3938
|
let t = {
|
|
3937
|
-
title:
|
|
3938
|
-
paragraph:
|
|
3939
|
-
image:
|
|
3940
|
-
button:
|
|
3941
|
-
divider:
|
|
3942
|
-
custom:
|
|
3943
|
-
}, n = e, { t: r } = ce(), i =
|
|
3944
|
-
g(
|
|
3945
|
-
let u = z(
|
|
3939
|
+
title: Lo,
|
|
3940
|
+
paragraph: $a,
|
|
3941
|
+
image: Ka,
|
|
3942
|
+
button: ma,
|
|
3943
|
+
divider: Oa,
|
|
3944
|
+
custom: Ea
|
|
3945
|
+
}, n = e, { t: r } = ce(), i = Nn(Pn, "SectionBlock"), { displayBlock: o } = Pt(i), s = k(() => n.sourceBlock ?? n.block), c = z(_n, k(() => /* @__PURE__ */ new Set()));
|
|
3946
|
+
g(_n, k(() => /* @__PURE__ */ new Set([...c.value, ...Object.entries(s.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
3947
|
+
let u = z(Cn, null), f = z(xn, null), _ = z(pn, {}), b = z(an, null), x = z(cn, null);
|
|
3946
3948
|
function w(e) {
|
|
3947
3949
|
if (b?.value) return;
|
|
3948
3950
|
let t = _.savedBlocks;
|
|
@@ -4003,10 +4005,10 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4003
4005
|
return O(e).length === 0 && i.state.previewMode;
|
|
4004
4006
|
}
|
|
4005
4007
|
function oe(e, t) {
|
|
4006
|
-
b?.value ||
|
|
4008
|
+
b?.value || eo(i, t, n.block.id, e);
|
|
4007
4009
|
}
|
|
4008
4010
|
function B(e) {
|
|
4009
|
-
return
|
|
4011
|
+
return Ji(e, f, t);
|
|
4010
4012
|
}
|
|
4011
4013
|
function se(e, t) {
|
|
4012
4014
|
b?.value || e.type !== "custom" || i.updateBlock(e.id, {
|
|
@@ -4014,17 +4016,17 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4014
4016
|
dataSourceFetched: t.dataSourceFetched
|
|
4015
4017
|
});
|
|
4016
4018
|
}
|
|
4017
|
-
return (t, s) => (m(), N("div",
|
|
4019
|
+
return (t, s) => (m(), N("div", Rl, [F.value ? (m(), N("div", zl, [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", {
|
|
4018
4020
|
key: c,
|
|
4019
4021
|
class: h(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", I(c) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4020
4022
|
style: y({ width: D.value ? "100%" : T.value[c] })
|
|
4021
|
-
}, [E(A(
|
|
4023
|
+
}, [E(A(Il), {
|
|
4022
4024
|
disabled: A(b) ?? !1,
|
|
4023
4025
|
"model-value": O(c),
|
|
4024
4026
|
group: {
|
|
4025
4027
|
name: "blocks",
|
|
4026
4028
|
pull: !0,
|
|
4027
|
-
put: (e, t, n) => A(
|
|
4029
|
+
put: (e, t, n) => A(Wo)(n)
|
|
4028
4030
|
},
|
|
4029
4031
|
animation: 150,
|
|
4030
4032
|
"ghost-class": "tpl-ghost",
|
|
@@ -4038,12 +4040,12 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4038
4040
|
"tpl:min-h-[60px]": ie(c),
|
|
4039
4041
|
"tpl:min-h-[34px]": ae(c)
|
|
4040
4042
|
}]),
|
|
4041
|
-
onUpdate: (e) => !A(b) && A(
|
|
4043
|
+
onUpdate: (e) => !A(b) && A(eo)(A(i), O(c), n.block.id, c, e),
|
|
4042
4044
|
onStart: (e) => re.value = c,
|
|
4043
4045
|
onEnd: s[0] ||= (e) => re.value = null,
|
|
4044
4046
|
"onUpdate:modelValue": (e) => oe(c, e)
|
|
4045
4047
|
}, {
|
|
4046
|
-
default: S(() => [(m(!0), N(L, null, v(O(c), (t) => C((m(), N("div", { key: t.id }, [E(
|
|
4048
|
+
default: S(() => [(m(!0), N(L, null, v(O(c), (t) => C((m(), N("div", { key: t.id }, [E(Fo, {
|
|
4047
4049
|
block: t,
|
|
4048
4050
|
"display-block": A(o)(t),
|
|
4049
4051
|
"is-selected": A(i).state.selectedBlockId === t.id,
|
|
@@ -4080,14 +4082,14 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4080
4082
|
"onUpdate",
|
|
4081
4083
|
"onStart",
|
|
4082
4084
|
"onUpdate:modelValue"
|
|
4083
|
-
]), I(c) ? (m(), N("div",
|
|
4085
|
+
]), I(c) ? (m(), N("div", Bl, [P("span", null, d(A(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))], 2)]));
|
|
4084
4086
|
}
|
|
4085
|
-
}),
|
|
4087
|
+
}), Hl = ["width", "height"], Ul = [
|
|
4086
4088
|
"d",
|
|
4087
4089
|
"stroke",
|
|
4088
4090
|
"stroke-opacity",
|
|
4089
4091
|
"stroke-width"
|
|
4090
|
-
],
|
|
4092
|
+
], Wl = ["d", "fill"], Gl = /* @__PURE__ */ B({
|
|
4091
4093
|
__name: "SocialIconSvg",
|
|
4092
4094
|
props: {
|
|
4093
4095
|
platform: {},
|
|
@@ -4096,7 +4098,7 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4096
4098
|
iconSize: {}
|
|
4097
4099
|
},
|
|
4098
4100
|
setup(e) {
|
|
4099
|
-
let t = e, n = k(() =>
|
|
4101
|
+
let t = e, n = k(() => tr[t.platform]), r = k(() => rr[t.iconSize]), i = k(() => Me(t.platform, t.iconTone)), a = k(() => et(t.iconStyle, t.iconTone)), o = k(() => {
|
|
4100
4102
|
let e = {
|
|
4101
4103
|
display: "inline-flex",
|
|
4102
4104
|
alignItems: "center",
|
|
@@ -4155,15 +4157,15 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4155
4157
|
"stroke-opacity": a.value.opacity,
|
|
4156
4158
|
"stroke-width": a.value.width / s.value,
|
|
4157
4159
|
"stroke-linejoin": "round"
|
|
4158
|
-
}, null, 8,
|
|
4160
|
+
}, null, 8, Ul)) : j("", !0), P("path", {
|
|
4159
4161
|
d: n.value.path,
|
|
4160
4162
|
fill: u.value
|
|
4161
|
-
}, null, 8,
|
|
4163
|
+
}, null, 8, Wl)], 8, Hl))], 4));
|
|
4162
4164
|
}
|
|
4163
|
-
}),
|
|
4165
|
+
}), Kl = { class: "tpl:w-full" }, ql = ["href"], Jl = {
|
|
4164
4166
|
key: 1,
|
|
4165
4167
|
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)]"
|
|
4166
|
-
},
|
|
4168
|
+
}, Yl = /* @__PURE__ */ B({
|
|
4167
4169
|
__name: "SocialIconsBlock",
|
|
4168
4170
|
props: {
|
|
4169
4171
|
block: {},
|
|
@@ -4176,7 +4178,7 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4176
4178
|
gap: `${t.block.spacing}px`,
|
|
4177
4179
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4178
4180
|
})), a = k(() => t.block.icons.length > 0);
|
|
4179
|
-
return (t, o) => (m(), N("div",
|
|
4181
|
+
return (t, o) => (m(), N("div", Kl, [a.value ? (m(), N("div", {
|
|
4180
4182
|
key: 0,
|
|
4181
4183
|
style: y(r.value)
|
|
4182
4184
|
}, [(m(!0), N(L, null, v(e.block.icons, (t) => (m(), N("a", {
|
|
@@ -4184,7 +4186,7 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4184
4186
|
href: t.url || "#",
|
|
4185
4187
|
class: "tpl:cursor-default",
|
|
4186
4188
|
onClick: o[0] ||= i(() => {}, ["prevent"])
|
|
4187
|
-
}, [E(
|
|
4189
|
+
}, [E(Gl, {
|
|
4188
4190
|
platform: t.platform,
|
|
4189
4191
|
"icon-style": e.block.iconStyle,
|
|
4190
4192
|
"icon-tone": e.block.iconTone,
|
|
@@ -4194,46 +4196,46 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4194
4196
|
"icon-style",
|
|
4195
4197
|
"icon-tone",
|
|
4196
4198
|
"icon-size"
|
|
4197
|
-
])], 8,
|
|
4199
|
+
])], 8, ql))), 128))], 4)) : (m(), N("div", Jl, [E(A(Hn), { size: 16 }), P("span", null, d(A(n).social.addIcons), 1)]))]));
|
|
4198
4200
|
}
|
|
4199
|
-
}),
|
|
4201
|
+
}), Xl = { class: "tpl:w-full" }, Zl = {
|
|
4200
4202
|
key: 0,
|
|
4201
4203
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4202
4204
|
style: {
|
|
4203
4205
|
"background-color": "var(--tpl-bg-hover)",
|
|
4204
4206
|
color: "var(--tpl-text-dim)"
|
|
4205
4207
|
}
|
|
4206
|
-
},
|
|
4208
|
+
}, Ql = /* @__PURE__ */ B({
|
|
4207
4209
|
__name: "SpacerBlock",
|
|
4208
4210
|
props: {
|
|
4209
4211
|
block: {},
|
|
4210
4212
|
viewport: {}
|
|
4211
4213
|
},
|
|
4212
4214
|
setup(e) {
|
|
4213
|
-
let t = e, n =
|
|
4215
|
+
let t = e, n = Nn(Pn, "SpacerBlock"), r = k(() => ({
|
|
4214
4216
|
height: `${t.block.height}px`,
|
|
4215
4217
|
minHeight: `${t.block.height}px`,
|
|
4216
4218
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4217
4219
|
}));
|
|
4218
|
-
return (t, i) => (m(), N("div",
|
|
4220
|
+
return (t, i) => (m(), N("div", Xl, [P("div", {
|
|
4219
4221
|
style: y(r.value),
|
|
4220
4222
|
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 }])
|
|
4221
|
-
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span",
|
|
4223
|
+
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span", Zl, d(e.block.height) + "px ", 1))], 6)]));
|
|
4222
4224
|
}
|
|
4223
|
-
}),
|
|
4225
|
+
}), $l = { class: "tpl:w-full" }, eu = { key: 0 }, tu = [
|
|
4224
4226
|
"aria-label",
|
|
4225
4227
|
"contenteditable",
|
|
4226
4228
|
"data-placeholder",
|
|
4227
4229
|
"onBlur"
|
|
4228
|
-
],
|
|
4230
|
+
], nu = [
|
|
4229
4231
|
"aria-label",
|
|
4230
4232
|
"contenteditable",
|
|
4231
4233
|
"data-placeholder",
|
|
4232
4234
|
"onBlur"
|
|
4233
|
-
],
|
|
4235
|
+
], ru = {
|
|
4234
4236
|
key: 1,
|
|
4235
4237
|
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)]"
|
|
4236
|
-
},
|
|
4238
|
+
}, iu = /*#__PURE__*/ Er(/* @__PURE__ */ B({
|
|
4237
4239
|
__name: "TableBlock",
|
|
4238
4240
|
props: {
|
|
4239
4241
|
block: {},
|
|
@@ -4247,7 +4249,7 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4247
4249
|
updated(e, t) {
|
|
4248
4250
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4249
4251
|
}
|
|
4250
|
-
}, n = e, { t: r } = ce(), a =
|
|
4252
|
+
}, n = e, { t: r } = ce(), a = Nn(Pn, "TableBlock"), s = Nn(un, "TableBlock"), c = z(an, null), l = k(() => n.block.rows.length > 0), u = k(() => {
|
|
4251
4253
|
let e = {
|
|
4252
4254
|
width: "100%",
|
|
4253
4255
|
borderCollapse: "collapse",
|
|
@@ -4279,11 +4281,11 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4279
4281
|
} : n);
|
|
4280
4282
|
a.updateBlock(n.block.id, { rows: o });
|
|
4281
4283
|
}
|
|
4282
|
-
return (e, n) => (m(), N("div",
|
|
4284
|
+
return (e, n) => (m(), N("div", $l, [l.value ? (m(), N("table", {
|
|
4283
4285
|
key: 0,
|
|
4284
4286
|
style: y(u.value),
|
|
4285
4287
|
class: "tpl-table-editable"
|
|
4286
|
-
}, [h.value ? (m(), N("thead",
|
|
4288
|
+
}, [h.value ? (m(), N("thead", eu, [P("tr", null, [(m(!0), N(L, null, v(h.value.cells, (e) => C((m(), N("th", {
|
|
4287
4289
|
key: e.id,
|
|
4288
4290
|
style: y(p.value),
|
|
4289
4291
|
"aria-label": A(r).table.cellPlaceholder,
|
|
@@ -4292,7 +4294,7 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4292
4294
|
onBlur: (t) => b(h.value.id, e.id, t),
|
|
4293
4295
|
onKeydown: n[0] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4294
4296
|
onClick: i(_, ["stop"])
|
|
4295
|
-
}, null, 44,
|
|
4297
|
+
}, 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", {
|
|
4296
4298
|
key: a.id,
|
|
4297
4299
|
style: y(f.value),
|
|
4298
4300
|
"aria-label": A(r).table.cellPlaceholder,
|
|
@@ -4301,9 +4303,9 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4301
4303
|
onBlur: (t) => b(e.id, a.id, t),
|
|
4302
4304
|
onKeydown: n[1] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4303
4305
|
onClick: i(_, ["stop"])
|
|
4304
|
-
}, null, 44,
|
|
4306
|
+
}, null, 44, nu)), [[t, a.content]])), 128))]))), 128))])], 4)) : (m(), N("div", ru, [E(A(Un), { size: 16 }), P("span", null, d(A(r).table.empty), 1)]))]));
|
|
4305
4307
|
}
|
|
4306
|
-
}), [["__scopeId", "data-v-73b9f5e5"]]),
|
|
4308
|
+
}), [["__scopeId", "data-v-73b9f5e5"]]), au = /* @__PURE__ */ B({
|
|
4307
4309
|
__name: "VideoPlayButton",
|
|
4308
4310
|
props: { hoverEffect: {
|
|
4309
4311
|
type: Boolean,
|
|
@@ -4320,7 +4322,7 @@ var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
|
4320
4322
|
}
|
|
4321
4323
|
});
|
|
4322
4324
|
// src/utils/videoThumbnail.ts
|
|
4323
|
-
function
|
|
4325
|
+
function ou(e) {
|
|
4324
4326
|
if (!e) return {
|
|
4325
4327
|
platform: "unknown",
|
|
4326
4328
|
videoId: null,
|
|
@@ -4352,24 +4354,24 @@ function iu(e) {
|
|
|
4352
4354
|
thumbnailUrl: null
|
|
4353
4355
|
};
|
|
4354
4356
|
}
|
|
4355
|
-
function
|
|
4356
|
-
return t ||
|
|
4357
|
+
function su(e, t) {
|
|
4358
|
+
return t || ou(e).thumbnailUrl;
|
|
4357
4359
|
}
|
|
4358
4360
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4359
|
-
var
|
|
4361
|
+
var cu = ["src", "alt"], lu = {
|
|
4360
4362
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4361
4363
|
style: { opacity: "0.7" }
|
|
4362
|
-
},
|
|
4364
|
+
}, uu = ["href"], du = ["src", "alt"], fu = ["src", "alt"], pu = {
|
|
4363
4365
|
key: 3,
|
|
4364
4366
|
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)]"
|
|
4365
|
-
},
|
|
4367
|
+
}, mu = /* @__PURE__ */ B({
|
|
4366
4368
|
__name: "VideoBlock",
|
|
4367
4369
|
props: {
|
|
4368
4370
|
block: {},
|
|
4369
4371
|
viewport: {}
|
|
4370
4372
|
},
|
|
4371
4373
|
setup(e) {
|
|
4372
|
-
let t = e, { t: n } = ce(), { syntax: r } = V(), a = k(() => ot(t.block.url, r) || ot(t.block.thumbnailUrl, r)), o =
|
|
4374
|
+
let t = e, { t: n } = ce(), { syntax: r } = V(), a = k(() => ot(t.block.url, r) || ot(t.block.thumbnailUrl, r)), o = Jn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = Jn(() => 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(() => {
|
|
4373
4375
|
let e = t.block.align;
|
|
4374
4376
|
return {
|
|
4375
4377
|
maxWidth: "100%",
|
|
@@ -4392,16 +4394,16 @@ var ou = ["src", "alt"], su = {
|
|
|
4392
4394
|
src: A(s),
|
|
4393
4395
|
alt: e.block.alt,
|
|
4394
4396
|
style: y(f.value)
|
|
4395
|
-
}, null, 12,
|
|
4397
|
+
}, null, 12, cu), E(au)], 4)) : a.value ? (m(), N("div", {
|
|
4396
4398
|
key: 1,
|
|
4397
4399
|
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)]",
|
|
4398
4400
|
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
4399
|
-
}, [E(A(
|
|
4401
|
+
}, [E(A(Lr), {
|
|
4400
4402
|
size: 36,
|
|
4401
4403
|
"stroke-width": 1.5,
|
|
4402
4404
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4403
4405
|
style: { opacity: "0.5" }
|
|
4404
|
-
}), P("span",
|
|
4406
|
+
}), P("span", lu, [E(fa, { text: p.value }, null, 8, ["text"])])], 4)) : c.value ? (m(), N(L, { key: 2 }, [e.block.url ? (m(), N("a", {
|
|
4405
4407
|
key: 0,
|
|
4406
4408
|
href: e.block.url,
|
|
4407
4409
|
target: "_blank",
|
|
@@ -4414,7 +4416,7 @@ var ou = ["src", "alt"], su = {
|
|
|
4414
4416
|
src: c.value,
|
|
4415
4417
|
alt: e.block.alt,
|
|
4416
4418
|
style: y(f.value)
|
|
4417
|
-
}, null, 12,
|
|
4419
|
+
}, null, 12, du), E(au, { "hover-effect": "" })], 12, uu)) : (m(), N("div", {
|
|
4418
4420
|
key: 1,
|
|
4419
4421
|
class: "tpl:relative tpl:inline-block",
|
|
4420
4422
|
style: y(u.value)
|
|
@@ -4423,53 +4425,53 @@ var ou = ["src", "alt"], su = {
|
|
|
4423
4425
|
src: c.value,
|
|
4424
4426
|
alt: e.block.alt,
|
|
4425
4427
|
style: y(f.value)
|
|
4426
|
-
}, null, 12,
|
|
4428
|
+
}, null, 12, fu), E(au)], 4))], 64)) : (m(), N("div", pu, [E(A(Lr), {
|
|
4427
4429
|
size: 40,
|
|
4428
4430
|
"stroke-width": 1.5,
|
|
4429
4431
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4430
4432
|
}), P("span", null, d(A(n).video.addVideo), 1)]))], 4));
|
|
4431
4433
|
}
|
|
4432
|
-
}),
|
|
4433
|
-
section:
|
|
4434
|
-
title:
|
|
4435
|
-
paragraph:
|
|
4436
|
-
image:
|
|
4437
|
-
button:
|
|
4438
|
-
divider:
|
|
4439
|
-
video:
|
|
4440
|
-
social:
|
|
4441
|
-
menu:
|
|
4442
|
-
table:
|
|
4443
|
-
spacer:
|
|
4444
|
-
html:
|
|
4445
|
-
countdown: oe(() => import("./CountdownBlock-
|
|
4434
|
+
}), hu = {
|
|
4435
|
+
section: Vl,
|
|
4436
|
+
title: Lo,
|
|
4437
|
+
paragraph: $a,
|
|
4438
|
+
image: Ka,
|
|
4439
|
+
button: ma,
|
|
4440
|
+
divider: Oa,
|
|
4441
|
+
video: mu,
|
|
4442
|
+
social: Yl,
|
|
4443
|
+
menu: Xa,
|
|
4444
|
+
table: iu,
|
|
4445
|
+
spacer: Ql,
|
|
4446
|
+
html: Pa,
|
|
4447
|
+
countdown: oe(() => import("./CountdownBlock-AYPypmcX.js"))
|
|
4446
4448
|
};
|
|
4447
|
-
function
|
|
4448
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = ce(i), l = k(() => bt(bt(bt(
|
|
4449
|
+
function gu(t) {
|
|
4450
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = ce(i), l = k(() => bt(bt(bt(Ci(i), Ui(n.content.value.settings?.locale)), Se(n.content.value.settings) === "rtl" ? {
|
|
4449
4451
|
title: { textAlign: "right" },
|
|
4450
4452
|
table: { textAlign: "right" }
|
|
4451
4453
|
} : {}), r.blockDefaults ?? {}));
|
|
4452
4454
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4453
|
-
let { resolvedTheme: u } =
|
|
4455
|
+
let { resolvedTheme: u } = mi(k(() => n.state.uiTheme)), d = M(r.theme ?? {}), { themeStyles: f } = qr({
|
|
4454
4456
|
themeOverrides: d,
|
|
4455
4457
|
resolvedTheme: u,
|
|
4456
4458
|
extraStyles: () => ({
|
|
4457
4459
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
4458
4460
|
...t.themeExtraStyles?.()
|
|
4459
4461
|
})
|
|
4460
|
-
}), p = t.history ??
|
|
4462
|
+
}), p = t.history ?? Gn({
|
|
4461
4463
|
content: n.content,
|
|
4462
4464
|
setContent: (e, t) => n.setContent(e, t)
|
|
4463
4465
|
});
|
|
4464
|
-
t.history ? n.contentReplaced && c(n.contentReplaced, () => p.clear(), { flush: "sync" }) :
|
|
4465
|
-
let m =
|
|
4466
|
+
t.history ? n.contentReplaced && c(n.contentReplaced, () => p.clear(), { flush: "sync" }) : Yn(n, p);
|
|
4467
|
+
let m = Wn({
|
|
4466
4468
|
addBlock: n.addBlock,
|
|
4467
4469
|
removeBlock: n.removeBlock,
|
|
4468
4470
|
updateBlock: n.updateBlock,
|
|
4469
4471
|
selectBlock: n.selectBlock,
|
|
4470
4472
|
findBlockLocation: n.findBlockLocation,
|
|
4471
4473
|
blockDefaults: () => l.value
|
|
4472
|
-
}), h =
|
|
4474
|
+
}), h = lr(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? qn({
|
|
4473
4475
|
content: n.content,
|
|
4474
4476
|
isDirty: () => n.state.isDirty,
|
|
4475
4477
|
...t.autoSaveOptions
|
|
@@ -4477,27 +4479,27 @@ function mu(t) {
|
|
|
4477
4479
|
_ && (v = c(p.isNavigating, (e) => {
|
|
4478
4480
|
e ? _.pause() : _.resume();
|
|
4479
4481
|
}));
|
|
4480
|
-
let y =
|
|
4482
|
+
let y = pi(n, {
|
|
4481
4483
|
t: o,
|
|
4482
4484
|
format: s
|
|
4483
|
-
}, r.customBlocks ?? []), b =
|
|
4484
|
-
if (b.allowCustomIgnored &&
|
|
4485
|
-
let e =
|
|
4486
|
-
e.length > 0 &&
|
|
4487
|
-
}
|
|
4488
|
-
let x =
|
|
4489
|
-
for (let e of x.unknown)
|
|
4490
|
-
let S =
|
|
4491
|
-
|
|
4485
|
+
}, r.customBlocks ?? []), b = At(r.colors);
|
|
4486
|
+
if (b.allowCustomIgnored && Dt.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && Dt.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4487
|
+
let e = Si(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4488
|
+
e.length > 0 && Dt.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
4489
|
+
}
|
|
4490
|
+
let x = ur(r.templateSettings);
|
|
4491
|
+
for (let e of x.unknown) Dt.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${dr.join(", ")}) — skipping it.`);
|
|
4492
|
+
let S = Vr();
|
|
4493
|
+
yi(S, hu);
|
|
4492
4494
|
let C = /* @__PURE__ */ new Set();
|
|
4493
4495
|
function w(e) {
|
|
4494
4496
|
for (let t of e) {
|
|
4495
|
-
S.registerCustom(t,
|
|
4496
|
-
for (let e of
|
|
4497
|
+
S.registerCustom(t, Ea);
|
|
4498
|
+
for (let e of Wi(t, b)) C.has(e.id) || (C.add(e.id), Dt.warn(e.message));
|
|
4497
4499
|
}
|
|
4498
4500
|
}
|
|
4499
4501
|
r.customBlocks?.length && w(r.customBlocks);
|
|
4500
|
-
let E =
|
|
4502
|
+
let E = ii();
|
|
4501
4503
|
if (I() && T(E.dispose), t.containerEl) {
|
|
4502
4504
|
let n = t.containerEl;
|
|
4503
4505
|
e(document, "pointerdown", (e) => {
|
|
@@ -4510,7 +4512,7 @@ function mu(t) {
|
|
|
4510
4512
|
e ? e.save() : _?.flush();
|
|
4511
4513
|
}
|
|
4512
4514
|
function D(e) {
|
|
4513
|
-
E.isActive() &&
|
|
4515
|
+
E.isActive() && Ki(e, {
|
|
4514
4516
|
history: p,
|
|
4515
4517
|
selectBlock: (e) => n.selectBlock(e),
|
|
4516
4518
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4523,22 +4525,23 @@ function mu(t) {
|
|
|
4523
4525
|
}
|
|
4524
4526
|
e(document, "keydown", D);
|
|
4525
4527
|
let O = M(null), A = t.editorRoot ?? document;
|
|
4526
|
-
g(
|
|
4528
|
+
g(Ln, A), g(Dn, O), g(zt, /* @__PURE__ */ new Map()), g(ln, i), g(Pn, n), g(In, p), g(An, m), g(Cn, h), g(un, a), g(vn, f), g(fn, u), g(dn, l), g(jn, r.locale), g(xn, S), g(gn, r.customBlocks ?? []), g(Gt, r.paletteBlocks), g(Qt, bi(r.htmlBlockPreview)), g($t, r.layout), g(Ft, r.sectionWrapper), g(En, b), g(kn, x.fields), g(hn, hi(n.content, S));
|
|
4527
4529
|
let j = Te(r.mergeTags?.syntax);
|
|
4528
4530
|
for (let e of ["opener", "closer"]) {
|
|
4529
4531
|
let t = j[e];
|
|
4530
|
-
typeof t == "string" && t.trim() === "" &&
|
|
4532
|
+
typeof t == "string" && t.trim() === "" && Dt.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
4531
4533
|
}
|
|
4532
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && rt(j) === null &&
|
|
4534
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && rt(j) === null && Dt.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
4533
4535
|
let N = ie(r.mergeTags?.tags ?? []);
|
|
4534
4536
|
function te(e) {
|
|
4535
|
-
Array.isArray(e) ? N.value = e :
|
|
4537
|
+
Array.isArray(e) ? N.value = e : Dt.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4536
4538
|
}
|
|
4537
|
-
g(
|
|
4539
|
+
g(Xt, N), g(Lt, j), g(Vt, r.mergeTags?.onRequest ?? null), g(Bt, r.mergeTags?.autocomplete !== !1), g(Rn, r.mergeTags?.showRawValue !== !1);
|
|
4538
4540
|
let ne = M(nt(r.mergeTags?.tags ?? []));
|
|
4539
|
-
g(
|
|
4540
|
-
let re =
|
|
4541
|
+
g(Zt, ne);
|
|
4542
|
+
let re = si({
|
|
4541
4543
|
resolvePreview: r.resolvePreview,
|
|
4544
|
+
surface: "preview",
|
|
4542
4545
|
getContent: () => {
|
|
4543
4546
|
let e = n.content.value;
|
|
4544
4547
|
if (!n.state.previewMode) return e;
|
|
@@ -4548,19 +4551,19 @@ function mu(t) {
|
|
|
4548
4551
|
isActive: () => n.state.previewMode,
|
|
4549
4552
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
4550
4553
|
});
|
|
4551
|
-
g(
|
|
4554
|
+
g(Wt, re), g(on, r.resolvePreview);
|
|
4552
4555
|
let P = null;
|
|
4553
|
-
g(
|
|
4556
|
+
g(rn, (e) => (P = e, () => {
|
|
4554
4557
|
P === e && (P = null);
|
|
4555
4558
|
}));
|
|
4556
4559
|
let F = () => (P ?? re.refresh)(), L = k(() => !(n.state.previewMode && re.isConfigured));
|
|
4557
|
-
g(
|
|
4558
|
-
let ae =
|
|
4559
|
-
g(
|
|
4560
|
-
let R =
|
|
4560
|
+
g(cn, L);
|
|
4561
|
+
let ae = ci();
|
|
4562
|
+
g(Ut, ae), g(Kt, M(!1)), g(Jt, M(!1)), g(yn, r.logicTags?.tags ?? []), g(It, r.logicTags?.pairs ?? []), g(en, r.logicTags?.onRequest ?? null), g(qt, li()), g(nn, r.onRequestMedia ?? null), g(Mn, r.canDropMedia ?? null), g(Rt, r.resolveImageUrl ? sr(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && Dt.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), g(sn, r.displayConditions?.conditions ?? []), g(On, r.displayConditions?.allowCustom ?? !1), g(Ht, r.displayConditions?.onRequest ?? null), g(pn, t.capabilities ?? {}), g(Fn, y);
|
|
4563
|
+
let R = ui(r.lint) ? null : fi({
|
|
4561
4564
|
content: n.content,
|
|
4562
4565
|
get options() {
|
|
4563
|
-
return
|
|
4566
|
+
return ai({
|
|
4564
4567
|
...r,
|
|
4565
4568
|
content: n.content.value,
|
|
4566
4569
|
contentLocale: n.activeLocale?.value ?? void 0
|
|
@@ -4572,7 +4575,7 @@ function mu(t) {
|
|
|
4572
4575
|
updateSettings: n.updateSettings,
|
|
4573
4576
|
removeBlock: n.removeBlock
|
|
4574
4577
|
});
|
|
4575
|
-
g(
|
|
4578
|
+
g(wn, R);
|
|
4576
4579
|
function oe() {
|
|
4577
4580
|
v?.(), R?.destroy(), _?.destroy(), p.destroy();
|
|
4578
4581
|
}
|
|
@@ -4603,12 +4606,12 @@ function mu(t) {
|
|
|
4603
4606
|
};
|
|
4604
4607
|
}
|
|
4605
4608
|
// src/composables/useSmallScreenNotice.ts
|
|
4606
|
-
var
|
|
4607
|
-
function
|
|
4608
|
-
let n = t(
|
|
4609
|
+
var _u = "(max-width: 767px)";
|
|
4610
|
+
function vu(e) {
|
|
4611
|
+
let n = t(_u);
|
|
4609
4612
|
return {
|
|
4610
4613
|
isSmallScreen: n,
|
|
4611
4614
|
showNotice: k(() => (F(e) ?? !0) && n.value)
|
|
4612
4615
|
};
|
|
4613
4616
|
}
|
|
4614
|
-
export {
|
|
4617
|
+
export { ji as A, Qr as B, $i as C, qi as D, ia as E, Fi as F, Nr as G, Br as H, Pi as I, jr as K, si as L, Ri as M, Li as N, ua as O, Ii as P, ai as R, Xi as S, ra as T, zr as U, Gr as V, Fr as W, Pa as _, Ql as a, _a as b, Il as c, Lo as d, Fo as f, Ka as g, Xa as h, iu as i, zi as j, Ji as k, Ro as l, $a as m, gu as n, Yl as o, eo as p, mu as r, Vl as s, vu as t, Vo as u, Oa as v, ca as w, ma as x, Ea as y, ei as z };
|