@templatical/editor 0.46.0 → 0.48.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-DGcH4Lyo.js → AiChatSidebar-DxPHFNoT.js} +14 -14
- package/dist/{AiFeatureMenu-B4q-0g1S.js → AiFeatureMenu-C8GVqu1d.js} +7 -7
- package/dist/{BlockIssueBadge-CZA1XvAh.js → BlockIssueBadge-BShkuJis.js} +5 -5
- package/dist/BlockPreviewCanvas-tzAtDkXH.js +141 -0
- package/dist/{CloudHeaderExtras-ehMYJP68.js → CloudHeaderExtras-CUSftQdm.js} +5 -5
- package/dist/{CloudPanels-BwOaAlKz.js → CloudPanels-Dgw7tb4R.js} +9 -9
- package/dist/{CollaboratorBar-qOZFRNPx.js → CollaboratorBar-5rfopCPx.js} +4 -4
- package/dist/{CommentsPanel-Bn6P5crU.js → CommentsPanel-DiWzYtnZ.js} +2 -2
- package/dist/{CommentsSidebar-B8wT932T.js → CommentsSidebar-BOqj16Al.js} +14 -14
- package/dist/CountdownBlock-zx39Dyby.js +92 -0
- package/dist/{CountdownToolbar-BeF21SeB.js → CountdownToolbar-C4y3Ft7H.js} +7 -7
- package/dist/{DesignReferenceSidebar-zH93uB15.js → DesignReferenceSidebar-BWAi3eQQ.js} +13 -13
- package/dist/{IssuesPanel-Dltw9haP.js → IssuesPanel-C-x3I012.js} +8 -8
- package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
- package/dist/{LogicTagInsertButton-CHa-UD76.js → LogicTagInsertButton-B1_Wy0AN.js} +13 -13
- package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-ByOvznRC.js} +4 -4
- package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-9mDBv4aL.js} +2 -2
- package/dist/{MergeTagInput-B3ntd4dN.js → MergeTagInput-fOewuF27.js} +3 -3
- package/dist/{MergeTagModeToggle-C_06ZL0Q.js → MergeTagModeToggle-BXamLcv7.js} +7 -7
- package/dist/{ParagraphEditor-CxuW3TV0.js → ParagraphEditor-BVjOwwHx.js} +100 -85
- package/dist/{RestoreVersionDialog-B1n37M1Z.js → RestoreVersionDialog-BEKXx9xk.js} +6 -6
- package/dist/{RichTextEditorContent-CP_uULWB.js → RichTextEditorContent-D7kp7iig.js} +12 -12
- package/dist/{SaveBlockDialog-BSKX_7_v.js → SaveBlockDialog-SJu0lecx.js} +34 -35
- package/dist/{SavedBlocksBrowserModal-CHKrH1gO.js → SavedBlocksBrowserModal-DbmIS5uK.js} +14 -14
- package/dist/{SavedBlocksPanels-B-xDqBcz.js → SavedBlocksPanels-Dr5Fxx9Z.js} +2 -2
- package/dist/{SavedBlocksPickBar-D2J-g82g.js → SavedBlocksPickBar-DnEWBZJy.js} +5 -5
- package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-ynbGl-sr.js} +16 -16
- package/dist/{TemplateSettings-D07K_Y4m.js → TemplateSettings-Bi01S3H3.js} +12 -12
- package/dist/{TestEmailModal-BNPw_lID.js → TestEmailModal-CbRY8HQx.js} +14 -14
- package/dist/{TestEmailPanel-8klWo8hE.js → TestEmailPanel-NAOmt3xi.js} +2 -2
- package/dist/{TitleEditor-CmC9OuhA.js → TitleEditor-Cc3DHbuN.js} +15 -15
- package/dist/{ToggleSwitch-COeyWGfT.js → ToggleSwitch-Ozc7YU38.js} +2 -2
- package/dist/Toolbar-B-2lO0I8.js +3156 -0
- package/dist/{TplModal-BGFawHY9.js → TplModal-Bz4-IZ9R.js} +6 -6
- package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-CjV1d1zk.js} +10 -10
- package/dist/{VersionHistoryPanels-DdbGjEOR.js → VersionHistoryPanels-BtwxrKJn.js} +2 -2
- package/dist/{VersionPreviewBanner-BUKb9gc6.js → VersionPreviewBanner-BLAei1kj.js} +4 -4
- package/dist/WrapperBlock-D0qgNqjD.js +45 -0
- package/dist/{blockTypeIcons-CVKo6V_v.js → blockTypeIcons-CEDZytqP.js} +50 -20
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +38 -1
- package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js → AiChatSidebar-Dk0rJBQN.js} +8 -8
- package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js.map → AiChatSidebar-Dk0rJBQN.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js → AiFeatureMenu-B7b0w8ZS.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js.map → AiFeatureMenu-B7b0w8ZS.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js → BlockIssueBadge-C7sdnkrF.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js.map → BlockIssueBadge-C7sdnkrF.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js +143 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js → CloudHeaderExtras-B4fhuwc_.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js.map → CloudHeaderExtras-B4fhuwc_.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js → CloudPanels-awqHfJqC.js} +8 -8
- package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js.map → CloudPanels-awqHfJqC.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js → CollaboratorBar-CS0ivqkr.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js.map → CollaboratorBar-CS0ivqkr.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js → CommentsPanel-CbzxwsyI.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js.map → CommentsPanel-CbzxwsyI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js → CommentsSidebar-DWPHZuQm.js} +8 -8
- package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js.map → CommentsSidebar-DWPHZuQm.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-BaXCefQM.js → CountdownToolbar-Cqg8FUH-.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js.map → CountdownToolbar-Cqg8FUH-.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js → DesignReferenceSidebar-BW9cHnA9.js} +12 -12
- package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js.map → DesignReferenceSidebar-BW9cHnA9.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js → IssuesPanel-cXf9ywA4.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js.map → IssuesPanel-cXf9ywA4.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-BYjdrDnQ.js → LogicTagInsertButton-BMB9vShs.js} +89 -89
- package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js.map → LogicTagInsertButton-BMB9vShs.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js → MediaEditModal-zXfcArr4.js} +4 -4
- package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js.map → MediaEditModal-zXfcArr4.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js → MediaPanels-Cp4XB_dH.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js.map → MediaPanels-Cp4XB_dH.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js → MergeTagInput-DLqrA9co.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js.map → MergeTagInput-DLqrA9co.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js → MergeTagModeToggle-BRiJzzn5.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js.map → MergeTagModeToggle-BRiJzzn5.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DndEFXmR.js → ParagraphEditor-D4aq9eeC.js} +116 -101
- package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js → RestoreVersionDialog-BgR6RXSb.js} +6 -6
- package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js.map → RestoreVersionDialog-BgR6RXSb.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js → RichTextEditorContent-C4DMAn0g.js} +11 -11
- package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js.map → RichTextEditorContent-C4DMAn0g.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js → SaveBlockDialog-BaIsQd09.js} +41 -42
- package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js.map → SaveBlockDialog-BaIsQd09.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js → SavedBlocksBrowserModal-CtnB58p_.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js.map → SavedBlocksBrowserModal-CtnB58p_.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js → SavedBlocksPanels-BhEOMzEQ.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js.map → SavedBlocksPanels-BhEOMzEQ.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js → SavedBlocksPickBar-CcdqTEIp.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js.map → SavedBlocksPickBar-CcdqTEIp.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js → TemplateScoringPanel-BrWqJCSP.js} +9 -9
- package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js.map → TemplateScoringPanel-BrWqJCSP.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-rZiHmq24.js → TemplateSettings-BkkWTDHD.js} +14 -14
- package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js → TestEmailModal-V5mwHsUV.js} +13 -13
- package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js.map → TestEmailModal-V5mwHsUV.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js → TestEmailPanel-DxrKuctP.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js.map → TestEmailPanel-DxrKuctP.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js → TitleEditor-CsZiG3TT.js} +19 -19
- package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js.map → TitleEditor-CsZiG3TT.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js → ToggleSwitch-BB-bQADJ.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js.map → ToggleSwitch-BB-bQADJ.js.map} +1 -1
- package/dist/cdn/chunks/Toolbar-C_x2TfFk.js +3073 -0
- package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CYBbPCHL.js → TplModal-DC_eodTV.js} +6 -6
- package/dist/cdn/chunks/TplModal-DC_eodTV.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js → VersionHistoryMenu-DXnM5Df2.js} +11 -11
- package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js.map → VersionHistoryMenu-DXnM5Df2.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js → VersionHistoryPanels-DXSqmaLS.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js.map → VersionHistoryPanels-DXSqmaLS.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js → VersionPreviewBanner-DKyN6BhO.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js.map → VersionPreviewBanner-DKyN6BhO.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +47 -0
- package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js.map +1 -0
- package/dist/cdn/chunks/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +39 -2
- package/dist/cdn/chunks/ca-CbNzJM3I.js.map +1 -0
- package/dist/cdn/chunks/{cloud-h1vaHp2p.js → cloud-BHClP3e2.js} +3 -3
- package/dist/cdn/chunks/{cloud-h1vaHp2p.js.map → cloud-BHClP3e2.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-bJN9EM1H.js → createCloudRuntime-Vd0N4elZ.js} +18 -9
- package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +1 -0
- package/dist/cdn/chunks/{de-CGjbQ2mt.js → de-DMquBpZM.js} +39 -2
- package/dist/cdn/chunks/de-DMquBpZM.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-vEEmZ8Tu.js} +93 -93
- package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js.map → editor-modal-vEEmZ8Tu.js.map} +1 -1
- package/dist/cdn/chunks/{en-BTiiAC-B.js → en-C8Mp71sO.js} +39 -2
- package/dist/cdn/chunks/en-C8Mp71sO.js.map +1 -0
- package/dist/cdn/chunks/en-eWpiXyZu.js +1 -0
- package/dist/cdn/chunks/{es-CdTOcSTf.js → es-Byq4tthI.js} +39 -2
- package/dist/cdn/chunks/es-Byq4tthI.js.map +1 -0
- package/dist/cdn/chunks/{extensions-CrmXF4MW.js → extensions-hJ9VqzDc.js} +7 -7
- package/dist/cdn/chunks/{extensions-CrmXF4MW.js.map → extensions-hJ9VqzDc.js.map} +1 -1
- package/dist/cdn/chunks/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +39 -2
- package/dist/cdn/chunks/fr-B3j35HEw.js.map +1 -0
- package/dist/cdn/chunks/{icons-Dr9erFGs.js → icons-aTYwH5-g.js} +107 -78
- package/dist/cdn/chunks/icons-aTYwH5-g.js.map +1 -0
- package/dist/{ja-BhdkqENz.js → cdn/chunks/ja-D7txAuGS.js} +40 -1
- package/dist/cdn/chunks/ja-D7txAuGS.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-ClJ3BY3F.js} +40 -1
- package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-CyGB3lZr.js → preRenderCustomBlocks-ByfuSjtL.js} +4 -2
- package/dist/cdn/chunks/preRenderCustomBlocks-ByfuSjtL.js.map +1 -0
- package/dist/{pt-BR-CUIT4rq4.js → cdn/chunks/pt-BR-DibcXcmv.js} +40 -1
- package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +1279 -0
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +1 -0
- package/dist/{dist-BI_LeQGl.js → cdn/chunks/src-DYCDeBDM.js} +437 -256
- package/dist/cdn/chunks/src-DYCDeBDM.js.map +1 -0
- package/dist/cdn/chunks/{src-B0pZeTYO.js → src-DlFlC9Tt.js} +334 -268
- package/dist/cdn/chunks/src-DlFlC9Tt.js.map +1 -0
- package/dist/cdn/chunks/src-dZ4D_tuP.js +649 -0
- package/dist/cdn/chunks/src-dZ4D_tuP.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/timeouts-Cv2jvusx.js +6 -0
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +1 -0
- 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-DuC7kVti.js → useEditorCore-Bb2UcB20.js} +780 -764
- package/dist/cdn/chunks/useEditorCore-Bb2UcB20.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-B3uV3XHG.js → useLogicTag-HsyUCQtl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js.map → useLogicTag-HsyUCQtl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js → useMergeTag-Dg9pE85U.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js.map → useMergeTag-Dg9pE85U.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-CpmB5KxW.js → useScrollToBlock-uUa601I4.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js.map → useScrollToBlock-uUa601I4.js.map} +1 -1
- package/dist/cdn/chunks/withCurrentFont-oLcATrQ8.js +21 -0
- package/dist/cdn/chunks/{withCurrentFont-isIyuezD.js.map → withCurrentFont-oLcATrQ8.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +641 -631
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ZKvtMdpe.js → check-ClwqRMgv.js} +1 -1
- package/dist/{chevron-down-RrwkYMlp.js → chevron-down-te6qn-zE.js} +1 -1
- package/dist/{chevron-right-CklHaa1U.js → chevron-right-W2hbH1FM.js} +1 -1
- package/dist/{chevron-up-DjN2NTbo.js → chevron-up-Bf5Zo7o4.js} +1 -1
- package/dist/{circle-alert-BR1_Yfb-.js → circle-alert-CIEGV5DN.js} +1 -1
- package/dist/{clock-BEagNj21.js → clock-Y4cx0gkJ.js} +1 -1
- package/dist/{cloud-DPGjMGfv.js → cloud-B5xwm_4X.js} +2 -2
- package/dist/{copy-D6DNoSq1.js → copy-BEcsAlfB.js} +1 -1
- package/dist/{createCloudRuntime-D0RRgWab.js → createCloudRuntime-zNPkF6T9.js} +17 -8
- package/dist/{createLucideIcon-BAPyioGd.js → createLucideIcon-CYHXK9hn.js} +6 -6
- package/dist/{de-CGjbQ2mt.js → de-DMquBpZM.js} +38 -1
- 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-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/{cdn/chunks/src-Bh0MoJ67.js → dist-tsmnQugO.js} +207 -174
- package/dist/{editor-modal-oRmkDlUs.js → editor-modal-AlVLkU91.js} +20 -20
- package/dist/en-B0FUfNwz.js +1 -0
- package/dist/{en-BTiiAC-B.js → en-C8Mp71sO.js} +38 -1
- package/dist/{es-CdTOcSTf.js → es-Byq4tthI.js} +38 -1
- package/dist/{extensions-CYigjb1g.js → extensions-pjO8VGkM.js} +9 -9
- package/dist/{eye-DvsTBI57.js → eye-Ddnz8nnm.js} +1 -1
- package/dist/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +38 -1
- package/dist/{image-up-BoFGZm5Q.js → image-up-CM_HC0Dx.js} +1 -1
- package/dist/index.d.ts +124 -11
- package/dist/{info-0bQQGjTV.js → info-DXLmzoeY.js} +1 -1
- package/dist/{cdn/chunks/ja-BhdkqENz.js → ja-D7txAuGS.js} +38 -3
- package/dist/{keys-injl74ob.js → keys-BKFq19a2.js} +1 -1
- package/dist/{link-Cstrr3Ep.js → link-Cel46wgo.js} +1 -1
- package/dist/{list-Dx9Rmy5s.js → list-Cl0GwiV9.js} +1 -1
- package/dist/{loader-circle-D8Qqs0MG.js → loader-circle-uAwpvfys.js} +1 -1
- package/dist/{message-circle-D78ELX6I.js → message-circle-DWU1pTM_.js} +1 -1
- package/dist/{cdn/chunks/nl-CE3YItYg.js → nl-ClJ3BY3F.js} +38 -3
- package/dist/{package-DOvM9sHE.js → package-CbyG_yU_.js} +1 -1
- package/dist/{pencil-B6m0OG0n.js → pencil-BzoDcwKu.js} +1 -1
- package/dist/{plus-D-nEKxTc.js → plus-8cDvoCjZ.js} +1 -1
- package/dist/{preRenderCustomBlocks-DokBGA_M.js → preRenderCustomBlocks-DMP5RuHl.js} +6 -4
- package/dist/{cdn/chunks/pt-BR-CUIT4rq4.js → pt-BR-DibcXcmv.js} +38 -3
- package/dist/{refresh-cw-CXZS-R1U.js → refresh-cw-9WinWixo.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-CqgGq1gG.js} +1 -1
- package/dist/{send-BBR28V94.js → send-Ceo3c9Db.js} +1 -1
- package/dist/{shield-check-ByxUnaU9.js → shield-check-uDAwur5D.js} +1 -1
- package/dist/{smartphone-CNOwGf5T.js → smartphone-CcLaCpGK.js} +1 -1
- package/dist/socialIcons-PTiwhLoC.js +1359 -0
- package/dist/{sparkles-DO1hzwzf.js → sparkles-Do9XjAuT.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 +519 -509
- package/dist/{text-align-start-BKEKMheq.js → text-align-start-DvzC0HQA.js} +1 -1
- package/dist/timeouts-Cv2jvusx.js +4 -0
- package/dist/{trash-CKEQH4vH.js → trash-vlINTx32.js} +1 -1
- package/dist/{triangle-alert-BHnfd3fV.js → triangle-alert-MRYSJ9T2.js} +1 -1
- package/dist/{upload-C8uO7KsR.js → upload-CtNOI6J2.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-BJAQMvNW.js → useEditorCore-PvErWWsp.js} +1002 -991
- package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
- package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
- package/dist/{useLogicTag-B5gjcMzn.js → useLogicTag-BHn67tDd.js} +3 -3
- package/dist/{useMergeTag-BwsBIDzR.js → useMergeTag-CRkm5Ig6.js} +5 -5
- package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
- package/dist/{useScrollToBlock-JRxhT1u_.js → useScrollToBlock-CXmcHQQN.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
- package/dist/{withCurrentFont-C9vqrduu.js → withCurrentFont-CxRGeHO3.js} +1 -1
- package/dist/{x-gEC0yMci.js → x-Cd6SFw8r.js} +1 -1
- package/package.json +23 -23
- package/dist/BlockPreviewCanvas-DIZ0KgUD.js +0 -133
- package/dist/CountdownBlock-RNx3hIu0.js +0 -91
- package/dist/Toolbar-CqhRb6EM.js +0 -2732
- package/dist/WrapperBlock-CTkmA887.js +0 -34
- package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js +0 -135
- package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.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-DndEFXmR.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-rZiHmq24.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-C_5HfUQq.js +0 -2646
- package/dist/cdn/chunks/Toolbar-C_5HfUQq.js.map +0 -1
- package/dist/cdn/chunks/TplModal-CYBbPCHL.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js +0 -36
- package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js.map +0 -1
- package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-bJN9EM1H.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/fr-B6lcLLzC.js.map +0 -1
- package/dist/cdn/chunks/icons-Dr9erFGs.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-CyGB3lZr.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-ClJVDZwt.js +0 -1031
- package/dist/cdn/chunks/socialIcons-ClJVDZwt.js.map +0 -1
- package/dist/cdn/chunks/src-B0pZeTYO.js.map +0 -1
- package/dist/cdn/chunks/src-BMw3u-iV.js +0 -614
- package/dist/cdn/chunks/src-BMw3u-iV.js.map +0 -1
- package/dist/cdn/chunks/src-Bh0MoJ67.js.map +0 -1
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +0 -6
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DuC7kVti.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
- package/dist/cdn/chunks/withCurrentFont-isIyuezD.js +0 -21
- package/dist/dist-CFC4pg2o.js +0 -5
- package/dist/dist-j2FavQmU.js +0 -5
- package/dist/en-Bk4iCfjp.js +0 -1
- package/dist/socialIcons-Ct_IoqPQ.js +0 -1107
- package/dist/timeouts-DHPZQ0G3.js +0 -4
|
@@ -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 Mn } from "./useMergeTag-BwsBIDzR.js";
|
|
24
|
-
import { t as Nn } from "./useLogicTag-B5gjcMzn.js";
|
|
25
|
-
import { t as Pn } 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, K as ce, L as le, M as ue, N as de, O as fe, P as pe, Q 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, f as je, ft as Me, gt as Ne, ht as Pe, it as Fe, j as Ie, k as Le, lt as Re, mt as ze, o as Be, ot as Ve, p as He, pt as Ue, q as We, s as Ge, st as Ke, tt as qe, u as Je, ut as Ye, vt as Xe, w as Ze, x as Qe, y as $e, yt as et, z as tt } from "./dist-tsmnQugO.js";
|
|
4
|
+
import { B as nt, D as rt, E as it, I as at, L as ot, M as st, N as ct, O as lt, S as ut, _ as dt, a as ft, b as pt, g as mt, h as ht, l as gt, n as _t, p as vt, t as yt, u as bt, v as xt, w as St, x as Ct, y as wt, z as Tt } from "./socialIcons-PTiwhLoC.js";
|
|
5
|
+
import { _ as Et, h as Dt, v as Ot, y as kt } from "./dist-CUWI-IvA.js";
|
|
6
|
+
import { a as At, c as jt, i as Mt } from "./dist-DAAJogrx.js";
|
|
7
|
+
import { $ as Nt, A as Pt, B as Ft, C as It, D as Lt, E as Rt, F as zt, G as Bt, H as Vt, I as Ht, J as Ut, K as Wt, L as Gt, M as Kt, N as qt, O as Jt, P as Yt, Q as Xt, R as Zt, S as Qt, T as $t, V as en, X as tn, Y as nn, Z as rn, _ as an, a as on, b as sn, c as cn, d as ln, f as un, g as dn, h as fn, j as pn, k as mn, l as hn, m as gn, n as _n, o as vn, p as yn, q as bn, r as xn, s as Sn, v as Cn, w as wn, x as Tn, y as En, z as Dn } from "./keys-BKFq19a2.js";
|
|
8
|
+
import { t as On } from "./useI18n-CxVEpurs.js";
|
|
9
|
+
import { t as kn } from "./logger-BBlvSn6q.js";
|
|
10
|
+
import { i as An, r as jn, s as Mn, t as Nn } from "./usePopoverPosition-CwnH1o5g.js";
|
|
11
|
+
import { r as Pn, t as Fn } from "./templateSettingsFields-YCFVBVYh.js";
|
|
12
|
+
import { t as In } from "./createLucideIcon-CYHXK9hn.js";
|
|
13
|
+
import { t as Ln } from "./copy-BEcsAlfB.js";
|
|
14
|
+
import { t as Rn } from "./message-circle-DWU1pTM_.js";
|
|
15
|
+
import { t as zn } from "./trash-vlINTx32.js";
|
|
16
|
+
import { t as Bn } from "./triangle-alert-MRYSJ9T2.js";
|
|
17
|
+
import { t as Vn } from "./LoadingTrack-6XsqodoY.js";
|
|
18
|
+
import { t as Hn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
19
|
+
import { t as Un } from "./useEditorRoot-BD3piYtD.js";
|
|
20
|
+
import "./useCloudI18n-Nwqo7pI_.js";
|
|
21
|
+
import { t as Wn } from "./useMergeTag-CRkm5Ig6.js";
|
|
22
|
+
import { t as Gn } from "./useLogicTag-BHn67tDd.js";
|
|
26
23
|
//#region src/utils/activeEditorTracker.ts
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
let e = ++
|
|
30
|
-
return
|
|
24
|
+
var Kn = /* @__PURE__ */ new Set(), qn = 0, Jn = 0;
|
|
25
|
+
function Yn() {
|
|
26
|
+
let e = ++Jn;
|
|
27
|
+
return Kn.add(e), qn === 0 && (qn = e), {
|
|
31
28
|
id: e,
|
|
32
|
-
isActive: () =>
|
|
29
|
+
isActive: () => Kn.size <= 1 || qn === e,
|
|
33
30
|
claim: () => {
|
|
34
|
-
|
|
31
|
+
qn = e;
|
|
35
32
|
},
|
|
36
33
|
dispose: () => {
|
|
37
|
-
if (
|
|
38
|
-
let e = Array.from(
|
|
39
|
-
|
|
34
|
+
if (Kn.delete(e), qn === e) {
|
|
35
|
+
let e = Array.from(Kn);
|
|
36
|
+
qn = 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 Xn = 500;
|
|
44
|
+
function Zn(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 Bn(e) {
|
|
|
55
52
|
let o = ++a;
|
|
56
53
|
r.value = !0;
|
|
57
54
|
let s = {
|
|
58
|
-
content:
|
|
55
|
+
content: Ae(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 (!me(e)) {
|
|
65
62
|
i.value = !0;
|
|
66
63
|
return;
|
|
67
64
|
}
|
|
@@ -76,7 +73,7 @@ function Bn(e) {
|
|
|
76
73
|
function u() {
|
|
77
74
|
t && (c(), n.value === null ? l() : o = setTimeout(() => {
|
|
78
75
|
o = null, l();
|
|
79
|
-
},
|
|
76
|
+
}, Xn));
|
|
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);
|
|
@@ -92,61 +89,8 @@ function Bn(e) {
|
|
|
92
89
|
};
|
|
93
90
|
}
|
|
94
91
|
//#endregion
|
|
95
|
-
//#region src/composables/useImageUrlResolver.ts
|
|
96
|
-
function Vn(e) {
|
|
97
|
-
let t = g(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
98
|
-
function r(e) {
|
|
99
|
-
return t.get(e);
|
|
100
|
-
}
|
|
101
|
-
function i(e) {
|
|
102
|
-
return t.has(e) || n.has(e);
|
|
103
|
-
}
|
|
104
|
-
function a(r) {
|
|
105
|
-
if (i(r)) return;
|
|
106
|
-
let a;
|
|
107
|
-
try {
|
|
108
|
-
a = e(r);
|
|
109
|
-
} catch {
|
|
110
|
-
t.set(r, null);
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
a === null || typeof a == "string" ? t.set(r, a) : (n.add(r), Promise.resolve(a).then((e) => {
|
|
114
|
-
t.set(r, typeof e == "string" ? e : null);
|
|
115
|
-
}, () => {
|
|
116
|
-
t.set(r, null);
|
|
117
|
-
}).finally(() => n.delete(r)));
|
|
118
|
-
}
|
|
119
|
-
return {
|
|
120
|
-
get: r,
|
|
121
|
-
has: i,
|
|
122
|
-
lookup: a
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function Hn(e) {
|
|
126
|
-
let t = p(dn, null), n = N(e);
|
|
127
|
-
if (!t) return n;
|
|
128
|
-
let r;
|
|
129
|
-
function i() {
|
|
130
|
-
r !== void 0 && (clearTimeout(r), r = void 0);
|
|
131
|
-
}
|
|
132
|
-
h() && s(i);
|
|
133
|
-
let a = !0;
|
|
134
|
-
return f(n, (e) => {
|
|
135
|
-
i();
|
|
136
|
-
let n = a;
|
|
137
|
-
a = !1, e && !t.has(e) && (n ? t.lookup(e) : r = setTimeout(() => {
|
|
138
|
-
r = void 0, t.lookup(e);
|
|
139
|
-
}, 300));
|
|
140
|
-
}, { immediate: !0 }), N(() => {
|
|
141
|
-
let e = n.value;
|
|
142
|
-
if (!e) return e;
|
|
143
|
-
let r = t.get(e);
|
|
144
|
-
return typeof r == "string" && r.length > 0 ? r : e;
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
//#endregion
|
|
148
92
|
//#region src/composables/useMergeTagPicker.ts
|
|
149
|
-
function
|
|
93
|
+
function Qn() {
|
|
150
94
|
let e = _(!1), t = _([]), n = _(null), r = null;
|
|
151
95
|
function i(i, a) {
|
|
152
96
|
if (r) {
|
|
@@ -177,7 +121,7 @@ function Un() {
|
|
|
177
121
|
}
|
|
178
122
|
//#endregion
|
|
179
123
|
//#region src/composables/useLogicTagPicker.ts
|
|
180
|
-
function
|
|
124
|
+
function $n() {
|
|
181
125
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
182
126
|
function i(i, a) {
|
|
183
127
|
if (r) {
|
|
@@ -208,17 +152,17 @@ function Wn() {
|
|
|
208
152
|
}
|
|
209
153
|
//#endregion
|
|
210
154
|
//#region src/composables/useTemplateLint.ts
|
|
211
|
-
function
|
|
155
|
+
function er(e) {
|
|
212
156
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
213
157
|
}
|
|
214
|
-
function
|
|
215
|
-
let n = _([]), r = _(!1), i = _(!1), a = e(null), o =
|
|
158
|
+
function tr(t) {
|
|
159
|
+
let n = _([]), r = _(!1), i = _(!1), a = e(null), o = er(t.options), s = null, c = !1;
|
|
216
160
|
o || l();
|
|
217
161
|
async function l() {
|
|
218
162
|
try {
|
|
219
163
|
let e = await import("@templatical/quality");
|
|
220
164
|
if (c) return;
|
|
221
|
-
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s =
|
|
165
|
+
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s = kt(t.content, u, {
|
|
222
166
|
debounce: t.debounce ?? 500,
|
|
223
167
|
deep: !0
|
|
224
168
|
});
|
|
@@ -253,7 +197,7 @@ function Kn(t) {
|
|
|
253
197
|
}
|
|
254
198
|
//#endregion
|
|
255
199
|
//#region src/composables/useKeyboardReorder.ts
|
|
256
|
-
function
|
|
200
|
+
function nr(e, t, n = []) {
|
|
257
201
|
let r = _(null), i = _(""), a = null;
|
|
258
202
|
function o(t) {
|
|
259
203
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -280,7 +224,7 @@ function qn(e, t, n = []) {
|
|
|
280
224
|
let i = o(r);
|
|
281
225
|
if (!i) return "";
|
|
282
226
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
283
|
-
return a ?
|
|
227
|
+
return a ? ut(a, t.t, n) : "";
|
|
284
228
|
}
|
|
285
229
|
function c(t, n) {
|
|
286
230
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -349,13 +293,13 @@ function qn(e, t, n = []) {
|
|
|
349
293
|
}
|
|
350
294
|
//#endregion
|
|
351
295
|
//#region src/composables/useUiTheme.ts
|
|
352
|
-
function
|
|
353
|
-
let t =
|
|
296
|
+
function rr(e) {
|
|
297
|
+
let t = jt("(prefers-color-scheme: dark)");
|
|
354
298
|
return { resolvedTheme: N(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
355
299
|
}
|
|
356
300
|
//#endregion
|
|
357
301
|
//#region src/composables/useThemeStyles.ts
|
|
358
|
-
var
|
|
302
|
+
var ir = {
|
|
359
303
|
bg: "--tpl-bg",
|
|
360
304
|
bgElevated: "--tpl-bg-elevated",
|
|
361
305
|
bgHover: "--tpl-bg-hover",
|
|
@@ -379,10 +323,10 @@ var Yn = {
|
|
|
379
323
|
dangerLight: "--tpl-danger-light",
|
|
380
324
|
canvasBg: "--tpl-canvas-bg"
|
|
381
325
|
};
|
|
382
|
-
function
|
|
326
|
+
function ar({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
383
327
|
return { themeStyles: N(() => {
|
|
384
328
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
385
|
-
if (a) for (let [e, t] of Object.entries(
|
|
329
|
+
if (a) for (let [e, t] of Object.entries(ir)) {
|
|
386
330
|
let n = a[e];
|
|
387
331
|
n && (r[t] = n);
|
|
388
332
|
}
|
|
@@ -391,7 +335,7 @@ function Xn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
391
335
|
}
|
|
392
336
|
//#endregion
|
|
393
337
|
//#region src/composables/useBlockRegistry.ts
|
|
394
|
-
function
|
|
338
|
+
function or() {
|
|
395
339
|
let t = e(/* @__PURE__ */ new Map());
|
|
396
340
|
function n(e, n) {
|
|
397
341
|
t.value.set(e, n), T(t);
|
|
@@ -399,7 +343,7 @@ function Zn() {
|
|
|
399
343
|
function r(e, n) {
|
|
400
344
|
let r = `custom:${e.type}`, i = {
|
|
401
345
|
component: n,
|
|
402
|
-
createBlock: () =>
|
|
346
|
+
createBlock: () => ge(e),
|
|
403
347
|
definition: e
|
|
404
348
|
};
|
|
405
349
|
t.value.set(r, i), T(t);
|
|
@@ -431,7 +375,7 @@ function Zn() {
|
|
|
431
375
|
strictFilters: !1
|
|
432
376
|
}).parseAndRender(t.template, e.fieldValues);
|
|
433
377
|
} catch (t) {
|
|
434
|
-
return
|
|
378
|
+
return kn.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
435
379
|
}
|
|
436
380
|
}
|
|
437
381
|
function l(e) {
|
|
@@ -449,9 +393,9 @@ function Zn() {
|
|
|
449
393
|
}
|
|
450
394
|
//#endregion
|
|
451
395
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
452
|
-
function
|
|
396
|
+
function sr(e, t) {
|
|
453
397
|
return N(() => {
|
|
454
|
-
let n =
|
|
398
|
+
let n = cr(e.value.blocks);
|
|
455
399
|
if (n.size === 0) return [];
|
|
456
400
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
457
401
|
for (let e of n) {
|
|
@@ -463,64 +407,64 @@ function Qn(e, t) {
|
|
|
463
407
|
return i;
|
|
464
408
|
});
|
|
465
409
|
}
|
|
466
|
-
function
|
|
410
|
+
function cr(e) {
|
|
467
411
|
let t = /* @__PURE__ */ new Set();
|
|
468
|
-
return
|
|
412
|
+
return lr(e, t), t;
|
|
469
413
|
}
|
|
470
|
-
function
|
|
471
|
-
for (let n of e) if (
|
|
414
|
+
function lr(e, t) {
|
|
415
|
+
for (let n of e) if (xe(n)) t.add(n.customType);
|
|
472
416
|
else if (n.type === "section") {
|
|
473
417
|
let e = n.children;
|
|
474
418
|
if (!e) continue;
|
|
475
|
-
for (let n of e)
|
|
476
|
-
} else
|
|
419
|
+
for (let n of e) lr(n, t);
|
|
420
|
+
} else qe(n) && lr(n.children, t);
|
|
477
421
|
}
|
|
478
422
|
//#endregion
|
|
479
423
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
480
|
-
var
|
|
424
|
+
var ur = [
|
|
481
425
|
{
|
|
482
426
|
type: "section",
|
|
483
|
-
createBlock:
|
|
427
|
+
createBlock: Le
|
|
484
428
|
},
|
|
485
429
|
{
|
|
486
430
|
type: "title",
|
|
487
|
-
createBlock:
|
|
431
|
+
createBlock: pe
|
|
488
432
|
},
|
|
489
433
|
{
|
|
490
434
|
type: "paragraph",
|
|
491
|
-
createBlock:
|
|
435
|
+
createBlock: fe
|
|
492
436
|
},
|
|
493
437
|
{
|
|
494
438
|
type: "image",
|
|
495
|
-
createBlock:
|
|
439
|
+
createBlock: ae
|
|
496
440
|
},
|
|
497
441
|
{
|
|
498
442
|
type: "button",
|
|
499
|
-
createBlock:
|
|
443
|
+
createBlock: De
|
|
500
444
|
},
|
|
501
445
|
{
|
|
502
446
|
type: "divider",
|
|
503
|
-
createBlock:
|
|
447
|
+
createBlock: Ze
|
|
504
448
|
},
|
|
505
449
|
{
|
|
506
450
|
type: "video",
|
|
507
|
-
createBlock:
|
|
451
|
+
createBlock: oe
|
|
508
452
|
},
|
|
509
453
|
{
|
|
510
454
|
type: "social",
|
|
511
|
-
createBlock:
|
|
455
|
+
createBlock: Ie
|
|
512
456
|
},
|
|
513
457
|
{
|
|
514
458
|
type: "menu",
|
|
515
|
-
createBlock:
|
|
459
|
+
createBlock: ie
|
|
516
460
|
},
|
|
517
461
|
{
|
|
518
462
|
type: "table",
|
|
519
|
-
createBlock:
|
|
463
|
+
createBlock: de
|
|
520
464
|
},
|
|
521
465
|
{
|
|
522
466
|
type: "spacer",
|
|
523
|
-
createBlock:
|
|
467
|
+
createBlock: ue
|
|
524
468
|
},
|
|
525
469
|
{
|
|
526
470
|
type: "html",
|
|
@@ -528,11 +472,11 @@ var tr = [
|
|
|
528
472
|
},
|
|
529
473
|
{
|
|
530
474
|
type: "countdown",
|
|
531
|
-
createBlock:
|
|
475
|
+
createBlock: Qe
|
|
532
476
|
}
|
|
533
477
|
];
|
|
534
|
-
function
|
|
535
|
-
for (let n of
|
|
478
|
+
function dr(e, t) {
|
|
479
|
+
for (let n of ur) {
|
|
536
480
|
let r = t[n.type];
|
|
537
481
|
r && e.registerBuiltIn(n.type, {
|
|
538
482
|
component: r,
|
|
@@ -542,33 +486,33 @@ function nr(e, t) {
|
|
|
542
486
|
}
|
|
543
487
|
//#endregion
|
|
544
488
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
545
|
-
function
|
|
489
|
+
function fr(e) {
|
|
546
490
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
547
491
|
}
|
|
548
492
|
//#endregion
|
|
549
493
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
550
|
-
function
|
|
494
|
+
function pr(e) {
|
|
551
495
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
552
496
|
}
|
|
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(
|
|
497
|
+
function mr(e, t, n) {
|
|
498
|
+
let r = new Set(e.map((e) => jn(e))), i = [], a = (e, t) => {
|
|
499
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(jn(o)) && i.push(`${t}.${n}: ${o}`) : pr(o) && a(o, `${t}.${n}`);
|
|
556
500
|
}, o = t;
|
|
557
|
-
for (let [e, t] of Object.entries(
|
|
501
|
+
for (let [e, t] of Object.entries(Te)) {
|
|
558
502
|
let n = o?.[e];
|
|
559
503
|
a({
|
|
560
504
|
...t,
|
|
561
|
-
...
|
|
505
|
+
...pr(n) ? n : {}
|
|
562
506
|
}, e);
|
|
563
507
|
}
|
|
564
508
|
return a({
|
|
565
|
-
...
|
|
509
|
+
...Be,
|
|
566
510
|
...n ?? {}
|
|
567
511
|
}, "template"), i;
|
|
568
512
|
}
|
|
569
513
|
//#endregion
|
|
570
514
|
//#region src/utils/localizedBlockDefaults.ts
|
|
571
|
-
function
|
|
515
|
+
function hr(e) {
|
|
572
516
|
return {
|
|
573
517
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
574
518
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -577,63 +521,63 @@ function or(e) {
|
|
|
577
521
|
}
|
|
578
522
|
//#endregion
|
|
579
523
|
//#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
|
-
}),
|
|
524
|
+
var gr = /* #__PURE__ */ Object.assign({
|
|
525
|
+
"./locales/ca.ts": () => import("./ca-CbNzJM3I.js"),
|
|
526
|
+
"./locales/de.ts": () => import("./de-DMquBpZM.js"),
|
|
527
|
+
"./locales/en.ts": () => import("./en-C8Mp71sO.js"),
|
|
528
|
+
"./locales/es.ts": () => import("./es-Byq4tthI.js"),
|
|
529
|
+
"./locales/fr.ts": () => import("./fr-B3j35HEw.js"),
|
|
530
|
+
"./locales/ja.ts": () => import("./ja-D7txAuGS.js"),
|
|
531
|
+
"./locales/nl.ts": () => import("./nl-ClJ3BY3F.js"),
|
|
532
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-DibcXcmv.js")
|
|
533
|
+
}), _r = /* #__PURE__ */ Object.assign({
|
|
590
534
|
"./locales/cloud/de.ts": () => import("./de-mMY5yQJu.js"),
|
|
591
535
|
"./locales/cloud/en.ts": () => import("./en-ChVeGQBY.js"),
|
|
592
536
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-CoCwRUi0.js")
|
|
593
537
|
});
|
|
594
|
-
function
|
|
538
|
+
function vr(e) {
|
|
595
539
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
596
540
|
}
|
|
597
|
-
var
|
|
598
|
-
function
|
|
541
|
+
var yr = vr(gr), br = vr(_r);
|
|
542
|
+
function xr(e) {
|
|
599
543
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
600
544
|
}
|
|
601
|
-
function
|
|
602
|
-
let n =
|
|
603
|
-
return t.find((e) =>
|
|
545
|
+
function Sr(e, t) {
|
|
546
|
+
let n = xr(e);
|
|
547
|
+
return t.find((e) => xr(e) === n);
|
|
604
548
|
}
|
|
605
|
-
function
|
|
606
|
-
return
|
|
549
|
+
function Cr(e) {
|
|
550
|
+
return xr(e).split("-")[0];
|
|
607
551
|
}
|
|
608
|
-
function
|
|
609
|
-
return
|
|
552
|
+
function wr(e, t) {
|
|
553
|
+
return Sr(e, t) ?? Sr(Cr(e), t);
|
|
610
554
|
}
|
|
611
|
-
function
|
|
612
|
-
return
|
|
555
|
+
function Tr(e, t) {
|
|
556
|
+
return wr(e, t) ?? "en";
|
|
613
557
|
}
|
|
614
|
-
async function
|
|
615
|
-
let t =
|
|
558
|
+
async function Er(e) {
|
|
559
|
+
let t = gr[`./locales/${Tr(e, yr)}.ts`];
|
|
616
560
|
return (await t()).default;
|
|
617
561
|
}
|
|
618
|
-
async function
|
|
619
|
-
let t =
|
|
562
|
+
async function Dr(e) {
|
|
563
|
+
let t = _r[`./locales/cloud/${Tr(e, br)}.ts`];
|
|
620
564
|
return (await t()).default;
|
|
621
565
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
566
|
+
function Or(e) {
|
|
567
|
+
return wr(e, yr) !== void 0;
|
|
624
568
|
}
|
|
625
|
-
function
|
|
626
|
-
return
|
|
569
|
+
function kr(e) {
|
|
570
|
+
return wr(e, br) !== void 0;
|
|
627
571
|
}
|
|
628
|
-
function
|
|
629
|
-
return [...
|
|
572
|
+
function Ar() {
|
|
573
|
+
return [...yr];
|
|
630
574
|
}
|
|
631
|
-
function
|
|
632
|
-
return [...
|
|
575
|
+
function jr() {
|
|
576
|
+
return [...br];
|
|
633
577
|
}
|
|
634
578
|
//#endregion
|
|
635
579
|
//#region src/i18n/contentDefaults.ts
|
|
636
|
-
var
|
|
580
|
+
var Mr = {
|
|
637
581
|
en: {
|
|
638
582
|
video: "Video",
|
|
639
583
|
days: "Days",
|
|
@@ -699,17 +643,17 @@ var Cr = {
|
|
|
699
643
|
expired: "このオファーは終了しました"
|
|
700
644
|
}
|
|
701
645
|
};
|
|
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 =
|
|
646
|
+
Object.keys(Mr);
|
|
647
|
+
var Nr = new Map(Object.keys(Mr).map((e) => [e.toLowerCase(), e]));
|
|
648
|
+
function Pr(e) {
|
|
649
|
+
if (!e) return Mr.en;
|
|
650
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Nr.get(t);
|
|
651
|
+
if (n) return Mr[n];
|
|
652
|
+
let r = Nr.get(Cr(t));
|
|
653
|
+
return r ? Mr[r] : Mr.en;
|
|
654
|
+
}
|
|
655
|
+
function Fr(e) {
|
|
656
|
+
let t = Pr(e);
|
|
713
657
|
return {
|
|
714
658
|
video: { alt: t.video },
|
|
715
659
|
countdown: {
|
|
@@ -723,9 +667,9 @@ function Er(e) {
|
|
|
723
667
|
}
|
|
724
668
|
//#endregion
|
|
725
669
|
//#region src/utils/collectColorFieldIssues.ts
|
|
726
|
-
function
|
|
670
|
+
function Ir(e, t) {
|
|
727
671
|
let n = [], r = (r, i) => {
|
|
728
|
-
let a =
|
|
672
|
+
let a = Ct(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
729
673
|
if (a.invalidPresets.length > 0 && n.push({
|
|
730
674
|
id: s("invalid-presets"),
|
|
731
675
|
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 +680,8 @@ function Dr(e, t) {
|
|
|
736
680
|
id: s("allow-custom-ignored"),
|
|
737
681
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
738
682
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
739
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
740
|
-
e !== "" && !t.has(
|
|
683
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => jn(e)));
|
|
684
|
+
e !== "" && !t.has(jn(e)) && n.push({
|
|
741
685
|
id: s("off-palette-default"),
|
|
742
686
|
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
687
|
});
|
|
@@ -749,7 +693,7 @@ function Dr(e, t) {
|
|
|
749
693
|
}
|
|
750
694
|
//#endregion
|
|
751
695
|
//#region src/utils/keyboardShortcuts.ts
|
|
752
|
-
function
|
|
696
|
+
function Lr(e) {
|
|
753
697
|
for (let t of e.composedPath()) {
|
|
754
698
|
if (!(t instanceof HTMLElement)) continue;
|
|
755
699
|
if (t.isContentEditable) return !0;
|
|
@@ -758,14 +702,14 @@ function Or(e) {
|
|
|
758
702
|
}
|
|
759
703
|
return !1;
|
|
760
704
|
}
|
|
761
|
-
function
|
|
705
|
+
function Rr(e, t) {
|
|
762
706
|
let n = e.metaKey || e.ctrlKey;
|
|
763
707
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
764
708
|
else if (n && e.key.toLowerCase() === "z") {
|
|
765
|
-
if (
|
|
709
|
+
if (Lr(e)) return;
|
|
766
710
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
767
711
|
} else {
|
|
768
|
-
if (t.isPicking?.() && !
|
|
712
|
+
if (t.isPicking?.() && !Lr(e)) {
|
|
769
713
|
if (e.key === "Escape") {
|
|
770
714
|
e.preventDefault(), t.onCancelPick?.();
|
|
771
715
|
return;
|
|
@@ -779,58 +723,105 @@ function kr(e, t) {
|
|
|
779
723
|
return;
|
|
780
724
|
}
|
|
781
725
|
}
|
|
782
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
726
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Lr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
783
727
|
}
|
|
784
728
|
}
|
|
785
729
|
//#endregion
|
|
786
730
|
//#region src/utils/blockComponentResolver.ts
|
|
787
|
-
function
|
|
788
|
-
let
|
|
789
|
-
return e.textColor && (
|
|
731
|
+
function zr(e, t) {
|
|
732
|
+
let n = { fontFamily: t(e.fontFamily) };
|
|
733
|
+
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
734
|
}
|
|
791
|
-
function
|
|
735
|
+
function Br(e, t, n) {
|
|
792
736
|
if (t) {
|
|
793
737
|
let n = t.getComponent(e);
|
|
794
738
|
if (n) return n;
|
|
795
739
|
}
|
|
796
740
|
return n[e.type] ?? null;
|
|
797
741
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
742
|
+
var Vr = "--tpl-block-bg-layer", Hr = "tpl-has-bg-image";
|
|
743
|
+
function Ur(e, t) {
|
|
744
|
+
if (t === null) return {};
|
|
745
|
+
let n = Fe(e);
|
|
746
|
+
if (n === null) return {};
|
|
747
|
+
let r = t?.trim(), i = r ? he(r) : n.url;
|
|
748
|
+
return {
|
|
749
|
+
backgroundImage: `url("${i}")`,
|
|
750
|
+
backgroundSize: n.size,
|
|
751
|
+
backgroundPosition: n.position,
|
|
752
|
+
backgroundRepeat: n.repeat,
|
|
753
|
+
[Vr]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
function Wr(e) {
|
|
757
|
+
return e && Vr in e ? Hr : void 0;
|
|
758
|
+
}
|
|
759
|
+
var Gr = {
|
|
760
|
+
top: "flex-start",
|
|
761
|
+
middle: "center",
|
|
762
|
+
bottom: "flex-end"
|
|
763
|
+
};
|
|
764
|
+
function Kr(e, t) {
|
|
765
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${qr(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
766
|
+
return {
|
|
767
|
+
display: "flex",
|
|
768
|
+
flexDirection: "column",
|
|
769
|
+
justifyContent: Gr[e.verticalAlign],
|
|
770
|
+
boxSizing: "border-box",
|
|
771
|
+
...n
|
|
803
772
|
};
|
|
804
|
-
if ((e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ve.paragraphGap : Ve.paragraphGap}px`), e.type === "section") {
|
|
805
|
-
let t = We(e.borderRadius);
|
|
806
|
-
t !== null && (r.borderRadius = t), Object.assign(r, Nr(e.border));
|
|
807
|
-
}
|
|
808
|
-
return r;
|
|
809
773
|
}
|
|
810
|
-
function
|
|
774
|
+
function qr(e, t) {
|
|
775
|
+
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
776
|
+
}
|
|
777
|
+
function Jr(e, t = {}) {
|
|
778
|
+
if (e.type === "wrapper") return {};
|
|
779
|
+
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
780
|
+
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
781
|
+
backgroundColor: r || "transparent"
|
|
782
|
+
};
|
|
783
|
+
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") {
|
|
784
|
+
let n = et(e.borderRadius);
|
|
785
|
+
n !== null && (i.borderRadius = n);
|
|
786
|
+
let r = Ke(e);
|
|
787
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Kr(r, t.heroBoxWidth)), Object.assign(i, Ur({
|
|
788
|
+
...e.backgroundImage,
|
|
789
|
+
size: "cover",
|
|
790
|
+
repeat: !1
|
|
791
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, Xr(e.border)), Object.assign(i, Ur(e.backgroundImage, t.backgroundImageUrl)));
|
|
792
|
+
}
|
|
793
|
+
return i;
|
|
794
|
+
}
|
|
795
|
+
function Yr(e, t, n, r) {
|
|
796
|
+
return e.type === "section" ? Jr(e, {
|
|
797
|
+
backgroundImageUrl: it(t, e.backgroundImage, n),
|
|
798
|
+
heroBoxWidth: r
|
|
799
|
+
}) : Jr(e);
|
|
800
|
+
}
|
|
801
|
+
function Xr(e) {
|
|
811
802
|
let t = {};
|
|
812
|
-
for (let [n, r] of Object.entries(
|
|
803
|
+
for (let [n, r] of Object.entries(Xe(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
813
804
|
return t;
|
|
814
805
|
}
|
|
815
|
-
function
|
|
806
|
+
function Zr(e, t = {}) {
|
|
816
807
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
817
|
-
let
|
|
818
|
-
|
|
819
|
-
let
|
|
820
|
-
return
|
|
808
|
+
let n = e.wrapper, r = {};
|
|
809
|
+
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`);
|
|
810
|
+
let i = et(n.borderRadius);
|
|
811
|
+
return i !== null && (r.borderRadius = i), Object.assign(r, Ur(n.backgroundImage, t.backgroundImageUrl)), r;
|
|
821
812
|
}
|
|
822
|
-
function
|
|
813
|
+
function Qr(e, t = {}) {
|
|
823
814
|
if (e.type !== "wrapper") return null;
|
|
824
|
-
let
|
|
825
|
-
if (e.styles.backgroundColor && (
|
|
826
|
-
let
|
|
827
|
-
|
|
815
|
+
let n = {};
|
|
816
|
+
if (e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
817
|
+
let t = e.styles.padding;
|
|
818
|
+
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
828
819
|
}
|
|
829
|
-
return e.borderRadius && e.borderRadius > 0 && (
|
|
820
|
+
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Ur(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
830
821
|
}
|
|
831
822
|
//#endregion
|
|
832
823
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
833
|
-
function
|
|
824
|
+
function $r(e, t, n, r = !1) {
|
|
834
825
|
if (!e) return [];
|
|
835
826
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
836
827
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -839,18 +830,18 @@ function Ir(e, t, n, r = !1) {
|
|
|
839
830
|
value: e.slice(o, s.index)
|
|
840
831
|
});
|
|
841
832
|
let i = s[0];
|
|
842
|
-
if (
|
|
843
|
-
let e = r ?
|
|
833
|
+
if (Se(i, n)) {
|
|
834
|
+
let e = r ? ye(i, t) : void 0;
|
|
844
835
|
a.push(e === void 0 ? {
|
|
845
836
|
type: "tag",
|
|
846
|
-
value:
|
|
837
|
+
value: ve(i, t)
|
|
847
838
|
} : {
|
|
848
839
|
type: "text",
|
|
849
840
|
value: e
|
|
850
841
|
});
|
|
851
|
-
} else
|
|
842
|
+
} else be(i, n) ? a.push({
|
|
852
843
|
type: "tag",
|
|
853
|
-
value:
|
|
844
|
+
value: se(i, n)
|
|
854
845
|
}) : a.push({
|
|
855
846
|
type: "text",
|
|
856
847
|
value: i
|
|
@@ -864,27 +855,27 @@ function Ir(e, t, n, r = !1) {
|
|
|
864
855
|
}
|
|
865
856
|
//#endregion
|
|
866
857
|
//#region src/components/MergeTagPreviewText.vue
|
|
867
|
-
var
|
|
858
|
+
var ei = F({
|
|
868
859
|
name: "MergeTagPreviewText",
|
|
869
860
|
props: { text: {
|
|
870
861
|
type: String,
|
|
871
862
|
required: !0
|
|
872
863
|
} },
|
|
873
864
|
setup(e) {
|
|
874
|
-
let t = p(
|
|
865
|
+
let t = p(Jt, zt), n = p(Yt, Je.liquid), r = p(Xt, null), i = N(() => $r(e.text, t.value, n, r?.value ?? !1));
|
|
875
866
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
876
867
|
key: t,
|
|
877
868
|
class: "tpl-merge-tag-label"
|
|
878
869
|
}, e.value) : e.value);
|
|
879
870
|
}
|
|
880
|
-
}),
|
|
871
|
+
}), ti = ["href"], ni = /* @__PURE__ */ F({
|
|
881
872
|
__name: "ButtonBlock",
|
|
882
873
|
props: {
|
|
883
874
|
block: {},
|
|
884
875
|
viewport: {}
|
|
885
876
|
},
|
|
886
877
|
setup(e) {
|
|
887
|
-
let r = e, i = N(() => {
|
|
878
|
+
let r = e, i = Nt(Cn, "ButtonBlock"), a = N(() => {
|
|
888
879
|
let e = {
|
|
889
880
|
display: "inline-block",
|
|
890
881
|
padding: `${r.block.buttonPadding.top}px ${r.block.buttonPadding.right}px ${r.block.buttonPadding.bottom}px ${r.block.buttonPadding.left}px`,
|
|
@@ -893,26 +884,26 @@ var Lr = F({
|
|
|
893
884
|
fontSize: `${r.block.fontSize}px`,
|
|
894
885
|
fontWeight: "bold",
|
|
895
886
|
textDecoration: "none",
|
|
896
|
-
borderRadius: typeof r.block.borderRadius == "number" ? `${r.block.borderRadius}px` :
|
|
887
|
+
borderRadius: typeof r.block.borderRadius == "number" ? `${r.block.borderRadius}px` : et(r.block.borderRadius) ?? "0px",
|
|
897
888
|
textAlign: "center"
|
|
898
889
|
};
|
|
899
|
-
return Object.assign(e,
|
|
900
|
-
}),
|
|
901
|
-
return (r,
|
|
890
|
+
return Object.assign(e, Xr(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;
|
|
891
|
+
}), o = N(() => ({ textAlign: r.block.align ?? "center" }));
|
|
892
|
+
return (r, i) => (t(), S("div", { style: n(o.value) }, [x("a", {
|
|
902
893
|
href: e.block.url || "#",
|
|
903
|
-
style: n(
|
|
894
|
+
style: n(a.value),
|
|
904
895
|
class: "tpl:cursor-default",
|
|
905
|
-
onClick:
|
|
906
|
-
}, [C(
|
|
896
|
+
onClick: i[0] ||= I(() => {}, ["prevent"])
|
|
897
|
+
}, [C(ei, { text: e.block.text }, null, 8, ["text"])], 12, ti)], 4));
|
|
907
898
|
}
|
|
908
|
-
}),
|
|
899
|
+
}), ri = In({
|
|
909
900
|
name: "bookmark",
|
|
910
901
|
size: 24,
|
|
911
902
|
node: [["path", {
|
|
912
903
|
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
904
|
key: "oz39mx"
|
|
914
905
|
}]]
|
|
915
|
-
}),
|
|
906
|
+
}), ii = In({
|
|
916
907
|
name: "box",
|
|
917
908
|
size: 24,
|
|
918
909
|
node: [
|
|
@@ -929,7 +920,7 @@ var Lr = F({
|
|
|
929
920
|
key: "d0xqtd"
|
|
930
921
|
}]
|
|
931
922
|
]
|
|
932
|
-
}),
|
|
923
|
+
}), ai = In({
|
|
933
924
|
name: "eye-off",
|
|
934
925
|
size: 24,
|
|
935
926
|
node: [
|
|
@@ -950,7 +941,7 @@ var Lr = F({
|
|
|
950
941
|
key: "1ooewy"
|
|
951
942
|
}]
|
|
952
943
|
]
|
|
953
|
-
}),
|
|
944
|
+
}), oi = In({
|
|
954
945
|
name: "funnel",
|
|
955
946
|
size: 24,
|
|
956
947
|
node: [["path", {
|
|
@@ -958,7 +949,7 @@ var Lr = F({
|
|
|
958
949
|
key: "sc7q7i"
|
|
959
950
|
}]],
|
|
960
951
|
aliases: ["filter"]
|
|
961
|
-
}),
|
|
952
|
+
}), si = In({
|
|
962
953
|
name: "grip-vertical",
|
|
963
954
|
size: 24,
|
|
964
955
|
node: [
|
|
@@ -999,14 +990,14 @@ var Lr = F({
|
|
|
999
990
|
key: "f4zoj3"
|
|
1000
991
|
}]
|
|
1001
992
|
]
|
|
1002
|
-
}),
|
|
993
|
+
}), ci = In({
|
|
1003
994
|
name: "puzzle",
|
|
1004
995
|
size: 24,
|
|
1005
996
|
node: [["path", {
|
|
1006
997
|
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
998
|
key: "w46dr5"
|
|
1008
999
|
}]]
|
|
1009
|
-
}),
|
|
1000
|
+
}), li = In({
|
|
1010
1001
|
name: "video",
|
|
1011
1002
|
size: 24,
|
|
1012
1003
|
node: [["path", {
|
|
@@ -1020,11 +1011,11 @@ var Lr = F({
|
|
|
1020
1011
|
rx: "2",
|
|
1021
1012
|
key: "158x01"
|
|
1022
1013
|
}]]
|
|
1023
|
-
}),
|
|
1014
|
+
}), ui = ["innerHTML"], di = [
|
|
1024
1015
|
"src",
|
|
1025
1016
|
"width",
|
|
1026
1017
|
"height"
|
|
1027
|
-
],
|
|
1018
|
+
], fi = /* @__PURE__ */ F({
|
|
1028
1019
|
__name: "CustomBlockIcon",
|
|
1029
1020
|
props: {
|
|
1030
1021
|
icon: {},
|
|
@@ -1040,24 +1031,24 @@ var Lr = F({
|
|
|
1040
1031
|
height: `${i.value}px`
|
|
1041
1032
|
}),
|
|
1042
1033
|
innerHTML: e.icon
|
|
1043
|
-
}, null, 12,
|
|
1034
|
+
}, null, 12, ui)) : o.value ? (t(), S("img", {
|
|
1044
1035
|
key: 1,
|
|
1045
1036
|
src: e.icon,
|
|
1046
1037
|
width: i.value,
|
|
1047
1038
|
height: i.value,
|
|
1048
1039
|
class: "tpl:inline-block",
|
|
1049
1040
|
alt: ""
|
|
1050
|
-
}, null, 8,
|
|
1041
|
+
}, null, 8, di)) : (t(), A(y(ii), {
|
|
1051
1042
|
key: 2,
|
|
1052
1043
|
size: i.value,
|
|
1053
1044
|
"stroke-width": 1.5
|
|
1054
1045
|
}, null, 8, ["size"]));
|
|
1055
1046
|
}
|
|
1056
|
-
}),
|
|
1057
|
-
function
|
|
1058
|
-
let n =
|
|
1047
|
+
}), pi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1048
|
+
function mi(e, t) {
|
|
1049
|
+
let n = Un(), r = null, i = null, a = null;
|
|
1059
1050
|
function o() {
|
|
1060
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1051
|
+
return e.value ? Array.from(e.value.querySelectorAll(pi)).filter((e) => e.offsetParent !== null) : [];
|
|
1061
1052
|
}
|
|
1062
1053
|
function c(e) {
|
|
1063
1054
|
if (e.key !== "Tab") return;
|
|
@@ -1072,7 +1063,7 @@ function Zr(e, t) {
|
|
|
1072
1063
|
a = null;
|
|
1073
1064
|
let t = o();
|
|
1074
1065
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1075
|
-
}), i =
|
|
1066
|
+
}), i = At(e, "keydown", c);
|
|
1076
1067
|
}
|
|
1077
1068
|
function u(e = {}) {
|
|
1078
1069
|
let t = e.restoreFocus !== !1;
|
|
@@ -1087,8 +1078,8 @@ function Zr(e, t) {
|
|
|
1087
1078
|
}
|
|
1088
1079
|
//#endregion
|
|
1089
1080
|
//#region src/composables/useEmoji.ts
|
|
1090
|
-
function
|
|
1091
|
-
let [t, n] =
|
|
1081
|
+
function hi() {
|
|
1082
|
+
let [t, n] = Ot(!1), r = e([]), i = !1;
|
|
1092
1083
|
s(() => {
|
|
1093
1084
|
i = !0;
|
|
1094
1085
|
}), f(t, async (e) => {
|
|
@@ -1113,7 +1104,7 @@ function Qr() {
|
|
|
1113
1104
|
}
|
|
1114
1105
|
//#endregion
|
|
1115
1106
|
//#region src/composables/useFonts.ts
|
|
1116
|
-
var
|
|
1107
|
+
var gi = [
|
|
1117
1108
|
{
|
|
1118
1109
|
value: "Arial",
|
|
1119
1110
|
label: "Arial"
|
|
@@ -1142,19 +1133,19 @@ var $r = [
|
|
|
1142
1133
|
value: "Courier New",
|
|
1143
1134
|
label: "Courier New"
|
|
1144
1135
|
}
|
|
1145
|
-
],
|
|
1146
|
-
function
|
|
1147
|
-
if (e === void 0 || e === !0) return [
|
|
1136
|
+
], _i = "Arial, sans-serif";
|
|
1137
|
+
function vi(e) {
|
|
1138
|
+
if (e === void 0 || e === !0) return [...gi];
|
|
1148
1139
|
if (e === !1) return [];
|
|
1149
1140
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1150
1141
|
for (let i of e) {
|
|
1151
|
-
let e = i.toLowerCase(), a =
|
|
1152
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
1142
|
+
let e = i.toLowerCase(), a = gi.find((t) => t.value.toLowerCase() === e);
|
|
1143
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), kn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${gi.map((e) => e.value).join(", ")}.`));
|
|
1153
1144
|
}
|
|
1154
1145
|
return t;
|
|
1155
1146
|
}
|
|
1156
|
-
function
|
|
1157
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r =
|
|
1147
|
+
function yi(e) {
|
|
1148
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = vi(e?.builtIns), i = N(() => e?.defaultFallback ?? _i), a = N(() => {
|
|
1158
1149
|
let e = [...r], n = t.value.map((e) => ({
|
|
1159
1150
|
value: e.name,
|
|
1160
1151
|
label: e.name,
|
|
@@ -1165,24 +1156,21 @@ function ni(e) {
|
|
|
1165
1156
|
function o(e) {
|
|
1166
1157
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1167
1158
|
}
|
|
1168
|
-
let c = e?.defaultFont ??
|
|
1169
|
-
o(c) ||
|
|
1159
|
+
let c = e?.defaultFont ?? _i.split(",")[0].trim();
|
|
1160
|
+
o(c) || kn.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.`);
|
|
1170
1161
|
function l() {
|
|
1171
1162
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1172
1163
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1173
1164
|
if (t) return t.value;
|
|
1174
1165
|
}
|
|
1175
|
-
return
|
|
1166
|
+
return _i;
|
|
1176
1167
|
}
|
|
1177
1168
|
let u = N(() => l());
|
|
1178
1169
|
function d(e) {
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
return `'${n.name}', ${e}`;
|
|
1184
|
-
}
|
|
1185
|
-
return ze[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1170
|
+
return Ve(e, {
|
|
1171
|
+
customFonts: t.value,
|
|
1172
|
+
defaultFallback: i.value
|
|
1173
|
+
});
|
|
1186
1174
|
}
|
|
1187
1175
|
let f = [], p = !1;
|
|
1188
1176
|
async function m() {
|
|
@@ -1198,7 +1186,7 @@ function ni(e) {
|
|
|
1198
1186
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1199
1187
|
});
|
|
1200
1188
|
} catch (t) {
|
|
1201
|
-
|
|
1189
|
+
kn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1202
1190
|
}
|
|
1203
1191
|
});
|
|
1204
1192
|
await Promise.allSettled(e), !p && (n.value = !0);
|
|
@@ -1217,18 +1205,18 @@ function ni(e) {
|
|
|
1217
1205
|
isLoaded: n,
|
|
1218
1206
|
loadCustomFonts: m,
|
|
1219
1207
|
cleanupFontLinks: g,
|
|
1220
|
-
|
|
1208
|
+
resolveFontFamily: d,
|
|
1221
1209
|
getDefaultFont: l
|
|
1222
1210
|
};
|
|
1223
1211
|
}
|
|
1224
1212
|
//#endregion
|
|
1225
1213
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1226
|
-
function
|
|
1227
|
-
return
|
|
1214
|
+
function bi(e, t, n) {
|
|
1215
|
+
return be(e, n) ? {
|
|
1228
1216
|
type: "logicMergeTagNode",
|
|
1229
1217
|
attrs: {
|
|
1230
1218
|
value: e,
|
|
1231
|
-
keyword:
|
|
1219
|
+
keyword: se(e, n)
|
|
1232
1220
|
}
|
|
1233
1221
|
} : {
|
|
1234
1222
|
type: "mergeTagNode",
|
|
@@ -1240,33 +1228,33 @@ function ri(e, t, n) {
|
|
|
1240
1228
|
}
|
|
1241
1229
|
//#endregion
|
|
1242
1230
|
//#region src/utils/insertLogicTag.ts
|
|
1243
|
-
function
|
|
1231
|
+
function xi(e) {
|
|
1244
1232
|
return "before" in e && "after" in e;
|
|
1245
1233
|
}
|
|
1246
|
-
function
|
|
1247
|
-
if (!
|
|
1248
|
-
e.chain().focus().insertContent(
|
|
1234
|
+
function Si(e, t, n) {
|
|
1235
|
+
if (!xi(t)) {
|
|
1236
|
+
e.chain().focus().insertContent(bi(t.value, t.label, n)).run();
|
|
1249
1237
|
return;
|
|
1250
1238
|
}
|
|
1251
|
-
let r =
|
|
1239
|
+
let r = bi(t.before, t.label, n), i = bi(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1252
1240
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1253
1241
|
}
|
|
1254
1242
|
//#endregion
|
|
1255
1243
|
//#region src/utils/linkColorExtension.ts
|
|
1256
|
-
function
|
|
1244
|
+
function Ci(e) {
|
|
1257
1245
|
if (!e) return null;
|
|
1258
1246
|
let t = e.trim();
|
|
1259
1247
|
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;
|
|
1260
1248
|
}
|
|
1261
|
-
function
|
|
1249
|
+
function wi(e) {
|
|
1262
1250
|
return e.extend({ addAttributes() {
|
|
1263
1251
|
return {
|
|
1264
1252
|
...this.parent?.(),
|
|
1265
1253
|
color: {
|
|
1266
1254
|
default: null,
|
|
1267
|
-
parseHTML: (e) =>
|
|
1255
|
+
parseHTML: (e) => Ci(An(e.style.color)),
|
|
1268
1256
|
renderHTML: (e) => {
|
|
1269
|
-
let t =
|
|
1257
|
+
let t = Ci(e.color);
|
|
1270
1258
|
return t ? { style: `color: ${t}` } : {};
|
|
1271
1259
|
}
|
|
1272
1260
|
}
|
|
@@ -1275,9 +1263,9 @@ function si(e) {
|
|
|
1275
1263
|
}
|
|
1276
1264
|
//#endregion
|
|
1277
1265
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1278
|
-
function
|
|
1266
|
+
function Ti(e, t = Je.liquid) {
|
|
1279
1267
|
let n = _(!1), r = _(""), i = _(""), a = _(null);
|
|
1280
|
-
|
|
1268
|
+
mi(a, n);
|
|
1281
1269
|
function o() {
|
|
1282
1270
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1283
1271
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -1286,7 +1274,7 @@ function ci(e, t = Pe.liquid) {
|
|
|
1286
1274
|
if (r.value) {
|
|
1287
1275
|
let t = d(r.value);
|
|
1288
1276
|
if (t !== null) {
|
|
1289
|
-
let n =
|
|
1277
|
+
let n = Ci(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1290
1278
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1291
1279
|
}
|
|
1292
1280
|
}
|
|
@@ -1338,13 +1326,13 @@ function ci(e, t = Pe.liquid) {
|
|
|
1338
1326
|
}
|
|
1339
1327
|
//#endregion
|
|
1340
1328
|
//#region src/composables/useRichTextEditor.ts
|
|
1341
|
-
function
|
|
1342
|
-
let n = p(
|
|
1329
|
+
function Ei(t) {
|
|
1330
|
+
let n = p(dn, null), { mergeTags: r, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: l, autocomplete: u } = Wn(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = Gn(), g = p(nn, null), v = (c(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = ce(l), b = e(null), x = () => Ee(n?.content?.value?.settings ?? { locale: "en" });
|
|
1343
1331
|
f(x, (e) => {
|
|
1344
1332
|
let t = b.value?.view.dom;
|
|
1345
1333
|
t && t.setAttribute("dir", e);
|
|
1346
1334
|
});
|
|
1347
|
-
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } =
|
|
1335
|
+
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } = Ti(b, l), { start: j, stop: M } = Et(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), ee = e(null), N = _(!0), P = _(null), F = !1, te = null;
|
|
1348
1336
|
async function I() {
|
|
1349
1337
|
P.value = null, N.value = !0;
|
|
1350
1338
|
try {
|
|
@@ -1375,7 +1363,7 @@ function li(t) {
|
|
|
1375
1363
|
b.value = s, N.value = !1, j();
|
|
1376
1364
|
} catch (e) {
|
|
1377
1365
|
if (F) return;
|
|
1378
|
-
|
|
1366
|
+
kn.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), P.value = e instanceof Error ? e.message : "Failed to load editor", N.value = !1;
|
|
1379
1367
|
}
|
|
1380
1368
|
}
|
|
1381
1369
|
function ne() {
|
|
@@ -1393,7 +1381,7 @@ function li(t) {
|
|
|
1393
1381
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1394
1382
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
1395
1383
|
}
|
|
1396
|
-
|
|
1384
|
+
At(document, "mousedown", ie), i(() => {
|
|
1397
1385
|
F = !0, re(), M(), b.value?.destroy();
|
|
1398
1386
|
});
|
|
1399
1387
|
async function ae() {
|
|
@@ -1405,7 +1393,7 @@ function li(t) {
|
|
|
1405
1393
|
}
|
|
1406
1394
|
async function oe() {
|
|
1407
1395
|
let e = await h();
|
|
1408
|
-
F || (e && b.value ?
|
|
1396
|
+
F || (e && b.value ? Si(b.value, e, l) : b.value?.commands.focus());
|
|
1409
1397
|
}
|
|
1410
1398
|
return {
|
|
1411
1399
|
editor: b,
|
|
@@ -1434,9 +1422,9 @@ function li(t) {
|
|
|
1434
1422
|
}
|
|
1435
1423
|
//#endregion
|
|
1436
1424
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1437
|
-
var
|
|
1438
|
-
function
|
|
1439
|
-
let t =
|
|
1425
|
+
var Di = "(max-width: 767px)";
|
|
1426
|
+
function Oi(e) {
|
|
1427
|
+
let t = jt(Di);
|
|
1440
1428
|
return {
|
|
1441
1429
|
isSmallScreen: t,
|
|
1442
1430
|
showNotice: N(() => (ee(e) ?? !0) && t.value)
|
|
@@ -1444,20 +1432,20 @@ function di(e) {
|
|
|
1444
1432
|
}
|
|
1445
1433
|
//#endregion
|
|
1446
1434
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1447
|
-
var
|
|
1435
|
+
var ki = { class: "tpl:w-full" }, Ai = {
|
|
1448
1436
|
key: 0,
|
|
1449
|
-
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)]"
|
|
1450
|
-
},
|
|
1437
|
+
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)]"
|
|
1438
|
+
}, ji = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Mi = {
|
|
1451
1439
|
key: 1,
|
|
1452
|
-
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)]"
|
|
1453
|
-
},
|
|
1440
|
+
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)]"
|
|
1441
|
+
}, Ni = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Pi = {
|
|
1454
1442
|
key: 2,
|
|
1455
1443
|
class: "tpl:relative"
|
|
1456
|
-
},
|
|
1444
|
+
}, Fi = ["innerHTML"], Ii = {
|
|
1457
1445
|
key: 0,
|
|
1458
1446
|
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]",
|
|
1459
1447
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1460
|
-
},
|
|
1448
|
+
}, Li = /* @__PURE__ */ F({
|
|
1461
1449
|
__name: "CustomBlock",
|
|
1462
1450
|
props: {
|
|
1463
1451
|
block: {},
|
|
@@ -1465,7 +1453,7 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1465
1453
|
},
|
|
1466
1454
|
emits: ["fetchData"],
|
|
1467
1455
|
setup(e, { emit: n }) {
|
|
1468
|
-
let r = e, i = n, { t: a } =
|
|
1456
|
+
let r = e, i = n, { t: a } = On(), o = p(Sn, 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 } = ot({
|
|
1469
1457
|
definition: l,
|
|
1470
1458
|
block: m,
|
|
1471
1459
|
onUpdate: (e, t) => {
|
|
@@ -1474,10 +1462,10 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1474
1462
|
dataSourceFetched: t
|
|
1475
1463
|
});
|
|
1476
1464
|
}
|
|
1477
|
-
}), T = p(
|
|
1465
|
+
}), T = p(Jt, zt), E = p(Xt, null), O = N(() => {
|
|
1478
1466
|
if (!E?.value) return r.block;
|
|
1479
1467
|
let e = {};
|
|
1480
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1468
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? Ne(n, T.value) : n;
|
|
1481
1469
|
return {
|
|
1482
1470
|
...r.block,
|
|
1483
1471
|
fieldValues: e
|
|
@@ -1494,17 +1482,17 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1494
1482
|
}
|
|
1495
1483
|
}
|
|
1496
1484
|
}
|
|
1497
|
-
let j =
|
|
1485
|
+
let j = Dt(k, 150);
|
|
1498
1486
|
return d(() => {
|
|
1499
1487
|
k();
|
|
1500
1488
|
}), f(() => r.block.fieldValues, () => {
|
|
1501
1489
|
j();
|
|
1502
1490
|
}, { deep: !0 }), f(() => E?.value, () => {
|
|
1503
1491
|
j();
|
|
1504
|
-
}), (e, n) => (t(), S("div",
|
|
1492
|
+
}), (e, n) => (t(), S("div", ki, [u.value ? c.value ? (t(), S("div", Mi, [C(y(Bn), {
|
|
1505
1493
|
size: 24,
|
|
1506
1494
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1507
|
-
}), x("span",
|
|
1495
|
+
}), x("span", Ni, D(y(a).customBlocks.renderError), 1)])) : (t(), S("div", Pi, [x("div", { innerHTML: s.value }, null, 8, Fi), y(b) && y(v) ? (t(), S("div", Ii, [y(h) ? (t(), A(Vn, {
|
|
1508
1496
|
key: 1,
|
|
1509
1497
|
class: "tpl:w-48"
|
|
1510
1498
|
})) : (t(), S("button", {
|
|
@@ -1512,16 +1500,16 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1512
1500
|
type: "button",
|
|
1513
1501
|
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)]",
|
|
1514
1502
|
onClick: n[0] ||= I((...e) => y(g) && y(g)(...e), ["stop"])
|
|
1515
|
-
}, [l.value?.icon ? (t(), A(
|
|
1503
|
+
}, [l.value?.icon ? (t(), A(fi, {
|
|
1516
1504
|
key: 0,
|
|
1517
1505
|
icon: l.value.icon,
|
|
1518
1506
|
size: 16
|
|
1519
|
-
}, null, 8, ["icon"])) : P("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : P("", !0)])) : (t(), S("div",
|
|
1507
|
+
}, null, 8, ["icon"])) : P("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : P("", !0)])) : (t(), S("div", Ai, [C(y(ci), {
|
|
1520
1508
|
size: 24,
|
|
1521
1509
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1522
|
-
}), x("span",
|
|
1510
|
+
}), x("span", ji, D(y(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1523
1511
|
}
|
|
1524
|
-
}),
|
|
1512
|
+
}), Ri = { class: "tpl:w-full" }, zi = /* @__PURE__ */ F({
|
|
1525
1513
|
__name: "DividerBlock",
|
|
1526
1514
|
props: {
|
|
1527
1515
|
block: {},
|
|
@@ -1533,28 +1521,28 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1533
1521
|
width: r.block.width === "full" ? "100%" : typeof r.block.width == "number" ? `${r.block.width}px` : r.block.width,
|
|
1534
1522
|
margin: r.block.width === "full" ? "0" : "0 auto"
|
|
1535
1523
|
}));
|
|
1536
|
-
return (e, r) => (t(), S("div",
|
|
1524
|
+
return (e, r) => (t(), S("div", Ri, [x("hr", {
|
|
1537
1525
|
class: "tpl:m-0 tpl:border-none",
|
|
1538
1526
|
style: n(i.value)
|
|
1539
1527
|
}, null, 4)]));
|
|
1540
1528
|
}
|
|
1541
|
-
}),
|
|
1529
|
+
}), Bi = { class: "tpl:w-full" }, Vi = ["srcdoc", "title"], Hi = {
|
|
1542
1530
|
key: 1,
|
|
1543
|
-
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)]"
|
|
1544
|
-
},
|
|
1531
|
+
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)]"
|
|
1532
|
+
}, Ui = {
|
|
1545
1533
|
key: 0,
|
|
1546
1534
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1547
|
-
},
|
|
1535
|
+
}, Wi = {
|
|
1548
1536
|
key: 1,
|
|
1549
1537
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1550
|
-
},
|
|
1538
|
+
}, Gi = /* @__PURE__ */ F({
|
|
1551
1539
|
__name: "HtmlBlock",
|
|
1552
1540
|
props: {
|
|
1553
1541
|
block: {},
|
|
1554
1542
|
viewport: {}
|
|
1555
1543
|
},
|
|
1556
1544
|
setup(e) {
|
|
1557
|
-
let r = e, { t: a } =
|
|
1545
|
+
let r = e, { t: a } = On(), o = p(sn, !1), s = N(() => r.block.content.trim().length > 0), c = N(() => o && s.value), l = p(Jt, zt), u = p(Xt, null), d = N(() => u?.value ? Ne(r.block.content, l.value) : r.block.content), m = _(null), h = _(60), g = null;
|
|
1558
1546
|
function v() {
|
|
1559
1547
|
let e = m.value?.contentDocument;
|
|
1560
1548
|
e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1568,7 +1556,7 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1568
1556
|
e || (g?.disconnect(), g = null);
|
|
1569
1557
|
}), i(() => {
|
|
1570
1558
|
g?.disconnect(), g = null;
|
|
1571
|
-
}), (e, r) => (t(), S("div",
|
|
1559
|
+
}), (e, r) => (t(), S("div", Bi, [c.value ? (t(), S("iframe", {
|
|
1572
1560
|
key: 0,
|
|
1573
1561
|
ref_key: "iframeRef",
|
|
1574
1562
|
ref: m,
|
|
@@ -1578,22 +1566,18 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1578
1566
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1579
1567
|
style: n({ height: `${h.value}px` }),
|
|
1580
1568
|
onLoad: b
|
|
1581
|
-
}, null, 44,
|
|
1569
|
+
}, null, 44, Vi)) : (t(), S("div", Hi, [C(y(pt), {
|
|
1582
1570
|
size: 24,
|
|
1583
1571
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1584
|
-
}), s.value ? (t(), S("span",
|
|
1572
|
+
}), s.value ? (t(), S("span", Ui, D(y(a).html.preview), 1)) : (t(), S("span", Wi, D(y(a).html.empty), 1))]))]));
|
|
1585
1573
|
}
|
|
1586
|
-
}),
|
|
1587
|
-
key: 0,
|
|
1588
|
-
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)]",
|
|
1589
|
-
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1590
|
-
}, ji = ["href"], Mi = ["src", "alt"], Ni = ["src", "alt"], Pi = {
|
|
1574
|
+
}), Ki = ["data-drop-enabled"], qi = ["href"], Ji = ["src", "alt"], Yi = ["src", "alt"], Xi = {
|
|
1591
1575
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1592
1576
|
style: { opacity: "0.7" }
|
|
1593
|
-
},
|
|
1577
|
+
}, Zi = ["href"], Qi = ["src", "alt"], $i = ["src", "alt"], ea = {
|
|
1594
1578
|
key: 4,
|
|
1595
|
-
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)]"
|
|
1596
|
-
},
|
|
1579
|
+
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)]"
|
|
1580
|
+
}, ta = ["aria-label"], na = { key: 1 }, ra = /* @__PURE__ */ F({
|
|
1597
1581
|
__name: "ImageBlock",
|
|
1598
1582
|
props: {
|
|
1599
1583
|
block: {},
|
|
@@ -1601,68 +1585,46 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1601
1585
|
},
|
|
1602
1586
|
emits: ["update"],
|
|
1603
1587
|
setup(e, { emit: r }) {
|
|
1604
|
-
let i = e, a = r, { t: o } =
|
|
1605
|
-
|
|
1606
|
-
let
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
}
|
|
1612
|
-
let
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
accept: ["images"],
|
|
1619
|
-
files: e
|
|
1620
|
-
});
|
|
1621
|
-
if (!d.alive) return;
|
|
1622
|
-
if (t) {
|
|
1623
|
-
let e = { src: t.url };
|
|
1624
|
-
t.alt && (e.alt = t.alt), a("update", e);
|
|
1625
|
-
}
|
|
1626
|
-
} finally {
|
|
1627
|
-
d.alive && (h.value = !1);
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
let { isOver: b } = rt({
|
|
1632
|
-
target: m,
|
|
1633
|
-
enabled: g,
|
|
1634
|
-
onFiles: v
|
|
1635
|
-
}), T = N(() => ({ textAlign: i.block.align })), E = N(() => {
|
|
1636
|
-
let e = i.block.border, t = ["left", "right"].map((t) => Ee(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1588
|
+
let i = e, a = r, { t: o } = On(), { syntax: s } = Wn(), c = N(() => Ce(i.block.src, s));
|
|
1589
|
+
function l(e) {
|
|
1590
|
+
let t = {
|
|
1591
|
+
src: e.url,
|
|
1592
|
+
...vt(ht(e.width, e.height))
|
|
1593
|
+
};
|
|
1594
|
+
e.alt && (t.alt = e.alt), a("update", t);
|
|
1595
|
+
}
|
|
1596
|
+
let u = _(), { canBrowse: d, dropEnabled: f, isUploading: p, showOverlay: m, openMediaBrowser: h } = gt({
|
|
1597
|
+
target: u,
|
|
1598
|
+
blocked: c,
|
|
1599
|
+
apply: l
|
|
1600
|
+
}), g = N(() => ({ textAlign: i.block.align })), v = N(() => {
|
|
1601
|
+
let e = i.block.border, t = ["left", "right"].map((t) => we(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1637
1602
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1638
|
-
}),
|
|
1603
|
+
}), b = N(() => {
|
|
1639
1604
|
let e = i.block.align;
|
|
1640
1605
|
return {
|
|
1641
1606
|
maxWidth: "100%",
|
|
1642
|
-
width: i.block.width === "full" ?
|
|
1607
|
+
width: i.block.width === "full" ? v.value : `${i.block.width}px`,
|
|
1643
1608
|
height: i.block.height ? `${i.block.height}px` : void 0,
|
|
1644
|
-
borderRadius:
|
|
1645
|
-
...
|
|
1609
|
+
borderRadius: et(i.block.borderRadius) ?? void 0,
|
|
1610
|
+
...Xr(i.block.border),
|
|
1646
1611
|
display: "block",
|
|
1647
1612
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1648
1613
|
marginRight: e === "center" ? "auto" : void 0
|
|
1649
1614
|
};
|
|
1650
|
-
}),
|
|
1615
|
+
}), T = lt(() => c.value ? void 0 : i.block.src), E = lt(() => c.value ? i.block.placeholderUrl : void 0);
|
|
1651
1616
|
return (r, i) => (t(), S("div", {
|
|
1652
1617
|
ref_key: "dropZoneRef",
|
|
1653
|
-
ref:
|
|
1618
|
+
ref: u,
|
|
1654
1619
|
"data-testid": "image-drop-zone",
|
|
1655
|
-
"data-drop-enabled":
|
|
1620
|
+
"data-drop-enabled": y(f),
|
|
1656
1621
|
class: "tpl:relative tpl:w-full",
|
|
1657
|
-
style: n(
|
|
1658
|
-
}, [
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
"
|
|
1662
|
-
}
|
|
1663
|
-
size: 20,
|
|
1664
|
-
"stroke-width": 1.5
|
|
1665
|
-
}), 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", {
|
|
1622
|
+
style: n(g.value)
|
|
1623
|
+
}, [y(m) ? (t(), A(bt, {
|
|
1624
|
+
key: 0,
|
|
1625
|
+
uploading: y(p),
|
|
1626
|
+
size: "canvas"
|
|
1627
|
+
}, null, 8, ["uploading"])) : P("", !0), e.block.src && c.value && e.block.placeholderUrl ? (t(), S(M, { key: 1 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1666
1628
|
key: 0,
|
|
1667
1629
|
href: e.block.linkUrl,
|
|
1668
1630
|
target: "_blank",
|
|
@@ -1671,25 +1633,25 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1671
1633
|
}, [x("img", {
|
|
1672
1634
|
class: "tpl:border-0",
|
|
1673
1635
|
loading: "lazy",
|
|
1674
|
-
src: y(
|
|
1636
|
+
src: y(E),
|
|
1675
1637
|
alt: e.block.alt || y(o).image.altTextPlaceholder,
|
|
1676
|
-
style: n(
|
|
1677
|
-
}, null, 12,
|
|
1638
|
+
style: n(b.value)
|
|
1639
|
+
}, null, 12, Ji)], 8, qi)) : (t(), S("img", {
|
|
1678
1640
|
key: 1,
|
|
1679
1641
|
class: "tpl:border-0",
|
|
1680
|
-
src: y(
|
|
1642
|
+
src: y(E),
|
|
1681
1643
|
alt: e.block.alt,
|
|
1682
|
-
style: n(
|
|
1683
|
-
}, null, 12,
|
|
1644
|
+
style: n(b.value)
|
|
1645
|
+
}, null, 12, Yi))], 64)) : e.block.src && c.value ? (t(), S("div", {
|
|
1684
1646
|
key: 2,
|
|
1685
|
-
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)]",
|
|
1686
|
-
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" },
|
|
1687
|
-
}, [C(y(
|
|
1647
|
+
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)]",
|
|
1648
|
+
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, b.value])
|
|
1649
|
+
}, [C(y(wt), {
|
|
1688
1650
|
size: 32,
|
|
1689
1651
|
"stroke-width": 1.5,
|
|
1690
1652
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1691
1653
|
style: { opacity: "0.5" }
|
|
1692
|
-
}), x("span",
|
|
1654
|
+
}), x("span", Xi, [C(ei, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (t(), S(M, { key: 3 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1693
1655
|
key: 0,
|
|
1694
1656
|
href: e.block.linkUrl,
|
|
1695
1657
|
target: "_blank",
|
|
@@ -1698,68 +1660,68 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1698
1660
|
}, [x("img", {
|
|
1699
1661
|
class: "tpl:border-0",
|
|
1700
1662
|
loading: "lazy",
|
|
1701
|
-
src: y(
|
|
1663
|
+
src: y(T),
|
|
1702
1664
|
alt: e.block.alt || y(o).image.altTextPlaceholder,
|
|
1703
|
-
style: n(
|
|
1704
|
-
}, null, 12,
|
|
1665
|
+
style: n(b.value)
|
|
1666
|
+
}, null, 12, Qi)], 8, Zi)) : (t(), S("img", {
|
|
1705
1667
|
key: 1,
|
|
1706
1668
|
class: "tpl:border-0",
|
|
1707
|
-
src: y(
|
|
1669
|
+
src: y(T),
|
|
1708
1670
|
alt: e.block.alt,
|
|
1709
|
-
style: n(
|
|
1710
|
-
}, null, 12,
|
|
1671
|
+
style: n(b.value)
|
|
1672
|
+
}, null, 12, $i))], 64)) : (t(), S("div", ea, [y(d) ? (t(), S("button", {
|
|
1711
1673
|
key: 0,
|
|
1712
1674
|
"aria-label": y(o).image.browseMedia,
|
|
1713
1675
|
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)]",
|
|
1714
|
-
onClick: I(
|
|
1715
|
-
}, [C(y(
|
|
1676
|
+
onClick: i[2] ||= I((...e) => y(h) && y(h)(...e), ["stop"])
|
|
1677
|
+
}, [C(y(wt), {
|
|
1716
1678
|
size: 14,
|
|
1717
1679
|
"stroke-width": 1.5
|
|
1718
|
-
}), w(" " + D(y(o).image.browseMedia), 1)], 8,
|
|
1680
|
+
}), w(" " + D(y(o).image.browseMedia), 1)], 8, ta)) : (t(), S("span", na, D(y(o).image.clickToAdd), 1))]))], 12, Ki));
|
|
1719
1681
|
}
|
|
1720
|
-
}),
|
|
1682
|
+
}), ia = { class: "tpl:w-full" }, aa = ["href"], oa = {
|
|
1721
1683
|
key: 1,
|
|
1722
1684
|
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)]"
|
|
1723
|
-
},
|
|
1685
|
+
}, sa = /* @__PURE__ */ F({
|
|
1724
1686
|
__name: "MenuBlock",
|
|
1725
1687
|
props: {
|
|
1726
1688
|
block: {},
|
|
1727
1689
|
viewport: {}
|
|
1728
1690
|
},
|
|
1729
1691
|
setup(e) {
|
|
1730
|
-
let r = e, { t: i } =
|
|
1692
|
+
let r = e, { t: i } = On(), a = Nt(Cn, "MenuBlock"), o = N(() => ({
|
|
1731
1693
|
display: "flex",
|
|
1732
1694
|
flexWrap: "wrap",
|
|
1733
1695
|
gap: `0 ${r.block.spacing}px`,
|
|
1734
1696
|
justifyContent: r.block.textAlign === "left" ? "flex-start" : r.block.textAlign === "right" ? "flex-end" : "center",
|
|
1735
1697
|
fontSize: `${r.block.fontSize}px`,
|
|
1736
|
-
fontFamily: r.block.fontFamily
|
|
1698
|
+
fontFamily: r.block.fontFamily ? a.resolveFontFamily(r.block.fontFamily) : "inherit",
|
|
1737
1699
|
alignItems: "center"
|
|
1738
|
-
})),
|
|
1739
|
-
function
|
|
1700
|
+
})), s = N(() => r.block.items.length > 0);
|
|
1701
|
+
function c(e) {
|
|
1740
1702
|
return e || r.block.linkColor || r.block.color;
|
|
1741
1703
|
}
|
|
1742
|
-
return (r,
|
|
1704
|
+
return (r, a) => (t(), S("div", ia, [s.value ? (t(), S("div", {
|
|
1743
1705
|
key: 0,
|
|
1744
|
-
style: n(
|
|
1706
|
+
style: n(o.value)
|
|
1745
1707
|
}, [(t(!0), S(M, null, l(e.block.items, (r, i) => (t(), S(M, { key: r.id }, [x("a", {
|
|
1746
1708
|
href: r.url || "#",
|
|
1747
1709
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1748
1710
|
style: n({
|
|
1749
|
-
color:
|
|
1711
|
+
color: c(r.color),
|
|
1750
1712
|
fontWeight: r.bold ? "bold" : "normal",
|
|
1751
1713
|
textDecoration: r.underline ? "underline" : "none"
|
|
1752
1714
|
}),
|
|
1753
|
-
onClick:
|
|
1754
|
-
}, [C(
|
|
1715
|
+
onClick: a[0] ||= I(() => {}, ["prevent"])
|
|
1716
|
+
}, [C(ei, { text: r.text || "..." }, null, 8, ["text"])], 12, aa), i < e.block.items.length - 1 ? (t(), S("span", {
|
|
1755
1717
|
key: 0,
|
|
1756
1718
|
style: n({
|
|
1757
1719
|
color: e.block.separatorColor,
|
|
1758
1720
|
padding: `0 ${e.block.spacing}px`
|
|
1759
1721
|
})
|
|
1760
|
-
}, D(e.block.separator), 5)) : P("", !0)], 64))), 128))], 4)) : (t(), S("div",
|
|
1722
|
+
}, D(e.block.separator), 5)) : P("", !0)], 64))), 128))], 4)) : (t(), S("div", oa, [C(y(xt), { size: 16 }), x("span", null, D(y(i).menu.addLinks), 1)]))]));
|
|
1761
1723
|
}
|
|
1762
|
-
}),
|
|
1724
|
+
}), ca = /* @__PURE__ */ new Set([
|
|
1763
1725
|
"http",
|
|
1764
1726
|
"https",
|
|
1765
1727
|
"mailto",
|
|
@@ -1769,7 +1731,7 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1769
1731
|
"sms",
|
|
1770
1732
|
"xmpp",
|
|
1771
1733
|
"cid"
|
|
1772
|
-
]),
|
|
1734
|
+
]), la = /* @__PURE__ */ new Set([
|
|
1773
1735
|
"SCRIPT",
|
|
1774
1736
|
"STYLE",
|
|
1775
1737
|
"IFRAME",
|
|
@@ -1779,7 +1741,7 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1779
1741
|
"META",
|
|
1780
1742
|
"BASE",
|
|
1781
1743
|
"FORM"
|
|
1782
|
-
]),
|
|
1744
|
+
]), ua = /* @__PURE__ */ new Set([
|
|
1783
1745
|
"href",
|
|
1784
1746
|
"xlink:href",
|
|
1785
1747
|
"formaction",
|
|
@@ -1788,16 +1750,16 @@ var fi = { class: "tpl:w-full" }, pi = {
|
|
|
1788
1750
|
"background",
|
|
1789
1751
|
"poster"
|
|
1790
1752
|
]);
|
|
1791
|
-
function
|
|
1753
|
+
function da(e, t) {
|
|
1792
1754
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1793
1755
|
if (!n || n.startsWith("#")) return !0;
|
|
1794
1756
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1795
1757
|
if (!r) return !0;
|
|
1796
1758
|
let i = r[1].toLowerCase();
|
|
1797
|
-
return
|
|
1759
|
+
return ca.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1798
1760
|
}
|
|
1799
|
-
function
|
|
1800
|
-
if (
|
|
1761
|
+
function fa(e) {
|
|
1762
|
+
if (la.has(e.tagName)) {
|
|
1801
1763
|
e.remove();
|
|
1802
1764
|
return;
|
|
1803
1765
|
}
|
|
@@ -1805,21 +1767,21 @@ function Xi(e) {
|
|
|
1805
1767
|
for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
|
|
1806
1768
|
for (let n of t) {
|
|
1807
1769
|
let t = n.toLowerCase();
|
|
1808
|
-
t.startsWith("on") ? e.removeAttribute(n) :
|
|
1770
|
+
t.startsWith("on") ? e.removeAttribute(n) : ua.has(t) ? da(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n) : t === "src" ? da(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n) : t === "srcdoc" && e.removeAttribute(n);
|
|
1809
1771
|
}
|
|
1810
1772
|
let n = Array.from(e.children);
|
|
1811
|
-
for (let e of n)
|
|
1773
|
+
for (let e of n) fa(e);
|
|
1812
1774
|
}
|
|
1813
|
-
function
|
|
1775
|
+
function pa(e) {
|
|
1814
1776
|
if (typeof DOMParser > "u") return e;
|
|
1815
1777
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1816
|
-
for (let e of n)
|
|
1778
|
+
for (let e of n) fa(e);
|
|
1817
1779
|
return t.innerHTML;
|
|
1818
1780
|
}
|
|
1819
1781
|
//#endregion
|
|
1820
1782
|
//#region src/composables/useEditableTextBlock.ts
|
|
1821
|
-
function
|
|
1822
|
-
let t = p(
|
|
1783
|
+
function ma(e) {
|
|
1784
|
+
let t = p(Jt, zt), n = p(Xt, null), { syntax: r } = Wn(), i = N(() => n?.value ? Pe(e(), t.value) : Re(e(), t.value)), a = N(() => tt(pa(ke(i.value, r)))), o = _(!1), s = _(null), { top: c, left: l } = Mt(s), { toLocal: u } = Nn(), d = N(() => u({
|
|
1823
1785
|
top: c.value - 8,
|
|
1824
1786
|
left: l.value
|
|
1825
1787
|
}));
|
|
@@ -1840,14 +1802,14 @@ function Qi(e) {
|
|
|
1840
1802
|
}
|
|
1841
1803
|
//#endregion
|
|
1842
1804
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1843
|
-
var
|
|
1805
|
+
var ha = ["innerHTML"], ga = /* @__PURE__ */ F({
|
|
1844
1806
|
__name: "ParagraphBlock",
|
|
1845
1807
|
props: {
|
|
1846
1808
|
block: {},
|
|
1847
1809
|
viewport: {}
|
|
1848
1810
|
},
|
|
1849
1811
|
setup(e) {
|
|
1850
|
-
let n = e, r = v(() => import("./ParagraphEditor-
|
|
1812
|
+
let n = e, r = v(() => import("./ParagraphEditor-BVjOwwHx.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = ma(() => n.block.content);
|
|
1851
1813
|
return (n, u) => (t(), S("div", {
|
|
1852
1814
|
ref_key: "blockRef",
|
|
1853
1815
|
ref: a,
|
|
@@ -1866,26 +1828,26 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1866
1828
|
key: 1,
|
|
1867
1829
|
class: "tpl-text-content tpl:outline-none",
|
|
1868
1830
|
innerHTML: y(s)
|
|
1869
|
-
}, null, 8,
|
|
1831
|
+
}, null, 8, ha))], 544));
|
|
1870
1832
|
}
|
|
1871
|
-
}),
|
|
1833
|
+
}), _a = [
|
|
1872
1834
|
"data-block-id",
|
|
1873
1835
|
"data-block-type",
|
|
1874
1836
|
"data-tpl-picked"
|
|
1875
|
-
],
|
|
1837
|
+
], va = ["aria-label"], ya = [
|
|
1876
1838
|
"aria-label",
|
|
1877
1839
|
"aria-pressed",
|
|
1878
1840
|
"title"
|
|
1879
|
-
],
|
|
1841
|
+
], ba = ["aria-label", "title"], xa = ["aria-label", "title"], Sa = ["aria-label", "title"], Ca = {
|
|
1880
1842
|
key: 1,
|
|
1881
1843
|
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"
|
|
1882
|
-
},
|
|
1844
|
+
}, wa = { 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)]" }, Ta = {
|
|
1883
1845
|
key: 2,
|
|
1884
1846
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1885
|
-
},
|
|
1847
|
+
}, Ea = ["aria-label", "title"], Da = {
|
|
1886
1848
|
key: 3,
|
|
1887
1849
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1888
|
-
},
|
|
1850
|
+
}, Oa = ["aria-label"], ka = /*#__PURE__*/ Hn(/* @__PURE__ */ F({
|
|
1889
1851
|
__name: "BlockWrapper",
|
|
1890
1852
|
props: {
|
|
1891
1853
|
block: {},
|
|
@@ -1897,7 +1859,7 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1897
1859
|
},
|
|
1898
1860
|
emits: ["select"],
|
|
1899
1861
|
setup(e, { emit: r }) {
|
|
1900
|
-
let i = v(() => import("./BlockIssueBadge-
|
|
1862
|
+
let i = v(() => import("./BlockIssueBadge-BShkuJis.js")), o = e, s = r, { t: c, format: l } = On(), d = p(Qt, 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);
|
|
1901
1863
|
async function g() {
|
|
1902
1864
|
await a(), f.value?.focus();
|
|
1903
1865
|
}
|
|
@@ -1907,20 +1869,23 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1907
1869
|
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 ? {
|
|
1908
1870
|
desktop: c.viewport.desktop,
|
|
1909
1871
|
mobile: c.viewport.mobile
|
|
1910
|
-
}[o.viewport] ?? o.viewport : ""), A = N(() => !!o.block.displayCondition), j = p(
|
|
1911
|
-
|
|
1872
|
+
}[o.viewport] ?? o.viewport : ""), A = N(() => !!o.block.displayCondition), j = p(on, null), M = p(un, null), ee = p(hn, {}), 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 = rt(() => o.block.type === "section" ? o.block.backgroundImage : void 0), ae = rt(() => o.block.type === "section" ? o.block.wrapper?.backgroundImage : void 0), oe = p(dn, null), se = p(It, void 0), ce = N(() => Jr(o.block, {
|
|
1873
|
+
backgroundImageUrl: ie.value,
|
|
1874
|
+
heroBoxWidth: ft(o.block, oe?.content.value, se)
|
|
1875
|
+
})), le = N(() => Zr(o.block, { backgroundImageUrl: ae.value }));
|
|
1876
|
+
function ue(e) {
|
|
1912
1877
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
1913
1878
|
}
|
|
1914
|
-
function
|
|
1879
|
+
function de() {
|
|
1915
1880
|
j?.deleteBlock(o.block.id);
|
|
1916
1881
|
}
|
|
1917
|
-
function
|
|
1882
|
+
function fe() {
|
|
1918
1883
|
j?.duplicateBlock(o.block);
|
|
1919
1884
|
}
|
|
1920
|
-
function
|
|
1885
|
+
function pe() {
|
|
1921
1886
|
ee.savedBlocks?.startPicking(o.block.id);
|
|
1922
1887
|
}
|
|
1923
|
-
function
|
|
1888
|
+
function me() {
|
|
1924
1889
|
M?.toggleBlock(o.block.id);
|
|
1925
1890
|
}
|
|
1926
1891
|
return (r, a) => E.value ? P("", !0) : (t(), S("div", {
|
|
@@ -1934,7 +1899,7 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1934
1899
|
"data-block-id": e.block.id,
|
|
1935
1900
|
"data-block-type": e.block.type,
|
|
1936
1901
|
"data-tpl-picked": e.picked || void 0,
|
|
1937
|
-
onClick:
|
|
1902
|
+
onClick: ue
|
|
1938
1903
|
}, [
|
|
1939
1904
|
C(y(i), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1940
1905
|
ne.value ? (t(), S("div", {
|
|
@@ -1952,205 +1917,242 @@ var $i = ["innerHTML"], ea = /* @__PURE__ */ F({
|
|
|
1952
1917
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1953
1918
|
title: y(c).blockActions.drag,
|
|
1954
1919
|
onKeydown: b
|
|
1955
|
-
}, [C(y(
|
|
1920
|
+
}, [C(y(si), {
|
|
1956
1921
|
size: 14,
|
|
1957
1922
|
"stroke-width": 1.5
|
|
1958
|
-
})], 40,
|
|
1923
|
+
})], 40, ya),
|
|
1959
1924
|
x("button", {
|
|
1960
1925
|
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",
|
|
1961
1926
|
"aria-label": y(c).blockActions.duplicate,
|
|
1962
1927
|
title: y(c).blockActions.duplicate,
|
|
1963
|
-
onClick: I(
|
|
1964
|
-
}, [C(y(
|
|
1928
|
+
onClick: I(fe, ["stop"])
|
|
1929
|
+
}, [C(y(Ln), {
|
|
1965
1930
|
size: 14,
|
|
1966
1931
|
"stroke-width": 1.5
|
|
1967
|
-
})], 8,
|
|
1932
|
+
})], 8, ba),
|
|
1968
1933
|
te.value ? (t(), S("button", {
|
|
1969
1934
|
key: 0,
|
|
1970
1935
|
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",
|
|
1971
1936
|
"aria-label": y(c).blockActions.saveAsBlock,
|
|
1972
1937
|
title: y(c).blockActions.saveAsBlock,
|
|
1973
|
-
onClick: I(
|
|
1974
|
-
}, [C(y(
|
|
1938
|
+
onClick: I(pe, ["stop"])
|
|
1939
|
+
}, [C(y(ri), {
|
|
1975
1940
|
size: 14,
|
|
1976
1941
|
"stroke-width": 1.5
|
|
1977
|
-
})], 8,
|
|
1942
|
+
})], 8, xa)) : P("", !0),
|
|
1978
1943
|
x("button", {
|
|
1979
1944
|
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",
|
|
1980
1945
|
"aria-label": y(c).blockActions.delete,
|
|
1981
1946
|
title: y(c).blockActions.delete,
|
|
1982
|
-
onClick: I(
|
|
1983
|
-
}, [C(y(
|
|
1947
|
+
onClick: I(de, ["stop"])
|
|
1948
|
+
}, [C(y(zn), {
|
|
1984
1949
|
size: 14,
|
|
1985
1950
|
"stroke-width": 1.5
|
|
1986
|
-
})], 8,
|
|
1987
|
-
], 8,
|
|
1988
|
-
T.value ? (t(), S("div",
|
|
1951
|
+
})], 8, Sa)
|
|
1952
|
+
], 8, va)) : P("", !0),
|
|
1953
|
+
T.value ? (t(), S("div", Ca, [x("span", wa, [C(y(ai), {
|
|
1989
1954
|
size: 12,
|
|
1990
1955
|
"stroke-width": 1.5
|
|
1991
1956
|
}), w(" " + D(y(l)(y(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : P("", !0),
|
|
1992
|
-
A.value && !T.value ? (t(), S("div",
|
|
1957
|
+
A.value && !T.value ? (t(), S("div", Ta, [x("button", {
|
|
1993
1958
|
"data-testid": "condition-toggle",
|
|
1994
1959
|
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)]",
|
|
1995
1960
|
"aria-label": y(c).blockActions.conditionToggle,
|
|
1996
1961
|
title: e.block.displayCondition?.label,
|
|
1997
|
-
onClick: I(
|
|
1998
|
-
}, [C(y(
|
|
1962
|
+
onClick: I(me, ["stop"])
|
|
1963
|
+
}, [C(y(oi), {
|
|
1999
1964
|
size: 12,
|
|
2000
1965
|
"stroke-width": 2
|
|
2001
|
-
})], 8,
|
|
2002
|
-
re.value > 0 && !T.value ? (t(), S("div",
|
|
1966
|
+
})], 8, Ea)])) : P("", !0),
|
|
1967
|
+
re.value > 0 && !T.value ? (t(), S("div", Da, [x("button", {
|
|
2003
1968
|
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)]",
|
|
2004
1969
|
"aria-label": y(l)(y(c).blockActions.comments, { count: String(re.value) }),
|
|
2005
1970
|
onClick: a[0] ||= I((t) => y(ee).comments?.openForBlock(e.block.id), ["stop"])
|
|
2006
|
-
}, [C(y(
|
|
1971
|
+
}, [C(y(Rn), {
|
|
2007
1972
|
size: 12,
|
|
2008
1973
|
"stroke-width": 2.5
|
|
2009
|
-
}), w(" " + D(re.value), 1)], 8,
|
|
2010
|
-
|
|
1974
|
+
}), w(" " + D(re.value), 1)], 8, Oa)])) : P("", !0),
|
|
1975
|
+
le.value ? (t(), S("div", {
|
|
2011
1976
|
key: 4,
|
|
2012
|
-
class: "tpl-section-wrapper",
|
|
2013
|
-
style: n(
|
|
1977
|
+
class: k(["tpl-section-wrapper tpl-email-surface", y(Wr)(le.value)]),
|
|
1978
|
+
style: n(le.value)
|
|
2014
1979
|
}, [x("div", {
|
|
2015
|
-
class: "tpl-block-content",
|
|
2016
|
-
style: n(
|
|
2017
|
-
}, [u(r.$slots, "default", {}, void 0, !0)],
|
|
1980
|
+
class: k(["tpl-block-content tpl-email-surface", y(Wr)(ce.value)]),
|
|
1981
|
+
style: n(ce.value)
|
|
1982
|
+
}, [u(r.$slots, "default", {}, void 0, !0)], 6)], 6)) : (t(), S("div", {
|
|
2018
1983
|
key: 5,
|
|
2019
|
-
class: "tpl-block-content",
|
|
2020
|
-
style: n(
|
|
2021
|
-
}, [u(r.$slots, "default", {}, void 0, !0)],
|
|
2022
|
-
], 10,
|
|
1984
|
+
class: k(["tpl-block-content tpl-email-surface", y(Wr)(ce.value)]),
|
|
1985
|
+
style: n(ce.value)
|
|
1986
|
+
}, [u(r.$slots, "default", {}, void 0, !0)], 6))
|
|
1987
|
+
], 10, _a));
|
|
2023
1988
|
}
|
|
2024
|
-
}), [["__scopeId", "data-v-
|
|
1989
|
+
}), [["__scopeId", "data-v-254ef206"]]);
|
|
2025
1990
|
//#endregion
|
|
2026
1991
|
//#region src/utils/unwrapParagraph.ts
|
|
2027
|
-
function
|
|
1992
|
+
function Aa(e) {
|
|
2028
1993
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2029
1994
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2030
1995
|
}
|
|
2031
1996
|
//#endregion
|
|
2032
1997
|
//#region src/components/blocks/TitleBlock.vue
|
|
2033
|
-
var
|
|
1998
|
+
var ja = /* @__PURE__ */ F({
|
|
2034
1999
|
__name: "TitleBlock",
|
|
2035
2000
|
props: {
|
|
2036
2001
|
block: {},
|
|
2037
2002
|
viewport: {}
|
|
2038
2003
|
},
|
|
2039
2004
|
setup(e) {
|
|
2040
|
-
let r = e, i = v(() => import("./TitleEditor-
|
|
2005
|
+
let r = e, i = v(() => import("./TitleEditor-Cc3DHbuN.js")), a = Nt(Cn, "TitleBlock"), { isEditing: s, blockRef: c, toolbarPosition: l, resolvedContent: u, handleDoubleClick: d, handleEditorDone: f } = ma(() => r.block.content), p = N(() => {
|
|
2041
2006
|
let e = {
|
|
2042
|
-
fontSize: `${
|
|
2007
|
+
fontSize: `${Ge[r.block.level]}px`,
|
|
2008
|
+
lineHeight: String(je),
|
|
2009
|
+
fontWeight: "700",
|
|
2043
2010
|
textAlign: r.block.textAlign
|
|
2044
2011
|
};
|
|
2045
|
-
return r.block.color && (e.color = r.block.color), r.block.fontFamily && (e.fontFamily = r.block.fontFamily), e;
|
|
2046
|
-
}),
|
|
2047
|
-
return (r,
|
|
2012
|
+
return r.block.color && (e.color = r.block.color), r.block.fontFamily && (e.fontFamily = a.resolveFontFamily(r.block.fontFamily)), e;
|
|
2013
|
+
}), m = N(() => `h${r.block.level}`), h = N(() => Aa(u.value));
|
|
2014
|
+
return (r, a) => (t(), S("div", {
|
|
2048
2015
|
ref_key: "blockRef",
|
|
2049
|
-
ref:
|
|
2016
|
+
ref: c,
|
|
2050
2017
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2051
|
-
style: n(
|
|
2052
|
-
onDblclick:
|
|
2053
|
-
}, [y(
|
|
2018
|
+
style: n(p.value),
|
|
2019
|
+
onDblclick: a[0] ||= (...e) => y(d) && y(d)(...e)
|
|
2020
|
+
}, [y(s) ? (t(), A(y(i), {
|
|
2054
2021
|
key: 0,
|
|
2055
2022
|
block: e.block,
|
|
2056
|
-
"toolbar-position": y(
|
|
2057
|
-
onDone: y(
|
|
2023
|
+
"toolbar-position": y(l),
|
|
2024
|
+
onDone: y(f)
|
|
2058
2025
|
}, null, 8, [
|
|
2059
2026
|
"block",
|
|
2060
2027
|
"toolbar-position",
|
|
2061
2028
|
"onDone"
|
|
2062
|
-
])) : (t(), A(o(
|
|
2029
|
+
])) : (t(), A(o(m.value), {
|
|
2063
2030
|
key: 1,
|
|
2064
|
-
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-
|
|
2065
|
-
style: {
|
|
2066
|
-
|
|
2031
|
+
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
2032
|
+
style: {
|
|
2033
|
+
color: "inherit",
|
|
2034
|
+
fontWeight: "inherit"
|
|
2035
|
+
},
|
|
2036
|
+
innerHTML: h.value
|
|
2067
2037
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2068
2038
|
}
|
|
2069
|
-
});
|
|
2039
|
+
}), Ma = "hero", Na = "#1f2937", Pa = "#ffffff";
|
|
2040
|
+
function Fa(e, t) {
|
|
2041
|
+
let n = $e("title", e);
|
|
2042
|
+
n.color = Pa, n.textAlign = "center";
|
|
2043
|
+
let r = $e("paragraph", e);
|
|
2044
|
+
r.content = `<p style="text-align: center"><span style="color: ${Pa}">${Ia(t)}</span></p>`;
|
|
2045
|
+
let i = $e("button", e);
|
|
2046
|
+
return i.align = "center", Le({
|
|
2047
|
+
columns: "1",
|
|
2048
|
+
children: [[
|
|
2049
|
+
n,
|
|
2050
|
+
r,
|
|
2051
|
+
i
|
|
2052
|
+
]],
|
|
2053
|
+
hero: {
|
|
2054
|
+
height: "image",
|
|
2055
|
+
verticalAlign: "middle"
|
|
2056
|
+
},
|
|
2057
|
+
styles: {
|
|
2058
|
+
padding: {
|
|
2059
|
+
top: 48,
|
|
2060
|
+
right: 24,
|
|
2061
|
+
bottom: 48,
|
|
2062
|
+
left: 24
|
|
2063
|
+
},
|
|
2064
|
+
backgroundColor: Na
|
|
2065
|
+
}
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2068
|
+
function Ia(e) {
|
|
2069
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2070
|
+
}
|
|
2070
2071
|
//#endregion
|
|
2071
2072
|
//#region src/utils/sectionColumnDrop.ts
|
|
2072
|
-
|
|
2073
|
-
|
|
2073
|
+
var La = /* @__PURE__ */ new Set(["section", Ma]);
|
|
2074
|
+
function Ra(e) {
|
|
2075
|
+
return e.dataset.blockType !== "section" && !La.has(e.dataset.paletteType ?? "");
|
|
2074
2076
|
}
|
|
2075
2077
|
//#endregion
|
|
2076
2078
|
//#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
|
|
2077
|
-
var
|
|
2079
|
+
var za = Object.defineProperty, Ba = Object.getOwnPropertySymbols, Va = Object.prototype.hasOwnProperty, Ha = Object.prototype.propertyIsEnumerable, Ua = (e, t, n) => t in e ? za(e, t, {
|
|
2078
2080
|
enumerable: !0,
|
|
2079
2081
|
configurable: !0,
|
|
2080
2082
|
writable: !0,
|
|
2081
2083
|
value: n
|
|
2082
|
-
}) : e[t] = n,
|
|
2083
|
-
for (var n in t ||= {})
|
|
2084
|
-
if (
|
|
2084
|
+
}) : e[t] = n, Wa = (e, t) => {
|
|
2085
|
+
for (var n in t ||= {}) Va.call(t, n) && Ua(e, n, t[n]);
|
|
2086
|
+
if (Ba) for (var n of Ba(t)) Ha.call(t, n) && Ua(e, n, t[n]);
|
|
2085
2087
|
return e;
|
|
2086
|
-
},
|
|
2088
|
+
}, Ga = (e, t) => {
|
|
2087
2089
|
var n = {};
|
|
2088
|
-
for (var r in e)
|
|
2089
|
-
if (e != null &&
|
|
2090
|
+
for (var r in e) Va.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2091
|
+
if (e != null && Ba) for (var r of Ba(e)) t.indexOf(r) < 0 && Ha.call(e, r) && (n[r] = e[r]);
|
|
2090
2092
|
return n;
|
|
2091
|
-
},
|
|
2092
|
-
function
|
|
2093
|
-
console.warn(
|
|
2093
|
+
}, Ka = "[vue-draggable-plus]: ";
|
|
2094
|
+
function qa(e) {
|
|
2095
|
+
console.warn(Ka + e);
|
|
2094
2096
|
}
|
|
2095
|
-
function
|
|
2096
|
-
console.error(
|
|
2097
|
+
function Ja(e) {
|
|
2098
|
+
console.error(Ka + e);
|
|
2097
2099
|
}
|
|
2098
|
-
function
|
|
2100
|
+
function Ya(e, t, n) {
|
|
2099
2101
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2100
2102
|
}
|
|
2101
|
-
function
|
|
2103
|
+
function Xa(e) {
|
|
2102
2104
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2103
2105
|
}
|
|
2104
|
-
function
|
|
2105
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2106
|
+
function Za(e) {
|
|
2107
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Xa(n)] = e[n]), t), {});
|
|
2106
2108
|
}
|
|
2107
|
-
function
|
|
2109
|
+
function Qa(e, t) {
|
|
2108
2110
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2109
2111
|
}
|
|
2110
|
-
function
|
|
2112
|
+
function $a(e, t, n) {
|
|
2111
2113
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2112
2114
|
}
|
|
2113
|
-
function
|
|
2115
|
+
function eo(e) {
|
|
2114
2116
|
return e === void 0;
|
|
2115
2117
|
}
|
|
2116
|
-
function
|
|
2118
|
+
function to(e) {
|
|
2117
2119
|
return typeof e == "string";
|
|
2118
2120
|
}
|
|
2119
|
-
function
|
|
2121
|
+
function no(e, t, n) {
|
|
2120
2122
|
let r = e.children[n];
|
|
2121
2123
|
e.insertBefore(t, r);
|
|
2122
2124
|
}
|
|
2123
|
-
function
|
|
2125
|
+
function ro(e) {
|
|
2124
2126
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2125
2127
|
}
|
|
2126
|
-
function
|
|
2128
|
+
function io(e, t = document) {
|
|
2127
2129
|
let n = null;
|
|
2128
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2130
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || qa(`Element not found: ${e}`), n;
|
|
2129
2131
|
}
|
|
2130
|
-
function
|
|
2132
|
+
function ao(e, t, n = null) {
|
|
2131
2133
|
return function(...r) {
|
|
2132
2134
|
return e.apply(n, r), t.apply(n, r);
|
|
2133
2135
|
};
|
|
2134
2136
|
}
|
|
2135
|
-
function
|
|
2136
|
-
let n =
|
|
2137
|
+
function oo(e, t) {
|
|
2138
|
+
let n = Wa({}, e);
|
|
2137
2139
|
return Object.keys(t).forEach((r) => {
|
|
2138
|
-
n[r] ? n[r] =
|
|
2140
|
+
n[r] ? n[r] = ao(e[r], t[r]) : n[r] = t[r];
|
|
2139
2141
|
}), n;
|
|
2140
2142
|
}
|
|
2141
|
-
function
|
|
2143
|
+
function so(e) {
|
|
2142
2144
|
return e instanceof HTMLElement;
|
|
2143
2145
|
}
|
|
2144
|
-
function
|
|
2146
|
+
function co(e, t) {
|
|
2145
2147
|
Object.keys(e).forEach((n) => {
|
|
2146
2148
|
t(n, e[n]);
|
|
2147
2149
|
});
|
|
2148
2150
|
}
|
|
2149
|
-
function
|
|
2151
|
+
function lo(e) {
|
|
2150
2152
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2151
2153
|
}
|
|
2152
|
-
var
|
|
2153
|
-
function
|
|
2154
|
+
var uo = Object.assign;
|
|
2155
|
+
function fo(e, t) {
|
|
2154
2156
|
var n = Object.keys(e);
|
|
2155
2157
|
if (Object.getOwnPropertySymbols) {
|
|
2156
2158
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2160,26 +2162,26 @@ function Ua(e, t) {
|
|
|
2160
2162
|
}
|
|
2161
2163
|
return n;
|
|
2162
2164
|
}
|
|
2163
|
-
function
|
|
2165
|
+
function po(e) {
|
|
2164
2166
|
for (var t = 1; t < arguments.length; t++) {
|
|
2165
2167
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2166
|
-
t % 2 ?
|
|
2167
|
-
|
|
2168
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2168
|
+
t % 2 ? fo(Object(n), !0).forEach(function(t) {
|
|
2169
|
+
ho(e, t, n[t]);
|
|
2170
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : fo(Object(n)).forEach(function(t) {
|
|
2169
2171
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2170
2172
|
});
|
|
2171
2173
|
}
|
|
2172
2174
|
return e;
|
|
2173
2175
|
}
|
|
2174
|
-
function
|
|
2176
|
+
function mo(e) {
|
|
2175
2177
|
"@babel/helpers - typeof";
|
|
2176
|
-
return
|
|
2178
|
+
return mo = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2177
2179
|
return typeof e;
|
|
2178
2180
|
} : function(e) {
|
|
2179
2181
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2180
|
-
},
|
|
2182
|
+
}, mo(e);
|
|
2181
2183
|
}
|
|
2182
|
-
function
|
|
2184
|
+
function ho(e, t, n) {
|
|
2183
2185
|
return t in e ? Object.defineProperty(e, t, {
|
|
2184
2186
|
value: n,
|
|
2185
2187
|
enumerable: !0,
|
|
@@ -2187,44 +2189,44 @@ function Ka(e, t, n) {
|
|
|
2187
2189
|
writable: !0
|
|
2188
2190
|
}) : e[t] = n, e;
|
|
2189
2191
|
}
|
|
2190
|
-
function
|
|
2191
|
-
return
|
|
2192
|
+
function go() {
|
|
2193
|
+
return go = Object.assign || function(e) {
|
|
2192
2194
|
for (var t = 1; t < arguments.length; t++) {
|
|
2193
2195
|
var n = arguments[t];
|
|
2194
2196
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2195
2197
|
}
|
|
2196
2198
|
return e;
|
|
2197
|
-
},
|
|
2199
|
+
}, go.apply(this, arguments);
|
|
2198
2200
|
}
|
|
2199
|
-
function
|
|
2201
|
+
function _o(e, t) {
|
|
2200
2202
|
if (e == null) return {};
|
|
2201
2203
|
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]);
|
|
2202
2204
|
return n;
|
|
2203
2205
|
}
|
|
2204
|
-
function
|
|
2206
|
+
function vo(e, t) {
|
|
2205
2207
|
if (e == null) return {};
|
|
2206
|
-
var n =
|
|
2208
|
+
var n = _o(e, t), r, i;
|
|
2207
2209
|
if (Object.getOwnPropertySymbols) {
|
|
2208
2210
|
var a = Object.getOwnPropertySymbols(e);
|
|
2209
2211
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2210
2212
|
}
|
|
2211
2213
|
return n;
|
|
2212
2214
|
}
|
|
2213
|
-
var
|
|
2214
|
-
function
|
|
2215
|
+
var yo = "1.15.2";
|
|
2216
|
+
function bo(e) {
|
|
2215
2217
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2216
2218
|
}
|
|
2217
|
-
var
|
|
2219
|
+
var xo = bo(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), So = bo(/Edge/i), Co = bo(/firefox/i), wo = bo(/safari/i) && !bo(/chrome/i) && !bo(/android/i), To = bo(/iP(ad|od|hone)/i), Eo = bo(/chrome/i) && bo(/android/i), Do = {
|
|
2218
2220
|
capture: !1,
|
|
2219
2221
|
passive: !1
|
|
2220
2222
|
};
|
|
2221
2223
|
function L(e, t, n) {
|
|
2222
|
-
e.addEventListener(t, n, !
|
|
2224
|
+
e.addEventListener(t, n, !xo && Do);
|
|
2223
2225
|
}
|
|
2224
2226
|
function R(e, t, n) {
|
|
2225
|
-
e.removeEventListener(t, n, !
|
|
2227
|
+
e.removeEventListener(t, n, !xo && Do);
|
|
2226
2228
|
}
|
|
2227
|
-
function
|
|
2229
|
+
function Oo(e, t) {
|
|
2228
2230
|
if (t) {
|
|
2229
2231
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2230
2232
|
if (e.matches) return e.matches(t);
|
|
@@ -2236,22 +2238,22 @@ function ao(e, t) {
|
|
|
2236
2238
|
return !1;
|
|
2237
2239
|
}
|
|
2238
2240
|
}
|
|
2239
|
-
function
|
|
2241
|
+
function ko(e) {
|
|
2240
2242
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2241
2243
|
}
|
|
2242
|
-
function
|
|
2244
|
+
function Ao(e, t, n, r) {
|
|
2243
2245
|
if (e) {
|
|
2244
2246
|
n ||= document;
|
|
2245
2247
|
do {
|
|
2246
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2248
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Oo(e, t) : Oo(e, t)) || r && e === n) return e;
|
|
2247
2249
|
if (e === n) break;
|
|
2248
|
-
} while (e =
|
|
2250
|
+
} while (e = ko(e));
|
|
2249
2251
|
}
|
|
2250
2252
|
return null;
|
|
2251
2253
|
}
|
|
2252
|
-
var
|
|
2254
|
+
var jo = /\s+/g;
|
|
2253
2255
|
function z(e, t, n) {
|
|
2254
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2256
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(jo, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(jo, " "));
|
|
2255
2257
|
}
|
|
2256
2258
|
function B(e, t, n) {
|
|
2257
2259
|
var r = e && e.style;
|
|
@@ -2260,7 +2262,7 @@ function B(e, t, n) {
|
|
|
2260
2262
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2261
2263
|
}
|
|
2262
2264
|
}
|
|
2263
|
-
function
|
|
2265
|
+
function Mo(e, t) {
|
|
2264
2266
|
var n = "";
|
|
2265
2267
|
if (typeof e == "string") n = e;
|
|
2266
2268
|
else do {
|
|
@@ -2270,7 +2272,7 @@ function lo(e, t) {
|
|
|
2270
2272
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2271
2273
|
return i && new i(n);
|
|
2272
2274
|
}
|
|
2273
|
-
function
|
|
2275
|
+
function No(e, t, n) {
|
|
2274
2276
|
if (e) {
|
|
2275
2277
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2276
2278
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2278,13 +2280,13 @@ function uo(e, t, n) {
|
|
|
2278
2280
|
}
|
|
2279
2281
|
return [];
|
|
2280
2282
|
}
|
|
2281
|
-
function
|
|
2283
|
+
function Po() {
|
|
2282
2284
|
return document.scrollingElement || document.documentElement;
|
|
2283
2285
|
}
|
|
2284
2286
|
function V(e, t, n, r, i) {
|
|
2285
2287
|
if (e.getBoundingClientRect || e === window) {
|
|
2286
2288
|
var a, o, s, c, l, u, d;
|
|
2287
|
-
if (e !== window && e.parentNode && e !==
|
|
2289
|
+
if (e !== window && e.parentNode && e !== Po() ? (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, !xo)) do
|
|
2288
2290
|
if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
|
|
2289
2291
|
var f = i.getBoundingClientRect();
|
|
2290
2292
|
o -= f.top + parseInt(B(i, "border-top-width")), s -= f.left + parseInt(B(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2292,7 +2294,7 @@ function V(e, t, n, r, i) {
|
|
|
2292
2294
|
}
|
|
2293
2295
|
while (i = i.parentNode);
|
|
2294
2296
|
if (r && e !== window) {
|
|
2295
|
-
var p =
|
|
2297
|
+
var p = Mo(i || e), m = p && p.a, h = p && p.d;
|
|
2296
2298
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2297
2299
|
}
|
|
2298
2300
|
return {
|
|
@@ -2305,18 +2307,18 @@ function V(e, t, n, r, i) {
|
|
|
2305
2307
|
};
|
|
2306
2308
|
}
|
|
2307
2309
|
}
|
|
2308
|
-
function
|
|
2309
|
-
for (var r =
|
|
2310
|
+
function Fo(e, t, n) {
|
|
2311
|
+
for (var r = Vo(e, !0), i = V(e)[t]; r;) {
|
|
2310
2312
|
var a = V(r)[n], o = void 0;
|
|
2311
2313
|
if (o = i >= a, !o) return r;
|
|
2312
|
-
if (r ===
|
|
2313
|
-
r =
|
|
2314
|
+
if (r === Po()) break;
|
|
2315
|
+
r = Vo(r, !1);
|
|
2314
2316
|
}
|
|
2315
2317
|
return !1;
|
|
2316
2318
|
}
|
|
2317
|
-
function
|
|
2319
|
+
function Io(e, t, n, r) {
|
|
2318
2320
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2319
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2321
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ao(o[a], n.draggable, e, !1)) {
|
|
2320
2322
|
if (i === t) return o[a];
|
|
2321
2323
|
i++;
|
|
2322
2324
|
}
|
|
@@ -2324,84 +2326,84 @@ function mo(e, t, n, r) {
|
|
|
2324
2326
|
}
|
|
2325
2327
|
return null;
|
|
2326
2328
|
}
|
|
2327
|
-
function
|
|
2328
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !
|
|
2329
|
+
function Lo(e, t) {
|
|
2330
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !Oo(n, t));) n = n.previousElementSibling;
|
|
2329
2331
|
return n || null;
|
|
2330
2332
|
}
|
|
2331
|
-
function
|
|
2333
|
+
function Ro(e, t) {
|
|
2332
2334
|
var n = 0;
|
|
2333
2335
|
if (!e || !e.parentNode) return -1;
|
|
2334
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2336
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Oo(e, t)) && n++;
|
|
2335
2337
|
return n;
|
|
2336
2338
|
}
|
|
2337
|
-
function
|
|
2338
|
-
var t = 0, n = 0, r =
|
|
2339
|
+
function zo(e) {
|
|
2340
|
+
var t = 0, n = 0, r = Po();
|
|
2339
2341
|
if (e) do {
|
|
2340
|
-
var i =
|
|
2342
|
+
var i = Mo(e), a = i.a, o = i.d;
|
|
2341
2343
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2342
2344
|
} while (e !== r && (e = e.parentNode));
|
|
2343
2345
|
return [t, n];
|
|
2344
2346
|
}
|
|
2345
|
-
function
|
|
2347
|
+
function Bo(e, t) {
|
|
2346
2348
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2347
2349
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2348
2350
|
}
|
|
2349
2351
|
return -1;
|
|
2350
2352
|
}
|
|
2351
|
-
function
|
|
2352
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2353
|
+
function Vo(e, t) {
|
|
2354
|
+
if (!e || !e.getBoundingClientRect) return Po();
|
|
2353
2355
|
var n = e, r = !1;
|
|
2354
2356
|
do
|
|
2355
2357
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2356
2358
|
var i = B(n);
|
|
2357
2359
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2358
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2360
|
+
if (!n.getBoundingClientRect || n === document.body) return Po();
|
|
2359
2361
|
if (r || t) return n;
|
|
2360
2362
|
r = !0;
|
|
2361
2363
|
}
|
|
2362
2364
|
}
|
|
2363
2365
|
while (n = n.parentNode);
|
|
2364
|
-
return
|
|
2366
|
+
return Po();
|
|
2365
2367
|
}
|
|
2366
|
-
function
|
|
2368
|
+
function Ho(e, t) {
|
|
2367
2369
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2368
2370
|
return e;
|
|
2369
2371
|
}
|
|
2370
|
-
function
|
|
2372
|
+
function Uo(e, t) {
|
|
2371
2373
|
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);
|
|
2372
2374
|
}
|
|
2373
|
-
var
|
|
2374
|
-
function
|
|
2375
|
+
var Wo;
|
|
2376
|
+
function Go(e, t) {
|
|
2375
2377
|
return function() {
|
|
2376
|
-
if (!
|
|
2378
|
+
if (!Wo) {
|
|
2377
2379
|
var n = arguments, r = this;
|
|
2378
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2379
|
-
|
|
2380
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Wo = setTimeout(function() {
|
|
2381
|
+
Wo = void 0;
|
|
2380
2382
|
}, t);
|
|
2381
2383
|
}
|
|
2382
2384
|
};
|
|
2383
2385
|
}
|
|
2384
|
-
function
|
|
2385
|
-
clearTimeout(
|
|
2386
|
+
function Ko() {
|
|
2387
|
+
clearTimeout(Wo), Wo = void 0;
|
|
2386
2388
|
}
|
|
2387
|
-
function
|
|
2389
|
+
function qo(e, t, n) {
|
|
2388
2390
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2389
2391
|
}
|
|
2390
|
-
function
|
|
2392
|
+
function Jo(e) {
|
|
2391
2393
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2392
2394
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2393
2395
|
}
|
|
2394
|
-
function
|
|
2396
|
+
function Yo(e, t, n) {
|
|
2395
2397
|
var r = {};
|
|
2396
2398
|
return Array.from(e.children).forEach(function(i) {
|
|
2397
|
-
if (
|
|
2399
|
+
if (Ao(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2398
2400
|
var a = V(i);
|
|
2399
2401
|
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);
|
|
2400
2402
|
}
|
|
2401
2403
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2402
2404
|
}
|
|
2403
2405
|
var H = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2404
|
-
function
|
|
2406
|
+
function Xo() {
|
|
2405
2407
|
var e = [], t;
|
|
2406
2408
|
return {
|
|
2407
2409
|
captureAnimationState: function() {
|
|
@@ -2411,9 +2413,9 @@ function Oo() {
|
|
|
2411
2413
|
target: t,
|
|
2412
2414
|
rect: V(t)
|
|
2413
2415
|
});
|
|
2414
|
-
var n =
|
|
2416
|
+
var n = po({}, e[e.length - 1].rect);
|
|
2415
2417
|
if (t.thisAnimationDuration) {
|
|
2416
|
-
var r =
|
|
2418
|
+
var r = Mo(t, !0);
|
|
2417
2419
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2418
2420
|
}
|
|
2419
2421
|
t.fromRect = n;
|
|
@@ -2424,7 +2426,7 @@ function Oo() {
|
|
|
2424
2426
|
e.push(t);
|
|
2425
2427
|
},
|
|
2426
2428
|
removeAnimationState: function(t) {
|
|
2427
|
-
e.splice(
|
|
2429
|
+
e.splice(Bo(e, { target: t }), 1);
|
|
2428
2430
|
},
|
|
2429
2431
|
animateAll: function(n) {
|
|
2430
2432
|
var r = this;
|
|
@@ -2432,8 +2434,8 @@ function Oo() {
|
|
|
2432
2434
|
else {
|
|
2433
2435
|
var i = !1, a = 0;
|
|
2434
2436
|
e.forEach(function(e) {
|
|
2435
|
-
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2436
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2437
|
+
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Mo(n, !0);
|
|
2438
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Uo(c, s) && !Uo(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Qo(u, c, l, r.options)), Uo(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() {
|
|
2437
2439
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2438
2440
|
}, t), n.thisAnimationDuration = t);
|
|
2439
2441
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2444,26 +2446,26 @@ function Oo() {
|
|
|
2444
2446
|
animate: function(e, t, n, r) {
|
|
2445
2447
|
if (r) {
|
|
2446
2448
|
B(e, "transition", ""), B(e, "transform", "");
|
|
2447
|
-
var i =
|
|
2448
|
-
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2449
|
+
var i = Mo(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2450
|
+
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Zo(e), B(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), B(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2449
2451
|
B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2450
2452
|
}, r);
|
|
2451
2453
|
}
|
|
2452
2454
|
}
|
|
2453
2455
|
};
|
|
2454
2456
|
}
|
|
2455
|
-
function
|
|
2457
|
+
function Zo(e) {
|
|
2456
2458
|
return e.offsetWidth;
|
|
2457
2459
|
}
|
|
2458
|
-
function
|
|
2460
|
+
function Qo(e, t, n, r) {
|
|
2459
2461
|
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;
|
|
2460
2462
|
}
|
|
2461
|
-
var
|
|
2463
|
+
var $o = [], es = { initializeByDefault: !0 }, ts = {
|
|
2462
2464
|
mount: function(e) {
|
|
2463
|
-
for (var t in
|
|
2464
|
-
|
|
2465
|
+
for (var t in es) es.hasOwnProperty(t) && !(t in e) && (e[t] = es[t]);
|
|
2466
|
+
$o.forEach(function(t) {
|
|
2465
2467
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2466
|
-
}),
|
|
2468
|
+
}), $o.push(e);
|
|
2467
2469
|
},
|
|
2468
2470
|
pluginEvent: function(e, t, n) {
|
|
2469
2471
|
var r = this;
|
|
@@ -2471,16 +2473,16 @@ var jo = [], Mo = { initializeByDefault: !0 }, No = {
|
|
|
2471
2473
|
r.eventCanceled = !0;
|
|
2472
2474
|
};
|
|
2473
2475
|
var i = e + "Global";
|
|
2474
|
-
|
|
2475
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2476
|
+
$o.forEach(function(r) {
|
|
2477
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](po({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](po({ sortable: t }, n)));
|
|
2476
2478
|
});
|
|
2477
2479
|
},
|
|
2478
2480
|
initializePlugins: function(e, t, n, r) {
|
|
2479
|
-
for (var i in
|
|
2481
|
+
for (var i in $o.forEach(function(r) {
|
|
2480
2482
|
var i = r.pluginName;
|
|
2481
2483
|
if (e.options[i] || r.initializeByDefault) {
|
|
2482
2484
|
var a = new r(e, t, e.options);
|
|
2483
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2485
|
+
a.sortable = e, a.options = e.options, e[i] = a, go(n, a.defaults);
|
|
2484
2486
|
}
|
|
2485
2487
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2486
2488
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2489,56 +2491,56 @@ var jo = [], Mo = { initializeByDefault: !0 }, No = {
|
|
|
2489
2491
|
},
|
|
2490
2492
|
getEventProperties: function(e, t) {
|
|
2491
2493
|
var n = {};
|
|
2492
|
-
return
|
|
2493
|
-
typeof r.eventProperties == "function" &&
|
|
2494
|
+
return $o.forEach(function(r) {
|
|
2495
|
+
typeof r.eventProperties == "function" && go(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2494
2496
|
}), n;
|
|
2495
2497
|
},
|
|
2496
2498
|
modifyOption: function(e, t, n) {
|
|
2497
2499
|
var r;
|
|
2498
|
-
return
|
|
2500
|
+
return $o.forEach(function(i) {
|
|
2499
2501
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2500
2502
|
}), r;
|
|
2501
2503
|
}
|
|
2502
2504
|
};
|
|
2503
|
-
function
|
|
2505
|
+
function ns(e) {
|
|
2504
2506
|
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;
|
|
2505
2507
|
if (t ||= n && n[H], t) {
|
|
2506
2508
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2507
|
-
window.CustomEvent && !
|
|
2509
|
+
window.CustomEvent && !xo && !So ? h = new CustomEvent(r, {
|
|
2508
2510
|
bubbles: !0,
|
|
2509
2511
|
cancelable: !0
|
|
2510
2512
|
}) : (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;
|
|
2511
|
-
var v =
|
|
2513
|
+
var v = po(po({}, m), ts.getEventProperties(r, t));
|
|
2512
2514
|
for (var y in v) h[y] = v[y];
|
|
2513
2515
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2514
2516
|
}
|
|
2515
2517
|
}
|
|
2516
|
-
var
|
|
2517
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2518
|
-
|
|
2518
|
+
var rs = ["evt"], U = function(e, t) {
|
|
2519
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = vo(n, rs);
|
|
2520
|
+
ts.pluginEvent.bind(Q)(e, t, po({
|
|
2519
2521
|
dragEl: G,
|
|
2520
2522
|
parentEl: K,
|
|
2521
2523
|
ghostEl: q,
|
|
2522
2524
|
rootEl: J,
|
|
2523
|
-
nextEl:
|
|
2524
|
-
lastDownEl:
|
|
2525
|
+
nextEl: is,
|
|
2526
|
+
lastDownEl: as,
|
|
2525
2527
|
cloneEl: Y,
|
|
2526
|
-
cloneHidden:
|
|
2527
|
-
dragStarted:
|
|
2528
|
+
cloneHidden: os,
|
|
2529
|
+
dragStarted: xs,
|
|
2528
2530
|
putSortable: X,
|
|
2529
2531
|
activeSortable: Q.active,
|
|
2530
2532
|
originalEvent: r,
|
|
2531
|
-
oldIndex:
|
|
2532
|
-
oldDraggableIndex:
|
|
2533
|
-
newIndex:
|
|
2534
|
-
newDraggableIndex:
|
|
2535
|
-
hideGhostForTarget:
|
|
2536
|
-
unhideGhostForTarget:
|
|
2533
|
+
oldIndex: ss,
|
|
2534
|
+
oldDraggableIndex: ls,
|
|
2535
|
+
newIndex: cs,
|
|
2536
|
+
newDraggableIndex: us,
|
|
2537
|
+
hideGhostForTarget: zs,
|
|
2538
|
+
unhideGhostForTarget: Bs,
|
|
2537
2539
|
cloneNowHidden: function() {
|
|
2538
|
-
|
|
2540
|
+
os = !0;
|
|
2539
2541
|
},
|
|
2540
2542
|
cloneNowShown: function() {
|
|
2541
|
-
|
|
2543
|
+
os = !1;
|
|
2542
2544
|
},
|
|
2543
2545
|
dispatchSortableEvent: function(e) {
|
|
2544
2546
|
W({
|
|
@@ -2550,45 +2552,45 @@ var Fo = ["evt"], U = function(e, t) {
|
|
|
2550
2552
|
}, i));
|
|
2551
2553
|
};
|
|
2552
2554
|
function W(e) {
|
|
2553
|
-
|
|
2555
|
+
ns(po({
|
|
2554
2556
|
putSortable: X,
|
|
2555
2557
|
cloneEl: Y,
|
|
2556
2558
|
targetEl: G,
|
|
2557
2559
|
rootEl: J,
|
|
2558
|
-
oldIndex:
|
|
2559
|
-
oldDraggableIndex:
|
|
2560
|
-
newIndex:
|
|
2561
|
-
newDraggableIndex:
|
|
2560
|
+
oldIndex: ss,
|
|
2561
|
+
oldDraggableIndex: ls,
|
|
2562
|
+
newIndex: cs,
|
|
2563
|
+
newDraggableIndex: us
|
|
2562
2564
|
}, e));
|
|
2563
2565
|
}
|
|
2564
|
-
var G, K, q, J,
|
|
2565
|
-
if (
|
|
2566
|
-
if (
|
|
2566
|
+
var G, K, q, J, is, as, Y, os, ss, cs, ls, us, ds, X, fs = !1, ps = !1, ms = [], hs, gs, _s, vs, ys, bs, xs, Ss, Cs, ws = !1, Ts = !1, Es, Z, Ds = [], Os = !1, ks = [], As = typeof document < "u", js = To, Ms = So || xo ? "cssFloat" : "float", Ns = As && !Eo && !To && "draggable" in document.createElement("div"), Ps = function() {
|
|
2567
|
+
if (As) {
|
|
2568
|
+
if (xo) return !1;
|
|
2567
2569
|
var e = document.createElement("x");
|
|
2568
2570
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2569
2571
|
}
|
|
2570
|
-
}(),
|
|
2571
|
-
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2572
|
+
}(), Fs = function(e, t) {
|
|
2573
|
+
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Io(e, 0, t), a = Io(e, 1, t), o = i && B(i), s = a && B(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + V(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + V(a).width;
|
|
2572
2574
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2573
2575
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2574
2576
|
if (i && o.float && o.float !== "none") {
|
|
2575
2577
|
var u = o.float === "left" ? "left" : "right";
|
|
2576
2578
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2577
2579
|
}
|
|
2578
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2579
|
-
},
|
|
2580
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Ms] === "none" || a && n[Ms] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2581
|
+
}, Is = function(e, t, n) {
|
|
2580
2582
|
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;
|
|
2581
2583
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2582
|
-
},
|
|
2584
|
+
}, Ls = function(e, t) {
|
|
2583
2585
|
var n;
|
|
2584
|
-
return
|
|
2586
|
+
return ms.some(function(r) {
|
|
2585
2587
|
var i = r[H].options.emptyInsertThreshold;
|
|
2586
|
-
if (i && !
|
|
2588
|
+
if (i && !Lo(r)) {
|
|
2587
2589
|
var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2588
2590
|
if (o && s) return n = r;
|
|
2589
2591
|
}
|
|
2590
2592
|
}), n;
|
|
2591
|
-
},
|
|
2593
|
+
}, Rs = function(e) {
|
|
2592
2594
|
function t(e, n) {
|
|
2593
2595
|
return function(r, i, a, o) {
|
|
2594
2596
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2601,31 +2603,31 @@ var G, K, q, J, Io, Lo, Y, Ro, zo, Bo, Vo, Ho, Uo, X, Wo = !1, Go = !1, Ko = [],
|
|
|
2601
2603
|
};
|
|
2602
2604
|
}
|
|
2603
2605
|
var n = {}, r = e.group;
|
|
2604
|
-
(!r ||
|
|
2605
|
-
},
|
|
2606
|
-
!
|
|
2607
|
-
},
|
|
2608
|
-
!
|
|
2606
|
+
(!r || mo(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;
|
|
2607
|
+
}, zs = function() {
|
|
2608
|
+
!Ps && q && B(q, "display", "none");
|
|
2609
|
+
}, Bs = function() {
|
|
2610
|
+
!Ps && q && B(q, "display", "");
|
|
2609
2611
|
};
|
|
2610
|
-
|
|
2611
|
-
if (
|
|
2612
|
+
As && !Eo && document.addEventListener("click", function(e) {
|
|
2613
|
+
if (ps) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), ps = !1, !1;
|
|
2612
2614
|
}, !0);
|
|
2613
|
-
var
|
|
2615
|
+
var Vs = function(e) {
|
|
2614
2616
|
if (G) {
|
|
2615
2617
|
e = e.touches ? e.touches[0] : e;
|
|
2616
|
-
var t =
|
|
2618
|
+
var t = Ls(e.clientX, e.clientY);
|
|
2617
2619
|
if (t) {
|
|
2618
2620
|
var n = {};
|
|
2619
2621
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2620
2622
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[H]._onDragOver(n);
|
|
2621
2623
|
}
|
|
2622
2624
|
}
|
|
2623
|
-
},
|
|
2625
|
+
}, Hs = function(e) {
|
|
2624
2626
|
G && G.parentNode[H]._isOutsideThisEl(e.target);
|
|
2625
2627
|
};
|
|
2626
2628
|
function Q(e, t) {
|
|
2627
2629
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2628
|
-
this.el = e, this.options = t =
|
|
2630
|
+
this.el = e, this.options = t = go({}, t), e[H] = this;
|
|
2629
2631
|
var n = {
|
|
2630
2632
|
group: null,
|
|
2631
2633
|
sort: !0,
|
|
@@ -2638,7 +2640,7 @@ function Q(e, t) {
|
|
|
2638
2640
|
invertedSwapThreshold: null,
|
|
2639
2641
|
removeCloneOnHide: !0,
|
|
2640
2642
|
direction: function() {
|
|
2641
|
-
return
|
|
2643
|
+
return Fs(e, this.options);
|
|
2642
2644
|
},
|
|
2643
2645
|
ghostClass: "sortable-ghost",
|
|
2644
2646
|
chosenClass: "sortable-chosen",
|
|
@@ -2665,17 +2667,17 @@ function Q(e, t) {
|
|
|
2665
2667
|
x: 0,
|
|
2666
2668
|
y: 0
|
|
2667
2669
|
},
|
|
2668
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2670
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !wo,
|
|
2669
2671
|
emptyInsertThreshold: 5
|
|
2670
2672
|
};
|
|
2671
|
-
for (var r in
|
|
2672
|
-
for (var i in
|
|
2673
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
2673
|
+
for (var r in ts.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2674
|
+
for (var i in Rs(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2675
|
+
this.nativeDraggable = !t.forceFallback && Ns, 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)), ms.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), go(this, Xo());
|
|
2674
2676
|
}
|
|
2675
2677
|
Q.prototype = {
|
|
2676
2678
|
constructor: Q,
|
|
2677
2679
|
_isOutsideThisEl: function(e) {
|
|
2678
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2680
|
+
!this.el.contains(e) && e !== this.el && (Ss = null);
|
|
2679
2681
|
},
|
|
2680
2682
|
_getDirection: function(e, t) {
|
|
2681
2683
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
@@ -2683,8 +2685,8 @@ Q.prototype = {
|
|
|
2683
2685
|
_onTapStart: function(e) {
|
|
2684
2686
|
if (e.cancelable) {
|
|
2685
2687
|
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;
|
|
2686
|
-
if (
|
|
2687
|
-
if (
|
|
2688
|
+
if (Qs(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && wo && s && s.tagName.toUpperCase() === "SELECT") && (s = Ao(s, r.draggable, n, !1), !(s && s.animated) && as !== s)) {
|
|
2689
|
+
if (ss = Ro(s), ls = Ro(s, r.draggable), typeof l == "function") {
|
|
2688
2690
|
if (l.call(this, e, s, this)) {
|
|
2689
2691
|
W({
|
|
2690
2692
|
sortable: t,
|
|
@@ -2697,7 +2699,7 @@ Q.prototype = {
|
|
|
2697
2699
|
return;
|
|
2698
2700
|
}
|
|
2699
2701
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2700
|
-
if (r =
|
|
2702
|
+
if (r = Ao(c, r.trim(), n, !1), r) return W({
|
|
2701
2703
|
sortable: t,
|
|
2702
2704
|
rootEl: r,
|
|
2703
2705
|
name: "filter",
|
|
@@ -2709,7 +2711,7 @@ Q.prototype = {
|
|
|
2709
2711
|
i && e.cancelable && e.preventDefault();
|
|
2710
2712
|
return;
|
|
2711
2713
|
}
|
|
2712
|
-
r.handle && !
|
|
2714
|
+
r.handle && !Ao(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2713
2715
|
}
|
|
2714
2716
|
}
|
|
2715
2717
|
},
|
|
@@ -2717,19 +2719,19 @@ Q.prototype = {
|
|
|
2717
2719
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2718
2720
|
if (n && !G && n.parentNode === i) {
|
|
2719
2721
|
var c = V(n);
|
|
2720
|
-
if (J = i, G = n, K = G.parentNode,
|
|
2722
|
+
if (J = i, G = n, K = G.parentNode, is = G.nextSibling, as = n, ds = a.group, Q.dragged = G, hs = {
|
|
2721
2723
|
target: G,
|
|
2722
2724
|
clientX: (t || e).clientX,
|
|
2723
2725
|
clientY: (t || e).clientY
|
|
2724
|
-
},
|
|
2725
|
-
U("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !
|
|
2726
|
+
}, ys = hs.clientX - c.left, bs = hs.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
2727
|
+
U("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Co && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
2726
2728
|
sortable: r,
|
|
2727
2729
|
name: "choose",
|
|
2728
2730
|
originalEvent: e
|
|
2729
2731
|
}), z(G, a.chosenClass, !0));
|
|
2730
2732
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2731
|
-
|
|
2732
|
-
}), L(o, "dragover",
|
|
2733
|
+
No(G, e.trim(), Gs);
|
|
2734
|
+
}), L(o, "dragover", Vs), L(o, "mousemove", Vs), L(o, "touchmove", Vs), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), Co && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(So || xo))) {
|
|
2733
2735
|
if (Q.eventCanceled) {
|
|
2734
2736
|
this._onDrop();
|
|
2735
2737
|
return;
|
|
@@ -2743,7 +2745,7 @@ Q.prototype = {
|
|
|
2743
2745
|
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();
|
|
2744
2746
|
},
|
|
2745
2747
|
_disableDelayedDrag: function() {
|
|
2746
|
-
G &&
|
|
2748
|
+
G && Gs(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2747
2749
|
},
|
|
2748
2750
|
_disableDelayedDragEvents: function() {
|
|
2749
2751
|
var e = this.el.ownerDocument;
|
|
@@ -2752,14 +2754,14 @@ Q.prototype = {
|
|
|
2752
2754
|
_triggerDragStart: function(e, t) {
|
|
2753
2755
|
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(G, "dragend", this), L(J, "dragstart", this._onDragStart));
|
|
2754
2756
|
try {
|
|
2755
|
-
document.selection ?
|
|
2757
|
+
document.selection ? $s(function() {
|
|
2756
2758
|
document.selection.empty();
|
|
2757
2759
|
}) : window.getSelection().removeAllRanges();
|
|
2758
2760
|
} catch {}
|
|
2759
2761
|
},
|
|
2760
2762
|
_dragStarted: function(e, t) {
|
|
2761
|
-
if (
|
|
2762
|
-
U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover",
|
|
2763
|
+
if (fs = !1, J && G) {
|
|
2764
|
+
U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", Hs);
|
|
2763
2765
|
var n = this.options;
|
|
2764
2766
|
!e && z(G, n.dragClass, !1), z(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
2765
2767
|
sortable: this,
|
|
@@ -2769,33 +2771,33 @@ Q.prototype = {
|
|
|
2769
2771
|
} else this._nulling();
|
|
2770
2772
|
},
|
|
2771
2773
|
_emulateDragOver: function() {
|
|
2772
|
-
if (
|
|
2773
|
-
this._lastX =
|
|
2774
|
-
for (var e = document.elementFromPoint(
|
|
2774
|
+
if (gs) {
|
|
2775
|
+
this._lastX = gs.clientX, this._lastY = gs.clientY, zs();
|
|
2776
|
+
for (var e = document.elementFromPoint(gs.clientX, gs.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(gs.clientX, gs.clientY), e !== t);) t = e;
|
|
2775
2777
|
if (G.parentNode[H]._isOutsideThisEl(e), t) do {
|
|
2776
2778
|
if (t[H]) {
|
|
2777
2779
|
var n = void 0;
|
|
2778
2780
|
if (n = t[H]._onDragOver({
|
|
2779
|
-
clientX:
|
|
2780
|
-
clientY:
|
|
2781
|
+
clientX: gs.clientX,
|
|
2782
|
+
clientY: gs.clientY,
|
|
2781
2783
|
target: e,
|
|
2782
2784
|
rootEl: t
|
|
2783
2785
|
}), n && !this.options.dragoverBubble) break;
|
|
2784
2786
|
}
|
|
2785
2787
|
e = t;
|
|
2786
2788
|
} while (t = t.parentNode);
|
|
2787
|
-
|
|
2789
|
+
Bs();
|
|
2788
2790
|
}
|
|
2789
2791
|
},
|
|
2790
2792
|
_onTouchMove: function(e) {
|
|
2791
|
-
if (
|
|
2792
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q &&
|
|
2793
|
-
if (!Q.active && !
|
|
2793
|
+
if (hs) {
|
|
2794
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Mo(q, !0), o = q && a && a.a, s = q && a && a.d, c = js && Z && zo(Z), l = (i.clientX - hs.clientX + r.x) / (o || 1) + (c ? c[0] - Ds[0] : 0) / (o || 1), u = (i.clientY - hs.clientY + r.y) / (s || 1) + (c ? c[1] - Ds[1] : 0) / (s || 1);
|
|
2795
|
+
if (!Q.active && !fs) {
|
|
2794
2796
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2795
2797
|
this._onDragStart(e, !0);
|
|
2796
2798
|
}
|
|
2797
2799
|
if (q) {
|
|
2798
|
-
a ? (a.e += l - (
|
|
2800
|
+
a ? (a.e += l - (_s || 0), a.f += u - (vs || 0)) : a = {
|
|
2799
2801
|
a: 1,
|
|
2800
2802
|
b: 0,
|
|
2801
2803
|
c: 0,
|
|
@@ -2804,35 +2806,35 @@ Q.prototype = {
|
|
|
2804
2806
|
f: u
|
|
2805
2807
|
};
|
|
2806
2808
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2807
|
-
B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d),
|
|
2809
|
+
B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d), _s = l, vs = u, gs = i;
|
|
2808
2810
|
}
|
|
2809
2811
|
e.cancelable && e.preventDefault();
|
|
2810
2812
|
}
|
|
2811
2813
|
},
|
|
2812
2814
|
_appendGhost: function() {
|
|
2813
2815
|
if (!q) {
|
|
2814
|
-
var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0,
|
|
2815
|
-
if (
|
|
2816
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0, js, !0, e), n = this.options;
|
|
2817
|
+
if (js) {
|
|
2816
2818
|
for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2817
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2819
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Po()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Po(), Ds = zo(Z);
|
|
2818
2820
|
}
|
|
2819
|
-
q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position",
|
|
2821
|
+
q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position", js ? "absolute" : "fixed"), B(q, "zIndex", "100000"), B(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), B(q, "transform-origin", ys / parseInt(q.style.width) * 100 + "% " + bs / parseInt(q.style.height) * 100 + "%");
|
|
2820
2822
|
}
|
|
2821
2823
|
},
|
|
2822
2824
|
_onDragStart: function(e, t) {
|
|
2823
2825
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
2824
|
-
U("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (U("setupClone", this), Q.eventCanceled || (Y =
|
|
2826
|
+
U("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (U("setupClone", this), Q.eventCanceled || (Y = Jo(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), z(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = $s(function() {
|
|
2825
2827
|
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
2826
2828
|
sortable: n,
|
|
2827
2829
|
name: "clone"
|
|
2828
2830
|
}));
|
|
2829
|
-
}), !t && z(G, i.dragClass, !0), t ? (
|
|
2831
|
+
}), !t && z(G, i.dragClass, !0), t ? (ps = !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, G)), L(document, "drop", n), B(G, "transform", "translateZ(0)")), fs = !0, n._dragStartId = $s(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), xs = !0, wo && B(document.body, "user-select", "none"));
|
|
2830
2832
|
},
|
|
2831
2833
|
_onDragOver: function(e) {
|
|
2832
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2833
|
-
if (
|
|
2834
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = ds === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2835
|
+
if (Os) return;
|
|
2834
2836
|
function h(o, s) {
|
|
2835
|
-
U(o, p,
|
|
2837
|
+
U(o, p, po({
|
|
2836
2838
|
evt: e,
|
|
2837
2839
|
isOwner: l,
|
|
2838
2840
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2844,7 +2846,7 @@ Q.prototype = {
|
|
|
2844
2846
|
target: n,
|
|
2845
2847
|
completed: _,
|
|
2846
2848
|
onMove: function(n, i) {
|
|
2847
|
-
return
|
|
2849
|
+
return Ws(J, t, G, r, n, V(n), e, i);
|
|
2848
2850
|
},
|
|
2849
2851
|
changed: v
|
|
2850
2852
|
}, s));
|
|
@@ -2855,48 +2857,48 @@ Q.prototype = {
|
|
|
2855
2857
|
function _(r) {
|
|
2856
2858
|
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(G, X ? X.options.ghostClass : c.options.ghostClass, !1), z(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
2857
2859
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2858
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (
|
|
2860
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (Ss = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[H]._isOutsideThisEl(e.target), !r && Vs(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2859
2861
|
}
|
|
2860
2862
|
function v() {
|
|
2861
|
-
|
|
2863
|
+
cs = Ro(G), us = Ro(G, o.draggable), W({
|
|
2862
2864
|
sortable: p,
|
|
2863
2865
|
name: "change",
|
|
2864
2866
|
toEl: t,
|
|
2865
|
-
newIndex:
|
|
2866
|
-
newDraggableIndex:
|
|
2867
|
+
newIndex: cs,
|
|
2868
|
+
newDraggableIndex: us,
|
|
2867
2869
|
originalEvent: e
|
|
2868
2870
|
});
|
|
2869
2871
|
}
|
|
2870
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2872
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ao(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2871
2873
|
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2872
|
-
if (
|
|
2874
|
+
if (ps = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = ds.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
2873
2875
|
if (f = this._getDirection(e, n) === "vertical", r = V(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2874
|
-
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2875
|
-
var y =
|
|
2876
|
-
if (!y ||
|
|
2876
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (is ? J.insertBefore(G, is) : J.appendChild(G)), _(!0);
|
|
2877
|
+
var y = Lo(t, o.draggable);
|
|
2878
|
+
if (!y || Js(e, f, this) && !y.animated) {
|
|
2877
2879
|
if (y === G) return _(!1);
|
|
2878
|
-
if (y && t === e.target && (n = y), n && (i = V(n)),
|
|
2879
|
-
} else if (y &&
|
|
2880
|
-
var b =
|
|
2880
|
+
if (y && t === e.target && (n = y), n && (i = V(n)), Ws(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
|
|
2881
|
+
} else if (y && qs(e, f, this)) {
|
|
2882
|
+
var b = Io(t, 0, o, !0);
|
|
2881
2883
|
if (b === G) return _(!1);
|
|
2882
|
-
if (n = b, i = V(n),
|
|
2884
|
+
if (n = b, i = V(n), Ws(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
2883
2885
|
} else if (n.parentNode === t) {
|
|
2884
2886
|
i = V(n);
|
|
2885
|
-
var x = 0, S, C = G.parentNode !== t, w = !
|
|
2886
|
-
|
|
2887
|
+
var x = 0, S, C = G.parentNode !== t, w = !Is(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Fo(n, "top", "top") || Fo(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
2888
|
+
Ss !== n && (S = i[T], ws = !1, Ts = !w && o.invertSwap || C), x = Ys(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Ts, Ss === n);
|
|
2887
2889
|
var O;
|
|
2888
2890
|
if (x !== 0) {
|
|
2889
|
-
var k =
|
|
2891
|
+
var k = Ro(G);
|
|
2890
2892
|
do
|
|
2891
2893
|
k -= x, O = K.children[k];
|
|
2892
2894
|
while (O && (B(O, "display") === "none" || O === q));
|
|
2893
2895
|
}
|
|
2894
2896
|
if (x === 0 || O === n) return _(!1);
|
|
2895
|
-
|
|
2897
|
+
Ss = n, Cs = x;
|
|
2896
2898
|
var A = n.nextElementSibling, j = !1;
|
|
2897
2899
|
j = x === 1;
|
|
2898
|
-
var M =
|
|
2899
|
-
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1),
|
|
2900
|
+
var M = Ws(J, t, G, r, n, i, e, j);
|
|
2901
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), Os = !0, setTimeout(Ks, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && qo(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !Ts && (Es = Math.abs(S - V(n)[T])), v(), _(!0);
|
|
2900
2902
|
}
|
|
2901
2903
|
if (t.contains(G)) return _(!1);
|
|
2902
2904
|
}
|
|
@@ -2904,7 +2906,7 @@ Q.prototype = {
|
|
|
2904
2906
|
},
|
|
2905
2907
|
_ignoreWhileAnimating: null,
|
|
2906
2908
|
_offMoveEvents: function() {
|
|
2907
|
-
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover",
|
|
2909
|
+
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", Vs), R(document, "mousemove", Vs), R(document, "touchmove", Vs);
|
|
2908
2910
|
},
|
|
2909
2911
|
_offUpEvents: function() {
|
|
2910
2912
|
var e = this.el.ownerDocument;
|
|
@@ -2912,14 +2914,14 @@ Q.prototype = {
|
|
|
2912
2914
|
},
|
|
2913
2915
|
_onDrop: function(e) {
|
|
2914
2916
|
var t = this.el, n = this.options;
|
|
2915
|
-
|
|
2917
|
+
cs = Ro(G), us = Ro(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, cs = Ro(G), us = Ro(G, n.draggable), Q.eventCanceled || (fs = !1, Ts = !1, ws = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ec(this.cloneId), ec(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), wo && B(document.body, "user-select", ""), B(G, "transform", ""), e && (xs && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && R(G, "dragend", this), Gs(G), G.style["will-change"] = "", xs && !fs && z(G, X ? X.options.ghostClass : this.options.ghostClass, !1), z(G, this.options.chosenClass, !1), W({
|
|
2916
2918
|
sortable: this,
|
|
2917
2919
|
name: "unchoose",
|
|
2918
2920
|
toEl: K,
|
|
2919
2921
|
newIndex: null,
|
|
2920
2922
|
newDraggableIndex: null,
|
|
2921
2923
|
originalEvent: e
|
|
2922
|
-
}), J === K ?
|
|
2924
|
+
}), J === K ? cs !== ss && cs >= 0 && (W({
|
|
2923
2925
|
sortable: this,
|
|
2924
2926
|
name: "update",
|
|
2925
2927
|
toEl: K,
|
|
@@ -2929,7 +2931,7 @@ Q.prototype = {
|
|
|
2929
2931
|
name: "sort",
|
|
2930
2932
|
toEl: K,
|
|
2931
2933
|
originalEvent: e
|
|
2932
|
-
})) : (
|
|
2934
|
+
})) : (cs >= 0 && (W({
|
|
2933
2935
|
rootEl: K,
|
|
2934
2936
|
name: "add",
|
|
2935
2937
|
toEl: K,
|
|
@@ -2951,7 +2953,7 @@ Q.prototype = {
|
|
|
2951
2953
|
name: "sort",
|
|
2952
2954
|
toEl: K,
|
|
2953
2955
|
originalEvent: e
|
|
2954
|
-
})), X && X.save()), Q.active && ((
|
|
2956
|
+
})), X && X.save()), Q.active && ((cs == null || cs === -1) && (cs = ss, us = ls), W({
|
|
2955
2957
|
sortable: this,
|
|
2956
2958
|
name: "end",
|
|
2957
2959
|
toEl: K,
|
|
@@ -2959,9 +2961,9 @@ Q.prototype = {
|
|
|
2959
2961
|
}), this.save())))), this._nulling();
|
|
2960
2962
|
},
|
|
2961
2963
|
_nulling: function() {
|
|
2962
|
-
U("nulling", this), J = G = K = q =
|
|
2964
|
+
U("nulling", this), J = G = K = q = is = Y = as = os = hs = gs = xs = cs = us = ss = ls = Ss = Cs = X = ds = Q.dragged = Q.ghost = Q.clone = Q.active = null, ks.forEach(function(e) {
|
|
2963
2965
|
e.checked = !0;
|
|
2964
|
-
}),
|
|
2966
|
+
}), ks.length = _s = vs = 0;
|
|
2965
2967
|
},
|
|
2966
2968
|
handleEvent: function(e) {
|
|
2967
2969
|
switch (e.type) {
|
|
@@ -2971,20 +2973,20 @@ Q.prototype = {
|
|
|
2971
2973
|
break;
|
|
2972
2974
|
case "dragenter":
|
|
2973
2975
|
case "dragover":
|
|
2974
|
-
G && (this._onDragOver(e),
|
|
2976
|
+
G && (this._onDragOver(e), Us(e));
|
|
2975
2977
|
break;
|
|
2976
2978
|
case "selectstart": e.preventDefault();
|
|
2977
2979
|
}
|
|
2978
2980
|
},
|
|
2979
2981
|
toArray: function() {
|
|
2980
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2982
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ao(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Zs(t));
|
|
2981
2983
|
return e;
|
|
2982
2984
|
},
|
|
2983
2985
|
sort: function(e, t) {
|
|
2984
2986
|
var n = {}, r = this.el;
|
|
2985
2987
|
this.toArray().forEach(function(e, t) {
|
|
2986
2988
|
var i = r.children[t];
|
|
2987
|
-
|
|
2989
|
+
Ao(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2988
2990
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2989
2991
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2990
2992
|
}), t && this.animateAll();
|
|
@@ -2994,122 +2996,122 @@ Q.prototype = {
|
|
|
2994
2996
|
e && e.set && e.set(this);
|
|
2995
2997
|
},
|
|
2996
2998
|
closest: function(e, t) {
|
|
2997
|
-
return
|
|
2999
|
+
return Ao(e, t || this.options.draggable, this.el, !1);
|
|
2998
3000
|
},
|
|
2999
3001
|
option: function(e, t) {
|
|
3000
3002
|
var n = this.options;
|
|
3001
3003
|
if (t === void 0) return n[e];
|
|
3002
|
-
var r =
|
|
3003
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3004
|
+
var r = ts.modifyOption(this, e, t);
|
|
3005
|
+
n[e] = r === void 0 ? t : r, e === "group" && Rs(n);
|
|
3004
3006
|
},
|
|
3005
3007
|
destroy: function() {
|
|
3006
3008
|
U("destroy", this);
|
|
3007
3009
|
var e = this.el;
|
|
3008
3010
|
e[H] = 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) {
|
|
3009
3011
|
e.removeAttribute("draggable");
|
|
3010
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3012
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ms.splice(ms.indexOf(this.el), 1), this.el = e = null;
|
|
3011
3013
|
},
|
|
3012
3014
|
_hideClone: function() {
|
|
3013
|
-
if (!
|
|
3015
|
+
if (!os) {
|
|
3014
3016
|
if (U("hideClone", this), Q.eventCanceled) return;
|
|
3015
|
-
B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y),
|
|
3017
|
+
B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), os = !0;
|
|
3016
3018
|
}
|
|
3017
3019
|
},
|
|
3018
3020
|
_showClone: function(e) {
|
|
3019
3021
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3020
|
-
else if (
|
|
3022
|
+
else if (os) {
|
|
3021
3023
|
if (U("showClone", this), Q.eventCanceled) return;
|
|
3022
|
-
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) :
|
|
3024
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : is ? J.insertBefore(Y, is) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), B(Y, "display", ""), os = !1;
|
|
3023
3025
|
}
|
|
3024
3026
|
}
|
|
3025
3027
|
};
|
|
3026
|
-
function
|
|
3028
|
+
function Us(e) {
|
|
3027
3029
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3028
3030
|
}
|
|
3029
|
-
function
|
|
3031
|
+
function Ws(e, t, n, r, i, a, o, s) {
|
|
3030
3032
|
var c, l = e[H], u = l.options.onMove, d;
|
|
3031
|
-
return window.CustomEvent && !
|
|
3033
|
+
return window.CustomEvent && !xo && !So ? c = new CustomEvent("move", {
|
|
3032
3034
|
bubbles: !0,
|
|
3033
3035
|
cancelable: !0
|
|
3034
3036
|
}) : (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 || V(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3035
3037
|
}
|
|
3036
|
-
function
|
|
3038
|
+
function Gs(e) {
|
|
3037
3039
|
e.draggable = !1;
|
|
3038
3040
|
}
|
|
3039
|
-
function
|
|
3040
|
-
|
|
3041
|
+
function Ks() {
|
|
3042
|
+
Os = !1;
|
|
3041
3043
|
}
|
|
3042
|
-
function
|
|
3043
|
-
var r = V(
|
|
3044
|
+
function qs(e, t, n) {
|
|
3045
|
+
var r = V(Io(n.el, 0, n.options, !0)), i = Yo(n.el, n.options, q), a = 10;
|
|
3044
3046
|
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;
|
|
3045
3047
|
}
|
|
3046
|
-
function
|
|
3047
|
-
var r = V(
|
|
3048
|
+
function Js(e, t, n) {
|
|
3049
|
+
var r = V(Lo(n.el, n.options.draggable)), i = Yo(n.el, n.options, q), a = 10;
|
|
3048
3050
|
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;
|
|
3049
3051
|
}
|
|
3050
|
-
function
|
|
3052
|
+
function Ys(e, t, n, r, i, a, o, s) {
|
|
3051
3053
|
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;
|
|
3052
3054
|
if (!o) {
|
|
3053
|
-
if (s &&
|
|
3054
|
-
if (!
|
|
3055
|
-
else if (
|
|
3056
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3055
|
+
if (s && Es < l * i) {
|
|
3056
|
+
if (!ws && (Cs === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (ws = !0), ws) f = !0;
|
|
3057
|
+
else if (Cs === 1 ? c < u + Es : c > d - Es) return -Cs;
|
|
3058
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Xs(t);
|
|
3057
3059
|
}
|
|
3058
3060
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3059
3061
|
}
|
|
3060
|
-
function
|
|
3061
|
-
return
|
|
3062
|
+
function Xs(e) {
|
|
3063
|
+
return Ro(G) < Ro(e) ? 1 : -1;
|
|
3062
3064
|
}
|
|
3063
|
-
function
|
|
3065
|
+
function Zs(e) {
|
|
3064
3066
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3065
3067
|
return r.toString(36);
|
|
3066
3068
|
}
|
|
3067
|
-
function
|
|
3068
|
-
|
|
3069
|
+
function Qs(e) {
|
|
3070
|
+
ks.length = 0;
|
|
3069
3071
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3070
3072
|
var r = t[n];
|
|
3071
|
-
r.checked &&
|
|
3073
|
+
r.checked && ks.push(r);
|
|
3072
3074
|
}
|
|
3073
3075
|
}
|
|
3074
|
-
function
|
|
3076
|
+
function $s(e) {
|
|
3075
3077
|
return setTimeout(e, 0);
|
|
3076
3078
|
}
|
|
3077
|
-
function
|
|
3079
|
+
function ec(e) {
|
|
3078
3080
|
return clearTimeout(e);
|
|
3079
3081
|
}
|
|
3080
|
-
|
|
3081
|
-
(Q.active ||
|
|
3082
|
+
As && L(document, "touchmove", function(e) {
|
|
3083
|
+
(Q.active || fs) && e.cancelable && e.preventDefault();
|
|
3082
3084
|
}), Q.utils = {
|
|
3083
3085
|
on: L,
|
|
3084
3086
|
off: R,
|
|
3085
3087
|
css: B,
|
|
3086
|
-
find:
|
|
3088
|
+
find: No,
|
|
3087
3089
|
is: function(e, t) {
|
|
3088
|
-
return !!
|
|
3090
|
+
return !!Ao(e, t, e, !1);
|
|
3089
3091
|
},
|
|
3090
|
-
extend:
|
|
3091
|
-
throttle:
|
|
3092
|
-
closest:
|
|
3092
|
+
extend: Ho,
|
|
3093
|
+
throttle: Go,
|
|
3094
|
+
closest: Ao,
|
|
3093
3095
|
toggleClass: z,
|
|
3094
|
-
clone:
|
|
3095
|
-
index:
|
|
3096
|
-
nextTick:
|
|
3097
|
-
cancelNextTick:
|
|
3098
|
-
detectDirection:
|
|
3099
|
-
getChild:
|
|
3096
|
+
clone: Jo,
|
|
3097
|
+
index: Ro,
|
|
3098
|
+
nextTick: $s,
|
|
3099
|
+
cancelNextTick: ec,
|
|
3100
|
+
detectDirection: Fs,
|
|
3101
|
+
getChild: Io
|
|
3100
3102
|
}, Q.get = function(e) {
|
|
3101
3103
|
return e[H];
|
|
3102
3104
|
}, Q.mount = function() {
|
|
3103
3105
|
var e = [...arguments];
|
|
3104
3106
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3105
3107
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3106
|
-
e.utils && (Q.utils =
|
|
3108
|
+
e.utils && (Q.utils = po(po({}, Q.utils), e.utils)), ts.mount(e);
|
|
3107
3109
|
});
|
|
3108
3110
|
}, Q.create = function(e, t) {
|
|
3109
3111
|
return new Q(e, t);
|
|
3110
|
-
}, Q.version =
|
|
3111
|
-
var $ = [],
|
|
3112
|
-
function
|
|
3112
|
+
}, Q.version = yo;
|
|
3113
|
+
var $ = [], tc, nc, rc = !1, ic, ac, oc, sc;
|
|
3114
|
+
function cc() {
|
|
3113
3115
|
function e() {
|
|
3114
3116
|
for (var e in this.defaults = {
|
|
3115
3117
|
scroll: !0,
|
|
@@ -3129,63 +3131,63 @@ function Bs() {
|
|
|
3129
3131
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3130
3132
|
},
|
|
3131
3133
|
drop: function() {
|
|
3132
|
-
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3134
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), uc(), lc(), Ko();
|
|
3133
3135
|
},
|
|
3134
3136
|
nulling: function() {
|
|
3135
|
-
|
|
3137
|
+
oc = nc = tc = rc = sc = ic = ac = null, $.length = 0;
|
|
3136
3138
|
},
|
|
3137
3139
|
_handleFallbackAutoScroll: function(e) {
|
|
3138
3140
|
this._handleAutoScroll(e, !0);
|
|
3139
3141
|
},
|
|
3140
3142
|
_handleAutoScroll: function(e, t) {
|
|
3141
3143
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3142
|
-
if (
|
|
3143
|
-
|
|
3144
|
-
var o =
|
|
3145
|
-
|
|
3146
|
-
var a =
|
|
3147
|
-
a !== o && (o = a,
|
|
3148
|
-
}, 10),
|
|
3144
|
+
if (oc = e, t || this.options.forceAutoScrollFallback || So || xo || wo) {
|
|
3145
|
+
dc(e, this.options, a, t);
|
|
3146
|
+
var o = Vo(a, !0);
|
|
3147
|
+
rc && (!sc || r !== ic || i !== ac) && (sc && uc(), sc = setInterval(function() {
|
|
3148
|
+
var a = Vo(document.elementFromPoint(r, i), !0);
|
|
3149
|
+
a !== o && (o = a, lc()), dc(e, n.options, a, t);
|
|
3150
|
+
}, 10), ic = r, ac = i);
|
|
3149
3151
|
} else {
|
|
3150
|
-
if (!this.options.bubbleScroll ||
|
|
3151
|
-
|
|
3152
|
+
if (!this.options.bubbleScroll || Vo(a, !0) === Po()) {
|
|
3153
|
+
lc();
|
|
3152
3154
|
return;
|
|
3153
3155
|
}
|
|
3154
|
-
|
|
3156
|
+
dc(e, this.options, Vo(a, !1), !1);
|
|
3155
3157
|
}
|
|
3156
3158
|
}
|
|
3157
|
-
},
|
|
3159
|
+
}, go(e, {
|
|
3158
3160
|
pluginName: "scroll",
|
|
3159
3161
|
initializeByDefault: !0
|
|
3160
3162
|
});
|
|
3161
3163
|
}
|
|
3162
|
-
function
|
|
3164
|
+
function lc() {
|
|
3163
3165
|
$.forEach(function(e) {
|
|
3164
3166
|
clearInterval(e.pid);
|
|
3165
3167
|
}), $ = [];
|
|
3166
3168
|
}
|
|
3167
|
-
function
|
|
3168
|
-
clearInterval(
|
|
3169
|
+
function uc() {
|
|
3170
|
+
clearInterval(sc);
|
|
3169
3171
|
}
|
|
3170
|
-
var
|
|
3172
|
+
var dc = Go(function(e, t, n, r) {
|
|
3171
3173
|
if (t.scroll) {
|
|
3172
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3173
|
-
|
|
3174
|
-
var d = 0, f =
|
|
3174
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Po(), l = !1, u;
|
|
3175
|
+
nc !== n && (nc = n, lc(), tc = t.scroll, u = t.scrollFn, tc === !0 && (tc = Vo(n, !0)));
|
|
3176
|
+
var d = 0, f = tc;
|
|
3175
3177
|
do {
|
|
3176
3178
|
var p = f, m = V(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 = B(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3177
3179
|
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"));
|
|
3178
3180
|
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);
|
|
3179
3181
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3180
3182
|
($[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() {
|
|
3181
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3183
|
+
r && this.layer === 0 && Q.active._onTouchMove(oc);
|
|
3182
3184
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3183
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e,
|
|
3185
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e, oc, $[this.layer].el) !== "continue" || qo($[this.layer].el, n, t);
|
|
3184
3186
|
}.bind({ layer: d }), 24))), d++;
|
|
3185
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3186
|
-
|
|
3187
|
+
} while (t.bubbleScroll && f !== c && (f = Vo(f, !1)));
|
|
3188
|
+
rc = l;
|
|
3187
3189
|
}
|
|
3188
|
-
}, 30),
|
|
3190
|
+
}, 30), fc = function(e) {
|
|
3189
3191
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3190
3192
|
if (t) {
|
|
3191
3193
|
var c = n || i;
|
|
@@ -3197,8 +3199,8 @@ var Us = Co(function(e, t, n, r) {
|
|
|
3197
3199
|
}));
|
|
3198
3200
|
}
|
|
3199
3201
|
};
|
|
3200
|
-
function
|
|
3201
|
-
|
|
3202
|
+
function pc() {}
|
|
3203
|
+
pc.prototype = {
|
|
3202
3204
|
startIndex: null,
|
|
3203
3205
|
dragStart: function(e) {
|
|
3204
3206
|
var t = e.oldDraggableIndex;
|
|
@@ -3207,67 +3209,67 @@ Gs.prototype = {
|
|
|
3207
3209
|
onSpill: function(e) {
|
|
3208
3210
|
var t = e.dragEl, n = e.putSortable;
|
|
3209
3211
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3210
|
-
var r =
|
|
3212
|
+
var r = Io(this.sortable.el, this.startIndex, this.options);
|
|
3211
3213
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3212
3214
|
},
|
|
3213
|
-
drop:
|
|
3214
|
-
},
|
|
3215
|
-
function
|
|
3216
|
-
|
|
3215
|
+
drop: fc
|
|
3216
|
+
}, go(pc, { pluginName: "revertOnSpill" });
|
|
3217
|
+
function mc() {}
|
|
3218
|
+
mc.prototype = {
|
|
3217
3219
|
onSpill: function(e) {
|
|
3218
3220
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3219
3221
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3220
3222
|
},
|
|
3221
|
-
drop:
|
|
3222
|
-
},
|
|
3223
|
-
function
|
|
3223
|
+
drop: fc
|
|
3224
|
+
}, go(mc, { pluginName: "removeOnSpill" }), Q.mount(new cc()), Q.mount(mc, pc);
|
|
3225
|
+
function hc(e) {
|
|
3224
3226
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3225
3227
|
}
|
|
3226
|
-
function
|
|
3228
|
+
function gc(e) {
|
|
3227
3229
|
te() && O(e);
|
|
3228
3230
|
}
|
|
3229
|
-
function
|
|
3231
|
+
function _c(e) {
|
|
3230
3232
|
te() ? d(e) : a(e);
|
|
3231
3233
|
}
|
|
3232
|
-
var
|
|
3233
|
-
function
|
|
3234
|
-
|
|
3234
|
+
var vc = null, yc = null;
|
|
3235
|
+
function bc(e = null, t = null) {
|
|
3236
|
+
vc = e, yc = t;
|
|
3235
3237
|
}
|
|
3236
|
-
function
|
|
3238
|
+
function xc() {
|
|
3237
3239
|
return {
|
|
3238
|
-
data:
|
|
3239
|
-
clonedData:
|
|
3240
|
+
data: vc,
|
|
3241
|
+
clonedData: yc
|
|
3240
3242
|
};
|
|
3241
3243
|
}
|
|
3242
|
-
var
|
|
3243
|
-
function
|
|
3244
|
+
var Sc = Symbol("cloneElement");
|
|
3245
|
+
function Cc(...e) {
|
|
3244
3246
|
let t = te()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
3245
3247
|
Array.isArray(y(i)) || (o = i, i = null);
|
|
3246
|
-
let s = null, { immediate: l = !0, clone: u =
|
|
3248
|
+
let s = null, { immediate: l = !0, clone: u = hc, forceFallback: d, fallbackOnBody: p, customUpdate: m } = y(o) ?? {};
|
|
3247
3249
|
function h(e) {
|
|
3248
3250
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3249
3251
|
n = d && !p ? o.slice(0, -1) : o;
|
|
3250
3252
|
let s = y(y(i)?.[r]), c = u(s);
|
|
3251
|
-
|
|
3253
|
+
bc(s, c), a[Sc] = c;
|
|
3252
3254
|
}
|
|
3253
3255
|
function g(e) {
|
|
3254
|
-
let t = e.item[
|
|
3255
|
-
if (!
|
|
3256
|
-
if (
|
|
3256
|
+
let t = e.item[Sc];
|
|
3257
|
+
if (!eo(t)) {
|
|
3258
|
+
if (ro(e.item), c(i)) {
|
|
3257
3259
|
let n = [...y(i)];
|
|
3258
|
-
i.value =
|
|
3260
|
+
i.value = $a(n, e.newDraggableIndex, t);
|
|
3259
3261
|
return;
|
|
3260
3262
|
}
|
|
3261
|
-
|
|
3263
|
+
$a(y(i), e.newDraggableIndex, t);
|
|
3262
3264
|
}
|
|
3263
3265
|
}
|
|
3264
3266
|
function _(e) {
|
|
3265
3267
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3266
|
-
if (
|
|
3268
|
+
if (no(t, n, r), o === "clone") ro(s);
|
|
3267
3269
|
else if (c(i)) {
|
|
3268
3270
|
let e = [...y(i)];
|
|
3269
|
-
i.value =
|
|
3270
|
-
} else
|
|
3271
|
+
i.value = Qa(e, a);
|
|
3272
|
+
} else Qa(y(i), a);
|
|
3271
3273
|
}
|
|
3272
3274
|
function v(e) {
|
|
3273
3275
|
if (m) {
|
|
@@ -3275,10 +3277,10 @@ function tc(...e) {
|
|
|
3275
3277
|
return;
|
|
3276
3278
|
}
|
|
3277
3279
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3278
|
-
if (
|
|
3280
|
+
if (ro(n), no(t, n, r), c(i)) {
|
|
3279
3281
|
let e = [...y(i)];
|
|
3280
|
-
i.value =
|
|
3281
|
-
} else
|
|
3282
|
+
i.value = Ya(e, a, o);
|
|
3283
|
+
} else Ya(y(i), a, o);
|
|
3282
3284
|
}
|
|
3283
3285
|
function b(e) {
|
|
3284
3286
|
let { newIndex: t, oldIndex: r, from: i, to: o } = e, s = null, c = t === r && i === o;
|
|
@@ -3297,7 +3299,7 @@ function tc(...e) {
|
|
|
3297
3299
|
n = null;
|
|
3298
3300
|
}
|
|
3299
3301
|
a(() => {
|
|
3300
|
-
if (
|
|
3302
|
+
if (bc(), s) throw s;
|
|
3301
3303
|
});
|
|
3302
3304
|
}
|
|
3303
3305
|
let x = {
|
|
@@ -3309,19 +3311,19 @@ function tc(...e) {
|
|
|
3309
3311
|
};
|
|
3310
3312
|
function S(e) {
|
|
3311
3313
|
let n = y(r);
|
|
3312
|
-
return e ||=
|
|
3314
|
+
return e ||= to(n) ? io(n, t?.$el) : n, e && !so(e) && (e = e.$el), e || Ja("Root element not found"), e;
|
|
3313
3315
|
}
|
|
3314
3316
|
function C() {
|
|
3315
|
-
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3316
|
-
return
|
|
3317
|
-
|
|
3318
|
-
}),
|
|
3317
|
+
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r = Ga(e, ["immediate", "clone"]);
|
|
3318
|
+
return co(r, (e, t) => {
|
|
3319
|
+
lo(e) && (r[e] = (e, ...n) => (uo(e, xc()), t(e, ...n)));
|
|
3320
|
+
}), oo(i === null ? {} : x, r);
|
|
3319
3321
|
}
|
|
3320
3322
|
let w = (e) => {
|
|
3321
3323
|
e = S(e), s && T.destroy(), s = new Q(e, C());
|
|
3322
3324
|
};
|
|
3323
3325
|
f(() => o, () => {
|
|
3324
|
-
s &&
|
|
3326
|
+
s && co(C(), (e, t) => {
|
|
3325
3327
|
s?.option(e, t);
|
|
3326
3328
|
});
|
|
3327
3329
|
}, { deep: !0 });
|
|
@@ -3334,15 +3336,15 @@ function tc(...e) {
|
|
|
3334
3336
|
toArray: () => s?.toArray(),
|
|
3335
3337
|
closest: (...e) => s?.closest(...e)
|
|
3336
3338
|
};
|
|
3337
|
-
return
|
|
3339
|
+
return _c(() => {
|
|
3338
3340
|
l && w();
|
|
3339
|
-
}),
|
|
3341
|
+
}), gc(T.destroy), Wa({
|
|
3340
3342
|
start: w,
|
|
3341
3343
|
pause: () => T?.option("disabled", !0),
|
|
3342
3344
|
resume: () => T?.option("disabled", !1)
|
|
3343
3345
|
}, T);
|
|
3344
3346
|
}
|
|
3345
|
-
var
|
|
3347
|
+
var wc = [
|
|
3346
3348
|
"update",
|
|
3347
3349
|
"start",
|
|
3348
3350
|
"add",
|
|
@@ -3355,7 +3357,7 @@ var nc = [
|
|
|
3355
3357
|
"clone",
|
|
3356
3358
|
"move",
|
|
3357
3359
|
"change"
|
|
3358
|
-
],
|
|
3360
|
+
], Tc = [
|
|
3359
3361
|
"clone",
|
|
3360
3362
|
"animation",
|
|
3361
3363
|
"ghostClass",
|
|
@@ -3399,43 +3401,47 @@ var nc = [
|
|
|
3399
3401
|
"tag",
|
|
3400
3402
|
"target",
|
|
3401
3403
|
"customUpdate",
|
|
3402
|
-
...
|
|
3403
|
-
],
|
|
3404
|
+
...wc.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3405
|
+
], Ec = F({
|
|
3404
3406
|
name: "VueDraggable",
|
|
3405
3407
|
model: {
|
|
3406
3408
|
prop: "modelValue",
|
|
3407
3409
|
event: "update:modelValue"
|
|
3408
3410
|
},
|
|
3409
|
-
props:
|
|
3410
|
-
emits: ["update:modelValue", ...
|
|
3411
|
+
props: Tc,
|
|
3412
|
+
emits: ["update:modelValue", ...wc],
|
|
3411
3413
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3412
|
-
let a =
|
|
3414
|
+
let a = wc.reduce((e, t) => {
|
|
3413
3415
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3414
3416
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3415
3417
|
}, {}), o = N(() => {
|
|
3416
|
-
let t = j(e), { modelValue: n } = t, r =
|
|
3418
|
+
let t = j(e), { modelValue: n } = t, r = Ga(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3417
3419
|
let r = y(n);
|
|
3418
3420
|
return r !== void 0 && (e[t] = r), e;
|
|
3419
3421
|
}, {});
|
|
3420
|
-
return
|
|
3422
|
+
return Wa(Wa({}, a), Za(Wa(Wa({}, i), o)));
|
|
3421
3423
|
}), s = N({
|
|
3422
3424
|
get: () => e.modelValue,
|
|
3423
3425
|
set: (e) => n("update:modelValue", e)
|
|
3424
|
-
}), c = _(), l = g(
|
|
3426
|
+
}), c = _(), l = g(Cc(e.target || c, s, o));
|
|
3425
3427
|
return r(l), () => b(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3426
3428
|
}
|
|
3427
|
-
}),
|
|
3429
|
+
}), Dc = {
|
|
3428
3430
|
mounted: "mounted",
|
|
3429
3431
|
unmounted: "unmounted"
|
|
3430
3432
|
};
|
|
3431
|
-
|
|
3433
|
+
Dc.mounted, Dc.unmounted;
|
|
3432
3434
|
//#endregion
|
|
3433
3435
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3434
|
-
var
|
|
3436
|
+
var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
3437
|
+
key: 0,
|
|
3438
|
+
"data-testid": "hero-image-hint",
|
|
3439
|
+
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3440
|
+
}, Ac = {
|
|
3435
3441
|
key: 0,
|
|
3436
3442
|
"data-testid": "section-drop-hint",
|
|
3437
3443
|
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)]"
|
|
3438
|
-
},
|
|
3444
|
+
}, jc = /* @__PURE__ */ F({
|
|
3439
3445
|
__name: "SectionBlock",
|
|
3440
3446
|
props: {
|
|
3441
3447
|
block: {},
|
|
@@ -3443,13 +3449,13 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3443
3449
|
},
|
|
3444
3450
|
setup(e) {
|
|
3445
3451
|
let i = {
|
|
3446
|
-
title:
|
|
3447
|
-
paragraph:
|
|
3448
|
-
image:
|
|
3449
|
-
button:
|
|
3450
|
-
divider:
|
|
3451
|
-
custom:
|
|
3452
|
-
}, a = e, { t: s } =
|
|
3452
|
+
title: ja,
|
|
3453
|
+
paragraph: ga,
|
|
3454
|
+
image: ra,
|
|
3455
|
+
button: ni,
|
|
3456
|
+
divider: zi,
|
|
3457
|
+
custom: Li
|
|
3458
|
+
}, a = e, { t: s } = On(), c = Nt(dn, "SectionBlock"), u = p(un, null), d = p(Sn, null), f = p(hn, {}), h = p(xn, null);
|
|
3453
3459
|
function g(e) {
|
|
3454
3460
|
let t = f.savedBlocks;
|
|
3455
3461
|
t?.isPicking.value ? t.togglePick(a.block.id) : c.selectBlock(e);
|
|
@@ -3484,36 +3490,41 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3484
3490
|
function ee(e) {
|
|
3485
3491
|
return c.state.previewMode ? !1 : O(e) ? !0 : j.value === e && T(e).filter((e) => E(e.id)).length <= 1;
|
|
3486
3492
|
}
|
|
3487
|
-
|
|
3493
|
+
let F = N(() => {
|
|
3494
|
+
if (c.state.previewMode) return !1;
|
|
3495
|
+
let e = Ke(a.block);
|
|
3496
|
+
return e !== null && !e.applied && e.reason === "image";
|
|
3497
|
+
});
|
|
3498
|
+
function te(e) {
|
|
3488
3499
|
return T(e).length === 0 && !c.state.previewMode;
|
|
3489
3500
|
}
|
|
3490
|
-
function
|
|
3501
|
+
function I(e) {
|
|
3491
3502
|
return T(e).length === 0 && c.state.previewMode;
|
|
3492
3503
|
}
|
|
3493
|
-
function
|
|
3504
|
+
function re(e, t) {
|
|
3494
3505
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
|
|
3495
3506
|
for (; r.length <= e;) r.push([]);
|
|
3496
3507
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
3497
3508
|
}
|
|
3498
|
-
function
|
|
3499
|
-
return
|
|
3509
|
+
function ie(e) {
|
|
3510
|
+
return Br(e, d, i);
|
|
3500
3511
|
}
|
|
3501
|
-
function
|
|
3512
|
+
function ae(e, t) {
|
|
3502
3513
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
3503
3514
|
fieldValues: t.fieldValues,
|
|
3504
3515
|
dataSourceFetched: t.dataSourceFetched
|
|
3505
3516
|
});
|
|
3506
3517
|
}
|
|
3507
|
-
return (i, a) => (t(), S("div",
|
|
3518
|
+
return (i, a) => (t(), S("div", Oc, [F.value ? (t(), S("div", kc, [x("span", null, D(y(s).section.heroAddImage), 1)])) : P("", !0), 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
3519
|
key: u,
|
|
3509
|
-
class: k(["tpl:relative tpl:flex tpl:flex-col tpl:rounded",
|
|
3520
|
+
class: k(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", te(u) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3510
3521
|
style: n({ width: w.value ? "100%" : v.value[u] })
|
|
3511
|
-
}, [C(y(
|
|
3522
|
+
}, [C(y(Ec), {
|
|
3512
3523
|
"model-value": T(u),
|
|
3513
3524
|
group: {
|
|
3514
3525
|
name: "blocks",
|
|
3515
3526
|
pull: !0,
|
|
3516
|
-
put: (e, t, n) => y(
|
|
3527
|
+
put: (e, t, n) => y(Ra)(n)
|
|
3517
3528
|
},
|
|
3518
3529
|
animation: 150,
|
|
3519
3530
|
"ghost-class": "tpl-ghost",
|
|
@@ -3525,13 +3536,13 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3525
3536
|
"force-fallback": !0,
|
|
3526
3537
|
class: k(["tpl:grow", {
|
|
3527
3538
|
"tpl:min-h-[60px]": ee(u),
|
|
3528
|
-
"tpl:min-h-[34px]":
|
|
3539
|
+
"tpl:min-h-[34px]": I(u)
|
|
3529
3540
|
}]),
|
|
3530
3541
|
onStart: (e) => j.value = u,
|
|
3531
3542
|
onEnd: a[0] ||= (e) => j.value = null,
|
|
3532
|
-
"onUpdate:modelValue": (e) =>
|
|
3543
|
+
"onUpdate:modelValue": (e) => re(u, e)
|
|
3533
3544
|
}, {
|
|
3534
|
-
default: r(() => [(t(!0), S(M, null, l(T(u), (n) => m((t(), S("div", { key: n.id }, [C(
|
|
3545
|
+
default: r(() => [(t(!0), S(M, null, l(T(u), (n) => m((t(), S("div", { key: n.id }, [C(ka, {
|
|
3535
3546
|
block: n,
|
|
3536
3547
|
"is-selected": y(c).state.selectedBlockId === n.id,
|
|
3537
3548
|
viewport: e.viewport,
|
|
@@ -3539,10 +3550,10 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3539
3550
|
nested: "",
|
|
3540
3551
|
onSelect: (e) => g(n.id)
|
|
3541
3552
|
}, {
|
|
3542
|
-
default: r(() => [(t(), A(o(
|
|
3553
|
+
default: r(() => [(t(), A(o(ie(n)), {
|
|
3543
3554
|
block: n,
|
|
3544
3555
|
viewport: e.viewport,
|
|
3545
|
-
onFetchData: (e) =>
|
|
3556
|
+
onFetchData: (e) => ae(n, e),
|
|
3546
3557
|
onUpdate: (e) => y(c).updateBlock(n.id, e)
|
|
3547
3558
|
}, null, 40, [
|
|
3548
3559
|
"block",
|
|
@@ -3565,14 +3576,14 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3565
3576
|
"class",
|
|
3566
3577
|
"onStart",
|
|
3567
3578
|
"onUpdate:modelValue"
|
|
3568
|
-
]),
|
|
3579
|
+
]), te(u) ? (t(), S("div", Ac, [x("span", null, D(y(s).section.dropHere), 1)])) : P("", !0)], 6))), 128))], 2)]));
|
|
3569
3580
|
}
|
|
3570
|
-
}),
|
|
3581
|
+
}), Mc = ["width", "height"], Nc = [
|
|
3571
3582
|
"d",
|
|
3572
3583
|
"stroke",
|
|
3573
3584
|
"stroke-opacity",
|
|
3574
3585
|
"stroke-width"
|
|
3575
|
-
],
|
|
3586
|
+
], Pc = ["d", "fill"], Fc = /* @__PURE__ */ F({
|
|
3576
3587
|
__name: "SocialIconSvg",
|
|
3577
3588
|
props: {
|
|
3578
3589
|
platform: {},
|
|
@@ -3581,7 +3592,7 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3581
3592
|
iconSize: {}
|
|
3582
3593
|
},
|
|
3583
3594
|
setup(e) {
|
|
3584
|
-
let r = e, i = N(() =>
|
|
3595
|
+
let r = e, i = N(() => _t[r.platform]), a = N(() => yt[r.iconSize]), o = N(() => Me(r.platform, r.iconTone)), s = N(() => ze(r.iconStyle, r.iconTone)), c = N(() => {
|
|
3585
3596
|
let e = {
|
|
3586
3597
|
display: "inline-flex",
|
|
3587
3598
|
alignItems: "center",
|
|
@@ -3619,7 +3630,7 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3619
3630
|
};
|
|
3620
3631
|
default: return e;
|
|
3621
3632
|
}
|
|
3622
|
-
}), l = N(() =>
|
|
3633
|
+
}), l = N(() => Ue(r.iconStyle)), u = N(() => Math.floor(a.value * l.value));
|
|
3623
3634
|
function d(e) {
|
|
3624
3635
|
let t = `${e.width / 2 * a.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), r = `${e.color}${n}`;
|
|
3625
3636
|
return `0 0 0 ${t} ${r}, inset 0 0 0 ${t} ${r}`;
|
|
@@ -3640,28 +3651,28 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3640
3651
|
"stroke-opacity": s.value.opacity,
|
|
3641
3652
|
"stroke-width": s.value.width / l.value,
|
|
3642
3653
|
"stroke-linejoin": "round"
|
|
3643
|
-
}, null, 8,
|
|
3654
|
+
}, null, 8, Nc)) : P("", !0), x("path", {
|
|
3644
3655
|
d: i.value.path,
|
|
3645
3656
|
fill: f.value
|
|
3646
|
-
}, null, 8,
|
|
3657
|
+
}, null, 8, Pc)], 8, Mc))], 4));
|
|
3647
3658
|
}
|
|
3648
|
-
}),
|
|
3659
|
+
}), Ic = { class: "tpl:w-full" }, Lc = ["href"], Rc = {
|
|
3649
3660
|
key: 1,
|
|
3650
3661
|
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)]"
|
|
3651
|
-
},
|
|
3662
|
+
}, zc = /* @__PURE__ */ F({
|
|
3652
3663
|
__name: "SocialIconsBlock",
|
|
3653
3664
|
props: {
|
|
3654
3665
|
block: {},
|
|
3655
3666
|
viewport: {}
|
|
3656
3667
|
},
|
|
3657
3668
|
setup(e) {
|
|
3658
|
-
let r = e, { t: i } =
|
|
3669
|
+
let r = e, { t: i } = On(), a = N(() => ({
|
|
3659
3670
|
display: "flex",
|
|
3660
3671
|
flexWrap: "wrap",
|
|
3661
3672
|
gap: `${r.block.spacing}px`,
|
|
3662
3673
|
justifyContent: r.block.align === "left" ? "flex-start" : r.block.align === "right" ? "flex-end" : "center"
|
|
3663
3674
|
})), o = N(() => r.block.icons.length > 0);
|
|
3664
|
-
return (r, s) => (t(), S("div",
|
|
3675
|
+
return (r, s) => (t(), S("div", Ic, [o.value ? (t(), S("div", {
|
|
3665
3676
|
key: 0,
|
|
3666
3677
|
style: n(a.value)
|
|
3667
3678
|
}, [(t(!0), S(M, null, l(e.block.icons, (n) => (t(), S("a", {
|
|
@@ -3669,7 +3680,7 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3669
3680
|
href: n.url || "#",
|
|
3670
3681
|
class: "tpl:cursor-default",
|
|
3671
3682
|
onClick: s[0] ||= I(() => {}, ["prevent"])
|
|
3672
|
-
}, [C(
|
|
3683
|
+
}, [C(Fc, {
|
|
3673
3684
|
platform: n.platform,
|
|
3674
3685
|
"icon-style": e.block.iconStyle,
|
|
3675
3686
|
"icon-tone": e.block.iconTone,
|
|
@@ -3679,44 +3690,44 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3679
3690
|
"icon-style",
|
|
3680
3691
|
"icon-tone",
|
|
3681
3692
|
"icon-size"
|
|
3682
|
-
])], 8,
|
|
3693
|
+
])], 8, Lc))), 128))], 4)) : (t(), S("div", Rc, [C(y(dt), { size: 16 }), x("span", null, D(y(i).social.addIcons), 1)]))]));
|
|
3683
3694
|
}
|
|
3684
|
-
}),
|
|
3695
|
+
}), Bc = { class: "tpl:w-full" }, Vc = {
|
|
3685
3696
|
key: 0,
|
|
3686
3697
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3687
3698
|
style: {
|
|
3688
3699
|
"background-color": "var(--tpl-bg-hover)",
|
|
3689
3700
|
color: "var(--tpl-text-dim)"
|
|
3690
3701
|
}
|
|
3691
|
-
},
|
|
3702
|
+
}, Hc = /* @__PURE__ */ F({
|
|
3692
3703
|
__name: "SpacerBlock",
|
|
3693
3704
|
props: {
|
|
3694
3705
|
block: {},
|
|
3695
3706
|
viewport: {}
|
|
3696
3707
|
},
|
|
3697
3708
|
setup(e) {
|
|
3698
|
-
let r = e, i =
|
|
3709
|
+
let r = e, i = Nt(dn, "SpacerBlock"), a = N(() => ({
|
|
3699
3710
|
height: `${r.block.height}px`,
|
|
3700
3711
|
minHeight: `${r.block.height}px`,
|
|
3701
3712
|
...i.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3702
3713
|
}));
|
|
3703
|
-
return (r, o) => (t(), S("div",
|
|
3714
|
+
return (r, o) => (t(), S("div", Bc, [x("div", {
|
|
3704
3715
|
style: n(a.value),
|
|
3705
|
-
class: k(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !y(i).state.previewMode }])
|
|
3706
|
-
}, [y(i).state.previewMode ? P("", !0) : (t(), S("span",
|
|
3716
|
+
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 }])
|
|
3717
|
+
}, [y(i).state.previewMode ? P("", !0) : (t(), S("span", Vc, D(e.block.height) + "px ", 1))], 6)]));
|
|
3707
3718
|
}
|
|
3708
|
-
}),
|
|
3719
|
+
}), Uc = { class: "tpl:w-full" }, Wc = { key: 0 }, Gc = [
|
|
3709
3720
|
"aria-label",
|
|
3710
3721
|
"data-placeholder",
|
|
3711
3722
|
"onBlur"
|
|
3712
|
-
],
|
|
3723
|
+
], Kc = [
|
|
3713
3724
|
"aria-label",
|
|
3714
3725
|
"data-placeholder",
|
|
3715
3726
|
"onBlur"
|
|
3716
|
-
],
|
|
3727
|
+
], qc = {
|
|
3717
3728
|
key: 1,
|
|
3718
3729
|
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)]"
|
|
3719
|
-
},
|
|
3730
|
+
}, Jc = /*#__PURE__*/ Hn(/* @__PURE__ */ F({
|
|
3720
3731
|
__name: "TableBlock",
|
|
3721
3732
|
props: {
|
|
3722
3733
|
block: {},
|
|
@@ -3730,28 +3741,28 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3730
3741
|
updated(e, t) {
|
|
3731
3742
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3732
3743
|
}
|
|
3733
|
-
}, i = e, { t: a } =
|
|
3744
|
+
}, i = e, { t: a } = On(), o = Nt(dn, "TableBlock"), s = Nt(Cn, "TableBlock"), c = N(() => i.block.rows.length > 0), u = N(() => {
|
|
3734
3745
|
let e = {
|
|
3735
3746
|
width: "100%",
|
|
3736
3747
|
borderCollapse: "collapse",
|
|
3737
3748
|
fontSize: `${i.block.fontSize}px`,
|
|
3738
3749
|
textAlign: i.block.textAlign,
|
|
3739
|
-
fontFamily: i.block.fontFamily
|
|
3750
|
+
fontFamily: i.block.fontFamily ? s.resolveFontFamily(i.block.fontFamily) : "inherit"
|
|
3740
3751
|
};
|
|
3741
3752
|
return i.block.color && (e.color = i.block.color), e;
|
|
3742
|
-
}),
|
|
3753
|
+
}), d = N(() => ({
|
|
3743
3754
|
border: `${i.block.borderWidth}px solid ${i.block.borderColor}`,
|
|
3744
3755
|
padding: `${i.block.cellPadding}px`,
|
|
3745
3756
|
textAlign: i.block.textAlign
|
|
3746
|
-
})),
|
|
3747
|
-
...
|
|
3757
|
+
})), f = N(() => ({
|
|
3758
|
+
...d.value,
|
|
3748
3759
|
fontWeight: "bold",
|
|
3749
3760
|
backgroundColor: i.block.headerBackgroundColor || "transparent"
|
|
3750
|
-
})),
|
|
3751
|
-
function
|
|
3761
|
+
})), 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);
|
|
3762
|
+
function g() {
|
|
3752
3763
|
o.selectBlock(i.block.id);
|
|
3753
3764
|
}
|
|
3754
|
-
function
|
|
3765
|
+
function _(e, t, n) {
|
|
3755
3766
|
let r = n.target.innerText.trim(), a = i.block.rows.map((n) => n.id === e ? {
|
|
3756
3767
|
...n,
|
|
3757
3768
|
cells: n.cells.map((e) => e.id === t ? {
|
|
@@ -3761,31 +3772,31 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3761
3772
|
} : n);
|
|
3762
3773
|
o.updateBlock(i.block.id, { rows: a });
|
|
3763
3774
|
}
|
|
3764
|
-
return (e, i) => (t(), S("div",
|
|
3775
|
+
return (e, i) => (t(), S("div", Uc, [c.value ? (t(), S("table", {
|
|
3765
3776
|
key: 0,
|
|
3766
|
-
style: n(
|
|
3777
|
+
style: n(u.value),
|
|
3767
3778
|
class: "tpl-table-editable"
|
|
3768
|
-
}, [
|
|
3779
|
+
}, [p.value ? (t(), S("thead", Wc, [x("tr", null, [(t(!0), S(M, null, l(p.value.cells, (e) => m((t(), S("th", {
|
|
3769
3780
|
key: e.id,
|
|
3770
|
-
style: n(
|
|
3781
|
+
style: n(f.value),
|
|
3771
3782
|
"aria-label": y(a).table.cellPlaceholder,
|
|
3772
3783
|
contenteditable: "true",
|
|
3773
3784
|
"data-placeholder": y(a).table.cellPlaceholder,
|
|
3774
|
-
onBlur: (t) =>
|
|
3785
|
+
onBlur: (t) => _(p.value.id, e.id, t),
|
|
3775
3786
|
onKeydown: i[0] ||= re(I((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3776
|
-
onClick: I(
|
|
3777
|
-
}, null, 44,
|
|
3787
|
+
onClick: I(g, ["stop"])
|
|
3788
|
+
}, null, 44, Gc)), [[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", {
|
|
3778
3789
|
key: o.id,
|
|
3779
|
-
style: n(
|
|
3790
|
+
style: n(d.value),
|
|
3780
3791
|
"aria-label": y(a).table.cellPlaceholder,
|
|
3781
3792
|
contenteditable: "true",
|
|
3782
3793
|
"data-placeholder": y(a).table.cellPlaceholder,
|
|
3783
|
-
onBlur: (t) =>
|
|
3794
|
+
onBlur: (t) => _(e.id, o.id, t),
|
|
3784
3795
|
onKeydown: i[1] ||= re(I((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3785
|
-
onClick: I(
|
|
3786
|
-
}, null, 44,
|
|
3796
|
+
onClick: I(g, ["stop"])
|
|
3797
|
+
}, null, 44, Kc)), [[r, o.content]])), 128))]))), 128))])], 4)) : (t(), S("div", qc, [C(y(mt), { size: 16 }), x("span", null, D(y(a).table.empty), 1)]))]));
|
|
3787
3798
|
}
|
|
3788
|
-
}), [["__scopeId", "data-v-
|
|
3799
|
+
}), [["__scopeId", "data-v-6751d456"]]), Yc = /* @__PURE__ */ F({
|
|
3789
3800
|
__name: "VideoPlayButton",
|
|
3790
3801
|
props: { hoverEffect: {
|
|
3791
3802
|
type: Boolean,
|
|
@@ -3803,7 +3814,7 @@ var oc = { class: "tpl:w-full" }, sc = {
|
|
|
3803
3814
|
});
|
|
3804
3815
|
//#endregion
|
|
3805
3816
|
//#region src/utils/videoThumbnail.ts
|
|
3806
|
-
function
|
|
3817
|
+
function Xc(e) {
|
|
3807
3818
|
if (!e) return {
|
|
3808
3819
|
platform: "unknown",
|
|
3809
3820
|
videoId: null,
|
|
@@ -3835,25 +3846,25 @@ function Dc(e) {
|
|
|
3835
3846
|
thumbnailUrl: null
|
|
3836
3847
|
};
|
|
3837
3848
|
}
|
|
3838
|
-
function
|
|
3839
|
-
return t ||
|
|
3849
|
+
function Zc(e, t) {
|
|
3850
|
+
return t || Xc(e).thumbnailUrl;
|
|
3840
3851
|
}
|
|
3841
3852
|
//#endregion
|
|
3842
3853
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3843
|
-
var
|
|
3854
|
+
var Qc = ["src", "alt"], $c = {
|
|
3844
3855
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3845
3856
|
style: { opacity: "0.7" }
|
|
3846
|
-
},
|
|
3857
|
+
}, el = ["href"], tl = ["src", "alt"], nl = ["src", "alt"], rl = {
|
|
3847
3858
|
key: 3,
|
|
3848
|
-
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)]"
|
|
3849
|
-
},
|
|
3859
|
+
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)]"
|
|
3860
|
+
}, il = /* @__PURE__ */ F({
|
|
3850
3861
|
__name: "VideoBlock",
|
|
3851
3862
|
props: {
|
|
3852
3863
|
block: {},
|
|
3853
3864
|
viewport: {}
|
|
3854
3865
|
},
|
|
3855
3866
|
setup(e) {
|
|
3856
|
-
let r = e, { t: i } =
|
|
3867
|
+
let r = e, { t: i } = On(), { syntax: a } = Wn(), o = N(() => Ce(r.block.url, a) || Ce(r.block.thumbnailUrl, a)), s = lt(() => o.value ? void 0 : r.block.thumbnailUrl || void 0), c = lt(() => 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(() => {
|
|
3857
3868
|
let e = r.block.align;
|
|
3858
3869
|
return {
|
|
3859
3870
|
maxWidth: "100%",
|
|
@@ -3863,7 +3874,7 @@ var kc = ["src", "alt"], Ac = {
|
|
|
3863
3874
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3864
3875
|
marginRight: e === "center" ? "auto" : void 0
|
|
3865
3876
|
};
|
|
3866
|
-
}), f = N(() => ({ height: r.block.height ? `${r.block.height}px` : void 0 })), p = N(() =>
|
|
3877
|
+
}), 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);
|
|
3867
3878
|
return (r, a) => (t(), S("div", {
|
|
3868
3879
|
class: "tpl:w-full",
|
|
3869
3880
|
style: n(u.value)
|
|
@@ -3872,20 +3883,20 @@ var kc = ["src", "alt"], Ac = {
|
|
|
3872
3883
|
class: "tpl:relative tpl:inline-block",
|
|
3873
3884
|
style: n(d.value)
|
|
3874
3885
|
}, [x("img", {
|
|
3875
|
-
class: "tpl:w-full tpl:border-0",
|
|
3886
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3876
3887
|
src: y(c),
|
|
3877
3888
|
alt: e.block.alt,
|
|
3878
3889
|
style: n(f.value)
|
|
3879
|
-
}, null, 12,
|
|
3890
|
+
}, null, 12, Qc), C(Yc)], 4)) : o.value ? (t(), S("div", {
|
|
3880
3891
|
key: 1,
|
|
3881
|
-
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)]",
|
|
3892
|
+
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)]",
|
|
3882
3893
|
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
3883
|
-
}, [C(y(
|
|
3894
|
+
}, [C(y(li), {
|
|
3884
3895
|
size: 36,
|
|
3885
3896
|
"stroke-width": 1.5,
|
|
3886
3897
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3887
3898
|
style: { opacity: "0.5" }
|
|
3888
|
-
}), x("span",
|
|
3899
|
+
}), x("span", $c, [C(ei, { text: p.value }, null, 8, ["text"])])], 4)) : l.value ? (t(), S(M, { key: 2 }, [e.block.url ? (t(), S("a", {
|
|
3889
3900
|
key: 0,
|
|
3890
3901
|
href: e.block.url,
|
|
3891
3902
|
target: "_blank",
|
|
@@ -3894,67 +3905,67 @@ var kc = ["src", "alt"], Ac = {
|
|
|
3894
3905
|
style: n(d.value),
|
|
3895
3906
|
onClick: a[0] ||= I(() => {}, ["prevent"])
|
|
3896
3907
|
}, [x("img", {
|
|
3897
|
-
class: "tpl:w-full tpl:border-0",
|
|
3908
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3898
3909
|
src: l.value,
|
|
3899
3910
|
alt: e.block.alt,
|
|
3900
3911
|
style: n(f.value)
|
|
3901
|
-
}, null, 12,
|
|
3912
|
+
}, null, 12, tl), C(Yc, { "hover-effect": "" })], 12, el)) : (t(), S("div", {
|
|
3902
3913
|
key: 1,
|
|
3903
3914
|
class: "tpl:relative tpl:inline-block",
|
|
3904
3915
|
style: n(d.value)
|
|
3905
3916
|
}, [x("img", {
|
|
3906
|
-
class: "tpl:w-full tpl:border-0",
|
|
3917
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3907
3918
|
src: l.value,
|
|
3908
3919
|
alt: e.block.alt,
|
|
3909
3920
|
style: n(f.value)
|
|
3910
|
-
}, null, 12,
|
|
3921
|
+
}, null, 12, nl), C(Yc)], 4))], 64)) : (t(), S("div", rl, [C(y(li), {
|
|
3911
3922
|
size: 40,
|
|
3912
3923
|
"stroke-width": 1.5,
|
|
3913
3924
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3914
3925
|
}), x("span", null, D(y(i).video.addVideo), 1)]))], 4));
|
|
3915
3926
|
}
|
|
3916
|
-
}),
|
|
3917
|
-
section:
|
|
3918
|
-
title:
|
|
3919
|
-
paragraph:
|
|
3920
|
-
image:
|
|
3921
|
-
button:
|
|
3922
|
-
divider:
|
|
3923
|
-
video:
|
|
3924
|
-
social:
|
|
3925
|
-
menu:
|
|
3926
|
-
table:
|
|
3927
|
-
spacer:
|
|
3928
|
-
html:
|
|
3929
|
-
countdown: v(() => import("./CountdownBlock-
|
|
3927
|
+
}), al = {
|
|
3928
|
+
section: jc,
|
|
3929
|
+
title: ja,
|
|
3930
|
+
paragraph: ga,
|
|
3931
|
+
image: ra,
|
|
3932
|
+
button: ni,
|
|
3933
|
+
divider: zi,
|
|
3934
|
+
video: il,
|
|
3935
|
+
social: zc,
|
|
3936
|
+
menu: sa,
|
|
3937
|
+
table: Jc,
|
|
3938
|
+
spacer: Hc,
|
|
3939
|
+
html: Gi,
|
|
3940
|
+
countdown: v(() => import("./CountdownBlock-zx39Dyby.js"))
|
|
3930
3941
|
};
|
|
3931
|
-
function
|
|
3932
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
3942
|
+
function ol(t) {
|
|
3943
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = On(i), l = N(() => le(le(le(hr(i), Fr(n.content.value.settings?.locale)), Ee(n.content.value.settings) === "rtl" ? {
|
|
3933
3944
|
title: { textAlign: "right" },
|
|
3934
3945
|
table: { textAlign: "right" }
|
|
3935
3946
|
} : {}), r.blockDefaults ?? {}));
|
|
3936
3947
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
3937
|
-
let { resolvedTheme: u } =
|
|
3948
|
+
let { resolvedTheme: u } = rr(N(() => n.state.uiTheme)), d = _(r.theme ?? {}), { themeStyles: p } = ar({
|
|
3938
3949
|
themeOverrides: d,
|
|
3939
3950
|
resolvedTheme: u,
|
|
3940
3951
|
extraStyles: () => ({
|
|
3941
3952
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
3942
3953
|
...t.themeExtraStyles?.()
|
|
3943
3954
|
})
|
|
3944
|
-
}), m =
|
|
3955
|
+
}), m = Tt({
|
|
3945
3956
|
content: n.content,
|
|
3946
3957
|
setContent: (e, t) => n.setContent(e, t),
|
|
3947
3958
|
...t.historyOptions
|
|
3948
3959
|
});
|
|
3949
|
-
|
|
3950
|
-
let g =
|
|
3960
|
+
nt(n, m);
|
|
3961
|
+
let g = ct({
|
|
3951
3962
|
addBlock: n.addBlock,
|
|
3952
3963
|
removeBlock: n.removeBlock,
|
|
3953
3964
|
updateBlock: n.updateBlock,
|
|
3954
3965
|
selectBlock: n.selectBlock,
|
|
3955
3966
|
findBlockLocation: n.findBlockLocation,
|
|
3956
3967
|
blockDefaults: () => l.value
|
|
3957
|
-
}), v =
|
|
3968
|
+
}), v = at(n), y = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? st({
|
|
3958
3969
|
content: n.content,
|
|
3959
3970
|
isDirty: () => n.state.isDirty,
|
|
3960
3971
|
...t.autoSaveOptions
|
|
@@ -3962,30 +3973,30 @@ function Lc(t) {
|
|
|
3962
3973
|
y && (b = f(m.isNavigating, (e) => {
|
|
3963
3974
|
e ? y.pause() : y.resume();
|
|
3964
3975
|
}));
|
|
3965
|
-
let x =
|
|
3976
|
+
let x = nr(n, {
|
|
3966
3977
|
t: o,
|
|
3967
3978
|
format: c
|
|
3968
|
-
}, r.customBlocks ?? []), S =
|
|
3969
|
-
if (S.allowCustomIgnored &&
|
|
3970
|
-
let e =
|
|
3971
|
-
e.length > 0 &&
|
|
3972
|
-
}
|
|
3973
|
-
let C =
|
|
3974
|
-
for (let e of C.unknown)
|
|
3975
|
-
let w =
|
|
3976
|
-
|
|
3979
|
+
}, r.customBlocks ?? []), S = Mn(r.colors);
|
|
3980
|
+
if (S.allowCustomIgnored && kn.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 && kn.warn(`config.colors.presets skipped invalid entries: ${S.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), S.allowCustom === !1) {
|
|
3981
|
+
let e = mr(S.presets, r.blockDefaults, r.templateDefaults);
|
|
3982
|
+
e.length > 0 && kn.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.`);
|
|
3983
|
+
}
|
|
3984
|
+
let C = Pn(r.templateSettings);
|
|
3985
|
+
for (let e of C.unknown) kn.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Fn.join(", ")}) — skipping it.`);
|
|
3986
|
+
let w = or();
|
|
3987
|
+
dr(w, al);
|
|
3977
3988
|
let T = /* @__PURE__ */ new Set();
|
|
3978
3989
|
function D(e) {
|
|
3979
3990
|
for (let t of e) {
|
|
3980
|
-
w.registerCustom(t,
|
|
3981
|
-
for (let e of
|
|
3991
|
+
w.registerCustom(t, Li);
|
|
3992
|
+
for (let e of Ir(t, S)) T.has(e.id) || (T.add(e.id), kn.warn(e.message));
|
|
3982
3993
|
}
|
|
3983
3994
|
}
|
|
3984
3995
|
r.customBlocks?.length && D(r.customBlocks);
|
|
3985
|
-
let O =
|
|
3996
|
+
let O = Yn();
|
|
3986
3997
|
if (h() && s(O.dispose), t.containerEl) {
|
|
3987
3998
|
let e = t.containerEl;
|
|
3988
|
-
|
|
3999
|
+
At(document, "pointerdown", (t) => {
|
|
3989
4000
|
let n = e.value;
|
|
3990
4001
|
n && (t.composedPath?.() ?? []).includes(n) && O.claim();
|
|
3991
4002
|
}, { capture: !0 });
|
|
@@ -3995,7 +4006,7 @@ function Lc(t) {
|
|
|
3995
4006
|
e ? e.save() : y?.flush();
|
|
3996
4007
|
}
|
|
3997
4008
|
function A(e) {
|
|
3998
|
-
O.isActive() &&
|
|
4009
|
+
O.isActive() && Rr(e, {
|
|
3999
4010
|
history: m,
|
|
4000
4011
|
selectBlock: (e) => n.selectBlock(e),
|
|
4001
4012
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4007,37 +4018,37 @@ function Lc(t) {
|
|
|
4007
4018
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4008
4019
|
});
|
|
4009
4020
|
}
|
|
4010
|
-
|
|
4021
|
+
At(document, "keydown", A);
|
|
4011
4022
|
let j = _(null), M = t.editorRoot ?? document;
|
|
4012
|
-
E(
|
|
4013
|
-
let ee =
|
|
4023
|
+
E(an, M), E(Ft, j), E(nn, i), E(dn, n), E(En, m), E(on, g), E(un, v), E(Cn, a), E(Ut, p), E(rn, u), E(vn, l), E(tn, r.locale), E(Sn, w), E(yn, r.customBlocks ?? []), E(Dn, r.paletteBlocks), E(sn, fr(r.htmlBlockPreview)), E(It, r.layout), E(Bt, r.sectionWrapper), E(ln, S), E(bn, C.fields), E(gn, sr(n.content, w));
|
|
4024
|
+
let ee = Ye(r.mergeTags?.syntax), P = e(r.mergeTags?.tags ?? []);
|
|
4014
4025
|
function F(e) {
|
|
4015
|
-
Array.isArray(e) ? P.value = e :
|
|
4026
|
+
Array.isArray(e) ? P.value = e : kn.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4016
4027
|
}
|
|
4017
|
-
E(
|
|
4018
|
-
let te = _(
|
|
4019
|
-
E(
|
|
4020
|
-
let I =
|
|
4028
|
+
E(Jt, P), E(Yt, ee), E(Zt, r.mergeTags?.onRequest ?? null), E(mn, r.mergeTags?.autocomplete !== !1), E(qt, r.mergeTags?.showRawValue !== !1);
|
|
4029
|
+
let te = _(We(r.mergeTags?.tags ?? []));
|
|
4030
|
+
E(Kt, te);
|
|
4031
|
+
let I = Zn({
|
|
4021
4032
|
resolvePreview: r.resolvePreview,
|
|
4022
4033
|
getContent: () => {
|
|
4023
4034
|
let e = n.content.value;
|
|
4024
|
-
return r.layout && n.state.previewMode ?
|
|
4035
|
+
return r.layout && n.state.previewMode ? He(r.layout, e) : e;
|
|
4025
4036
|
},
|
|
4026
4037
|
isActive: () => n.state.previewMode
|
|
4027
4038
|
});
|
|
4028
|
-
E(
|
|
4039
|
+
E(en, I), E(Vt, r.resolvePreview);
|
|
4029
4040
|
let ne = N(() => !(n.state.previewMode && I.isConfigured));
|
|
4030
|
-
E(
|
|
4031
|
-
let re =
|
|
4032
|
-
E(
|
|
4033
|
-
let ie =
|
|
4041
|
+
E(xn, ne);
|
|
4042
|
+
let re = Qn();
|
|
4043
|
+
E(Pt, re), E(pn, _(!1)), E(Lt, _(!1)), E($t, r.logicTags?.tags ?? []), E(wn, r.logicTags?.pairs ?? []), E(Ht, r.logicTags?.onRequest ?? null), E(Rt, $n()), E(Gt, r.onRequestMedia ?? null), E(cn, r.canDropMedia ?? null), E(Tn, r.resolveImageUrl ? St(r.resolveImageUrl) : null), E(fn, r.displayConditions?.conditions ?? []), E(_n, r.displayConditions?.allowCustom ?? !1), E(hn, t.capabilities ?? {}), E(Qt, x);
|
|
4044
|
+
let ie = er(r.lint) ? null : tr({
|
|
4034
4045
|
content: n.content,
|
|
4035
4046
|
options: r.lint ?? {},
|
|
4036
4047
|
updateBlock: n.updateBlock,
|
|
4037
4048
|
updateSettings: n.updateSettings,
|
|
4038
4049
|
removeBlock: n.removeBlock
|
|
4039
4050
|
});
|
|
4040
|
-
E(
|
|
4051
|
+
E(Wt, ie);
|
|
4041
4052
|
function ae() {
|
|
4042
4053
|
b?.(), ie?.destroy(), y?.destroy(), m.destroy();
|
|
4043
4054
|
}
|
|
@@ -4065,4 +4076,4 @@ function Lc(t) {
|
|
|
4065
4076
|
};
|
|
4066
4077
|
}
|
|
4067
4078
|
//#endregion
|
|
4068
|
-
export {
|
|
4079
|
+
export { Jr as A, Dr as B, mi as C, ri as D, ai as E, Cr as F, Zn as H, jr as I, Ar as L, zr as M, Qr as N, ni as O, Br as P, kr as R, hi as S, si as T, Er as V, Li as _, zc as a, wi as b, Ma as c, ka as d, ga as f, zi as g, Gi as h, Hc as i, Yr as j, Wr as k, Fa as l, ra as m, il as n, jc as o, sa as p, Jc as r, Ec as s, ol as t, ja as u, Oi as v, fi as w, yi as x, Ei as y, Or as z };
|