@templatical/editor 0.45.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-BlFWWhBv.js → AiChatSidebar-BPOv5Ra8.js} +14 -14
- package/dist/{AiFeatureMenu-CvWygUmC.js → AiFeatureMenu-H_WT4YR8.js} +7 -7
- package/dist/{BlockIssueBadge-CZA1XvAh.js → BlockIssueBadge-AgO5abEB.js} +5 -5
- package/dist/BlockPreviewCanvas-CZDBSPoG.js +136 -0
- package/dist/{CloudHeaderExtras-BzM1QU1r.js → CloudHeaderExtras-gXsTYoGG.js} +5 -5
- package/dist/{CloudPanels-d36YXXyn.js → CloudPanels-H_GdbOfZ.js} +9 -9
- package/dist/{CollaboratorBar-rwXe_Qd2.js → CollaboratorBar-BazGNMqN.js} +4 -4
- package/dist/{CommentsPanel-Bn6P5crU.js → CommentsPanel-CMgsG_yh.js} +2 -2
- package/dist/{CommentsSidebar-B8wT932T.js → CommentsSidebar-DCh8DTP8.js} +14 -14
- package/dist/CountdownBlock-zx39Dyby.js +92 -0
- package/dist/{CountdownToolbar-lbjCc8ik.js → CountdownToolbar-DVuucA3v.js} +7 -7
- package/dist/{DesignReferenceSidebar-zlJQsP0X.js → DesignReferenceSidebar-DxNV4lQp.js} +12 -12
- package/dist/{IssuesPanel-CHx3m8SP.js → IssuesPanel-CUpW54P4.js} +8 -8
- package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
- package/dist/{LogicTagInsertButton-BvftbkL4.js → LogicTagInsertButton-DDYKnqmj.js} +22 -22
- package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-D_we0Scr.js} +4 -4
- package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-L95BwWV1.js} +2 -2
- package/dist/{MergeTagInput-CR1kcj8X.js → MergeTagInput-DAL998tx.js} +3 -3
- package/dist/{MergeTagModeToggle-DssKrVYb.js → MergeTagModeToggle-CjHO26rb.js} +7 -7
- package/dist/{ParagraphEditor-DFizsZRc.js → ParagraphEditor-CcEN1N6n.js} +165 -150
- package/dist/{RestoreVersionDialog-Cp3q2mU4.js → RestoreVersionDialog-B2OH5rgs.js} +6 -6
- package/dist/{RichTextEditorContent-Cj3oaPMk.js → RichTextEditorContent-BGeTg-QL.js} +12 -12
- package/dist/{SaveBlockDialog-BR8vW_XF.js → SaveBlockDialog-CCVyU-7y.js} +13 -13
- package/dist/{SavedBlocksBrowserModal-DmwbmKxI.js → SavedBlocksBrowserModal-_WmSeqIh.js} +14 -14
- package/dist/{SavedBlocksPanels-D4XKrs-a.js → SavedBlocksPanels-DVX_ruQ7.js} +2 -2
- package/dist/{SavedBlocksPickBar-gfc-o5sR.js → SavedBlocksPickBar-DVJC28hP.js} +5 -5
- package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-U0QFiwdI.js} +16 -16
- package/dist/{TemplateSettings-D7aNrd0d.js → TemplateSettings-CdhTm9JQ.js} +12 -12
- package/dist/{TestEmailModal-DUmtcSm-.js → TestEmailModal-BqToA_ls.js} +14 -14
- package/dist/{TestEmailPanel-s9gISTI8.js → TestEmailPanel-Cn4Ptq0j.js} +2 -2
- package/dist/{TitleEditor-C-uHqtml.js → TitleEditor-CZdqeltH.js} +13 -13
- package/dist/{ToggleSwitch-CTwwCIVA.js → ToggleSwitch-BR8Sgzib.js} +2 -2
- package/dist/{Toolbar-CLpA36RO.js → Toolbar-OGakTBEg.js} +748 -629
- package/dist/{TplModal-D6XtxusQ.js → TplModal-CoczSDma.js} +6 -6
- package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-DY5z5FZr.js} +10 -10
- package/dist/{VersionHistoryPanels-Dvowtt7V.js → VersionHistoryPanels-DowHeDAQ.js} +2 -2
- package/dist/{VersionPreviewBanner-BUKb9gc6.js → VersionPreviewBanner-Bo8NxBbh.js} +4 -4
- package/dist/WrapperBlock-BOABSX9W.js +46 -0
- package/dist/{blockTypeIcons-D3aj5u_5.js → blockTypeIcons-4E1U8f99.js} +5 -5
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-C__Dzq--.js → ca-DMoGGP9L.js} +21 -0
- package/dist/cdn/chunks/{AiChatSidebar-SRGBP-SL.js → AiChatSidebar-B72rI0be.js} +12 -12
- package/dist/cdn/chunks/{AiChatSidebar-SRGBP-SL.js.map → AiChatSidebar-B72rI0be.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-oZhlgsGh.js → AiFeatureMenu-BqSG9iEd.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-oZhlgsGh.js.map → AiFeatureMenu-BqSG9iEd.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js → BlockIssueBadge-CS7ytN-z.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js.map → BlockIssueBadge-CS7ytN-z.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +138 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-t-_ZlHwn.js → CloudHeaderExtras-DJXLTUHc.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-t-_ZlHwn.js.map → CloudHeaderExtras-DJXLTUHc.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DR2eEcpX.js → CloudPanels-D1fPLjG8.js} +8 -8
- package/dist/cdn/chunks/{CloudPanels-DR2eEcpX.js.map → CloudPanels-D1fPLjG8.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-w8_2WPE0.js → CollaboratorBar-MeRQB1eN.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-w8_2WPE0.js.map → CollaboratorBar-MeRQB1eN.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js → CommentsPanel-CmxPylNf.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js.map → CommentsPanel-CmxPylNf.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js → CommentsSidebar-CrleQTbo.js} +13 -13
- package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js.map → CommentsSidebar-CrleQTbo.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-Dasj191h.js +94 -0
- package/dist/cdn/chunks/CountdownBlock-Dasj191h.js.map +1 -0
- package/dist/cdn/chunks/{CountdownToolbar-CvNuDR5Z.js → CountdownToolbar-DPIOtlN0.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-CvNuDR5Z.js.map → CountdownToolbar-DPIOtlN0.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-CJg_5GXU.js → DesignReferenceSidebar-BgTNqgCy.js} +8 -8
- package/dist/cdn/chunks/{DesignReferenceSidebar-CJg_5GXU.js.map → DesignReferenceSidebar-BgTNqgCy.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DXqlRk19.js → IssuesPanel-BGjLcNpQ.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-DXqlRk19.js.map → IssuesPanel-BGjLcNpQ.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js → LoadingTrack-DbH97JR9.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js.map → LoadingTrack-DbH97JR9.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DnHghQHb.js → LogicTagInsertButton-BEsqPhMr.js} +11 -11
- package/dist/cdn/chunks/{LogicTagInsertButton-DnHghQHb.js.map → LogicTagInsertButton-BEsqPhMr.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js → MediaEditModal-C1Ao0i2c.js} +4 -4
- package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js.map → MediaEditModal-C1Ao0i2c.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js → MediaPanels-1GPYiZZ0.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js.map → MediaPanels-1GPYiZZ0.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-heTX9P_k.js → MergeTagInput-Dy13_OLc.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-heTX9P_k.js.map → MergeTagInput-Dy13_OLc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-C9EfuZIP.js → MergeTagModeToggle-B2CPZOeF.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-C9EfuZIP.js.map → MergeTagModeToggle-B2CPZOeF.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B5DN4Sy4.js → ParagraphEditor-BGLIw7kg.js} +91 -76
- package/dist/cdn/chunks/ParagraphEditor-BGLIw7kg.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-DBgJ-Nui.js → RestoreVersionDialog-BhykE8En.js} +8 -8
- package/dist/cdn/chunks/{RestoreVersionDialog-DBgJ-Nui.js.map → RestoreVersionDialog-BhykE8En.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-LOas4rfU.js → RichTextEditorContent-B-txUvPL.js} +11 -11
- package/dist/cdn/chunks/{RichTextEditorContent-LOas4rfU.js.map → RichTextEditorContent-B-txUvPL.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-Dx-QVQCX.js → SaveBlockDialog-BHqEp7jw.js} +40 -40
- package/dist/cdn/chunks/{SaveBlockDialog-Dx-QVQCX.js.map → SaveBlockDialog-BHqEp7jw.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C2RQ-JCc.js → SavedBlocksBrowserModal-BhR6AI0f.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C2RQ-JCc.js.map → SavedBlocksBrowserModal-BhR6AI0f.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BmRbvqqL.js → SavedBlocksPanels-YwffJtfY.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-BmRbvqqL.js.map → SavedBlocksPanels-YwffJtfY.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BzwKojoJ.js → SavedBlocksPickBar-BtpFU7es.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-BzwKojoJ.js.map → SavedBlocksPickBar-BtpFU7es.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js → TemplateScoringPanel-N4ySFh5w.js} +12 -12
- package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js.map → TemplateScoringPanel-N4ySFh5w.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-G-yV7C1C.js → TemplateSettings-C7b5X34U.js} +13 -13
- package/dist/cdn/chunks/TemplateSettings-C7b5X34U.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-lOeztfTN.js → TestEmailModal-DHJKI5y5.js} +11 -11
- package/dist/cdn/chunks/{TestEmailModal-lOeztfTN.js.map → TestEmailModal-DHJKI5y5.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CZswVkk_.js → TestEmailPanel-lYtzTXpR.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-CZswVkk_.js.map → TestEmailPanel-lYtzTXpR.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CnTT2Y3H.js → TitleEditor-5eY01ypW.js} +15 -15
- package/dist/cdn/chunks/{TitleEditor-CnTT2Y3H.js.map → TitleEditor-5eY01ypW.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-CLHteVMO.js → ToggleSwitch-BN8rMC2m.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-CLHteVMO.js.map → ToggleSwitch-BN8rMC2m.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-K4tIkpG1.js → Toolbar-Ik54UO_-.js} +696 -575
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-OOT36AjS.js → TplModal-WIBiBrGy.js} +6 -6
- package/dist/cdn/chunks/TplModal-WIBiBrGy.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js → VersionHistoryMenu-CZnlS9K5.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js.map → VersionHistoryMenu-CZnlS9K5.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BrpYRSfW.js → VersionHistoryPanels-xjLSpR1e.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-BrpYRSfW.js.map → VersionHistoryPanels-xjLSpR1e.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js → VersionPreviewBanner-sARpn4hh.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js.map → VersionPreviewBanner-sARpn4hh.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +48 -0
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DdZP-3FM.js → blockTypeIcons-D3g5QzdT.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-DdZP-3FM.js.map → blockTypeIcons-D3g5QzdT.js.map} +1 -1
- package/dist/cdn/chunks/{ca-C__Dzq--.js → ca-DMoGGP9L.js} +22 -1
- package/dist/cdn/chunks/ca-DMoGGP9L.js.map +1 -0
- package/dist/cdn/chunks/{cloud-bhW8qTnh.js → cloud-Cd7ptfhL.js} +3 -3
- package/dist/cdn/chunks/{cloud-bhW8qTnh.js.map → cloud-Cd7ptfhL.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-CeRJkLR2.js → createCloudRuntime-DtIZ2Lee.js} +17 -8
- package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +1 -0
- package/dist/cdn/chunks/{de-CGjbQ2mt.js → de-DgAelLbM.js} +22 -1
- package/dist/cdn/chunks/de-DgAelLbM.js.map +1 -0
- package/dist/cdn/chunks/{dist-B7W-Lb65.js → dist-CjL6JHML.js} +3 -3
- package/dist/cdn/chunks/{dist-B7W-Lb65.js.map → dist-CjL6JHML.js.map} +1 -1
- package/dist/cdn/chunks/{dist-C5nRd_ua.js → dist-MNQYSEWU.js} +4 -4
- package/dist/cdn/chunks/{dist-C5nRd_ua.js.map → dist-MNQYSEWU.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-BUTN5vZC.js → draggable-DrsNwZuB.js} +1673 -1595
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js → editor-modal-Bcwo0orC.js} +34 -34
- package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js.map → editor-modal-Bcwo0orC.js.map} +1 -1
- package/dist/cdn/chunks/en-BANFWZdr.js +1 -0
- package/dist/cdn/chunks/{en-BTiiAC-B.js → en-Dekrl7HA.js} +22 -1
- package/dist/cdn/chunks/en-Dekrl7HA.js.map +1 -0
- package/dist/cdn/chunks/{es-CdTOcSTf.js → es-BaZzyidV.js} +22 -1
- package/dist/cdn/chunks/es-BaZzyidV.js.map +1 -0
- package/dist/cdn/chunks/{extensions-xjRsIjMP.js → extensions-T-t8MKDb.js} +9 -9
- package/dist/cdn/chunks/extensions-T-t8MKDb.js.map +1 -0
- package/dist/cdn/chunks/{fr-B6lcLLzC.js → fr-C5ucb1HK.js} +22 -1
- package/dist/cdn/chunks/fr-C5ucb1HK.js.map +1 -0
- package/dist/cdn/chunks/{icons-Dr9erFGs.js → icons-C4fX9Bwy.js} +27 -27
- package/dist/cdn/chunks/{icons-Dr9erFGs.js.map → icons-C4fX9Bwy.js.map} +1 -1
- package/dist/cdn/chunks/{ja-BhdkqENz.js → ja-CUgR3mV0.js} +22 -1
- package/dist/cdn/chunks/ja-CUgR3mV0.js.map +1 -0
- package/dist/cdn/chunks/{keys-BKu-LOk5.js → keys-HI-INbkz.js} +2 -2
- package/dist/cdn/chunks/{keys-BKu-LOk5.js.map → keys-HI-INbkz.js.map} +1 -1
- package/dist/{nl-CE3YItYg.js → cdn/chunks/nl-qrLY7hMS.js} +23 -0
- package/dist/cdn/chunks/nl-qrLY7hMS.js.map +1 -0
- package/dist/{preRenderCustomBlocks-DAS48ZCp.js → cdn/chunks/preRenderCustomBlocks-Co0oi0Jf.js} +7 -3
- package/dist/cdn/chunks/preRenderCustomBlocks-Co0oi0Jf.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-CUIT4rq4.js → pt-BR-C6hMTQYi.js} +22 -1
- package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js +1103 -0
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +1 -0
- package/dist/cdn/chunks/{src-BcqNlDMe.js → src-BnJlDuyB.js} +361 -206
- package/dist/cdn/chunks/src-BnJlDuyB.js.map +1 -0
- package/dist/cdn/chunks/{src-CkXmV2I2.js → src-Bu0qBpbf.js} +202 -202
- package/dist/cdn/chunks/src-Bu0qBpbf.js.map +1 -0
- package/dist/cdn/chunks/{src-HA9F2kvk.js → src-CHlVFp7r.js} +368 -311
- package/dist/cdn/chunks/src-CHlVFp7r.js.map +1 -0
- package/dist/{styleConstants-C_YAPdQS.js → cdn/chunks/styleConstants-D1Jz-TFU.js} +9 -28
- package/dist/cdn/chunks/{styleConstants-C_YAPdQS.js.map → styleConstants-D1Jz-TFU.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-CYDXLO17.js → tiptap-BPigZk5G.js} +3258 -3098
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js → useAliveFlag-DCB96vzR.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js.map → useAliveFlag-DCB96vzR.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js → useCloudI18n-BBF4waXO.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js.map → useCloudI18n-BBF4waXO.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-BF1ZhcGu.js → useEditorCore-Bf2d1DKI.js} +622 -607
- package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-DDPIcEOO.js.map → useEditorRoot-CTc6O8al.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DO4NTunW.js → useI18n-DUlyyIJJ.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DO4NTunW.js.map → useI18n-DUlyyIJJ.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-91bO_SOi.js → useLogicTag-3S63go4E.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-91bO_SOi.js.map → useLogicTag-3S63go4E.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-hwifK582.js → useMergeTag-BQtxUHq1.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-hwifK582.js.map → useMergeTag-BQtxUHq1.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js → usePopoverPosition-IbaW6-Ao.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js.map → usePopoverPosition-IbaW6-Ao.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-BDNJ25X1.js → useScrollToBlock-uUa601I4.js} +4 -5
- package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js.map +1 -0
- package/dist/cdn/chunks/withCurrentFont-DwJd-lKc.js +21 -0
- package/dist/cdn/chunks/withCurrentFont-DwJd-lKc.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +602 -580
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ZKvtMdpe.js → check-B5R4zXr7.js} +1 -1
- package/dist/{chevron-down-RrwkYMlp.js → chevron-down-BKyl85NV.js} +1 -1
- package/dist/{chevron-right-CklHaa1U.js → chevron-right-BmToZ8qX.js} +1 -1
- package/dist/{chevron-up-DjN2NTbo.js → chevron-up-DNYdOxPC.js} +1 -1
- package/dist/{circle-alert-BR1_Yfb-.js → circle-alert-Dx9ju3YZ.js} +1 -1
- package/dist/{clock-BEagNj21.js → clock-Dv9bxsSH.js} +1 -1
- package/dist/{cloud-CVfwPu19.js → cloud-DwjaAdwK.js} +2 -2
- package/dist/{copy-D6DNoSq1.js → copy-BsKl4dcy.js} +1 -1
- package/dist/{createCloudRuntime-GRv_TDb2.js → createCloudRuntime-C8gpPsSi.js} +16 -7
- package/dist/{createLucideIcon-BAPyioGd.js → createLucideIcon-DziKp5iU.js} +6 -6
- package/dist/{de-CGjbQ2mt.js → de-DgAelLbM.js} +21 -0
- package/dist/{dist-Bd7khQsg.js → dist-3HpYixwF.js} +2 -2
- package/dist/{dist-lL3nVbxV.js → dist-BC-ZEYLd.js} +2 -2
- package/dist/dist-BPFcLKTw.js +5 -0
- package/dist/{dist-CSaWqmWM.js → dist-C8koXLhl.js} +390 -241
- package/dist/{dist-C-VFTX82.js → dist-CUWI-IvA.js} +2 -2
- package/dist/{dist-Bc30883t.js → dist-Cr7RPxI9.js} +5 -5
- package/dist/{dist-DapsJxn_.js → dist-CuLwJF7H.js} +2 -2
- package/dist/{dist-5KNKxglR.js → dist-CyBwSiAa.js} +2 -2
- package/dist/dist-D7Yj7E-F.js +5 -0
- package/dist/{dist-B_vYjCsk.js → dist-DAAJogrx.js} +3 -3
- package/dist/{dist-CMcFD7gP.js → dist-DBxgrOeo.js} +1906 -1746
- package/dist/{dist-DHensKDY.js → dist-DPcf6XZ8.js} +2 -2
- package/dist/{dist-5DAb7bYT.js → dist-DVNjPKsH.js} +2 -2
- package/dist/{dist-C3eH9-N2.js → dist-DXyGqIDE.js} +2 -2
- package/dist/{dist-1H4cnaoD.js → dist-DuufrR8O.js} +4 -4
- package/dist/{editor-modal-oRmkDlUs.js → editor-modal-BwyIUnV_.js} +27 -27
- package/dist/en-CC-57eC_.js +1 -0
- package/dist/{en-BTiiAC-B.js → en-Dekrl7HA.js} +21 -0
- package/dist/{es-CdTOcSTf.js → es-BaZzyidV.js} +21 -0
- package/dist/{extensions-B65sfZRk.js → extensions-DHyKjsNZ.js} +19 -19
- package/dist/{eye-DvsTBI57.js → eye-DQuinb9k.js} +1 -1
- package/dist/{fr-B6lcLLzC.js → fr-C5ucb1HK.js} +21 -0
- package/dist/{image-up-BoFGZm5Q.js → image-up-yTfLjOrj.js} +1 -1
- package/dist/index.d.ts +92 -20
- package/dist/{info-0bQQGjTV.js → info-C7OjlS11.js} +1 -1
- package/dist/{ja-BhdkqENz.js → ja-CUgR3mV0.js} +21 -0
- package/dist/{keys-injl74ob.js → keys-BKFq19a2.js} +1 -1
- package/dist/{link-Cstrr3Ep.js → link-CrUFaZ0t.js} +1 -1
- package/dist/{list-Dx9Rmy5s.js → list-CLgv6M-k.js} +1 -1
- package/dist/{loader-circle-D8Qqs0MG.js → loader-circle-BXM5VO0K.js} +1 -1
- package/dist/{message-circle-D78ELX6I.js → message-circle-BisdQ8H9.js} +1 -1
- package/dist/{cdn/chunks/nl-CE3YItYg.js → nl-qrLY7hMS.js} +21 -2
- package/dist/{package-DOvM9sHE.js → package-C1T4AxV1.js} +1 -1
- package/dist/{pencil-B6m0OG0n.js → pencil-oo2mwf4C.js} +1 -1
- package/dist/{plus-D-nEKxTc.js → plus-BIilXopD.js} +1 -1
- package/dist/{cdn/chunks/preRenderCustomBlocks-CFwa7nP9.js → preRenderCustomBlocks-lFX0HHiV.js} +3 -3
- package/dist/{pt-BR-CUIT4rq4.js → pt-BR-C6hMTQYi.js} +21 -0
- package/dist/{refresh-cw-CXZS-R1U.js → refresh-cw-DrLlkEVC.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-CO67ema2.js → runtime-dom.esm-bundler-lFF-QG3j.js} +3 -3
- package/dist/{search-DSvil0jo.js → search-DNu9lImk.js} +1 -1
- package/dist/{send-BBR28V94.js → send-DDNh3LoJ.js} +1 -1
- package/dist/{shield-check-ByxUnaU9.js → shield-check-aXM3o14f.js} +1 -1
- package/dist/{smartphone-CNOwGf5T.js → smartphone-isccgDee.js} +1 -1
- package/dist/socialIcons-BctavKBN.js +1180 -0
- package/dist/{sparkles-DO1hzwzf.js → sparkles-CIMfFxKv.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{cdn/chunks/styleConstants-C_YAPdQS.js → styleConstants-D1Jz-TFU.js} +7 -30
- package/dist/templatical-editor.js +509 -487
- package/dist/{text-align-start-BKEKMheq.js → text-align-start-C4JFeqsq.js} +1 -1
- package/dist/{trash-CKEQH4vH.js → trash-8ZD9pK_c.js} +1 -1
- package/dist/{triangle-alert-BHnfd3fV.js → triangle-alert-pq45xEHl.js} +1 -1
- package/dist/{upload-C8uO7KsR.js → upload-DrNFmVes.js} +1 -1
- package/dist/{useAliveFlag-6PtarpNZ.js → useAliveFlag-Dd06mRxe.js} +1 -1
- package/dist/{useCloudI18n-GvIOLziA.js → useCloudI18n-Nwqo7pI_.js} +2 -2
- package/dist/{useEditorCore-DQSeKPE9.js → useEditorCore-BcT7UI4e.js} +1027 -1018
- package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
- package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
- package/dist/{useLogicTag-BH87j1vZ.js → useLogicTag-D-dI8H6p.js} +3 -3
- package/dist/{useMergeTag-DfPKX2Tk.js → useMergeTag-5wMeDBi-.js} +3 -3
- package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
- package/dist/{useScrollToBlock-Dr7Sb6Tr.js → useScrollToBlock-Do3suaqp.js} +4 -5
- package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
- package/dist/withCurrentFont-B4YnsG_2.js +19 -0
- package/dist/{x-gEC0yMci.js → x-CBFKGLB1.js} +1 -1
- package/package.json +24 -24
- package/dist/BlockPreviewCanvas-DwxJOTzH.js +0 -133
- package/dist/CountdownBlock-RNx3hIu0.js +0 -91
- package/dist/WrapperBlock-CzJa2Mxw.js +0 -34
- package/dist/cdn/chunks/BlockPreviewCanvas-hKxE6f-k.js +0 -135
- package/dist/cdn/chunks/BlockPreviewCanvas-hKxE6f-k.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-B5DN4Sy4.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-G-yV7C1C.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-K4tIkpG1.js.map +0 -1
- package/dist/cdn/chunks/TplModal-OOT36AjS.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-DdrnwH80.js +0 -36
- package/dist/cdn/chunks/WrapperBlock-DdrnwH80.js.map +0 -1
- package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-CeRJkLR2.js.map +0 -1
- package/dist/cdn/chunks/de-CGjbQ2mt.js.map +0 -1
- package/dist/cdn/chunks/draggable-BUTN5vZC.js.map +0 -1
- package/dist/cdn/chunks/en-BTiiAC-B.js.map +0 -1
- package/dist/cdn/chunks/en-CAt6y87e.js +0 -1
- package/dist/cdn/chunks/es-CdTOcSTf.js.map +0 -1
- package/dist/cdn/chunks/extensions-xjRsIjMP.js.map +0 -1
- package/dist/cdn/chunks/fr-B6lcLLzC.js.map +0 -1
- package/dist/cdn/chunks/ja-BhdkqENz.js.map +0 -1
- package/dist/cdn/chunks/nl-CE3YItYg.js.map +0 -1
- package/dist/cdn/chunks/preRenderCustomBlocks-CFwa7nP9.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CsYnPPll.js +0 -1050
- package/dist/cdn/chunks/socialIcons-CsYnPPll.js.map +0 -1
- package/dist/cdn/chunks/src-BcqNlDMe.js.map +0 -1
- package/dist/cdn/chunks/src-CkXmV2I2.js.map +0 -1
- package/dist/cdn/chunks/src-HA9F2kvk.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-BF1ZhcGu.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-BDNJ25X1.js.map +0 -1
- package/dist/cdn/chunks/withCurrentFont-DeCbPVaE.js +0 -32
- package/dist/cdn/chunks/withCurrentFont-DeCbPVaE.js.map +0 -1
- package/dist/dist-CFC4pg2o.js +0 -5
- package/dist/dist-j2FavQmU.js +0 -5
- package/dist/en-Bk4iCfjp.js +0 -1
- package/dist/socialIcons-CvAixjj8.js +0 -1126
- package/dist/withCurrentFont-DeCbPVaE.js +0 -30
|
@@ -1,50 +1,47 @@
|
|
|
1
|
-
import { $ as e, A as t, At as n, B as r, D as i, E as a, F as o, J as s, K as c, M as l, N as u, O as d, R as f, S as p, V as m, W as h, Y as g, Z as _, _ as v, at as y, b, c as x, d as S, g as C, h as w, it as T, j as E, jt as D, k as O, kt as k, l as A, nt as j, r as M, rt as ee, s as N, u as P, v as F, y as te } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { c as I, o as ne, s as re } from "./runtime-dom.esm-bundler-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
import { a as
|
|
7
|
-
import { $ as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { i as
|
|
11
|
-
import { r as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import
|
|
21
|
-
import { t as
|
|
22
|
-
import "./
|
|
23
|
-
import { t as jn } from "./useMergeTag-DfPKX2Tk.js";
|
|
24
|
-
import { t as Mn } from "./useLogicTag-BH87j1vZ.js";
|
|
25
|
-
import { t as Nn } from "./useAliveFlag-6PtarpNZ.js";
|
|
1
|
+
import { $ as e, A as t, At as n, B as r, D as i, E as a, F as o, J as s, K as c, M as l, N as u, O as d, R as f, S as p, V as m, W as h, Y as g, Z as _, _ as v, at as y, b, c as x, d as S, g as C, h as w, it as T, j as E, jt as D, k as O, kt as k, l as A, nt as j, r as M, rt as ee, s as N, u as P, v as F, y as te } from "./vue.runtime.esm-bundler-CAzmrXdD.js";
|
|
2
|
+
import { c as I, o as ne, s as re } from "./runtime-dom.esm-bundler-lFF-QG3j.js";
|
|
3
|
+
import { D as ie, E as ae, F as oe, H as se, J as ce, K as le, L as ue, M as de, N as fe, O as pe, P as me, R as he, S as ge, T as _e, U as ve, W as ye, X as be, Y as xe, Z as Se, _ as Ce, _t as we, a as Te, at as Ee, b as De, c as Oe, ct as ke, dt as Ae, et as je, f as Me, ft as Ne, gt as Pe, ht as Fe, it as Ie, j as Le, k as Re, lt as ze, mt as Be, o as Ve, ot as He, p as Ue, pt as We, q as Ge, rt as Ke, s as qe, st as Je, u as Ye, ut as Xe, w as Ze, x as Qe, z as $e } from "./dist-C8koXLhl.js";
|
|
4
|
+
import { S as et, T as tt, _ as nt, a as rt, c as it, d as at, f as ot, i as st, l as ct, n as lt, o as ut, s as dt, t as ft, u as pt, v as mt, w as ht, x as gt } from "./socialIcons-BctavKBN.js";
|
|
5
|
+
import { _ as _t, h as vt, v as yt, y as bt } from "./dist-CUWI-IvA.js";
|
|
6
|
+
import { a as xt, c as St, i as Ct } from "./dist-DAAJogrx.js";
|
|
7
|
+
import { $ as wt, A as Tt, B as Et, C as Dt, D as Ot, E as kt, F as At, G as jt, H as Mt, I as Nt, J as Pt, K as Ft, L as It, M as Lt, N as Rt, O as zt, P as Bt, Q as Vt, R as Ht, S as Ut, T as Wt, V as Gt, X as Kt, Y as qt, Z as Jt, _ as Yt, a as Xt, b as Zt, c as Qt, d as $t, f as en, g as tn, h as nn, j as rn, k as an, l as on, m as sn, n as cn, o as ln, p as un, q as dn, r as fn, s as pn, v as mn, w as hn, x as gn, y as _n, z as vn } from "./keys-BKFq19a2.js";
|
|
8
|
+
import { t as yn } from "./useI18n-CxVEpurs.js";
|
|
9
|
+
import { t as bn } from "./logger-BBlvSn6q.js";
|
|
10
|
+
import { i as xn, r as Sn, s as Cn, t as wn } from "./usePopoverPosition-CwnH1o5g.js";
|
|
11
|
+
import { r as Tn, t as En } from "./templateSettingsFields-YCFVBVYh.js";
|
|
12
|
+
import { t as Dn } from "./createLucideIcon-DziKp5iU.js";
|
|
13
|
+
import { t as On } from "./copy-BsKl4dcy.js";
|
|
14
|
+
import { t as kn } from "./message-circle-BisdQ8H9.js";
|
|
15
|
+
import { t as An } from "./trash-8ZD9pK_c.js";
|
|
16
|
+
import { t as jn } from "./triangle-alert-pq45xEHl.js";
|
|
17
|
+
import { t as Mn } from "./LoadingTrack-6XsqodoY.js";
|
|
18
|
+
import { t as Nn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
19
|
+
import { t as Pn } from "./useEditorRoot-BD3piYtD.js";
|
|
20
|
+
import "./useCloudI18n-Nwqo7pI_.js";
|
|
21
|
+
import { t as Fn } from "./useMergeTag-5wMeDBi-.js";
|
|
22
|
+
import { t as In } from "./useLogicTag-D-dI8H6p.js";
|
|
26
23
|
//#region src/utils/activeEditorTracker.ts
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
let e = ++
|
|
30
|
-
return
|
|
24
|
+
var Ln = /* @__PURE__ */ new Set(), Rn = 0, zn = 0;
|
|
25
|
+
function Bn() {
|
|
26
|
+
let e = ++zn;
|
|
27
|
+
return Ln.add(e), Rn === 0 && (Rn = e), {
|
|
31
28
|
id: e,
|
|
32
|
-
isActive: () =>
|
|
29
|
+
isActive: () => Ln.size <= 1 || Rn === e,
|
|
33
30
|
claim: () => {
|
|
34
|
-
|
|
31
|
+
Rn = e;
|
|
35
32
|
},
|
|
36
33
|
dispose: () => {
|
|
37
|
-
if (
|
|
38
|
-
let e = Array.from(
|
|
39
|
-
|
|
34
|
+
if (Ln.delete(e), Rn === e) {
|
|
35
|
+
let e = Array.from(Ln);
|
|
36
|
+
Rn = e[e.length - 1] ?? 0;
|
|
40
37
|
}
|
|
41
38
|
}
|
|
42
39
|
};
|
|
43
40
|
}
|
|
44
41
|
//#endregion
|
|
45
42
|
//#region src/composables/usePreviewResolution.ts
|
|
46
|
-
var
|
|
47
|
-
function
|
|
43
|
+
var Vn = 500;
|
|
44
|
+
function Hn(e) {
|
|
48
45
|
let t = typeof e.resolvePreview == "function", n = _(null), r = _(!1), i = _(!1), a = 0, o = null;
|
|
49
46
|
function c() {
|
|
50
47
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -55,13 +52,13 @@ function zn(e) {
|
|
|
55
52
|
let o = ++a;
|
|
56
53
|
r.value = !0;
|
|
57
54
|
let s = {
|
|
58
|
-
content:
|
|
55
|
+
content: ze(e.getContent()),
|
|
59
56
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
60
57
|
};
|
|
61
58
|
try {
|
|
62
59
|
let e = await t(s);
|
|
63
60
|
if (o !== a) return;
|
|
64
|
-
if (!
|
|
61
|
+
if (!Se(e)) {
|
|
65
62
|
i.value = !0;
|
|
66
63
|
return;
|
|
67
64
|
}
|
|
@@ -76,7 +73,7 @@ function zn(e) {
|
|
|
76
73
|
function u() {
|
|
77
74
|
t && (c(), n.value === null ? l() : o = setTimeout(() => {
|
|
78
75
|
o = null, l();
|
|
79
|
-
},
|
|
76
|
+
}, Vn));
|
|
80
77
|
}
|
|
81
78
|
return f(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
82
79
|
e ? u() : (c(), a++, r.value = !1, n.value = null, i.value = !1);
|
|
@@ -93,7 +90,7 @@ function zn(e) {
|
|
|
93
90
|
}
|
|
94
91
|
//#endregion
|
|
95
92
|
//#region src/composables/useImageUrlResolver.ts
|
|
96
|
-
function
|
|
93
|
+
function Un(e) {
|
|
97
94
|
let t = g(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
98
95
|
function r(e) {
|
|
99
96
|
return t.get(e);
|
|
@@ -122,8 +119,8 @@ function Bn(e) {
|
|
|
122
119
|
lookup: a
|
|
123
120
|
};
|
|
124
121
|
}
|
|
125
|
-
function
|
|
126
|
-
let t = p(
|
|
122
|
+
function Wn(e) {
|
|
123
|
+
let t = p(gn, null), n = N(e);
|
|
127
124
|
if (!t) return n;
|
|
128
125
|
let r;
|
|
129
126
|
function i() {
|
|
@@ -144,9 +141,28 @@ function Vn(e) {
|
|
|
144
141
|
return typeof r == "string" && r.length > 0 ? r : e;
|
|
145
142
|
});
|
|
146
143
|
}
|
|
144
|
+
function Gn(e, t) {
|
|
145
|
+
if (!e || !t) return t;
|
|
146
|
+
let n = e.get(t);
|
|
147
|
+
return typeof n == "string" && n.length > 0 ? n : t;
|
|
148
|
+
}
|
|
149
|
+
function Kn(e, t) {
|
|
150
|
+
return typeof e?.url == "string" && Ce(e.url, t);
|
|
151
|
+
}
|
|
152
|
+
function qn(e, t) {
|
|
153
|
+
let n = e?.url;
|
|
154
|
+
if (typeof n == "string" && n.trim() !== "") return Ce(n, t) ? void 0 : n;
|
|
155
|
+
}
|
|
156
|
+
function Jn(e) {
|
|
157
|
+
let t = p(Bt, Ye.liquid), n = Wn(() => qn(e(), t));
|
|
158
|
+
return N(() => Kn(e(), t) ? null : n.value);
|
|
159
|
+
}
|
|
160
|
+
function Yn(e, t, n) {
|
|
161
|
+
return Kn(t, n) ? null : Gn(e, qn(t, n));
|
|
162
|
+
}
|
|
147
163
|
//#endregion
|
|
148
164
|
//#region src/composables/useMergeTagPicker.ts
|
|
149
|
-
function
|
|
165
|
+
function Xn() {
|
|
150
166
|
let e = _(!1), t = _([]), n = _(null), r = null;
|
|
151
167
|
function i(i, a) {
|
|
152
168
|
if (r) {
|
|
@@ -177,7 +193,7 @@ function Hn() {
|
|
|
177
193
|
}
|
|
178
194
|
//#endregion
|
|
179
195
|
//#region src/composables/useLogicTagPicker.ts
|
|
180
|
-
function
|
|
196
|
+
function Zn() {
|
|
181
197
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
182
198
|
function i(i, a) {
|
|
183
199
|
if (r) {
|
|
@@ -208,17 +224,17 @@ function Un() {
|
|
|
208
224
|
}
|
|
209
225
|
//#endregion
|
|
210
226
|
//#region src/composables/useTemplateLint.ts
|
|
211
|
-
function
|
|
227
|
+
function Qn(e) {
|
|
212
228
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
213
229
|
}
|
|
214
|
-
function
|
|
215
|
-
let n = _([]), r = _(!1), i = _(!1), a = e(null), o =
|
|
230
|
+
function $n(t) {
|
|
231
|
+
let n = _([]), r = _(!1), i = _(!1), a = e(null), o = Qn(t.options), s = null, c = !1;
|
|
216
232
|
o || l();
|
|
217
233
|
async function l() {
|
|
218
234
|
try {
|
|
219
235
|
let e = await import("@templatical/quality");
|
|
220
236
|
if (c) return;
|
|
221
|
-
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s =
|
|
237
|
+
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s = bt(t.content, u, {
|
|
222
238
|
debounce: t.debounce ?? 500,
|
|
223
239
|
deep: !0
|
|
224
240
|
});
|
|
@@ -253,7 +269,7 @@ function Gn(t) {
|
|
|
253
269
|
}
|
|
254
270
|
//#endregion
|
|
255
271
|
//#region src/composables/useKeyboardReorder.ts
|
|
256
|
-
function
|
|
272
|
+
function er(e, t, n = []) {
|
|
257
273
|
let r = _(null), i = _(""), a = null;
|
|
258
274
|
function o(t) {
|
|
259
275
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -280,7 +296,7 @@ function Kn(e, t, n = []) {
|
|
|
280
296
|
let i = o(r);
|
|
281
297
|
if (!i) return "";
|
|
282
298
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
283
|
-
return a ?
|
|
299
|
+
return a ? ot(a, t.t, n) : "";
|
|
284
300
|
}
|
|
285
301
|
function c(t, n) {
|
|
286
302
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -349,13 +365,13 @@ function Kn(e, t, n = []) {
|
|
|
349
365
|
}
|
|
350
366
|
//#endregion
|
|
351
367
|
//#region src/composables/useUiTheme.ts
|
|
352
|
-
function
|
|
353
|
-
let t =
|
|
368
|
+
function tr(e) {
|
|
369
|
+
let t = St("(prefers-color-scheme: dark)");
|
|
354
370
|
return { resolvedTheme: N(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
355
371
|
}
|
|
356
372
|
//#endregion
|
|
357
373
|
//#region src/composables/useThemeStyles.ts
|
|
358
|
-
var
|
|
374
|
+
var nr = {
|
|
359
375
|
bg: "--tpl-bg",
|
|
360
376
|
bgElevated: "--tpl-bg-elevated",
|
|
361
377
|
bgHover: "--tpl-bg-hover",
|
|
@@ -379,10 +395,10 @@ var Jn = {
|
|
|
379
395
|
dangerLight: "--tpl-danger-light",
|
|
380
396
|
canvasBg: "--tpl-canvas-bg"
|
|
381
397
|
};
|
|
382
|
-
function
|
|
398
|
+
function rr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
383
399
|
return { themeStyles: N(() => {
|
|
384
400
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
385
|
-
if (a) for (let [e, t] of Object.entries(
|
|
401
|
+
if (a) for (let [e, t] of Object.entries(nr)) {
|
|
386
402
|
let n = a[e];
|
|
387
403
|
n && (r[t] = n);
|
|
388
404
|
}
|
|
@@ -391,7 +407,7 @@ function Yn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
391
407
|
}
|
|
392
408
|
//#endregion
|
|
393
409
|
//#region src/composables/useBlockRegistry.ts
|
|
394
|
-
function
|
|
410
|
+
function ir() {
|
|
395
411
|
let t = e(/* @__PURE__ */ new Map());
|
|
396
412
|
function n(e, n) {
|
|
397
413
|
t.value.set(e, n), T(t);
|
|
@@ -399,7 +415,7 @@ function Xn() {
|
|
|
399
415
|
function r(e, n) {
|
|
400
416
|
let r = `custom:${e.type}`, i = {
|
|
401
417
|
component: n,
|
|
402
|
-
createBlock: () =>
|
|
418
|
+
createBlock: () => ge(e),
|
|
403
419
|
definition: e
|
|
404
420
|
};
|
|
405
421
|
t.value.set(r, i), T(t);
|
|
@@ -431,7 +447,7 @@ function Xn() {
|
|
|
431
447
|
strictFilters: !1
|
|
432
448
|
}).parseAndRender(t.template, e.fieldValues);
|
|
433
449
|
} catch (t) {
|
|
434
|
-
return
|
|
450
|
+
return bn.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
435
451
|
}
|
|
436
452
|
}
|
|
437
453
|
function l(e) {
|
|
@@ -449,9 +465,9 @@ function Xn() {
|
|
|
449
465
|
}
|
|
450
466
|
//#endregion
|
|
451
467
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
452
|
-
function
|
|
468
|
+
function ar(e, t) {
|
|
453
469
|
return N(() => {
|
|
454
|
-
let n =
|
|
470
|
+
let n = or(e.value.blocks);
|
|
455
471
|
if (n.size === 0) return [];
|
|
456
472
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
457
473
|
for (let e of n) {
|
|
@@ -463,76 +479,76 @@ function Zn(e, t) {
|
|
|
463
479
|
return i;
|
|
464
480
|
});
|
|
465
481
|
}
|
|
466
|
-
function
|
|
482
|
+
function or(e) {
|
|
467
483
|
let t = /* @__PURE__ */ new Set();
|
|
468
|
-
return
|
|
484
|
+
return sr(e, t), t;
|
|
469
485
|
}
|
|
470
|
-
function
|
|
471
|
-
for (let n of e) if (
|
|
486
|
+
function sr(e, t) {
|
|
487
|
+
for (let n of e) if (ce(n)) t.add(n.customType);
|
|
472
488
|
else if (n.type === "section") {
|
|
473
489
|
let e = n.children;
|
|
474
490
|
if (!e) continue;
|
|
475
|
-
for (let n of e)
|
|
476
|
-
} else
|
|
491
|
+
for (let n of e) sr(n, t);
|
|
492
|
+
} else je(n) && sr(n.children, t);
|
|
477
493
|
}
|
|
478
494
|
//#endregion
|
|
479
495
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
480
|
-
var
|
|
496
|
+
var cr = [
|
|
481
497
|
{
|
|
482
498
|
type: "section",
|
|
483
|
-
createBlock:
|
|
499
|
+
createBlock: Re
|
|
484
500
|
},
|
|
485
501
|
{
|
|
486
502
|
type: "title",
|
|
487
|
-
createBlock:
|
|
503
|
+
createBlock: me
|
|
488
504
|
},
|
|
489
505
|
{
|
|
490
506
|
type: "paragraph",
|
|
491
|
-
createBlock:
|
|
507
|
+
createBlock: pe
|
|
492
508
|
},
|
|
493
509
|
{
|
|
494
510
|
type: "image",
|
|
495
|
-
createBlock:
|
|
511
|
+
createBlock: ae
|
|
496
512
|
},
|
|
497
513
|
{
|
|
498
514
|
type: "button",
|
|
499
|
-
createBlock:
|
|
515
|
+
createBlock: De
|
|
500
516
|
},
|
|
501
517
|
{
|
|
502
518
|
type: "divider",
|
|
503
|
-
createBlock:
|
|
519
|
+
createBlock: Ze
|
|
504
520
|
},
|
|
505
521
|
{
|
|
506
522
|
type: "video",
|
|
507
|
-
createBlock:
|
|
523
|
+
createBlock: oe
|
|
508
524
|
},
|
|
509
525
|
{
|
|
510
526
|
type: "social",
|
|
511
|
-
createBlock:
|
|
527
|
+
createBlock: Le
|
|
512
528
|
},
|
|
513
529
|
{
|
|
514
530
|
type: "menu",
|
|
515
|
-
createBlock:
|
|
531
|
+
createBlock: ie
|
|
516
532
|
},
|
|
517
533
|
{
|
|
518
534
|
type: "table",
|
|
519
|
-
createBlock:
|
|
535
|
+
createBlock: fe
|
|
520
536
|
},
|
|
521
537
|
{
|
|
522
538
|
type: "spacer",
|
|
523
|
-
createBlock:
|
|
539
|
+
createBlock: de
|
|
524
540
|
},
|
|
525
541
|
{
|
|
526
542
|
type: "html",
|
|
527
|
-
createBlock:
|
|
543
|
+
createBlock: _e
|
|
528
544
|
},
|
|
529
545
|
{
|
|
530
546
|
type: "countdown",
|
|
531
|
-
createBlock:
|
|
547
|
+
createBlock: Qe
|
|
532
548
|
}
|
|
533
549
|
];
|
|
534
|
-
function
|
|
535
|
-
for (let n of
|
|
550
|
+
function lr(e, t) {
|
|
551
|
+
for (let n of cr) {
|
|
536
552
|
let r = t[n.type];
|
|
537
553
|
r && e.registerBuiltIn(n.type, {
|
|
538
554
|
component: r,
|
|
@@ -542,33 +558,33 @@ function tr(e, t) {
|
|
|
542
558
|
}
|
|
543
559
|
//#endregion
|
|
544
560
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
545
|
-
function
|
|
561
|
+
function ur(e) {
|
|
546
562
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
547
563
|
}
|
|
548
564
|
//#endregion
|
|
549
565
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
550
|
-
function
|
|
566
|
+
function dr(e) {
|
|
551
567
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
552
568
|
}
|
|
553
|
-
function
|
|
554
|
-
let r = new Set(e.map((e) =>
|
|
555
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
569
|
+
function fr(e, t, n) {
|
|
570
|
+
let r = new Set(e.map((e) => Sn(e))), i = [], a = (e, t) => {
|
|
571
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Sn(o)) && i.push(`${t}.${n}: ${o}`) : dr(o) && a(o, `${t}.${n}`);
|
|
556
572
|
}, o = t;
|
|
557
|
-
for (let [e, t] of Object.entries(
|
|
573
|
+
for (let [e, t] of Object.entries(Te)) {
|
|
558
574
|
let n = o?.[e];
|
|
559
575
|
a({
|
|
560
576
|
...t,
|
|
561
|
-
...
|
|
577
|
+
...dr(n) ? n : {}
|
|
562
578
|
}, e);
|
|
563
579
|
}
|
|
564
580
|
return a({
|
|
565
|
-
...
|
|
581
|
+
...Ve,
|
|
566
582
|
...n ?? {}
|
|
567
583
|
}, "template"), i;
|
|
568
584
|
}
|
|
569
585
|
//#endregion
|
|
570
586
|
//#region src/utils/localizedBlockDefaults.ts
|
|
571
|
-
function
|
|
587
|
+
function pr(e) {
|
|
572
588
|
return {
|
|
573
589
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
574
590
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -577,63 +593,63 @@ function ar(e) {
|
|
|
577
593
|
}
|
|
578
594
|
//#endregion
|
|
579
595
|
//#region src/i18n/index.ts
|
|
580
|
-
var
|
|
581
|
-
"./locales/ca.ts": () => import("./ca-
|
|
582
|
-
"./locales/de.ts": () => import("./de-
|
|
583
|
-
"./locales/en.ts": () => import("./en-
|
|
584
|
-
"./locales/es.ts": () => import("./es-
|
|
585
|
-
"./locales/fr.ts": () => import("./fr-
|
|
586
|
-
"./locales/ja.ts": () => import("./ja-
|
|
587
|
-
"./locales/nl.ts": () => import("./nl-
|
|
588
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
589
|
-
}),
|
|
596
|
+
var mr = /* #__PURE__ */ Object.assign({
|
|
597
|
+
"./locales/ca.ts": () => import("./ca-DMoGGP9L.js"),
|
|
598
|
+
"./locales/de.ts": () => import("./de-DgAelLbM.js"),
|
|
599
|
+
"./locales/en.ts": () => import("./en-Dekrl7HA.js"),
|
|
600
|
+
"./locales/es.ts": () => import("./es-BaZzyidV.js"),
|
|
601
|
+
"./locales/fr.ts": () => import("./fr-C5ucb1HK.js"),
|
|
602
|
+
"./locales/ja.ts": () => import("./ja-CUgR3mV0.js"),
|
|
603
|
+
"./locales/nl.ts": () => import("./nl-qrLY7hMS.js"),
|
|
604
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-C6hMTQYi.js")
|
|
605
|
+
}), hr = /* #__PURE__ */ Object.assign({
|
|
590
606
|
"./locales/cloud/de.ts": () => import("./de-mMY5yQJu.js"),
|
|
591
607
|
"./locales/cloud/en.ts": () => import("./en-ChVeGQBY.js"),
|
|
592
608
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-CoCwRUi0.js")
|
|
593
609
|
});
|
|
594
|
-
function
|
|
610
|
+
function gr(e) {
|
|
595
611
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
596
612
|
}
|
|
597
|
-
var
|
|
598
|
-
function
|
|
613
|
+
var _r = gr(mr), vr = gr(hr);
|
|
614
|
+
function yr(e) {
|
|
599
615
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
600
616
|
}
|
|
601
|
-
function
|
|
602
|
-
let n =
|
|
603
|
-
return t.find((e) =>
|
|
617
|
+
function br(e, t) {
|
|
618
|
+
let n = yr(e);
|
|
619
|
+
return t.find((e) => yr(e) === n);
|
|
604
620
|
}
|
|
605
|
-
function
|
|
606
|
-
return
|
|
621
|
+
function xr(e) {
|
|
622
|
+
return yr(e).split("-")[0];
|
|
607
623
|
}
|
|
608
|
-
function
|
|
609
|
-
return
|
|
624
|
+
function Sr(e, t) {
|
|
625
|
+
return br(e, t) ?? br(xr(e), t);
|
|
610
626
|
}
|
|
611
|
-
function
|
|
612
|
-
return
|
|
627
|
+
function Cr(e, t) {
|
|
628
|
+
return Sr(e, t) ?? "en";
|
|
613
629
|
}
|
|
614
|
-
async function
|
|
615
|
-
let t =
|
|
630
|
+
async function wr(e) {
|
|
631
|
+
let t = mr[`./locales/${Cr(e, _r)}.ts`];
|
|
616
632
|
return (await t()).default;
|
|
617
633
|
}
|
|
618
|
-
async function
|
|
619
|
-
let t =
|
|
634
|
+
async function Tr(e) {
|
|
635
|
+
let t = hr[`./locales/cloud/${Cr(e, vr)}.ts`];
|
|
620
636
|
return (await t()).default;
|
|
621
637
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
638
|
+
function Er(e) {
|
|
639
|
+
return Sr(e, _r) !== void 0;
|
|
624
640
|
}
|
|
625
|
-
function
|
|
626
|
-
return
|
|
641
|
+
function Dr(e) {
|
|
642
|
+
return Sr(e, vr) !== void 0;
|
|
627
643
|
}
|
|
628
|
-
function
|
|
629
|
-
return [...
|
|
644
|
+
function Or() {
|
|
645
|
+
return [..._r];
|
|
630
646
|
}
|
|
631
|
-
function
|
|
632
|
-
return [...
|
|
647
|
+
function kr() {
|
|
648
|
+
return [...vr];
|
|
633
649
|
}
|
|
634
650
|
//#endregion
|
|
635
651
|
//#region src/i18n/contentDefaults.ts
|
|
636
|
-
var
|
|
652
|
+
var Ar = {
|
|
637
653
|
en: {
|
|
638
654
|
video: "Video",
|
|
639
655
|
days: "Days",
|
|
@@ -699,17 +715,17 @@ var Sr = {
|
|
|
699
715
|
expired: "このオファーは終了しました"
|
|
700
716
|
}
|
|
701
717
|
};
|
|
702
|
-
Object.keys(
|
|
703
|
-
var
|
|
704
|
-
function
|
|
705
|
-
if (!e) return
|
|
706
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
707
|
-
if (n) return
|
|
708
|
-
let r =
|
|
709
|
-
return r ?
|
|
710
|
-
}
|
|
711
|
-
function
|
|
712
|
-
let t =
|
|
718
|
+
Object.keys(Ar);
|
|
719
|
+
var jr = new Map(Object.keys(Ar).map((e) => [e.toLowerCase(), e]));
|
|
720
|
+
function Mr(e) {
|
|
721
|
+
if (!e) return Ar.en;
|
|
722
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = jr.get(t);
|
|
723
|
+
if (n) return Ar[n];
|
|
724
|
+
let r = jr.get(xr(t));
|
|
725
|
+
return r ? Ar[r] : Ar.en;
|
|
726
|
+
}
|
|
727
|
+
function Nr(e) {
|
|
728
|
+
let t = Mr(e);
|
|
713
729
|
return {
|
|
714
730
|
video: { alt: t.video },
|
|
715
731
|
countdown: {
|
|
@@ -723,9 +739,9 @@ function Tr(e) {
|
|
|
723
739
|
}
|
|
724
740
|
//#endregion
|
|
725
741
|
//#region src/utils/collectColorFieldIssues.ts
|
|
726
|
-
function
|
|
742
|
+
function Pr(e, t) {
|
|
727
743
|
let n = [], r = (r, i) => {
|
|
728
|
-
let a =
|
|
744
|
+
let a = at(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
729
745
|
if (a.invalidPresets.length > 0 && n.push({
|
|
730
746
|
id: s("invalid-presets"),
|
|
731
747
|
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." : "")
|
|
@@ -736,8 +752,8 @@ function Er(e, t) {
|
|
|
736
752
|
id: s("allow-custom-ignored"),
|
|
737
753
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
738
754
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
739
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
740
|
-
e !== "" && !t.has(
|
|
755
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Sn(e)));
|
|
756
|
+
e !== "" && !t.has(Sn(e)) && n.push({
|
|
741
757
|
id: s("off-palette-default"),
|
|
742
758
|
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.`
|
|
743
759
|
});
|
|
@@ -749,7 +765,7 @@ function Er(e, t) {
|
|
|
749
765
|
}
|
|
750
766
|
//#endregion
|
|
751
767
|
//#region src/utils/keyboardShortcuts.ts
|
|
752
|
-
function
|
|
768
|
+
function Fr(e) {
|
|
753
769
|
for (let t of e.composedPath()) {
|
|
754
770
|
if (!(t instanceof HTMLElement)) continue;
|
|
755
771
|
if (t.isContentEditable) return !0;
|
|
@@ -758,14 +774,14 @@ function Dr(e) {
|
|
|
758
774
|
}
|
|
759
775
|
return !1;
|
|
760
776
|
}
|
|
761
|
-
function
|
|
777
|
+
function Ir(e, t) {
|
|
762
778
|
let n = e.metaKey || e.ctrlKey;
|
|
763
779
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
764
780
|
else if (n && e.key.toLowerCase() === "z") {
|
|
765
|
-
if (
|
|
781
|
+
if (Fr(e)) return;
|
|
766
782
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
767
783
|
} else {
|
|
768
|
-
if (t.isPicking?.() && !
|
|
784
|
+
if (t.isPicking?.() && !Fr(e)) {
|
|
769
785
|
if (e.key === "Escape") {
|
|
770
786
|
e.preventDefault(), t.onCancelPick?.();
|
|
771
787
|
return;
|
|
@@ -779,58 +795,78 @@ function Or(e, t) {
|
|
|
779
795
|
return;
|
|
780
796
|
}
|
|
781
797
|
}
|
|
782
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
798
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Fr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
783
799
|
}
|
|
784
800
|
}
|
|
785
801
|
//#endregion
|
|
786
802
|
//#region src/utils/blockComponentResolver.ts
|
|
787
|
-
function
|
|
788
|
-
let
|
|
789
|
-
return e.textColor && (
|
|
803
|
+
function Lr(e, t) {
|
|
804
|
+
let n = { fontFamily: t(e.fontFamily) };
|
|
805
|
+
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;
|
|
790
806
|
}
|
|
791
|
-
function
|
|
807
|
+
function Rr(e, t, n) {
|
|
792
808
|
if (t) {
|
|
793
809
|
let n = t.getComponent(e);
|
|
794
810
|
if (n) return n;
|
|
795
811
|
}
|
|
796
812
|
return n[e.type] ?? null;
|
|
797
813
|
}
|
|
798
|
-
|
|
814
|
+
var zr = "--tpl-block-bg-layer", Br = "tpl-has-bg-image";
|
|
815
|
+
function Vr(e, t) {
|
|
816
|
+
if (t === null) return {};
|
|
817
|
+
let n = Ke(e);
|
|
818
|
+
if (n === null) return {};
|
|
819
|
+
let r = t?.trim(), i = r ? he(r) : n.url;
|
|
820
|
+
return {
|
|
821
|
+
backgroundImage: `url("${i}")`,
|
|
822
|
+
backgroundSize: n.size,
|
|
823
|
+
backgroundPosition: n.position,
|
|
824
|
+
backgroundRepeat: n.repeat,
|
|
825
|
+
[zr]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
function Hr(e) {
|
|
829
|
+
return e && zr in e ? Br : void 0;
|
|
830
|
+
}
|
|
831
|
+
function Ur(e, t = {}) {
|
|
799
832
|
if (e.type === "wrapper") return {};
|
|
800
|
-
let { padding:
|
|
801
|
-
padding: `${
|
|
802
|
-
backgroundColor:
|
|
833
|
+
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
834
|
+
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
835
|
+
backgroundColor: r || "transparent"
|
|
803
836
|
};
|
|
804
|
-
if ((e.type === "paragraph" || e.type === "title") && (
|
|
805
|
-
let
|
|
806
|
-
|
|
837
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Oe.paragraphGap : Oe.paragraphGap}px`), e.type === "section") {
|
|
838
|
+
let n = we(e.borderRadius);
|
|
839
|
+
n !== null && (i.borderRadius = n), Object.assign(i, Gr(e.border)), Object.assign(i, Vr(e.backgroundImage, t.backgroundImageUrl));
|
|
807
840
|
}
|
|
808
|
-
return
|
|
841
|
+
return i;
|
|
809
842
|
}
|
|
810
|
-
function
|
|
843
|
+
function Wr(e, t, n) {
|
|
844
|
+
return e.type === "section" ? Ur(e, { backgroundImageUrl: Yn(t, e.backgroundImage, n) }) : Ur(e);
|
|
845
|
+
}
|
|
846
|
+
function Gr(e) {
|
|
811
847
|
let t = {};
|
|
812
|
-
for (let [n, r] of Object.entries(
|
|
848
|
+
for (let [n, r] of Object.entries(Pe(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
813
849
|
return t;
|
|
814
850
|
}
|
|
815
|
-
function
|
|
851
|
+
function Kr(e, t = {}) {
|
|
816
852
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
817
|
-
let
|
|
818
|
-
|
|
819
|
-
let
|
|
820
|
-
return
|
|
853
|
+
let n = e.wrapper, r = {};
|
|
854
|
+
n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && (r.padding = `${n.padding.top}px ${n.padding.right}px ${n.padding.bottom}px ${n.padding.left}px`);
|
|
855
|
+
let i = we(n.borderRadius);
|
|
856
|
+
return i !== null && (r.borderRadius = i), Object.assign(r, Vr(n.backgroundImage, t.backgroundImageUrl)), r;
|
|
821
857
|
}
|
|
822
|
-
function
|
|
858
|
+
function qr(e, t = {}) {
|
|
823
859
|
if (e.type !== "wrapper") return null;
|
|
824
|
-
let
|
|
825
|
-
if (e.styles.backgroundColor && (
|
|
826
|
-
let
|
|
827
|
-
|
|
860
|
+
let n = {};
|
|
861
|
+
if (e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
862
|
+
let t = e.styles.padding;
|
|
863
|
+
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
828
864
|
}
|
|
829
|
-
return e.borderRadius && e.borderRadius > 0 && (
|
|
865
|
+
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Vr(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
830
866
|
}
|
|
831
867
|
//#endregion
|
|
832
868
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
833
|
-
function
|
|
869
|
+
function Jr(e, t, n, r = !1) {
|
|
834
870
|
if (!e) return [];
|
|
835
871
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
836
872
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -839,18 +875,18 @@ function Fr(e, t, n, r = !1) {
|
|
|
839
875
|
value: e.slice(o, s.index)
|
|
840
876
|
});
|
|
841
877
|
let i = s[0];
|
|
842
|
-
if (
|
|
843
|
-
let e = r ?
|
|
878
|
+
if (be(i, n)) {
|
|
879
|
+
let e = r ? ye(i, t) : void 0;
|
|
844
880
|
a.push(e === void 0 ? {
|
|
845
881
|
type: "tag",
|
|
846
|
-
value:
|
|
882
|
+
value: ve(i, t)
|
|
847
883
|
} : {
|
|
848
884
|
type: "text",
|
|
849
885
|
value: e
|
|
850
886
|
});
|
|
851
|
-
} else
|
|
887
|
+
} else xe(i, n) ? a.push({
|
|
852
888
|
type: "tag",
|
|
853
|
-
value:
|
|
889
|
+
value: se(i, n)
|
|
854
890
|
}) : a.push({
|
|
855
891
|
type: "text",
|
|
856
892
|
value: i
|
|
@@ -864,27 +900,27 @@ function Fr(e, t, n, r = !1) {
|
|
|
864
900
|
}
|
|
865
901
|
//#endregion
|
|
866
902
|
//#region src/components/MergeTagPreviewText.vue
|
|
867
|
-
var
|
|
903
|
+
var Yr = F({
|
|
868
904
|
name: "MergeTagPreviewText",
|
|
869
905
|
props: { text: {
|
|
870
906
|
type: String,
|
|
871
907
|
required: !0
|
|
872
908
|
} },
|
|
873
909
|
setup(e) {
|
|
874
|
-
let t = p(
|
|
910
|
+
let t = p(zt, At), n = p(Bt, Ye.liquid), r = p(Vt, null), i = N(() => Jr(e.text, t.value, n, r?.value ?? !1));
|
|
875
911
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
876
912
|
key: t,
|
|
877
913
|
class: "tpl-merge-tag-label"
|
|
878
914
|
}, e.value) : e.value);
|
|
879
915
|
}
|
|
880
|
-
}),
|
|
916
|
+
}), Xr = ["href"], Zr = /* @__PURE__ */ F({
|
|
881
917
|
__name: "ButtonBlock",
|
|
882
918
|
props: {
|
|
883
919
|
block: {},
|
|
884
920
|
viewport: {}
|
|
885
921
|
},
|
|
886
922
|
setup(e) {
|
|
887
|
-
let r = e, i = N(() => {
|
|
923
|
+
let r = e, i = wt(mn, "ButtonBlock"), a = N(() => {
|
|
888
924
|
let e = {
|
|
889
925
|
display: "inline-block",
|
|
890
926
|
padding: `${r.block.buttonPadding.top}px ${r.block.buttonPadding.right}px ${r.block.buttonPadding.bottom}px ${r.block.buttonPadding.left}px`,
|
|
@@ -893,26 +929,26 @@ var Ir = F({
|
|
|
893
929
|
fontSize: `${r.block.fontSize}px`,
|
|
894
930
|
fontWeight: "bold",
|
|
895
931
|
textDecoration: "none",
|
|
896
|
-
borderRadius: typeof r.block.borderRadius == "number" ? `${r.block.borderRadius}px` :
|
|
932
|
+
borderRadius: typeof r.block.borderRadius == "number" ? `${r.block.borderRadius}px` : we(r.block.borderRadius) ?? "0px",
|
|
897
933
|
textAlign: "center"
|
|
898
934
|
};
|
|
899
|
-
return Object.assign(e,
|
|
900
|
-
}),
|
|
901
|
-
return (r,
|
|
935
|
+
return Object.assign(e, Gr(r.block.border)), r.block.fontFamily && (e.fontFamily = i.resolveFontFamily(r.block.fontFamily)), r.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof r.block.width == "number" && (e.width = `${r.block.width}px`, e.boxSizing = "border-box"), e;
|
|
936
|
+
}), o = N(() => ({ textAlign: r.block.align ?? "center" }));
|
|
937
|
+
return (r, i) => (t(), S("div", { style: n(o.value) }, [x("a", {
|
|
902
938
|
href: e.block.url || "#",
|
|
903
|
-
style: n(
|
|
939
|
+
style: n(a.value),
|
|
904
940
|
class: "tpl:cursor-default",
|
|
905
|
-
onClick:
|
|
906
|
-
}, [C(
|
|
941
|
+
onClick: i[0] ||= I(() => {}, ["prevent"])
|
|
942
|
+
}, [C(Yr, { text: e.block.text }, null, 8, ["text"])], 12, Xr)], 4));
|
|
907
943
|
}
|
|
908
|
-
}),
|
|
944
|
+
}), Qr = Dn({
|
|
909
945
|
name: "bookmark",
|
|
910
946
|
size: 24,
|
|
911
947
|
node: [["path", {
|
|
912
948
|
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",
|
|
913
949
|
key: "oz39mx"
|
|
914
950
|
}]]
|
|
915
|
-
}),
|
|
951
|
+
}), $r = Dn({
|
|
916
952
|
name: "box",
|
|
917
953
|
size: 24,
|
|
918
954
|
node: [
|
|
@@ -929,7 +965,7 @@ var Ir = F({
|
|
|
929
965
|
key: "d0xqtd"
|
|
930
966
|
}]
|
|
931
967
|
]
|
|
932
|
-
}),
|
|
968
|
+
}), ei = Dn({
|
|
933
969
|
name: "eye-off",
|
|
934
970
|
size: 24,
|
|
935
971
|
node: [
|
|
@@ -950,7 +986,7 @@ var Ir = F({
|
|
|
950
986
|
key: "1ooewy"
|
|
951
987
|
}]
|
|
952
988
|
]
|
|
953
|
-
}),
|
|
989
|
+
}), ti = Dn({
|
|
954
990
|
name: "funnel",
|
|
955
991
|
size: 24,
|
|
956
992
|
node: [["path", {
|
|
@@ -958,7 +994,7 @@ var Ir = F({
|
|
|
958
994
|
key: "sc7q7i"
|
|
959
995
|
}]],
|
|
960
996
|
aliases: ["filter"]
|
|
961
|
-
}),
|
|
997
|
+
}), ni = Dn({
|
|
962
998
|
name: "grip-vertical",
|
|
963
999
|
size: 24,
|
|
964
1000
|
node: [
|
|
@@ -999,14 +1035,14 @@ var Ir = F({
|
|
|
999
1035
|
key: "f4zoj3"
|
|
1000
1036
|
}]
|
|
1001
1037
|
]
|
|
1002
|
-
}),
|
|
1038
|
+
}), ri = Dn({
|
|
1003
1039
|
name: "puzzle",
|
|
1004
1040
|
size: 24,
|
|
1005
1041
|
node: [["path", {
|
|
1006
1042
|
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",
|
|
1007
1043
|
key: "w46dr5"
|
|
1008
1044
|
}]]
|
|
1009
|
-
}),
|
|
1045
|
+
}), ii = Dn({
|
|
1010
1046
|
name: "video",
|
|
1011
1047
|
size: 24,
|
|
1012
1048
|
node: [["path", {
|
|
@@ -1020,11 +1056,11 @@ var Ir = F({
|
|
|
1020
1056
|
rx: "2",
|
|
1021
1057
|
key: "158x01"
|
|
1022
1058
|
}]]
|
|
1023
|
-
}),
|
|
1059
|
+
}), ai = ["innerHTML"], oi = [
|
|
1024
1060
|
"src",
|
|
1025
1061
|
"width",
|
|
1026
1062
|
"height"
|
|
1027
|
-
],
|
|
1063
|
+
], si = /* @__PURE__ */ F({
|
|
1028
1064
|
__name: "CustomBlockIcon",
|
|
1029
1065
|
props: {
|
|
1030
1066
|
icon: {},
|
|
@@ -1040,24 +1076,24 @@ var Ir = F({
|
|
|
1040
1076
|
height: `${i.value}px`
|
|
1041
1077
|
}),
|
|
1042
1078
|
innerHTML: e.icon
|
|
1043
|
-
}, null, 12,
|
|
1079
|
+
}, null, 12, ai)) : o.value ? (t(), S("img", {
|
|
1044
1080
|
key: 1,
|
|
1045
1081
|
src: e.icon,
|
|
1046
1082
|
width: i.value,
|
|
1047
1083
|
height: i.value,
|
|
1048
1084
|
class: "tpl:inline-block",
|
|
1049
1085
|
alt: ""
|
|
1050
|
-
}, null, 8,
|
|
1086
|
+
}, null, 8, oi)) : (t(), A(y($r), {
|
|
1051
1087
|
key: 2,
|
|
1052
1088
|
size: i.value,
|
|
1053
1089
|
"stroke-width": 1.5
|
|
1054
1090
|
}, null, 8, ["size"]));
|
|
1055
1091
|
}
|
|
1056
|
-
}),
|
|
1057
|
-
function
|
|
1058
|
-
let n =
|
|
1092
|
+
}), ci = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1093
|
+
function li(e, t) {
|
|
1094
|
+
let n = Pn(), r = null, i = null, a = null;
|
|
1059
1095
|
function o() {
|
|
1060
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1096
|
+
return e.value ? Array.from(e.value.querySelectorAll(ci)).filter((e) => e.offsetParent !== null) : [];
|
|
1061
1097
|
}
|
|
1062
1098
|
function c(e) {
|
|
1063
1099
|
if (e.key !== "Tab") return;
|
|
@@ -1072,7 +1108,7 @@ function Xr(e, t) {
|
|
|
1072
1108
|
a = null;
|
|
1073
1109
|
let t = o();
|
|
1074
1110
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1075
|
-
}), i =
|
|
1111
|
+
}), i = xt(e, "keydown", c);
|
|
1076
1112
|
}
|
|
1077
1113
|
function u(e = {}) {
|
|
1078
1114
|
let t = e.restoreFocus !== !1;
|
|
@@ -1087,8 +1123,8 @@ function Xr(e, t) {
|
|
|
1087
1123
|
}
|
|
1088
1124
|
//#endregion
|
|
1089
1125
|
//#region src/composables/useEmoji.ts
|
|
1090
|
-
function
|
|
1091
|
-
let [t, n] =
|
|
1126
|
+
function ui() {
|
|
1127
|
+
let [t, n] = yt(!1), r = e([]), i = !1;
|
|
1092
1128
|
s(() => {
|
|
1093
1129
|
i = !0;
|
|
1094
1130
|
}), f(t, async (e) => {
|
|
@@ -1113,7 +1149,7 @@ function Zr() {
|
|
|
1113
1149
|
}
|
|
1114
1150
|
//#endregion
|
|
1115
1151
|
//#region src/composables/useFonts.ts
|
|
1116
|
-
var
|
|
1152
|
+
var di = [
|
|
1117
1153
|
{
|
|
1118
1154
|
value: "Arial",
|
|
1119
1155
|
label: "Arial"
|
|
@@ -1142,27 +1178,19 @@ var Qr = [
|
|
|
1142
1178
|
value: "Courier New",
|
|
1143
1179
|
label: "Courier New"
|
|
1144
1180
|
}
|
|
1145
|
-
],
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
georgia: "Georgia, serif",
|
|
1149
|
-
"times new roman": "'Times New Roman', serif",
|
|
1150
|
-
verdana: "Verdana, sans-serif",
|
|
1151
|
-
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1152
|
-
"courier new": "'Courier New', monospace"
|
|
1153
|
-
}, ei = "Arial, sans-serif";
|
|
1154
|
-
function ti(e) {
|
|
1155
|
-
if (e === void 0 || e === !0) return [...Qr];
|
|
1181
|
+
], fi = "Arial, sans-serif";
|
|
1182
|
+
function pi(e) {
|
|
1183
|
+
if (e === void 0 || e === !0) return [...di];
|
|
1156
1184
|
if (e === !1) return [];
|
|
1157
1185
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1158
1186
|
for (let i of e) {
|
|
1159
|
-
let e = i.toLowerCase(), a =
|
|
1160
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
1187
|
+
let e = i.toLowerCase(), a = di.find((t) => t.value.toLowerCase() === e);
|
|
1188
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), bn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${di.map((e) => e.value).join(", ")}.`));
|
|
1161
1189
|
}
|
|
1162
1190
|
return t;
|
|
1163
1191
|
}
|
|
1164
|
-
function
|
|
1165
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r =
|
|
1192
|
+
function mi(e) {
|
|
1193
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = pi(e?.builtIns), i = N(() => e?.defaultFallback ?? fi), a = N(() => {
|
|
1166
1194
|
let e = [...r], n = t.value.map((e) => ({
|
|
1167
1195
|
value: e.name,
|
|
1168
1196
|
label: e.name,
|
|
@@ -1173,24 +1201,21 @@ function ni(e) {
|
|
|
1173
1201
|
function o(e) {
|
|
1174
1202
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1175
1203
|
}
|
|
1176
|
-
let c = e?.defaultFont ??
|
|
1177
|
-
o(c) ||
|
|
1204
|
+
let c = e?.defaultFont ?? fi.split(",")[0].trim();
|
|
1205
|
+
o(c) || bn.warn(`config.fonts: new templates seed "${c}", 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.`);
|
|
1178
1206
|
function l() {
|
|
1179
1207
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1180
1208
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1181
1209
|
if (t) return t.value;
|
|
1182
1210
|
}
|
|
1183
|
-
return
|
|
1211
|
+
return fi;
|
|
1184
1212
|
}
|
|
1185
1213
|
let u = N(() => l());
|
|
1186
1214
|
function d(e) {
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
return `'${n.name}', ${e}`;
|
|
1192
|
-
}
|
|
1193
|
-
return $r[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1215
|
+
return Ee(e, {
|
|
1216
|
+
customFonts: t.value,
|
|
1217
|
+
defaultFallback: i.value
|
|
1218
|
+
});
|
|
1194
1219
|
}
|
|
1195
1220
|
let f = [], p = !1;
|
|
1196
1221
|
async function m() {
|
|
@@ -1206,7 +1231,7 @@ function ni(e) {
|
|
|
1206
1231
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1207
1232
|
});
|
|
1208
1233
|
} catch (t) {
|
|
1209
|
-
|
|
1234
|
+
bn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1210
1235
|
}
|
|
1211
1236
|
});
|
|
1212
1237
|
await Promise.allSettled(e), !p && (n.value = !0);
|
|
@@ -1225,18 +1250,18 @@ function ni(e) {
|
|
|
1225
1250
|
isLoaded: n,
|
|
1226
1251
|
loadCustomFonts: m,
|
|
1227
1252
|
cleanupFontLinks: g,
|
|
1228
|
-
|
|
1253
|
+
resolveFontFamily: d,
|
|
1229
1254
|
getDefaultFont: l
|
|
1230
1255
|
};
|
|
1231
1256
|
}
|
|
1232
1257
|
//#endregion
|
|
1233
1258
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1234
|
-
function
|
|
1235
|
-
return
|
|
1259
|
+
function hi(e, t, n) {
|
|
1260
|
+
return xe(e, n) ? {
|
|
1236
1261
|
type: "logicMergeTagNode",
|
|
1237
1262
|
attrs: {
|
|
1238
1263
|
value: e,
|
|
1239
|
-
keyword:
|
|
1264
|
+
keyword: se(e, n)
|
|
1240
1265
|
}
|
|
1241
1266
|
} : {
|
|
1242
1267
|
type: "mergeTagNode",
|
|
@@ -1248,33 +1273,33 @@ function ri(e, t, n) {
|
|
|
1248
1273
|
}
|
|
1249
1274
|
//#endregion
|
|
1250
1275
|
//#region src/utils/insertLogicTag.ts
|
|
1251
|
-
function
|
|
1276
|
+
function gi(e) {
|
|
1252
1277
|
return "before" in e && "after" in e;
|
|
1253
1278
|
}
|
|
1254
|
-
function
|
|
1255
|
-
if (!
|
|
1256
|
-
e.chain().focus().insertContent(
|
|
1279
|
+
function _i(e, t, n) {
|
|
1280
|
+
if (!gi(t)) {
|
|
1281
|
+
e.chain().focus().insertContent(hi(t.value, t.label, n)).run();
|
|
1257
1282
|
return;
|
|
1258
1283
|
}
|
|
1259
|
-
let r =
|
|
1284
|
+
let r = hi(t.before, t.label, n), i = hi(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1260
1285
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1261
1286
|
}
|
|
1262
1287
|
//#endregion
|
|
1263
1288
|
//#region src/utils/linkColorExtension.ts
|
|
1264
|
-
function
|
|
1289
|
+
function vi(e) {
|
|
1265
1290
|
if (!e) return null;
|
|
1266
1291
|
let t = e.trim();
|
|
1267
1292
|
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;
|
|
1268
1293
|
}
|
|
1269
|
-
function
|
|
1294
|
+
function yi(e) {
|
|
1270
1295
|
return e.extend({ addAttributes() {
|
|
1271
1296
|
return {
|
|
1272
1297
|
...this.parent?.(),
|
|
1273
1298
|
color: {
|
|
1274
1299
|
default: null,
|
|
1275
|
-
parseHTML: (e) =>
|
|
1300
|
+
parseHTML: (e) => vi(xn(e.style.color)),
|
|
1276
1301
|
renderHTML: (e) => {
|
|
1277
|
-
let t =
|
|
1302
|
+
let t = vi(e.color);
|
|
1278
1303
|
return t ? { style: `color: ${t}` } : {};
|
|
1279
1304
|
}
|
|
1280
1305
|
}
|
|
@@ -1283,22 +1308,22 @@ function si(e) {
|
|
|
1283
1308
|
}
|
|
1284
1309
|
//#endregion
|
|
1285
1310
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1286
|
-
function
|
|
1311
|
+
function bi(e, t = Ye.liquid) {
|
|
1287
1312
|
let n = _(!1), r = _(""), i = _(""), a = _(null);
|
|
1288
|
-
|
|
1313
|
+
li(a, n);
|
|
1289
1314
|
function o() {
|
|
1290
1315
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1291
1316
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
1292
1317
|
}
|
|
1293
1318
|
function s() {
|
|
1294
1319
|
if (r.value) {
|
|
1295
|
-
let t =
|
|
1320
|
+
let t = d(r.value);
|
|
1296
1321
|
if (t !== null) {
|
|
1297
|
-
let n =
|
|
1322
|
+
let n = vi(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1298
1323
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1299
1324
|
}
|
|
1300
1325
|
}
|
|
1301
|
-
|
|
1326
|
+
p();
|
|
1302
1327
|
}
|
|
1303
1328
|
let c = /* @__PURE__ */ new Set([
|
|
1304
1329
|
"http",
|
|
@@ -1310,25 +1335,27 @@ function ci(e, t = Oe.liquid) {
|
|
|
1310
1335
|
"sms",
|
|
1311
1336
|
"xmpp",
|
|
1312
1337
|
"cid"
|
|
1313
|
-
])
|
|
1314
|
-
function
|
|
1338
|
+
]), l = /^(?:\/|\.{1,2}\/|\?)/;
|
|
1339
|
+
function u(e) {
|
|
1315
1340
|
return RegExp(`^(?:${t.value.source})`).test(e);
|
|
1316
1341
|
}
|
|
1317
|
-
function
|
|
1342
|
+
function d(e) {
|
|
1318
1343
|
let t = e.trim();
|
|
1319
1344
|
if (!t) return null;
|
|
1320
1345
|
if (t.startsWith("#")) return t;
|
|
1346
|
+
if (t.startsWith("//")) return `https:${t}`;
|
|
1347
|
+
if (l.test(t)) return t;
|
|
1321
1348
|
let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
|
|
1322
|
-
return n ? c.has(n[1].toLowerCase()) ? t : null :
|
|
1323
|
-
}
|
|
1324
|
-
function d() {
|
|
1325
|
-
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), f();
|
|
1349
|
+
return n ? c.has(n[1].toLowerCase()) ? t : null : u(t) ? t : `https://${t}`;
|
|
1326
1350
|
}
|
|
1327
1351
|
function f() {
|
|
1352
|
+
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p();
|
|
1353
|
+
}
|
|
1354
|
+
function p() {
|
|
1328
1355
|
n.value = !1, r.value = "", i.value = "";
|
|
1329
1356
|
}
|
|
1330
|
-
function
|
|
1331
|
-
e.key === "Enter" ? (e.preventDefault(), s()) : e.key === "Escape" &&
|
|
1357
|
+
function m(e) {
|
|
1358
|
+
e.key === "Enter" ? (e.preventDefault(), s()) : e.key === "Escape" && p();
|
|
1332
1359
|
}
|
|
1333
1360
|
return {
|
|
1334
1361
|
showLinkDialog: n,
|
|
@@ -1337,21 +1364,21 @@ function ci(e, t = Oe.liquid) {
|
|
|
1337
1364
|
linkDialogRef: a,
|
|
1338
1365
|
openLinkDialog: o,
|
|
1339
1366
|
insertLink: s,
|
|
1340
|
-
removeLink:
|
|
1341
|
-
closeLinkDialog:
|
|
1342
|
-
handleLinkKeydown:
|
|
1367
|
+
removeLink: f,
|
|
1368
|
+
closeLinkDialog: p,
|
|
1369
|
+
handleLinkKeydown: m
|
|
1343
1370
|
};
|
|
1344
1371
|
}
|
|
1345
1372
|
//#endregion
|
|
1346
1373
|
//#region src/composables/useRichTextEditor.ts
|
|
1347
|
-
function
|
|
1348
|
-
let n = p(
|
|
1374
|
+
function xi(t) {
|
|
1375
|
+
let n = p(tn, null), { mergeTags: r, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: l, autocomplete: u } = Fn(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = In(), g = p(qt, null), v = (c(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = le(l), b = e(null), x = () => Ie(n?.content?.value?.settings ?? { locale: "en" });
|
|
1349
1376
|
f(x, (e) => {
|
|
1350
1377
|
let t = b.value?.view.dom;
|
|
1351
1378
|
t && t.setAttribute("dir", e);
|
|
1352
1379
|
});
|
|
1353
|
-
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } =
|
|
1354
|
-
async function
|
|
1380
|
+
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } = bi(b, l), { start: j, stop: M } = _t(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), ee = e(null), N = _(!0), P = _(null), F = !1, te = null;
|
|
1381
|
+
async function I() {
|
|
1355
1382
|
P.value = null, N.value = !0;
|
|
1356
1383
|
try {
|
|
1357
1384
|
let { TiptapEditor: e, EC: i, extensions: a } = await t.loadExtensions({
|
|
@@ -1371,7 +1398,7 @@ function li(t) {
|
|
|
1371
1398
|
editable: !0,
|
|
1372
1399
|
editorProps: { attributes: { dir: x() } },
|
|
1373
1400
|
onUpdate: ({ editor: e }) => {
|
|
1374
|
-
F || n && n.updateBlock(t.blockId(), { content:
|
|
1401
|
+
F || n && (te = e.getHTML(), n.updateBlock(t.blockId(), { content: te }));
|
|
1375
1402
|
}
|
|
1376
1403
|
});
|
|
1377
1404
|
if (F) {
|
|
@@ -1381,17 +1408,17 @@ function li(t) {
|
|
|
1381
1408
|
b.value = s, N.value = !1, j();
|
|
1382
1409
|
} catch (e) {
|
|
1383
1410
|
if (F) return;
|
|
1384
|
-
|
|
1411
|
+
bn.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), P.value = e instanceof Error ? e.message : "Failed to load editor", N.value = !1;
|
|
1385
1412
|
}
|
|
1386
1413
|
}
|
|
1387
|
-
function
|
|
1388
|
-
b.value?.destroy(), b.value = null,
|
|
1414
|
+
function ne() {
|
|
1415
|
+
b.value?.destroy(), b.value = null, I();
|
|
1389
1416
|
}
|
|
1390
|
-
|
|
1391
|
-
let
|
|
1392
|
-
b.value && b.value.getHTML() !== e && b.value.commands.setContent(e, { emitUpdate: !1 });
|
|
1417
|
+
I();
|
|
1418
|
+
let re = f(() => t.blockContent(), (e) => {
|
|
1419
|
+
b.value && e !== te && (te = e, b.value.getHTML() !== e && b.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
1393
1420
|
});
|
|
1394
|
-
function
|
|
1421
|
+
function ie(e) {
|
|
1395
1422
|
if (o.value || m.value) return;
|
|
1396
1423
|
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
1397
1424
|
if (!r) return;
|
|
@@ -1399,26 +1426,26 @@ function li(t) {
|
|
|
1399
1426
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1400
1427
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
1401
1428
|
}
|
|
1402
|
-
|
|
1403
|
-
F = !0,
|
|
1429
|
+
xt(document, "mousedown", ie), i(() => {
|
|
1430
|
+
F = !0, re(), M(), b.value?.destroy();
|
|
1404
1431
|
});
|
|
1405
|
-
async function
|
|
1432
|
+
async function ae() {
|
|
1406
1433
|
let e = await s();
|
|
1407
1434
|
F || (e && b.value ? b.value.chain().focus().insertMergeTag({
|
|
1408
1435
|
label: e.label,
|
|
1409
1436
|
value: e.value
|
|
1410
1437
|
}).run() : b.value?.commands.focus());
|
|
1411
1438
|
}
|
|
1412
|
-
async function
|
|
1439
|
+
async function oe() {
|
|
1413
1440
|
let e = await h();
|
|
1414
|
-
F || (e && b.value ?
|
|
1441
|
+
F || (e && b.value ? _i(b.value, e, l) : b.value?.commands.focus());
|
|
1415
1442
|
}
|
|
1416
1443
|
return {
|
|
1417
1444
|
editor: b,
|
|
1418
1445
|
EditorContent: ee,
|
|
1419
1446
|
isLoading: N,
|
|
1420
1447
|
initError: P,
|
|
1421
|
-
retry:
|
|
1448
|
+
retry: ne,
|
|
1422
1449
|
showLinkDialog: S,
|
|
1423
1450
|
linkUrl: C,
|
|
1424
1451
|
linkColor: w,
|
|
@@ -1434,15 +1461,15 @@ function li(t) {
|
|
|
1434
1461
|
removeLink: O,
|
|
1435
1462
|
closeLinkDialog: k,
|
|
1436
1463
|
handleLinkKeydown: A,
|
|
1437
|
-
handleAddMergeTag:
|
|
1438
|
-
handleAddLogicTag:
|
|
1464
|
+
handleAddMergeTag: ae,
|
|
1465
|
+
handleAddLogicTag: oe
|
|
1439
1466
|
};
|
|
1440
1467
|
}
|
|
1441
1468
|
//#endregion
|
|
1442
1469
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1443
|
-
var
|
|
1444
|
-
function
|
|
1445
|
-
let t =
|
|
1470
|
+
var Si = "(max-width: 767px)";
|
|
1471
|
+
function Ci(e) {
|
|
1472
|
+
let t = St(Si);
|
|
1446
1473
|
return {
|
|
1447
1474
|
isSmallScreen: t,
|
|
1448
1475
|
showNotice: N(() => (ee(e) ?? !0) && t.value)
|
|
@@ -1450,20 +1477,20 @@ function di(e) {
|
|
|
1450
1477
|
}
|
|
1451
1478
|
//#endregion
|
|
1452
1479
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1453
|
-
var
|
|
1480
|
+
var wi = { class: "tpl:w-full" }, Ti = {
|
|
1454
1481
|
key: 0,
|
|
1455
|
-
class: "tpl:flex 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)]"
|
|
1456
|
-
},
|
|
1482
|
+
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)]"
|
|
1483
|
+
}, Ei = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Di = {
|
|
1457
1484
|
key: 1,
|
|
1458
|
-
class: "tpl:flex 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)]"
|
|
1459
|
-
},
|
|
1485
|
+
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)]"
|
|
1486
|
+
}, Oi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ki = {
|
|
1460
1487
|
key: 2,
|
|
1461
1488
|
class: "tpl:relative"
|
|
1462
|
-
},
|
|
1489
|
+
}, Ai = ["innerHTML"], ji = {
|
|
1463
1490
|
key: 0,
|
|
1464
1491
|
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]",
|
|
1465
1492
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1466
|
-
},
|
|
1493
|
+
}, Mi = /* @__PURE__ */ F({
|
|
1467
1494
|
__name: "CustomBlock",
|
|
1468
1495
|
props: {
|
|
1469
1496
|
block: {},
|
|
@@ -1471,7 +1498,7 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1471
1498
|
},
|
|
1472
1499
|
emits: ["fetchData"],
|
|
1473
1500
|
setup(e, { emit: n }) {
|
|
1474
|
-
let r = e, i = n, { t: a } =
|
|
1501
|
+
let r = e, i = n, { t: a } = yn(), o = p(pn, null), s = _(""), c = _(!1), l = N(() => o?.getDefinition(r.block.customType)), u = N(() => !!l.value), m = N(() => r.block), { isFetching: h, fetch: g, needsFetch: v, hasDataSource: b } = et({
|
|
1475
1502
|
definition: l,
|
|
1476
1503
|
block: m,
|
|
1477
1504
|
onUpdate: (e, t) => {
|
|
@@ -1480,10 +1507,10 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1480
1507
|
dataSourceFetched: t
|
|
1481
1508
|
});
|
|
1482
1509
|
}
|
|
1483
|
-
}), T = p(
|
|
1510
|
+
}), T = p(zt, At), E = p(Vt, null), O = N(() => {
|
|
1484
1511
|
if (!E?.value) return r.block;
|
|
1485
1512
|
let e = {};
|
|
1486
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1513
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? Be(n, T.value) : n;
|
|
1487
1514
|
return {
|
|
1488
1515
|
...r.block,
|
|
1489
1516
|
fieldValues: e
|
|
@@ -1500,17 +1527,17 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1500
1527
|
}
|
|
1501
1528
|
}
|
|
1502
1529
|
}
|
|
1503
|
-
let j =
|
|
1530
|
+
let j = vt(k, 150);
|
|
1504
1531
|
return d(() => {
|
|
1505
1532
|
k();
|
|
1506
1533
|
}), f(() => r.block.fieldValues, () => {
|
|
1507
1534
|
j();
|
|
1508
1535
|
}, { deep: !0 }), f(() => E?.value, () => {
|
|
1509
1536
|
j();
|
|
1510
|
-
}), (e, n) => (t(), S("div",
|
|
1537
|
+
}), (e, n) => (t(), S("div", wi, [u.value ? c.value ? (t(), S("div", Di, [C(y(jn), {
|
|
1511
1538
|
size: 24,
|
|
1512
1539
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1513
|
-
}), x("span",
|
|
1540
|
+
}), x("span", Oi, D(y(a).customBlocks.renderError), 1)])) : (t(), S("div", ki, [x("div", { innerHTML: s.value }, null, 8, Ai), y(b) && y(v) ? (t(), S("div", ji, [y(h) ? (t(), A(Mn, {
|
|
1514
1541
|
key: 1,
|
|
1515
1542
|
class: "tpl:w-48"
|
|
1516
1543
|
})) : (t(), S("button", {
|
|
@@ -1518,16 +1545,16 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1518
1545
|
type: "button",
|
|
1519
1546
|
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)]",
|
|
1520
1547
|
onClick: n[0] ||= I((...e) => y(g) && y(g)(...e), ["stop"])
|
|
1521
|
-
}, [l.value?.icon ? (t(), A(
|
|
1548
|
+
}, [l.value?.icon ? (t(), A(si, {
|
|
1522
1549
|
key: 0,
|
|
1523
1550
|
icon: l.value.icon,
|
|
1524
1551
|
size: 16
|
|
1525
|
-
}, null, 8, ["icon"])) : P("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : P("", !0)])) : (t(), S("div",
|
|
1552
|
+
}, null, 8, ["icon"])) : P("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : P("", !0)])) : (t(), S("div", Ti, [C(y(ri), {
|
|
1526
1553
|
size: 24,
|
|
1527
1554
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1528
|
-
}), x("span",
|
|
1555
|
+
}), x("span", Ei, D(y(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1529
1556
|
}
|
|
1530
|
-
}),
|
|
1557
|
+
}), Ni = { class: "tpl:w-full" }, Pi = /* @__PURE__ */ F({
|
|
1531
1558
|
__name: "DividerBlock",
|
|
1532
1559
|
props: {
|
|
1533
1560
|
block: {},
|
|
@@ -1539,28 +1566,28 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1539
1566
|
width: r.block.width === "full" ? "100%" : typeof r.block.width == "number" ? `${r.block.width}px` : r.block.width,
|
|
1540
1567
|
margin: r.block.width === "full" ? "0" : "0 auto"
|
|
1541
1568
|
}));
|
|
1542
|
-
return (e, r) => (t(), S("div",
|
|
1569
|
+
return (e, r) => (t(), S("div", Ni, [x("hr", {
|
|
1543
1570
|
class: "tpl:m-0 tpl:border-none",
|
|
1544
1571
|
style: n(i.value)
|
|
1545
1572
|
}, null, 4)]));
|
|
1546
1573
|
}
|
|
1547
|
-
}),
|
|
1574
|
+
}), Fi = { class: "tpl:w-full" }, Ii = ["srcdoc", "title"], Li = {
|
|
1548
1575
|
key: 1,
|
|
1549
|
-
class: "tpl:flex 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)]"
|
|
1550
|
-
},
|
|
1576
|
+
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)]"
|
|
1577
|
+
}, Ri = {
|
|
1551
1578
|
key: 0,
|
|
1552
1579
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1553
|
-
},
|
|
1580
|
+
}, zi = {
|
|
1554
1581
|
key: 1,
|
|
1555
1582
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1556
|
-
},
|
|
1583
|
+
}, Bi = /* @__PURE__ */ F({
|
|
1557
1584
|
__name: "HtmlBlock",
|
|
1558
1585
|
props: {
|
|
1559
1586
|
block: {},
|
|
1560
1587
|
viewport: {}
|
|
1561
1588
|
},
|
|
1562
1589
|
setup(e) {
|
|
1563
|
-
let r = e, { t: a } =
|
|
1590
|
+
let r = e, { t: a } = yn(), o = p(Zt, !1), s = N(() => r.block.content.trim().length > 0), c = N(() => o && s.value), l = p(zt, At), u = p(Vt, null), d = N(() => u?.value ? Be(r.block.content, l.value) : r.block.content), m = _(null), h = _(60), g = null;
|
|
1564
1591
|
function v() {
|
|
1565
1592
|
let e = m.value?.contentDocument;
|
|
1566
1593
|
e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1574,7 +1601,7 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1574
1601
|
e || (g?.disconnect(), g = null);
|
|
1575
1602
|
}), i(() => {
|
|
1576
1603
|
g?.disconnect(), g = null;
|
|
1577
|
-
}), (e, r) => (t(), S("div",
|
|
1604
|
+
}), (e, r) => (t(), S("div", Fi, [c.value ? (t(), S("iframe", {
|
|
1578
1605
|
key: 0,
|
|
1579
1606
|
ref_key: "iframeRef",
|
|
1580
1607
|
ref: m,
|
|
@@ -1584,22 +1611,18 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1584
1611
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1585
1612
|
style: n({ height: `${h.value}px` }),
|
|
1586
1613
|
onLoad: b
|
|
1587
|
-
}, null, 44,
|
|
1614
|
+
}, null, 44, Ii)) : (t(), S("div", Li, [C(y(pt), {
|
|
1588
1615
|
size: 24,
|
|
1589
1616
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1590
|
-
}), s.value ? (t(), S("span",
|
|
1617
|
+
}), s.value ? (t(), S("span", Ri, D(y(a).html.preview), 1)) : (t(), S("span", zi, D(y(a).html.empty), 1))]))]));
|
|
1591
1618
|
}
|
|
1592
|
-
}),
|
|
1593
|
-
key: 0,
|
|
1594
|
-
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1595
|
-
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1596
|
-
}, ji = ["href"], Mi = ["src", "alt"], Ni = ["src", "alt"], Pi = {
|
|
1619
|
+
}), Vi = ["data-drop-enabled"], Hi = ["href"], Ui = ["src", "alt"], Wi = ["src", "alt"], Gi = {
|
|
1597
1620
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1598
1621
|
style: { opacity: "0.7" }
|
|
1599
|
-
},
|
|
1622
|
+
}, Ki = ["href"], qi = ["src", "alt"], Ji = ["src", "alt"], Yi = {
|
|
1600
1623
|
key: 4,
|
|
1601
|
-
class: "tpl:flex 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)]"
|
|
1602
|
-
},
|
|
1624
|
+
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)]"
|
|
1625
|
+
}, Xi = ["aria-label"], Zi = { key: 1 }, Qi = /* @__PURE__ */ F({
|
|
1603
1626
|
__name: "ImageBlock",
|
|
1604
1627
|
props: {
|
|
1605
1628
|
block: {},
|
|
@@ -1607,68 +1630,43 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1607
1630
|
},
|
|
1608
1631
|
emits: ["update"],
|
|
1609
1632
|
setup(e, { emit: r }) {
|
|
1610
|
-
let i = e, a = r, { t: o } =
|
|
1611
|
-
|
|
1612
|
-
let
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
h.value = !0;
|
|
1622
|
-
try {
|
|
1623
|
-
let t = await c({
|
|
1624
|
-
accept: ["images"],
|
|
1625
|
-
files: e
|
|
1626
|
-
});
|
|
1627
|
-
if (!d.alive) return;
|
|
1628
|
-
if (t) {
|
|
1629
|
-
let e = { src: t.url };
|
|
1630
|
-
t.alt && (e.alt = t.alt), a("update", e);
|
|
1631
|
-
}
|
|
1632
|
-
} finally {
|
|
1633
|
-
d.alive && (h.value = !1);
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
let { isOver: b } = nt({
|
|
1638
|
-
target: m,
|
|
1639
|
-
enabled: g,
|
|
1640
|
-
onFiles: v
|
|
1641
|
-
}), T = N(() => ({ textAlign: i.block.align })), E = N(() => {
|
|
1642
|
-
let e = i.block.border, t = ["left", "right"].map((t) => Ee(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1633
|
+
let i = e, a = r, { t: o } = yn(), { syntax: s } = Fn(), c = N(() => Ce(i.block.src, s));
|
|
1634
|
+
function l(e) {
|
|
1635
|
+
let t = { src: e.url };
|
|
1636
|
+
e.alt && (t.alt = e.alt), a("update", t);
|
|
1637
|
+
}
|
|
1638
|
+
let u = _(), { canBrowse: d, dropEnabled: f, isUploading: p, showOverlay: m, openMediaBrowser: h } = st({
|
|
1639
|
+
target: u,
|
|
1640
|
+
blocked: c,
|
|
1641
|
+
apply: l
|
|
1642
|
+
}), g = N(() => ({ textAlign: i.block.align })), v = N(() => {
|
|
1643
|
+
let e = i.block.border, t = ["left", "right"].map((t) => Fe(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1643
1644
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1644
|
-
}),
|
|
1645
|
+
}), b = N(() => {
|
|
1645
1646
|
let e = i.block.align;
|
|
1646
1647
|
return {
|
|
1647
1648
|
maxWidth: "100%",
|
|
1648
|
-
width: i.block.width === "full" ?
|
|
1649
|
+
width: i.block.width === "full" ? v.value : `${i.block.width}px`,
|
|
1649
1650
|
height: i.block.height ? `${i.block.height}px` : void 0,
|
|
1650
|
-
borderRadius:
|
|
1651
|
-
...
|
|
1651
|
+
borderRadius: we(i.block.borderRadius) ?? void 0,
|
|
1652
|
+
...Gr(i.block.border),
|
|
1652
1653
|
display: "block",
|
|
1653
1654
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1654
1655
|
marginRight: e === "center" ? "auto" : void 0
|
|
1655
1656
|
};
|
|
1656
|
-
}),
|
|
1657
|
+
}), T = Wn(() => c.value ? void 0 : i.block.src), E = Wn(() => c.value ? i.block.placeholderUrl : void 0);
|
|
1657
1658
|
return (r, i) => (t(), S("div", {
|
|
1658
1659
|
ref_key: "dropZoneRef",
|
|
1659
|
-
ref:
|
|
1660
|
+
ref: u,
|
|
1660
1661
|
"data-testid": "image-drop-zone",
|
|
1661
|
-
"data-drop-enabled":
|
|
1662
|
+
"data-drop-enabled": y(f),
|
|
1662
1663
|
class: "tpl:relative tpl:w-full",
|
|
1663
|
-
style: n(
|
|
1664
|
-
}, [
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
"
|
|
1668
|
-
}
|
|
1669
|
-
size: 20,
|
|
1670
|
-
"stroke-width": 1.5
|
|
1671
|
-
}), w(" " + D(y(o).image.dropToUpload), 1)], 64))])) : P("", !0), e.block.src && k.value && e.block.placeholderUrl ? (t(), S(M, { key: 1 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1664
|
+
style: n(g.value)
|
|
1665
|
+
}, [y(m) ? (t(), A(rt, {
|
|
1666
|
+
key: 0,
|
|
1667
|
+
uploading: y(p),
|
|
1668
|
+
size: "canvas"
|
|
1669
|
+
}, null, 8, ["uploading"])) : P("", !0), e.block.src && c.value && e.block.placeholderUrl ? (t(), S(M, { key: 1 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1672
1670
|
key: 0,
|
|
1673
1671
|
href: e.block.linkUrl,
|
|
1674
1672
|
target: "_blank",
|
|
@@ -1677,25 +1675,25 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1677
1675
|
}, [x("img", {
|
|
1678
1676
|
class: "tpl:border-0",
|
|
1679
1677
|
loading: "lazy",
|
|
1680
|
-
src: y(
|
|
1678
|
+
src: y(E),
|
|
1681
1679
|
alt: e.block.alt || y(o).image.altTextPlaceholder,
|
|
1682
|
-
style: n(
|
|
1683
|
-
}, null, 12,
|
|
1680
|
+
style: n(b.value)
|
|
1681
|
+
}, null, 12, Ui)], 8, Hi)) : (t(), S("img", {
|
|
1684
1682
|
key: 1,
|
|
1685
1683
|
class: "tpl:border-0",
|
|
1686
|
-
src: y(
|
|
1684
|
+
src: y(E),
|
|
1687
1685
|
alt: e.block.alt,
|
|
1688
|
-
style: n(
|
|
1689
|
-
}, null, 12,
|
|
1686
|
+
style: n(b.value)
|
|
1687
|
+
}, null, 12, Wi))], 64)) : e.block.src && c.value ? (t(), S("div", {
|
|
1690
1688
|
key: 2,
|
|
1691
|
-
class: "tpl:!flex 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)]",
|
|
1692
|
-
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" },
|
|
1693
|
-
}, [C(y(
|
|
1689
|
+
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)]",
|
|
1690
|
+
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, b.value])
|
|
1691
|
+
}, [C(y(ct), {
|
|
1694
1692
|
size: 32,
|
|
1695
1693
|
"stroke-width": 1.5,
|
|
1696
1694
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1697
1695
|
style: { opacity: "0.5" }
|
|
1698
|
-
}), x("span",
|
|
1696
|
+
}), x("span", Gi, [C(Yr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (t(), S(M, { key: 3 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1699
1697
|
key: 0,
|
|
1700
1698
|
href: e.block.linkUrl,
|
|
1701
1699
|
target: "_blank",
|
|
@@ -1704,68 +1702,68 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1704
1702
|
}, [x("img", {
|
|
1705
1703
|
class: "tpl:border-0",
|
|
1706
1704
|
loading: "lazy",
|
|
1707
|
-
src: y(
|
|
1705
|
+
src: y(T),
|
|
1708
1706
|
alt: e.block.alt || y(o).image.altTextPlaceholder,
|
|
1709
|
-
style: n(
|
|
1710
|
-
}, null, 12,
|
|
1707
|
+
style: n(b.value)
|
|
1708
|
+
}, null, 12, qi)], 8, Ki)) : (t(), S("img", {
|
|
1711
1709
|
key: 1,
|
|
1712
1710
|
class: "tpl:border-0",
|
|
1713
|
-
src: y(
|
|
1711
|
+
src: y(T),
|
|
1714
1712
|
alt: e.block.alt,
|
|
1715
|
-
style: n(
|
|
1716
|
-
}, null, 12,
|
|
1713
|
+
style: n(b.value)
|
|
1714
|
+
}, null, 12, Ji))], 64)) : (t(), S("div", Yi, [y(d) ? (t(), S("button", {
|
|
1717
1715
|
key: 0,
|
|
1718
1716
|
"aria-label": y(o).image.browseMedia,
|
|
1719
1717
|
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)]",
|
|
1720
|
-
onClick: I(
|
|
1721
|
-
}, [C(y(
|
|
1718
|
+
onClick: i[2] ||= I((...e) => y(h) && y(h)(...e), ["stop"])
|
|
1719
|
+
}, [C(y(ct), {
|
|
1722
1720
|
size: 14,
|
|
1723
1721
|
"stroke-width": 1.5
|
|
1724
|
-
}), w(" " + D(y(o).image.browseMedia), 1)], 8,
|
|
1722
|
+
}), w(" " + D(y(o).image.browseMedia), 1)], 8, Xi)) : (t(), S("span", Zi, D(y(o).image.clickToAdd), 1))]))], 12, Vi));
|
|
1725
1723
|
}
|
|
1726
|
-
}),
|
|
1724
|
+
}), $i = { class: "tpl:w-full" }, ea = ["href"], ta = {
|
|
1727
1725
|
key: 1,
|
|
1728
1726
|
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)]"
|
|
1729
|
-
},
|
|
1727
|
+
}, na = /* @__PURE__ */ F({
|
|
1730
1728
|
__name: "MenuBlock",
|
|
1731
1729
|
props: {
|
|
1732
1730
|
block: {},
|
|
1733
1731
|
viewport: {}
|
|
1734
1732
|
},
|
|
1735
1733
|
setup(e) {
|
|
1736
|
-
let r = e, { t: i } =
|
|
1734
|
+
let r = e, { t: i } = yn(), a = wt(mn, "MenuBlock"), o = N(() => ({
|
|
1737
1735
|
display: "flex",
|
|
1738
1736
|
flexWrap: "wrap",
|
|
1739
1737
|
gap: `0 ${r.block.spacing}px`,
|
|
1740
1738
|
justifyContent: r.block.textAlign === "left" ? "flex-start" : r.block.textAlign === "right" ? "flex-end" : "center",
|
|
1741
1739
|
fontSize: `${r.block.fontSize}px`,
|
|
1742
|
-
fontFamily: r.block.fontFamily
|
|
1740
|
+
fontFamily: r.block.fontFamily ? a.resolveFontFamily(r.block.fontFamily) : "inherit",
|
|
1743
1741
|
alignItems: "center"
|
|
1744
|
-
})),
|
|
1745
|
-
function
|
|
1742
|
+
})), s = N(() => r.block.items.length > 0);
|
|
1743
|
+
function c(e) {
|
|
1746
1744
|
return e || r.block.linkColor || r.block.color;
|
|
1747
1745
|
}
|
|
1748
|
-
return (r,
|
|
1746
|
+
return (r, a) => (t(), S("div", $i, [s.value ? (t(), S("div", {
|
|
1749
1747
|
key: 0,
|
|
1750
|
-
style: n(
|
|
1748
|
+
style: n(o.value)
|
|
1751
1749
|
}, [(t(!0), S(M, null, l(e.block.items, (r, i) => (t(), S(M, { key: r.id }, [x("a", {
|
|
1752
1750
|
href: r.url || "#",
|
|
1753
1751
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1754
1752
|
style: n({
|
|
1755
|
-
color:
|
|
1753
|
+
color: c(r.color),
|
|
1756
1754
|
fontWeight: r.bold ? "bold" : "normal",
|
|
1757
1755
|
textDecoration: r.underline ? "underline" : "none"
|
|
1758
1756
|
}),
|
|
1759
|
-
onClick:
|
|
1760
|
-
}, [C(
|
|
1757
|
+
onClick: a[0] ||= I(() => {}, ["prevent"])
|
|
1758
|
+
}, [C(Yr, { text: r.text || "..." }, null, 8, ["text"])], 12, ea), i < e.block.items.length - 1 ? (t(), S("span", {
|
|
1761
1759
|
key: 0,
|
|
1762
1760
|
style: n({
|
|
1763
1761
|
color: e.block.separatorColor,
|
|
1764
1762
|
padding: `0 ${e.block.spacing}px`
|
|
1765
1763
|
})
|
|
1766
|
-
}, D(e.block.separator), 5)) : P("", !0)], 64))), 128))], 4)) : (t(), S("div",
|
|
1764
|
+
}, D(e.block.separator), 5)) : P("", !0)], 64))), 128))], 4)) : (t(), S("div", ta, [C(y(it), { size: 16 }), x("span", null, D(y(i).menu.addLinks), 1)]))]));
|
|
1767
1765
|
}
|
|
1768
|
-
}),
|
|
1766
|
+
}), ra = /* @__PURE__ */ new Set([
|
|
1769
1767
|
"http",
|
|
1770
1768
|
"https",
|
|
1771
1769
|
"mailto",
|
|
@@ -1775,7 +1773,7 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1775
1773
|
"sms",
|
|
1776
1774
|
"xmpp",
|
|
1777
1775
|
"cid"
|
|
1778
|
-
]),
|
|
1776
|
+
]), ia = /* @__PURE__ */ new Set([
|
|
1779
1777
|
"SCRIPT",
|
|
1780
1778
|
"STYLE",
|
|
1781
1779
|
"IFRAME",
|
|
@@ -1785,7 +1783,7 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1785
1783
|
"META",
|
|
1786
1784
|
"BASE",
|
|
1787
1785
|
"FORM"
|
|
1788
|
-
]),
|
|
1786
|
+
]), aa = /* @__PURE__ */ new Set([
|
|
1789
1787
|
"href",
|
|
1790
1788
|
"xlink:href",
|
|
1791
1789
|
"formaction",
|
|
@@ -1794,16 +1792,16 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1794
1792
|
"background",
|
|
1795
1793
|
"poster"
|
|
1796
1794
|
]);
|
|
1797
|
-
function
|
|
1795
|
+
function oa(e, t) {
|
|
1798
1796
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1799
1797
|
if (!n || n.startsWith("#")) return !0;
|
|
1800
1798
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1801
1799
|
if (!r) return !0;
|
|
1802
1800
|
let i = r[1].toLowerCase();
|
|
1803
|
-
return
|
|
1801
|
+
return ra.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1804
1802
|
}
|
|
1805
|
-
function
|
|
1806
|
-
if (
|
|
1803
|
+
function sa(e) {
|
|
1804
|
+
if (ia.has(e.tagName)) {
|
|
1807
1805
|
e.remove();
|
|
1808
1806
|
return;
|
|
1809
1807
|
}
|
|
@@ -1811,21 +1809,21 @@ function Xi(e) {
|
|
|
1811
1809
|
for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
|
|
1812
1810
|
for (let n of t) {
|
|
1813
1811
|
let t = n.toLowerCase();
|
|
1814
|
-
t.startsWith("on") ? e.removeAttribute(n) :
|
|
1812
|
+
t.startsWith("on") ? e.removeAttribute(n) : aa.has(t) ? oa(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n) : t === "src" ? oa(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n) : t === "srcdoc" && e.removeAttribute(n);
|
|
1815
1813
|
}
|
|
1816
1814
|
let n = Array.from(e.children);
|
|
1817
|
-
for (let e of n)
|
|
1815
|
+
for (let e of n) sa(e);
|
|
1818
1816
|
}
|
|
1819
|
-
function
|
|
1817
|
+
function ca(e) {
|
|
1820
1818
|
if (typeof DOMParser > "u") return e;
|
|
1821
1819
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1822
|
-
for (let e of n)
|
|
1820
|
+
for (let e of n) sa(e);
|
|
1823
1821
|
return t.innerHTML;
|
|
1824
1822
|
}
|
|
1825
1823
|
//#endregion
|
|
1826
1824
|
//#region src/composables/useEditableTextBlock.ts
|
|
1827
|
-
function
|
|
1828
|
-
let t = p(
|
|
1825
|
+
function la(e) {
|
|
1826
|
+
let t = p(zt, At), n = p(Vt, null), { syntax: r } = Fn(), i = N(() => n?.value ? We(e(), t.value) : Je(e(), t.value)), a = N(() => $e(ca(He(i.value, r)))), o = _(!1), s = _(null), { top: c, left: l } = Ct(s), { toLocal: u } = wn(), d = N(() => u({
|
|
1829
1827
|
top: c.value - 8,
|
|
1830
1828
|
left: l.value
|
|
1831
1829
|
}));
|
|
@@ -1846,14 +1844,14 @@ function Qi(e) {
|
|
|
1846
1844
|
}
|
|
1847
1845
|
//#endregion
|
|
1848
1846
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1849
|
-
var
|
|
1847
|
+
var ua = ["innerHTML"], da = /* @__PURE__ */ F({
|
|
1850
1848
|
__name: "ParagraphBlock",
|
|
1851
1849
|
props: {
|
|
1852
1850
|
block: {},
|
|
1853
1851
|
viewport: {}
|
|
1854
1852
|
},
|
|
1855
1853
|
setup(e) {
|
|
1856
|
-
let n = e, r = v(() => import("./ParagraphEditor-
|
|
1854
|
+
let n = e, r = v(() => import("./ParagraphEditor-CcEN1N6n.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = la(() => n.block.content);
|
|
1857
1855
|
return (n, u) => (t(), S("div", {
|
|
1858
1856
|
ref_key: "blockRef",
|
|
1859
1857
|
ref: a,
|
|
@@ -1872,26 +1870,26 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1872
1870
|
key: 1,
|
|
1873
1871
|
class: "tpl-text-content tpl:outline-none",
|
|
1874
1872
|
innerHTML: y(s)
|
|
1875
|
-
}, null, 8,
|
|
1873
|
+
}, null, 8, ua))], 544));
|
|
1876
1874
|
}
|
|
1877
|
-
}),
|
|
1875
|
+
}), fa = [
|
|
1878
1876
|
"data-block-id",
|
|
1879
1877
|
"data-block-type",
|
|
1880
1878
|
"data-tpl-picked"
|
|
1881
|
-
],
|
|
1879
|
+
], pa = ["aria-label"], ma = [
|
|
1882
1880
|
"aria-label",
|
|
1883
1881
|
"aria-pressed",
|
|
1884
1882
|
"title"
|
|
1885
|
-
],
|
|
1883
|
+
], ha = ["aria-label", "title"], ga = ["aria-label", "title"], _a = ["aria-label", "title"], va = {
|
|
1886
1884
|
key: 1,
|
|
1887
1885
|
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"
|
|
1888
|
-
},
|
|
1886
|
+
}, ya = { 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)]" }, ba = {
|
|
1889
1887
|
key: 2,
|
|
1890
1888
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1891
|
-
},
|
|
1889
|
+
}, xa = ["aria-label", "title"], Sa = {
|
|
1892
1890
|
key: 3,
|
|
1893
1891
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1894
|
-
},
|
|
1892
|
+
}, Ca = ["aria-label"], wa = /*#__PURE__*/ Nn(/* @__PURE__ */ F({
|
|
1895
1893
|
__name: "BlockWrapper",
|
|
1896
1894
|
props: {
|
|
1897
1895
|
block: {},
|
|
@@ -1903,7 +1901,7 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1903
1901
|
},
|
|
1904
1902
|
emits: ["select"],
|
|
1905
1903
|
setup(e, { emit: r }) {
|
|
1906
|
-
let i = v(() => import("./BlockIssueBadge-
|
|
1904
|
+
let i = v(() => import("./BlockIssueBadge-AgO5abEB.js")), o = e, s = r, { t: c, format: l } = yn(), d = p(Ut, null), f = _(null), m = N(() => d?.liftedBlockId.value === o.block.id), h = N(() => m.value ? l(c.blockActions.dragLifted, { block: o.block.type }) : c.blockActions.drag);
|
|
1907
1905
|
async function g() {
|
|
1908
1906
|
await a(), f.value?.focus();
|
|
1909
1907
|
}
|
|
@@ -1913,20 +1911,20 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1913
1911
|
let T = N(() => !o.viewport || !o.block.visibility ? !1 : o.block.visibility[o.viewport] === !1), E = N(() => o.previewMode === !0 && T.value), O = N(() => o.viewport ? {
|
|
1914
1912
|
desktop: c.viewport.desktop,
|
|
1915
1913
|
mobile: c.viewport.mobile
|
|
1916
|
-
}[o.viewport] ?? o.viewport : ""), A = N(() => !!o.block.displayCondition), j = p(
|
|
1917
|
-
function
|
|
1914
|
+
}[o.viewport] ?? o.viewport : ""), A = N(() => !!o.block.displayCondition), j = p(Xt, null), M = p(en, null), ee = p(on, {}), F = N(() => ee.savedBlocks?.isPicking.value === !0), te = N(() => !o.nested && ee.savedBlocks?.isAvailable.value === !0 && ee.savedBlocks?.canCreate.value === !0), ne = N(() => o.isSelected && !F.value), re = N(() => ee.comments?.getBlockCount(o.block.id) ?? 0), ie = Jn(() => o.block.type === "section" ? o.block.backgroundImage : void 0), ae = Jn(() => o.block.type === "section" ? o.block.wrapper?.backgroundImage : void 0), oe = N(() => Ur(o.block, { backgroundImageUrl: ie.value })), se = N(() => Kr(o.block, { backgroundImageUrl: ae.value }));
|
|
1915
|
+
function ce(e) {
|
|
1918
1916
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
1919
1917
|
}
|
|
1920
|
-
function
|
|
1918
|
+
function le() {
|
|
1921
1919
|
j?.deleteBlock(o.block.id);
|
|
1922
1920
|
}
|
|
1923
|
-
function
|
|
1921
|
+
function ue() {
|
|
1924
1922
|
j?.duplicateBlock(o.block);
|
|
1925
1923
|
}
|
|
1926
|
-
function
|
|
1924
|
+
function de() {
|
|
1927
1925
|
ee.savedBlocks?.startPicking(o.block.id);
|
|
1928
1926
|
}
|
|
1929
|
-
function
|
|
1927
|
+
function fe() {
|
|
1930
1928
|
M?.toggleBlock(o.block.id);
|
|
1931
1929
|
}
|
|
1932
1930
|
return (r, a) => E.value ? P("", !0) : (t(), S("div", {
|
|
@@ -1940,7 +1938,7 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1940
1938
|
"data-block-id": e.block.id,
|
|
1941
1939
|
"data-block-type": e.block.type,
|
|
1942
1940
|
"data-tpl-picked": e.picked || void 0,
|
|
1943
|
-
onClick:
|
|
1941
|
+
onClick: ce
|
|
1944
1942
|
}, [
|
|
1945
1943
|
C(y(i), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1946
1944
|
ne.value ? (t(), S("div", {
|
|
@@ -1958,205 +1956,206 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1958
1956
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1959
1957
|
title: y(c).blockActions.drag,
|
|
1960
1958
|
onKeydown: b
|
|
1961
|
-
}, [C(y(
|
|
1959
|
+
}, [C(y(ni), {
|
|
1962
1960
|
size: 14,
|
|
1963
1961
|
"stroke-width": 1.5
|
|
1964
|
-
})], 40,
|
|
1962
|
+
})], 40, ma),
|
|
1965
1963
|
x("button", {
|
|
1966
1964
|
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",
|
|
1967
1965
|
"aria-label": y(c).blockActions.duplicate,
|
|
1968
1966
|
title: y(c).blockActions.duplicate,
|
|
1969
|
-
onClick: I(
|
|
1970
|
-
}, [C(y(
|
|
1967
|
+
onClick: I(ue, ["stop"])
|
|
1968
|
+
}, [C(y(On), {
|
|
1971
1969
|
size: 14,
|
|
1972
1970
|
"stroke-width": 1.5
|
|
1973
|
-
})], 8,
|
|
1971
|
+
})], 8, ha),
|
|
1974
1972
|
te.value ? (t(), S("button", {
|
|
1975
1973
|
key: 0,
|
|
1976
1974
|
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",
|
|
1977
1975
|
"aria-label": y(c).blockActions.saveAsBlock,
|
|
1978
1976
|
title: y(c).blockActions.saveAsBlock,
|
|
1979
|
-
onClick: I(
|
|
1980
|
-
}, [C(y(
|
|
1977
|
+
onClick: I(de, ["stop"])
|
|
1978
|
+
}, [C(y(Qr), {
|
|
1981
1979
|
size: 14,
|
|
1982
1980
|
"stroke-width": 1.5
|
|
1983
|
-
})], 8,
|
|
1981
|
+
})], 8, ga)) : P("", !0),
|
|
1984
1982
|
x("button", {
|
|
1985
1983
|
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",
|
|
1986
1984
|
"aria-label": y(c).blockActions.delete,
|
|
1987
1985
|
title: y(c).blockActions.delete,
|
|
1988
|
-
onClick: I(
|
|
1989
|
-
}, [C(y(
|
|
1986
|
+
onClick: I(le, ["stop"])
|
|
1987
|
+
}, [C(y(An), {
|
|
1990
1988
|
size: 14,
|
|
1991
1989
|
"stroke-width": 1.5
|
|
1992
|
-
})], 8,
|
|
1993
|
-
], 8,
|
|
1994
|
-
T.value ? (t(), S("div",
|
|
1990
|
+
})], 8, _a)
|
|
1991
|
+
], 8, pa)) : P("", !0),
|
|
1992
|
+
T.value ? (t(), S("div", va, [x("span", ya, [C(y(ei), {
|
|
1995
1993
|
size: 12,
|
|
1996
1994
|
"stroke-width": 1.5
|
|
1997
1995
|
}), w(" " + D(y(l)(y(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : P("", !0),
|
|
1998
|
-
A.value && !T.value ? (t(), S("div",
|
|
1996
|
+
A.value && !T.value ? (t(), S("div", ba, [x("button", {
|
|
1999
1997
|
"data-testid": "condition-toggle",
|
|
2000
1998
|
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)]",
|
|
2001
1999
|
"aria-label": y(c).blockActions.conditionToggle,
|
|
2002
2000
|
title: e.block.displayCondition?.label,
|
|
2003
|
-
onClick: I(
|
|
2004
|
-
}, [C(y(
|
|
2001
|
+
onClick: I(fe, ["stop"])
|
|
2002
|
+
}, [C(y(ti), {
|
|
2005
2003
|
size: 12,
|
|
2006
2004
|
"stroke-width": 2
|
|
2007
|
-
})], 8,
|
|
2008
|
-
re.value > 0 && !T.value ? (t(), S("div",
|
|
2005
|
+
})], 8, xa)])) : P("", !0),
|
|
2006
|
+
re.value > 0 && !T.value ? (t(), S("div", Sa, [x("button", {
|
|
2009
2007
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 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)]",
|
|
2010
2008
|
"aria-label": y(l)(y(c).blockActions.comments, { count: String(re.value) }),
|
|
2011
2009
|
onClick: a[0] ||= I((t) => y(ee).comments?.openForBlock(e.block.id), ["stop"])
|
|
2012
|
-
}, [C(y(
|
|
2010
|
+
}, [C(y(kn), {
|
|
2013
2011
|
size: 12,
|
|
2014
2012
|
"stroke-width": 2.5
|
|
2015
|
-
}), w(" " + D(re.value), 1)], 8,
|
|
2016
|
-
|
|
2013
|
+
}), w(" " + D(re.value), 1)], 8, Ca)])) : P("", !0),
|
|
2014
|
+
se.value ? (t(), S("div", {
|
|
2017
2015
|
key: 4,
|
|
2018
|
-
class: "tpl-section-wrapper",
|
|
2019
|
-
style: n(
|
|
2016
|
+
class: k(["tpl-section-wrapper tpl-email-surface", y(Hr)(se.value)]),
|
|
2017
|
+
style: n(se.value)
|
|
2020
2018
|
}, [x("div", {
|
|
2021
|
-
class: "tpl-block-content",
|
|
2022
|
-
style: n(
|
|
2023
|
-
}, [u(r.$slots, "default", {}, void 0, !0)],
|
|
2019
|
+
class: k(["tpl-block-content tpl-email-surface", y(Hr)(oe.value)]),
|
|
2020
|
+
style: n(oe.value)
|
|
2021
|
+
}, [u(r.$slots, "default", {}, void 0, !0)], 6)], 6)) : (t(), S("div", {
|
|
2024
2022
|
key: 5,
|
|
2025
|
-
class: "tpl-block-content",
|
|
2026
|
-
style: n(
|
|
2027
|
-
}, [u(r.$slots, "default", {}, void 0, !0)],
|
|
2028
|
-
], 10,
|
|
2023
|
+
class: k(["tpl-block-content tpl-email-surface", y(Hr)(oe.value)]),
|
|
2024
|
+
style: n(oe.value)
|
|
2025
|
+
}, [u(r.$slots, "default", {}, void 0, !0)], 6))
|
|
2026
|
+
], 10, fa));
|
|
2029
2027
|
}
|
|
2030
|
-
}), [["__scopeId", "data-v-
|
|
2028
|
+
}), [["__scopeId", "data-v-d4623cf8"]]);
|
|
2031
2029
|
//#endregion
|
|
2032
2030
|
//#region src/utils/unwrapParagraph.ts
|
|
2033
|
-
function
|
|
2031
|
+
function Ta(e) {
|
|
2034
2032
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2035
2033
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2036
2034
|
}
|
|
2037
2035
|
//#endregion
|
|
2038
2036
|
//#region src/components/blocks/TitleBlock.vue
|
|
2039
|
-
var
|
|
2037
|
+
var Ea = /* @__PURE__ */ F({
|
|
2040
2038
|
__name: "TitleBlock",
|
|
2041
2039
|
props: {
|
|
2042
2040
|
block: {},
|
|
2043
2041
|
viewport: {}
|
|
2044
2042
|
},
|
|
2045
2043
|
setup(e) {
|
|
2046
|
-
let r = e, i = v(() => import("./TitleEditor-
|
|
2044
|
+
let r = e, i = v(() => import("./TitleEditor-CZdqeltH.js")), a = wt(mn, "TitleBlock"), { isEditing: s, blockRef: c, toolbarPosition: l, resolvedContent: u, handleDoubleClick: d, handleEditorDone: f } = la(() => r.block.content), p = N(() => {
|
|
2047
2045
|
let e = {
|
|
2048
|
-
fontSize: `${
|
|
2046
|
+
fontSize: `${qe[r.block.level]}px`,
|
|
2047
|
+
lineHeight: String(Me),
|
|
2049
2048
|
textAlign: r.block.textAlign
|
|
2050
2049
|
};
|
|
2051
|
-
return r.block.color && (e.color = r.block.color), r.block.fontFamily && (e.fontFamily = r.block.fontFamily), e;
|
|
2052
|
-
}),
|
|
2053
|
-
return (r,
|
|
2050
|
+
return r.block.color && (e.color = r.block.color), r.block.fontFamily && (e.fontFamily = a.resolveFontFamily(r.block.fontFamily)), e;
|
|
2051
|
+
}), m = N(() => `h${r.block.level}`), h = N(() => Ta(u.value));
|
|
2052
|
+
return (r, a) => (t(), S("div", {
|
|
2054
2053
|
ref_key: "blockRef",
|
|
2055
|
-
ref:
|
|
2054
|
+
ref: c,
|
|
2056
2055
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2057
|
-
style: n(
|
|
2058
|
-
onDblclick:
|
|
2059
|
-
}, [y(
|
|
2056
|
+
style: n(p.value),
|
|
2057
|
+
onDblclick: a[0] ||= (...e) => y(d) && y(d)(...e)
|
|
2058
|
+
}, [y(s) ? (t(), A(y(i), {
|
|
2060
2059
|
key: 0,
|
|
2061
2060
|
block: e.block,
|
|
2062
|
-
"toolbar-position": y(
|
|
2063
|
-
onDone: y(
|
|
2061
|
+
"toolbar-position": y(l),
|
|
2062
|
+
onDone: y(f)
|
|
2064
2063
|
}, null, 8, [
|
|
2065
2064
|
"block",
|
|
2066
2065
|
"toolbar-position",
|
|
2067
2066
|
"onDone"
|
|
2068
|
-
])) : (t(), A(o(
|
|
2067
|
+
])) : (t(), A(o(m.value), {
|
|
2069
2068
|
key: 1,
|
|
2070
|
-
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-
|
|
2069
|
+
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
2071
2070
|
style: { color: "inherit" },
|
|
2072
|
-
innerHTML:
|
|
2071
|
+
innerHTML: h.value
|
|
2073
2072
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2074
2073
|
}
|
|
2075
2074
|
});
|
|
2076
2075
|
//#endregion
|
|
2077
2076
|
//#region src/utils/sectionColumnDrop.ts
|
|
2078
|
-
function
|
|
2077
|
+
function Da(e) {
|
|
2079
2078
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2080
2079
|
}
|
|
2081
2080
|
//#endregion
|
|
2082
2081
|
//#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2083
|
-
var
|
|
2082
|
+
var Oa = Object.defineProperty, ka = Object.getOwnPropertySymbols, Aa = Object.prototype.hasOwnProperty, ja = Object.prototype.propertyIsEnumerable, Ma = (e, t, n) => t in e ? Oa(e, t, {
|
|
2084
2083
|
enumerable: !0,
|
|
2085
2084
|
configurable: !0,
|
|
2086
2085
|
writable: !0,
|
|
2087
2086
|
value: n
|
|
2088
|
-
}) : e[t] = n,
|
|
2089
|
-
for (var n in t ||= {})
|
|
2090
|
-
if (
|
|
2087
|
+
}) : e[t] = n, Na = (e, t) => {
|
|
2088
|
+
for (var n in t ||= {}) Aa.call(t, n) && Ma(e, n, t[n]);
|
|
2089
|
+
if (ka) for (var n of ka(t)) ja.call(t, n) && Ma(e, n, t[n]);
|
|
2091
2090
|
return e;
|
|
2092
|
-
},
|
|
2091
|
+
}, Pa = (e, t) => {
|
|
2093
2092
|
var n = {};
|
|
2094
|
-
for (var r in e)
|
|
2095
|
-
if (e != null &&
|
|
2093
|
+
for (var r in e) Aa.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2094
|
+
if (e != null && ka) for (var r of ka(e)) t.indexOf(r) < 0 && ja.call(e, r) && (n[r] = e[r]);
|
|
2096
2095
|
return n;
|
|
2097
|
-
},
|
|
2098
|
-
function
|
|
2099
|
-
console.warn(
|
|
2096
|
+
}, Fa = "[vue-draggable-plus]: ";
|
|
2097
|
+
function Ia(e) {
|
|
2098
|
+
console.warn(Fa + e);
|
|
2100
2099
|
}
|
|
2101
|
-
function
|
|
2102
|
-
console.error(
|
|
2100
|
+
function La(e) {
|
|
2101
|
+
console.error(Fa + e);
|
|
2103
2102
|
}
|
|
2104
|
-
function
|
|
2103
|
+
function Ra(e, t, n) {
|
|
2105
2104
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2106
2105
|
}
|
|
2107
|
-
function
|
|
2106
|
+
function za(e) {
|
|
2108
2107
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2109
2108
|
}
|
|
2110
|
-
function
|
|
2111
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2109
|
+
function Ba(e) {
|
|
2110
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[za(n)] = e[n]), t), {});
|
|
2112
2111
|
}
|
|
2113
|
-
function
|
|
2112
|
+
function Va(e, t) {
|
|
2114
2113
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2115
2114
|
}
|
|
2116
|
-
function
|
|
2115
|
+
function Ha(e, t, n) {
|
|
2117
2116
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2118
2117
|
}
|
|
2119
|
-
function
|
|
2118
|
+
function Ua(e) {
|
|
2120
2119
|
return e === void 0;
|
|
2121
2120
|
}
|
|
2122
|
-
function
|
|
2121
|
+
function Wa(e) {
|
|
2123
2122
|
return typeof e == "string";
|
|
2124
2123
|
}
|
|
2125
|
-
function
|
|
2124
|
+
function Ga(e, t, n) {
|
|
2126
2125
|
let r = e.children[n];
|
|
2127
2126
|
e.insertBefore(t, r);
|
|
2128
2127
|
}
|
|
2129
|
-
function
|
|
2128
|
+
function Ka(e) {
|
|
2130
2129
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2131
2130
|
}
|
|
2132
|
-
function
|
|
2131
|
+
function qa(e, t = document) {
|
|
2133
2132
|
let n = null;
|
|
2134
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2133
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Ia(`Element not found: ${e}`), n;
|
|
2135
2134
|
}
|
|
2136
|
-
function
|
|
2135
|
+
function Ja(e, t, n = null) {
|
|
2137
2136
|
return function(...r) {
|
|
2138
2137
|
return e.apply(n, r), t.apply(n, r);
|
|
2139
2138
|
};
|
|
2140
2139
|
}
|
|
2141
|
-
function
|
|
2142
|
-
let n =
|
|
2140
|
+
function Ya(e, t) {
|
|
2141
|
+
let n = Na({}, e);
|
|
2143
2142
|
return Object.keys(t).forEach((r) => {
|
|
2144
|
-
n[r] ? n[r] =
|
|
2143
|
+
n[r] ? n[r] = Ja(e[r], t[r]) : n[r] = t[r];
|
|
2145
2144
|
}), n;
|
|
2146
2145
|
}
|
|
2147
|
-
function
|
|
2146
|
+
function Xa(e) {
|
|
2148
2147
|
return e instanceof HTMLElement;
|
|
2149
2148
|
}
|
|
2150
|
-
function
|
|
2149
|
+
function Za(e, t) {
|
|
2151
2150
|
Object.keys(e).forEach((n) => {
|
|
2152
2151
|
t(n, e[n]);
|
|
2153
2152
|
});
|
|
2154
2153
|
}
|
|
2155
|
-
function
|
|
2154
|
+
function Qa(e) {
|
|
2156
2155
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2157
2156
|
}
|
|
2158
|
-
var
|
|
2159
|
-
function
|
|
2157
|
+
var $a = Object.assign;
|
|
2158
|
+
function eo(e, t) {
|
|
2160
2159
|
var n = Object.keys(e);
|
|
2161
2160
|
if (Object.getOwnPropertySymbols) {
|
|
2162
2161
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2166,26 +2165,26 @@ function Ua(e, t) {
|
|
|
2166
2165
|
}
|
|
2167
2166
|
return n;
|
|
2168
2167
|
}
|
|
2169
|
-
function
|
|
2168
|
+
function to(e) {
|
|
2170
2169
|
for (var t = 1; t < arguments.length; t++) {
|
|
2171
2170
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2172
|
-
t % 2 ?
|
|
2173
|
-
|
|
2174
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2171
|
+
t % 2 ? eo(Object(n), !0).forEach(function(t) {
|
|
2172
|
+
ro(e, t, n[t]);
|
|
2173
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : eo(Object(n)).forEach(function(t) {
|
|
2175
2174
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2176
2175
|
});
|
|
2177
2176
|
}
|
|
2178
2177
|
return e;
|
|
2179
2178
|
}
|
|
2180
|
-
function
|
|
2179
|
+
function no(e) {
|
|
2181
2180
|
"@babel/helpers - typeof";
|
|
2182
|
-
return
|
|
2181
|
+
return no = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2183
2182
|
return typeof e;
|
|
2184
2183
|
} : function(e) {
|
|
2185
2184
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2186
|
-
},
|
|
2185
|
+
}, no(e);
|
|
2187
2186
|
}
|
|
2188
|
-
function
|
|
2187
|
+
function ro(e, t, n) {
|
|
2189
2188
|
return t in e ? Object.defineProperty(e, t, {
|
|
2190
2189
|
value: n,
|
|
2191
2190
|
enumerable: !0,
|
|
@@ -2193,44 +2192,44 @@ function Ka(e, t, n) {
|
|
|
2193
2192
|
writable: !0
|
|
2194
2193
|
}) : e[t] = n, e;
|
|
2195
2194
|
}
|
|
2196
|
-
function
|
|
2197
|
-
return
|
|
2195
|
+
function io() {
|
|
2196
|
+
return io = Object.assign || function(e) {
|
|
2198
2197
|
for (var t = 1; t < arguments.length; t++) {
|
|
2199
2198
|
var n = arguments[t];
|
|
2200
2199
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2201
2200
|
}
|
|
2202
2201
|
return e;
|
|
2203
|
-
},
|
|
2202
|
+
}, io.apply(this, arguments);
|
|
2204
2203
|
}
|
|
2205
|
-
function
|
|
2204
|
+
function ao(e, t) {
|
|
2206
2205
|
if (e == null) return {};
|
|
2207
2206
|
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]);
|
|
2208
2207
|
return n;
|
|
2209
2208
|
}
|
|
2210
|
-
function
|
|
2209
|
+
function oo(e, t) {
|
|
2211
2210
|
if (e == null) return {};
|
|
2212
|
-
var n =
|
|
2211
|
+
var n = ao(e, t), r, i;
|
|
2213
2212
|
if (Object.getOwnPropertySymbols) {
|
|
2214
2213
|
var a = Object.getOwnPropertySymbols(e);
|
|
2215
2214
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2216
2215
|
}
|
|
2217
2216
|
return n;
|
|
2218
2217
|
}
|
|
2219
|
-
var
|
|
2220
|
-
function
|
|
2218
|
+
var so = "1.15.2";
|
|
2219
|
+
function co(e) {
|
|
2221
2220
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2222
2221
|
}
|
|
2223
|
-
var
|
|
2222
|
+
var lo = co(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), uo = co(/Edge/i), fo = co(/firefox/i), po = co(/safari/i) && !co(/chrome/i) && !co(/android/i), mo = co(/iP(ad|od|hone)/i), ho = co(/chrome/i) && co(/android/i), go = {
|
|
2224
2223
|
capture: !1,
|
|
2225
2224
|
passive: !1
|
|
2226
2225
|
};
|
|
2227
2226
|
function L(e, t, n) {
|
|
2228
|
-
e.addEventListener(t, n, !
|
|
2227
|
+
e.addEventListener(t, n, !lo && go);
|
|
2229
2228
|
}
|
|
2230
2229
|
function R(e, t, n) {
|
|
2231
|
-
e.removeEventListener(t, n, !
|
|
2230
|
+
e.removeEventListener(t, n, !lo && go);
|
|
2232
2231
|
}
|
|
2233
|
-
function
|
|
2232
|
+
function _o(e, t) {
|
|
2234
2233
|
if (t) {
|
|
2235
2234
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2236
2235
|
if (e.matches) return e.matches(t);
|
|
@@ -2242,41 +2241,41 @@ function ao(e, t) {
|
|
|
2242
2241
|
return !1;
|
|
2243
2242
|
}
|
|
2244
2243
|
}
|
|
2245
|
-
function
|
|
2244
|
+
function vo(e) {
|
|
2246
2245
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2247
2246
|
}
|
|
2248
|
-
function
|
|
2247
|
+
function yo(e, t, n, r) {
|
|
2249
2248
|
if (e) {
|
|
2250
2249
|
n ||= document;
|
|
2251
2250
|
do {
|
|
2252
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2251
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && _o(e, t) : _o(e, t)) || r && e === n) return e;
|
|
2253
2252
|
if (e === n) break;
|
|
2254
|
-
} while (e =
|
|
2253
|
+
} while (e = vo(e));
|
|
2255
2254
|
}
|
|
2256
2255
|
return null;
|
|
2257
2256
|
}
|
|
2258
|
-
var
|
|
2259
|
-
function
|
|
2260
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2257
|
+
var bo = /\s+/g;
|
|
2258
|
+
function xo(e, t, n) {
|
|
2259
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(bo, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(bo, " "));
|
|
2261
2260
|
}
|
|
2262
|
-
function
|
|
2261
|
+
function z(e, t, n) {
|
|
2263
2262
|
var r = e && e.style;
|
|
2264
2263
|
if (r) {
|
|
2265
2264
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
2266
2265
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2267
2266
|
}
|
|
2268
2267
|
}
|
|
2269
|
-
function
|
|
2268
|
+
function So(e, t) {
|
|
2270
2269
|
var n = "";
|
|
2271
2270
|
if (typeof e == "string") n = e;
|
|
2272
2271
|
else do {
|
|
2273
|
-
var r =
|
|
2272
|
+
var r = z(e, "transform");
|
|
2274
2273
|
r && r !== "none" && (n = r + " " + n);
|
|
2275
2274
|
} while (!t && (e = e.parentNode));
|
|
2276
2275
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2277
2276
|
return i && new i(n);
|
|
2278
2277
|
}
|
|
2279
|
-
function
|
|
2278
|
+
function Co(e, t, n) {
|
|
2280
2279
|
if (e) {
|
|
2281
2280
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2282
2281
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2284,21 +2283,21 @@ function uo(e, t, n) {
|
|
|
2284
2283
|
}
|
|
2285
2284
|
return [];
|
|
2286
2285
|
}
|
|
2287
|
-
function
|
|
2286
|
+
function wo() {
|
|
2288
2287
|
return document.scrollingElement || document.documentElement;
|
|
2289
2288
|
}
|
|
2290
|
-
function
|
|
2289
|
+
function B(e, t, n, r, i) {
|
|
2291
2290
|
if (e.getBoundingClientRect || e === window) {
|
|
2292
2291
|
var a, o, s, c, l, u, d;
|
|
2293
|
-
if (e !== window && e.parentNode && e !==
|
|
2294
|
-
if (i && i.getBoundingClientRect && (
|
|
2292
|
+
if (e !== window && e.parentNode && e !== wo() ? (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, !lo)) do
|
|
2293
|
+
if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
|
|
2295
2294
|
var f = i.getBoundingClientRect();
|
|
2296
|
-
o -= f.top + parseInt(
|
|
2295
|
+
o -= f.top + parseInt(z(i, "border-top-width")), s -= f.left + parseInt(z(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
2297
2296
|
break;
|
|
2298
2297
|
}
|
|
2299
2298
|
while (i = i.parentNode);
|
|
2300
2299
|
if (r && e !== window) {
|
|
2301
|
-
var p =
|
|
2300
|
+
var p = So(i || e), m = p && p.a, h = p && p.d;
|
|
2302
2301
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2303
2302
|
}
|
|
2304
2303
|
return {
|
|
@@ -2311,18 +2310,18 @@ function V(e, t, n, r, i) {
|
|
|
2311
2310
|
};
|
|
2312
2311
|
}
|
|
2313
2312
|
}
|
|
2314
|
-
function
|
|
2315
|
-
for (var r =
|
|
2316
|
-
var a =
|
|
2313
|
+
function To(e, t, n) {
|
|
2314
|
+
for (var r = jo(e, !0), i = B(e)[t]; r;) {
|
|
2315
|
+
var a = B(r)[n], o = void 0;
|
|
2317
2316
|
if (o = i >= a, !o) return r;
|
|
2318
|
-
if (r ===
|
|
2319
|
-
r =
|
|
2317
|
+
if (r === wo()) break;
|
|
2318
|
+
r = jo(r, !1);
|
|
2320
2319
|
}
|
|
2321
2320
|
return !1;
|
|
2322
2321
|
}
|
|
2323
|
-
function
|
|
2322
|
+
function Eo(e, t, n, r) {
|
|
2324
2323
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2325
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2324
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && yo(o[a], n.draggable, e, !1)) {
|
|
2326
2325
|
if (i === t) return o[a];
|
|
2327
2326
|
i++;
|
|
2328
2327
|
}
|
|
@@ -2330,96 +2329,96 @@ function mo(e, t, n, r) {
|
|
|
2330
2329
|
}
|
|
2331
2330
|
return null;
|
|
2332
2331
|
}
|
|
2333
|
-
function
|
|
2334
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2332
|
+
function Do(e, t) {
|
|
2333
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !_o(n, t));) n = n.previousElementSibling;
|
|
2335
2334
|
return n || null;
|
|
2336
2335
|
}
|
|
2337
|
-
function
|
|
2336
|
+
function Oo(e, t) {
|
|
2338
2337
|
var n = 0;
|
|
2339
2338
|
if (!e || !e.parentNode) return -1;
|
|
2340
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2339
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || _o(e, t)) && n++;
|
|
2341
2340
|
return n;
|
|
2342
2341
|
}
|
|
2343
|
-
function
|
|
2344
|
-
var t = 0, n = 0, r =
|
|
2342
|
+
function ko(e) {
|
|
2343
|
+
var t = 0, n = 0, r = wo();
|
|
2345
2344
|
if (e) do {
|
|
2346
|
-
var i =
|
|
2345
|
+
var i = So(e), a = i.a, o = i.d;
|
|
2347
2346
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2348
2347
|
} while (e !== r && (e = e.parentNode));
|
|
2349
2348
|
return [t, n];
|
|
2350
2349
|
}
|
|
2351
|
-
function
|
|
2350
|
+
function Ao(e, t) {
|
|
2352
2351
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2353
2352
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2354
2353
|
}
|
|
2355
2354
|
return -1;
|
|
2356
2355
|
}
|
|
2357
|
-
function
|
|
2358
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2356
|
+
function jo(e, t) {
|
|
2357
|
+
if (!e || !e.getBoundingClientRect) return wo();
|
|
2359
2358
|
var n = e, r = !1;
|
|
2360
2359
|
do
|
|
2361
2360
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2362
|
-
var i =
|
|
2361
|
+
var i = z(n);
|
|
2363
2362
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2364
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2363
|
+
if (!n.getBoundingClientRect || n === document.body) return wo();
|
|
2365
2364
|
if (r || t) return n;
|
|
2366
2365
|
r = !0;
|
|
2367
2366
|
}
|
|
2368
2367
|
}
|
|
2369
2368
|
while (n = n.parentNode);
|
|
2370
|
-
return
|
|
2369
|
+
return wo();
|
|
2371
2370
|
}
|
|
2372
|
-
function
|
|
2371
|
+
function Mo(e, t) {
|
|
2373
2372
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2374
2373
|
return e;
|
|
2375
2374
|
}
|
|
2376
|
-
function
|
|
2375
|
+
function No(e, t) {
|
|
2377
2376
|
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);
|
|
2378
2377
|
}
|
|
2379
|
-
var
|
|
2380
|
-
function
|
|
2378
|
+
var Po;
|
|
2379
|
+
function Fo(e, t) {
|
|
2381
2380
|
return function() {
|
|
2382
|
-
if (!
|
|
2381
|
+
if (!Po) {
|
|
2383
2382
|
var n = arguments, r = this;
|
|
2384
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2385
|
-
|
|
2383
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Po = setTimeout(function() {
|
|
2384
|
+
Po = void 0;
|
|
2386
2385
|
}, t);
|
|
2387
2386
|
}
|
|
2388
2387
|
};
|
|
2389
2388
|
}
|
|
2390
|
-
function
|
|
2391
|
-
clearTimeout(
|
|
2389
|
+
function Io() {
|
|
2390
|
+
clearTimeout(Po), Po = void 0;
|
|
2392
2391
|
}
|
|
2393
|
-
function
|
|
2392
|
+
function Lo(e, t, n) {
|
|
2394
2393
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2395
2394
|
}
|
|
2396
|
-
function
|
|
2395
|
+
function Ro(e) {
|
|
2397
2396
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2398
2397
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2399
2398
|
}
|
|
2400
|
-
function
|
|
2399
|
+
function zo(e, t, n) {
|
|
2401
2400
|
var r = {};
|
|
2402
2401
|
return Array.from(e.children).forEach(function(i) {
|
|
2403
|
-
if (
|
|
2404
|
-
var a =
|
|
2402
|
+
if (yo(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2403
|
+
var a = B(i);
|
|
2405
2404
|
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);
|
|
2406
2405
|
}
|
|
2407
2406
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2408
2407
|
}
|
|
2409
|
-
var
|
|
2410
|
-
function
|
|
2408
|
+
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2409
|
+
function Bo() {
|
|
2411
2410
|
var e = [], t;
|
|
2412
2411
|
return {
|
|
2413
2412
|
captureAnimationState: function() {
|
|
2414
2413
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2415
|
-
if (
|
|
2414
|
+
if (z(t, "display") !== "none" && t !== Q.ghost) {
|
|
2416
2415
|
e.push({
|
|
2417
2416
|
target: t,
|
|
2418
|
-
rect:
|
|
2417
|
+
rect: B(t)
|
|
2419
2418
|
});
|
|
2420
|
-
var n =
|
|
2419
|
+
var n = to({}, e[e.length - 1].rect);
|
|
2421
2420
|
if (t.thisAnimationDuration) {
|
|
2422
|
-
var r =
|
|
2421
|
+
var r = So(t, !0);
|
|
2423
2422
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2424
2423
|
}
|
|
2425
2424
|
t.fromRect = n;
|
|
@@ -2430,7 +2429,7 @@ function ko() {
|
|
|
2430
2429
|
e.push(t);
|
|
2431
2430
|
},
|
|
2432
2431
|
removeAnimationState: function(t) {
|
|
2433
|
-
e.splice(
|
|
2432
|
+
e.splice(Ao(e, { target: t }), 1);
|
|
2434
2433
|
},
|
|
2435
2434
|
animateAll: function(n) {
|
|
2436
2435
|
var r = this;
|
|
@@ -2438,8 +2437,8 @@ function ko() {
|
|
|
2438
2437
|
else {
|
|
2439
2438
|
var i = !1, a = 0;
|
|
2440
2439
|
e.forEach(function(e) {
|
|
2441
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2442
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2440
|
+
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = So(n, !0);
|
|
2441
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && No(c, s) && !No(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ho(u, c, l, r.options)), No(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() {
|
|
2443
2442
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2444
2443
|
}, t), n.thisAnimationDuration = t);
|
|
2445
2444
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2449,27 +2448,27 @@ function ko() {
|
|
|
2449
2448
|
},
|
|
2450
2449
|
animate: function(e, t, n, r) {
|
|
2451
2450
|
if (r) {
|
|
2452
|
-
|
|
2453
|
-
var i =
|
|
2454
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2455
|
-
|
|
2451
|
+
z(e, "transition", ""), z(e, "transform", "");
|
|
2452
|
+
var i = So(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2453
|
+
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Vo(e), z(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), z(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2454
|
+
z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2456
2455
|
}, r);
|
|
2457
2456
|
}
|
|
2458
2457
|
}
|
|
2459
2458
|
};
|
|
2460
2459
|
}
|
|
2461
|
-
function
|
|
2460
|
+
function Vo(e) {
|
|
2462
2461
|
return e.offsetWidth;
|
|
2463
2462
|
}
|
|
2464
|
-
function
|
|
2463
|
+
function Ho(e, t, n, r) {
|
|
2465
2464
|
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;
|
|
2466
2465
|
}
|
|
2467
|
-
var
|
|
2466
|
+
var Uo = [], Wo = { initializeByDefault: !0 }, Go = {
|
|
2468
2467
|
mount: function(e) {
|
|
2469
|
-
for (var t in
|
|
2470
|
-
|
|
2468
|
+
for (var t in Wo) Wo.hasOwnProperty(t) && !(t in e) && (e[t] = Wo[t]);
|
|
2469
|
+
Uo.forEach(function(t) {
|
|
2471
2470
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2472
|
-
}),
|
|
2471
|
+
}), Uo.push(e);
|
|
2473
2472
|
},
|
|
2474
2473
|
pluginEvent: function(e, t, n) {
|
|
2475
2474
|
var r = this;
|
|
@@ -2477,16 +2476,16 @@ var Mo = [], No = { initializeByDefault: !0 }, Po = {
|
|
|
2477
2476
|
r.eventCanceled = !0;
|
|
2478
2477
|
};
|
|
2479
2478
|
var i = e + "Global";
|
|
2480
|
-
|
|
2481
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2479
|
+
Uo.forEach(function(r) {
|
|
2480
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](to({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](to({ sortable: t }, n)));
|
|
2482
2481
|
});
|
|
2483
2482
|
},
|
|
2484
2483
|
initializePlugins: function(e, t, n, r) {
|
|
2485
|
-
for (var i in
|
|
2484
|
+
for (var i in Uo.forEach(function(r) {
|
|
2486
2485
|
var i = r.pluginName;
|
|
2487
2486
|
if (e.options[i] || r.initializeByDefault) {
|
|
2488
2487
|
var a = new r(e, t, e.options);
|
|
2489
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2488
|
+
a.sortable = e, a.options = e.options, e[i] = a, io(n, a.defaults);
|
|
2490
2489
|
}
|
|
2491
2490
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2492
2491
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2495,56 +2494,56 @@ var Mo = [], No = { initializeByDefault: !0 }, Po = {
|
|
|
2495
2494
|
},
|
|
2496
2495
|
getEventProperties: function(e, t) {
|
|
2497
2496
|
var n = {};
|
|
2498
|
-
return
|
|
2499
|
-
typeof r.eventProperties == "function" &&
|
|
2497
|
+
return Uo.forEach(function(r) {
|
|
2498
|
+
typeof r.eventProperties == "function" && io(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2500
2499
|
}), n;
|
|
2501
2500
|
},
|
|
2502
2501
|
modifyOption: function(e, t, n) {
|
|
2503
2502
|
var r;
|
|
2504
|
-
return
|
|
2503
|
+
return Uo.forEach(function(i) {
|
|
2505
2504
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2506
2505
|
}), r;
|
|
2507
2506
|
}
|
|
2508
2507
|
};
|
|
2509
|
-
function
|
|
2508
|
+
function Ko(e) {
|
|
2510
2509
|
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;
|
|
2511
|
-
if (t ||= n && n[
|
|
2510
|
+
if (t ||= n && n[V], t) {
|
|
2512
2511
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2513
|
-
window.CustomEvent && !
|
|
2512
|
+
window.CustomEvent && !lo && !uo ? h = new CustomEvent(r, {
|
|
2514
2513
|
bubbles: !0,
|
|
2515
2514
|
cancelable: !0
|
|
2516
2515
|
}) : (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;
|
|
2517
|
-
var v =
|
|
2516
|
+
var v = to(to({}, m), Go.getEventProperties(r, t));
|
|
2518
2517
|
for (var y in v) h[y] = v[y];
|
|
2519
2518
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2520
2519
|
}
|
|
2521
2520
|
}
|
|
2522
|
-
var
|
|
2523
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2524
|
-
|
|
2521
|
+
var qo = ["evt"], H = function(e, t) {
|
|
2522
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = oo(n, qo);
|
|
2523
|
+
Go.pluginEvent.bind(Q)(e, t, to({
|
|
2525
2524
|
dragEl: W,
|
|
2526
2525
|
parentEl: G,
|
|
2527
2526
|
ghostEl: K,
|
|
2528
2527
|
rootEl: q,
|
|
2529
|
-
nextEl:
|
|
2530
|
-
lastDownEl:
|
|
2528
|
+
nextEl: Jo,
|
|
2529
|
+
lastDownEl: Yo,
|
|
2531
2530
|
cloneEl: J,
|
|
2532
|
-
cloneHidden:
|
|
2533
|
-
dragStarted:
|
|
2531
|
+
cloneHidden: Xo,
|
|
2532
|
+
dragStarted: us,
|
|
2534
2533
|
putSortable: X,
|
|
2535
2534
|
activeSortable: Q.active,
|
|
2536
2535
|
originalEvent: r,
|
|
2537
|
-
oldIndex:
|
|
2538
|
-
oldDraggableIndex:
|
|
2536
|
+
oldIndex: Zo,
|
|
2537
|
+
oldDraggableIndex: Qo,
|
|
2539
2538
|
newIndex: Y,
|
|
2540
|
-
newDraggableIndex:
|
|
2541
|
-
hideGhostForTarget:
|
|
2542
|
-
unhideGhostForTarget:
|
|
2539
|
+
newDraggableIndex: $o,
|
|
2540
|
+
hideGhostForTarget: Os,
|
|
2541
|
+
unhideGhostForTarget: ks,
|
|
2543
2542
|
cloneNowHidden: function() {
|
|
2544
|
-
|
|
2543
|
+
Xo = !0;
|
|
2545
2544
|
},
|
|
2546
2545
|
cloneNowShown: function() {
|
|
2547
|
-
|
|
2546
|
+
Xo = !1;
|
|
2548
2547
|
},
|
|
2549
2548
|
dispatchSortableEvent: function(e) {
|
|
2550
2549
|
U({
|
|
@@ -2556,45 +2555,45 @@ var Io = ["evt"], H = function(e, t) {
|
|
|
2556
2555
|
}, i));
|
|
2557
2556
|
};
|
|
2558
2557
|
function U(e) {
|
|
2559
|
-
|
|
2558
|
+
Ko(to({
|
|
2560
2559
|
putSortable: X,
|
|
2561
2560
|
cloneEl: J,
|
|
2562
2561
|
targetEl: W,
|
|
2563
2562
|
rootEl: q,
|
|
2564
|
-
oldIndex:
|
|
2565
|
-
oldDraggableIndex:
|
|
2563
|
+
oldIndex: Zo,
|
|
2564
|
+
oldDraggableIndex: Qo,
|
|
2566
2565
|
newIndex: Y,
|
|
2567
|
-
newDraggableIndex:
|
|
2566
|
+
newDraggableIndex: $o
|
|
2568
2567
|
}, e));
|
|
2569
2568
|
}
|
|
2570
|
-
var W, G, K, q,
|
|
2571
|
-
if (
|
|
2572
|
-
if (
|
|
2569
|
+
var W, G, K, q, Jo, Yo, J, Xo, Zo, Y, Qo, $o, es, X, ts = !1, ns = !1, rs = [], is, as, os, ss, cs, ls, us, ds, fs, ps = !1, ms = !1, hs, Z, gs = [], _s = !1, vs = [], ys = typeof document < "u", bs = mo, xs = uo || lo ? "cssFloat" : "float", Ss = ys && !ho && !mo && "draggable" in document.createElement("div"), Cs = function() {
|
|
2570
|
+
if (ys) {
|
|
2571
|
+
if (lo) return !1;
|
|
2573
2572
|
var e = document.createElement("x");
|
|
2574
2573
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2575
2574
|
}
|
|
2576
|
-
}(),
|
|
2577
|
-
var n =
|
|
2575
|
+
}(), ws = function(e, t) {
|
|
2576
|
+
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Eo(e, 0, t), a = Eo(e, 1, t), o = i && z(i), s = a && z(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + B(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + B(a).width;
|
|
2578
2577
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2579
2578
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2580
2579
|
if (i && o.float && o.float !== "none") {
|
|
2581
2580
|
var u = o.float === "left" ? "left" : "right";
|
|
2582
2581
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2583
2582
|
}
|
|
2584
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2585
|
-
},
|
|
2583
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[xs] === "none" || a && n[xs] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2584
|
+
}, Ts = function(e, t, n) {
|
|
2586
2585
|
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;
|
|
2587
2586
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2588
|
-
},
|
|
2587
|
+
}, Es = function(e, t) {
|
|
2589
2588
|
var n;
|
|
2590
|
-
return
|
|
2591
|
-
var i = r[
|
|
2592
|
-
if (i && !
|
|
2593
|
-
var a =
|
|
2589
|
+
return rs.some(function(r) {
|
|
2590
|
+
var i = r[V].options.emptyInsertThreshold;
|
|
2591
|
+
if (i && !Do(r)) {
|
|
2592
|
+
var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2594
2593
|
if (o && s) return n = r;
|
|
2595
2594
|
}
|
|
2596
2595
|
}), n;
|
|
2597
|
-
},
|
|
2596
|
+
}, Ds = function(e) {
|
|
2598
2597
|
function t(e, n) {
|
|
2599
2598
|
return function(r, i, a, o) {
|
|
2600
2599
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2607,31 +2606,31 @@ var W, G, K, q, Lo, Ro, J, zo, Bo, Y, Vo, Ho, Uo, X, Wo = !1, Go = !1, Ko = [],
|
|
|
2607
2606
|
};
|
|
2608
2607
|
}
|
|
2609
2608
|
var n = {}, r = e.group;
|
|
2610
|
-
(!r ||
|
|
2611
|
-
},
|
|
2612
|
-
!
|
|
2613
|
-
},
|
|
2614
|
-
!
|
|
2609
|
+
(!r || no(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;
|
|
2610
|
+
}, Os = function() {
|
|
2611
|
+
!Cs && K && z(K, "display", "none");
|
|
2612
|
+
}, ks = function() {
|
|
2613
|
+
!Cs && K && z(K, "display", "");
|
|
2615
2614
|
};
|
|
2616
|
-
|
|
2617
|
-
if (
|
|
2615
|
+
ys && !ho && document.addEventListener("click", function(e) {
|
|
2616
|
+
if (ns) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), ns = !1, !1;
|
|
2618
2617
|
}, !0);
|
|
2619
|
-
var
|
|
2618
|
+
var As = function(e) {
|
|
2620
2619
|
if (W) {
|
|
2621
2620
|
e = e.touches ? e.touches[0] : e;
|
|
2622
|
-
var t =
|
|
2621
|
+
var t = Es(e.clientX, e.clientY);
|
|
2623
2622
|
if (t) {
|
|
2624
2623
|
var n = {};
|
|
2625
2624
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2626
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
2625
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2627
2626
|
}
|
|
2628
2627
|
}
|
|
2629
|
-
},
|
|
2630
|
-
W && W.parentNode[
|
|
2628
|
+
}, js = function(e) {
|
|
2629
|
+
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2631
2630
|
};
|
|
2632
2631
|
function Q(e, t) {
|
|
2633
2632
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2634
|
-
this.el = e, this.options = t =
|
|
2633
|
+
this.el = e, this.options = t = io({}, t), e[V] = this;
|
|
2635
2634
|
var n = {
|
|
2636
2635
|
group: null,
|
|
2637
2636
|
sort: !0,
|
|
@@ -2644,7 +2643,7 @@ function Q(e, t) {
|
|
|
2644
2643
|
invertedSwapThreshold: null,
|
|
2645
2644
|
removeCloneOnHide: !0,
|
|
2646
2645
|
direction: function() {
|
|
2647
|
-
return
|
|
2646
|
+
return ws(e, this.options);
|
|
2648
2647
|
},
|
|
2649
2648
|
ghostClass: "sortable-ghost",
|
|
2650
2649
|
chosenClass: "sortable-chosen",
|
|
@@ -2671,17 +2670,17 @@ function Q(e, t) {
|
|
|
2671
2670
|
x: 0,
|
|
2672
2671
|
y: 0
|
|
2673
2672
|
},
|
|
2674
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2673
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !po,
|
|
2675
2674
|
emptyInsertThreshold: 5
|
|
2676
2675
|
};
|
|
2677
|
-
for (var r in
|
|
2678
|
-
for (var i in
|
|
2679
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
2676
|
+
for (var r in Go.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2677
|
+
for (var i in Ds(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2678
|
+
this.nativeDraggable = !t.forceFallback && Ss, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), rs.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), io(this, Bo());
|
|
2680
2679
|
}
|
|
2681
2680
|
Q.prototype = {
|
|
2682
2681
|
constructor: Q,
|
|
2683
2682
|
_isOutsideThisEl: function(e) {
|
|
2684
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2683
|
+
!this.el.contains(e) && e !== this.el && (ds = null);
|
|
2685
2684
|
},
|
|
2686
2685
|
_getDirection: function(e, t) {
|
|
2687
2686
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2689,8 +2688,8 @@ Q.prototype = {
|
|
|
2689
2688
|
_onTapStart: function(e) {
|
|
2690
2689
|
if (e.cancelable) {
|
|
2691
2690
|
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;
|
|
2692
|
-
if (
|
|
2693
|
-
if (
|
|
2691
|
+
if (Vs(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && po && s && s.tagName.toUpperCase() === "SELECT") && (s = yo(s, r.draggable, n, !1), !(s && s.animated) && Yo !== s)) {
|
|
2692
|
+
if (Zo = Oo(s), Qo = Oo(s, r.draggable), typeof l == "function") {
|
|
2694
2693
|
if (l.call(this, e, s, this)) {
|
|
2695
2694
|
U({
|
|
2696
2695
|
sortable: t,
|
|
@@ -2703,7 +2702,7 @@ Q.prototype = {
|
|
|
2703
2702
|
return;
|
|
2704
2703
|
}
|
|
2705
2704
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2706
|
-
if (r =
|
|
2705
|
+
if (r = yo(c, r.trim(), n, !1), r) return U({
|
|
2707
2706
|
sortable: t,
|
|
2708
2707
|
rootEl: r,
|
|
2709
2708
|
name: "filter",
|
|
@@ -2715,27 +2714,27 @@ Q.prototype = {
|
|
|
2715
2714
|
i && e.cancelable && e.preventDefault();
|
|
2716
2715
|
return;
|
|
2717
2716
|
}
|
|
2718
|
-
r.handle && !
|
|
2717
|
+
r.handle && !yo(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2719
2718
|
}
|
|
2720
2719
|
}
|
|
2721
2720
|
},
|
|
2722
2721
|
_prepareDragStart: function(e, t, n) {
|
|
2723
2722
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2724
2723
|
if (n && !W && n.parentNode === i) {
|
|
2725
|
-
var c =
|
|
2726
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2724
|
+
var c = B(n);
|
|
2725
|
+
if (q = i, W = n, G = W.parentNode, Jo = W.nextSibling, Yo = n, es = a.group, Q.dragged = W, is = {
|
|
2727
2726
|
target: W,
|
|
2728
2727
|
clientX: (t || e).clientX,
|
|
2729
2728
|
clientY: (t || e).clientY
|
|
2730
|
-
},
|
|
2731
|
-
H("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !
|
|
2729
|
+
}, cs = is.clientX - c.left, ls = is.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2730
|
+
H("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !fo && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2732
2731
|
sortable: r,
|
|
2733
2732
|
name: "choose",
|
|
2734
2733
|
originalEvent: e
|
|
2735
|
-
}),
|
|
2734
|
+
}), xo(W, a.chosenClass, !0));
|
|
2736
2735
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2737
|
-
|
|
2738
|
-
}), L(o, "dragover",
|
|
2736
|
+
Co(W, e.trim(), Ps);
|
|
2737
|
+
}), L(o, "dragover", As), L(o, "mousemove", As), L(o, "touchmove", As), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), fo && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(uo || lo))) {
|
|
2739
2738
|
if (Q.eventCanceled) {
|
|
2740
2739
|
this._onDrop();
|
|
2741
2740
|
return;
|
|
@@ -2749,7 +2748,7 @@ Q.prototype = {
|
|
|
2749
2748
|
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();
|
|
2750
2749
|
},
|
|
2751
2750
|
_disableDelayedDrag: function() {
|
|
2752
|
-
W &&
|
|
2751
|
+
W && Ps(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2753
2752
|
},
|
|
2754
2753
|
_disableDelayedDragEvents: function() {
|
|
2755
2754
|
var e = this.el.ownerDocument;
|
|
@@ -2758,16 +2757,16 @@ Q.prototype = {
|
|
|
2758
2757
|
_triggerDragStart: function(e, t) {
|
|
2759
2758
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(W, "dragend", this), L(q, "dragstart", this._onDragStart));
|
|
2760
2759
|
try {
|
|
2761
|
-
document.selection ?
|
|
2760
|
+
document.selection ? Hs(function() {
|
|
2762
2761
|
document.selection.empty();
|
|
2763
2762
|
}) : window.getSelection().removeAllRanges();
|
|
2764
2763
|
} catch {}
|
|
2765
2764
|
},
|
|
2766
2765
|
_dragStarted: function(e, t) {
|
|
2767
|
-
if (
|
|
2768
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover",
|
|
2766
|
+
if (ts = !1, q && W) {
|
|
2767
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", js);
|
|
2769
2768
|
var n = this.options;
|
|
2770
|
-
!e &&
|
|
2769
|
+
!e && xo(W, n.dragClass, !1), xo(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2771
2770
|
sortable: this,
|
|
2772
2771
|
name: "start",
|
|
2773
2772
|
originalEvent: t
|
|
@@ -2775,33 +2774,33 @@ Q.prototype = {
|
|
|
2775
2774
|
} else this._nulling();
|
|
2776
2775
|
},
|
|
2777
2776
|
_emulateDragOver: function() {
|
|
2778
|
-
if (
|
|
2779
|
-
this._lastX =
|
|
2780
|
-
for (var e = document.elementFromPoint(
|
|
2781
|
-
if (W.parentNode[
|
|
2782
|
-
if (t[
|
|
2777
|
+
if (as) {
|
|
2778
|
+
this._lastX = as.clientX, this._lastY = as.clientY, Os();
|
|
2779
|
+
for (var e = document.elementFromPoint(as.clientX, as.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(as.clientX, as.clientY), e !== t);) t = e;
|
|
2780
|
+
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2781
|
+
if (t[V]) {
|
|
2783
2782
|
var n = void 0;
|
|
2784
|
-
if (n = t[
|
|
2785
|
-
clientX:
|
|
2786
|
-
clientY:
|
|
2783
|
+
if (n = t[V]._onDragOver({
|
|
2784
|
+
clientX: as.clientX,
|
|
2785
|
+
clientY: as.clientY,
|
|
2787
2786
|
target: e,
|
|
2788
2787
|
rootEl: t
|
|
2789
2788
|
}), n && !this.options.dragoverBubble) break;
|
|
2790
2789
|
}
|
|
2791
2790
|
e = t;
|
|
2792
2791
|
} while (t = t.parentNode);
|
|
2793
|
-
|
|
2792
|
+
ks();
|
|
2794
2793
|
}
|
|
2795
2794
|
},
|
|
2796
2795
|
_onTouchMove: function(e) {
|
|
2797
|
-
if (
|
|
2798
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2799
|
-
if (!Q.active && !
|
|
2796
|
+
if (is) {
|
|
2797
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && So(K, !0), o = K && a && a.a, s = K && a && a.d, c = bs && Z && ko(Z), l = (i.clientX - is.clientX + r.x) / (o || 1) + (c ? c[0] - gs[0] : 0) / (o || 1), u = (i.clientY - is.clientY + r.y) / (s || 1) + (c ? c[1] - gs[1] : 0) / (s || 1);
|
|
2798
|
+
if (!Q.active && !ts) {
|
|
2800
2799
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2801
2800
|
this._onDragStart(e, !0);
|
|
2802
2801
|
}
|
|
2803
2802
|
if (K) {
|
|
2804
|
-
a ? (a.e += l - (
|
|
2803
|
+
a ? (a.e += l - (os || 0), a.f += u - (ss || 0)) : a = {
|
|
2805
2804
|
a: 1,
|
|
2806
2805
|
b: 0,
|
|
2807
2806
|
c: 0,
|
|
@@ -2810,35 +2809,35 @@ Q.prototype = {
|
|
|
2810
2809
|
f: u
|
|
2811
2810
|
};
|
|
2812
2811
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2813
|
-
|
|
2812
|
+
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), os = l, ss = u, as = i;
|
|
2814
2813
|
}
|
|
2815
2814
|
e.cancelable && e.preventDefault();
|
|
2816
2815
|
}
|
|
2817
2816
|
},
|
|
2818
2817
|
_appendGhost: function() {
|
|
2819
2818
|
if (!K) {
|
|
2820
|
-
var e = this.options.fallbackOnBody ? document.body : q, t =
|
|
2821
|
-
if (
|
|
2822
|
-
for (Z = e;
|
|
2823
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2819
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, bs, !0, e), n = this.options;
|
|
2820
|
+
if (bs) {
|
|
2821
|
+
for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2822
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = wo()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = wo(), gs = ko(Z);
|
|
2824
2823
|
}
|
|
2825
|
-
K = W.cloneNode(!0),
|
|
2824
|
+
K = W.cloneNode(!0), xo(K, n.ghostClass, !1), xo(K, n.fallbackClass, !0), xo(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position", bs ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", cs / parseInt(K.style.width) * 100 + "% " + ls / parseInt(K.style.height) * 100 + "%");
|
|
2826
2825
|
}
|
|
2827
2826
|
},
|
|
2828
2827
|
_onDragStart: function(e, t) {
|
|
2829
2828
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
2830
|
-
H("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (H("setupClone", this), Q.eventCanceled || (J =
|
|
2829
|
+
H("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (H("setupClone", this), Q.eventCanceled || (J = Ro(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), xo(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Hs(function() {
|
|
2831
2830
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
2832
2831
|
sortable: n,
|
|
2833
2832
|
name: "clone"
|
|
2834
2833
|
}));
|
|
2835
|
-
}), !t &&
|
|
2834
|
+
}), !t && xo(W, i.dragClass, !0), t ? (ns = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), L(document, "drop", n), z(W, "transform", "translateZ(0)")), ts = !0, n._dragStartId = Hs(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), us = !0, po && z(document.body, "user-select", "none"));
|
|
2836
2835
|
},
|
|
2837
2836
|
_onDragOver: function(e) {
|
|
2838
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2839
|
-
if (
|
|
2837
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = es === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2838
|
+
if (_s) return;
|
|
2840
2839
|
function h(o, s) {
|
|
2841
|
-
H(o, p,
|
|
2840
|
+
H(o, p, to({
|
|
2842
2841
|
evt: e,
|
|
2843
2842
|
isOwner: l,
|
|
2844
2843
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2850,7 +2849,7 @@ Q.prototype = {
|
|
|
2850
2849
|
target: n,
|
|
2851
2850
|
completed: _,
|
|
2852
2851
|
onMove: function(n, i) {
|
|
2853
|
-
return
|
|
2852
|
+
return Ns(q, t, W, r, n, B(n), e, i);
|
|
2854
2853
|
},
|
|
2855
2854
|
changed: v
|
|
2856
2855
|
}, s));
|
|
@@ -2859,50 +2858,50 @@ Q.prototype = {
|
|
|
2859
2858
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2860
2859
|
}
|
|
2861
2860
|
function _(r) {
|
|
2862
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2861
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (xo(W, X ? X.options.ghostClass : c.options.ghostClass, !1), xo(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
2863
2862
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2864
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
2863
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (ds = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && As(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2865
2864
|
}
|
|
2866
2865
|
function v() {
|
|
2867
|
-
Y =
|
|
2866
|
+
Y = Oo(W), $o = Oo(W, o.draggable), U({
|
|
2868
2867
|
sortable: p,
|
|
2869
2868
|
name: "change",
|
|
2870
2869
|
toEl: t,
|
|
2871
2870
|
newIndex: Y,
|
|
2872
|
-
newDraggableIndex:
|
|
2871
|
+
newDraggableIndex: $o,
|
|
2873
2872
|
originalEvent: e
|
|
2874
2873
|
});
|
|
2875
2874
|
}
|
|
2876
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2875
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = yo(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2877
2876
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2878
|
-
if (
|
|
2879
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
2880
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2881
|
-
var y =
|
|
2882
|
-
if (!y ||
|
|
2877
|
+
if (ns = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = es.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
2878
|
+
if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2879
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Jo ? q.insertBefore(W, Jo) : q.appendChild(W)), _(!0);
|
|
2880
|
+
var y = Do(t, o.draggable);
|
|
2881
|
+
if (!y || Ls(e, f, this) && !y.animated) {
|
|
2883
2882
|
if (y === W) return _(!1);
|
|
2884
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2885
|
-
} else if (y &&
|
|
2886
|
-
var b =
|
|
2883
|
+
if (y && t === e.target && (n = y), n && (i = B(n)), Ns(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
|
|
2884
|
+
} else if (y && Is(e, f, this)) {
|
|
2885
|
+
var b = Eo(t, 0, o, !0);
|
|
2887
2886
|
if (b === W) return _(!1);
|
|
2888
|
-
if (n = b, i =
|
|
2887
|
+
if (n = b, i = B(n), Ns(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
2889
2888
|
} else if (n.parentNode === t) {
|
|
2890
|
-
i =
|
|
2891
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
2892
|
-
|
|
2889
|
+
i = B(n);
|
|
2890
|
+
var x = 0, S, C = W.parentNode !== t, w = !Ts(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = To(n, "top", "top") || To(W, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
2891
|
+
ds !== n && (S = i[T], ps = !1, ms = !w && o.invertSwap || C), x = Rs(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, ms, ds === n);
|
|
2893
2892
|
var O;
|
|
2894
2893
|
if (x !== 0) {
|
|
2895
|
-
var k =
|
|
2894
|
+
var k = Oo(W);
|
|
2896
2895
|
do
|
|
2897
2896
|
k -= x, O = G.children[k];
|
|
2898
|
-
while (O && (
|
|
2897
|
+
while (O && (z(O, "display") === "none" || O === K));
|
|
2899
2898
|
}
|
|
2900
2899
|
if (x === 0 || O === n) return _(!1);
|
|
2901
|
-
|
|
2900
|
+
ds = n, fs = x;
|
|
2902
2901
|
var A = n.nextElementSibling, j = !1;
|
|
2903
2902
|
j = x === 1;
|
|
2904
|
-
var M =
|
|
2905
|
-
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1),
|
|
2903
|
+
var M = Ns(q, t, W, r, n, i, e, j);
|
|
2904
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), _s = !0, setTimeout(Fs, 30), g(), j && !A ? t.appendChild(W) : n.parentNode.insertBefore(W, j ? A : n), E && Lo(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !ms && (hs = Math.abs(S - B(n)[T])), v(), _(!0);
|
|
2906
2905
|
}
|
|
2907
2906
|
if (t.contains(W)) return _(!1);
|
|
2908
2907
|
}
|
|
@@ -2910,7 +2909,7 @@ Q.prototype = {
|
|
|
2910
2909
|
},
|
|
2911
2910
|
_ignoreWhileAnimating: null,
|
|
2912
2911
|
_offMoveEvents: function() {
|
|
2913
|
-
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover",
|
|
2912
|
+
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", As), R(document, "mousemove", As), R(document, "touchmove", As);
|
|
2914
2913
|
},
|
|
2915
2914
|
_offUpEvents: function() {
|
|
2916
2915
|
var e = this.el.ownerDocument;
|
|
@@ -2918,14 +2917,14 @@ Q.prototype = {
|
|
|
2918
2917
|
},
|
|
2919
2918
|
_onDrop: function(e) {
|
|
2920
2919
|
var t = this.el, n = this.options;
|
|
2921
|
-
Y =
|
|
2920
|
+
Y = Oo(W), $o = Oo(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = Oo(W), $o = Oo(W, n.draggable), Q.eventCanceled || (ts = !1, ms = !1, ps = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Us(this.cloneId), Us(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), po && z(document.body, "user-select", ""), z(W, "transform", ""), e && (us && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && R(W, "dragend", this), Ps(W), W.style["will-change"] = "", us && !ts && xo(W, X ? X.options.ghostClass : this.options.ghostClass, !1), xo(W, this.options.chosenClass, !1), U({
|
|
2922
2921
|
sortable: this,
|
|
2923
2922
|
name: "unchoose",
|
|
2924
2923
|
toEl: G,
|
|
2925
2924
|
newIndex: null,
|
|
2926
2925
|
newDraggableIndex: null,
|
|
2927
2926
|
originalEvent: e
|
|
2928
|
-
}), q === G ? Y !==
|
|
2927
|
+
}), q === G ? Y !== Zo && Y >= 0 && (U({
|
|
2929
2928
|
sortable: this,
|
|
2930
2929
|
name: "update",
|
|
2931
2930
|
toEl: G,
|
|
@@ -2957,7 +2956,7 @@ Q.prototype = {
|
|
|
2957
2956
|
name: "sort",
|
|
2958
2957
|
toEl: G,
|
|
2959
2958
|
originalEvent: e
|
|
2960
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
2959
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Zo, $o = Qo), U({
|
|
2961
2960
|
sortable: this,
|
|
2962
2961
|
name: "end",
|
|
2963
2962
|
toEl: G,
|
|
@@ -2965,9 +2964,9 @@ Q.prototype = {
|
|
|
2965
2964
|
}), this.save())))), this._nulling();
|
|
2966
2965
|
},
|
|
2967
2966
|
_nulling: function() {
|
|
2968
|
-
H("nulling", this), q = W = G = K =
|
|
2967
|
+
H("nulling", this), q = W = G = K = Jo = J = Yo = Xo = is = as = us = Y = $o = Zo = Qo = ds = fs = X = es = Q.dragged = Q.ghost = Q.clone = Q.active = null, vs.forEach(function(e) {
|
|
2969
2968
|
e.checked = !0;
|
|
2970
|
-
}),
|
|
2969
|
+
}), vs.length = os = ss = 0;
|
|
2971
2970
|
},
|
|
2972
2971
|
handleEvent: function(e) {
|
|
2973
2972
|
switch (e.type) {
|
|
@@ -2977,20 +2976,20 @@ Q.prototype = {
|
|
|
2977
2976
|
break;
|
|
2978
2977
|
case "dragenter":
|
|
2979
2978
|
case "dragover":
|
|
2980
|
-
W && (this._onDragOver(e),
|
|
2979
|
+
W && (this._onDragOver(e), Ms(e));
|
|
2981
2980
|
break;
|
|
2982
2981
|
case "selectstart": e.preventDefault();
|
|
2983
2982
|
}
|
|
2984
2983
|
},
|
|
2985
2984
|
toArray: function() {
|
|
2986
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2985
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], yo(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Bs(t));
|
|
2987
2986
|
return e;
|
|
2988
2987
|
},
|
|
2989
2988
|
sort: function(e, t) {
|
|
2990
2989
|
var n = {}, r = this.el;
|
|
2991
2990
|
this.toArray().forEach(function(e, t) {
|
|
2992
2991
|
var i = r.children[t];
|
|
2993
|
-
|
|
2992
|
+
yo(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2994
2993
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2995
2994
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2996
2995
|
}), t && this.animateAll();
|
|
@@ -3000,122 +2999,122 @@ Q.prototype = {
|
|
|
3000
2999
|
e && e.set && e.set(this);
|
|
3001
3000
|
},
|
|
3002
3001
|
closest: function(e, t) {
|
|
3003
|
-
return
|
|
3002
|
+
return yo(e, t || this.options.draggable, this.el, !1);
|
|
3004
3003
|
},
|
|
3005
3004
|
option: function(e, t) {
|
|
3006
3005
|
var n = this.options;
|
|
3007
3006
|
if (t === void 0) return n[e];
|
|
3008
|
-
var r =
|
|
3009
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3007
|
+
var r = Go.modifyOption(this, e, t);
|
|
3008
|
+
n[e] = r === void 0 ? t : r, e === "group" && Ds(n);
|
|
3010
3009
|
},
|
|
3011
3010
|
destroy: function() {
|
|
3012
3011
|
H("destroy", this);
|
|
3013
3012
|
var e = this.el;
|
|
3014
|
-
e[
|
|
3013
|
+
e[V] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3015
3014
|
e.removeAttribute("draggable");
|
|
3016
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3015
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), rs.splice(rs.indexOf(this.el), 1), this.el = e = null;
|
|
3017
3016
|
},
|
|
3018
3017
|
_hideClone: function() {
|
|
3019
|
-
if (!
|
|
3018
|
+
if (!Xo) {
|
|
3020
3019
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3021
|
-
|
|
3020
|
+
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Xo = !0;
|
|
3022
3021
|
}
|
|
3023
3022
|
},
|
|
3024
3023
|
_showClone: function(e) {
|
|
3025
3024
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3026
|
-
else if (
|
|
3025
|
+
else if (Xo) {
|
|
3027
3026
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
3028
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
3027
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Jo ? q.insertBefore(J, Jo) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), Xo = !1;
|
|
3029
3028
|
}
|
|
3030
3029
|
}
|
|
3031
3030
|
};
|
|
3032
|
-
function
|
|
3031
|
+
function Ms(e) {
|
|
3033
3032
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3034
3033
|
}
|
|
3035
|
-
function
|
|
3036
|
-
var c, l = e[
|
|
3037
|
-
return window.CustomEvent && !
|
|
3034
|
+
function Ns(e, t, n, r, i, a, o, s) {
|
|
3035
|
+
var c, l = e[V], u = l.options.onMove, d;
|
|
3036
|
+
return window.CustomEvent && !lo && !uo ? c = new CustomEvent("move", {
|
|
3038
3037
|
bubbles: !0,
|
|
3039
3038
|
cancelable: !0
|
|
3040
|
-
}) : (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 ||
|
|
3039
|
+
}) : (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 || B(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3041
3040
|
}
|
|
3042
|
-
function
|
|
3041
|
+
function Ps(e) {
|
|
3043
3042
|
e.draggable = !1;
|
|
3044
3043
|
}
|
|
3045
|
-
function
|
|
3046
|
-
|
|
3044
|
+
function Fs() {
|
|
3045
|
+
_s = !1;
|
|
3047
3046
|
}
|
|
3048
|
-
function
|
|
3049
|
-
var r =
|
|
3047
|
+
function Is(e, t, n) {
|
|
3048
|
+
var r = B(Eo(n.el, 0, n.options, !0)), i = zo(n.el, n.options, K), a = 10;
|
|
3050
3049
|
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;
|
|
3051
3050
|
}
|
|
3052
|
-
function
|
|
3053
|
-
var r =
|
|
3051
|
+
function Ls(e, t, n) {
|
|
3052
|
+
var r = B(Do(n.el, n.options.draggable)), i = zo(n.el, n.options, K), a = 10;
|
|
3054
3053
|
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;
|
|
3055
3054
|
}
|
|
3056
|
-
function
|
|
3055
|
+
function Rs(e, t, n, r, i, a, o, s) {
|
|
3057
3056
|
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;
|
|
3058
3057
|
if (!o) {
|
|
3059
|
-
if (s &&
|
|
3060
|
-
if (!
|
|
3061
|
-
else if (
|
|
3062
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3058
|
+
if (s && hs < l * i) {
|
|
3059
|
+
if (!ps && (fs === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (ps = !0), ps) f = !0;
|
|
3060
|
+
else if (fs === 1 ? c < u + hs : c > d - hs) return -fs;
|
|
3061
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return zs(t);
|
|
3063
3062
|
}
|
|
3064
3063
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3065
3064
|
}
|
|
3066
|
-
function
|
|
3067
|
-
return
|
|
3065
|
+
function zs(e) {
|
|
3066
|
+
return Oo(W) < Oo(e) ? 1 : -1;
|
|
3068
3067
|
}
|
|
3069
|
-
function
|
|
3068
|
+
function Bs(e) {
|
|
3070
3069
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3071
3070
|
return r.toString(36);
|
|
3072
3071
|
}
|
|
3073
|
-
function
|
|
3074
|
-
|
|
3072
|
+
function Vs(e) {
|
|
3073
|
+
vs.length = 0;
|
|
3075
3074
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3076
3075
|
var r = t[n];
|
|
3077
|
-
r.checked &&
|
|
3076
|
+
r.checked && vs.push(r);
|
|
3078
3077
|
}
|
|
3079
3078
|
}
|
|
3080
|
-
function
|
|
3079
|
+
function Hs(e) {
|
|
3081
3080
|
return setTimeout(e, 0);
|
|
3082
3081
|
}
|
|
3083
|
-
function
|
|
3082
|
+
function Us(e) {
|
|
3084
3083
|
return clearTimeout(e);
|
|
3085
3084
|
}
|
|
3086
|
-
|
|
3087
|
-
(Q.active ||
|
|
3085
|
+
ys && L(document, "touchmove", function(e) {
|
|
3086
|
+
(Q.active || ts) && e.cancelable && e.preventDefault();
|
|
3088
3087
|
}), Q.utils = {
|
|
3089
3088
|
on: L,
|
|
3090
3089
|
off: R,
|
|
3091
|
-
css:
|
|
3092
|
-
find:
|
|
3090
|
+
css: z,
|
|
3091
|
+
find: Co,
|
|
3093
3092
|
is: function(e, t) {
|
|
3094
|
-
return !!
|
|
3095
|
-
},
|
|
3096
|
-
extend:
|
|
3097
|
-
throttle:
|
|
3098
|
-
closest:
|
|
3099
|
-
toggleClass:
|
|
3100
|
-
clone:
|
|
3101
|
-
index:
|
|
3102
|
-
nextTick:
|
|
3103
|
-
cancelNextTick:
|
|
3104
|
-
detectDirection:
|
|
3105
|
-
getChild:
|
|
3093
|
+
return !!yo(e, t, e, !1);
|
|
3094
|
+
},
|
|
3095
|
+
extend: Mo,
|
|
3096
|
+
throttle: Fo,
|
|
3097
|
+
closest: yo,
|
|
3098
|
+
toggleClass: xo,
|
|
3099
|
+
clone: Ro,
|
|
3100
|
+
index: Oo,
|
|
3101
|
+
nextTick: Hs,
|
|
3102
|
+
cancelNextTick: Us,
|
|
3103
|
+
detectDirection: ws,
|
|
3104
|
+
getChild: Eo
|
|
3106
3105
|
}, Q.get = function(e) {
|
|
3107
|
-
return e[
|
|
3106
|
+
return e[V];
|
|
3108
3107
|
}, Q.mount = function() {
|
|
3109
3108
|
var e = [...arguments];
|
|
3110
3109
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3111
3110
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3112
|
-
e.utils && (Q.utils =
|
|
3111
|
+
e.utils && (Q.utils = to(to({}, Q.utils), e.utils)), Go.mount(e);
|
|
3113
3112
|
});
|
|
3114
3113
|
}, Q.create = function(e, t) {
|
|
3115
3114
|
return new Q(e, t);
|
|
3116
|
-
}, Q.version =
|
|
3117
|
-
var $ = [],
|
|
3118
|
-
function
|
|
3115
|
+
}, Q.version = so;
|
|
3116
|
+
var $ = [], Ws, Gs, Ks = !1, qs, Js, Ys, Xs;
|
|
3117
|
+
function Zs() {
|
|
3119
3118
|
function e() {
|
|
3120
3119
|
for (var e in this.defaults = {
|
|
3121
3120
|
scroll: !0,
|
|
@@ -3135,63 +3134,63 @@ function Bs() {
|
|
|
3135
3134
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3136
3135
|
},
|
|
3137
3136
|
drop: function() {
|
|
3138
|
-
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3137
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), $s(), Qs(), Io();
|
|
3139
3138
|
},
|
|
3140
3139
|
nulling: function() {
|
|
3141
|
-
|
|
3140
|
+
Ys = Gs = Ws = Ks = Xs = qs = Js = null, $.length = 0;
|
|
3142
3141
|
},
|
|
3143
3142
|
_handleFallbackAutoScroll: function(e) {
|
|
3144
3143
|
this._handleAutoScroll(e, !0);
|
|
3145
3144
|
},
|
|
3146
3145
|
_handleAutoScroll: function(e, t) {
|
|
3147
3146
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3148
|
-
if (
|
|
3149
|
-
|
|
3150
|
-
var o =
|
|
3151
|
-
|
|
3152
|
-
var a =
|
|
3153
|
-
a !== o && (o = a,
|
|
3154
|
-
}, 10),
|
|
3147
|
+
if (Ys = e, t || this.options.forceAutoScrollFallback || uo || lo || po) {
|
|
3148
|
+
ec(e, this.options, a, t);
|
|
3149
|
+
var o = jo(a, !0);
|
|
3150
|
+
Ks && (!Xs || r !== qs || i !== Js) && (Xs && $s(), Xs = setInterval(function() {
|
|
3151
|
+
var a = jo(document.elementFromPoint(r, i), !0);
|
|
3152
|
+
a !== o && (o = a, Qs()), ec(e, n.options, a, t);
|
|
3153
|
+
}, 10), qs = r, Js = i);
|
|
3155
3154
|
} else {
|
|
3156
|
-
if (!this.options.bubbleScroll ||
|
|
3157
|
-
|
|
3155
|
+
if (!this.options.bubbleScroll || jo(a, !0) === wo()) {
|
|
3156
|
+
Qs();
|
|
3158
3157
|
return;
|
|
3159
3158
|
}
|
|
3160
|
-
|
|
3159
|
+
ec(e, this.options, jo(a, !1), !1);
|
|
3161
3160
|
}
|
|
3162
3161
|
}
|
|
3163
|
-
},
|
|
3162
|
+
}, io(e, {
|
|
3164
3163
|
pluginName: "scroll",
|
|
3165
3164
|
initializeByDefault: !0
|
|
3166
3165
|
});
|
|
3167
3166
|
}
|
|
3168
|
-
function
|
|
3167
|
+
function Qs() {
|
|
3169
3168
|
$.forEach(function(e) {
|
|
3170
3169
|
clearInterval(e.pid);
|
|
3171
3170
|
}), $ = [];
|
|
3172
3171
|
}
|
|
3173
|
-
function
|
|
3174
|
-
clearInterval(
|
|
3172
|
+
function $s() {
|
|
3173
|
+
clearInterval(Xs);
|
|
3175
3174
|
}
|
|
3176
|
-
var
|
|
3175
|
+
var ec = Fo(function(e, t, n, r) {
|
|
3177
3176
|
if (t.scroll) {
|
|
3178
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3179
|
-
|
|
3180
|
-
var d = 0, f =
|
|
3177
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = wo(), l = !1, u;
|
|
3178
|
+
Gs !== n && (Gs = n, Qs(), Ws = t.scroll, u = t.scrollFn, Ws === !0 && (Ws = jo(n, !0)));
|
|
3179
|
+
var d = 0, f = Ws;
|
|
3181
3180
|
do {
|
|
3182
|
-
var p = f, m =
|
|
3181
|
+
var p = f, m = B(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 = z(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3183
3182
|
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"));
|
|
3184
3183
|
var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
|
|
3185
3184
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3186
3185
|
($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3187
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3186
|
+
r && this.layer === 0 && Q.active._onTouchMove(Ys);
|
|
3188
3187
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3189
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3188
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ys, $[this.layer].el) !== "continue" || Lo($[this.layer].el, n, t);
|
|
3190
3189
|
}.bind({ layer: d }), 24))), d++;
|
|
3191
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3192
|
-
|
|
3190
|
+
} while (t.bubbleScroll && f !== c && (f = jo(f, !1)));
|
|
3191
|
+
Ks = l;
|
|
3193
3192
|
}
|
|
3194
|
-
}, 30),
|
|
3193
|
+
}, 30), tc = function(e) {
|
|
3195
3194
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3196
3195
|
if (t) {
|
|
3197
3196
|
var c = n || i;
|
|
@@ -3203,8 +3202,8 @@ var Us = Co(function(e, t, n, r) {
|
|
|
3203
3202
|
}));
|
|
3204
3203
|
}
|
|
3205
3204
|
};
|
|
3206
|
-
function
|
|
3207
|
-
|
|
3205
|
+
function nc() {}
|
|
3206
|
+
nc.prototype = {
|
|
3208
3207
|
startIndex: null,
|
|
3209
3208
|
dragStart: function(e) {
|
|
3210
3209
|
var t = e.oldDraggableIndex;
|
|
@@ -3213,67 +3212,67 @@ Gs.prototype = {
|
|
|
3213
3212
|
onSpill: function(e) {
|
|
3214
3213
|
var t = e.dragEl, n = e.putSortable;
|
|
3215
3214
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3216
|
-
var r =
|
|
3215
|
+
var r = Eo(this.sortable.el, this.startIndex, this.options);
|
|
3217
3216
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3218
3217
|
},
|
|
3219
|
-
drop:
|
|
3220
|
-
},
|
|
3221
|
-
function
|
|
3222
|
-
|
|
3218
|
+
drop: tc
|
|
3219
|
+
}, io(nc, { pluginName: "revertOnSpill" });
|
|
3220
|
+
function rc() {}
|
|
3221
|
+
rc.prototype = {
|
|
3223
3222
|
onSpill: function(e) {
|
|
3224
3223
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3225
3224
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3226
3225
|
},
|
|
3227
|
-
drop:
|
|
3228
|
-
},
|
|
3229
|
-
function
|
|
3226
|
+
drop: tc
|
|
3227
|
+
}, io(rc, { pluginName: "removeOnSpill" }), Q.mount(new Zs()), Q.mount(rc, nc);
|
|
3228
|
+
function ic(e) {
|
|
3230
3229
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3231
3230
|
}
|
|
3232
|
-
function
|
|
3231
|
+
function ac(e) {
|
|
3233
3232
|
te() && O(e);
|
|
3234
3233
|
}
|
|
3235
|
-
function
|
|
3234
|
+
function oc(e) {
|
|
3236
3235
|
te() ? d(e) : a(e);
|
|
3237
3236
|
}
|
|
3238
|
-
var
|
|
3239
|
-
function
|
|
3240
|
-
|
|
3237
|
+
var sc = null, cc = null;
|
|
3238
|
+
function lc(e = null, t = null) {
|
|
3239
|
+
sc = e, cc = t;
|
|
3241
3240
|
}
|
|
3242
|
-
function
|
|
3241
|
+
function uc() {
|
|
3243
3242
|
return {
|
|
3244
|
-
data:
|
|
3245
|
-
clonedData:
|
|
3243
|
+
data: sc,
|
|
3244
|
+
clonedData: cc
|
|
3246
3245
|
};
|
|
3247
3246
|
}
|
|
3248
|
-
var
|
|
3249
|
-
function
|
|
3247
|
+
var dc = Symbol("cloneElement");
|
|
3248
|
+
function fc(...e) {
|
|
3250
3249
|
let t = te()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
3251
3250
|
Array.isArray(y(i)) || (o = i, i = null);
|
|
3252
|
-
let s = null, { immediate: l = !0, clone: u =
|
|
3251
|
+
let s = null, { immediate: l = !0, clone: u = ic, forceFallback: d, fallbackOnBody: p, customUpdate: m } = y(o) ?? {};
|
|
3253
3252
|
function h(e) {
|
|
3254
3253
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3255
3254
|
n = d && !p ? o.slice(0, -1) : o;
|
|
3256
3255
|
let s = y(y(i)?.[r]), c = u(s);
|
|
3257
|
-
|
|
3256
|
+
lc(s, c), a[dc] = c;
|
|
3258
3257
|
}
|
|
3259
3258
|
function g(e) {
|
|
3260
|
-
let t = e.item[
|
|
3261
|
-
if (!
|
|
3262
|
-
if (
|
|
3259
|
+
let t = e.item[dc];
|
|
3260
|
+
if (!Ua(t)) {
|
|
3261
|
+
if (Ka(e.item), c(i)) {
|
|
3263
3262
|
let n = [...y(i)];
|
|
3264
|
-
i.value =
|
|
3263
|
+
i.value = Ha(n, e.newDraggableIndex, t);
|
|
3265
3264
|
return;
|
|
3266
3265
|
}
|
|
3267
|
-
|
|
3266
|
+
Ha(y(i), e.newDraggableIndex, t);
|
|
3268
3267
|
}
|
|
3269
3268
|
}
|
|
3270
3269
|
function _(e) {
|
|
3271
3270
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3272
|
-
if (
|
|
3271
|
+
if (Ga(t, n, r), o === "clone") Ka(s);
|
|
3273
3272
|
else if (c(i)) {
|
|
3274
3273
|
let e = [...y(i)];
|
|
3275
|
-
i.value =
|
|
3276
|
-
} else
|
|
3274
|
+
i.value = Va(e, a);
|
|
3275
|
+
} else Va(y(i), a);
|
|
3277
3276
|
}
|
|
3278
3277
|
function v(e) {
|
|
3279
3278
|
if (m) {
|
|
@@ -3281,10 +3280,10 @@ function tc(...e) {
|
|
|
3281
3280
|
return;
|
|
3282
3281
|
}
|
|
3283
3282
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3284
|
-
if (
|
|
3283
|
+
if (Ka(n), Ga(t, n, r), c(i)) {
|
|
3285
3284
|
let e = [...y(i)];
|
|
3286
|
-
i.value =
|
|
3287
|
-
} else
|
|
3285
|
+
i.value = Ra(e, a, o);
|
|
3286
|
+
} else Ra(y(i), a, o);
|
|
3288
3287
|
}
|
|
3289
3288
|
function b(e) {
|
|
3290
3289
|
let { newIndex: t, oldIndex: r, from: i, to: o } = e, s = null, c = t === r && i === o;
|
|
@@ -3303,7 +3302,7 @@ function tc(...e) {
|
|
|
3303
3302
|
n = null;
|
|
3304
3303
|
}
|
|
3305
3304
|
a(() => {
|
|
3306
|
-
if (
|
|
3305
|
+
if (lc(), s) throw s;
|
|
3307
3306
|
});
|
|
3308
3307
|
}
|
|
3309
3308
|
let x = {
|
|
@@ -3315,19 +3314,19 @@ function tc(...e) {
|
|
|
3315
3314
|
};
|
|
3316
3315
|
function S(e) {
|
|
3317
3316
|
let n = y(r);
|
|
3318
|
-
return e ||=
|
|
3317
|
+
return e ||= Wa(n) ? qa(n, t?.$el) : n, e && !Xa(e) && (e = e.$el), e || La("Root element not found"), e;
|
|
3319
3318
|
}
|
|
3320
3319
|
function C() {
|
|
3321
|
-
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3322
|
-
return
|
|
3323
|
-
|
|
3324
|
-
}),
|
|
3320
|
+
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r = Pa(e, ["immediate", "clone"]);
|
|
3321
|
+
return Za(r, (e, t) => {
|
|
3322
|
+
Qa(e) && (r[e] = (e, ...n) => ($a(e, uc()), t(e, ...n)));
|
|
3323
|
+
}), Ya(i === null ? {} : x, r);
|
|
3325
3324
|
}
|
|
3326
3325
|
let w = (e) => {
|
|
3327
3326
|
e = S(e), s && T.destroy(), s = new Q(e, C());
|
|
3328
3327
|
};
|
|
3329
3328
|
f(() => o, () => {
|
|
3330
|
-
s &&
|
|
3329
|
+
s && Za(C(), (e, t) => {
|
|
3331
3330
|
s?.option(e, t);
|
|
3332
3331
|
});
|
|
3333
3332
|
}, { deep: !0 });
|
|
@@ -3340,15 +3339,15 @@ function tc(...e) {
|
|
|
3340
3339
|
toArray: () => s?.toArray(),
|
|
3341
3340
|
closest: (...e) => s?.closest(...e)
|
|
3342
3341
|
};
|
|
3343
|
-
return
|
|
3342
|
+
return oc(() => {
|
|
3344
3343
|
l && w();
|
|
3345
|
-
}),
|
|
3344
|
+
}), ac(T.destroy), Na({
|
|
3346
3345
|
start: w,
|
|
3347
3346
|
pause: () => T?.option("disabled", !0),
|
|
3348
3347
|
resume: () => T?.option("disabled", !1)
|
|
3349
3348
|
}, T);
|
|
3350
3349
|
}
|
|
3351
|
-
var
|
|
3350
|
+
var pc = [
|
|
3352
3351
|
"update",
|
|
3353
3352
|
"start",
|
|
3354
3353
|
"add",
|
|
@@ -3361,7 +3360,7 @@ var nc = [
|
|
|
3361
3360
|
"clone",
|
|
3362
3361
|
"move",
|
|
3363
3362
|
"change"
|
|
3364
|
-
],
|
|
3363
|
+
], mc = [
|
|
3365
3364
|
"clone",
|
|
3366
3365
|
"animation",
|
|
3367
3366
|
"ghostClass",
|
|
@@ -3405,43 +3404,43 @@ var nc = [
|
|
|
3405
3404
|
"tag",
|
|
3406
3405
|
"target",
|
|
3407
3406
|
"customUpdate",
|
|
3408
|
-
...
|
|
3409
|
-
],
|
|
3407
|
+
...pc.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3408
|
+
], hc = F({
|
|
3410
3409
|
name: "VueDraggable",
|
|
3411
3410
|
model: {
|
|
3412
3411
|
prop: "modelValue",
|
|
3413
3412
|
event: "update:modelValue"
|
|
3414
3413
|
},
|
|
3415
|
-
props:
|
|
3416
|
-
emits: ["update:modelValue", ...
|
|
3414
|
+
props: mc,
|
|
3415
|
+
emits: ["update:modelValue", ...pc],
|
|
3417
3416
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3418
|
-
let a =
|
|
3417
|
+
let a = pc.reduce((e, t) => {
|
|
3419
3418
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3420
3419
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3421
3420
|
}, {}), o = N(() => {
|
|
3422
|
-
let t = j(e), { modelValue: n } = t, r =
|
|
3421
|
+
let t = j(e), { modelValue: n } = t, r = Pa(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3423
3422
|
let r = y(n);
|
|
3424
3423
|
return r !== void 0 && (e[t] = r), e;
|
|
3425
3424
|
}, {});
|
|
3426
|
-
return
|
|
3425
|
+
return Na(Na({}, a), Ba(Na(Na({}, i), o)));
|
|
3427
3426
|
}), s = N({
|
|
3428
3427
|
get: () => e.modelValue,
|
|
3429
3428
|
set: (e) => n("update:modelValue", e)
|
|
3430
|
-
}), c = _(), l = g(
|
|
3429
|
+
}), c = _(), l = g(fc(e.target || c, s, o));
|
|
3431
3430
|
return r(l), () => b(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3432
3431
|
}
|
|
3433
|
-
}),
|
|
3432
|
+
}), gc = {
|
|
3434
3433
|
mounted: "mounted",
|
|
3435
3434
|
unmounted: "unmounted"
|
|
3436
3435
|
};
|
|
3437
|
-
|
|
3436
|
+
gc.mounted, gc.unmounted;
|
|
3438
3437
|
//#endregion
|
|
3439
3438
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3440
|
-
var
|
|
3439
|
+
var _c = { class: "tpl:w-full" }, vc = {
|
|
3441
3440
|
key: 0,
|
|
3442
3441
|
"data-testid": "section-drop-hint",
|
|
3443
3442
|
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)]"
|
|
3444
|
-
},
|
|
3443
|
+
}, yc = /* @__PURE__ */ F({
|
|
3445
3444
|
__name: "SectionBlock",
|
|
3446
3445
|
props: {
|
|
3447
3446
|
block: {},
|
|
@@ -3449,13 +3448,13 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3449
3448
|
},
|
|
3450
3449
|
setup(e) {
|
|
3451
3450
|
let i = {
|
|
3452
|
-
title:
|
|
3453
|
-
paragraph:
|
|
3454
|
-
image:
|
|
3455
|
-
button:
|
|
3456
|
-
divider:
|
|
3457
|
-
custom:
|
|
3458
|
-
}, a = e, { t: s } =
|
|
3451
|
+
title: Ea,
|
|
3452
|
+
paragraph: da,
|
|
3453
|
+
image: Qi,
|
|
3454
|
+
button: Zr,
|
|
3455
|
+
divider: Pi,
|
|
3456
|
+
custom: Mi
|
|
3457
|
+
}, a = e, { t: s } = yn(), c = wt(tn, "SectionBlock"), u = p(en, null), d = p(pn, null), f = p(on, {}), h = p(fn, null);
|
|
3459
3458
|
function g(e) {
|
|
3460
3459
|
let t = f.savedBlocks;
|
|
3461
3460
|
t?.isPicking.value ? t.togglePick(a.block.id) : c.selectBlock(e);
|
|
@@ -3488,32 +3487,38 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3488
3487
|
}
|
|
3489
3488
|
let j = _(null);
|
|
3490
3489
|
function ee(e) {
|
|
3491
|
-
return O(e) ? !0 : j.value === e && T(e).filter((e) => E(e.id)).length <= 1;
|
|
3490
|
+
return c.state.previewMode ? !1 : O(e) ? !0 : j.value === e && T(e).filter((e) => E(e.id)).length <= 1;
|
|
3491
|
+
}
|
|
3492
|
+
function F(e) {
|
|
3493
|
+
return T(e).length === 0 && !c.state.previewMode;
|
|
3494
|
+
}
|
|
3495
|
+
function te(e) {
|
|
3496
|
+
return T(e).length === 0 && c.state.previewMode;
|
|
3492
3497
|
}
|
|
3493
|
-
function
|
|
3498
|
+
function I(e, t) {
|
|
3494
3499
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
|
|
3495
3500
|
for (; r.length <= e;) r.push([]);
|
|
3496
3501
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
3497
3502
|
}
|
|
3498
|
-
function
|
|
3499
|
-
return
|
|
3503
|
+
function re(e) {
|
|
3504
|
+
return Rr(e, d, i);
|
|
3500
3505
|
}
|
|
3501
|
-
function
|
|
3506
|
+
function ie(e, t) {
|
|
3502
3507
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
3503
3508
|
fieldValues: t.fieldValues,
|
|
3504
3509
|
dataSourceFetched: t.dataSourceFetched
|
|
3505
3510
|
});
|
|
3506
3511
|
}
|
|
3507
|
-
return (i, a) => (t(), S("div",
|
|
3512
|
+
return (i, a) => (t(), S("div", _c, [x("div", { class: k(["tpl:flex tpl:gap-0", { "tpl:flex-col": w.value }]) }, [(t(!0), S(M, null, l(b.value, (i, u) => (t(), S("div", {
|
|
3508
3513
|
key: u,
|
|
3509
|
-
class: k(["tpl:relative tpl:flex tpl:flex-col tpl:rounded",
|
|
3514
|
+
class: k(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", F(u) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3510
3515
|
style: n({ width: w.value ? "100%" : v.value[u] })
|
|
3511
|
-
}, [C(y(
|
|
3516
|
+
}, [C(y(hc), {
|
|
3512
3517
|
"model-value": T(u),
|
|
3513
3518
|
group: {
|
|
3514
3519
|
name: "blocks",
|
|
3515
3520
|
pull: !0,
|
|
3516
|
-
put: (e, t, n) => y(
|
|
3521
|
+
put: (e, t, n) => y(Da)(n)
|
|
3517
3522
|
},
|
|
3518
3523
|
animation: 150,
|
|
3519
3524
|
"ghost-class": "tpl-ghost",
|
|
@@ -3523,12 +3528,15 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3523
3528
|
"inverted-swap-threshold": .65,
|
|
3524
3529
|
"empty-insert-threshold": 20,
|
|
3525
3530
|
"force-fallback": !0,
|
|
3526
|
-
class: k(["tpl:grow", {
|
|
3531
|
+
class: k(["tpl:grow", {
|
|
3532
|
+
"tpl:min-h-[60px]": ee(u),
|
|
3533
|
+
"tpl:min-h-[34px]": te(u)
|
|
3534
|
+
}]),
|
|
3527
3535
|
onStart: (e) => j.value = u,
|
|
3528
3536
|
onEnd: a[0] ||= (e) => j.value = null,
|
|
3529
|
-
"onUpdate:modelValue": (e) =>
|
|
3537
|
+
"onUpdate:modelValue": (e) => I(u, e)
|
|
3530
3538
|
}, {
|
|
3531
|
-
default: r(() => [(t(!0), S(M, null, l(T(u), (n) => m((t(), S("div", { key: n.id }, [C(
|
|
3539
|
+
default: r(() => [(t(!0), S(M, null, l(T(u), (n) => m((t(), S("div", { key: n.id }, [C(wa, {
|
|
3532
3540
|
block: n,
|
|
3533
3541
|
"is-selected": y(c).state.selectedBlockId === n.id,
|
|
3534
3542
|
viewport: e.viewport,
|
|
@@ -3536,10 +3544,10 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3536
3544
|
nested: "",
|
|
3537
3545
|
onSelect: (e) => g(n.id)
|
|
3538
3546
|
}, {
|
|
3539
|
-
default: r(() => [(t(), A(o(
|
|
3547
|
+
default: r(() => [(t(), A(o(re(n)), {
|
|
3540
3548
|
block: n,
|
|
3541
3549
|
viewport: e.viewport,
|
|
3542
|
-
onFetchData: (e) =>
|
|
3550
|
+
onFetchData: (e) => ie(n, e),
|
|
3543
3551
|
onUpdate: (e) => y(c).updateBlock(n.id, e)
|
|
3544
3552
|
}, null, 40, [
|
|
3545
3553
|
"block",
|
|
@@ -3562,14 +3570,14 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3562
3570
|
"class",
|
|
3563
3571
|
"onStart",
|
|
3564
3572
|
"onUpdate:modelValue"
|
|
3565
|
-
]),
|
|
3573
|
+
]), F(u) ? (t(), S("div", vc, [x("span", null, D(y(s).section.dropHere), 1)])) : P("", !0)], 6))), 128))], 2)]));
|
|
3566
3574
|
}
|
|
3567
|
-
}),
|
|
3575
|
+
}), bc = ["width", "height"], xc = [
|
|
3568
3576
|
"d",
|
|
3569
3577
|
"stroke",
|
|
3570
3578
|
"stroke-opacity",
|
|
3571
3579
|
"stroke-width"
|
|
3572
|
-
],
|
|
3580
|
+
], Sc = ["d", "fill"], Cc = /* @__PURE__ */ F({
|
|
3573
3581
|
__name: "SocialIconSvg",
|
|
3574
3582
|
props: {
|
|
3575
3583
|
platform: {},
|
|
@@ -3578,7 +3586,7 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3578
3586
|
iconSize: {}
|
|
3579
3587
|
},
|
|
3580
3588
|
setup(e) {
|
|
3581
|
-
let r = e, i = N(() =>
|
|
3589
|
+
let r = e, i = N(() => lt[r.platform]), a = N(() => ft[r.iconSize]), o = N(() => Xe(r.platform, r.iconTone)), s = N(() => Ne(r.iconStyle, r.iconTone)), c = N(() => {
|
|
3582
3590
|
let e = {
|
|
3583
3591
|
display: "inline-flex",
|
|
3584
3592
|
alignItems: "center",
|
|
@@ -3616,7 +3624,7 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3616
3624
|
};
|
|
3617
3625
|
default: return e;
|
|
3618
3626
|
}
|
|
3619
|
-
}), l = N(() =>
|
|
3627
|
+
}), l = N(() => Ae(r.iconStyle)), u = N(() => Math.floor(a.value * l.value));
|
|
3620
3628
|
function d(e) {
|
|
3621
3629
|
let t = `${e.width / 2 * a.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), r = `${e.color}${n}`;
|
|
3622
3630
|
return `0 0 0 ${t} ${r}, inset 0 0 0 ${t} ${r}`;
|
|
@@ -3637,28 +3645,28 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3637
3645
|
"stroke-opacity": s.value.opacity,
|
|
3638
3646
|
"stroke-width": s.value.width / l.value,
|
|
3639
3647
|
"stroke-linejoin": "round"
|
|
3640
|
-
}, null, 8,
|
|
3648
|
+
}, null, 8, xc)) : P("", !0), x("path", {
|
|
3641
3649
|
d: i.value.path,
|
|
3642
3650
|
fill: f.value
|
|
3643
|
-
}, null, 8,
|
|
3651
|
+
}, null, 8, Sc)], 8, bc))], 4));
|
|
3644
3652
|
}
|
|
3645
|
-
}),
|
|
3653
|
+
}), wc = { class: "tpl:w-full" }, Tc = ["href"], Ec = {
|
|
3646
3654
|
key: 1,
|
|
3647
3655
|
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)]"
|
|
3648
|
-
},
|
|
3656
|
+
}, Dc = /* @__PURE__ */ F({
|
|
3649
3657
|
__name: "SocialIconsBlock",
|
|
3650
3658
|
props: {
|
|
3651
3659
|
block: {},
|
|
3652
3660
|
viewport: {}
|
|
3653
3661
|
},
|
|
3654
3662
|
setup(e) {
|
|
3655
|
-
let r = e, { t: i } =
|
|
3663
|
+
let r = e, { t: i } = yn(), a = N(() => ({
|
|
3656
3664
|
display: "flex",
|
|
3657
3665
|
flexWrap: "wrap",
|
|
3658
3666
|
gap: `${r.block.spacing}px`,
|
|
3659
3667
|
justifyContent: r.block.align === "left" ? "flex-start" : r.block.align === "right" ? "flex-end" : "center"
|
|
3660
3668
|
})), o = N(() => r.block.icons.length > 0);
|
|
3661
|
-
return (r, s) => (t(), S("div",
|
|
3669
|
+
return (r, s) => (t(), S("div", wc, [o.value ? (t(), S("div", {
|
|
3662
3670
|
key: 0,
|
|
3663
3671
|
style: n(a.value)
|
|
3664
3672
|
}, [(t(!0), S(M, null, l(e.block.icons, (n) => (t(), S("a", {
|
|
@@ -3666,7 +3674,7 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3666
3674
|
href: n.url || "#",
|
|
3667
3675
|
class: "tpl:cursor-default",
|
|
3668
3676
|
onClick: s[0] ||= I(() => {}, ["prevent"])
|
|
3669
|
-
}, [C(
|
|
3677
|
+
}, [C(Cc, {
|
|
3670
3678
|
platform: n.platform,
|
|
3671
3679
|
"icon-style": e.block.iconStyle,
|
|
3672
3680
|
"icon-tone": e.block.iconTone,
|
|
@@ -3676,44 +3684,44 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3676
3684
|
"icon-style",
|
|
3677
3685
|
"icon-tone",
|
|
3678
3686
|
"icon-size"
|
|
3679
|
-
])], 8,
|
|
3687
|
+
])], 8, Tc))), 128))], 4)) : (t(), S("div", Ec, [C(y(dt), { size: 16 }), x("span", null, D(y(i).social.addIcons), 1)]))]));
|
|
3680
3688
|
}
|
|
3681
|
-
}),
|
|
3689
|
+
}), Oc = { class: "tpl:w-full" }, kc = {
|
|
3682
3690
|
key: 0,
|
|
3683
3691
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3684
3692
|
style: {
|
|
3685
3693
|
"background-color": "var(--tpl-bg-hover)",
|
|
3686
3694
|
color: "var(--tpl-text-dim)"
|
|
3687
3695
|
}
|
|
3688
|
-
},
|
|
3696
|
+
}, Ac = /* @__PURE__ */ F({
|
|
3689
3697
|
__name: "SpacerBlock",
|
|
3690
3698
|
props: {
|
|
3691
3699
|
block: {},
|
|
3692
3700
|
viewport: {}
|
|
3693
3701
|
},
|
|
3694
3702
|
setup(e) {
|
|
3695
|
-
let r = e, i =
|
|
3703
|
+
let r = e, i = wt(tn, "SpacerBlock"), a = N(() => ({
|
|
3696
3704
|
height: `${r.block.height}px`,
|
|
3697
3705
|
minHeight: `${r.block.height}px`,
|
|
3698
3706
|
...i.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3699
3707
|
}));
|
|
3700
|
-
return (r, o) => (t(), S("div",
|
|
3708
|
+
return (r, o) => (t(), S("div", Oc, [x("div", {
|
|
3701
3709
|
style: n(a.value),
|
|
3702
|
-
class: k(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !y(i).state.previewMode }])
|
|
3703
|
-
}, [y(i).state.previewMode ? P("", !0) : (t(), S("span",
|
|
3710
|
+
class: k(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !y(i).state.previewMode }])
|
|
3711
|
+
}, [y(i).state.previewMode ? P("", !0) : (t(), S("span", kc, D(e.block.height) + "px ", 1))], 6)]));
|
|
3704
3712
|
}
|
|
3705
|
-
}),
|
|
3713
|
+
}), jc = { class: "tpl:w-full" }, Mc = { key: 0 }, Nc = [
|
|
3706
3714
|
"aria-label",
|
|
3707
3715
|
"data-placeholder",
|
|
3708
3716
|
"onBlur"
|
|
3709
|
-
],
|
|
3717
|
+
], Pc = [
|
|
3710
3718
|
"aria-label",
|
|
3711
3719
|
"data-placeholder",
|
|
3712
3720
|
"onBlur"
|
|
3713
|
-
],
|
|
3721
|
+
], Fc = {
|
|
3714
3722
|
key: 1,
|
|
3715
3723
|
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)]"
|
|
3716
|
-
},
|
|
3724
|
+
}, Ic = /*#__PURE__*/ Nn(/* @__PURE__ */ F({
|
|
3717
3725
|
__name: "TableBlock",
|
|
3718
3726
|
props: {
|
|
3719
3727
|
block: {},
|
|
@@ -3727,28 +3735,28 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3727
3735
|
updated(e, t) {
|
|
3728
3736
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3729
3737
|
}
|
|
3730
|
-
}, i = e, { t: a } =
|
|
3738
|
+
}, i = e, { t: a } = yn(), o = wt(tn, "TableBlock"), s = wt(mn, "TableBlock"), c = N(() => i.block.rows.length > 0), u = N(() => {
|
|
3731
3739
|
let e = {
|
|
3732
3740
|
width: "100%",
|
|
3733
3741
|
borderCollapse: "collapse",
|
|
3734
3742
|
fontSize: `${i.block.fontSize}px`,
|
|
3735
3743
|
textAlign: i.block.textAlign,
|
|
3736
|
-
fontFamily: i.block.fontFamily
|
|
3744
|
+
fontFamily: i.block.fontFamily ? s.resolveFontFamily(i.block.fontFamily) : "inherit"
|
|
3737
3745
|
};
|
|
3738
3746
|
return i.block.color && (e.color = i.block.color), e;
|
|
3739
|
-
}),
|
|
3747
|
+
}), d = N(() => ({
|
|
3740
3748
|
border: `${i.block.borderWidth}px solid ${i.block.borderColor}`,
|
|
3741
3749
|
padding: `${i.block.cellPadding}px`,
|
|
3742
3750
|
textAlign: i.block.textAlign
|
|
3743
|
-
})),
|
|
3744
|
-
...
|
|
3751
|
+
})), f = N(() => ({
|
|
3752
|
+
...d.value,
|
|
3745
3753
|
fontWeight: "bold",
|
|
3746
3754
|
backgroundColor: i.block.headerBackgroundColor || "transparent"
|
|
3747
|
-
})),
|
|
3748
|
-
function
|
|
3755
|
+
})), p = N(() => i.block.hasHeaderRow && i.block.rows.length > 0 ? i.block.rows[0] : null), h = N(() => i.block.hasHeaderRow ? i.block.rows.slice(1) : i.block.rows);
|
|
3756
|
+
function g() {
|
|
3749
3757
|
o.selectBlock(i.block.id);
|
|
3750
3758
|
}
|
|
3751
|
-
function
|
|
3759
|
+
function _(e, t, n) {
|
|
3752
3760
|
let r = n.target.innerText.trim(), a = i.block.rows.map((n) => n.id === e ? {
|
|
3753
3761
|
...n,
|
|
3754
3762
|
cells: n.cells.map((e) => e.id === t ? {
|
|
@@ -3758,31 +3766,31 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3758
3766
|
} : n);
|
|
3759
3767
|
o.updateBlock(i.block.id, { rows: a });
|
|
3760
3768
|
}
|
|
3761
|
-
return (e, i) => (t(), S("div",
|
|
3769
|
+
return (e, i) => (t(), S("div", jc, [c.value ? (t(), S("table", {
|
|
3762
3770
|
key: 0,
|
|
3763
|
-
style: n(
|
|
3771
|
+
style: n(u.value),
|
|
3764
3772
|
class: "tpl-table-editable"
|
|
3765
|
-
}, [
|
|
3773
|
+
}, [p.value ? (t(), S("thead", Mc, [x("tr", null, [(t(!0), S(M, null, l(p.value.cells, (e) => m((t(), S("th", {
|
|
3766
3774
|
key: e.id,
|
|
3767
|
-
style: n(
|
|
3775
|
+
style: n(f.value),
|
|
3768
3776
|
"aria-label": y(a).table.cellPlaceholder,
|
|
3769
3777
|
contenteditable: "true",
|
|
3770
3778
|
"data-placeholder": y(a).table.cellPlaceholder,
|
|
3771
|
-
onBlur: (t) =>
|
|
3779
|
+
onBlur: (t) => _(p.value.id, e.id, t),
|
|
3772
3780
|
onKeydown: i[0] ||= re(I((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3773
|
-
onClick: I(
|
|
3774
|
-
}, null, 44,
|
|
3781
|
+
onClick: I(g, ["stop"])
|
|
3782
|
+
}, null, 44, Nc)), [[r, e.content]])), 128))])])) : P("", !0), x("tbody", null, [(t(!0), S(M, null, l(h.value, (e) => (t(), S("tr", { key: e.id }, [(t(!0), S(M, null, l(e.cells, (o) => m((t(), S("td", {
|
|
3775
3783
|
key: o.id,
|
|
3776
|
-
style: n(
|
|
3784
|
+
style: n(d.value),
|
|
3777
3785
|
"aria-label": y(a).table.cellPlaceholder,
|
|
3778
3786
|
contenteditable: "true",
|
|
3779
3787
|
"data-placeholder": y(a).table.cellPlaceholder,
|
|
3780
|
-
onBlur: (t) =>
|
|
3788
|
+
onBlur: (t) => _(e.id, o.id, t),
|
|
3781
3789
|
onKeydown: i[1] ||= re(I((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3782
|
-
onClick: I(
|
|
3783
|
-
}, null, 44,
|
|
3790
|
+
onClick: I(g, ["stop"])
|
|
3791
|
+
}, null, 44, Pc)), [[r, o.content]])), 128))]))), 128))])], 4)) : (t(), S("div", Fc, [C(y(ut), { size: 16 }), x("span", null, D(y(a).table.empty), 1)]))]));
|
|
3784
3792
|
}
|
|
3785
|
-
}), [["__scopeId", "data-v-
|
|
3793
|
+
}), [["__scopeId", "data-v-6751d456"]]), Lc = /* @__PURE__ */ F({
|
|
3786
3794
|
__name: "VideoPlayButton",
|
|
3787
3795
|
props: { hoverEffect: {
|
|
3788
3796
|
type: Boolean,
|
|
@@ -3800,7 +3808,7 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3800
3808
|
});
|
|
3801
3809
|
//#endregion
|
|
3802
3810
|
//#region src/utils/videoThumbnail.ts
|
|
3803
|
-
function
|
|
3811
|
+
function Rc(e) {
|
|
3804
3812
|
if (!e) return {
|
|
3805
3813
|
platform: "unknown",
|
|
3806
3814
|
videoId: null,
|
|
@@ -3832,25 +3840,25 @@ function Dc(e) {
|
|
|
3832
3840
|
thumbnailUrl: null
|
|
3833
3841
|
};
|
|
3834
3842
|
}
|
|
3835
|
-
function
|
|
3836
|
-
return t ||
|
|
3843
|
+
function zc(e, t) {
|
|
3844
|
+
return t || Rc(e).thumbnailUrl;
|
|
3837
3845
|
}
|
|
3838
3846
|
//#endregion
|
|
3839
3847
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3840
|
-
var
|
|
3848
|
+
var Bc = ["src", "alt"], Vc = {
|
|
3841
3849
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3842
3850
|
style: { opacity: "0.7" }
|
|
3843
|
-
},
|
|
3851
|
+
}, Hc = ["href"], Uc = ["src", "alt"], Wc = ["src", "alt"], Gc = {
|
|
3844
3852
|
key: 3,
|
|
3845
|
-
class: "tpl:flex 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)]"
|
|
3846
|
-
},
|
|
3853
|
+
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)]"
|
|
3854
|
+
}, Kc = /* @__PURE__ */ F({
|
|
3847
3855
|
__name: "VideoBlock",
|
|
3848
3856
|
props: {
|
|
3849
3857
|
block: {},
|
|
3850
3858
|
viewport: {}
|
|
3851
3859
|
},
|
|
3852
3860
|
setup(e) {
|
|
3853
|
-
let r = e, { t: i } =
|
|
3861
|
+
let r = e, { t: i } = yn(), { syntax: a } = Fn(), o = N(() => Ce(r.block.url, a) || Ce(r.block.thumbnailUrl, a)), s = Wn(() => o.value ? void 0 : r.block.thumbnailUrl || void 0), c = Wn(() => o.value ? r.block.placeholderUrl : void 0), l = N(() => o.value ? null : r.block.thumbnailUrl ? s.value ?? null : zc(r.block.url)), u = N(() => ({ textAlign: r.block.align })), d = N(() => {
|
|
3854
3862
|
let e = r.block.align;
|
|
3855
3863
|
return {
|
|
3856
3864
|
maxWidth: "100%",
|
|
@@ -3860,7 +3868,7 @@ var kc = ["src", "alt"], Ac = {
|
|
|
3860
3868
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3861
3869
|
marginRight: e === "center" ? "auto" : void 0
|
|
3862
3870
|
};
|
|
3863
|
-
}), f = N(() => ({ height: r.block.height ? `${r.block.height}px` : void 0 })), p = N(() =>
|
|
3871
|
+
}), f = N(() => ({ height: r.block.height ? `${r.block.height}px` : void 0 })), p = N(() => Ce(r.block.url, a) ? r.block.url : r.block.thumbnailUrl);
|
|
3864
3872
|
return (r, a) => (t(), S("div", {
|
|
3865
3873
|
class: "tpl:w-full",
|
|
3866
3874
|
style: n(u.value)
|
|
@@ -3869,20 +3877,20 @@ var kc = ["src", "alt"], Ac = {
|
|
|
3869
3877
|
class: "tpl:relative tpl:inline-block",
|
|
3870
3878
|
style: n(d.value)
|
|
3871
3879
|
}, [x("img", {
|
|
3872
|
-
class: "tpl:w-full tpl:border-0",
|
|
3880
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3873
3881
|
src: y(c),
|
|
3874
3882
|
alt: e.block.alt,
|
|
3875
3883
|
style: n(f.value)
|
|
3876
|
-
}, null, 12,
|
|
3884
|
+
}, null, 12, Bc), C(Lc)], 4)) : o.value ? (t(), S("div", {
|
|
3877
3885
|
key: 1,
|
|
3878
|
-
class: "tpl:relative tpl:!flex 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)]",
|
|
3886
|
+
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)]",
|
|
3879
3887
|
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
3880
|
-
}, [C(y(
|
|
3888
|
+
}, [C(y(ii), {
|
|
3881
3889
|
size: 36,
|
|
3882
3890
|
"stroke-width": 1.5,
|
|
3883
3891
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3884
3892
|
style: { opacity: "0.5" }
|
|
3885
|
-
}), x("span",
|
|
3893
|
+
}), x("span", Vc, [C(Yr, { text: p.value }, null, 8, ["text"])])], 4)) : l.value ? (t(), S(M, { key: 2 }, [e.block.url ? (t(), S("a", {
|
|
3886
3894
|
key: 0,
|
|
3887
3895
|
href: e.block.url,
|
|
3888
3896
|
target: "_blank",
|
|
@@ -3891,67 +3899,67 @@ var kc = ["src", "alt"], Ac = {
|
|
|
3891
3899
|
style: n(d.value),
|
|
3892
3900
|
onClick: a[0] ||= I(() => {}, ["prevent"])
|
|
3893
3901
|
}, [x("img", {
|
|
3894
|
-
class: "tpl:w-full tpl:border-0",
|
|
3902
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3895
3903
|
src: l.value,
|
|
3896
3904
|
alt: e.block.alt,
|
|
3897
3905
|
style: n(f.value)
|
|
3898
|
-
}, null, 12,
|
|
3906
|
+
}, null, 12, Uc), C(Lc, { "hover-effect": "" })], 12, Hc)) : (t(), S("div", {
|
|
3899
3907
|
key: 1,
|
|
3900
3908
|
class: "tpl:relative tpl:inline-block",
|
|
3901
3909
|
style: n(d.value)
|
|
3902
3910
|
}, [x("img", {
|
|
3903
|
-
class: "tpl:w-full tpl:border-0",
|
|
3911
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3904
3912
|
src: l.value,
|
|
3905
3913
|
alt: e.block.alt,
|
|
3906
3914
|
style: n(f.value)
|
|
3907
|
-
}, null, 12,
|
|
3915
|
+
}, null, 12, Wc), C(Lc)], 4))], 64)) : (t(), S("div", Gc, [C(y(ii), {
|
|
3908
3916
|
size: 40,
|
|
3909
3917
|
"stroke-width": 1.5,
|
|
3910
3918
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3911
3919
|
}), x("span", null, D(y(i).video.addVideo), 1)]))], 4));
|
|
3912
3920
|
}
|
|
3913
|
-
}),
|
|
3914
|
-
section:
|
|
3915
|
-
title:
|
|
3916
|
-
paragraph:
|
|
3917
|
-
image:
|
|
3918
|
-
button:
|
|
3919
|
-
divider:
|
|
3920
|
-
video:
|
|
3921
|
-
social:
|
|
3922
|
-
menu:
|
|
3923
|
-
table:
|
|
3924
|
-
spacer:
|
|
3925
|
-
html:
|
|
3926
|
-
countdown: v(() => import("./CountdownBlock-
|
|
3921
|
+
}), qc = {
|
|
3922
|
+
section: yc,
|
|
3923
|
+
title: Ea,
|
|
3924
|
+
paragraph: da,
|
|
3925
|
+
image: Qi,
|
|
3926
|
+
button: Zr,
|
|
3927
|
+
divider: Pi,
|
|
3928
|
+
video: Kc,
|
|
3929
|
+
social: Dc,
|
|
3930
|
+
menu: na,
|
|
3931
|
+
table: Ic,
|
|
3932
|
+
spacer: Ac,
|
|
3933
|
+
html: Bi,
|
|
3934
|
+
countdown: v(() => import("./CountdownBlock-zx39Dyby.js"))
|
|
3927
3935
|
};
|
|
3928
|
-
function
|
|
3929
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
3936
|
+
function Jc(t) {
|
|
3937
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = yn(i), l = N(() => ue(ue(ue(pr(i), Nr(n.content.value.settings?.locale)), Ie(n.content.value.settings) === "rtl" ? {
|
|
3930
3938
|
title: { textAlign: "right" },
|
|
3931
3939
|
table: { textAlign: "right" }
|
|
3932
3940
|
} : {}), r.blockDefaults ?? {}));
|
|
3933
3941
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
3934
|
-
let { resolvedTheme: u } =
|
|
3942
|
+
let { resolvedTheme: u } = tr(N(() => n.state.uiTheme)), d = _(r.theme ?? {}), { themeStyles: p } = rr({
|
|
3935
3943
|
themeOverrides: d,
|
|
3936
3944
|
resolvedTheme: u,
|
|
3937
3945
|
extraStyles: () => ({
|
|
3938
3946
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
3939
3947
|
...t.themeExtraStyles?.()
|
|
3940
3948
|
})
|
|
3941
|
-
}), m =
|
|
3949
|
+
}), m = ht({
|
|
3942
3950
|
content: n.content,
|
|
3943
3951
|
setContent: (e, t) => n.setContent(e, t),
|
|
3944
3952
|
...t.historyOptions
|
|
3945
3953
|
});
|
|
3946
|
-
|
|
3947
|
-
let g =
|
|
3954
|
+
tt(n, m);
|
|
3955
|
+
let g = mt({
|
|
3948
3956
|
addBlock: n.addBlock,
|
|
3949
3957
|
removeBlock: n.removeBlock,
|
|
3950
3958
|
updateBlock: n.updateBlock,
|
|
3951
3959
|
selectBlock: n.selectBlock,
|
|
3952
3960
|
findBlockLocation: n.findBlockLocation,
|
|
3953
3961
|
blockDefaults: () => l.value
|
|
3954
|
-
}), v =
|
|
3962
|
+
}), v = gt(n), y = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? nt({
|
|
3955
3963
|
content: n.content,
|
|
3956
3964
|
isDirty: () => n.state.isDirty,
|
|
3957
3965
|
...t.autoSaveOptions
|
|
@@ -3959,30 +3967,30 @@ function Lc(t) {
|
|
|
3959
3967
|
y && (b = f(m.isNavigating, (e) => {
|
|
3960
3968
|
e ? y.pause() : y.resume();
|
|
3961
3969
|
}));
|
|
3962
|
-
let x =
|
|
3970
|
+
let x = er(n, {
|
|
3963
3971
|
t: o,
|
|
3964
3972
|
format: c
|
|
3965
|
-
}, r.customBlocks ?? []), S =
|
|
3966
|
-
if (S.allowCustomIgnored &&
|
|
3967
|
-
let e =
|
|
3968
|
-
e.length > 0 &&
|
|
3969
|
-
}
|
|
3970
|
-
let C =
|
|
3971
|
-
for (let e of C.unknown)
|
|
3972
|
-
let w =
|
|
3973
|
-
|
|
3973
|
+
}, r.customBlocks ?? []), S = Cn(r.colors);
|
|
3974
|
+
if (S.allowCustomIgnored && bn.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), S.invalidPresets.length > 0 && bn.warn(`config.colors.presets skipped invalid entries: ${S.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), S.allowCustom === !1) {
|
|
3975
|
+
let e = fr(S.presets, r.blockDefaults, r.templateDefaults);
|
|
3976
|
+
e.length > 0 && bn.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.`);
|
|
3977
|
+
}
|
|
3978
|
+
let C = Tn(r.templateSettings);
|
|
3979
|
+
for (let e of C.unknown) bn.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${En.join(", ")}) — skipping it.`);
|
|
3980
|
+
let w = ir();
|
|
3981
|
+
lr(w, qc);
|
|
3974
3982
|
let T = /* @__PURE__ */ new Set();
|
|
3975
3983
|
function D(e) {
|
|
3976
3984
|
for (let t of e) {
|
|
3977
|
-
w.registerCustom(t,
|
|
3978
|
-
for (let e of
|
|
3985
|
+
w.registerCustom(t, Mi);
|
|
3986
|
+
for (let e of Pr(t, S)) T.has(e.id) || (T.add(e.id), bn.warn(e.message));
|
|
3979
3987
|
}
|
|
3980
3988
|
}
|
|
3981
3989
|
r.customBlocks?.length && D(r.customBlocks);
|
|
3982
|
-
let O =
|
|
3990
|
+
let O = Bn();
|
|
3983
3991
|
if (h() && s(O.dispose), t.containerEl) {
|
|
3984
3992
|
let e = t.containerEl;
|
|
3985
|
-
|
|
3993
|
+
xt(document, "pointerdown", (t) => {
|
|
3986
3994
|
let n = e.value;
|
|
3987
3995
|
n && (t.composedPath?.() ?? []).includes(n) && O.claim();
|
|
3988
3996
|
}, { capture: !0 });
|
|
@@ -3992,7 +4000,7 @@ function Lc(t) {
|
|
|
3992
4000
|
e ? e.save() : y?.flush();
|
|
3993
4001
|
}
|
|
3994
4002
|
function A(e) {
|
|
3995
|
-
O.isActive() &&
|
|
4003
|
+
O.isActive() && Ir(e, {
|
|
3996
4004
|
history: m,
|
|
3997
4005
|
selectBlock: (e) => n.selectBlock(e),
|
|
3998
4006
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4004,43 +4012,44 @@ function Lc(t) {
|
|
|
4004
4012
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4005
4013
|
});
|
|
4006
4014
|
}
|
|
4007
|
-
|
|
4008
|
-
let j = _(null);
|
|
4009
|
-
E(
|
|
4010
|
-
let
|
|
4011
|
-
function
|
|
4012
|
-
Array.isArray(e) ?
|
|
4013
|
-
}
|
|
4014
|
-
E(
|
|
4015
|
-
let
|
|
4016
|
-
E(
|
|
4017
|
-
let
|
|
4015
|
+
xt(document, "keydown", A);
|
|
4016
|
+
let j = _(null), M = t.editorRoot ?? document;
|
|
4017
|
+
E(Yt, M), E(Et, j), E(qt, i), E(tn, n), E(_n, m), E(Xt, g), E(en, v), E(mn, a), E(Pt, p), E(Jt, u), E(ln, l), E(Kt, r.locale), E(pn, w), E(un, r.customBlocks ?? []), E(vn, r.paletteBlocks), E(Zt, ur(r.htmlBlockPreview)), E(Dt, r.layout), E(jt, r.sectionWrapper), E($t, S), E(dn, C.fields), E(sn, ar(n.content, w));
|
|
4018
|
+
let ee = ke(r.mergeTags?.syntax), P = e(r.mergeTags?.tags ?? []);
|
|
4019
|
+
function F(e) {
|
|
4020
|
+
Array.isArray(e) ? P.value = e : bn.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4021
|
+
}
|
|
4022
|
+
E(zt, P), E(Bt, ee), E(Ht, r.mergeTags?.onRequest ?? null), E(an, r.mergeTags?.autocomplete !== !1), E(Rt, r.mergeTags?.showRawValue !== !1);
|
|
4023
|
+
let te = _(Ge(r.mergeTags?.tags ?? []));
|
|
4024
|
+
E(Lt, te);
|
|
4025
|
+
let I = Hn({
|
|
4018
4026
|
resolvePreview: r.resolvePreview,
|
|
4019
4027
|
getContent: () => {
|
|
4020
4028
|
let e = n.content.value;
|
|
4021
|
-
return r.layout && n.state.previewMode ?
|
|
4029
|
+
return r.layout && n.state.previewMode ? Ue(r.layout, e) : e;
|
|
4022
4030
|
},
|
|
4023
4031
|
isActive: () => n.state.previewMode
|
|
4024
4032
|
});
|
|
4025
|
-
E(
|
|
4026
|
-
let
|
|
4027
|
-
E(
|
|
4028
|
-
let
|
|
4029
|
-
E(
|
|
4030
|
-
let
|
|
4033
|
+
E(Gt, I), E(Mt, r.resolvePreview);
|
|
4034
|
+
let ne = N(() => !(n.state.previewMode && I.isConfigured));
|
|
4035
|
+
E(fn, ne);
|
|
4036
|
+
let re = Xn();
|
|
4037
|
+
E(Tt, re), E(rn, _(!1)), E(Ot, _(!1)), E(Wt, r.logicTags?.tags ?? []), E(hn, r.logicTags?.pairs ?? []), E(Nt, r.logicTags?.onRequest ?? null), E(kt, Zn()), E(It, r.onRequestMedia ?? null), E(Qt, r.canDropMedia ?? null), E(gn, r.resolveImageUrl ? Un(r.resolveImageUrl) : null), E(nn, r.displayConditions?.conditions ?? []), E(cn, r.displayConditions?.allowCustom ?? !1), E(on, t.capabilities ?? {}), E(Ut, x);
|
|
4038
|
+
let ie = Qn(r.lint) ? null : $n({
|
|
4031
4039
|
content: n.content,
|
|
4032
4040
|
options: r.lint ?? {},
|
|
4033
4041
|
updateBlock: n.updateBlock,
|
|
4034
4042
|
updateSettings: n.updateSettings,
|
|
4035
4043
|
removeBlock: n.removeBlock
|
|
4036
4044
|
});
|
|
4037
|
-
E(
|
|
4038
|
-
function
|
|
4039
|
-
b?.(),
|
|
4045
|
+
E(Ft, ie);
|
|
4046
|
+
function ae() {
|
|
4047
|
+
b?.(), ie?.destroy(), y?.destroy(), m.destroy();
|
|
4040
4048
|
}
|
|
4041
4049
|
return {
|
|
4042
4050
|
t: o,
|
|
4043
4051
|
format: c,
|
|
4052
|
+
editorRoot: M,
|
|
4044
4053
|
history: m,
|
|
4045
4054
|
blockActions: g,
|
|
4046
4055
|
conditionPreview: v,
|
|
@@ -4050,15 +4059,15 @@ function Lc(t) {
|
|
|
4050
4059
|
themeOverrides: d,
|
|
4051
4060
|
registry: w,
|
|
4052
4061
|
keyboardReorder: x,
|
|
4053
|
-
templateLint:
|
|
4062
|
+
templateLint: ie,
|
|
4054
4063
|
popoverRoot: j,
|
|
4055
|
-
mergeTagSampleMode:
|
|
4056
|
-
previewResolution:
|
|
4057
|
-
appliesConditionFilter:
|
|
4064
|
+
mergeTagSampleMode: te,
|
|
4065
|
+
previewResolution: I,
|
|
4066
|
+
appliesConditionFilter: ne,
|
|
4058
4067
|
registerCustomBlocks: D,
|
|
4059
|
-
setMergeTags:
|
|
4060
|
-
destroy:
|
|
4068
|
+
setMergeTags: F,
|
|
4069
|
+
destroy: ae
|
|
4061
4070
|
};
|
|
4062
4071
|
}
|
|
4063
4072
|
//#endregion
|
|
4064
|
-
export {
|
|
4073
|
+
export { Lr as A, qn as B, ni as C, Hr as D, Zr as E, Or as F, Hn as H, Dr as I, Er as L, Rr as M, xr as N, Ur as O, kr as P, Tr as R, si as S, Qr as T, Jn as V, xi as _, Dc as a, ui as b, Ea as c, na as d, Qi as f, Ci as g, Mi as h, Ac as i, qr as j, Wr as k, wa as l, Pi as m, Kc as n, yc as o, Bi as p, Ic as r, hc as s, Jc as t, da as u, yi as v, ei as w, li as x, mi as y, wr as z };
|