@templatical/editor 0.29.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +84 -31
- package/dist/{AiChatSidebar-KeS30iRG.js → AiChatSidebar-Bq99wU01.js} +14 -14
- package/dist/{AiFeatureMenu-CCdTgCy7.js → AiFeatureMenu-F-C59LAV.js} +7 -7
- package/dist/{BlockIssueBadge-DQ6jBV1T.js → BlockIssueBadge-Dhk7Hv4m.js} +5 -5
- package/dist/{BlockPreviewCanvas-MgXVXOG_.js → BlockPreviewCanvas-CqU1kwmG.js} +3 -3
- package/dist/{CloudHeaderExtras-L_b51XVJ.js → CloudHeaderExtras-vnGV_mLD.js} +5 -5
- package/dist/{CloudPanels-XUtScYFl.js → CloudPanels-Dv-MD1Tc.js} +7 -7
- package/dist/{CollaboratorBar-Cx5klY7H.js → CollaboratorBar-DmssyJoB.js} +4 -4
- package/dist/{ColorPicker-DjfecH79.js → ColorPicker-CXPSbnRD.js} +7 -7
- package/dist/{CommentsPanel-5QxgkKF-.js → CommentsPanel-DnWdgQHg.js} +2 -2
- package/dist/{CommentsSidebar-CScszOsC.js → CommentsSidebar-ZOqmuo4D.js} +16 -16
- package/dist/{CountdownBlock-Drr1WErd.js → CountdownBlock-BgNK7fZY.js} +3 -3
- package/dist/{CountdownToolbar-CiBrLbq0.js → CountdownToolbar-SwmE7CIk.js} +19 -19
- package/dist/{DesignReferenceSidebar-B1__DJJI.js → DesignReferenceSidebar-9cLTzOqP.js} +11 -11
- package/dist/{NumberWithSuffix-C1D0WFrN.js → FieldRow-0-UbQR4a.js} +24 -17
- package/dist/{IssuesPanel-CkuV9Fjp.js → IssuesPanel-CDk7lUna.js} +8 -8
- package/dist/{LoadingTrack-Db9j_aBr.js → LoadingTrack-5KBr5cE8.js} +1 -1
- package/dist/{MergeTagModeToggle-oX-n91fH.js → MergeTagModeToggle-DtD_Xl9w.js} +6 -6
- package/dist/{MergeTagSuggestion-BUozNVtA.js → MergeTagSuggestion-DPfXtDzP.js} +4 -4
- package/dist/{ParagraphEditor-BVlMj-YW.js → ParagraphEditor-C0NbqDmV.js} +25 -25
- package/dist/{RestoreVersionDialog-CZRLWoqP.js → RestoreVersionDialog-DCX0rJiV.js} +5 -5
- package/dist/{RichTextEditorContent-BN6RBSZG.js → RichTextEditorContent-DZ6GiAUi.js} +8 -8
- package/dist/{SaveBlockDialog-KNQVLcUG.js → SaveBlockDialog-e5LtQRVk.js} +10 -10
- package/dist/{SavedBlocksBrowserModal-D7qatvfw.js → SavedBlocksBrowserModal-ZQIQoARO.js} +11 -11
- package/dist/{SavedBlocksPanels-bizAFdNK.js → SavedBlocksPanels-pGZWjSmp.js} +2 -2
- package/dist/{SavedBlocksPickBar-BXUSoa38.js → SavedBlocksPickBar-OZaOG1Si.js} +4 -4
- package/dist/{TemplateScoringPanel-Dm83xt9R.js → TemplateScoringPanel-CDwlSFEe.js} +15 -15
- package/dist/{TestEmailModal-DAdO9Gmo.js → TestEmailModal-PVa1VL2p.js} +11 -11
- package/dist/{TestEmailPanel-DORs6xk0.js → TestEmailPanel-RekBdAtO.js} +2 -2
- package/dist/{TitleEditor-B_aWxZER.js → TitleEditor-Cs2tELCL.js} +12 -12
- package/dist/{TplModal-7623HR5x.js → TplModal-Bw1i8_eE.js} +5 -5
- package/dist/{VersionHistoryMenu-D7lgozpw.js → VersionHistoryMenu-B6zAcmAC.js} +8 -8
- package/dist/{VersionHistoryPanels-Dor0p1Ur.js → VersionHistoryPanels-TqTC4ofA.js} +2 -2
- package/dist/{VersionPreviewBanner-CQt2il1L.js → VersionPreviewBanner-CQlSzQ2B.js} +3 -3
- package/dist/{blockTypeIcons-Di4AsjQx.js → blockTypeIcons-C7WedEOG.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/{cdn/chunks/ca-DY0AYOLG.js → ca-DZSrLNXK.js} +2 -2
- package/dist/cdn/chunks/{AiChatSidebar-Cwr9eqTh.js → AiChatSidebar-DmZ1Nvxo.js} +11 -11
- package/dist/cdn/chunks/{AiChatSidebar-Cwr9eqTh.js.map → AiChatSidebar-DmZ1Nvxo.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-CT2QiHmi.js → AiFeatureMenu-D4tax9j3.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-CT2QiHmi.js.map → AiFeatureMenu-D4tax9j3.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CXlXn9Sm.js → BlockIssueBadge-Bry71Wjz.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-CXlXn9Sm.js.map → BlockIssueBadge-Bry71Wjz.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-BisO3JEy.js → BlockPreviewCanvas-DDOqFJlT.js} +4 -4
- package/dist/cdn/chunks/{BlockPreviewCanvas-BisO3JEy.js.map → BlockPreviewCanvas-DDOqFJlT.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-MRCYqip8.js → CloudHeaderExtras-g-_SFPna.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-MRCYqip8.js.map → CloudHeaderExtras-g-_SFPna.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-Bb9qSwKJ.js → CloudPanels-Cnh07_2G.js} +7 -7
- package/dist/cdn/chunks/{CloudPanels-Bb9qSwKJ.js.map → CloudPanels-Cnh07_2G.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CG13kDHu.js → CollaboratorBar-CLGB0prG.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-CG13kDHu.js.map → CollaboratorBar-CLGB0prG.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-UpN24AsB.js → ColorPicker-Ww4xHHMI.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-UpN24AsB.js.map → ColorPicker-Ww4xHHMI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CIcIXzOB.js → CommentsPanel-DjId-XH-.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CIcIXzOB.js.map → CommentsPanel-DjId-XH-.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CB5Z8xNz.js → CommentsSidebar-DXXGWSr4.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-CB5Z8xNz.js.map → CommentsSidebar-DXXGWSr4.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-_7TUBqJS.js → CountdownBlock-CWeJBC0L.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-_7TUBqJS.js.map → CountdownBlock-CWeJBC0L.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-B1L0IK1T.js → CountdownToolbar-CO6xLgYc.js} +20 -20
- package/dist/cdn/chunks/{CountdownToolbar-B1L0IK1T.js.map → CountdownToolbar-CO6xLgYc.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BwsfOFsc.js → DesignReferenceSidebar-DRGqm33h.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-BwsfOFsc.js.map → DesignReferenceSidebar-DRGqm33h.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CWvM_I3T.js → FieldRow-CbcpsxZ4.js} +25 -18
- package/dist/cdn/chunks/FieldRow-CbcpsxZ4.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-3nTCyKgK.js → IssuesPanel-iC2hgrXx.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-3nTCyKgK.js.map → IssuesPanel-iC2hgrXx.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-D_wweXVz.js → LoadingTrack-Cz1sT0wP.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-D_wweXVz.js.map → LoadingTrack-Cz1sT0wP.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BUNsRKs6.js → MergeTagModeToggle-DZtnCj0F.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-BUNsRKs6.js.map → MergeTagModeToggle-DZtnCj0F.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-Dt6I8bZi.js → MergeTagSuggestion-VP_nC-8W.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-Dt6I8bZi.js.map → MergeTagSuggestion-VP_nC-8W.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BtzkHfv2.js → ParagraphEditor-BalgLjBt.js} +27 -27
- package/dist/cdn/chunks/{ParagraphEditor-BtzkHfv2.js.map → ParagraphEditor-BalgLjBt.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-DNoo-EBT.js → RestoreVersionDialog-DGOXQ0ou.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-DNoo-EBT.js.map → RestoreVersionDialog-DGOXQ0ou.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BQATmyd9.js → RichTextEditorContent-DpvOKKH-.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-BQATmyd9.js.map → RichTextEditorContent-DpvOKKH-.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-DB37Vmqt.js → SaveBlockDialog-Dod3jX9X.js} +8 -8
- package/dist/cdn/chunks/{SaveBlockDialog-DB37Vmqt.js.map → SaveBlockDialog-Dod3jX9X.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CTU2rGWQ.js → SavedBlocksBrowserModal-BysGB8zb.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CTU2rGWQ.js.map → SavedBlocksBrowserModal-BysGB8zb.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-B9h9wI6d.js → SavedBlocksPanels-DJ4fceEM.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-B9h9wI6d.js.map → SavedBlocksPanels-DJ4fceEM.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CTY5WZum.js → SavedBlocksPickBar-DGgbqAsb.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-CTY5WZum.js.map → SavedBlocksPickBar-DGgbqAsb.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-DZ0cpe_D.js → TemplateScoringPanel-B0YcaJsR.js} +6 -6
- package/dist/cdn/chunks/{TemplateScoringPanel-DZ0cpe_D.js.map → TemplateScoringPanel-B0YcaJsR.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-Dqx1RyDE.js → TestEmailModal-DvZFnhWa.js} +10 -10
- package/dist/cdn/chunks/{TestEmailModal-Dqx1RyDE.js.map → TestEmailModal-DvZFnhWa.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-DrcQhnON.js → TestEmailPanel-BdxpMiWc.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-DrcQhnON.js.map → TestEmailPanel-BdxpMiWc.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CSeDvWVn.js → TitleEditor-CfHWnThg.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-CSeDvWVn.js.map → TitleEditor-CfHWnThg.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BNBLwBxJ.js → TplModal-BMTW5bEN.js} +5 -5
- package/dist/cdn/chunks/{TplModal-BNBLwBxJ.js.map → TplModal-BMTW5bEN.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-cZlb0sMi.js → VersionHistoryMenu-DJGcA_RX.js} +5 -5
- package/dist/cdn/chunks/{VersionHistoryMenu-cZlb0sMi.js.map → VersionHistoryMenu-DJGcA_RX.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DgrjTK3z.js → VersionHistoryPanels-2l_FLtix.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-DgrjTK3z.js.map → VersionHistoryPanels-2l_FLtix.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BNq7PRun.js → VersionPreviewBanner-C8pfES5A.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-BNq7PRun.js.map → VersionPreviewBanner-C8pfES5A.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BNGmmzB_.js → blockTypeIcons-JUwZtKaq.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-BNGmmzB_.js.map → blockTypeIcons-JUwZtKaq.js.map} +1 -1
- package/dist/{ca-DY0AYOLG.js → cdn/chunks/ca-DZSrLNXK.js} +4 -0
- package/dist/cdn/chunks/ca-DZSrLNXK.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CRCcXTc5.js → cloud-CITqEHEc.js} +3 -3
- package/dist/cdn/chunks/{cloud-CRCcXTc5.js.map → cloud-CITqEHEc.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-B_HRgFxU.js → createCloudRuntime-jLhuyKds.js} +8 -8
- package/dist/cdn/chunks/{createCloudRuntime-B_HRgFxU.js.map → createCloudRuntime-jLhuyKds.js.map} +1 -1
- package/dist/{de-CYLWugqb.js → cdn/chunks/de-DbayqpK-.js} +4 -0
- package/dist/cdn/chunks/{de-CYLWugqb.js.map → de-DbayqpK-.js.map} +1 -1
- package/dist/cdn/chunks/{dist-eKG4m5Wx.js → dist-CgR3inPR.js} +3 -3
- package/dist/cdn/chunks/{dist-eKG4m5Wx.js.map → dist-CgR3inPR.js.map} +1 -1
- package/dist/cdn/chunks/{dist-2fOlspdg.js → dist-El3fQnfk.js} +4 -4
- package/dist/cdn/chunks/{dist-2fOlspdg.js.map → dist-El3fQnfk.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-BLMjz0GK.js → draggable-D2vo-aQI.js} +1465 -1435
- package/dist/cdn/chunks/draggable-D2vo-aQI.js.map +1 -0
- package/dist/cdn/chunks/en-CwXyUb6-.js +2 -0
- package/dist/{en-C3TM249M.js → cdn/chunks/en-l0ib5X0f.js} +4 -0
- package/dist/cdn/chunks/en-l0ib5X0f.js.map +1 -0
- package/dist/cdn/chunks/{es-D1SF4nCR.js → es-CMQ-5PJP.js} +3 -1
- package/dist/cdn/chunks/es-CMQ-5PJP.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Deqilwp8.js → extensions-D30V0hzj.js} +7 -7
- package/dist/cdn/chunks/{extensions-Deqilwp8.js.map → extensions-D30V0hzj.js.map} +1 -1
- package/dist/cdn/chunks/{fr-CdLhJ7kw.js → fr-DNXmZWAq.js} +3 -1
- package/dist/cdn/chunks/fr-DNXmZWAq.js.map +1 -0
- package/dist/cdn/chunks/{icons-C2kP4vOJ.js → icons-BTdLXRXn.js} +13 -13
- package/dist/cdn/chunks/icons-BTdLXRXn.js.map +1 -0
- package/dist/cdn/chunks/{keys-D7OpfE2s.js → keys-BJ770Mwm.js} +2 -2
- package/dist/cdn/chunks/{keys-D7OpfE2s.js.map → keys-BJ770Mwm.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-UlAOKBjI.js → liquid.browser-BPvKXNfO.js} +2 -2
- package/dist/cdn/chunks/{liquid.browser-UlAOKBjI.js.map → liquid.browser-BPvKXNfO.js.map} +1 -1
- package/dist/{nl-BvsLoyKp.js → cdn/chunks/nl-BylRRHYJ.js} +4 -0
- package/dist/cdn/chunks/nl-BylRRHYJ.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-CbA3RcAy.js → preRenderCustomBlocks-DyCIgmqJ.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-CbA3RcAy.js.map → preRenderCustomBlocks-DyCIgmqJ.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CAGS5YXp.js → pt-BR-BVoJhpie.js} +3 -1
- package/dist/cdn/chunks/pt-BR-BVoJhpie.js.map +1 -0
- package/dist/cdn/chunks/{src-CgIXdQlX.js → src-65H3RNcb.js} +8 -8
- package/dist/cdn/chunks/{src-CgIXdQlX.js.map → src-65H3RNcb.js.map} +1 -1
- package/dist/cdn/chunks/{src-Cx70q30o.js → src-6J-yyZoD.js} +2 -2
- package/dist/cdn/chunks/{src-Cx70q30o.js.map → src-6J-yyZoD.js.map} +1 -1
- package/dist/cdn/chunks/{src-B_QJduQD.js → src-BD60gqPW.js} +72 -67
- package/dist/cdn/chunks/src-BD60gqPW.js.map +1 -0
- package/dist/cdn/chunks/{src-CnQgwcsc.js → src-CLTXM4PM.js} +166 -136
- package/dist/cdn/chunks/src-CLTXM4PM.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DOw5Yb4H.js → tiptap-Bqy-H6CT.js} +2295 -2205
- package/dist/cdn/chunks/tiptap-Bqy-H6CT.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-C1pwLtPO.js → useAliveFlag-DrXxPV8V.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-C1pwLtPO.js.map → useAliveFlag-DrXxPV8V.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-D4gzxtqF.js → useCloudI18n-D0AoLV0a.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-D4gzxtqF.js.map → useCloudI18n-D0AoLV0a.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-Dq5gdn5i.js → useEditorCore-BQeEwEQ9.js} +356 -361
- package/dist/cdn/chunks/{useEditorCore-Dq5gdn5i.js.map → useEditorCore-BQeEwEQ9.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-BFGRBGts.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-BY-amddA.js.map → useEditorRoot-BFGRBGts.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DYb1SgLB.js → useI18n-DIhawILp.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DYb1SgLB.js.map → useI18n-DIhawILp.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-D-SE_XN8.js → useMergeTag-lWo7So18.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-D-SE_XN8.js.map → useMergeTag-lWo7So18.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-CJZ6EkS4.js → usePopoverPosition-DkiTLnBm.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-CJZ6EkS4.js.map → usePopoverPosition-DkiTLnBm.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-D6gyIzT1.js → useScrollToBlock-KcSAuXKz.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-D6gyIzT1.js.map → useScrollToBlock-KcSAuXKz.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1036 -1002
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Cv96tY88.js → check-CTe6VejT.js} +1 -1
- package/dist/{chevron-down-BwEyjSjd.js → chevron-down-BBThVMu-.js} +1 -1
- package/dist/{chevron-up-C6Ye-Nzc.js → chevron-up-iECwf-Bc.js} +1 -1
- package/dist/{circle-alert-BLt_gkcU.js → circle-alert-Z_eeykrO.js} +1 -1
- package/dist/{clock-D-2BI0Co.js → clock-CEj1c29j.js} +1 -1
- package/dist/{cloud-DXFUA8H_.js → cloud-DwJ8ebNl.js} +2 -2
- package/dist/{createCloudRuntime-CWPQ7puE.js → createCloudRuntime-CdXQdl34.js} +6 -6
- package/dist/{createLucideIcon-DGRWivCX.js → createLucideIcon-DphAT3tw.js} +3 -3
- package/dist/{cdn/chunks/de-CYLWugqb.js → de-DbayqpK-.js} +2 -2
- package/dist/{dist-DQ_4a0hb.js → dist-9fjN9cuD.js} +2 -2
- package/dist/{dist-WE11SQGe.js → dist-BUpBA58N.js} +2 -2
- package/dist/{dist-DAR13YWM.js → dist-BdIwIlKz.js} +2 -2
- package/dist/{dist-Btz6cFCI.js → dist-BfcqryVg.js} +4 -4
- package/dist/{dist-q3Puexqv.js → dist-CaR5TLiM.js} +2 -2
- package/dist/{dist-CkSgS-K9.js → dist-CuuPnIMy.js} +3 -3
- package/dist/dist-CzMzshfS.js +5 -0
- package/dist/{dist-B1kLn1rs.js → dist-CzVIVbSa.js} +90 -85
- package/dist/{dist-BIFUEhwQ.js → dist-D2P8U3p6.js} +2 -2
- package/dist/{dist-BtPhkQ2u.js → dist-DLaIQ5H5.js} +12 -8
- package/dist/{dist-BG2cHdqw.js → dist-DSgmnQ-f.js} +2 -2
- package/dist/dist-DTVuNn8M.js +5 -0
- package/dist/{dist-CHp21juN.js → dist-DifptC-U.js} +2 -2
- package/dist/{dist-BpHkLruF.js → dist-gWM8H2hz.js} +4 -4
- package/dist/{dist-BUh4MT4D.js → dist-nmzPlqlz.js} +266 -176
- package/dist/{cdn/chunks/en-C3TM249M.js → en-l0ib5X0f.js} +2 -2
- package/dist/{es-D1SF4nCR.js → es-CMQ-5PJP.js} +2 -0
- package/dist/{extensions-BlYe3NFn.js → extensions-Bjsdx6Vm.js} +18 -18
- package/dist/{fr-CdLhJ7kw.js → fr-DNXmZWAq.js} +2 -0
- package/dist/{image-up-KRq0lcdU.js → image-up-W1INxCu8.js} +1 -1
- package/dist/{info-DbmE2JAo.js → info-5t4WYKfh.js} +1 -1
- package/dist/{keys-CAor2T5q.js → keys-BJtoezGU.js} +1 -1
- package/dist/{liquid.browser-B-rGrnrQ.js → liquid.browser-CJgDDvQz.js} +1 -1
- package/dist/{loader-circle-dSap9DfQ.js → loader-circle-DJCZ_JMY.js} +1 -1
- package/dist/{message-circle-qSKKLbac.js → message-circle-Biu6lHh_.js} +1 -1
- package/dist/{cdn/chunks/nl-BvsLoyKp.js → nl-BylRRHYJ.js} +2 -2
- package/dist/{pencil-DMP8vL2F.js → pencil-DkPlMca7.js} +1 -1
- package/dist/{preRenderCustomBlocks-BebjKtmw.js → preRenderCustomBlocks-2KyBJocY.js} +1 -1
- package/dist/{pt-BR-CAGS5YXp.js → pt-BR-BVoJhpie.js} +2 -0
- package/dist/{refresh-cw-WXtBeMva.js → refresh-cw-DHbpkkol.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-CHEsXNQz.js → runtime-dom.esm-bundler-Co_SPqAz.js} +180 -166
- package/dist/{scan-line-BTrngVuN.js → scan-line-DojwGzjU.js} +1 -1
- package/dist/{send-CLa8Cxmh.js → send-c6ppcE9I.js} +1 -1
- package/dist/{shield-check-42WZrKQu.js → shield-check-F9T4ylNK.js} +1 -1
- package/dist/{sparkles-DcOb0umz.js → sparkles-D-0OiTZD.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1083 -1049
- package/dist/{text-align-start-zoZhXJ2T.js → text-align-start-kEEtoRrD.js} +1 -1
- package/dist/{trash-2-Capv4cSE.js → trash-2-DRQzhY9R.js} +1 -1
- package/dist/{triangle-alert-CnJUGX-6.js → triangle-alert-Bt4-GU3t.js} +1 -1
- package/dist/{upload-Bc0ZTywl.js → upload-D2wtjvH8.js} +1 -1
- package/dist/{useAliveFlag-1yBub211.js → useAliveFlag-AFbwfHlJ.js} +1 -1
- package/dist/{useCloudI18n-Dwo7usTl.js → useCloudI18n-BA69BpQ_.js} +2 -2
- package/dist/{useEditorCore-CIjO_NM9.js → useEditorCore-Du9Vx-qr.js} +873 -878
- package/dist/{useEditorRoot-CUIzpMYc.js → useEditorRoot-Cdo8Vhxa.js} +2 -2
- package/dist/{useI18n-DT_DKupw.js → useI18n-B135ASaG.js} +2 -2
- package/dist/{useMergeTag-CcHQCcPN.js → useMergeTag-Cx36rtrt.js} +5 -5
- package/dist/{usePopoverPosition-DaHz1kqb.js → usePopoverPosition-DAOHr_iM.js} +2 -2
- package/dist/{useScrollToBlock-C2-9xCr7.js → useScrollToBlock-B0Qpjfa4.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CdH_W9qX.js → vue.runtime.esm-bundler-BhOUdXMi.js} +1244 -1204
- package/dist/{x-CvPZ3OAd.js → x-YiG-TUGN.js} +1 -1
- package/package.json +25 -25
- package/dist/cdn/chunks/NumberWithSuffix-CWvM_I3T.js.map +0 -1
- package/dist/cdn/chunks/ca-DY0AYOLG.js.map +0 -1
- package/dist/cdn/chunks/draggable-BLMjz0GK.js.map +0 -1
- package/dist/cdn/chunks/en-BZlZVGwM.js +0 -2
- package/dist/cdn/chunks/en-C3TM249M.js.map +0 -1
- package/dist/cdn/chunks/es-D1SF4nCR.js.map +0 -1
- package/dist/cdn/chunks/fr-CdLhJ7kw.js.map +0 -1
- package/dist/cdn/chunks/icons-C2kP4vOJ.js.map +0 -1
- package/dist/cdn/chunks/nl-BvsLoyKp.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CAGS5YXp.js.map +0 -1
- package/dist/cdn/chunks/src-B_QJduQD.js.map +0 -1
- package/dist/cdn/chunks/src-CnQgwcsc.js.map +0 -1
- package/dist/cdn/chunks/tiptap-DOw5Yb4H.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BY-amddA.js +0 -10
- package/dist/dist-CCfNhI54.js +0 -5
- package/dist/dist-CMcNDUcw.js +0 -5
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as ee, q as j, r as M, rt as N, s as P, tt as te, u as F, v as I, y as ne, z as re } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { c as L, o as ie, s as ae } from "./runtime-dom.esm-bundler-
|
|
3
|
-
import {
|
|
4
|
-
import { f as
|
|
5
|
-
import { a as
|
|
6
|
-
import { A as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t 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 "./useCloudI18n-
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
1
|
+
import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as ee, q as j, r as M, rt as N, s as P, tt as te, u as F, v as I, y as ne, z as re } from "./vue.runtime.esm-bundler-BhOUdXMi.js";
|
|
2
|
+
import { c as L, o as ie, s as ae } from "./runtime-dom.esm-bundler-Co_SPqAz.js";
|
|
3
|
+
import { B as oe, C as se, D as ce, E as le, F as ue, H as de, I as fe, L as pe, M as me, N as he, O as ge, P as _e, R as ve, S as ye, T as be, V as xe, _ as Se, a as Ce, b as we, d as Te, f as Ee, g as De, h as Oe, i as ke, j as Ae, k as je, l as Me, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, s as Re, t as ze, u as Be, v as Ve, w as He, x as Ue, y as We, z as Ge } from "./dist-CzVIVbSa.js";
|
|
4
|
+
import { f as Ke, g as qe, h as Je, m as Ye } from "./dist-BUpBA58N.js";
|
|
5
|
+
import { a as Xe, i as Ze, n as Qe, r as $e } from "./dist-CuuPnIMy.js";
|
|
6
|
+
import { A as et, B as tt, C as nt, D as rt, E as it, F as at, H as ot, I as st, M as ct, N as lt, O as ut, P as dt, S as ft, T as pt, U as mt, V as ht, W as gt, _ as _t, a as vt, b as yt, c as bt, d as xt, f as St, g as Ct, h as wt, j as Tt, k as Et, m as Dt, n as Ot, o as kt, p as At, r as jt, s as Mt, u as Nt, v as Pt, w as Ft, x as It, y as Lt, z as Rt } from "./keys-BJtoezGU.js";
|
|
7
|
+
import { t as zt } from "./useI18n-B135ASaG.js";
|
|
8
|
+
import { t as Bt } from "./logger-BBlvSn6q.js";
|
|
9
|
+
import { a as Vt, i as Ht, o as Ut, r as Wt, t as Gt } from "./usePopoverPosition-DAOHr_iM.js";
|
|
10
|
+
import { t as Kt } from "./createLucideIcon-DphAT3tw.js";
|
|
11
|
+
import { t as qt } from "./loader-circle-DJCZ_JMY.js";
|
|
12
|
+
import { t as Jt } from "./message-circle-Biu6lHh_.js";
|
|
13
|
+
import { t as Yt } from "./trash-2-DRQzhY9R.js";
|
|
14
|
+
import { t as Xt } from "./triangle-alert-Bt4-GU3t.js";
|
|
15
|
+
import { t as Zt } from "./upload-D2wtjvH8.js";
|
|
16
|
+
import { t as Qt } from "./LoadingTrack-5KBr5cE8.js";
|
|
17
|
+
import { t as $t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
18
|
+
import { t as en } from "./useEditorRoot-Cdo8Vhxa.js";
|
|
19
|
+
import "./useCloudI18n-BA69BpQ_.js";
|
|
20
|
+
import { t as tn } from "./useMergeTag-Cx36rtrt.js";
|
|
21
|
+
import { t as nn } from "./useAliveFlag-AFbwfHlJ.js";
|
|
22
22
|
//#region ../core/dist/index.js
|
|
23
|
-
function
|
|
23
|
+
function rn(e) {
|
|
24
24
|
return e instanceof Error ? e : Error(String(e), { cause: e });
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function an(e, t) {
|
|
27
27
|
try {
|
|
28
28
|
t();
|
|
29
29
|
} catch (t) {
|
|
30
|
-
e?.(
|
|
30
|
+
e?.(rn(t));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function on(e) {
|
|
34
34
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function sn(e) {
|
|
37
37
|
let t = o({
|
|
38
38
|
template: null,
|
|
39
|
-
content: e.content ??
|
|
39
|
+
content: e.content ?? Ne(e.defaultFontFamily, e.templateDefaults),
|
|
40
40
|
selectedBlockId: null,
|
|
41
41
|
viewport: "desktop",
|
|
42
42
|
darkMode: !1,
|
|
@@ -131,7 +131,7 @@ function on(e) {
|
|
|
131
131
|
if (u(n)) return;
|
|
132
132
|
let r = s(t.content.blocks, n);
|
|
133
133
|
if (r && r.type === "section") {
|
|
134
|
-
if (i < 0 || i >=
|
|
134
|
+
if (i < 0 || i >= on(r.columns)) return;
|
|
135
135
|
r.children[i] = r.children[i] || [];
|
|
136
136
|
let t = r.children[i];
|
|
137
137
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -164,7 +164,7 @@ function on(e) {
|
|
|
164
164
|
let d;
|
|
165
165
|
if (i) {
|
|
166
166
|
let e = s(t.content.blocks, i);
|
|
167
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
167
|
+
if (!e || e.type !== "section" || a < 0 || a >= on(e.columns)) return;
|
|
168
168
|
e.children[a] = e.children[a] || [], d = e.children[a];
|
|
169
169
|
} else d = t.content.blocks;
|
|
170
170
|
let [f] = o.blocks.splice(c, 1);
|
|
@@ -174,10 +174,10 @@ function on(e) {
|
|
|
174
174
|
r();
|
|
175
175
|
}
|
|
176
176
|
function E(e, t) {
|
|
177
|
-
throw new
|
|
177
|
+
throw new Re(`[Templatical] Templates: ${e} ${t}`);
|
|
178
178
|
}
|
|
179
179
|
function D(t) {
|
|
180
|
-
|
|
180
|
+
an(e.onError, t);
|
|
181
181
|
}
|
|
182
182
|
function O(t) {
|
|
183
183
|
let { templates: n } = e;
|
|
@@ -275,11 +275,11 @@ function on(e) {
|
|
|
275
275
|
hasTemplate: M
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
278
|
+
var cn = 50, ln = 300, un = 1500;
|
|
279
|
+
function dn(e) {
|
|
280
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = cn } = e, a = _([]), o = _([]), s = _(!1), c = null, l = null, u = g(() => a.value.length > 0), d = g(() => o.value.length > 0);
|
|
281
281
|
function f() {
|
|
282
|
-
return
|
|
282
|
+
return oe(t.value);
|
|
283
283
|
}
|
|
284
284
|
function p(e) {
|
|
285
285
|
a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
|
|
@@ -295,21 +295,21 @@ function un(e) {
|
|
|
295
295
|
if (l && l.blockId === e) {
|
|
296
296
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
297
297
|
l = null;
|
|
298
|
-
},
|
|
298
|
+
}, ln);
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
m(), p(f()), o.value = [], l = {
|
|
302
302
|
blockId: e,
|
|
303
303
|
timeoutId: setTimeout(() => {
|
|
304
304
|
l = null;
|
|
305
|
-
},
|
|
305
|
+
}, ln)
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
function y() {
|
|
310
310
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
311
311
|
s.value = !1, c = null;
|
|
312
|
-
},
|
|
312
|
+
}, un);
|
|
313
313
|
}
|
|
314
314
|
function b() {
|
|
315
315
|
if (a.value.length === 0) return;
|
|
@@ -341,33 +341,33 @@ function un(e) {
|
|
|
341
341
|
destroy: C
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function fn(e) {
|
|
345
345
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
346
346
|
...e,
|
|
347
|
-
id:
|
|
347
|
+
id: le(),
|
|
348
348
|
cells: e.cells.map((e) => ({
|
|
349
349
|
...e,
|
|
350
|
-
id:
|
|
350
|
+
id: le()
|
|
351
351
|
}))
|
|
352
352
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
353
353
|
...e,
|
|
354
|
-
id:
|
|
354
|
+
id: le()
|
|
355
355
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
356
356
|
...e,
|
|
357
|
-
id:
|
|
357
|
+
id: le()
|
|
358
358
|
})));
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function pn(e) {
|
|
361
361
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
362
362
|
function o(n, r, a) {
|
|
363
|
-
let o =
|
|
363
|
+
let o = Be(n, e.blockDefaults);
|
|
364
364
|
return t(o, r, a), i(o.id), o;
|
|
365
365
|
}
|
|
366
366
|
function s(e, n, r) {
|
|
367
367
|
let o = JSON.parse(JSON.stringify(e));
|
|
368
|
-
if (o.id =
|
|
368
|
+
if (o.id = le(), fn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
369
369
|
let t = JSON.parse(JSON.stringify(e));
|
|
370
|
-
return t.id =
|
|
370
|
+
return t.id = le(), fn(t), t;
|
|
371
371
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
372
372
|
else {
|
|
373
373
|
let i = a?.(e.id) ?? null;
|
|
@@ -388,9 +388,9 @@ function fn(e) {
|
|
|
388
388
|
updateBlockProperty: l
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
var
|
|
392
|
-
function
|
|
393
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
391
|
+
var mn = 2e3;
|
|
392
|
+
function hn(e) {
|
|
393
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = mn, enabled: a = !0 } = e, o = null, s = !1;
|
|
394
394
|
function c() {
|
|
395
395
|
return typeof a == "function" ? a() : a;
|
|
396
396
|
}
|
|
@@ -425,7 +425,7 @@ function mn(e) {
|
|
|
425
425
|
destroy: h
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function gn(e) {
|
|
429
429
|
let t = o(/* @__PURE__ */ new Set()), n = g(() => t.size > 0);
|
|
430
430
|
function r(e) {
|
|
431
431
|
return t.has(e);
|
|
@@ -443,7 +443,7 @@ function hn(e) {
|
|
|
443
443
|
hasHiddenBlocks: n
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function _n(e) {
|
|
447
447
|
let t = _(!1), n = _(!1), r = g(() => !!e.definition.value?.dataSource), i = g(() => r.value && !e.block.value.dataSourceFetched);
|
|
448
448
|
async function a() {
|
|
449
449
|
let r = e.definition.value;
|
|
@@ -473,7 +473,7 @@ function gn(e) {
|
|
|
473
473
|
needsFetch: i
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function vn(e, t) {
|
|
477
477
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
478
478
|
e.addBlock = (r, i, a, o) => {
|
|
479
479
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -487,7 +487,7 @@ function _n(e, t) {
|
|
|
487
487
|
t.record(), o(e);
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function yn(e) {
|
|
491
491
|
let { provider: t } = e, n = _([]), r = _(!1), i = P(() => {
|
|
492
492
|
let e = /* @__PURE__ */ new Set();
|
|
493
493
|
for (let t of n.value) {
|
|
@@ -503,10 +503,10 @@ function vn(e) {
|
|
|
503
503
|
return s.value && e.canDelete !== !1;
|
|
504
504
|
}
|
|
505
505
|
function u(e, t) {
|
|
506
|
-
throw new
|
|
506
|
+
throw new Re(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
507
507
|
}
|
|
508
508
|
function d(t) {
|
|
509
|
-
|
|
509
|
+
an(e.onError, t);
|
|
510
510
|
}
|
|
511
511
|
async function f(i) {
|
|
512
512
|
r.value = !0;
|
|
@@ -573,9 +573,9 @@ function vn(e) {
|
|
|
573
573
|
remove: h
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
function
|
|
578
|
-
let t = e.key ??
|
|
576
|
+
var bn = "templatical:saved-blocks";
|
|
577
|
+
function xn(e = {}) {
|
|
578
|
+
let t = e.key ?? bn;
|
|
579
579
|
function n() {
|
|
580
580
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
581
581
|
return localStorage;
|
|
@@ -600,7 +600,7 @@ function bn(e = {}) {
|
|
|
600
600
|
},
|
|
601
601
|
async create(e) {
|
|
602
602
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
603
|
-
id:
|
|
603
|
+
id: le(),
|
|
604
604
|
name: e.name,
|
|
605
605
|
content: e.content,
|
|
606
606
|
...e.category ? { category: e.category } : {},
|
|
@@ -626,18 +626,18 @@ function bn(e = {}) {
|
|
|
626
626
|
}
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function Sn(e) {
|
|
630
630
|
let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c = P(() => typeof t.create == "function"), l = P(() => typeof t.restore == "function");
|
|
631
631
|
function u(e) {
|
|
632
632
|
let t = n();
|
|
633
|
-
if (!t) throw new
|
|
633
|
+
if (!t) throw new Re(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
|
|
634
634
|
return t;
|
|
635
635
|
}
|
|
636
636
|
function d(e) {
|
|
637
|
-
throw new
|
|
637
|
+
throw new Re(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
638
638
|
}
|
|
639
639
|
function f(t) {
|
|
640
|
-
|
|
640
|
+
an(e.onError, t);
|
|
641
641
|
}
|
|
642
642
|
async function p(n) {
|
|
643
643
|
let o = u("list");
|
|
@@ -704,7 +704,7 @@ function xn(e) {
|
|
|
704
704
|
restore: v
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function Cn(e) {
|
|
708
708
|
let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s = P(() => typeof t.create == "function"), c = P(() => typeof t.update == "function"), l = P(() => typeof t.delete == "function"), u = P(() => typeof t.setResolved == "function"), d = P(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), f = P(() => i.value.filter((e) => !e.resolvedAt).length), p = P(() => {
|
|
709
709
|
let e = /* @__PURE__ */ new Map();
|
|
710
710
|
for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
@@ -712,16 +712,16 @@ function Sn(e) {
|
|
|
712
712
|
});
|
|
713
713
|
function m(e) {
|
|
714
714
|
let t = n();
|
|
715
|
-
if (!t) throw new
|
|
715
|
+
if (!t) throw new Re(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
|
|
716
716
|
return t;
|
|
717
717
|
}
|
|
718
718
|
function h(e) {
|
|
719
719
|
let t = r();
|
|
720
|
-
if (!t) throw new
|
|
720
|
+
if (!t) throw new Re(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
|
|
721
721
|
return t;
|
|
722
722
|
}
|
|
723
723
|
function g(e) {
|
|
724
|
-
throw new
|
|
724
|
+
throw new Re(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
725
725
|
}
|
|
726
726
|
function v(e) {
|
|
727
727
|
for (let t of i.value) {
|
|
@@ -735,11 +735,11 @@ function Sn(e) {
|
|
|
735
735
|
return t !== null && e.author.id === t.id;
|
|
736
736
|
}
|
|
737
737
|
function b(t) {
|
|
738
|
-
let n =
|
|
738
|
+
let n = rn(t);
|
|
739
739
|
throw e.onError?.(n), n;
|
|
740
740
|
}
|
|
741
741
|
function x(t) {
|
|
742
|
-
|
|
742
|
+
an(e.onError, t);
|
|
743
743
|
}
|
|
744
744
|
function S(e, t, n) {
|
|
745
745
|
return [
|
|
@@ -879,7 +879,7 @@ function Sn(e) {
|
|
|
879
879
|
applyRemoteDelete: M
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function wn(e) {
|
|
883
883
|
let { comments: t, provider: n, getTemplateId: r } = e, { subscribe: i } = n;
|
|
884
884
|
if (typeof i != "function") return;
|
|
885
885
|
let a = null;
|
|
@@ -902,27 +902,27 @@ function Cn(e) {
|
|
|
902
902
|
}
|
|
903
903
|
//#endregion
|
|
904
904
|
//#region src/utils/activeEditorTracker.ts
|
|
905
|
-
var
|
|
906
|
-
function
|
|
907
|
-
let e = ++
|
|
908
|
-
return
|
|
905
|
+
var Tn = /* @__PURE__ */ new Set(), En = 0, Dn = 0;
|
|
906
|
+
function On() {
|
|
907
|
+
let e = ++Dn;
|
|
908
|
+
return Tn.add(e), En === 0 && (En = e), {
|
|
909
909
|
id: e,
|
|
910
|
-
isActive: () =>
|
|
910
|
+
isActive: () => Tn.size <= 1 || En === e,
|
|
911
911
|
claim: () => {
|
|
912
|
-
|
|
912
|
+
En = e;
|
|
913
913
|
},
|
|
914
914
|
dispose: () => {
|
|
915
|
-
if (
|
|
916
|
-
let e = Array.from(
|
|
917
|
-
|
|
915
|
+
if (Tn.delete(e), En === e) {
|
|
916
|
+
let e = Array.from(Tn);
|
|
917
|
+
En = e[e.length - 1] ?? 0;
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
};
|
|
921
921
|
}
|
|
922
922
|
//#endregion
|
|
923
923
|
//#region src/composables/usePreviewResolution.ts
|
|
924
|
-
var
|
|
925
|
-
function
|
|
924
|
+
var kn = 500;
|
|
925
|
+
function An(e) {
|
|
926
926
|
let t = typeof e.resolvePreview == "function", n = _(null), r = _(!1), i = _(!1), a = 0, o = null;
|
|
927
927
|
function c() {
|
|
928
928
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -933,13 +933,13 @@ function kn(e) {
|
|
|
933
933
|
let o = ++a;
|
|
934
934
|
r.value = !0;
|
|
935
935
|
let s = {
|
|
936
|
-
content:
|
|
936
|
+
content: oe(e.getContent()),
|
|
937
937
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
938
938
|
};
|
|
939
939
|
try {
|
|
940
940
|
let e = await t(s);
|
|
941
941
|
if (o !== a) return;
|
|
942
|
-
if (!
|
|
942
|
+
if (!fe(e)) {
|
|
943
943
|
i.value = !0;
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
@@ -959,7 +959,7 @@ function kn(e) {
|
|
|
959
959
|
}
|
|
960
960
|
o = setTimeout(() => {
|
|
961
961
|
o = null, l();
|
|
962
|
-
},
|
|
962
|
+
}, kn);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
return s(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -981,7 +981,7 @@ function kn(e) {
|
|
|
981
981
|
}
|
|
982
982
|
//#endregion
|
|
983
983
|
//#region src/composables/useImageUrlResolver.ts
|
|
984
|
-
function
|
|
984
|
+
function jn(e) {
|
|
985
985
|
let t = o(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
986
986
|
function r(e) {
|
|
987
987
|
return t.get(e);
|
|
@@ -1014,8 +1014,8 @@ function An(e) {
|
|
|
1014
1014
|
lookup: a
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let t = p(
|
|
1017
|
+
function Mn(e) {
|
|
1018
|
+
let t = p(yt, null), n = P(e);
|
|
1019
1019
|
if (!t) return n;
|
|
1020
1020
|
let r;
|
|
1021
1021
|
function i() {
|
|
@@ -1044,7 +1044,7 @@ function jn(e) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
//#endregion
|
|
1046
1046
|
//#region src/composables/useMergeTagPicker.ts
|
|
1047
|
-
function
|
|
1047
|
+
function Nn() {
|
|
1048
1048
|
let e = _(!1), t = _([]), n = null;
|
|
1049
1049
|
function r(r) {
|
|
1050
1050
|
if (n) {
|
|
@@ -1074,7 +1074,7 @@ function Mn() {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region src/composables/useLogicTagPicker.ts
|
|
1077
|
-
function
|
|
1077
|
+
function Pn() {
|
|
1078
1078
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
1079
1079
|
function i(i, a) {
|
|
1080
1080
|
if (r) {
|
|
@@ -1105,17 +1105,17 @@ function Nn() {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
//#endregion
|
|
1107
1107
|
//#region src/composables/useTemplateLint.ts
|
|
1108
|
-
function
|
|
1108
|
+
function Fn(e) {
|
|
1109
1109
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1112
|
-
let t = _([]), n = _(!1), r = _(!1), i = f(null), a =
|
|
1111
|
+
function In(e) {
|
|
1112
|
+
let t = _([]), n = _(!1), r = _(!1), i = f(null), a = Fn(e.options), o = null, c = !1;
|
|
1113
1113
|
a || l();
|
|
1114
1114
|
async function l() {
|
|
1115
1115
|
try {
|
|
1116
1116
|
let t = await import("@templatical/quality");
|
|
1117
1117
|
if (c) return;
|
|
1118
|
-
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o =
|
|
1118
|
+
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = qe(e.content, u, {
|
|
1119
1119
|
debounce: e.debounce ?? 500,
|
|
1120
1120
|
deep: !0
|
|
1121
1121
|
});
|
|
@@ -1150,17 +1150,17 @@ function Fn(e) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
//#endregion
|
|
1152
1152
|
//#region src/utils/blockTypeLabels.ts
|
|
1153
|
-
function
|
|
1153
|
+
function Ln(e, t) {
|
|
1154
1154
|
return t.blocks[e] ?? e;
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1157
|
-
if (e.type !== "custom") return
|
|
1156
|
+
function Rn(e, t, n = []) {
|
|
1157
|
+
if (e.type !== "custom") return Ln(e.type, t);
|
|
1158
1158
|
let { customType: r } = e;
|
|
1159
1159
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
1160
1160
|
}
|
|
1161
1161
|
//#endregion
|
|
1162
1162
|
//#region src/composables/useKeyboardReorder.ts
|
|
1163
|
-
function
|
|
1163
|
+
function zn(e, t, n = []) {
|
|
1164
1164
|
let r = _(null), i = _(""), a = null;
|
|
1165
1165
|
function o(t) {
|
|
1166
1166
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1187,7 +1187,7 @@ function Rn(e, t, n = []) {
|
|
|
1187
1187
|
let i = o(r);
|
|
1188
1188
|
if (!i) return "";
|
|
1189
1189
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
1190
|
-
return a ?
|
|
1190
|
+
return a ? Rn(a, t.t, n) : "";
|
|
1191
1191
|
}
|
|
1192
1192
|
function c(t, n) {
|
|
1193
1193
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1256,13 +1256,13 @@ function Rn(e, t, n = []) {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
//#endregion
|
|
1258
1258
|
//#region src/composables/useUiTheme.ts
|
|
1259
|
-
function
|
|
1260
|
-
let t =
|
|
1259
|
+
function Bn(e) {
|
|
1260
|
+
let t = Xe("(prefers-color-scheme: dark)");
|
|
1261
1261
|
return { resolvedTheme: P(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1262
1262
|
}
|
|
1263
1263
|
//#endregion
|
|
1264
1264
|
//#region src/composables/useThemeStyles.ts
|
|
1265
|
-
var
|
|
1265
|
+
var Vn = {
|
|
1266
1266
|
bg: "--tpl-bg",
|
|
1267
1267
|
bgElevated: "--tpl-bg-elevated",
|
|
1268
1268
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1286,10 +1286,10 @@ var Bn = {
|
|
|
1286
1286
|
dangerLight: "--tpl-danger-light",
|
|
1287
1287
|
canvasBg: "--tpl-canvas-bg"
|
|
1288
1288
|
};
|
|
1289
|
-
function
|
|
1289
|
+
function Hn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1290
1290
|
return { themeStyles: P(() => {
|
|
1291
1291
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1292
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1292
|
+
if (a) for (let [e, t] of Object.entries(Vn)) {
|
|
1293
1293
|
let n = a[e];
|
|
1294
1294
|
n && (r[t] = n);
|
|
1295
1295
|
}
|
|
@@ -1298,7 +1298,7 @@ function Vn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
//#endregion
|
|
1300
1300
|
//#region src/composables/useBlockRegistry.ts
|
|
1301
|
-
function
|
|
1301
|
+
function Un() {
|
|
1302
1302
|
let e = f(/* @__PURE__ */ new Map());
|
|
1303
1303
|
function t(t, n) {
|
|
1304
1304
|
e.value.set(t, n), ee(e);
|
|
@@ -1306,7 +1306,7 @@ function Hn() {
|
|
|
1306
1306
|
function n(t, n) {
|
|
1307
1307
|
let r = `custom:${t.type}`, i = {
|
|
1308
1308
|
component: n,
|
|
1309
|
-
createBlock: () =>
|
|
1309
|
+
createBlock: () => Ie(t),
|
|
1310
1310
|
definition: t
|
|
1311
1311
|
};
|
|
1312
1312
|
e.value.set(r, i), ee(e);
|
|
@@ -1332,13 +1332,13 @@ function Hn() {
|
|
|
1332
1332
|
let t = a(e.customType);
|
|
1333
1333
|
if (!t) return o("Block definition not found");
|
|
1334
1334
|
try {
|
|
1335
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
1335
|
+
let { Liquid: n } = await import("./liquid.browser-CJgDDvQz.js");
|
|
1336
1336
|
return await new n({
|
|
1337
1337
|
strictVariables: !1,
|
|
1338
1338
|
strictFilters: !1
|
|
1339
1339
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1340
1340
|
} catch (t) {
|
|
1341
|
-
return
|
|
1341
|
+
return Bt.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
function c(t) {
|
|
@@ -1356,9 +1356,9 @@ function Hn() {
|
|
|
1356
1356
|
}
|
|
1357
1357
|
//#endregion
|
|
1358
1358
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1359
|
-
function
|
|
1359
|
+
function Wn(e, t) {
|
|
1360
1360
|
return P(() => {
|
|
1361
|
-
let n =
|
|
1361
|
+
let n = Gn(e.value.blocks);
|
|
1362
1362
|
if (n.size === 0) return [];
|
|
1363
1363
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1364
1364
|
for (let e of n) {
|
|
@@ -1370,81 +1370,81 @@ function Un(e, t) {
|
|
|
1370
1370
|
return i;
|
|
1371
1371
|
});
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function Gn(e) {
|
|
1374
1374
|
let t = /* @__PURE__ */ new Set();
|
|
1375
|
-
return
|
|
1375
|
+
return Kn(e, t), t;
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function Kn(e, t) {
|
|
1378
1378
|
for (let n of e) {
|
|
1379
|
-
if (
|
|
1379
|
+
if (he(n)) {
|
|
1380
1380
|
t.add(n.customType);
|
|
1381
1381
|
continue;
|
|
1382
1382
|
}
|
|
1383
1383
|
if (n.type === "section") {
|
|
1384
1384
|
let e = n.children;
|
|
1385
1385
|
if (!e) continue;
|
|
1386
|
-
for (let n of e)
|
|
1386
|
+
for (let n of e) Kn(n, t);
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
//#endregion
|
|
1391
1391
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1392
|
-
var
|
|
1392
|
+
var qn = [
|
|
1393
1393
|
{
|
|
1394
1394
|
type: "section",
|
|
1395
|
-
createBlock:
|
|
1395
|
+
createBlock: we
|
|
1396
1396
|
},
|
|
1397
1397
|
{
|
|
1398
1398
|
type: "title",
|
|
1399
|
-
createBlock:
|
|
1399
|
+
createBlock: He
|
|
1400
1400
|
},
|
|
1401
1401
|
{
|
|
1402
1402
|
type: "paragraph",
|
|
1403
|
-
createBlock:
|
|
1403
|
+
createBlock: We
|
|
1404
1404
|
},
|
|
1405
1405
|
{
|
|
1406
1406
|
type: "image",
|
|
1407
|
-
createBlock:
|
|
1407
|
+
createBlock: Se
|
|
1408
1408
|
},
|
|
1409
1409
|
{
|
|
1410
1410
|
type: "button",
|
|
1411
|
-
createBlock:
|
|
1411
|
+
createBlock: Te
|
|
1412
1412
|
},
|
|
1413
1413
|
{
|
|
1414
1414
|
type: "divider",
|
|
1415
|
-
createBlock:
|
|
1415
|
+
createBlock: Oe
|
|
1416
1416
|
},
|
|
1417
1417
|
{
|
|
1418
1418
|
type: "video",
|
|
1419
|
-
createBlock:
|
|
1419
|
+
createBlock: be
|
|
1420
1420
|
},
|
|
1421
1421
|
{
|
|
1422
1422
|
type: "social",
|
|
1423
|
-
createBlock:
|
|
1423
|
+
createBlock: Ue
|
|
1424
1424
|
},
|
|
1425
1425
|
{
|
|
1426
1426
|
type: "menu",
|
|
1427
|
-
createBlock:
|
|
1427
|
+
createBlock: Ve
|
|
1428
1428
|
},
|
|
1429
1429
|
{
|
|
1430
1430
|
type: "table",
|
|
1431
|
-
createBlock:
|
|
1431
|
+
createBlock: se
|
|
1432
1432
|
},
|
|
1433
1433
|
{
|
|
1434
1434
|
type: "spacer",
|
|
1435
|
-
createBlock:
|
|
1435
|
+
createBlock: ye
|
|
1436
1436
|
},
|
|
1437
1437
|
{
|
|
1438
1438
|
type: "html",
|
|
1439
|
-
createBlock:
|
|
1439
|
+
createBlock: De
|
|
1440
1440
|
},
|
|
1441
1441
|
{
|
|
1442
1442
|
type: "countdown",
|
|
1443
1443
|
createBlock: Ee
|
|
1444
1444
|
}
|
|
1445
1445
|
];
|
|
1446
|
-
function
|
|
1447
|
-
for (let n of
|
|
1446
|
+
function Jn(e, t) {
|
|
1447
|
+
for (let n of qn) {
|
|
1448
1448
|
let r = t[n.type];
|
|
1449
1449
|
r && e.registerBuiltIn(n.type, {
|
|
1450
1450
|
component: r,
|
|
@@ -1454,23 +1454,23 @@ function qn(e, t) {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
//#endregion
|
|
1456
1456
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1457
|
-
function
|
|
1457
|
+
function Yn(e) {
|
|
1458
1458
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1459
1459
|
}
|
|
1460
1460
|
//#endregion
|
|
1461
1461
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1462
|
-
function
|
|
1462
|
+
function Xn(e) {
|
|
1463
1463
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1466
|
-
let r = new Set(e.map((e) =>
|
|
1467
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1465
|
+
function Zn(e, t, n) {
|
|
1466
|
+
let r = new Set(e.map((e) => Wt(e))), i = [], a = (e, t) => {
|
|
1467
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Wt(o)) && i.push(`${t}.${n}: ${o}`) : Xn(o) && a(o, `${t}.${n}`);
|
|
1468
1468
|
}, o = t;
|
|
1469
|
-
for (let [e, t] of Object.entries(
|
|
1469
|
+
for (let [e, t] of Object.entries(ze)) {
|
|
1470
1470
|
let n = o?.[e];
|
|
1471
1471
|
a({
|
|
1472
1472
|
...t,
|
|
1473
|
-
...
|
|
1473
|
+
...Xn(n) ? n : {}
|
|
1474
1474
|
}, e);
|
|
1475
1475
|
}
|
|
1476
1476
|
return a({
|
|
@@ -1480,8 +1480,8 @@ function Xn(e, t, n) {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
//#endregion
|
|
1482
1482
|
//#region src/utils/resolveFieldColors.ts
|
|
1483
|
-
function
|
|
1484
|
-
let n =
|
|
1483
|
+
function Qn(e, t) {
|
|
1484
|
+
let n = Ut({ presets: e.presets }, Vt), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
1485
1485
|
return {
|
|
1486
1486
|
presets: r ? t.presets : n.presets,
|
|
1487
1487
|
allowCustom: t.allowCustom !== !1 && i,
|
|
@@ -1493,9 +1493,9 @@ function Zn(e, t) {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
//#endregion
|
|
1495
1495
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1496
|
-
function
|
|
1496
|
+
function $n(e, t) {
|
|
1497
1497
|
let n = [], r = (r, i) => {
|
|
1498
|
-
let a =
|
|
1498
|
+
let a = Qn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1499
1499
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1500
1500
|
id: s("invalid-presets"),
|
|
1501
1501
|
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." : "")
|
|
@@ -1506,8 +1506,8 @@ function Qn(e, t) {
|
|
|
1506
1506
|
id: s("allow-custom-ignored"),
|
|
1507
1507
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1508
1508
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1509
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1510
|
-
e !== "" && !t.has(
|
|
1509
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Wt(e)));
|
|
1510
|
+
e !== "" && !t.has(Wt(e)) && n.push({
|
|
1511
1511
|
id: s("off-palette-default"),
|
|
1512
1512
|
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.`
|
|
1513
1513
|
});
|
|
@@ -1519,7 +1519,7 @@ function Qn(e, t) {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
//#endregion
|
|
1521
1521
|
//#region src/utils/keyboardShortcuts.ts
|
|
1522
|
-
function
|
|
1522
|
+
function er(e) {
|
|
1523
1523
|
for (let t of e.composedPath()) {
|
|
1524
1524
|
if (!(t instanceof HTMLElement)) continue;
|
|
1525
1525
|
if (t.isContentEditable) return !0;
|
|
@@ -1528,18 +1528,18 @@ function $n(e) {
|
|
|
1528
1528
|
}
|
|
1529
1529
|
return !1;
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function tr(e, t) {
|
|
1532
1532
|
let n = e.metaKey || e.ctrlKey;
|
|
1533
1533
|
if (n && e.key.toLowerCase() === "s") {
|
|
1534
1534
|
e.preventDefault(), t.onSave?.();
|
|
1535
1535
|
return;
|
|
1536
1536
|
}
|
|
1537
1537
|
if (n && e.key.toLowerCase() === "z") {
|
|
1538
|
-
if (
|
|
1538
|
+
if (er(e)) return;
|
|
1539
1539
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1540
1540
|
return;
|
|
1541
1541
|
}
|
|
1542
|
-
if (t.isPicking?.() &&
|
|
1542
|
+
if (t.isPicking?.() && !er(e)) {
|
|
1543
1543
|
if (e.key === "Escape") {
|
|
1544
1544
|
e.preventDefault(), t.onCancelPick?.();
|
|
1545
1545
|
return;
|
|
@@ -1557,11 +1557,11 @@ function er(e, t) {
|
|
|
1557
1557
|
t.selectBlock(null);
|
|
1558
1558
|
return;
|
|
1559
1559
|
}
|
|
1560
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() &&
|
|
1560
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !er(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1561
1561
|
}
|
|
1562
1562
|
//#endregion
|
|
1563
1563
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1564
|
-
function
|
|
1564
|
+
function nr(e, t, n, r = !1) {
|
|
1565
1565
|
if (!e) return [];
|
|
1566
1566
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1567
1567
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1570,18 +1570,18 @@ function tr(e, t, n, r = !1) {
|
|
|
1570
1570
|
value: e.slice(o, s.index)
|
|
1571
1571
|
});
|
|
1572
1572
|
let i = s[0];
|
|
1573
|
-
if (
|
|
1574
|
-
let e = r ?
|
|
1573
|
+
if (ue(i, n)) {
|
|
1574
|
+
let e = r ? je(i, t) : void 0;
|
|
1575
1575
|
a.push(e === void 0 ? {
|
|
1576
1576
|
type: "tag",
|
|
1577
|
-
value:
|
|
1577
|
+
value: ge(i, t)
|
|
1578
1578
|
} : {
|
|
1579
1579
|
type: "text",
|
|
1580
1580
|
value: e
|
|
1581
1581
|
});
|
|
1582
|
-
} else
|
|
1582
|
+
} else _e(i, n) ? a.push({
|
|
1583
1583
|
type: "tag",
|
|
1584
|
-
value:
|
|
1584
|
+
value: ce(i, n)
|
|
1585
1585
|
}) : a.push({
|
|
1586
1586
|
type: "text",
|
|
1587
1587
|
value: i
|
|
@@ -1595,20 +1595,20 @@ function tr(e, t, n, r = !1) {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
//#endregion
|
|
1597
1597
|
//#region src/components/MergeTagPreviewText.vue
|
|
1598
|
-
var
|
|
1598
|
+
var rr = I({
|
|
1599
1599
|
name: "MergeTagPreviewText",
|
|
1600
1600
|
props: { text: {
|
|
1601
1601
|
type: String,
|
|
1602
1602
|
required: !0
|
|
1603
1603
|
} },
|
|
1604
1604
|
setup(e) {
|
|
1605
|
-
let t = p(
|
|
1605
|
+
let t = p(pt, []), n = p(Et, Fe.liquid), r = p(mt, null), i = P(() => nr(e.text, t, n, r?.value ?? !1));
|
|
1606
1606
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
1607
1607
|
key: t,
|
|
1608
1608
|
class: "tpl-merge-tag-label"
|
|
1609
1609
|
}, e.value) : e.value);
|
|
1610
1610
|
}
|
|
1611
|
-
}),
|
|
1611
|
+
}), ir = ["href"], ar = /* @__PURE__ */ I({
|
|
1612
1612
|
__name: "ButtonBlock",
|
|
1613
1613
|
props: {
|
|
1614
1614
|
block: {},
|
|
@@ -1634,12 +1634,12 @@ var nr = I({
|
|
|
1634
1634
|
style: u(n.value),
|
|
1635
1635
|
class: "tpl:cursor-default",
|
|
1636
1636
|
onClick: i[0] ||= L(() => {}, ["prevent"])
|
|
1637
|
-
}, [w(
|
|
1637
|
+
}, [w(rr, { text: e.block.text }, null, 8, ["text"])], 12, ir)], 4));
|
|
1638
1638
|
}
|
|
1639
|
-
}),
|
|
1639
|
+
}), or = Kt("bookmark", [["path", {
|
|
1640
1640
|
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",
|
|
1641
1641
|
key: "oz39mx"
|
|
1642
|
-
}]]),
|
|
1642
|
+
}]]), sr = Kt("box", [
|
|
1643
1643
|
["path", {
|
|
1644
1644
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1645
1645
|
key: "hh9hay"
|
|
@@ -1652,13 +1652,13 @@ var nr = I({
|
|
|
1652
1652
|
d: "M12 22V12",
|
|
1653
1653
|
key: "d0xqtd"
|
|
1654
1654
|
}]
|
|
1655
|
-
]),
|
|
1655
|
+
]), cr = Kt("code", [["path", {
|
|
1656
1656
|
d: "m16 18 6-6-6-6",
|
|
1657
1657
|
key: "eg8j8"
|
|
1658
1658
|
}], ["path", {
|
|
1659
1659
|
d: "m8 6-6 6 6 6",
|
|
1660
1660
|
key: "ppft3o"
|
|
1661
|
-
}]]),
|
|
1661
|
+
}]]), lr = Kt("copy", [["rect", {
|
|
1662
1662
|
width: "14",
|
|
1663
1663
|
height: "14",
|
|
1664
1664
|
x: "8",
|
|
@@ -1669,7 +1669,7 @@ var nr = I({
|
|
|
1669
1669
|
}], ["path", {
|
|
1670
1670
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1671
1671
|
key: "zix9uf"
|
|
1672
|
-
}]]),
|
|
1672
|
+
}]]), ur = Kt("eye-off", [
|
|
1673
1673
|
["path", {
|
|
1674
1674
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1675
1675
|
key: "ct8e1f"
|
|
@@ -1686,10 +1686,10 @@ var nr = I({
|
|
|
1686
1686
|
d: "m2 2 20 20",
|
|
1687
1687
|
key: "1ooewy"
|
|
1688
1688
|
}]
|
|
1689
|
-
]),
|
|
1689
|
+
]), dr = Kt("funnel", [["path", {
|
|
1690
1690
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
1691
1691
|
key: "sc7q7i"
|
|
1692
|
-
}]]),
|
|
1692
|
+
}]]), fr = Kt("grip-vertical", [
|
|
1693
1693
|
["circle", {
|
|
1694
1694
|
cx: "9",
|
|
1695
1695
|
cy: "12",
|
|
@@ -1726,7 +1726,7 @@ var nr = I({
|
|
|
1726
1726
|
r: "1",
|
|
1727
1727
|
key: "f4zoj3"
|
|
1728
1728
|
}]
|
|
1729
|
-
]),
|
|
1729
|
+
]), pr = Kt("image", [
|
|
1730
1730
|
["rect", {
|
|
1731
1731
|
width: "18",
|
|
1732
1732
|
height: "18",
|
|
@@ -1746,13 +1746,13 @@ var nr = I({
|
|
|
1746
1746
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1747
1747
|
key: "1xmnt7"
|
|
1748
1748
|
}]
|
|
1749
|
-
]),
|
|
1749
|
+
]), mr = Kt("navigation", [["polygon", {
|
|
1750
1750
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1751
1751
|
key: "1ltx0t"
|
|
1752
|
-
}]]),
|
|
1752
|
+
}]]), hr = Kt("puzzle", [["path", {
|
|
1753
1753
|
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",
|
|
1754
1754
|
key: "w46dr5"
|
|
1755
|
-
}]]),
|
|
1755
|
+
}]]), gr = Kt("share-2", [
|
|
1756
1756
|
["circle", {
|
|
1757
1757
|
cx: "18",
|
|
1758
1758
|
cy: "5",
|
|
@@ -1785,7 +1785,7 @@ var nr = I({
|
|
|
1785
1785
|
y2: "10.49",
|
|
1786
1786
|
key: "1n3mei"
|
|
1787
1787
|
}]
|
|
1788
|
-
]),
|
|
1788
|
+
]), _r = Kt("table", [
|
|
1789
1789
|
["path", {
|
|
1790
1790
|
d: "M12 3v18",
|
|
1791
1791
|
key: "108xh3"
|
|
@@ -1806,7 +1806,7 @@ var nr = I({
|
|
|
1806
1806
|
d: "M3 15h18",
|
|
1807
1807
|
key: "5xshup"
|
|
1808
1808
|
}]
|
|
1809
|
-
]),
|
|
1809
|
+
]), vr = Kt("video", [["path", {
|
|
1810
1810
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1811
1811
|
key: "ftymec"
|
|
1812
1812
|
}], ["rect", {
|
|
@@ -1816,11 +1816,11 @@ var nr = I({
|
|
|
1816
1816
|
height: "12",
|
|
1817
1817
|
rx: "2",
|
|
1818
1818
|
key: "158x01"
|
|
1819
|
-
}]]),
|
|
1819
|
+
}]]), yr = ["innerHTML"], br = [
|
|
1820
1820
|
"src",
|
|
1821
1821
|
"width",
|
|
1822
1822
|
"height"
|
|
1823
|
-
],
|
|
1823
|
+
], xr = /* @__PURE__ */ I({
|
|
1824
1824
|
__name: "CustomBlockIcon",
|
|
1825
1825
|
props: {
|
|
1826
1826
|
icon: {},
|
|
@@ -1836,24 +1836,24 @@ var nr = I({
|
|
|
1836
1836
|
height: `${n.value}px`
|
|
1837
1837
|
}),
|
|
1838
1838
|
innerHTML: e.icon
|
|
1839
|
-
}, null, 12,
|
|
1839
|
+
}, null, 12, yr)) : i.value ? (O(), S("img", {
|
|
1840
1840
|
key: 1,
|
|
1841
1841
|
src: e.icon,
|
|
1842
1842
|
width: n.value,
|
|
1843
1843
|
height: n.value,
|
|
1844
1844
|
class: "tpl:inline-block",
|
|
1845
1845
|
alt: ""
|
|
1846
|
-
}, null, 8,
|
|
1846
|
+
}, null, 8, br)) : (O(), A(N(sr), {
|
|
1847
1847
|
key: 2,
|
|
1848
1848
|
size: n.value,
|
|
1849
1849
|
"stroke-width": 1.5
|
|
1850
1850
|
}, null, 8, ["size"]));
|
|
1851
1851
|
}
|
|
1852
|
-
}),
|
|
1853
|
-
function
|
|
1854
|
-
let n =
|
|
1852
|
+
}), Sr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1853
|
+
function Cr(e, t) {
|
|
1854
|
+
let n = en(), r = null, i = null, a = null;
|
|
1855
1855
|
function o() {
|
|
1856
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1856
|
+
return e.value ? Array.from(e.value.querySelectorAll(Sr)).filter((e) => e.offsetParent !== null) : [];
|
|
1857
1857
|
}
|
|
1858
1858
|
function c(e) {
|
|
1859
1859
|
if (e.key !== "Tab") return;
|
|
@@ -1868,7 +1868,7 @@ function Sr(e, t) {
|
|
|
1868
1868
|
a = null;
|
|
1869
1869
|
let t = o();
|
|
1870
1870
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1871
|
-
}), i =
|
|
1871
|
+
}), i = Ze(e, "keydown", c);
|
|
1872
1872
|
}
|
|
1873
1873
|
function u(e = {}) {
|
|
1874
1874
|
let t = e.restoreFocus !== !1;
|
|
@@ -1883,8 +1883,8 @@ function Sr(e, t) {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
//#endregion
|
|
1885
1885
|
//#region src/composables/useEmoji.ts
|
|
1886
|
-
function
|
|
1887
|
-
let [e, t] =
|
|
1886
|
+
function wr() {
|
|
1887
|
+
let [e, t] = Je(!1), n = f([]), r = !1;
|
|
1888
1888
|
j(() => {
|
|
1889
1889
|
r = !0;
|
|
1890
1890
|
}), s(e, async (e) => {
|
|
@@ -1909,7 +1909,7 @@ function Cr() {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
//#endregion
|
|
1911
1911
|
//#region src/composables/useFonts.ts
|
|
1912
|
-
var
|
|
1912
|
+
var Tr = [
|
|
1913
1913
|
{
|
|
1914
1914
|
value: "Arial",
|
|
1915
1915
|
label: "Arial"
|
|
@@ -1938,7 +1938,7 @@ var wr = [
|
|
|
1938
1938
|
value: "Courier New",
|
|
1939
1939
|
label: "Courier New"
|
|
1940
1940
|
}
|
|
1941
|
-
],
|
|
1941
|
+
], Er = {
|
|
1942
1942
|
arial: "Arial, sans-serif",
|
|
1943
1943
|
helvetica: "Helvetica, sans-serif",
|
|
1944
1944
|
georgia: "Georgia, serif",
|
|
@@ -1946,23 +1946,23 @@ var wr = [
|
|
|
1946
1946
|
verdana: "Verdana, sans-serif",
|
|
1947
1947
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1948
1948
|
"courier new": "'Courier New', monospace"
|
|
1949
|
-
},
|
|
1950
|
-
function
|
|
1951
|
-
if (e === void 0 || e === !0) return [...
|
|
1949
|
+
}, Dr = "Arial, sans-serif";
|
|
1950
|
+
function Or(e) {
|
|
1951
|
+
if (e === void 0 || e === !0) return [...Tr];
|
|
1952
1952
|
if (e === !1) return [];
|
|
1953
1953
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1954
1954
|
for (let i of e) {
|
|
1955
|
-
let e = i.toLowerCase(), a =
|
|
1955
|
+
let e = i.toLowerCase(), a = Tr.find((t) => t.value.toLowerCase() === e);
|
|
1956
1956
|
if (!a) {
|
|
1957
|
-
r.has(e) || (r.add(e),
|
|
1957
|
+
r.has(e) || (r.add(e), Bt.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Tr.map((e) => e.value).join(", ")}.`));
|
|
1958
1958
|
continue;
|
|
1959
1959
|
}
|
|
1960
1960
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1961
1961
|
}
|
|
1962
1962
|
return t;
|
|
1963
1963
|
}
|
|
1964
|
-
function
|
|
1965
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r =
|
|
1964
|
+
function kr(e) {
|
|
1965
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = Or(e?.builtIns), i = P(() => e?.defaultFallback ?? Dr), a = P(() => {
|
|
1966
1966
|
let e = [...r], n = t.value.map((e) => ({
|
|
1967
1967
|
value: e.name,
|
|
1968
1968
|
label: e.name,
|
|
@@ -1973,14 +1973,14 @@ function Or(e) {
|
|
|
1973
1973
|
function o(e) {
|
|
1974
1974
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1975
1975
|
}
|
|
1976
|
-
let s = e?.defaultFont ??
|
|
1977
|
-
o(s) ||
|
|
1976
|
+
let s = e?.defaultFont ?? Dr.split(",")[0].trim();
|
|
1977
|
+
o(s) || Bt.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
1978
1978
|
function c() {
|
|
1979
1979
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1980
1980
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1981
1981
|
if (t) return t.value;
|
|
1982
1982
|
}
|
|
1983
|
-
return
|
|
1983
|
+
return Dr;
|
|
1984
1984
|
}
|
|
1985
1985
|
let l = P(() => c());
|
|
1986
1986
|
function u(e) {
|
|
@@ -1990,7 +1990,7 @@ function Or(e) {
|
|
|
1990
1990
|
let e = n.fallback ?? i.value;
|
|
1991
1991
|
return `'${n.name}', ${e}`;
|
|
1992
1992
|
}
|
|
1993
|
-
return
|
|
1993
|
+
return Er[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1994
1994
|
}
|
|
1995
1995
|
let d = [], f = !1;
|
|
1996
1996
|
async function p() {
|
|
@@ -2006,7 +2006,7 @@ function Or(e) {
|
|
|
2006
2006
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2007
2007
|
});
|
|
2008
2008
|
} catch (t) {
|
|
2009
|
-
|
|
2009
|
+
Bt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2010
2010
|
}
|
|
2011
2011
|
});
|
|
2012
2012
|
await Promise.allSettled(e), !f && (n.value = !0);
|
|
@@ -2031,8 +2031,8 @@ function Or(e) {
|
|
|
2031
2031
|
}
|
|
2032
2032
|
//#endregion
|
|
2033
2033
|
//#region src/composables/useLogicTag.ts
|
|
2034
|
-
function
|
|
2035
|
-
let e = p(
|
|
2034
|
+
function Ar() {
|
|
2035
|
+
let e = p(nt, []), t = p(ft, []), n = p(Et, Fe.liquid), r = p(et, null), i = p(Ft, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
2036
2036
|
async function c() {
|
|
2037
2037
|
if (r) {
|
|
2038
2038
|
a.value = !0;
|
|
@@ -2063,12 +2063,12 @@ function kr() {
|
|
|
2063
2063
|
}
|
|
2064
2064
|
//#endregion
|
|
2065
2065
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
2066
|
-
function
|
|
2067
|
-
return
|
|
2066
|
+
function jr(e, t, n) {
|
|
2067
|
+
return _e(e, n) ? {
|
|
2068
2068
|
type: "logicMergeTagNode",
|
|
2069
2069
|
attrs: {
|
|
2070
2070
|
value: e,
|
|
2071
|
-
keyword:
|
|
2071
|
+
keyword: ce(e, n)
|
|
2072
2072
|
}
|
|
2073
2073
|
} : {
|
|
2074
2074
|
type: "mergeTagNode",
|
|
@@ -2080,15 +2080,15 @@ function Ar(e, t, n) {
|
|
|
2080
2080
|
}
|
|
2081
2081
|
//#endregion
|
|
2082
2082
|
//#region src/utils/insertLogicTag.ts
|
|
2083
|
-
function
|
|
2083
|
+
function Mr(e) {
|
|
2084
2084
|
return "before" in e && "after" in e;
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
if (!
|
|
2088
|
-
e.chain().focus().insertContent(
|
|
2086
|
+
function Nr(e, t, n) {
|
|
2087
|
+
if (!Mr(t)) {
|
|
2088
|
+
e.chain().focus().insertContent(jr(t.value, t.label, n)).run();
|
|
2089
2089
|
return;
|
|
2090
2090
|
}
|
|
2091
|
-
let r =
|
|
2091
|
+
let r = jr(t.before, t.label, n), i = jr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
2092
2092
|
if (a !== o) {
|
|
2093
2093
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
2094
2094
|
return;
|
|
@@ -2097,20 +2097,20 @@ function Mr(e, t, n) {
|
|
|
2097
2097
|
}
|
|
2098
2098
|
//#endregion
|
|
2099
2099
|
//#region src/utils/linkColorExtension.ts
|
|
2100
|
-
function
|
|
2100
|
+
function Pr(e) {
|
|
2101
2101
|
if (!e) return null;
|
|
2102
2102
|
let t = e.trim();
|
|
2103
2103
|
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;
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2105
|
+
function Fr(e) {
|
|
2106
2106
|
return e.extend({ addAttributes() {
|
|
2107
2107
|
return {
|
|
2108
2108
|
...this.parent?.(),
|
|
2109
2109
|
color: {
|
|
2110
2110
|
default: null,
|
|
2111
|
-
parseHTML: (e) =>
|
|
2111
|
+
parseHTML: (e) => Pr(Ht(e.style.color)),
|
|
2112
2112
|
renderHTML: (e) => {
|
|
2113
|
-
let t =
|
|
2113
|
+
let t = Pr(e.color);
|
|
2114
2114
|
return t ? { style: `color: ${t}` } : {};
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
@@ -2119,9 +2119,9 @@ function Pr(e) {
|
|
|
2119
2119
|
}
|
|
2120
2120
|
//#endregion
|
|
2121
2121
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2122
|
-
function
|
|
2122
|
+
function Ir(e) {
|
|
2123
2123
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
2124
|
-
|
|
2124
|
+
Cr(i, t);
|
|
2125
2125
|
function a() {
|
|
2126
2126
|
let i = e.value?.getAttributes("link") ?? {};
|
|
2127
2127
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -2130,7 +2130,7 @@ function Fr(e) {
|
|
|
2130
2130
|
if (n.value) {
|
|
2131
2131
|
let t = c(n.value);
|
|
2132
2132
|
if (t !== null) {
|
|
2133
|
-
let n =
|
|
2133
|
+
let n = Pr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
2134
2134
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
2135
2135
|
}
|
|
2136
2136
|
}
|
|
@@ -2177,8 +2177,8 @@ function Fr(e) {
|
|
|
2177
2177
|
}
|
|
2178
2178
|
//#endregion
|
|
2179
2179
|
//#region src/composables/useRichTextEditor.ts
|
|
2180
|
-
function
|
|
2181
|
-
let t = p(
|
|
2180
|
+
function Lr(e) {
|
|
2181
|
+
let t = p(wt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = tn(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = Ar(), g = p(ht, null), v = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = Ae(l), b = f(null), { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Ir(b), { start: A, stop: ee } = Ye(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), j = f(null), M = _(!0), N = _(null), P = !1;
|
|
2182
2182
|
async function te() {
|
|
2183
2183
|
N.value = null, M.value = !0;
|
|
2184
2184
|
try {
|
|
@@ -2208,7 +2208,7 @@ function Ir(e) {
|
|
|
2208
2208
|
b.value = s, M.value = !1, A();
|
|
2209
2209
|
} catch (t) {
|
|
2210
2210
|
if (P) return;
|
|
2211
|
-
|
|
2211
|
+
Bt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), N.value = t instanceof Error ? t.message : "Failed to load editor", M.value = !1;
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
2214
|
function F() {
|
|
@@ -2226,7 +2226,7 @@ function Ir(e) {
|
|
|
2226
2226
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
2227
2227
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
2228
2228
|
}
|
|
2229
|
-
|
|
2229
|
+
Ze(document, "mousedown", ne), i(() => {
|
|
2230
2230
|
P = !0, I(), ee(), b.value?.destroy();
|
|
2231
2231
|
});
|
|
2232
2232
|
async function re() {
|
|
@@ -2238,7 +2238,7 @@ function Ir(e) {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
async function L() {
|
|
2240
2240
|
let e = await h();
|
|
2241
|
-
P || (e && b.value ?
|
|
2241
|
+
P || (e && b.value ? Nr(b.value, e, l) : b.value?.commands.focus());
|
|
2242
2242
|
}
|
|
2243
2243
|
return {
|
|
2244
2244
|
editor: b,
|
|
@@ -2267,9 +2267,9 @@ function Ir(e) {
|
|
|
2267
2267
|
}
|
|
2268
2268
|
//#endregion
|
|
2269
2269
|
//#region src/composables/useSmallScreenNotice.ts
|
|
2270
|
-
var
|
|
2271
|
-
function
|
|
2272
|
-
let t =
|
|
2270
|
+
var Rr = "(max-width: 767px)";
|
|
2271
|
+
function zr(e) {
|
|
2272
|
+
let t = Xe(Rr);
|
|
2273
2273
|
return {
|
|
2274
2274
|
isSmallScreen: t,
|
|
2275
2275
|
showNotice: P(() => (te(e) ?? !0) && t.value)
|
|
@@ -2277,20 +2277,20 @@ function Rr(e) {
|
|
|
2277
2277
|
}
|
|
2278
2278
|
//#endregion
|
|
2279
2279
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2280
|
-
var
|
|
2280
|
+
var Br = { class: "tpl:w-full" }, Vr = {
|
|
2281
2281
|
key: 0,
|
|
2282
2282
|
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)]"
|
|
2283
|
-
},
|
|
2283
|
+
}, Hr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ur = {
|
|
2284
2284
|
key: 1,
|
|
2285
2285
|
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)]"
|
|
2286
|
-
},
|
|
2286
|
+
}, Wr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Gr = {
|
|
2287
2287
|
key: 2,
|
|
2288
2288
|
class: "tpl:relative"
|
|
2289
|
-
},
|
|
2289
|
+
}, Kr = ["innerHTML"], qr = {
|
|
2290
2290
|
key: 0,
|
|
2291
2291
|
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]",
|
|
2292
2292
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2293
|
-
},
|
|
2293
|
+
}, Jr = /* @__PURE__ */ I({
|
|
2294
2294
|
__name: "CustomBlock",
|
|
2295
2295
|
props: {
|
|
2296
2296
|
block: {},
|
|
@@ -2298,7 +2298,7 @@ var zr = { class: "tpl:w-full" }, Br = {
|
|
|
2298
2298
|
},
|
|
2299
2299
|
emits: ["fetchData"],
|
|
2300
2300
|
setup(e, { emit: t }) {
|
|
2301
|
-
let r = e, i = t, { t: a } =
|
|
2301
|
+
let r = e, i = t, { t: a } = zt(), o = p(Mt, null), c = _(""), l = _(!1), u = P(() => o?.getDefinition(r.block.customType)), d = P(() => !!u.value), { isFetching: f, fetch: m, needsFetch: h, hasDataSource: g } = _n({
|
|
2302
2302
|
definition: u,
|
|
2303
2303
|
block: P(() => r.block),
|
|
2304
2304
|
onUpdate: (e, t) => {
|
|
@@ -2307,10 +2307,10 @@ var zr = { class: "tpl:w-full" }, Br = {
|
|
|
2307
2307
|
dataSourceFetched: t
|
|
2308
2308
|
});
|
|
2309
2309
|
}
|
|
2310
|
-
}), v = p(
|
|
2310
|
+
}), v = p(pt, []), y = p(mt, null), b = P(() => {
|
|
2311
2311
|
if (!y?.value) return r.block;
|
|
2312
2312
|
let e = {};
|
|
2313
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
2313
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? de(n, v) : n;
|
|
2314
2314
|
return {
|
|
2315
2315
|
...r.block,
|
|
2316
2316
|
fieldValues: e
|
|
@@ -2327,17 +2327,17 @@ var zr = { class: "tpl:w-full" }, Br = {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
|
-
let E =
|
|
2330
|
+
let E = Ke(C, 150);
|
|
2331
2331
|
return n(() => {
|
|
2332
2332
|
C();
|
|
2333
2333
|
}), s(() => r.block.fieldValues, () => {
|
|
2334
2334
|
E();
|
|
2335
2335
|
}, { deep: !0 }), s(() => y?.value, () => {
|
|
2336
2336
|
E();
|
|
2337
|
-
}), (e, t) => (O(), S("div",
|
|
2337
|
+
}), (e, t) => (O(), S("div", Br, [d.value ? l.value ? (O(), S("div", Ur, [w(N(Xt), {
|
|
2338
2338
|
size: 24,
|
|
2339
2339
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2340
|
-
}), x("span",
|
|
2340
|
+
}), x("span", Wr, k(N(a).customBlocks.renderError), 1)])) : (O(), S("div", Gr, [x("div", { innerHTML: c.value }, null, 8, Kr), N(g) && N(h) ? (O(), S("div", qr, [N(f) ? (O(), A(Qt, {
|
|
2341
2341
|
key: 1,
|
|
2342
2342
|
class: "tpl:w-48"
|
|
2343
2343
|
})) : (O(), S("button", {
|
|
@@ -2345,16 +2345,16 @@ var zr = { class: "tpl:w-full" }, Br = {
|
|
|
2345
2345
|
type: "button",
|
|
2346
2346
|
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)]",
|
|
2347
2347
|
onClick: t[0] ||= L((...e) => N(m) && N(m)(...e), ["stop"])
|
|
2348
|
-
}, [u.value?.icon ? (O(), A(
|
|
2348
|
+
}, [u.value?.icon ? (O(), A(xr, {
|
|
2349
2349
|
key: 0,
|
|
2350
2350
|
icon: u.value.icon,
|
|
2351
2351
|
size: 16
|
|
2352
|
-
}, null, 8, ["icon"])) : F("", !0), T(" " + k(u.value?.dataSource?.label || N(a).customBlocks.dataSource.fetchButton), 1)]))])) : F("", !0)])) : (O(), S("div",
|
|
2352
|
+
}, null, 8, ["icon"])) : F("", !0), T(" " + k(u.value?.dataSource?.label || N(a).customBlocks.dataSource.fetchButton), 1)]))])) : F("", !0)])) : (O(), S("div", Vr, [w(N(hr), {
|
|
2353
2353
|
size: 24,
|
|
2354
2354
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2355
|
-
}), x("span",
|
|
2355
|
+
}), x("span", Hr, k(N(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2356
2356
|
}
|
|
2357
|
-
}),
|
|
2357
|
+
}), Yr = { class: "tpl:w-full" }, Xr = /* @__PURE__ */ I({
|
|
2358
2358
|
__name: "DividerBlock",
|
|
2359
2359
|
props: {
|
|
2360
2360
|
block: {},
|
|
@@ -2366,28 +2366,28 @@ var zr = { class: "tpl:w-full" }, Br = {
|
|
|
2366
2366
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2367
2367
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2368
2368
|
}));
|
|
2369
|
-
return (e, t) => (O(), S("div",
|
|
2369
|
+
return (e, t) => (O(), S("div", Yr, [x("hr", {
|
|
2370
2370
|
class: "tpl:m-0 tpl:border-none",
|
|
2371
2371
|
style: u(n.value)
|
|
2372
2372
|
}, null, 4)]));
|
|
2373
2373
|
}
|
|
2374
|
-
}),
|
|
2374
|
+
}), Zr = { class: "tpl:w-full" }, Qr = ["srcdoc", "title"], $r = {
|
|
2375
2375
|
key: 1,
|
|
2376
2376
|
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)]"
|
|
2377
|
-
},
|
|
2377
|
+
}, ei = {
|
|
2378
2378
|
key: 0,
|
|
2379
2379
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2380
|
-
},
|
|
2380
|
+
}, ti = {
|
|
2381
2381
|
key: 1,
|
|
2382
2382
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2383
|
-
},
|
|
2383
|
+
}, ni = /* @__PURE__ */ I({
|
|
2384
2384
|
__name: "HtmlBlock",
|
|
2385
2385
|
props: {
|
|
2386
2386
|
block: {},
|
|
2387
2387
|
viewport: {}
|
|
2388
2388
|
},
|
|
2389
2389
|
setup(e) {
|
|
2390
|
-
let t = e, { t: n } =
|
|
2390
|
+
let t = e, { t: n } = zt(), r = p(Lt, !1), a = P(() => t.block.content.trim().length > 0), o = P(() => r && a.value), c = p(pt, []), l = p(mt, null), d = P(() => l?.value ? de(t.block.content, c) : t.block.content), f = _(null), m = _(60), h = null;
|
|
2391
2391
|
function g() {
|
|
2392
2392
|
let e = f.value?.contentDocument;
|
|
2393
2393
|
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -2401,7 +2401,7 @@ var zr = { class: "tpl:w-full" }, Br = {
|
|
|
2401
2401
|
e || (h?.disconnect(), h = null);
|
|
2402
2402
|
}), i(() => {
|
|
2403
2403
|
h?.disconnect(), h = null;
|
|
2404
|
-
}), (e, t) => (O(), S("div",
|
|
2404
|
+
}), (e, t) => (O(), S("div", Zr, [o.value ? (O(), S("iframe", {
|
|
2405
2405
|
key: 0,
|
|
2406
2406
|
ref_key: "iframeRef",
|
|
2407
2407
|
ref: f,
|
|
@@ -2411,18 +2411,18 @@ var zr = { class: "tpl:w-full" }, Br = {
|
|
|
2411
2411
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2412
2412
|
style: u({ height: `${m.value}px` }),
|
|
2413
2413
|
onLoad: v
|
|
2414
|
-
}, null, 44,
|
|
2414
|
+
}, null, 44, Qr)) : (O(), S("div", $r, [w(N(cr), {
|
|
2415
2415
|
size: 24,
|
|
2416
2416
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2417
|
-
}), a.value ? (O(), S("span",
|
|
2417
|
+
}), a.value ? (O(), S("span", ei, k(N(n).html.preview), 1)) : (O(), S("span", ti, k(N(n).html.empty), 1))]))]));
|
|
2418
2418
|
}
|
|
2419
|
-
}),
|
|
2420
|
-
function
|
|
2421
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || te(r), { isOverDropZone: a } =
|
|
2419
|
+
}), ri = "image/";
|
|
2420
|
+
function ii(e) {
|
|
2421
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || te(r), { isOverDropZone: a } = Qe(t, {
|
|
2422
2422
|
preventDefaultForUnhandled: !0,
|
|
2423
2423
|
onDrop: (e) => {
|
|
2424
2424
|
if (!i()) return;
|
|
2425
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2425
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(ri));
|
|
2426
2426
|
t.length > 0 && n([t[0]]);
|
|
2427
2427
|
}
|
|
2428
2428
|
});
|
|
@@ -2430,17 +2430,17 @@ function ri(e) {
|
|
|
2430
2430
|
}
|
|
2431
2431
|
//#endregion
|
|
2432
2432
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2433
|
-
var
|
|
2433
|
+
var ai = {
|
|
2434
2434
|
key: 0,
|
|
2435
2435
|
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)]",
|
|
2436
2436
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
2437
|
-
},
|
|
2437
|
+
}, oi = ["href"], si = ["src", "alt"], ci = ["src", "alt"], li = {
|
|
2438
2438
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2439
2439
|
style: { opacity: "0.7" }
|
|
2440
|
-
},
|
|
2440
|
+
}, ui = ["href"], di = ["src", "alt"], fi = ["src", "alt"], pi = {
|
|
2441
2441
|
key: 4,
|
|
2442
2442
|
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)]"
|
|
2443
|
-
},
|
|
2443
|
+
}, mi = ["aria-label"], hi = { key: 1 }, gi = /* @__PURE__ */ I({
|
|
2444
2444
|
__name: "ImageBlock",
|
|
2445
2445
|
props: {
|
|
2446
2446
|
block: {},
|
|
@@ -2448,7 +2448,7 @@ var ii = {
|
|
|
2448
2448
|
},
|
|
2449
2449
|
emits: ["update"],
|
|
2450
2450
|
setup(e, { emit: t }) {
|
|
2451
|
-
let n = e, r = t, { t: i } =
|
|
2451
|
+
let n = e, r = t, { t: i } = zt(), { syntax: a } = tn(), o = p(Tt, null), s = P(() => !!o), c = nn();
|
|
2452
2452
|
async function l() {
|
|
2453
2453
|
let e = await o?.({ accept: ["images"] });
|
|
2454
2454
|
if (c.alive && e) {
|
|
@@ -2475,7 +2475,7 @@ var ii = {
|
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
|
-
let { isOver: g } =
|
|
2478
|
+
let { isOver: g } = ii({
|
|
2479
2479
|
target: d,
|
|
2480
2480
|
enabled: m,
|
|
2481
2481
|
onFiles: h
|
|
@@ -2485,22 +2485,23 @@ var ii = {
|
|
|
2485
2485
|
maxWidth: "100%",
|
|
2486
2486
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
2487
2487
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
2488
|
+
borderRadius: n.block.borderRadius && n.block.borderRadius > 0 ? `${n.block.borderRadius}px` : void 0,
|
|
2488
2489
|
display: "block",
|
|
2489
2490
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2490
2491
|
marginRight: e === "center" ? "auto" : void 0
|
|
2491
2492
|
};
|
|
2492
|
-
}), b = P(() =>
|
|
2493
|
+
}), b = P(() => Me(n.block.src, a)), C = Mn(() => b.value ? void 0 : n.block.src), E = Mn(() => b.value ? n.block.placeholderUrl : void 0);
|
|
2493
2494
|
return (t, n) => (O(), S("div", {
|
|
2494
2495
|
ref_key: "dropZoneRef",
|
|
2495
2496
|
ref: d,
|
|
2496
2497
|
"data-testid": "image-drop-zone",
|
|
2497
2498
|
class: "tpl:relative tpl:w-full",
|
|
2498
2499
|
style: u(v.value)
|
|
2499
|
-
}, [m.value && (N(g) || f.value) ? (O(), S("div",
|
|
2500
|
+
}, [m.value && (N(g) || f.value) ? (O(), S("div", ai, [f.value ? (O(), S(M, { key: 0 }, [w(N(qt), {
|
|
2500
2501
|
class: "tpl-spinner",
|
|
2501
2502
|
size: 20,
|
|
2502
2503
|
"stroke-width": 2
|
|
2503
|
-
}), T(" " + k(N(i).image.uploading), 1)], 64)) : (O(), S(M, { key: 1 }, [w(N(
|
|
2504
|
+
}), T(" " + k(N(i).image.uploading), 1)], 64)) : (O(), S(M, { key: 1 }, [w(N(Zt), {
|
|
2504
2505
|
size: 20,
|
|
2505
2506
|
"stroke-width": 1.5
|
|
2506
2507
|
}), T(" " + k(N(i).image.dropToUpload), 1)], 64))])) : F("", !0), e.block.src && b.value && e.block.placeholderUrl ? (O(), S(M, { key: 1 }, [e.block.linkUrl ? (O(), S("a", {
|
|
@@ -2515,22 +2516,22 @@ var ii = {
|
|
|
2515
2516
|
src: N(E),
|
|
2516
2517
|
alt: e.block.alt || N(i).image.altTextPlaceholder,
|
|
2517
2518
|
style: u(y.value)
|
|
2518
|
-
}, null, 12,
|
|
2519
|
+
}, null, 12, si)], 8, oi)) : (O(), S("img", {
|
|
2519
2520
|
key: 1,
|
|
2520
2521
|
class: "tpl:border-0",
|
|
2521
2522
|
src: N(E),
|
|
2522
2523
|
alt: e.block.alt,
|
|
2523
2524
|
style: u(y.value)
|
|
2524
|
-
}, null, 12,
|
|
2525
|
+
}, null, 12, ci))], 64)) : e.block.src && b.value ? (O(), S("div", {
|
|
2525
2526
|
key: 2,
|
|
2526
2527
|
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)]",
|
|
2527
2528
|
style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
|
|
2528
|
-
}, [w(N(
|
|
2529
|
+
}, [w(N(pr), {
|
|
2529
2530
|
size: 32,
|
|
2530
2531
|
"stroke-width": 1.5,
|
|
2531
2532
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2532
2533
|
style: { opacity: "0.5" }
|
|
2533
|
-
}), x("span",
|
|
2534
|
+
}), x("span", li, [w(rr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (O(), S(M, { key: 3 }, [e.block.linkUrl ? (O(), S("a", {
|
|
2534
2535
|
key: 0,
|
|
2535
2536
|
href: e.block.linkUrl,
|
|
2536
2537
|
target: "_blank",
|
|
@@ -2542,33 +2543,33 @@ var ii = {
|
|
|
2542
2543
|
src: N(C),
|
|
2543
2544
|
alt: e.block.alt || N(i).image.altTextPlaceholder,
|
|
2544
2545
|
style: u(y.value)
|
|
2545
|
-
}, null, 12,
|
|
2546
|
+
}, null, 12, di)], 8, ui)) : (O(), S("img", {
|
|
2546
2547
|
key: 1,
|
|
2547
2548
|
class: "tpl:border-0",
|
|
2548
2549
|
src: N(C),
|
|
2549
2550
|
alt: e.block.alt,
|
|
2550
2551
|
style: u(y.value)
|
|
2551
|
-
}, null, 12,
|
|
2552
|
+
}, null, 12, fi))], 64)) : (O(), S("div", pi, [s.value ? (O(), S("button", {
|
|
2552
2553
|
key: 0,
|
|
2553
2554
|
"aria-label": N(i).image.browseMedia,
|
|
2554
2555
|
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)]",
|
|
2555
2556
|
onClick: L(l, ["stop"])
|
|
2556
|
-
}, [w(N(
|
|
2557
|
+
}, [w(N(pr), {
|
|
2557
2558
|
size: 14,
|
|
2558
2559
|
"stroke-width": 1.5
|
|
2559
|
-
}), T(" " + k(N(i).image.browseMedia), 1)], 8,
|
|
2560
|
+
}), T(" " + k(N(i).image.browseMedia), 1)], 8, mi)) : (O(), S("span", hi, k(N(i).image.clickToAdd), 1))]))], 4));
|
|
2560
2561
|
}
|
|
2561
|
-
}),
|
|
2562
|
+
}), _i = { class: "tpl:w-full" }, vi = ["href"], yi = {
|
|
2562
2563
|
key: 1,
|
|
2563
2564
|
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)]"
|
|
2564
|
-
},
|
|
2565
|
+
}, bi = /* @__PURE__ */ I({
|
|
2565
2566
|
__name: "MenuBlock",
|
|
2566
2567
|
props: {
|
|
2567
2568
|
block: {},
|
|
2568
2569
|
viewport: {}
|
|
2569
2570
|
},
|
|
2570
2571
|
setup(e) {
|
|
2571
|
-
let t = e, { t: n } =
|
|
2572
|
+
let t = e, { t: n } = zt(), r = P(() => ({
|
|
2572
2573
|
display: "flex",
|
|
2573
2574
|
flexWrap: "wrap",
|
|
2574
2575
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2580,7 +2581,7 @@ var ii = {
|
|
|
2580
2581
|
function a(e) {
|
|
2581
2582
|
return e || t.block.linkColor || t.block.color;
|
|
2582
2583
|
}
|
|
2583
|
-
return (t, o) => (O(), S("div",
|
|
2584
|
+
return (t, o) => (O(), S("div", _i, [i.value ? (O(), S("div", {
|
|
2584
2585
|
key: 0,
|
|
2585
2586
|
style: u(r.value)
|
|
2586
2587
|
}, [(O(!0), S(M, null, D(e.block.items, (t, n) => (O(), S(M, { key: t.id }, [x("a", {
|
|
@@ -2592,15 +2593,15 @@ var ii = {
|
|
|
2592
2593
|
textDecoration: t.underline ? "underline" : "none"
|
|
2593
2594
|
}),
|
|
2594
2595
|
onClick: o[0] ||= L(() => {}, ["prevent"])
|
|
2595
|
-
}, [w(
|
|
2596
|
+
}, [w(rr, { text: t.text || "..." }, null, 8, ["text"])], 12, vi), n < e.block.items.length - 1 ? (O(), S("span", {
|
|
2596
2597
|
key: 0,
|
|
2597
2598
|
style: u({
|
|
2598
2599
|
color: e.block.separatorColor,
|
|
2599
2600
|
padding: `0 ${e.block.spacing}px`
|
|
2600
2601
|
})
|
|
2601
|
-
}, k(e.block.separator), 5)) : F("", !0)], 64))), 128))], 4)) : (O(), S("div",
|
|
2602
|
+
}, k(e.block.separator), 5)) : F("", !0)], 64))), 128))], 4)) : (O(), S("div", yi, [w(N(mr), { size: 16 }), x("span", null, k(N(n).menu.addLinks), 1)]))]));
|
|
2602
2603
|
}
|
|
2603
|
-
}),
|
|
2604
|
+
}), xi = /* @__PURE__ */ new Set([
|
|
2604
2605
|
"http",
|
|
2605
2606
|
"https",
|
|
2606
2607
|
"mailto",
|
|
@@ -2610,7 +2611,7 @@ var ii = {
|
|
|
2610
2611
|
"sms",
|
|
2611
2612
|
"xmpp",
|
|
2612
2613
|
"cid"
|
|
2613
|
-
]),
|
|
2614
|
+
]), Si = /* @__PURE__ */ new Set([
|
|
2614
2615
|
"SCRIPT",
|
|
2615
2616
|
"STYLE",
|
|
2616
2617
|
"IFRAME",
|
|
@@ -2620,7 +2621,7 @@ var ii = {
|
|
|
2620
2621
|
"META",
|
|
2621
2622
|
"BASE",
|
|
2622
2623
|
"FORM"
|
|
2623
|
-
]),
|
|
2624
|
+
]), Ci = /* @__PURE__ */ new Set([
|
|
2624
2625
|
"href",
|
|
2625
2626
|
"xlink:href",
|
|
2626
2627
|
"formaction",
|
|
@@ -2629,16 +2630,16 @@ var ii = {
|
|
|
2629
2630
|
"background",
|
|
2630
2631
|
"poster"
|
|
2631
2632
|
]);
|
|
2632
|
-
function
|
|
2633
|
+
function wi(e, t) {
|
|
2633
2634
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2634
2635
|
if (!n || n.startsWith("#")) return !0;
|
|
2635
2636
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2636
2637
|
if (!r) return !0;
|
|
2637
2638
|
let i = r[1].toLowerCase();
|
|
2638
|
-
return
|
|
2639
|
+
return xi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2639
2640
|
}
|
|
2640
|
-
function
|
|
2641
|
-
if (
|
|
2641
|
+
function Ti(e) {
|
|
2642
|
+
if (Si.has(e.tagName)) {
|
|
2642
2643
|
e.remove();
|
|
2643
2644
|
return;
|
|
2644
2645
|
}
|
|
@@ -2650,29 +2651,29 @@ function wi(e) {
|
|
|
2650
2651
|
e.removeAttribute(n);
|
|
2651
2652
|
continue;
|
|
2652
2653
|
}
|
|
2653
|
-
if (
|
|
2654
|
-
|
|
2654
|
+
if (Ci.has(t)) {
|
|
2655
|
+
wi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2655
2656
|
continue;
|
|
2656
2657
|
}
|
|
2657
2658
|
if (t === "src") {
|
|
2658
|
-
|
|
2659
|
+
wi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2659
2660
|
continue;
|
|
2660
2661
|
}
|
|
2661
2662
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2662
2663
|
}
|
|
2663
2664
|
let n = Array.from(e.children);
|
|
2664
|
-
for (let e of n)
|
|
2665
|
+
for (let e of n) Ti(e);
|
|
2665
2666
|
}
|
|
2666
|
-
function
|
|
2667
|
+
function Ei(e) {
|
|
2667
2668
|
if (typeof DOMParser > "u") return e;
|
|
2668
2669
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2669
|
-
for (let e of n)
|
|
2670
|
+
for (let e of n) Ti(e);
|
|
2670
2671
|
return t.innerHTML;
|
|
2671
2672
|
}
|
|
2672
2673
|
//#endregion
|
|
2673
2674
|
//#region src/composables/useEditableTextBlock.ts
|
|
2674
|
-
function
|
|
2675
|
-
let t = p(
|
|
2675
|
+
function Di(e) {
|
|
2676
|
+
let t = p(pt, []), n = p(mt, null), { syntax: r } = tn(), i = P(() => n?.value ? xe(e(), t) : ve(e(), t)), a = P(() => Ei(pe(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = $e(s), { toLocal: u } = Gt(), d = P(() => u({
|
|
2676
2677
|
top: c.value - 8,
|
|
2677
2678
|
left: l.value
|
|
2678
2679
|
}));
|
|
@@ -2693,14 +2694,14 @@ function Ei(e) {
|
|
|
2693
2694
|
}
|
|
2694
2695
|
//#endregion
|
|
2695
2696
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2696
|
-
var
|
|
2697
|
+
var Oi = ["innerHTML"], ki = /* @__PURE__ */ I({
|
|
2697
2698
|
__name: "ParagraphBlock",
|
|
2698
2699
|
props: {
|
|
2699
2700
|
block: {},
|
|
2700
2701
|
viewport: {}
|
|
2701
2702
|
},
|
|
2702
2703
|
setup(e) {
|
|
2703
|
-
let t = e, n = y(() => import("./ParagraphEditor-
|
|
2704
|
+
let t = e, n = y(() => import("./ParagraphEditor-C0NbqDmV.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Di(() => t.block.content);
|
|
2704
2705
|
return (t, l) => (O(), S("div", {
|
|
2705
2706
|
ref_key: "blockRef",
|
|
2706
2707
|
ref: i,
|
|
@@ -2717,56 +2718,56 @@ var Di = ["innerHTML"], Oi = /* @__PURE__ */ I({
|
|
|
2717
2718
|
"onDone"
|
|
2718
2719
|
])) : (O(), S("div", {
|
|
2719
2720
|
key: 1,
|
|
2720
|
-
class: "tpl-text-content tpl:outline-none
|
|
2721
|
+
class: "tpl-text-content tpl:outline-none",
|
|
2721
2722
|
innerHTML: N(o)
|
|
2722
|
-
}, null, 8,
|
|
2723
|
+
}, null, 8, Oi))], 544));
|
|
2723
2724
|
}
|
|
2724
2725
|
});
|
|
2725
2726
|
//#endregion
|
|
2726
2727
|
//#region src/utils/blockComponentResolver.ts
|
|
2727
|
-
function
|
|
2728
|
+
function Ai(e) {
|
|
2728
2729
|
let t = { fontFamily: e.fontFamily };
|
|
2729
2730
|
return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
|
|
2730
2731
|
}
|
|
2731
|
-
function
|
|
2732
|
+
function ji(e, t, n) {
|
|
2732
2733
|
if (t) {
|
|
2733
2734
|
let n = t.getComponent(e);
|
|
2734
2735
|
if (n) return n;
|
|
2735
2736
|
}
|
|
2736
2737
|
return n[e.type] ?? null;
|
|
2737
2738
|
}
|
|
2738
|
-
function
|
|
2739
|
+
function Mi(e) {
|
|
2739
2740
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2740
2741
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2741
2742
|
backgroundColor: n || "transparent"
|
|
2742
2743
|
};
|
|
2743
|
-
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2744
|
+
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? ke.paragraphGap : ke.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2744
2745
|
}
|
|
2745
|
-
function
|
|
2746
|
+
function Ni(e) {
|
|
2746
2747
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2747
2748
|
let t = e.wrapper, n = {};
|
|
2748
2749
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
2749
2750
|
}
|
|
2750
2751
|
//#endregion
|
|
2751
2752
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2752
|
-
var
|
|
2753
|
+
var Pi = [
|
|
2753
2754
|
"data-block-id",
|
|
2754
2755
|
"data-block-type",
|
|
2755
2756
|
"data-tpl-picked"
|
|
2756
|
-
],
|
|
2757
|
+
], Fi = ["aria-label"], Ii = [
|
|
2757
2758
|
"aria-label",
|
|
2758
2759
|
"aria-pressed",
|
|
2759
2760
|
"title"
|
|
2760
|
-
],
|
|
2761
|
+
], Li = ["aria-label", "title"], Ri = ["aria-label", "title"], zi = ["aria-label", "title"], Bi = {
|
|
2761
2762
|
key: 1,
|
|
2762
2763
|
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"
|
|
2763
|
-
},
|
|
2764
|
+
}, Vi = { 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)]" }, Hi = {
|
|
2764
2765
|
key: 2,
|
|
2765
2766
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2766
|
-
},
|
|
2767
|
+
}, Ui = ["aria-label", "title"], Wi = {
|
|
2767
2768
|
key: 3,
|
|
2768
2769
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2769
|
-
},
|
|
2770
|
+
}, Gi = ["aria-label"], Ki = /*#__PURE__*/ $t(/* @__PURE__ */ I({
|
|
2770
2771
|
__name: "BlockWrapper",
|
|
2771
2772
|
props: {
|
|
2772
2773
|
block: {},
|
|
@@ -2778,7 +2779,7 @@ var Ni = [
|
|
|
2778
2779
|
},
|
|
2779
2780
|
emits: ["select"],
|
|
2780
2781
|
setup(e, { emit: t }) {
|
|
2781
|
-
let n = y(() => import("./BlockIssueBadge-
|
|
2782
|
+
let n = y(() => import("./BlockIssueBadge-Dhk7Hv4m.js")), i = e, a = t, { t: o, format: s } = zt(), l = p(It, null), d = _(null), f = P(() => l?.liftedBlockId.value === i.block.id), h = P(() => f.value ? s(o.blockActions.dragLifted, { block: i.block.type }) : o.blockActions.drag);
|
|
2782
2783
|
async function g() {
|
|
2783
2784
|
await m(), d.value?.focus();
|
|
2784
2785
|
}
|
|
@@ -2804,13 +2805,7 @@ var Ni = [
|
|
|
2804
2805
|
let b = P(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), C = P(() => i.previewMode === !0 && b.value), E = P(() => i.viewport ? {
|
|
2805
2806
|
desktop: o.viewport.desktop,
|
|
2806
2807
|
mobile: o.viewport.mobile
|
|
2807
|
-
}[i.viewport] ?? i.viewport : ""), D = P(() => !!i.block.displayCondition), A = p(
|
|
2808
|
-
let e = ji(i.block), t = {
|
|
2809
|
-
padding: e.padding,
|
|
2810
|
-
backgroundColor: e.backgroundColor
|
|
2811
|
-
};
|
|
2812
|
-
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2813
|
-
}), ie = P(() => Mi(i.block));
|
|
2808
|
+
}[i.viewport] ?? i.viewport : ""), D = P(() => !!i.block.displayCondition), A = p(vt, null), ee = p(xt, null), j = p(bt, {}), M = P(() => j.savedBlocks?.isPicking.value === !0), te = P(() => !i.nested && j.savedBlocks?.isAvailable.value === !0 && j.savedBlocks?.canCreate.value === !0), I = P(() => i.isSelected && !M.value), ne = P(() => j.comments?.getBlockCount(i.block.id) ?? 0), re = P(() => Mi(i.block)), ie = P(() => Ni(i.block));
|
|
2814
2809
|
function ae(e) {
|
|
2815
2810
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2816
2811
|
}
|
|
@@ -2855,61 +2850,61 @@ var Ni = [
|
|
|
2855
2850
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2856
2851
|
title: N(o).blockActions.drag,
|
|
2857
2852
|
onKeydown: v
|
|
2858
|
-
}, [w(N(
|
|
2853
|
+
}, [w(N(fr), {
|
|
2859
2854
|
size: 14,
|
|
2860
2855
|
"stroke-width": 1.5
|
|
2861
|
-
})], 40,
|
|
2856
|
+
})], 40, Ii),
|
|
2862
2857
|
x("button", {
|
|
2863
2858
|
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",
|
|
2864
2859
|
"aria-label": N(o).blockActions.duplicate,
|
|
2865
2860
|
title: N(o).blockActions.duplicate,
|
|
2866
2861
|
onClick: L(se, ["stop"])
|
|
2867
|
-
}, [w(N(
|
|
2862
|
+
}, [w(N(lr), {
|
|
2868
2863
|
size: 14,
|
|
2869
2864
|
"stroke-width": 1.5
|
|
2870
|
-
})], 8,
|
|
2865
|
+
})], 8, Li),
|
|
2871
2866
|
te.value ? (O(), S("button", {
|
|
2872
2867
|
key: 0,
|
|
2873
2868
|
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",
|
|
2874
2869
|
"aria-label": N(o).blockActions.saveAsBlock,
|
|
2875
2870
|
title: N(o).blockActions.saveAsBlock,
|
|
2876
2871
|
onClick: L(ce, ["stop"])
|
|
2877
|
-
}, [w(N(
|
|
2872
|
+
}, [w(N(or), {
|
|
2878
2873
|
size: 14,
|
|
2879
2874
|
"stroke-width": 1.5
|
|
2880
|
-
})], 8,
|
|
2875
|
+
})], 8, Ri)) : F("", !0),
|
|
2881
2876
|
x("button", {
|
|
2882
2877
|
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",
|
|
2883
2878
|
"aria-label": N(o).blockActions.delete,
|
|
2884
2879
|
title: N(o).blockActions.delete,
|
|
2885
2880
|
onClick: L(oe, ["stop"])
|
|
2886
|
-
}, [w(N(
|
|
2881
|
+
}, [w(N(Yt), {
|
|
2887
2882
|
size: 14,
|
|
2888
2883
|
"stroke-width": 1.5
|
|
2889
|
-
})], 8,
|
|
2890
|
-
], 8,
|
|
2891
|
-
b.value ? (O(), S("div",
|
|
2884
|
+
})], 8, zi)
|
|
2885
|
+
], 8, Fi)) : F("", !0),
|
|
2886
|
+
b.value ? (O(), S("div", Bi, [x("span", Vi, [w(N(ur), {
|
|
2892
2887
|
size: 12,
|
|
2893
2888
|
"stroke-width": 1.5
|
|
2894
2889
|
}), T(" " + k(N(s)(N(o).blockActions.hiddenOnViewport, { viewport: E.value })), 1)])])) : F("", !0),
|
|
2895
|
-
D.value && !b.value ? (O(), S("div",
|
|
2890
|
+
D.value && !b.value ? (O(), S("div", Hi, [x("button", {
|
|
2896
2891
|
"data-testid": "condition-toggle",
|
|
2897
2892
|
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)]",
|
|
2898
2893
|
"aria-label": N(o).blockActions.conditionToggle,
|
|
2899
2894
|
title: e.block.displayCondition?.label,
|
|
2900
2895
|
onClick: L(le, ["stop"])
|
|
2901
|
-
}, [w(N(
|
|
2896
|
+
}, [w(N(dr), {
|
|
2902
2897
|
size: 12,
|
|
2903
2898
|
"stroke-width": 2
|
|
2904
|
-
})], 8,
|
|
2905
|
-
ne.value > 0 && !b.value ? (O(), S("div",
|
|
2899
|
+
})], 8, Ui)])) : F("", !0),
|
|
2900
|
+
ne.value > 0 && !b.value ? (O(), S("div", Wi, [x("button", {
|
|
2906
2901
|
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)]",
|
|
2907
2902
|
"aria-label": N(s)(N(o).blockActions.comments, { count: String(ne.value) }),
|
|
2908
2903
|
onClick: i[0] ||= L((t) => N(j).comments?.openForBlock(e.block.id), ["stop"])
|
|
2909
|
-
}, [w(N(
|
|
2904
|
+
}, [w(N(Jt), {
|
|
2910
2905
|
size: 12,
|
|
2911
2906
|
"stroke-width": 2.5
|
|
2912
|
-
}), T(" " + k(ne.value), 1)], 8,
|
|
2907
|
+
}), T(" " + k(ne.value), 1)], 8, Gi)])) : F("", !0),
|
|
2913
2908
|
ie.value ? (O(), S("div", {
|
|
2914
2909
|
key: 4,
|
|
2915
2910
|
class: "tpl-section-wrapper",
|
|
@@ -2922,31 +2917,31 @@ var Ni = [
|
|
|
2922
2917
|
class: "tpl-block-content",
|
|
2923
2918
|
style: u(re.value)
|
|
2924
2919
|
}, [c(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2925
|
-
], 10,
|
|
2920
|
+
], 10, Pi));
|
|
2926
2921
|
}
|
|
2927
|
-
}), [["__scopeId", "data-v-
|
|
2922
|
+
}), [["__scopeId", "data-v-2c239048"]]);
|
|
2928
2923
|
//#endregion
|
|
2929
2924
|
//#region src/utils/unwrapParagraph.ts
|
|
2930
|
-
function
|
|
2925
|
+
function qi(e) {
|
|
2931
2926
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2932
2927
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2933
2928
|
}
|
|
2934
2929
|
//#endregion
|
|
2935
2930
|
//#region src/components/blocks/TitleBlock.vue
|
|
2936
|
-
var
|
|
2931
|
+
var Ji = /* @__PURE__ */ I({
|
|
2937
2932
|
__name: "TitleBlock",
|
|
2938
2933
|
props: {
|
|
2939
2934
|
block: {},
|
|
2940
2935
|
viewport: {}
|
|
2941
2936
|
},
|
|
2942
2937
|
setup(e) {
|
|
2943
|
-
let t = e, n = y(() => import("./TitleEditor-
|
|
2938
|
+
let t = e, n = y(() => import("./TitleEditor-Cs2tELCL.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Di(() => t.block.content), l = P(() => {
|
|
2944
2939
|
let e = {
|
|
2945
2940
|
fontSize: `${Le[t.block.level]}px`,
|
|
2946
2941
|
textAlign: t.block.textAlign
|
|
2947
2942
|
};
|
|
2948
2943
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2949
|
-
}), f = P(() => `h${t.block.level}`), p = P(() =>
|
|
2944
|
+
}), f = P(() => `h${t.block.level}`), p = P(() => qi(o.value));
|
|
2950
2945
|
return (t, o) => (O(), S("div", {
|
|
2951
2946
|
ref_key: "blockRef",
|
|
2952
2947
|
ref: i,
|
|
@@ -2964,7 +2959,7 @@ var qi = /* @__PURE__ */ I({
|
|
|
2964
2959
|
"onDone"
|
|
2965
2960
|
])) : (O(), A(d(f.value), {
|
|
2966
2961
|
key: 1,
|
|
2967
|
-
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-tight tpl:outline-none
|
|
2962
|
+
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-tight tpl:outline-none",
|
|
2968
2963
|
style: { color: "inherit" },
|
|
2969
2964
|
innerHTML: p.value
|
|
2970
2965
|
}, null, 8, ["innerHTML"]))], 36));
|
|
@@ -2972,88 +2967,88 @@ var qi = /* @__PURE__ */ I({
|
|
|
2972
2967
|
});
|
|
2973
2968
|
//#endregion
|
|
2974
2969
|
//#region src/utils/sectionColumnDrop.ts
|
|
2975
|
-
function
|
|
2970
|
+
function Yi(e) {
|
|
2976
2971
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2977
2972
|
}
|
|
2978
2973
|
//#endregion
|
|
2979
2974
|
//#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
|
|
2980
|
-
var
|
|
2975
|
+
var Xi = Object.defineProperty, Zi = Object.getOwnPropertySymbols, Qi = Object.prototype.hasOwnProperty, $i = Object.prototype.propertyIsEnumerable, ea = (e, t, n) => t in e ? Xi(e, t, {
|
|
2981
2976
|
enumerable: !0,
|
|
2982
2977
|
configurable: !0,
|
|
2983
2978
|
writable: !0,
|
|
2984
2979
|
value: n
|
|
2985
|
-
}) : e[t] = n,
|
|
2986
|
-
for (var n in t ||= {})
|
|
2987
|
-
if (
|
|
2980
|
+
}) : e[t] = n, ta = (e, t) => {
|
|
2981
|
+
for (var n in t ||= {}) Qi.call(t, n) && ea(e, n, t[n]);
|
|
2982
|
+
if (Zi) for (var n of Zi(t)) $i.call(t, n) && ea(e, n, t[n]);
|
|
2988
2983
|
return e;
|
|
2989
|
-
},
|
|
2984
|
+
}, na = (e, t) => {
|
|
2990
2985
|
var n = {};
|
|
2991
|
-
for (var r in e)
|
|
2992
|
-
if (e != null &&
|
|
2986
|
+
for (var r in e) Qi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2987
|
+
if (e != null && Zi) for (var r of Zi(e)) t.indexOf(r) < 0 && $i.call(e, r) && (n[r] = e[r]);
|
|
2993
2988
|
return n;
|
|
2994
|
-
},
|
|
2995
|
-
function ra(e) {
|
|
2996
|
-
console.warn(na + e);
|
|
2997
|
-
}
|
|
2989
|
+
}, ra = "[vue-draggable-plus]: ";
|
|
2998
2990
|
function ia(e) {
|
|
2999
|
-
console.
|
|
2991
|
+
console.warn(ra + e);
|
|
2992
|
+
}
|
|
2993
|
+
function aa(e) {
|
|
2994
|
+
console.error(ra + e);
|
|
3000
2995
|
}
|
|
3001
|
-
function
|
|
2996
|
+
function oa(e, t, n) {
|
|
3002
2997
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
3003
2998
|
}
|
|
3004
|
-
function
|
|
2999
|
+
function sa(e) {
|
|
3005
3000
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
3006
3001
|
}
|
|
3007
|
-
function
|
|
3008
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
3002
|
+
function ca(e) {
|
|
3003
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[sa(n)] = e[n]), t), {});
|
|
3009
3004
|
}
|
|
3010
|
-
function
|
|
3005
|
+
function la(e, t) {
|
|
3011
3006
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
3012
3007
|
}
|
|
3013
|
-
function
|
|
3008
|
+
function ua(e, t, n) {
|
|
3014
3009
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
3015
3010
|
}
|
|
3016
|
-
function
|
|
3011
|
+
function da(e) {
|
|
3017
3012
|
return e === void 0;
|
|
3018
3013
|
}
|
|
3019
|
-
function
|
|
3014
|
+
function fa(e) {
|
|
3020
3015
|
return typeof e == "string";
|
|
3021
3016
|
}
|
|
3022
|
-
function
|
|
3017
|
+
function pa(e, t, n) {
|
|
3023
3018
|
let r = e.children[n];
|
|
3024
3019
|
e.insertBefore(t, r);
|
|
3025
3020
|
}
|
|
3026
|
-
function
|
|
3021
|
+
function ma(e) {
|
|
3027
3022
|
e.parentNode && e.parentNode.removeChild(e);
|
|
3028
3023
|
}
|
|
3029
|
-
function
|
|
3024
|
+
function ha(e, t = document) {
|
|
3030
3025
|
let n = null;
|
|
3031
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
3026
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || ia(`Element not found: ${e}`), n;
|
|
3032
3027
|
}
|
|
3033
|
-
function
|
|
3028
|
+
function ga(e, t, n = null) {
|
|
3034
3029
|
return function(...r) {
|
|
3035
3030
|
return e.apply(n, r), t.apply(n, r);
|
|
3036
3031
|
};
|
|
3037
3032
|
}
|
|
3038
|
-
function
|
|
3039
|
-
let n =
|
|
3033
|
+
function _a(e, t) {
|
|
3034
|
+
let n = ta({}, e);
|
|
3040
3035
|
return Object.keys(t).forEach((r) => {
|
|
3041
|
-
n[r] ? n[r] =
|
|
3036
|
+
n[r] ? n[r] = ga(e[r], t[r]) : n[r] = t[r];
|
|
3042
3037
|
}), n;
|
|
3043
3038
|
}
|
|
3044
|
-
function
|
|
3039
|
+
function va(e) {
|
|
3045
3040
|
return e instanceof HTMLElement;
|
|
3046
3041
|
}
|
|
3047
|
-
function
|
|
3042
|
+
function ya(e, t) {
|
|
3048
3043
|
Object.keys(e).forEach((n) => {
|
|
3049
3044
|
t(n, e[n]);
|
|
3050
3045
|
});
|
|
3051
3046
|
}
|
|
3052
|
-
function
|
|
3047
|
+
function ba(e) {
|
|
3053
3048
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
3054
3049
|
}
|
|
3055
|
-
var
|
|
3056
|
-
function
|
|
3050
|
+
var xa = Object.assign;
|
|
3051
|
+
function Sa(e, t) {
|
|
3057
3052
|
var n = Object.keys(e);
|
|
3058
3053
|
if (Object.getOwnPropertySymbols) {
|
|
3059
3054
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -3063,26 +3058,26 @@ function xa(e, t) {
|
|
|
3063
3058
|
}
|
|
3064
3059
|
return n;
|
|
3065
3060
|
}
|
|
3066
|
-
function
|
|
3061
|
+
function Ca(e) {
|
|
3067
3062
|
for (var t = 1; t < arguments.length; t++) {
|
|
3068
3063
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
3069
|
-
t % 2 ?
|
|
3070
|
-
|
|
3071
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
3064
|
+
t % 2 ? Sa(Object(n), !0).forEach(function(t) {
|
|
3065
|
+
Ta(e, t, n[t]);
|
|
3066
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Sa(Object(n)).forEach(function(t) {
|
|
3072
3067
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
3073
3068
|
});
|
|
3074
3069
|
}
|
|
3075
3070
|
return e;
|
|
3076
3071
|
}
|
|
3077
|
-
function
|
|
3072
|
+
function wa(e) {
|
|
3078
3073
|
"@babel/helpers - typeof";
|
|
3079
|
-
return
|
|
3074
|
+
return wa = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
3080
3075
|
return typeof e;
|
|
3081
3076
|
} : function(e) {
|
|
3082
3077
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3083
|
-
},
|
|
3078
|
+
}, wa(e);
|
|
3084
3079
|
}
|
|
3085
|
-
function
|
|
3080
|
+
function Ta(e, t, n) {
|
|
3086
3081
|
return t in e ? Object.defineProperty(e, t, {
|
|
3087
3082
|
value: n,
|
|
3088
3083
|
enumerable: !0,
|
|
@@ -3090,45 +3085,45 @@ function wa(e, t, n) {
|
|
|
3090
3085
|
writable: !0
|
|
3091
3086
|
}) : e[t] = n, e;
|
|
3092
3087
|
}
|
|
3093
|
-
function
|
|
3094
|
-
return
|
|
3088
|
+
function Ea() {
|
|
3089
|
+
return Ea = Object.assign || function(e) {
|
|
3095
3090
|
for (var t = 1; t < arguments.length; t++) {
|
|
3096
3091
|
var n = arguments[t];
|
|
3097
3092
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3098
3093
|
}
|
|
3099
3094
|
return e;
|
|
3100
|
-
},
|
|
3095
|
+
}, Ea.apply(this, arguments);
|
|
3101
3096
|
}
|
|
3102
|
-
function
|
|
3097
|
+
function Da(e, t) {
|
|
3103
3098
|
if (e == null) return {};
|
|
3104
3099
|
var n = {}, r = Object.keys(e), i, a;
|
|
3105
3100
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
3106
3101
|
return n;
|
|
3107
3102
|
}
|
|
3108
|
-
function
|
|
3103
|
+
function Oa(e, t) {
|
|
3109
3104
|
if (e == null) return {};
|
|
3110
|
-
var n =
|
|
3105
|
+
var n = Da(e, t), r, i;
|
|
3111
3106
|
if (Object.getOwnPropertySymbols) {
|
|
3112
3107
|
var a = Object.getOwnPropertySymbols(e);
|
|
3113
3108
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
3114
3109
|
}
|
|
3115
3110
|
return n;
|
|
3116
3111
|
}
|
|
3117
|
-
var
|
|
3118
|
-
function
|
|
3112
|
+
var ka = "1.15.2";
|
|
3113
|
+
function Aa(e) {
|
|
3119
3114
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
3120
3115
|
}
|
|
3121
|
-
var
|
|
3116
|
+
var ja = Aa(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ma = Aa(/Edge/i), Na = Aa(/firefox/i), Pa = Aa(/safari/i) && !Aa(/chrome/i) && !Aa(/android/i), Fa = Aa(/iP(ad|od|hone)/i), Ia = Aa(/chrome/i) && Aa(/android/i), La = {
|
|
3122
3117
|
capture: !1,
|
|
3123
3118
|
passive: !1
|
|
3124
3119
|
};
|
|
3125
3120
|
function R(e, t, n) {
|
|
3126
|
-
e.addEventListener(t, n, !
|
|
3121
|
+
e.addEventListener(t, n, !ja && La);
|
|
3127
3122
|
}
|
|
3128
3123
|
function z(e, t, n) {
|
|
3129
|
-
e.removeEventListener(t, n, !
|
|
3124
|
+
e.removeEventListener(t, n, !ja && La);
|
|
3130
3125
|
}
|
|
3131
|
-
function
|
|
3126
|
+
function Ra(e, t) {
|
|
3132
3127
|
if (t) {
|
|
3133
3128
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
3134
3129
|
if (e.matches) return e.matches(t);
|
|
@@ -3140,41 +3135,41 @@ function La(e, t) {
|
|
|
3140
3135
|
return !1;
|
|
3141
3136
|
}
|
|
3142
3137
|
}
|
|
3143
|
-
function
|
|
3138
|
+
function za(e) {
|
|
3144
3139
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
3145
3140
|
}
|
|
3146
|
-
function
|
|
3141
|
+
function Ba(e, t, n, r) {
|
|
3147
3142
|
if (e) {
|
|
3148
3143
|
n ||= document;
|
|
3149
3144
|
do {
|
|
3150
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
3145
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Ra(e, t) : Ra(e, t)) || r && e === n) return e;
|
|
3151
3146
|
if (e === n) break;
|
|
3152
|
-
} while (e =
|
|
3147
|
+
} while (e = za(e));
|
|
3153
3148
|
}
|
|
3154
3149
|
return null;
|
|
3155
3150
|
}
|
|
3156
|
-
var
|
|
3157
|
-
function
|
|
3158
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
3151
|
+
var Va = /\s+/g;
|
|
3152
|
+
function Ha(e, t, n) {
|
|
3153
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Va, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Va, " "));
|
|
3159
3154
|
}
|
|
3160
|
-
function
|
|
3155
|
+
function B(e, t, n) {
|
|
3161
3156
|
var r = e && e.style;
|
|
3162
3157
|
if (r) {
|
|
3163
3158
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
3164
3159
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
3165
3160
|
}
|
|
3166
3161
|
}
|
|
3167
|
-
function
|
|
3162
|
+
function Ua(e, t) {
|
|
3168
3163
|
var n = "";
|
|
3169
3164
|
if (typeof e == "string") n = e;
|
|
3170
3165
|
else do {
|
|
3171
|
-
var r =
|
|
3166
|
+
var r = B(e, "transform");
|
|
3172
3167
|
r && r !== "none" && (n = r + " " + n);
|
|
3173
3168
|
} while (!t && (e = e.parentNode));
|
|
3174
3169
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
3175
3170
|
return i && new i(n);
|
|
3176
3171
|
}
|
|
3177
|
-
function
|
|
3172
|
+
function Wa(e, t, n) {
|
|
3178
3173
|
if (e) {
|
|
3179
3174
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
3180
3175
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -3182,21 +3177,21 @@ function Ha(e, t, n) {
|
|
|
3182
3177
|
}
|
|
3183
3178
|
return [];
|
|
3184
3179
|
}
|
|
3185
|
-
function
|
|
3180
|
+
function Ga() {
|
|
3186
3181
|
return document.scrollingElement || document.documentElement;
|
|
3187
3182
|
}
|
|
3188
|
-
function
|
|
3183
|
+
function V(e, t, n, r, i) {
|
|
3189
3184
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
3190
3185
|
var a, o, s, c, l, u, d;
|
|
3191
|
-
if (e !== window && e.parentNode && e !==
|
|
3192
|
-
if (i && i.getBoundingClientRect && (
|
|
3186
|
+
if (e !== window && e.parentNode && e !== Ga() ? (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, !ja)) do
|
|
3187
|
+
if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
|
|
3193
3188
|
var f = i.getBoundingClientRect();
|
|
3194
|
-
o -= f.top + parseInt(
|
|
3189
|
+
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;
|
|
3195
3190
|
break;
|
|
3196
3191
|
}
|
|
3197
3192
|
while (i = i.parentNode);
|
|
3198
3193
|
if (r && e !== window) {
|
|
3199
|
-
var p =
|
|
3194
|
+
var p = Ua(i || e), m = p && p.a, h = p && p.d;
|
|
3200
3195
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
3201
3196
|
}
|
|
3202
3197
|
return {
|
|
@@ -3209,18 +3204,18 @@ function H(e, t, n, r, i) {
|
|
|
3209
3204
|
};
|
|
3210
3205
|
}
|
|
3211
3206
|
}
|
|
3212
|
-
function
|
|
3213
|
-
for (var r =
|
|
3214
|
-
var a =
|
|
3207
|
+
function Ka(e, t, n) {
|
|
3208
|
+
for (var r = Qa(e, !0), i = V(e)[t]; r;) {
|
|
3209
|
+
var a = V(r)[n], o = void 0;
|
|
3215
3210
|
if (o = i >= a, !o) return r;
|
|
3216
|
-
if (r ===
|
|
3217
|
-
r =
|
|
3211
|
+
if (r === Ga()) break;
|
|
3212
|
+
r = Qa(r, !1);
|
|
3218
3213
|
}
|
|
3219
3214
|
return !1;
|
|
3220
3215
|
}
|
|
3221
|
-
function
|
|
3216
|
+
function qa(e, t, n, r) {
|
|
3222
3217
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
3223
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
3218
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ba(o[a], n.draggable, e, !1)) {
|
|
3224
3219
|
if (i === t) return o[a];
|
|
3225
3220
|
i++;
|
|
3226
3221
|
}
|
|
@@ -3228,96 +3223,96 @@ function Ga(e, t, n, r) {
|
|
|
3228
3223
|
}
|
|
3229
3224
|
return null;
|
|
3230
3225
|
}
|
|
3231
|
-
function
|
|
3232
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
3226
|
+
function Ja(e, t) {
|
|
3227
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !Ra(n, t));) n = n.previousElementSibling;
|
|
3233
3228
|
return n || null;
|
|
3234
3229
|
}
|
|
3235
|
-
function
|
|
3230
|
+
function Ya(e, t) {
|
|
3236
3231
|
var n = 0;
|
|
3237
3232
|
if (!e || !e.parentNode) return -1;
|
|
3238
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
3233
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Ra(e, t)) && n++;
|
|
3239
3234
|
return n;
|
|
3240
3235
|
}
|
|
3241
|
-
function
|
|
3242
|
-
var t = 0, n = 0, r =
|
|
3236
|
+
function Xa(e) {
|
|
3237
|
+
var t = 0, n = 0, r = Ga();
|
|
3243
3238
|
if (e) do {
|
|
3244
|
-
var i =
|
|
3239
|
+
var i = Ua(e), a = i.a, o = i.d;
|
|
3245
3240
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
3246
3241
|
} while (e !== r && (e = e.parentNode));
|
|
3247
3242
|
return [t, n];
|
|
3248
3243
|
}
|
|
3249
|
-
function
|
|
3244
|
+
function Za(e, t) {
|
|
3250
3245
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
3251
3246
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
3252
3247
|
}
|
|
3253
3248
|
return -1;
|
|
3254
3249
|
}
|
|
3255
|
-
function
|
|
3256
|
-
if (!e || !e.getBoundingClientRect) return
|
|
3250
|
+
function Qa(e, t) {
|
|
3251
|
+
if (!e || !e.getBoundingClientRect) return Ga();
|
|
3257
3252
|
var n = e, r = !1;
|
|
3258
3253
|
do
|
|
3259
3254
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
3260
|
-
var i =
|
|
3255
|
+
var i = B(n);
|
|
3261
3256
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
3262
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
3257
|
+
if (!n.getBoundingClientRect || n === document.body) return Ga();
|
|
3263
3258
|
if (r || t) return n;
|
|
3264
3259
|
r = !0;
|
|
3265
3260
|
}
|
|
3266
3261
|
}
|
|
3267
3262
|
while (n = n.parentNode);
|
|
3268
|
-
return
|
|
3263
|
+
return Ga();
|
|
3269
3264
|
}
|
|
3270
|
-
function
|
|
3265
|
+
function $a(e, t) {
|
|
3271
3266
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
3272
3267
|
return e;
|
|
3273
3268
|
}
|
|
3274
|
-
function
|
|
3269
|
+
function eo(e, t) {
|
|
3275
3270
|
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);
|
|
3276
3271
|
}
|
|
3277
|
-
var
|
|
3278
|
-
function
|
|
3272
|
+
var to;
|
|
3273
|
+
function no(e, t) {
|
|
3279
3274
|
return function() {
|
|
3280
|
-
if (
|
|
3275
|
+
if (!to) {
|
|
3281
3276
|
var n = arguments, r = this;
|
|
3282
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
3283
|
-
|
|
3277
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), to = setTimeout(function() {
|
|
3278
|
+
to = void 0;
|
|
3284
3279
|
}, t);
|
|
3285
3280
|
}
|
|
3286
3281
|
};
|
|
3287
3282
|
}
|
|
3288
|
-
function
|
|
3289
|
-
clearTimeout(
|
|
3283
|
+
function ro() {
|
|
3284
|
+
clearTimeout(to), to = void 0;
|
|
3290
3285
|
}
|
|
3291
|
-
function
|
|
3286
|
+
function io(e, t, n) {
|
|
3292
3287
|
e.scrollLeft += t, e.scrollTop += n;
|
|
3293
3288
|
}
|
|
3294
|
-
function
|
|
3289
|
+
function ao(e) {
|
|
3295
3290
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
3296
3291
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
3297
3292
|
}
|
|
3298
|
-
function
|
|
3293
|
+
function oo(e, t, n) {
|
|
3299
3294
|
var r = {};
|
|
3300
3295
|
return Array.from(e.children).forEach(function(i) {
|
|
3301
|
-
if (!(!
|
|
3302
|
-
var a =
|
|
3296
|
+
if (!(!Ba(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
3297
|
+
var a = V(i);
|
|
3303
3298
|
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);
|
|
3304
3299
|
}
|
|
3305
3300
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
3306
3301
|
}
|
|
3307
|
-
var
|
|
3308
|
-
function
|
|
3302
|
+
var so = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
3303
|
+
function co() {
|
|
3309
3304
|
var e = [], t;
|
|
3310
3305
|
return {
|
|
3311
3306
|
captureAnimationState: function() {
|
|
3312
3307
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
3313
|
-
if (
|
|
3308
|
+
if (B(t, "display") !== "none" && t !== Q.ghost) {
|
|
3314
3309
|
e.push({
|
|
3315
3310
|
target: t,
|
|
3316
|
-
rect:
|
|
3311
|
+
rect: V(t)
|
|
3317
3312
|
});
|
|
3318
|
-
var n =
|
|
3313
|
+
var n = Ca({}, e[e.length - 1].rect);
|
|
3319
3314
|
if (t.thisAnimationDuration) {
|
|
3320
|
-
var r =
|
|
3315
|
+
var r = Ua(t, !0);
|
|
3321
3316
|
r && (n.top -= r.f, n.left -= r.e);
|
|
3322
3317
|
}
|
|
3323
3318
|
t.fromRect = n;
|
|
@@ -3328,7 +3323,7 @@ function oo() {
|
|
|
3328
3323
|
e.push(t);
|
|
3329
3324
|
},
|
|
3330
3325
|
removeAnimationState: function(t) {
|
|
3331
|
-
e.splice(
|
|
3326
|
+
e.splice(Za(e, { target: t }), 1);
|
|
3332
3327
|
},
|
|
3333
3328
|
animateAll: function(n) {
|
|
3334
3329
|
var r = this;
|
|
@@ -3338,8 +3333,8 @@ function oo() {
|
|
|
3338
3333
|
}
|
|
3339
3334
|
var i = !1, a = 0;
|
|
3340
3335
|
e.forEach(function(e) {
|
|
3341
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
3342
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
3336
|
+
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Ua(n, !0);
|
|
3337
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && eo(c, s) && !eo(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = uo(u, c, l, r.options)), eo(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() {
|
|
3343
3338
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
3344
3339
|
}, t), n.thisAnimationDuration = t);
|
|
3345
3340
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -3348,27 +3343,27 @@ function oo() {
|
|
|
3348
3343
|
},
|
|
3349
3344
|
animate: function(e, t, n, r) {
|
|
3350
3345
|
if (r) {
|
|
3351
|
-
|
|
3352
|
-
var i =
|
|
3353
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
3354
|
-
|
|
3346
|
+
B(e, "transition", ""), B(e, "transform", "");
|
|
3347
|
+
var i = Ua(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
3348
|
+
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = lo(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() {
|
|
3349
|
+
B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
3355
3350
|
}, r);
|
|
3356
3351
|
}
|
|
3357
3352
|
}
|
|
3358
3353
|
};
|
|
3359
3354
|
}
|
|
3360
|
-
function
|
|
3355
|
+
function lo(e) {
|
|
3361
3356
|
return e.offsetWidth;
|
|
3362
3357
|
}
|
|
3363
|
-
function
|
|
3358
|
+
function uo(e, t, n, r) {
|
|
3364
3359
|
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;
|
|
3365
3360
|
}
|
|
3366
|
-
var
|
|
3361
|
+
var fo = [], po = { initializeByDefault: !0 }, mo = {
|
|
3367
3362
|
mount: function(e) {
|
|
3368
|
-
for (var t in
|
|
3369
|
-
|
|
3363
|
+
for (var t in po) po.hasOwnProperty(t) && !(t in e) && (e[t] = po[t]);
|
|
3364
|
+
fo.forEach(function(t) {
|
|
3370
3365
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
3371
|
-
}),
|
|
3366
|
+
}), fo.push(e);
|
|
3372
3367
|
},
|
|
3373
3368
|
pluginEvent: function(e, t, n) {
|
|
3374
3369
|
var r = this;
|
|
@@ -3376,16 +3371,16 @@ var lo = [], uo = { initializeByDefault: !0 }, fo = {
|
|
|
3376
3371
|
r.eventCanceled = !0;
|
|
3377
3372
|
};
|
|
3378
3373
|
var i = e + "Global";
|
|
3379
|
-
|
|
3380
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
3374
|
+
fo.forEach(function(r) {
|
|
3375
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Ca({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Ca({ sortable: t }, n)));
|
|
3381
3376
|
});
|
|
3382
3377
|
},
|
|
3383
3378
|
initializePlugins: function(e, t, n, r) {
|
|
3384
|
-
for (var i in
|
|
3379
|
+
for (var i in fo.forEach(function(r) {
|
|
3385
3380
|
var i = r.pluginName;
|
|
3386
3381
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
3387
3382
|
var a = new r(e, t, e.options);
|
|
3388
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
3383
|
+
a.sortable = e, a.options = e.options, e[i] = a, Ea(n, a.defaults);
|
|
3389
3384
|
}
|
|
3390
3385
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
3391
3386
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -3394,59 +3389,59 @@ var lo = [], uo = { initializeByDefault: !0 }, fo = {
|
|
|
3394
3389
|
},
|
|
3395
3390
|
getEventProperties: function(e, t) {
|
|
3396
3391
|
var n = {};
|
|
3397
|
-
return
|
|
3398
|
-
typeof r.eventProperties == "function" &&
|
|
3392
|
+
return fo.forEach(function(r) {
|
|
3393
|
+
typeof r.eventProperties == "function" && Ea(n, r.eventProperties.call(t[r.pluginName], e));
|
|
3399
3394
|
}), n;
|
|
3400
3395
|
},
|
|
3401
3396
|
modifyOption: function(e, t, n) {
|
|
3402
3397
|
var r;
|
|
3403
|
-
return
|
|
3398
|
+
return fo.forEach(function(i) {
|
|
3404
3399
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
3405
3400
|
}), r;
|
|
3406
3401
|
}
|
|
3407
3402
|
};
|
|
3408
|
-
function
|
|
3403
|
+
function ho(e) {
|
|
3409
3404
|
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;
|
|
3410
|
-
if (t ||= n && n[
|
|
3405
|
+
if (t ||= n && n[so], t) {
|
|
3411
3406
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
3412
|
-
window.CustomEvent && !
|
|
3407
|
+
window.CustomEvent && !ja && !Ma ? h = new CustomEvent(r, {
|
|
3413
3408
|
bubbles: !0,
|
|
3414
3409
|
cancelable: !0
|
|
3415
3410
|
}) : (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;
|
|
3416
|
-
var v =
|
|
3411
|
+
var v = Ca(Ca({}, m), mo.getEventProperties(r, t));
|
|
3417
3412
|
for (var y in v) h[y] = v[y];
|
|
3418
3413
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
3419
3414
|
}
|
|
3420
3415
|
}
|
|
3421
|
-
var
|
|
3422
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
3423
|
-
|
|
3424
|
-
dragEl:
|
|
3425
|
-
parentEl:
|
|
3426
|
-
ghostEl:
|
|
3427
|
-
rootEl:
|
|
3428
|
-
nextEl:
|
|
3429
|
-
lastDownEl:
|
|
3430
|
-
cloneEl:
|
|
3431
|
-
cloneHidden:
|
|
3432
|
-
dragStarted:
|
|
3416
|
+
var go = ["evt"], H = function(e, t) {
|
|
3417
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Oa(n, go);
|
|
3418
|
+
mo.pluginEvent.bind(Q)(e, t, Ca({
|
|
3419
|
+
dragEl: W,
|
|
3420
|
+
parentEl: G,
|
|
3421
|
+
ghostEl: K,
|
|
3422
|
+
rootEl: q,
|
|
3423
|
+
nextEl: _o,
|
|
3424
|
+
lastDownEl: vo,
|
|
3425
|
+
cloneEl: J,
|
|
3426
|
+
cloneHidden: yo,
|
|
3427
|
+
dragStarted: No,
|
|
3433
3428
|
putSortable: X,
|
|
3434
3429
|
activeSortable: Q.active,
|
|
3435
3430
|
originalEvent: r,
|
|
3436
|
-
oldIndex:
|
|
3437
|
-
oldDraggableIndex:
|
|
3438
|
-
newIndex:
|
|
3439
|
-
newDraggableIndex:
|
|
3440
|
-
hideGhostForTarget:
|
|
3441
|
-
unhideGhostForTarget:
|
|
3431
|
+
oldIndex: bo,
|
|
3432
|
+
oldDraggableIndex: xo,
|
|
3433
|
+
newIndex: Y,
|
|
3434
|
+
newDraggableIndex: So,
|
|
3435
|
+
hideGhostForTarget: Zo,
|
|
3436
|
+
unhideGhostForTarget: Qo,
|
|
3442
3437
|
cloneNowHidden: function() {
|
|
3443
|
-
|
|
3438
|
+
yo = !0;
|
|
3444
3439
|
},
|
|
3445
3440
|
cloneNowShown: function() {
|
|
3446
|
-
|
|
3441
|
+
yo = !1;
|
|
3447
3442
|
},
|
|
3448
3443
|
dispatchSortableEvent: function(e) {
|
|
3449
|
-
|
|
3444
|
+
U({
|
|
3450
3445
|
sortable: t,
|
|
3451
3446
|
name: e,
|
|
3452
3447
|
originalEvent: r
|
|
@@ -3454,46 +3449,46 @@ var mo = ["evt"], U = function(e, t) {
|
|
|
3454
3449
|
}
|
|
3455
3450
|
}, i));
|
|
3456
3451
|
};
|
|
3457
|
-
function
|
|
3458
|
-
|
|
3452
|
+
function U(e) {
|
|
3453
|
+
ho(Ca({
|
|
3459
3454
|
putSortable: X,
|
|
3460
|
-
cloneEl:
|
|
3461
|
-
targetEl:
|
|
3462
|
-
rootEl:
|
|
3463
|
-
oldIndex:
|
|
3464
|
-
oldDraggableIndex:
|
|
3465
|
-
newIndex:
|
|
3466
|
-
newDraggableIndex:
|
|
3455
|
+
cloneEl: J,
|
|
3456
|
+
targetEl: W,
|
|
3457
|
+
rootEl: q,
|
|
3458
|
+
oldIndex: bo,
|
|
3459
|
+
oldDraggableIndex: xo,
|
|
3460
|
+
newIndex: Y,
|
|
3461
|
+
newDraggableIndex: So
|
|
3467
3462
|
}, e));
|
|
3468
3463
|
}
|
|
3469
|
-
var G, K, q,
|
|
3470
|
-
if (
|
|
3471
|
-
if (
|
|
3464
|
+
var W, G, K, q, _o, vo, J, yo, bo, Y, xo, So, Co, X, wo = !1, To = !1, Eo = [], Do, Oo, ko, Ao, jo, Mo, No, Po, Fo, Io = !1, Lo = !1, Ro, Z, zo = [], Bo = !1, Vo = [], Ho = typeof document < "u", Uo = Fa, Wo = Ma || ja ? "cssFloat" : "float", Go = Ho && !Ia && !Fa && "draggable" in document.createElement("div"), Ko = function() {
|
|
3465
|
+
if (Ho) {
|
|
3466
|
+
if (ja) return !1;
|
|
3472
3467
|
var e = document.createElement("x");
|
|
3473
3468
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3474
3469
|
}
|
|
3475
|
-
}(),
|
|
3476
|
-
var n =
|
|
3470
|
+
}(), qo = function(e, t) {
|
|
3471
|
+
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = qa(e, 0, t), a = qa(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;
|
|
3477
3472
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3478
3473
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3479
3474
|
if (i && o.float && o.float !== "none") {
|
|
3480
3475
|
var u = o.float === "left" ? "left" : "right";
|
|
3481
3476
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3482
3477
|
}
|
|
3483
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3484
|
-
},
|
|
3478
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Wo] === "none" || a && n[Wo] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3479
|
+
}, Jo = function(e, t, n) {
|
|
3485
3480
|
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;
|
|
3486
3481
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3487
|
-
},
|
|
3482
|
+
}, Yo = function(e, t) {
|
|
3488
3483
|
var n;
|
|
3489
|
-
return
|
|
3490
|
-
var i = r[
|
|
3491
|
-
if (!(!i ||
|
|
3492
|
-
var a =
|
|
3484
|
+
return Eo.some(function(r) {
|
|
3485
|
+
var i = r[so].options.emptyInsertThreshold;
|
|
3486
|
+
if (!(!i || Ja(r))) {
|
|
3487
|
+
var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3493
3488
|
if (o && s) return n = r;
|
|
3494
3489
|
}
|
|
3495
3490
|
}), n;
|
|
3496
|
-
},
|
|
3491
|
+
}, Xo = function(e) {
|
|
3497
3492
|
function t(e, n) {
|
|
3498
3493
|
return function(r, i, a, o) {
|
|
3499
3494
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3506,31 +3501,31 @@ var G, K, q, J, ho, go, Y, _o, vo, yo, bo, xo, So, X, Co = !1, wo = !1, To = [],
|
|
|
3506
3501
|
};
|
|
3507
3502
|
}
|
|
3508
3503
|
var n = {}, r = e.group;
|
|
3509
|
-
(!r ||
|
|
3510
|
-
}, Xo = function() {
|
|
3511
|
-
!Go && q && V(q, "display", "none");
|
|
3504
|
+
(!r || wa(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;
|
|
3512
3505
|
}, Zo = function() {
|
|
3513
|
-
!
|
|
3506
|
+
!Ko && K && B(K, "display", "none");
|
|
3507
|
+
}, Qo = function() {
|
|
3508
|
+
!Ko && K && B(K, "display", "");
|
|
3514
3509
|
};
|
|
3515
|
-
|
|
3516
|
-
if (
|
|
3510
|
+
Ho && !Ia && document.addEventListener("click", function(e) {
|
|
3511
|
+
if (To) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), To = !1, !1;
|
|
3517
3512
|
}, !0);
|
|
3518
|
-
var
|
|
3519
|
-
if (
|
|
3513
|
+
var $o = function(e) {
|
|
3514
|
+
if (W) {
|
|
3520
3515
|
e = e.touches ? e.touches[0] : e;
|
|
3521
|
-
var t =
|
|
3516
|
+
var t = Yo(e.clientX, e.clientY);
|
|
3522
3517
|
if (t) {
|
|
3523
3518
|
var n = {};
|
|
3524
3519
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3525
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3520
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[so]._onDragOver(n);
|
|
3526
3521
|
}
|
|
3527
3522
|
}
|
|
3528
|
-
},
|
|
3529
|
-
|
|
3523
|
+
}, es = function(e) {
|
|
3524
|
+
W && W.parentNode[so]._isOutsideThisEl(e.target);
|
|
3530
3525
|
};
|
|
3531
3526
|
function Q(e, t) {
|
|
3532
3527
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3533
|
-
this.el = e, this.options = t =
|
|
3528
|
+
this.el = e, this.options = t = Ea({}, t), e[so] = this;
|
|
3534
3529
|
var n = {
|
|
3535
3530
|
group: null,
|
|
3536
3531
|
sort: !0,
|
|
@@ -3543,7 +3538,7 @@ function Q(e, t) {
|
|
|
3543
3538
|
invertedSwapThreshold: null,
|
|
3544
3539
|
removeCloneOnHide: !0,
|
|
3545
3540
|
direction: function() {
|
|
3546
|
-
return
|
|
3541
|
+
return qo(e, this.options);
|
|
3547
3542
|
},
|
|
3548
3543
|
ghostClass: "sortable-ghost",
|
|
3549
3544
|
chosenClass: "sortable-chosen",
|
|
@@ -3570,75 +3565,75 @@ function Q(e, t) {
|
|
|
3570
3565
|
x: 0,
|
|
3571
3566
|
y: 0
|
|
3572
3567
|
},
|
|
3573
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3568
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Pa,
|
|
3574
3569
|
emptyInsertThreshold: 5
|
|
3575
3570
|
};
|
|
3576
|
-
for (var r in
|
|
3577
|
-
for (var i in
|
|
3578
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3571
|
+
for (var r in mo.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3572
|
+
for (var i in Xo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3573
|
+
this.nativeDraggable = !t.forceFallback && Go, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? R(e, "pointerdown", this._onTapStart) : (R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart)), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Eo.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Ea(this, co());
|
|
3579
3574
|
}
|
|
3580
3575
|
Q.prototype = {
|
|
3581
3576
|
constructor: Q,
|
|
3582
3577
|
_isOutsideThisEl: function(e) {
|
|
3583
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3578
|
+
!this.el.contains(e) && e !== this.el && (Po = null);
|
|
3584
3579
|
},
|
|
3585
3580
|
_getDirection: function(e, t) {
|
|
3586
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
3581
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
3587
3582
|
},
|
|
3588
3583
|
_onTapStart: function(e) {
|
|
3589
3584
|
if (e.cancelable) {
|
|
3590
3585
|
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;
|
|
3591
|
-
if (
|
|
3592
|
-
if (
|
|
3586
|
+
if (us(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Pa && s && s.tagName.toUpperCase() === "SELECT") && (s = Ba(s, r.draggable, n, !1), !(s && s.animated) && vo !== s)) {
|
|
3587
|
+
if (bo = Ya(s), xo = Ya(s, r.draggable), typeof l == "function") {
|
|
3593
3588
|
if (l.call(this, e, s, this)) {
|
|
3594
|
-
|
|
3589
|
+
U({
|
|
3595
3590
|
sortable: t,
|
|
3596
3591
|
rootEl: c,
|
|
3597
3592
|
name: "filter",
|
|
3598
3593
|
targetEl: s,
|
|
3599
3594
|
toEl: n,
|
|
3600
3595
|
fromEl: n
|
|
3601
|
-
}),
|
|
3596
|
+
}), H("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3602
3597
|
return;
|
|
3603
3598
|
}
|
|
3604
3599
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3605
|
-
if (r =
|
|
3600
|
+
if (r = Ba(c, r.trim(), n, !1), r) return U({
|
|
3606
3601
|
sortable: t,
|
|
3607
3602
|
rootEl: r,
|
|
3608
3603
|
name: "filter",
|
|
3609
3604
|
targetEl: s,
|
|
3610
3605
|
fromEl: n,
|
|
3611
3606
|
toEl: n
|
|
3612
|
-
}),
|
|
3607
|
+
}), H("filter", t, { evt: e }), !0;
|
|
3613
3608
|
}), l)) {
|
|
3614
3609
|
i && e.cancelable && e.preventDefault();
|
|
3615
3610
|
return;
|
|
3616
3611
|
}
|
|
3617
|
-
r.handle && !
|
|
3612
|
+
r.handle && !Ba(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3618
3613
|
}
|
|
3619
3614
|
}
|
|
3620
3615
|
},
|
|
3621
3616
|
_prepareDragStart: function(e, t, n) {
|
|
3622
3617
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3623
|
-
if (n && !
|
|
3624
|
-
var c =
|
|
3625
|
-
if (
|
|
3626
|
-
target:
|
|
3618
|
+
if (n && !W && n.parentNode === i) {
|
|
3619
|
+
var c = V(n);
|
|
3620
|
+
if (q = i, W = n, G = W.parentNode, _o = W.nextSibling, vo = n, Co = a.group, Q.dragged = W, Do = {
|
|
3621
|
+
target: W,
|
|
3627
3622
|
clientX: (t || e).clientX,
|
|
3628
3623
|
clientY: (t || e).clientY
|
|
3629
|
-
},
|
|
3630
|
-
if (
|
|
3624
|
+
}, jo = Do.clientX - c.left, Mo = Do.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
3625
|
+
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
3631
3626
|
r._onDrop();
|
|
3632
3627
|
return;
|
|
3633
3628
|
}
|
|
3634
|
-
r._disableDelayedDragEvents(), !
|
|
3629
|
+
r._disableDelayedDragEvents(), !Na && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
3635
3630
|
sortable: r,
|
|
3636
3631
|
name: "choose",
|
|
3637
3632
|
originalEvent: e
|
|
3638
|
-
}),
|
|
3633
|
+
}), Ha(W, a.chosenClass, !0);
|
|
3639
3634
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3640
|
-
|
|
3641
|
-
}), R(o, "dragover",
|
|
3635
|
+
Wa(W, e.trim(), rs);
|
|
3636
|
+
}), R(o, "dragover", $o), R(o, "mousemove", $o), R(o, "touchmove", $o), R(o, "mouseup", r._onDrop), R(o, "touchend", r._onDrop), R(o, "touchcancel", r._onDrop), Na && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ma || ja))) {
|
|
3642
3637
|
if (Q.eventCanceled) {
|
|
3643
3638
|
this._onDrop();
|
|
3644
3639
|
return;
|
|
@@ -3652,25 +3647,25 @@ Q.prototype = {
|
|
|
3652
3647
|
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();
|
|
3653
3648
|
},
|
|
3654
3649
|
_disableDelayedDrag: function() {
|
|
3655
|
-
|
|
3650
|
+
W && rs(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3656
3651
|
},
|
|
3657
3652
|
_disableDelayedDragEvents: function() {
|
|
3658
3653
|
var e = this.el.ownerDocument;
|
|
3659
3654
|
z(e, "mouseup", this._disableDelayedDrag), z(e, "touchend", this._disableDelayedDrag), z(e, "touchcancel", this._disableDelayedDrag), z(e, "mousemove", this._delayedDragTouchMoveHandler), z(e, "touchmove", this._delayedDragTouchMoveHandler), z(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3660
3655
|
},
|
|
3661
3656
|
_triggerDragStart: function(e, t) {
|
|
3662
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? R(document, "pointermove", this._onTouchMove) : t ? R(document, "touchmove", this._onTouchMove) : R(document, "mousemove", this._onTouchMove) : (R(
|
|
3657
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? R(document, "pointermove", this._onTouchMove) : t ? R(document, "touchmove", this._onTouchMove) : R(document, "mousemove", this._onTouchMove) : (R(W, "dragend", this), R(q, "dragstart", this._onDragStart));
|
|
3663
3658
|
try {
|
|
3664
|
-
document.selection ?
|
|
3659
|
+
document.selection ? ds(function() {
|
|
3665
3660
|
document.selection.empty();
|
|
3666
3661
|
}) : window.getSelection().removeAllRanges();
|
|
3667
3662
|
} catch {}
|
|
3668
3663
|
},
|
|
3669
3664
|
_dragStarted: function(e, t) {
|
|
3670
|
-
if (
|
|
3671
|
-
|
|
3665
|
+
if (wo = !1, q && W) {
|
|
3666
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && R(document, "dragover", es);
|
|
3672
3667
|
var n = this.options;
|
|
3673
|
-
!e &&
|
|
3668
|
+
!e && Ha(W, n.dragClass, !1), Ha(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
3674
3669
|
sortable: this,
|
|
3675
3670
|
name: "start",
|
|
3676
3671
|
originalEvent: t
|
|
@@ -3678,33 +3673,33 @@ Q.prototype = {
|
|
|
3678
3673
|
} else this._nulling();
|
|
3679
3674
|
},
|
|
3680
3675
|
_emulateDragOver: function() {
|
|
3681
|
-
if (
|
|
3682
|
-
this._lastX =
|
|
3683
|
-
for (var e = document.elementFromPoint(
|
|
3684
|
-
if (
|
|
3685
|
-
if (t[
|
|
3676
|
+
if (Oo) {
|
|
3677
|
+
this._lastX = Oo.clientX, this._lastY = Oo.clientY, Zo();
|
|
3678
|
+
for (var e = document.elementFromPoint(Oo.clientX, Oo.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Oo.clientX, Oo.clientY), e !== t);) t = e;
|
|
3679
|
+
if (W.parentNode[so]._isOutsideThisEl(e), t) do {
|
|
3680
|
+
if (t[so]) {
|
|
3686
3681
|
var n = void 0;
|
|
3687
|
-
if (n = t[
|
|
3688
|
-
clientX:
|
|
3689
|
-
clientY:
|
|
3682
|
+
if (n = t[so]._onDragOver({
|
|
3683
|
+
clientX: Oo.clientX,
|
|
3684
|
+
clientY: Oo.clientY,
|
|
3690
3685
|
target: e,
|
|
3691
3686
|
rootEl: t
|
|
3692
3687
|
}), n && !this.options.dragoverBubble) break;
|
|
3693
3688
|
}
|
|
3694
3689
|
e = t;
|
|
3695
3690
|
} while (t = t.parentNode);
|
|
3696
|
-
|
|
3691
|
+
Qo();
|
|
3697
3692
|
}
|
|
3698
3693
|
},
|
|
3699
3694
|
_onTouchMove: function(e) {
|
|
3700
|
-
if (
|
|
3701
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
3702
|
-
if (!Q.active && !
|
|
3695
|
+
if (Do) {
|
|
3696
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && Ua(K, !0), o = K && a && a.a, s = K && a && a.d, c = Uo && Z && Xa(Z), l = (i.clientX - Do.clientX + r.x) / (o || 1) + (c ? c[0] - zo[0] : 0) / (o || 1), u = (i.clientY - Do.clientY + r.y) / (s || 1) + (c ? c[1] - zo[1] : 0) / (s || 1);
|
|
3697
|
+
if (!Q.active && !wo) {
|
|
3703
3698
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3704
3699
|
this._onDragStart(e, !0);
|
|
3705
3700
|
}
|
|
3706
|
-
if (
|
|
3707
|
-
a ? (a.e += l - (
|
|
3701
|
+
if (K) {
|
|
3702
|
+
a ? (a.e += l - (ko || 0), a.f += u - (Ao || 0)) : a = {
|
|
3708
3703
|
a: 1,
|
|
3709
3704
|
b: 0,
|
|
3710
3705
|
c: 0,
|
|
@@ -3713,39 +3708,39 @@ Q.prototype = {
|
|
|
3713
3708
|
f: u
|
|
3714
3709
|
};
|
|
3715
3710
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3716
|
-
|
|
3711
|
+
B(K, "webkitTransform", d), B(K, "mozTransform", d), B(K, "msTransform", d), B(K, "transform", d), ko = l, Ao = u, Oo = i;
|
|
3717
3712
|
}
|
|
3718
3713
|
e.cancelable && e.preventDefault();
|
|
3719
3714
|
}
|
|
3720
3715
|
},
|
|
3721
3716
|
_appendGhost: function() {
|
|
3722
|
-
if (!
|
|
3723
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
3724
|
-
if (
|
|
3725
|
-
for (Z = e;
|
|
3726
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3717
|
+
if (!K) {
|
|
3718
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = V(W, !0, Uo, !0, e), n = this.options;
|
|
3719
|
+
if (Uo) {
|
|
3720
|
+
for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3721
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Ga()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Ga(), zo = Xa(Z);
|
|
3727
3722
|
}
|
|
3728
|
-
|
|
3723
|
+
K = W.cloneNode(!0), Ha(K, n.ghostClass, !1), Ha(K, n.fallbackClass, !0), Ha(K, n.dragClass, !0), B(K, "transition", ""), B(K, "transform", ""), B(K, "box-sizing", "border-box"), B(K, "margin", 0), B(K, "top", t.top), B(K, "left", t.left), B(K, "width", t.width), B(K, "height", t.height), B(K, "opacity", "0.8"), B(K, "position", Uo ? "absolute" : "fixed"), B(K, "zIndex", "100000"), B(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), B(K, "transform-origin", jo / parseInt(K.style.width) * 100 + "% " + Mo / parseInt(K.style.height) * 100 + "%");
|
|
3729
3724
|
}
|
|
3730
3725
|
},
|
|
3731
3726
|
_onDragStart: function(e, t) {
|
|
3732
3727
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3733
|
-
if (
|
|
3728
|
+
if (H("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
3734
3729
|
this._onDrop();
|
|
3735
3730
|
return;
|
|
3736
3731
|
}
|
|
3737
|
-
|
|
3738
|
-
|
|
3732
|
+
H("setupClone", this), Q.eventCanceled || (J = ao(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), Ha(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = ds(function() {
|
|
3733
|
+
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
3739
3734
|
sortable: n,
|
|
3740
3735
|
name: "clone"
|
|
3741
3736
|
}));
|
|
3742
|
-
}), !t &&
|
|
3737
|
+
}), !t && Ha(W, i.dragClass, !0), t ? (To = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (z(document, "mouseup", n._onDrop), z(document, "touchend", n._onDrop), z(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), R(document, "drop", n), B(W, "transform", "translateZ(0)")), wo = !0, n._dragStartId = ds(n._dragStarted.bind(n, t, e)), R(document, "selectstart", n), No = !0, Pa && B(document.body, "user-select", "none");
|
|
3743
3738
|
},
|
|
3744
3739
|
_onDragOver: function(e) {
|
|
3745
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3746
|
-
if (
|
|
3740
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Co === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3741
|
+
if (Bo) return;
|
|
3747
3742
|
function h(o, s) {
|
|
3748
|
-
|
|
3743
|
+
H(o, p, Ca({
|
|
3749
3744
|
evt: e,
|
|
3750
3745
|
isOwner: l,
|
|
3751
3746
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3757,7 +3752,7 @@ Q.prototype = {
|
|
|
3757
3752
|
target: n,
|
|
3758
3753
|
completed: _,
|
|
3759
3754
|
onMove: function(n, i) {
|
|
3760
|
-
return
|
|
3755
|
+
return ns(q, t, W, r, n, V(n), e, i);
|
|
3761
3756
|
},
|
|
3762
3757
|
changed: v
|
|
3763
3758
|
}, s));
|
|
@@ -3766,58 +3761,58 @@ Q.prototype = {
|
|
|
3766
3761
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3767
3762
|
}
|
|
3768
3763
|
function _(r) {
|
|
3769
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3764
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Ha(W, X ? X.options.ghostClass : c.options.ghostClass, !1), Ha(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3770
3765
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3771
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
3766
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Po = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[so]._isOutsideThisEl(e.target), !r && $o(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3772
3767
|
}
|
|
3773
3768
|
function v() {
|
|
3774
|
-
|
|
3769
|
+
Y = Ya(W), So = Ya(W, o.draggable), U({
|
|
3775
3770
|
sortable: p,
|
|
3776
3771
|
name: "change",
|
|
3777
3772
|
toEl: t,
|
|
3778
|
-
newIndex:
|
|
3779
|
-
newDraggableIndex:
|
|
3773
|
+
newIndex: Y,
|
|
3774
|
+
newDraggableIndex: So,
|
|
3780
3775
|
originalEvent: e
|
|
3781
3776
|
});
|
|
3782
3777
|
}
|
|
3783
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3784
|
-
if (
|
|
3785
|
-
if (
|
|
3786
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
3787
|
-
if (a) return
|
|
3788
|
-
var y =
|
|
3789
|
-
if (!y ||
|
|
3790
|
-
if (y ===
|
|
3791
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
3792
|
-
} else if (y &&
|
|
3793
|
-
var b =
|
|
3794
|
-
if (b ===
|
|
3795
|
-
if (n = b, i =
|
|
3778
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ba(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3779
|
+
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3780
|
+
if (To = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Co.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
3781
|
+
if (f = this._getDirection(e, n) === "vertical", r = V(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3782
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (_o ? q.insertBefore(W, _o) : q.appendChild(W)), _(!0);
|
|
3783
|
+
var y = Ja(t, o.draggable);
|
|
3784
|
+
if (!y || os(e, f, this) && !y.animated) {
|
|
3785
|
+
if (y === W) return _(!1);
|
|
3786
|
+
if (y && t === e.target && (n = y), n && (i = V(n)), ns(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
|
|
3787
|
+
} else if (y && as(e, f, this)) {
|
|
3788
|
+
var b = qa(t, 0, o, !0);
|
|
3789
|
+
if (b === W) return _(!1);
|
|
3790
|
+
if (n = b, i = V(n), ns(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
3796
3791
|
} else if (n.parentNode === t) {
|
|
3797
|
-
i =
|
|
3798
|
-
var x = 0, S, C =
|
|
3799
|
-
|
|
3792
|
+
i = V(n);
|
|
3793
|
+
var x = 0, S, C = W.parentNode !== t, w = !Jo(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ka(n, "top", "top") || Ka(W, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3794
|
+
Po !== n && (S = i[T], Io = !1, Lo = !w && o.invertSwap || C), x = ss(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Lo, Po === n);
|
|
3800
3795
|
var O;
|
|
3801
3796
|
if (x !== 0) {
|
|
3802
|
-
var k =
|
|
3797
|
+
var k = Ya(W);
|
|
3803
3798
|
do
|
|
3804
|
-
k -= x, O =
|
|
3805
|
-
while (O && (
|
|
3799
|
+
k -= x, O = G.children[k];
|
|
3800
|
+
while (O && (B(O, "display") === "none" || O === K));
|
|
3806
3801
|
}
|
|
3807
3802
|
if (x === 0 || O === n) return _(!1);
|
|
3808
|
-
|
|
3803
|
+
Po = n, Fo = x;
|
|
3809
3804
|
var A = n.nextElementSibling, ee = !1;
|
|
3810
3805
|
ee = x === 1;
|
|
3811
|
-
var j =
|
|
3812
|
-
if (j !== !1) return (j === 1 || j === -1) && (ee = j === 1),
|
|
3806
|
+
var j = ns(q, t, W, r, n, i, e, ee);
|
|
3807
|
+
if (j !== !1) return (j === 1 || j === -1) && (ee = j === 1), Bo = !0, setTimeout(is, 30), g(), ee && !A ? t.appendChild(W) : n.parentNode.insertBefore(W, ee ? A : n), E && io(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !Lo && (Ro = Math.abs(S - V(n)[T])), v(), _(!0);
|
|
3813
3808
|
}
|
|
3814
|
-
if (t.contains(
|
|
3809
|
+
if (t.contains(W)) return _(!1);
|
|
3815
3810
|
}
|
|
3816
3811
|
return !1;
|
|
3817
3812
|
},
|
|
3818
3813
|
_ignoreWhileAnimating: null,
|
|
3819
3814
|
_offMoveEvents: function() {
|
|
3820
|
-
z(document, "mousemove", this._onTouchMove), z(document, "touchmove", this._onTouchMove), z(document, "pointermove", this._onTouchMove), z(document, "dragover",
|
|
3815
|
+
z(document, "mousemove", this._onTouchMove), z(document, "touchmove", this._onTouchMove), z(document, "pointermove", this._onTouchMove), z(document, "dragover", $o), z(document, "mousemove", $o), z(document, "touchmove", $o);
|
|
3821
3816
|
},
|
|
3822
3817
|
_offUpEvents: function() {
|
|
3823
3818
|
var e = this.el.ownerDocument;
|
|
@@ -3825,60 +3820,60 @@ Q.prototype = {
|
|
|
3825
3820
|
},
|
|
3826
3821
|
_onDrop: function(e) {
|
|
3827
3822
|
var t = this.el, n = this.options;
|
|
3828
|
-
if (
|
|
3823
|
+
if (Y = Ya(W), So = Ya(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = Ya(W), So = Ya(W, n.draggable), Q.eventCanceled) {
|
|
3829
3824
|
this._nulling();
|
|
3830
3825
|
return;
|
|
3831
3826
|
}
|
|
3832
|
-
|
|
3827
|
+
wo = !1, Lo = !1, Io = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), fs(this.cloneId), fs(this._dragStartId), this.nativeDraggable && (z(document, "drop", this), z(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Pa && B(document.body, "user-select", ""), B(W, "transform", ""), e && (No && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && z(W, "dragend", this), rs(W), W.style["will-change"] = "", No && !wo && Ha(W, X ? X.options.ghostClass : this.options.ghostClass, !1), Ha(W, this.options.chosenClass, !1), U({
|
|
3833
3828
|
sortable: this,
|
|
3834
3829
|
name: "unchoose",
|
|
3835
|
-
toEl:
|
|
3830
|
+
toEl: G,
|
|
3836
3831
|
newIndex: null,
|
|
3837
3832
|
newDraggableIndex: null,
|
|
3838
3833
|
originalEvent: e
|
|
3839
|
-
}),
|
|
3834
|
+
}), q === G ? Y !== bo && Y >= 0 && (U({
|
|
3840
3835
|
sortable: this,
|
|
3841
3836
|
name: "update",
|
|
3842
|
-
toEl:
|
|
3837
|
+
toEl: G,
|
|
3843
3838
|
originalEvent: e
|
|
3844
|
-
}),
|
|
3839
|
+
}), U({
|
|
3845
3840
|
sortable: this,
|
|
3846
3841
|
name: "sort",
|
|
3847
|
-
toEl:
|
|
3842
|
+
toEl: G,
|
|
3848
3843
|
originalEvent: e
|
|
3849
|
-
})) : (
|
|
3850
|
-
rootEl:
|
|
3844
|
+
})) : (Y >= 0 && (U({
|
|
3845
|
+
rootEl: G,
|
|
3851
3846
|
name: "add",
|
|
3852
|
-
toEl:
|
|
3853
|
-
fromEl:
|
|
3847
|
+
toEl: G,
|
|
3848
|
+
fromEl: q,
|
|
3854
3849
|
originalEvent: e
|
|
3855
|
-
}),
|
|
3850
|
+
}), U({
|
|
3856
3851
|
sortable: this,
|
|
3857
3852
|
name: "remove",
|
|
3858
|
-
toEl:
|
|
3853
|
+
toEl: G,
|
|
3859
3854
|
originalEvent: e
|
|
3860
|
-
}),
|
|
3861
|
-
rootEl:
|
|
3855
|
+
}), U({
|
|
3856
|
+
rootEl: G,
|
|
3862
3857
|
name: "sort",
|
|
3863
|
-
toEl:
|
|
3864
|
-
fromEl:
|
|
3858
|
+
toEl: G,
|
|
3859
|
+
fromEl: q,
|
|
3865
3860
|
originalEvent: e
|
|
3866
|
-
}),
|
|
3861
|
+
}), U({
|
|
3867
3862
|
sortable: this,
|
|
3868
3863
|
name: "sort",
|
|
3869
|
-
toEl:
|
|
3864
|
+
toEl: G,
|
|
3870
3865
|
originalEvent: e
|
|
3871
|
-
})), X && X.save()), Q.active && ((
|
|
3866
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = bo, So = xo), U({
|
|
3872
3867
|
sortable: this,
|
|
3873
3868
|
name: "end",
|
|
3874
|
-
toEl:
|
|
3869
|
+
toEl: G,
|
|
3875
3870
|
originalEvent: e
|
|
3876
3871
|
}), this.save()))), this._nulling();
|
|
3877
3872
|
},
|
|
3878
3873
|
_nulling: function() {
|
|
3879
|
-
|
|
3874
|
+
H("nulling", this), q = W = G = K = _o = J = vo = yo = Do = Oo = No = Y = So = bo = xo = Po = Fo = X = Co = Q.dragged = Q.ghost = Q.clone = Q.active = null, Vo.forEach(function(e) {
|
|
3880
3875
|
e.checked = !0;
|
|
3881
|
-
}),
|
|
3876
|
+
}), Vo.length = ko = Ao = 0;
|
|
3882
3877
|
},
|
|
3883
3878
|
handleEvent: function(e) {
|
|
3884
3879
|
switch (e.type) {
|
|
@@ -3888,20 +3883,20 @@ Q.prototype = {
|
|
|
3888
3883
|
break;
|
|
3889
3884
|
case "dragenter":
|
|
3890
3885
|
case "dragover":
|
|
3891
|
-
|
|
3886
|
+
W && (this._onDragOver(e), ts(e));
|
|
3892
3887
|
break;
|
|
3893
3888
|
case "selectstart": e.preventDefault();
|
|
3894
3889
|
}
|
|
3895
3890
|
},
|
|
3896
3891
|
toArray: function() {
|
|
3897
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3892
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ba(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || ls(t));
|
|
3898
3893
|
return e;
|
|
3899
3894
|
},
|
|
3900
3895
|
sort: function(e, t) {
|
|
3901
3896
|
var n = {}, r = this.el;
|
|
3902
3897
|
this.toArray().forEach(function(e, t) {
|
|
3903
3898
|
var i = r.children[t];
|
|
3904
|
-
|
|
3899
|
+
Ba(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3905
3900
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3906
3901
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3907
3902
|
}), t && this.animateAll();
|
|
@@ -3911,25 +3906,25 @@ Q.prototype = {
|
|
|
3911
3906
|
e && e.set && e.set(this);
|
|
3912
3907
|
},
|
|
3913
3908
|
closest: function(e, t) {
|
|
3914
|
-
return
|
|
3909
|
+
return Ba(e, t || this.options.draggable, this.el, !1);
|
|
3915
3910
|
},
|
|
3916
3911
|
option: function(e, t) {
|
|
3917
3912
|
var n = this.options;
|
|
3918
3913
|
if (t === void 0) return n[e];
|
|
3919
|
-
var r =
|
|
3920
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3914
|
+
var r = mo.modifyOption(this, e, t);
|
|
3915
|
+
n[e] = r === void 0 ? t : r, e === "group" && Xo(n);
|
|
3921
3916
|
},
|
|
3922
3917
|
destroy: function() {
|
|
3923
|
-
|
|
3918
|
+
H("destroy", this);
|
|
3924
3919
|
var e = this.el;
|
|
3925
|
-
e[
|
|
3920
|
+
e[so] = null, z(e, "mousedown", this._onTapStart), z(e, "touchstart", this._onTapStart), z(e, "pointerdown", this._onTapStart), this.nativeDraggable && (z(e, "dragover", this), z(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3926
3921
|
e.removeAttribute("draggable");
|
|
3927
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3922
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Eo.splice(Eo.indexOf(this.el), 1), this.el = e = null;
|
|
3928
3923
|
},
|
|
3929
3924
|
_hideClone: function() {
|
|
3930
|
-
if (!
|
|
3931
|
-
if (
|
|
3932
|
-
|
|
3925
|
+
if (!yo) {
|
|
3926
|
+
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3927
|
+
B(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), yo = !0;
|
|
3933
3928
|
}
|
|
3934
3929
|
},
|
|
3935
3930
|
_showClone: function(e) {
|
|
@@ -3937,99 +3932,99 @@ Q.prototype = {
|
|
|
3937
3932
|
this._hideClone();
|
|
3938
3933
|
return;
|
|
3939
3934
|
}
|
|
3940
|
-
if (
|
|
3941
|
-
if (
|
|
3942
|
-
|
|
3935
|
+
if (yo) {
|
|
3936
|
+
if (H("showClone", this), Q.eventCanceled) return;
|
|
3937
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : _o ? q.insertBefore(J, _o) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), B(J, "display", ""), yo = !1;
|
|
3943
3938
|
}
|
|
3944
3939
|
}
|
|
3945
3940
|
};
|
|
3946
|
-
function
|
|
3941
|
+
function ts(e) {
|
|
3947
3942
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3948
3943
|
}
|
|
3949
|
-
function
|
|
3950
|
-
var c, l = e[
|
|
3951
|
-
return window.CustomEvent && !
|
|
3944
|
+
function ns(e, t, n, r, i, a, o, s) {
|
|
3945
|
+
var c, l = e[so], u = l.options.onMove, d;
|
|
3946
|
+
return window.CustomEvent && !ja && !Ma ? c = new CustomEvent("move", {
|
|
3952
3947
|
bubbles: !0,
|
|
3953
3948
|
cancelable: !0
|
|
3954
|
-
}) : (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 ||
|
|
3949
|
+
}) : (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;
|
|
3955
3950
|
}
|
|
3956
|
-
function
|
|
3951
|
+
function rs(e) {
|
|
3957
3952
|
e.draggable = !1;
|
|
3958
3953
|
}
|
|
3959
|
-
function
|
|
3960
|
-
|
|
3954
|
+
function is() {
|
|
3955
|
+
Bo = !1;
|
|
3961
3956
|
}
|
|
3962
|
-
function
|
|
3963
|
-
var r =
|
|
3957
|
+
function as(e, t, n) {
|
|
3958
|
+
var r = V(qa(n.el, 0, n.options, !0)), i = oo(n.el, n.options, K), a = 10;
|
|
3964
3959
|
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;
|
|
3965
3960
|
}
|
|
3966
|
-
function
|
|
3967
|
-
var r =
|
|
3961
|
+
function os(e, t, n) {
|
|
3962
|
+
var r = V(Ja(n.el, n.options.draggable)), i = oo(n.el, n.options, K), a = 10;
|
|
3968
3963
|
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;
|
|
3969
3964
|
}
|
|
3970
|
-
function
|
|
3965
|
+
function ss(e, t, n, r, i, a, o, s) {
|
|
3971
3966
|
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;
|
|
3972
3967
|
if (!o) {
|
|
3973
|
-
if (s &&
|
|
3974
|
-
if (!
|
|
3975
|
-
else if (
|
|
3976
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3968
|
+
if (s && Ro < l * i) {
|
|
3969
|
+
if (!Io && (Fo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Io = !0), Io) f = !0;
|
|
3970
|
+
else if (Fo === 1 ? c < u + Ro : c > d - Ro) return -Fo;
|
|
3971
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return cs(t);
|
|
3977
3972
|
}
|
|
3978
3973
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3979
3974
|
}
|
|
3980
|
-
function ss(e) {
|
|
3981
|
-
return qa(G) < qa(e) ? 1 : -1;
|
|
3982
|
-
}
|
|
3983
3975
|
function cs(e) {
|
|
3976
|
+
return Ya(W) < Ya(e) ? 1 : -1;
|
|
3977
|
+
}
|
|
3978
|
+
function ls(e) {
|
|
3984
3979
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3985
3980
|
return r.toString(36);
|
|
3986
3981
|
}
|
|
3987
|
-
function
|
|
3988
|
-
|
|
3982
|
+
function us(e) {
|
|
3983
|
+
Vo.length = 0;
|
|
3989
3984
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3990
3985
|
var r = t[n];
|
|
3991
|
-
r.checked &&
|
|
3986
|
+
r.checked && Vo.push(r);
|
|
3992
3987
|
}
|
|
3993
3988
|
}
|
|
3994
|
-
function
|
|
3989
|
+
function ds(e) {
|
|
3995
3990
|
return setTimeout(e, 0);
|
|
3996
3991
|
}
|
|
3997
|
-
function
|
|
3992
|
+
function fs(e) {
|
|
3998
3993
|
return clearTimeout(e);
|
|
3999
3994
|
}
|
|
4000
|
-
|
|
4001
|
-
(Q.active ||
|
|
3995
|
+
Ho && R(document, "touchmove", function(e) {
|
|
3996
|
+
(Q.active || wo) && e.cancelable && e.preventDefault();
|
|
4002
3997
|
}), Q.utils = {
|
|
4003
3998
|
on: R,
|
|
4004
3999
|
off: z,
|
|
4005
|
-
css:
|
|
4006
|
-
find:
|
|
4000
|
+
css: B,
|
|
4001
|
+
find: Wa,
|
|
4007
4002
|
is: function(e, t) {
|
|
4008
|
-
return !!
|
|
4003
|
+
return !!Ba(e, t, e, !1);
|
|
4009
4004
|
},
|
|
4010
|
-
extend:
|
|
4011
|
-
throttle:
|
|
4012
|
-
closest:
|
|
4013
|
-
toggleClass:
|
|
4014
|
-
clone:
|
|
4015
|
-
index:
|
|
4016
|
-
nextTick:
|
|
4017
|
-
cancelNextTick:
|
|
4018
|
-
detectDirection:
|
|
4019
|
-
getChild:
|
|
4005
|
+
extend: $a,
|
|
4006
|
+
throttle: no,
|
|
4007
|
+
closest: Ba,
|
|
4008
|
+
toggleClass: Ha,
|
|
4009
|
+
clone: ao,
|
|
4010
|
+
index: Ya,
|
|
4011
|
+
nextTick: ds,
|
|
4012
|
+
cancelNextTick: fs,
|
|
4013
|
+
detectDirection: qo,
|
|
4014
|
+
getChild: qa
|
|
4020
4015
|
}, Q.get = function(e) {
|
|
4021
|
-
return e[
|
|
4016
|
+
return e[so];
|
|
4022
4017
|
}, Q.mount = function() {
|
|
4023
4018
|
var e = [...arguments];
|
|
4024
4019
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
4025
4020
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
4026
|
-
e.utils && (Q.utils =
|
|
4021
|
+
e.utils && (Q.utils = Ca(Ca({}, Q.utils), e.utils)), mo.mount(e);
|
|
4027
4022
|
});
|
|
4028
4023
|
}, Q.create = function(e, t) {
|
|
4029
4024
|
return new Q(e, t);
|
|
4030
|
-
}, Q.version =
|
|
4031
|
-
var $ = [],
|
|
4032
|
-
function
|
|
4025
|
+
}, Q.version = ka;
|
|
4026
|
+
var $ = [], ps, ms, hs = !1, gs, _s, vs, ys;
|
|
4027
|
+
function bs() {
|
|
4033
4028
|
function e() {
|
|
4034
4029
|
for (var e in this.defaults = {
|
|
4035
4030
|
scroll: !0,
|
|
@@ -4049,63 +4044,63 @@ function ys() {
|
|
|
4049
4044
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
4050
4045
|
},
|
|
4051
4046
|
drop: function() {
|
|
4052
|
-
this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : (z(document, "pointermove", this._handleFallbackAutoScroll), z(document, "touchmove", this._handleFallbackAutoScroll), z(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
4047
|
+
this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : (z(document, "pointermove", this._handleFallbackAutoScroll), z(document, "touchmove", this._handleFallbackAutoScroll), z(document, "mousemove", this._handleFallbackAutoScroll)), Ss(), xs(), ro();
|
|
4053
4048
|
},
|
|
4054
4049
|
nulling: function() {
|
|
4055
|
-
|
|
4050
|
+
vs = ms = ps = hs = ys = gs = _s = null, $.length = 0;
|
|
4056
4051
|
},
|
|
4057
4052
|
_handleFallbackAutoScroll: function(e) {
|
|
4058
4053
|
this._handleAutoScroll(e, !0);
|
|
4059
4054
|
},
|
|
4060
4055
|
_handleAutoScroll: function(e, t) {
|
|
4061
4056
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
4062
|
-
if (
|
|
4063
|
-
|
|
4064
|
-
var o =
|
|
4065
|
-
|
|
4066
|
-
var a =
|
|
4067
|
-
a !== o && (o = a,
|
|
4068
|
-
}, 10),
|
|
4057
|
+
if (vs = e, t || this.options.forceAutoScrollFallback || Ma || ja || Pa) {
|
|
4058
|
+
Cs(e, this.options, a, t);
|
|
4059
|
+
var o = Qa(a, !0);
|
|
4060
|
+
hs && (!ys || r !== gs || i !== _s) && (ys && Ss(), ys = setInterval(function() {
|
|
4061
|
+
var a = Qa(document.elementFromPoint(r, i), !0);
|
|
4062
|
+
a !== o && (o = a, xs()), Cs(e, n.options, a, t);
|
|
4063
|
+
}, 10), gs = r, _s = i);
|
|
4069
4064
|
} else {
|
|
4070
|
-
if (!this.options.bubbleScroll ||
|
|
4071
|
-
|
|
4065
|
+
if (!this.options.bubbleScroll || Qa(a, !0) === Ga()) {
|
|
4066
|
+
xs();
|
|
4072
4067
|
return;
|
|
4073
4068
|
}
|
|
4074
|
-
|
|
4069
|
+
Cs(e, this.options, Qa(a, !1), !1);
|
|
4075
4070
|
}
|
|
4076
4071
|
}
|
|
4077
|
-
},
|
|
4072
|
+
}, Ea(e, {
|
|
4078
4073
|
pluginName: "scroll",
|
|
4079
4074
|
initializeByDefault: !0
|
|
4080
4075
|
});
|
|
4081
4076
|
}
|
|
4082
|
-
function
|
|
4077
|
+
function xs() {
|
|
4083
4078
|
$.forEach(function(e) {
|
|
4084
4079
|
clearInterval(e.pid);
|
|
4085
4080
|
}), $ = [];
|
|
4086
4081
|
}
|
|
4087
|
-
function
|
|
4088
|
-
clearInterval(
|
|
4082
|
+
function Ss() {
|
|
4083
|
+
clearInterval(ys);
|
|
4089
4084
|
}
|
|
4090
|
-
var
|
|
4085
|
+
var Cs = no(function(e, t, n, r) {
|
|
4091
4086
|
if (t.scroll) {
|
|
4092
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
4093
|
-
|
|
4094
|
-
var d = 0, f =
|
|
4087
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Ga(), l = !1, u;
|
|
4088
|
+
ms !== n && (ms = n, xs(), ps = t.scroll, u = t.scrollFn, ps === !0 && (ps = Qa(n, !0)));
|
|
4089
|
+
var d = 0, f = ps;
|
|
4095
4090
|
do {
|
|
4096
|
-
var p = f, m =
|
|
4091
|
+
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;
|
|
4097
4092
|
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"));
|
|
4098
4093
|
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);
|
|
4099
4094
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
4100
4095
|
($[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() {
|
|
4101
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
4096
|
+
r && this.layer === 0 && Q.active._onTouchMove(vs);
|
|
4102
4097
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
4103
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
4098
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[so], n, t, e, vs, $[this.layer].el) !== "continue" || io($[this.layer].el, n, t);
|
|
4104
4099
|
}.bind({ layer: d }), 24))), d++;
|
|
4105
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
4106
|
-
|
|
4100
|
+
} while (t.bubbleScroll && f !== c && (f = Qa(f, !1)));
|
|
4101
|
+
hs = l;
|
|
4107
4102
|
}
|
|
4108
|
-
}, 30),
|
|
4103
|
+
}, 30), ws = function(e) {
|
|
4109
4104
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
4110
4105
|
if (t) {
|
|
4111
4106
|
var c = n || i;
|
|
@@ -4117,8 +4112,8 @@ var Ss = eo(function(e, t, n, r) {
|
|
|
4117
4112
|
}));
|
|
4118
4113
|
}
|
|
4119
4114
|
};
|
|
4120
|
-
function
|
|
4121
|
-
|
|
4115
|
+
function Ts() {}
|
|
4116
|
+
Ts.prototype = {
|
|
4122
4117
|
startIndex: null,
|
|
4123
4118
|
dragStart: function(e) {
|
|
4124
4119
|
var t = e.oldDraggableIndex;
|
|
@@ -4127,72 +4122,72 @@ ws.prototype = {
|
|
|
4127
4122
|
onSpill: function(e) {
|
|
4128
4123
|
var t = e.dragEl, n = e.putSortable;
|
|
4129
4124
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
4130
|
-
var r =
|
|
4125
|
+
var r = qa(this.sortable.el, this.startIndex, this.options);
|
|
4131
4126
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
4132
4127
|
},
|
|
4133
|
-
drop:
|
|
4134
|
-
},
|
|
4135
|
-
function
|
|
4136
|
-
|
|
4128
|
+
drop: ws
|
|
4129
|
+
}, Ea(Ts, { pluginName: "revertOnSpill" });
|
|
4130
|
+
function Es() {}
|
|
4131
|
+
Es.prototype = {
|
|
4137
4132
|
onSpill: function(e) {
|
|
4138
4133
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
4139
4134
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
4140
4135
|
},
|
|
4141
|
-
drop:
|
|
4142
|
-
},
|
|
4143
|
-
function
|
|
4136
|
+
drop: ws
|
|
4137
|
+
}, Ea(Es, { pluginName: "removeOnSpill" }), Q.mount(new bs()), Q.mount(Es, Ts);
|
|
4138
|
+
function Ds(e) {
|
|
4144
4139
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
4145
4140
|
}
|
|
4146
|
-
function
|
|
4141
|
+
function Os(e) {
|
|
4147
4142
|
ne() && l(e);
|
|
4148
4143
|
}
|
|
4149
|
-
function
|
|
4144
|
+
function ks(e) {
|
|
4150
4145
|
ne() ? n(e) : m(e);
|
|
4151
4146
|
}
|
|
4152
|
-
var
|
|
4153
|
-
function
|
|
4154
|
-
|
|
4147
|
+
var As = null, js = null;
|
|
4148
|
+
function Ms(e = null, t = null) {
|
|
4149
|
+
As = e, js = t;
|
|
4155
4150
|
}
|
|
4156
|
-
function
|
|
4151
|
+
function Ns() {
|
|
4157
4152
|
return {
|
|
4158
|
-
data:
|
|
4159
|
-
clonedData:
|
|
4153
|
+
data: As,
|
|
4154
|
+
clonedData: js
|
|
4160
4155
|
};
|
|
4161
4156
|
}
|
|
4162
|
-
var
|
|
4163
|
-
function
|
|
4157
|
+
var Ps = Symbol("cloneElement");
|
|
4158
|
+
function Fs(...e) {
|
|
4164
4159
|
let t = ne()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
4165
4160
|
Array.isArray(N(i)) || (o = i, i = null);
|
|
4166
|
-
let c = null, { immediate: l = !0, clone: u =
|
|
4161
|
+
let c = null, { immediate: l = !0, clone: u = Ds, forceFallback: d, fallbackOnBody: f, customUpdate: p } = N(o) ?? {};
|
|
4167
4162
|
function h(e) {
|
|
4168
4163
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
4169
4164
|
n = d && !f ? o.slice(0, -1) : o;
|
|
4170
4165
|
let s = N(N(i)?.[r]), c = u(s);
|
|
4171
|
-
|
|
4166
|
+
Ms(s, c), a[Ps] = c;
|
|
4172
4167
|
}
|
|
4173
4168
|
function g(e) {
|
|
4174
|
-
let t = e.item[
|
|
4175
|
-
if (!
|
|
4176
|
-
if (
|
|
4169
|
+
let t = e.item[Ps];
|
|
4170
|
+
if (!da(t)) {
|
|
4171
|
+
if (ma(e.item), a(i)) {
|
|
4177
4172
|
let n = [...N(i)];
|
|
4178
|
-
i.value =
|
|
4173
|
+
i.value = ua(n, e.newDraggableIndex, t);
|
|
4179
4174
|
return;
|
|
4180
4175
|
}
|
|
4181
|
-
|
|
4176
|
+
ua(N(i), e.newDraggableIndex, t);
|
|
4182
4177
|
}
|
|
4183
4178
|
}
|
|
4184
4179
|
function _(e) {
|
|
4185
4180
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, pullMode: s, clone: c } = e;
|
|
4186
|
-
if (
|
|
4187
|
-
|
|
4181
|
+
if (pa(t, n, r), s === "clone") {
|
|
4182
|
+
ma(c);
|
|
4188
4183
|
return;
|
|
4189
4184
|
}
|
|
4190
4185
|
if (a(i)) {
|
|
4191
4186
|
let e = [...N(i)];
|
|
4192
|
-
i.value =
|
|
4187
|
+
i.value = la(e, o);
|
|
4193
4188
|
return;
|
|
4194
4189
|
}
|
|
4195
|
-
|
|
4190
|
+
la(N(i), o);
|
|
4196
4191
|
}
|
|
4197
4192
|
function v(e) {
|
|
4198
4193
|
if (p) {
|
|
@@ -4200,12 +4195,12 @@ function Ps(...e) {
|
|
|
4200
4195
|
return;
|
|
4201
4196
|
}
|
|
4202
4197
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, newDraggableIndex: s } = e;
|
|
4203
|
-
if (
|
|
4198
|
+
if (ma(n), pa(t, n, r), a(i)) {
|
|
4204
4199
|
let e = [...N(i)];
|
|
4205
|
-
i.value =
|
|
4200
|
+
i.value = oa(e, o, s);
|
|
4206
4201
|
return;
|
|
4207
4202
|
}
|
|
4208
|
-
|
|
4203
|
+
oa(N(i), o, s);
|
|
4209
4204
|
}
|
|
4210
4205
|
function y(e) {
|
|
4211
4206
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -4224,7 +4219,7 @@ function Ps(...e) {
|
|
|
4224
4219
|
n = null;
|
|
4225
4220
|
}
|
|
4226
4221
|
m(() => {
|
|
4227
|
-
if (
|
|
4222
|
+
if (Ms(), o) throw o;
|
|
4228
4223
|
});
|
|
4229
4224
|
}
|
|
4230
4225
|
let b = {
|
|
@@ -4236,19 +4231,19 @@ function Ps(...e) {
|
|
|
4236
4231
|
};
|
|
4237
4232
|
function x(e) {
|
|
4238
4233
|
let n = N(r);
|
|
4239
|
-
return e ||=
|
|
4234
|
+
return e ||= fa(n) ? ha(n, t?.$el) : n, e && !va(e) && (e = e.$el), e || aa("Root element not found"), e;
|
|
4240
4235
|
}
|
|
4241
4236
|
function S() {
|
|
4242
|
-
let e = N(o) ?? {}, { immediate: t, clone: n } = e, r =
|
|
4243
|
-
return
|
|
4244
|
-
|
|
4245
|
-
}),
|
|
4237
|
+
let e = N(o) ?? {}, { immediate: t, clone: n } = e, r = na(e, ["immediate", "clone"]);
|
|
4238
|
+
return ya(r, (e, t) => {
|
|
4239
|
+
ba(e) && (r[e] = (e, ...n) => (xa(e, Ns()), t(e, ...n)));
|
|
4240
|
+
}), _a(i === null ? {} : b, r);
|
|
4246
4241
|
}
|
|
4247
4242
|
let C = (e) => {
|
|
4248
4243
|
e = x(e), c && w.destroy(), c = new Q(e, S());
|
|
4249
4244
|
};
|
|
4250
4245
|
s(() => o, () => {
|
|
4251
|
-
c &&
|
|
4246
|
+
c && ya(S(), (e, t) => {
|
|
4252
4247
|
c?.option(e, t);
|
|
4253
4248
|
});
|
|
4254
4249
|
}, { deep: !0 });
|
|
@@ -4261,15 +4256,15 @@ function Ps(...e) {
|
|
|
4261
4256
|
toArray: () => c?.toArray(),
|
|
4262
4257
|
closest: (...e) => c?.closest(...e)
|
|
4263
4258
|
};
|
|
4264
|
-
return
|
|
4259
|
+
return ks(() => {
|
|
4265
4260
|
l && C();
|
|
4266
|
-
}),
|
|
4261
|
+
}), Os(w.destroy), ta({
|
|
4267
4262
|
start: C,
|
|
4268
4263
|
pause: () => w?.option("disabled", !0),
|
|
4269
4264
|
resume: () => w?.option("disabled", !1)
|
|
4270
4265
|
}, w);
|
|
4271
4266
|
}
|
|
4272
|
-
var
|
|
4267
|
+
var Is = [
|
|
4273
4268
|
"update",
|
|
4274
4269
|
"start",
|
|
4275
4270
|
"add",
|
|
@@ -4282,7 +4277,7 @@ var Fs = [
|
|
|
4282
4277
|
"clone",
|
|
4283
4278
|
"move",
|
|
4284
4279
|
"change"
|
|
4285
|
-
],
|
|
4280
|
+
], Ls = [
|
|
4286
4281
|
"clone",
|
|
4287
4282
|
"animation",
|
|
4288
4283
|
"ghostClass",
|
|
@@ -4326,43 +4321,43 @@ var Fs = [
|
|
|
4326
4321
|
"tag",
|
|
4327
4322
|
"target",
|
|
4328
4323
|
"customUpdate",
|
|
4329
|
-
...
|
|
4330
|
-
],
|
|
4324
|
+
...Is.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
4325
|
+
], Rs = I({
|
|
4331
4326
|
name: "VueDraggable",
|
|
4332
4327
|
model: {
|
|
4333
4328
|
prop: "modelValue",
|
|
4334
4329
|
event: "update:modelValue"
|
|
4335
4330
|
},
|
|
4336
|
-
props:
|
|
4337
|
-
emits: ["update:modelValue", ...
|
|
4331
|
+
props: Ls,
|
|
4332
|
+
emits: ["update:modelValue", ...Is],
|
|
4338
4333
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
4339
|
-
let a =
|
|
4334
|
+
let a = Is.reduce((e, t) => {
|
|
4340
4335
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
4341
4336
|
return e[r] = (...e) => n(t, ...e), e;
|
|
4342
4337
|
}, {}), s = P(() => {
|
|
4343
|
-
let t = C(e), { modelValue: n } = t, r =
|
|
4338
|
+
let t = C(e), { modelValue: n } = t, r = na(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
4344
4339
|
let r = N(n);
|
|
4345
4340
|
return r !== void 0 && (e[t] = r), e;
|
|
4346
4341
|
}, {});
|
|
4347
|
-
return
|
|
4342
|
+
return ta(ta({}, a), ca(ta(ta({}, i), o)));
|
|
4348
4343
|
}), c = P({
|
|
4349
4344
|
get: () => e.modelValue,
|
|
4350
4345
|
set: (e) => n("update:modelValue", e)
|
|
4351
|
-
}), l = _(), u = o(
|
|
4346
|
+
}), l = _(), u = o(Fs(e.target || l, c, s));
|
|
4352
4347
|
return r(u), () => b(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
4353
4348
|
}
|
|
4354
|
-
}),
|
|
4349
|
+
}), zs = {
|
|
4355
4350
|
mounted: "mounted",
|
|
4356
4351
|
unmounted: "unmounted"
|
|
4357
4352
|
};
|
|
4358
|
-
|
|
4353
|
+
zs.mounted, zs.unmounted;
|
|
4359
4354
|
//#endregion
|
|
4360
4355
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4361
|
-
var
|
|
4356
|
+
var Bs = { class: "tpl:w-full" }, Vs = {
|
|
4362
4357
|
key: 0,
|
|
4363
4358
|
"data-testid": "section-drop-hint",
|
|
4364
4359
|
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)]"
|
|
4365
|
-
},
|
|
4360
|
+
}, Hs = /* @__PURE__ */ I({
|
|
4366
4361
|
__name: "SectionBlock",
|
|
4367
4362
|
props: {
|
|
4368
4363
|
block: {},
|
|
@@ -4370,13 +4365,13 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4370
4365
|
},
|
|
4371
4366
|
setup(e) {
|
|
4372
4367
|
let n = {
|
|
4373
|
-
title:
|
|
4374
|
-
paragraph:
|
|
4375
|
-
image:
|
|
4376
|
-
button:
|
|
4377
|
-
divider:
|
|
4378
|
-
custom:
|
|
4379
|
-
}, i = e, { t: a } =
|
|
4368
|
+
title: Ji,
|
|
4369
|
+
paragraph: ki,
|
|
4370
|
+
image: gi,
|
|
4371
|
+
button: ar,
|
|
4372
|
+
divider: Xr,
|
|
4373
|
+
custom: Jr
|
|
4374
|
+
}, i = e, { t: a } = zt(), o = gt(wt, "SectionBlock"), s = p(xt, null), c = p(Mt, null), l = p(bt, {}), f = p(jt, null);
|
|
4380
4375
|
function m(e) {
|
|
4381
4376
|
let t = l.savedBlocks;
|
|
4382
4377
|
if (t?.isPicking.value) {
|
|
@@ -4411,7 +4406,7 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4411
4406
|
r[e] = n, o.updateBlock(i.block.id, { children: r });
|
|
4412
4407
|
}
|
|
4413
4408
|
function b(e) {
|
|
4414
|
-
return
|
|
4409
|
+
return ji(e, c, n);
|
|
4415
4410
|
}
|
|
4416
4411
|
function C(e, t) {
|
|
4417
4412
|
e.type === "custom" && o.updateBlock(e.id, {
|
|
@@ -4419,16 +4414,16 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4419
4414
|
dataSourceFetched: t.dataSourceFetched
|
|
4420
4415
|
});
|
|
4421
4416
|
}
|
|
4422
|
-
return (n, i) => (O(), S("div",
|
|
4417
|
+
return (n, i) => (O(), S("div", Bs, [x("div", { class: r(["tpl:flex tpl:gap-0", { "tpl:flex-col": _.value }]) }, [(O(!0), S(M, null, D(g.value, (n, i) => (O(), S("div", {
|
|
4423
4418
|
key: i,
|
|
4424
4419
|
class: r(["tpl:relative tpl:min-h-[60px] tpl:rounded", v(i).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4425
4420
|
style: u({ width: _.value ? "100%" : h.value[i] })
|
|
4426
|
-
}, [w(N(
|
|
4421
|
+
}, [w(N(Rs), {
|
|
4427
4422
|
"model-value": v(i),
|
|
4428
4423
|
group: {
|
|
4429
4424
|
name: "blocks",
|
|
4430
4425
|
pull: !0,
|
|
4431
|
-
put: (e, t, n) => N(
|
|
4426
|
+
put: (e, t, n) => N(Yi)(n)
|
|
4432
4427
|
},
|
|
4433
4428
|
animation: 150,
|
|
4434
4429
|
"ghost-class": "tpl-ghost",
|
|
@@ -4441,7 +4436,7 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4441
4436
|
class: "tpl:min-h-[60px]",
|
|
4442
4437
|
"onUpdate:modelValue": (e) => y(i, e)
|
|
4443
4438
|
}, {
|
|
4444
|
-
default: re(() => [(O(!0), S(M, null, D(v(i), (n) => t((O(), S("div", { key: n.id }, [w(
|
|
4439
|
+
default: re(() => [(O(!0), S(M, null, D(v(i), (n) => t((O(), S("div", { key: n.id }, [w(Ki, {
|
|
4445
4440
|
block: n,
|
|
4446
4441
|
"is-selected": N(o).state.selectedBlockId === n.id,
|
|
4447
4442
|
viewport: e.viewport,
|
|
@@ -4473,13 +4468,13 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4473
4468
|
"model-value",
|
|
4474
4469
|
"group",
|
|
4475
4470
|
"onUpdate:modelValue"
|
|
4476
|
-
]), v(i).length === 0 ? (O(), S("div",
|
|
4471
|
+
]), v(i).length === 0 ? (O(), S("div", Vs, [x("span", null, k(N(a).section.dropHere), 1)])) : F("", !0)], 6))), 128))], 2)]));
|
|
4477
4472
|
}
|
|
4478
|
-
}),
|
|
4473
|
+
}), Us = Ce, Ws = {
|
|
4479
4474
|
small: 24,
|
|
4480
4475
|
medium: 32,
|
|
4481
4476
|
large: 48
|
|
4482
|
-
},
|
|
4477
|
+
}, Gs = [
|
|
4483
4478
|
"facebook",
|
|
4484
4479
|
"twitter",
|
|
4485
4480
|
"instagram",
|
|
@@ -4497,11 +4492,11 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4497
4492
|
"github",
|
|
4498
4493
|
"dribbble",
|
|
4499
4494
|
"behance"
|
|
4500
|
-
],
|
|
4495
|
+
], Ks = [
|
|
4501
4496
|
"width",
|
|
4502
4497
|
"height",
|
|
4503
4498
|
"fill"
|
|
4504
|
-
],
|
|
4499
|
+
], qs = ["d"], Js = /* @__PURE__ */ I({
|
|
4505
4500
|
__name: "SocialIconSvg",
|
|
4506
4501
|
props: {
|
|
4507
4502
|
platform: {},
|
|
@@ -4509,7 +4504,7 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4509
4504
|
iconSize: {}
|
|
4510
4505
|
},
|
|
4511
4506
|
setup(e) {
|
|
4512
|
-
let t = e, n = P(() =>
|
|
4507
|
+
let t = e, n = P(() => Us[t.platform]), r = P(() => Ws[t.iconSize]), i = P(() => {
|
|
4513
4508
|
let e = {
|
|
4514
4509
|
display: "inline-flex",
|
|
4515
4510
|
alignItems: "center",
|
|
@@ -4553,25 +4548,25 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4553
4548
|
viewBox: "0 0 24 24",
|
|
4554
4549
|
fill: o.value,
|
|
4555
4550
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4556
|
-
}, [x("path", { d: n.value.path }, null, 8,
|
|
4551
|
+
}, [x("path", { d: n.value.path }, null, 8, qs)], 8, Ks))], 4));
|
|
4557
4552
|
}
|
|
4558
|
-
}),
|
|
4553
|
+
}), Ys = { class: "tpl:w-full" }, Xs = ["href"], Zs = {
|
|
4559
4554
|
key: 1,
|
|
4560
4555
|
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)]"
|
|
4561
|
-
},
|
|
4556
|
+
}, Qs = /* @__PURE__ */ I({
|
|
4562
4557
|
__name: "SocialIconsBlock",
|
|
4563
4558
|
props: {
|
|
4564
4559
|
block: {},
|
|
4565
4560
|
viewport: {}
|
|
4566
4561
|
},
|
|
4567
4562
|
setup(e) {
|
|
4568
|
-
let t = e, { t: n } =
|
|
4563
|
+
let t = e, { t: n } = zt(), r = P(() => ({
|
|
4569
4564
|
display: "flex",
|
|
4570
4565
|
flexWrap: "wrap",
|
|
4571
4566
|
gap: `${t.block.spacing}px`,
|
|
4572
4567
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4573
4568
|
})), i = P(() => t.block.icons.length > 0);
|
|
4574
|
-
return (t, a) => (O(), S("div",
|
|
4569
|
+
return (t, a) => (O(), S("div", Ys, [i.value ? (O(), S("div", {
|
|
4575
4570
|
key: 0,
|
|
4576
4571
|
style: u(r.value)
|
|
4577
4572
|
}, [(O(!0), S(M, null, D(e.block.icons, (t) => (O(), S("a", {
|
|
@@ -4579,7 +4574,7 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4579
4574
|
href: t.url || "#",
|
|
4580
4575
|
class: "tpl:cursor-default",
|
|
4581
4576
|
onClick: a[0] ||= L(() => {}, ["prevent"])
|
|
4582
|
-
}, [w(
|
|
4577
|
+
}, [w(Js, {
|
|
4583
4578
|
platform: t.platform,
|
|
4584
4579
|
"icon-style": e.block.iconStyle,
|
|
4585
4580
|
"icon-size": e.block.iconSize
|
|
@@ -4587,44 +4582,44 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4587
4582
|
"platform",
|
|
4588
4583
|
"icon-style",
|
|
4589
4584
|
"icon-size"
|
|
4590
|
-
])], 8,
|
|
4585
|
+
])], 8, Xs))), 128))], 4)) : (O(), S("div", Zs, [w(N(gr), { size: 16 }), x("span", null, k(N(n).social.addIcons), 1)]))]));
|
|
4591
4586
|
}
|
|
4592
|
-
}),
|
|
4587
|
+
}), $s = { class: "tpl:w-full" }, ec = {
|
|
4593
4588
|
key: 0,
|
|
4594
4589
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4595
4590
|
style: {
|
|
4596
4591
|
"background-color": "var(--tpl-bg-hover)",
|
|
4597
4592
|
color: "var(--tpl-text-dim)"
|
|
4598
4593
|
}
|
|
4599
|
-
},
|
|
4594
|
+
}, tc = /* @__PURE__ */ I({
|
|
4600
4595
|
__name: "SpacerBlock",
|
|
4601
4596
|
props: {
|
|
4602
4597
|
block: {},
|
|
4603
4598
|
viewport: {}
|
|
4604
4599
|
},
|
|
4605
4600
|
setup(e) {
|
|
4606
|
-
let t = e, n =
|
|
4601
|
+
let t = e, n = gt(wt, "SpacerBlock"), i = P(() => ({
|
|
4607
4602
|
height: `${t.block.height}px`,
|
|
4608
4603
|
minHeight: `${t.block.height}px`,
|
|
4609
4604
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4610
4605
|
}));
|
|
4611
|
-
return (t, a) => (O(), S("div",
|
|
4606
|
+
return (t, a) => (O(), S("div", $s, [x("div", {
|
|
4612
4607
|
style: u(i.value),
|
|
4613
4608
|
class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !N(n).state.previewMode }])
|
|
4614
|
-
}, [N(n).state.previewMode ? F("", !0) : (O(), S("span",
|
|
4609
|
+
}, [N(n).state.previewMode ? F("", !0) : (O(), S("span", ec, k(e.block.height) + "px ", 1))], 6)]));
|
|
4615
4610
|
}
|
|
4616
|
-
}),
|
|
4611
|
+
}), nc = { class: "tpl:w-full" }, rc = { key: 0 }, ic = [
|
|
4617
4612
|
"aria-label",
|
|
4618
4613
|
"data-placeholder",
|
|
4619
4614
|
"onBlur"
|
|
4620
|
-
],
|
|
4615
|
+
], ac = [
|
|
4621
4616
|
"aria-label",
|
|
4622
4617
|
"data-placeholder",
|
|
4623
4618
|
"onBlur"
|
|
4624
|
-
],
|
|
4619
|
+
], oc = {
|
|
4625
4620
|
key: 1,
|
|
4626
4621
|
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)]"
|
|
4627
|
-
},
|
|
4622
|
+
}, sc = /*#__PURE__*/ $t(/* @__PURE__ */ I({
|
|
4628
4623
|
__name: "TableBlock",
|
|
4629
4624
|
props: {
|
|
4630
4625
|
block: {},
|
|
@@ -4638,7 +4633,7 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4638
4633
|
updated(e, t) {
|
|
4639
4634
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4640
4635
|
}
|
|
4641
|
-
}, r = e, { t: i } =
|
|
4636
|
+
}, r = e, { t: i } = zt(), a = gt(wt, "TableBlock"), o = P(() => r.block.rows.length > 0), s = P(() => {
|
|
4642
4637
|
let e = {
|
|
4643
4638
|
width: "100%",
|
|
4644
4639
|
borderCollapse: "collapse",
|
|
@@ -4669,11 +4664,11 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4669
4664
|
} : n);
|
|
4670
4665
|
a.updateBlock(r.block.id, { rows: o });
|
|
4671
4666
|
}
|
|
4672
|
-
return (e, r) => (O(), S("div",
|
|
4667
|
+
return (e, r) => (O(), S("div", nc, [o.value ? (O(), S("table", {
|
|
4673
4668
|
key: 0,
|
|
4674
4669
|
style: u(s.value),
|
|
4675
4670
|
class: "tpl-table-editable"
|
|
4676
|
-
}, [d.value ? (O(), S("thead",
|
|
4671
|
+
}, [d.value ? (O(), S("thead", rc, [x("tr", null, [(O(!0), S(M, null, D(d.value.cells, (e) => t((O(), S("th", {
|
|
4677
4672
|
key: e.id,
|
|
4678
4673
|
style: u(l.value),
|
|
4679
4674
|
"aria-label": N(i).table.cellPlaceholder,
|
|
@@ -4682,7 +4677,7 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4682
4677
|
onBlur: (t) => m(d.value.id, e.id, t),
|
|
4683
4678
|
onKeydown: r[0] ||= ae(L((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4684
4679
|
onClick: L(p, ["stop"])
|
|
4685
|
-
}, null, 44,
|
|
4680
|
+
}, null, 44, ic)), [[n, e.content]])), 128))])])) : F("", !0), x("tbody", null, [(O(!0), S(M, null, D(f.value, (e) => (O(), S("tr", { key: e.id }, [(O(!0), S(M, null, D(e.cells, (a) => t((O(), S("td", {
|
|
4686
4681
|
key: a.id,
|
|
4687
4682
|
style: u(c.value),
|
|
4688
4683
|
"aria-label": N(i).table.cellPlaceholder,
|
|
@@ -4691,9 +4686,9 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4691
4686
|
onBlur: (t) => m(e.id, a.id, t),
|
|
4692
4687
|
onKeydown: r[1] ||= ae(L((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4693
4688
|
onClick: L(p, ["stop"])
|
|
4694
|
-
}, null, 44,
|
|
4689
|
+
}, null, 44, ac)), [[n, a.content]])), 128))]))), 128))])], 4)) : (O(), S("div", oc, [w(N(_r), { size: 16 }), x("span", null, k(N(i).table.empty), 1)]))]));
|
|
4695
4690
|
}
|
|
4696
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4691
|
+
}), [["__scopeId", "data-v-963ac422"]]), cc = /* @__PURE__ */ I({
|
|
4697
4692
|
__name: "VideoPlayButton",
|
|
4698
4693
|
props: { hoverEffect: {
|
|
4699
4694
|
type: Boolean,
|
|
@@ -4711,7 +4706,7 @@ var zs = { class: "tpl:w-full" }, Bs = {
|
|
|
4711
4706
|
});
|
|
4712
4707
|
//#endregion
|
|
4713
4708
|
//#region src/utils/videoThumbnail.ts
|
|
4714
|
-
function
|
|
4709
|
+
function lc(e) {
|
|
4715
4710
|
if (!e) return {
|
|
4716
4711
|
platform: "unknown",
|
|
4717
4712
|
videoId: null,
|
|
@@ -4743,25 +4738,25 @@ function cc(e) {
|
|
|
4743
4738
|
thumbnailUrl: null
|
|
4744
4739
|
};
|
|
4745
4740
|
}
|
|
4746
|
-
function
|
|
4747
|
-
return t ||
|
|
4741
|
+
function uc(e, t) {
|
|
4742
|
+
return t || lc(e).thumbnailUrl;
|
|
4748
4743
|
}
|
|
4749
4744
|
//#endregion
|
|
4750
4745
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4751
|
-
var
|
|
4746
|
+
var dc = ["src", "alt"], fc = {
|
|
4752
4747
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4753
4748
|
style: { opacity: "0.7" }
|
|
4754
|
-
},
|
|
4749
|
+
}, pc = ["href"], mc = ["src", "alt"], hc = ["src", "alt"], gc = {
|
|
4755
4750
|
key: 3,
|
|
4756
4751
|
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)]"
|
|
4757
|
-
},
|
|
4752
|
+
}, _c = /* @__PURE__ */ I({
|
|
4758
4753
|
__name: "VideoBlock",
|
|
4759
4754
|
props: {
|
|
4760
4755
|
block: {},
|
|
4761
4756
|
viewport: {}
|
|
4762
4757
|
},
|
|
4763
4758
|
setup(e) {
|
|
4764
|
-
let t = e, { t: n } =
|
|
4759
|
+
let t = e, { t: n } = zt(), { syntax: r } = tn(), i = P(() => Me(t.block.url, r) || Me(t.block.thumbnailUrl, r)), a = Mn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Mn(() => i.value ? t.block.placeholderUrl : void 0), s = P(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : uc(t.block.url)), c = P(() => ({ textAlign: t.block.align })), l = P(() => {
|
|
4765
4760
|
let e = t.block.align;
|
|
4766
4761
|
return {
|
|
4767
4762
|
maxWidth: "100%",
|
|
@@ -4771,7 +4766,7 @@ var uc = ["src", "alt"], dc = {
|
|
|
4771
4766
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4772
4767
|
marginRight: e === "center" ? "auto" : void 0
|
|
4773
4768
|
};
|
|
4774
|
-
}), d = P(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = P(() =>
|
|
4769
|
+
}), d = P(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = P(() => Me(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4775
4770
|
return (t, r) => (O(), S("div", {
|
|
4776
4771
|
class: "tpl:w-full",
|
|
4777
4772
|
style: u(c.value)
|
|
@@ -4784,16 +4779,16 @@ var uc = ["src", "alt"], dc = {
|
|
|
4784
4779
|
src: N(o),
|
|
4785
4780
|
alt: e.block.alt,
|
|
4786
4781
|
style: u(d.value)
|
|
4787
|
-
}, null, 12,
|
|
4782
|
+
}, null, 12, dc), w(cc)], 4)) : i.value ? (O(), S("div", {
|
|
4788
4783
|
key: 1,
|
|
4789
4784
|
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)]",
|
|
4790
4785
|
style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, l.value])
|
|
4791
|
-
}, [w(N(
|
|
4786
|
+
}, [w(N(vr), {
|
|
4792
4787
|
size: 36,
|
|
4793
4788
|
"stroke-width": 1.5,
|
|
4794
4789
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4795
4790
|
style: { opacity: "0.5" }
|
|
4796
|
-
}), x("span",
|
|
4791
|
+
}), x("span", fc, [w(rr, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (O(), S(M, { key: 2 }, [e.block.url ? (O(), S("a", {
|
|
4797
4792
|
key: 0,
|
|
4798
4793
|
href: e.block.url,
|
|
4799
4794
|
target: "_blank",
|
|
@@ -4806,7 +4801,7 @@ var uc = ["src", "alt"], dc = {
|
|
|
4806
4801
|
src: s.value,
|
|
4807
4802
|
alt: e.block.alt,
|
|
4808
4803
|
style: u(d.value)
|
|
4809
|
-
}, null, 12,
|
|
4804
|
+
}, null, 12, mc), w(cc, { "hover-effect": "" })], 12, pc)) : (O(), S("div", {
|
|
4810
4805
|
key: 1,
|
|
4811
4806
|
class: "tpl:relative tpl:inline-block",
|
|
4812
4807
|
style: u(l.value)
|
|
@@ -4815,51 +4810,51 @@ var uc = ["src", "alt"], dc = {
|
|
|
4815
4810
|
src: s.value,
|
|
4816
4811
|
alt: e.block.alt,
|
|
4817
4812
|
style: u(d.value)
|
|
4818
|
-
}, null, 12,
|
|
4813
|
+
}, null, 12, hc), w(cc)], 4))], 64)) : (O(), S("div", gc, [w(N(vr), {
|
|
4819
4814
|
size: 40,
|
|
4820
4815
|
"stroke-width": 1.5,
|
|
4821
4816
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4822
4817
|
}), x("span", null, k(N(n).video.addVideo), 1)]))], 4));
|
|
4823
4818
|
}
|
|
4824
|
-
}),
|
|
4825
|
-
section:
|
|
4826
|
-
title:
|
|
4827
|
-
paragraph:
|
|
4828
|
-
image:
|
|
4829
|
-
button:
|
|
4830
|
-
divider:
|
|
4831
|
-
video:
|
|
4832
|
-
social:
|
|
4833
|
-
menu:
|
|
4834
|
-
table:
|
|
4835
|
-
spacer:
|
|
4836
|
-
html:
|
|
4837
|
-
countdown: y(() => import("./CountdownBlock-
|
|
4819
|
+
}), vc = {
|
|
4820
|
+
section: Hs,
|
|
4821
|
+
title: Ji,
|
|
4822
|
+
paragraph: ki,
|
|
4823
|
+
image: gi,
|
|
4824
|
+
button: ar,
|
|
4825
|
+
divider: Xr,
|
|
4826
|
+
video: _c,
|
|
4827
|
+
social: Qs,
|
|
4828
|
+
menu: bi,
|
|
4829
|
+
table: sc,
|
|
4830
|
+
spacer: tc,
|
|
4831
|
+
html: ni,
|
|
4832
|
+
countdown: y(() => import("./CountdownBlock-BgNK7fZY.js"))
|
|
4838
4833
|
};
|
|
4839
|
-
function
|
|
4840
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
4834
|
+
function yc(t) {
|
|
4835
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = zt(i);
|
|
4841
4836
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4842
|
-
let { resolvedTheme: l } =
|
|
4837
|
+
let { resolvedTheme: l } = Bn(P(() => n.state.uiTheme)), u = _(r.theme ?? {}), { themeStyles: d } = Hn({
|
|
4843
4838
|
themeOverrides: u,
|
|
4844
4839
|
resolvedTheme: l,
|
|
4845
4840
|
extraStyles: () => ({
|
|
4846
4841
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
4847
4842
|
...t.themeExtraStyles?.()
|
|
4848
4843
|
})
|
|
4849
|
-
}), f =
|
|
4844
|
+
}), f = dn({
|
|
4850
4845
|
content: n.content,
|
|
4851
4846
|
setContent: (e, t) => n.setContent(e, t),
|
|
4852
4847
|
...t.historyOptions
|
|
4853
4848
|
});
|
|
4854
|
-
|
|
4855
|
-
let p =
|
|
4849
|
+
vn(n, f);
|
|
4850
|
+
let p = pn({
|
|
4856
4851
|
addBlock: n.addBlock,
|
|
4857
4852
|
removeBlock: n.removeBlock,
|
|
4858
4853
|
updateBlock: n.updateBlock,
|
|
4859
4854
|
selectBlock: n.selectBlock,
|
|
4860
4855
|
findBlockLocation: n.findBlockLocation,
|
|
4861
4856
|
blockDefaults: r.blockDefaults
|
|
4862
|
-
}), m =
|
|
4857
|
+
}), m = gn(n), g = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? hn({
|
|
4863
4858
|
content: n.content,
|
|
4864
4859
|
isDirty: () => n.state.isDirty,
|
|
4865
4860
|
...t.autoSaveOptions
|
|
@@ -4867,28 +4862,28 @@ function vc(t) {
|
|
|
4867
4862
|
g && (v = s(f.isNavigating, (e) => {
|
|
4868
4863
|
e ? g.pause() : g.resume();
|
|
4869
4864
|
}));
|
|
4870
|
-
let y =
|
|
4865
|
+
let y = zn(n, {
|
|
4871
4866
|
t: o,
|
|
4872
4867
|
format: c
|
|
4873
|
-
}, r.customBlocks ?? []), b =
|
|
4874
|
-
if (b.allowCustomIgnored &&
|
|
4875
|
-
let e =
|
|
4876
|
-
e.length > 0 &&
|
|
4868
|
+
}, r.customBlocks ?? []), b = Ut(r.colors);
|
|
4869
|
+
if (b.allowCustomIgnored && Bt.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && Bt.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4870
|
+
let e = Zn(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4871
|
+
e.length > 0 && Bt.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.`);
|
|
4877
4872
|
}
|
|
4878
|
-
let x =
|
|
4879
|
-
|
|
4873
|
+
let x = Un();
|
|
4874
|
+
Jn(x, vc);
|
|
4880
4875
|
let S = /* @__PURE__ */ new Set();
|
|
4881
4876
|
function C(e) {
|
|
4882
4877
|
for (let t of e) {
|
|
4883
|
-
x.registerCustom(t,
|
|
4884
|
-
for (let e of
|
|
4878
|
+
x.registerCustom(t, Jr);
|
|
4879
|
+
for (let e of $n(t, b)) S.has(e.id) || (S.add(e.id), Bt.warn(e.message));
|
|
4885
4880
|
}
|
|
4886
4881
|
}
|
|
4887
4882
|
r.customBlocks?.length && C(r.customBlocks);
|
|
4888
|
-
let w =
|
|
4883
|
+
let w = On();
|
|
4889
4884
|
if (h() && j(w.dispose), t.containerEl) {
|
|
4890
4885
|
let e = t.containerEl;
|
|
4891
|
-
|
|
4886
|
+
Ze(document, "pointerdown", (t) => {
|
|
4892
4887
|
let n = e.value;
|
|
4893
4888
|
n && (t.composedPath?.() ?? []).includes(n) && w.claim();
|
|
4894
4889
|
}, { capture: !0 });
|
|
@@ -4902,7 +4897,7 @@ function vc(t) {
|
|
|
4902
4897
|
g?.flush();
|
|
4903
4898
|
}
|
|
4904
4899
|
function E(e) {
|
|
4905
|
-
w.isActive() &&
|
|
4900
|
+
w.isActive() && tr(e, {
|
|
4906
4901
|
history: f,
|
|
4907
4902
|
selectBlock: (e) => n.selectBlock(e),
|
|
4908
4903
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4914,31 +4909,31 @@ function vc(t) {
|
|
|
4914
4909
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4915
4910
|
});
|
|
4916
4911
|
}
|
|
4917
|
-
|
|
4912
|
+
Ze(document, "keydown", E);
|
|
4918
4913
|
let D = _(null);
|
|
4919
|
-
e(
|
|
4920
|
-
let O =
|
|
4921
|
-
e(
|
|
4922
|
-
let k = _(
|
|
4923
|
-
e(
|
|
4924
|
-
let A =
|
|
4914
|
+
e(Ct, t.editorRoot ?? document), e(dt, D), e(ht, i), e(wt, n), e(Pt, f), e(vt, p), e(xt, m), e(_t, a), e(tt, d), e(ot, l), e(kt, r.blockDefaults), e(Mt, x), e(St, r.customBlocks ?? []), e(lt, r.paletteBlocks), e(Lt, Yn(r.htmlBlockPreview)), e(Nt, b), e(At, Wn(n.content, x));
|
|
4915
|
+
let O = Ge(r.mergeTags?.syntax);
|
|
4916
|
+
e(pt, r.mergeTags?.tags ?? []), e(Et, O), e(ct, r.mergeTags?.onRequest ?? null), e(it, r.mergeTags?.autocomplete !== !1);
|
|
4917
|
+
let k = _(me(r.mergeTags?.tags ?? []));
|
|
4918
|
+
e(ut, k);
|
|
4919
|
+
let A = An({
|
|
4925
4920
|
resolvePreview: r.resolvePreview,
|
|
4926
4921
|
getContent: () => n.content.value,
|
|
4927
4922
|
isActive: () => n.state.previewMode
|
|
4928
4923
|
});
|
|
4929
|
-
e(
|
|
4924
|
+
e(at, A), e(st, r.resolvePreview);
|
|
4930
4925
|
let ee = P(() => !(n.state.previewMode && A.isConfigured));
|
|
4931
|
-
e(
|
|
4932
|
-
let M =
|
|
4933
|
-
e(
|
|
4934
|
-
let N =
|
|
4926
|
+
e(jt, ee);
|
|
4927
|
+
let M = Nn();
|
|
4928
|
+
e(rt, M), e(nt, r.logicTags?.tags ?? []), e(ft, r.logicTags?.pairs ?? []), e(et, r.logicTags?.onRequest ?? null), e(Ft, Pn()), e(Tt, r.onRequestMedia ?? null), e(yt, r.resolveImageUrl ? jn(r.resolveImageUrl) : null), e(Dt, r.displayConditions?.conditions ?? []), e(Ot, r.displayConditions?.allowCustom ?? !1), e(bt, t.capabilities ?? {}), e(It, y);
|
|
4929
|
+
let N = Fn(r.lint) ? null : In({
|
|
4935
4930
|
content: n.content,
|
|
4936
4931
|
options: r.lint ?? {},
|
|
4937
4932
|
updateBlock: n.updateBlock,
|
|
4938
4933
|
updateSettings: n.updateSettings,
|
|
4939
4934
|
removeBlock: n.removeBlock
|
|
4940
4935
|
});
|
|
4941
|
-
e(
|
|
4936
|
+
e(Rt, N);
|
|
4942
4937
|
function te() {
|
|
4943
4938
|
v?.(), N?.destroy(), g?.destroy(), f.destroy();
|
|
4944
4939
|
}
|
|
@@ -4964,4 +4959,4 @@ function vc(t) {
|
|
|
4964
4959
|
};
|
|
4965
4960
|
}
|
|
4966
4961
|
//#endregion
|
|
4967
|
-
export {
|
|
4962
|
+
export { gr as A, Rn as B, Fr as C, Cr as D, wr as E, lr as F, wn as G, An as H, cr as I, sn as J, Cn as K, or as L, pr as M, fr as N, xr as O, ur as P, ar as R, Lr as S, kr as T, mn as U, Ln as V, xn as W, Sn as X, yn as Y, ii as _, Qs as a, Jr as b, Rs as c, Mi as d, Ai as f, gi as g, bi as h, tc as i, mr as j, _r as k, Ji as l, ki as m, _c as n, Gs as o, ji as p, _n as q, sc as r, Hs as s, yc as t, Ki as u, ni as v, Ar as w, zr as x, Xr as y, Qn as z };
|