@templatical/editor 0.24.0 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-Nq-jrGaf.js → AiChatSidebar-X4viKtvs.js} +14 -14
- package/dist/{AiFeatureMenu-tg_zMKMK.js → AiFeatureMenu-DDAamRaA.js} +7 -7
- package/dist/{BlockIssueBadge-Bd94kIiw.js → BlockIssueBadge-Qxrl7Ujl.js} +5 -5
- package/dist/{BlockPreviewCanvas-B34aMhHe.js → BlockPreviewCanvas-Cf-kxbEr.js} +3 -3
- package/dist/{CloudEditor-DjN_9Yso.js → CloudEditor-JIzhj1Xq.js} +26 -26
- package/dist/{CollaboratorBar-Bhazzcg-.js → CollaboratorBar-tC7AACTb.js} +4 -4
- package/dist/{ColorPicker-DXGrcJxJ.js → ColorPicker--_2PbzFk.js} +7 -9
- package/dist/{CommentsSidebar-ku1kt10u.js → CommentsSidebar-Ci2Ov8FG.js} +15 -15
- package/dist/{CountdownBlock-CN9Lc23W.js → CountdownBlock-aZIKfBWY.js} +3 -3
- package/dist/{CountdownToolbar-VEsIyKV6.js → CountdownToolbar-DHp6T0Q_.js} +4 -4
- package/dist/DesignReferenceSidebar-DQsC-3hB.js +264 -0
- package/dist/{IssuesPanel-CEfzOpS_.js → IssuesPanel-CoOfib44.js} +8 -8
- package/dist/{LoadingTrack-KIcREPlS.js → LoadingTrack-XK_eeUdq.js} +1 -1
- package/dist/{MergeTagModeToggle-C3V2xGAg.js → MergeTagModeToggle-CiFiSV0C.js} +6 -6
- package/dist/{MergeTagSuggestion-Dn8ww9nV.js → MergeTagSuggestion-D0OHRv7L.js} +8 -12
- package/dist/{NumberWithSuffix-BGocZkj9.js → NumberWithSuffix-CXFbUqsx.js} +2 -2
- package/dist/{ParagraphEditor-D-fz0kUb.js → ParagraphEditor-Cy-bpEjI.js} +44 -44
- package/dist/{RichTextEditorContent-DydrqFts.js → RichTextEditorContent-CYJko6id.js} +8 -8
- package/dist/{SaveBlockDialog-BDDFbAWF.js → SaveBlockDialog-CNTSaMEa.js} +10 -10
- package/dist/{SavedBlocksBrowserModal-Djik_fJh.js → SavedBlocksBrowserModal-CvxS5-YX.js} +11 -11
- package/dist/{SavedBlocksPanels-CxemyPxL.js → SavedBlocksPanels-CNdUxS89.js} +2 -2
- package/dist/{SavedBlocksPickBar-Dlhipmob.js → SavedBlocksPickBar-BvXKhblL.js} +4 -4
- package/dist/{SnapshotHistory-DPbM4ons.js → SnapshotHistory-BqPSIV9L.js} +10 -10
- package/dist/{TemplateScoringPanel-BFYgweDX.js → TemplateScoringPanel-CMEuz9yF.js} +15 -15
- package/dist/{TestEmailModal-IZfwgya-.js → TestEmailModal-BDhnnCBx.js} +10 -10
- package/dist/{TestEmailPanel-QEEx_PkN.js → TestEmailPanel--RwnwLn2.js} +2 -2
- package/dist/{TitleEditor-BB4YlIBF.js → TitleEditor-F7E_pU9H.js} +12 -12
- package/dist/TplModal-BIiS24Of.js +49 -0
- package/dist/{blockTypeIcons-Wzd7W_2x.js → blockTypeIcons-C6PnLMp7.js} +26 -26
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiChatSidebar-CN-0DIuA.js → AiChatSidebar-UbF3ePzR.js} +8 -8
- package/dist/cdn/chunks/{AiChatSidebar-CN-0DIuA.js.map → AiChatSidebar-UbF3ePzR.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B5pV6Iux.js → AiFeatureMenu-OIwoJzHG.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B5pV6Iux.js.map → AiFeatureMenu-OIwoJzHG.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-aanOjeyi.js → BlockIssueBadge-Bd2EuT1C.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-aanOjeyi.js.map → BlockIssueBadge-Bd2EuT1C.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-Dc4F4HzY.js → BlockPreviewCanvas-C-ut8GkJ.js} +5 -5
- package/dist/cdn/chunks/{BlockPreviewCanvas-Dc4F4HzY.js.map → BlockPreviewCanvas-C-ut8GkJ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CeKaWWO5.js → CloudEditor-D87qsqbZ.js} +20 -20
- package/dist/cdn/chunks/{CloudEditor-CeKaWWO5.js.map → CloudEditor-D87qsqbZ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CEdKr0A2.js → CollaboratorBar-Br4RvNrA.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-CEdKr0A2.js.map → CollaboratorBar-Br4RvNrA.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-BckwEfcN.js → ColorPicker-B-ymPPtU.js} +8 -10
- package/dist/cdn/chunks/{ColorPicker-BckwEfcN.js.map → ColorPicker-B-ymPPtU.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-6PfpJKh-.js → CommentsSidebar-Tv_WTcJv.js} +6 -6
- package/dist/cdn/chunks/{CommentsSidebar-6PfpJKh-.js.map → CommentsSidebar-Tv_WTcJv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CoBmvQKv.js → CountdownBlock-cEcXSK91.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-CoBmvQKv.js.map → CountdownBlock-cEcXSK91.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CdV8RTQu.js → CountdownToolbar-CLp3_ebk.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-CdV8RTQu.js.map → CountdownToolbar-CLp3_ebk.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-YeqxSsxO.js +223 -0
- package/dist/cdn/chunks/{DesignReferenceSidebar-BjlaP69l.js.map → DesignReferenceSidebar-YeqxSsxO.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CkkEnhxZ.js → IssuesPanel-BhsvC3XQ.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-CkkEnhxZ.js.map → IssuesPanel-BhsvC3XQ.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-D-CW2tUa.js → LoadingTrack-G2tuXqCJ.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-D-CW2tUa.js.map → LoadingTrack-G2tuXqCJ.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DmtR300G.js → MergeTagModeToggle-DrdxQA0K.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-DmtR300G.js.map → MergeTagModeToggle-DrdxQA0K.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-Cvlkw_PM.js → MergeTagSuggestion-Ces5Ua78.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-Cvlkw_PM.js.map → MergeTagSuggestion-Ces5Ua78.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-BOcMN26z.js → NumberWithSuffix-BK_Xh4w4.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-BOcMN26z.js.map → NumberWithSuffix-BK_Xh4w4.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CX1yks4N.js → ParagraphEditor-DKz4vTWB.js} +131 -131
- package/dist/cdn/chunks/{ParagraphEditor-CX1yks4N.js.map → ParagraphEditor-DKz4vTWB.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-z9s7qxs3.js → RichTextEditorContent-CJ2WVicQ.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-z9s7qxs3.js.map → RichTextEditorContent-CJ2WVicQ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-D2CtW4lC.js → SaveBlockDialog-DTemkKPX.js} +8 -8
- package/dist/cdn/chunks/{SaveBlockDialog-D2CtW4lC.js.map → SaveBlockDialog-DTemkKPX.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DdUKJzzF.js → SavedBlocksBrowserModal-DbMaIbeH.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DdUKJzzF.js.map → SavedBlocksBrowserModal-DbMaIbeH.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-1kVbqdpc.js → SavedBlocksPanels-CUffuDAC.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-1kVbqdpc.js.map → SavedBlocksPanels-CUffuDAC.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar--noDJIyN.js → SavedBlocksPickBar-D7SmNz2n.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar--noDJIyN.js.map → SavedBlocksPickBar-D7SmNz2n.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-DFuNJRc9.js → SnapshotHistory-m5Z8bTej.js} +7 -7
- package/dist/cdn/chunks/{SnapshotHistory-DFuNJRc9.js.map → SnapshotHistory-m5Z8bTej.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-DG1dAjQk.js → TemplateScoringPanel-DgRU5fty.js} +6 -6
- package/dist/cdn/chunks/{TemplateScoringPanel-DG1dAjQk.js.map → TemplateScoringPanel-DgRU5fty.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-CiPfOn2v.js → TestEmailModal-Ce8-vzGh.js} +9 -9
- package/dist/cdn/chunks/{TestEmailModal-CiPfOn2v.js.map → TestEmailModal-Ce8-vzGh.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-saOfnpjz.js → TestEmailPanel-BlmIKKSL.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-saOfnpjz.js.map → TestEmailPanel-BlmIKKSL.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-08KM_VzZ.js → TitleEditor-C6_bQxYR.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-08KM_VzZ.js.map → TitleEditor-C6_bQxYR.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-D6bFON2K.js +50 -0
- package/dist/cdn/chunks/TplModal-D6bFON2K.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DvohkXqi.js → blockTypeIcons-B8s3_ahs.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-DvohkXqi.js.map → blockTypeIcons-B8s3_ahs.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-C2I0P9qj.js → cloud-CRlDc0Ev.js} +13 -17
- package/dist/cdn/chunks/{cloud-C2I0P9qj.js.map → cloud-CRlDc0Ev.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CxTt8FRE.js → dist-B8AX9np4.js} +16 -12
- package/dist/cdn/chunks/dist-B8AX9np4.js.map +1 -0
- package/dist/cdn/chunks/{dist-CiBEt0VR.js → dist-lZgXNk4G.js} +36 -20
- package/dist/cdn/chunks/dist-lZgXNk4G.js.map +1 -0
- package/dist/cdn/chunks/{draggable-D840DIZB.js → draggable-JcMTNF3U.js} +14 -15
- package/dist/cdn/chunks/{draggable-D840DIZB.js.map → draggable-JcMTNF3U.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-DBWF_lxx.js → extensions-CKMD_er_.js} +15 -11
- package/dist/cdn/chunks/{extensions-DBWF_lxx.js.map → extensions-CKMD_er_.js.map} +1 -1
- package/dist/cdn/chunks/{htmlparser-CZa2V5cF.js → htmlparser-CPhs2cYE.js} +3 -5
- package/dist/cdn/chunks/{htmlparser-CZa2V5cF.js.map → htmlparser-CPhs2cYE.js.map} +1 -1
- package/dist/cdn/chunks/{icons-Cqxvwgz7.js → icons-Cp4ZIJw-.js} +31 -31
- package/dist/cdn/chunks/{icons-Cqxvwgz7.js.map → icons-Cp4ZIJw-.js.map} +1 -1
- package/dist/cdn/chunks/{keys-B5uoP9P7.js → keys-CswSK7eb.js} +2 -2
- package/dist/cdn/chunks/{keys-B5uoP9P7.js.map → keys-CswSK7eb.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-BJOEu6Cg.js → liquid.browser-CZaQe87t.js} +756 -718
- package/dist/cdn/chunks/liquid.browser-CZaQe87t.js.map +1 -0
- package/dist/cdn/chunks/{pusher-R0v5p99W.js → pusher-kUlkqMvR.js} +21 -28
- package/dist/cdn/chunks/{pusher-R0v5p99W.js.map → pusher-kUlkqMvR.js.map} +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/cdn/chunks/{src-C45kfA2t.js → src-B3HKHglu.js} +5 -9
- package/dist/cdn/chunks/{src-C45kfA2t.js.map → src-B3HKHglu.js.map} +1 -1
- package/dist/cdn/chunks/{src-YVsPFLNJ.js → src-B4UhYbI8.js} +4 -4
- package/dist/cdn/chunks/{src-YVsPFLNJ.js.map → src-B4UhYbI8.js.map} +1 -1
- package/dist/cdn/chunks/{src-XQmI_Xs1.js → src-CumZZNXZ.js} +523 -787
- package/dist/cdn/chunks/{src-XQmI_Xs1.js.map → src-CumZZNXZ.js.map} +1 -1
- package/dist/cdn/chunks/{src-BCJna-6p.js → src-D5mfLR4V.js} +2 -2
- package/dist/cdn/chunks/{src-BCJna-6p.js.map → src-D5mfLR4V.js.map} +1 -1
- package/dist/cdn/chunks/{styles-BohMfIBd.js → styles--m9OCb_Z.js} +530 -530
- package/dist/cdn/chunks/{styles-BohMfIBd.js.map → styles--m9OCb_Z.js.map} +1 -1
- package/dist/cdn/chunks/timeouts-SsLMC4a3.js +6 -0
- package/dist/cdn/chunks/{timeouts-Bmi_yePw.js.map → timeouts-SsLMC4a3.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-DRKu__AX.js → tiptap-rsib432n.js} +132 -119
- package/dist/cdn/chunks/tiptap-rsib432n.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-aanU8uqB.js → useAliveFlag-CseYNikC.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-aanU8uqB.js.map → useAliveFlag-CseYNikC.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-Bem8DUjH.js → useCloudI18n-sx1pqEbY.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Bem8DUjH.js.map → useCloudI18n-sx1pqEbY.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-B_vwuKdI.js → useEditorCore-ZqF7P99K.js} +201 -199
- package/dist/cdn/chunks/{useEditorCore-B_vwuKdI.js.map → useEditorCore-ZqF7P99K.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-graz19nI.js → useI18n-vD57BfVR.js} +3 -3
- package/dist/cdn/chunks/{useI18n-graz19nI.js.map → useI18n-vD57BfVR.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-rTzAFMlr.js → useMergeTag-HatzNGgc.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-rTzAFMlr.js.map → useMergeTag-HatzNGgc.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BaFxLP3w.js → usePopoverPosition-BdQ3Sv4B.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-BaFxLP3w.js.map → usePopoverPosition-BdQ3Sv4B.js.map} +1 -1
- package/dist/cdn/editor.js +10 -10
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BpQDKiPz.js → check-CIhIDh4h.js} +1 -1
- package/dist/{chevron-down-j8GrdTyz.js → chevron-down-CZ0m6G3s.js} +1 -1
- package/dist/{chevron-up-BACyVhyC.js → chevron-up-BH_tJLeb.js} +1 -1
- package/dist/{circle-alert-CgtE46ND.js → circle-alert-DkEXnGPV.js} +1 -1
- package/dist/{clock-BzKLLW5L.js → clock-BDIJZUET.js} +1 -1
- package/dist/{cloud-DsUct4Zq.js → cloud-R8ci6yR1.js} +10 -14
- package/dist/{createLucideIcon-JWHwTI6N.js → createLucideIcon-AEltGIse.js} +3 -3
- package/dist/{dist-BAkGuPYm.js → dist-B6Px6GPj.js} +1 -1
- package/dist/{dist-DPHqs0Yh.js → dist-Ba5Q-UX1.js} +1 -1
- package/dist/{dist-9uhI32Q4.js → dist-BxbTVeY0.js} +1 -1
- package/dist/{dist-DWu9QWFl.js → dist-CIqhVQ1O.js} +5 -5
- package/dist/{dist-CkCVlKj_.js → dist-CRH880TV.js} +1 -1
- package/dist/{dist-ByJVlKWy.js → dist-CcQFPJMF.js} +116 -100
- package/dist/{dist-JXOq1hib.js → dist-CkPvZCld.js} +1 -1
- package/dist/{dist-IGetXrbO.js → dist-DSIgxp0v.js} +1 -1
- package/dist/{dist-DYv_Pttj.js → dist-DT1XnEnj.js} +33 -17
- package/dist/{dist-C_kAE1sC.js → dist-DX4x6mQ1.js} +3 -3
- package/dist/{dist-DFO896yT.js → dist-Dx71pluS.js} +16 -11
- package/dist/{dist-CQiAZlTt.js → dist-DyCHUyRR.js} +1 -1
- package/dist/{dist-BIYm-U9x.js → dist-iCEDH3cC.js} +1 -1
- package/dist/{dist-C5tigvDF.js → dist-nR6mxyqI.js} +1 -1
- package/dist/{extensions-C0DXnYdA.js → extensions-CGxj6-2o.js} +16 -12
- package/dist/{image-up-CQdtq8ge.js → image-up-8ktdYdaZ.js} +1 -1
- package/dist/{info-BUJBXoE6.js → info-CvrCgTLH.js} +1 -1
- package/dist/{keys-BVlG5Ozc.js → keys-uWpGv4Pq.js} +1 -1
- package/dist/{liquid.browser-DZLtv26k.js → liquid.browser-BECWFL5Z.js} +755 -717
- package/dist/{list-checks-BGHaCSD5.js → list-checks-yzGT93ZL.js} +1 -1
- package/dist/{loader-circle-C-Z6kgI6.js → loader-circle-B6euendB.js} +1 -1
- package/dist/{message-circle-CEm5qckV.js → message-circle-BMldLVcA.js} +1 -1
- package/dist/{pencil-DdwmkKLb.js → pencil-CkKkSd6N.js} +1 -1
- package/dist/{refresh-cw-maKlg0dl.js → refresh-cw-fBPgB97G.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-GdMI8WqG.js → runtime-dom.esm-bundler-CBbDt7sw.js} +2 -2
- package/dist/{scan-line-BFgesTOY.js → scan-line-CRoEOUiK.js} +1 -1
- package/dist/{send-B70aQDrA.js → send-B9Tt2qBi.js} +1 -1
- package/dist/{shield-check-B7x5OKt5.js → shield-check-QfZkYeIo.js} +1 -1
- package/dist/{sparkles-DVlm1Ipp.js → sparkles-8UeMmZb8.js} +1 -1
- package/dist/{styles-BTTD0Je4.js → styles-C9AMvkJk.js} +541 -541
- package/dist/templatical-editor.js +11 -11
- package/dist/{text-align-start-Vay3Kvo2.js → text-align-start-Dn8uIheW.js} +1 -1
- package/dist/{trash-2-DE8CmxAG.js → trash-2-DDyvqj0E.js} +1 -1
- package/dist/{triangle-alert-Djg6IG8N.js → triangle-alert-B3PydLzl.js} +1 -1
- package/dist/{upload-BwwE0U6G.js → upload-hE8ItfyG.js} +2 -2
- package/dist/{useAliveFlag-C43EhZFY.js → useAliveFlag-AfoTE_AY.js} +1 -1
- package/dist/{useCloudI18n-DGr3b2SX.js → useCloudI18n-BC_QV2Z7.js} +2 -2
- package/dist/{useEditorCore-DOrGex_t.js → useEditorCore-Dojb-P2f.js} +655 -655
- package/dist/{useI18n-BhAejA-x.js → useI18n-DzOcl2wl.js} +2 -2
- package/dist/{useMergeTag-Ce95YIOO.js → useMergeTag-BFxXCv3p.js} +3 -3
- package/dist/{usePopoverPosition-vjKJaqJf.js → usePopoverPosition-Dtr1Mp1x.js} +13 -13
- package/dist/{vue.runtime.esm-bundler-B0xoGkDv.js → vue.runtime.esm-bundler-Xpz-L9Fn.js} +27 -22
- package/dist/{x-CkD6A1iB.js → x-C4lETLDx.js} +1 -1
- package/package.json +12 -12
- package/dist/DesignReferenceSidebar-C4pTMzQE.js +0 -264
- package/dist/TplModal-DPH4vV8M.js +0 -49
- package/dist/cdn/chunks/DesignReferenceSidebar-BjlaP69l.js +0 -223
- package/dist/cdn/chunks/TplModal-Cu4tBBnF.js +0 -50
- package/dist/cdn/chunks/TplModal-Cu4tBBnF.js.map +0 -1
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +0 -1
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +0 -1
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +0 -6
- package/dist/cdn/chunks/tiptap-DRKu__AX.js.map +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as c, J as l, K as u, N as d, O as f, Ot as p, R as m, T as h, W as g, Y as _, Z as v, _ as y, c as b, d as x, et as S, g as C, h as w, j as T, k as E, l as D, m as O, nt as k, q as A, r as j, rt as ee, s as M, tt as te, u as N, v as ne, w as re, x as P, y as ie, z as ae } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { c as F, o as oe, s as se } from "./runtime-dom.esm-bundler-
|
|
3
|
-
import { t as ce } from "./upload-
|
|
4
|
-
import { A as le, B as ue, C as de, D as fe, E as pe, F as me, I as he, L as ge, M as _e, N as ve, O as ye, P as be, R as xe, S as Se, T as Ce, _ as we, a as Te, b as Ee, c as De, d as Oe, f as ke, g as Ae, h as je, i as Me, j as Ne, l as Pe, m as Fe, n as Ie, o as Le, p as Re, r as ze, t as Be, u as Ve, v as He, w as Ue, x as We, y as Ge, z as Ke } from "./dist-
|
|
5
|
-
import { f as qe, g as Je, h as Ye, m as Xe } from "./dist-
|
|
6
|
-
import { a as Ze, c as Qe, d as $e, i as et, l as tt, o as nt, r as rt, t as it, u as at } from "./usePopoverPosition-
|
|
7
|
-
import { A as ot, B as st, C as ct, D as lt, E as ut, H as dt, L as ft, M as pt, N as mt, O as ht, P as gt, R as _t, S as vt, T as yt, V as bt, _ as xt, a as St, b as Ct, d as wt, f as Tt, g as Et, h as Dt, i as Ot, j as kt, k as At, l as jt, m as Mt, n as Nt, o as Pt, p as Ft, s as It, v as Lt, w as Rt, x as zt, y as Bt, z as Vt } from "./keys-
|
|
8
|
-
import { t as Ht } from "./useI18n-
|
|
9
|
-
import { t 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 "./useCloudI18n-
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
1
|
+
import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as c, J as l, K as u, N as d, O as f, Ot as p, R as m, T as h, W as g, Y as _, Z as v, _ as y, c as b, d as x, et as S, g as C, h as w, j as T, k as E, l as D, m as O, nt as k, q as A, r as j, rt as ee, s as M, tt as te, u as N, v as ne, w as re, x as P, y as ie, z as ae } from "./vue.runtime.esm-bundler-Xpz-L9Fn.js";
|
|
2
|
+
import { c as F, o as oe, s as se } from "./runtime-dom.esm-bundler-CBbDt7sw.js";
|
|
3
|
+
import { t as ce } from "./upload-hE8ItfyG.js";
|
|
4
|
+
import { A as le, B as ue, C as de, D as fe, E as pe, F as me, I as he, L as ge, M as _e, N as ve, O as ye, P as be, R as xe, S as Se, T as Ce, _ as we, a as Te, b as Ee, c as De, d as Oe, f as ke, g as Ae, h as je, i as Me, j as Ne, l as Pe, m as Fe, n as Ie, o as Le, p as Re, r as ze, t as Be, u as Ve, v as He, w as Ue, x as We, y as Ge, z as Ke } from "./dist-Ba5Q-UX1.js";
|
|
5
|
+
import { f as qe, g as Je, h as Ye, m as Xe } from "./dist-DT1XnEnj.js";
|
|
6
|
+
import { a as Ze, c as Qe, d as $e, i as et, l as tt, o as nt, r as rt, t as it, u as at } from "./usePopoverPosition-Dtr1Mp1x.js";
|
|
7
|
+
import { A as ot, B as st, C as ct, D as lt, E as ut, H as dt, L as ft, M as pt, N as mt, O as ht, P as gt, R as _t, S as vt, T as yt, V as bt, _ as xt, a as St, b as Ct, d as wt, f as Tt, g as Et, h as Dt, i as Ot, j as kt, k as At, l as jt, m as Mt, n as Nt, o as Pt, p as Ft, s as It, v as Lt, w as Rt, x as zt, y as Bt, z as Vt } from "./keys-uWpGv4Pq.js";
|
|
8
|
+
import { t as Ht } from "./useI18n-DzOcl2wl.js";
|
|
9
|
+
import { t as I } from "./createLucideIcon-AEltGIse.js";
|
|
10
|
+
import { t as Ut } from "./loader-circle-B6euendB.js";
|
|
11
|
+
import { t as Wt } from "./message-circle-BMldLVcA.js";
|
|
12
|
+
import { t as Gt } from "./trash-2-DDyvqj0E.js";
|
|
13
|
+
import { t as Kt } from "./triangle-alert-B3PydLzl.js";
|
|
14
|
+
import { t as qt } from "./LoadingTrack-XK_eeUdq.js";
|
|
15
|
+
import { t as Jt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
|
+
import "./useCloudI18n-BC_QV2Z7.js";
|
|
17
|
+
import { t as Yt } from "./useMergeTag-BFxXCv3p.js";
|
|
18
|
+
import { t as Xt } from "./useAliveFlag-AfoTE_AY.js";
|
|
19
19
|
//#region ../core/dist/index.js
|
|
20
|
-
function
|
|
20
|
+
function Zt(e) {
|
|
21
21
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Qt(e) {
|
|
24
24
|
let t = A({
|
|
25
25
|
content: e.content ?? Re(e.defaultFontFamily, e.templateDefaults),
|
|
26
26
|
selectedBlockId: null,
|
|
@@ -111,7 +111,7 @@ function $t(e) {
|
|
|
111
111
|
if (c(n)) return;
|
|
112
112
|
let o = a(t.content.blocks, n);
|
|
113
113
|
if (o && o.type === "section") {
|
|
114
|
-
if (r < 0 || r >=
|
|
114
|
+
if (r < 0 || r >= Zt(o.columns)) return;
|
|
115
115
|
o.children[r] = o.children[r] || [];
|
|
116
116
|
let t = o.children[r];
|
|
117
117
|
i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
|
|
@@ -144,7 +144,7 @@ function $t(e) {
|
|
|
144
144
|
let u;
|
|
145
145
|
if (r) {
|
|
146
146
|
let e = a(t.content.blocks, r);
|
|
147
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
147
|
+
if (!e || e.type !== "section" || i < 0 || i >= Zt(e.columns)) return;
|
|
148
148
|
e.children[i] = e.children[i] || [], u = e.children[i];
|
|
149
149
|
} else u = t.content.blocks;
|
|
150
150
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -173,9 +173,9 @@ function $t(e) {
|
|
|
173
173
|
findBlockLocation: u
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
function
|
|
178
|
-
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a =
|
|
176
|
+
var $t = 50, en = 300, tn = 1500;
|
|
177
|
+
function nn(e) {
|
|
178
|
+
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = $t } = e, o = _([]), s = _([]), c = _(!1), l = null, u = null, d = n(() => o.value.length > 0), f = n(() => s.value.length > 0);
|
|
179
179
|
function p() {
|
|
180
180
|
return xe(t.value);
|
|
181
181
|
}
|
|
@@ -193,21 +193,21 @@ function rn(e) {
|
|
|
193
193
|
if (u && u.blockId === e) {
|
|
194
194
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
195
195
|
u = null;
|
|
196
|
-
},
|
|
196
|
+
}, en);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
199
|
h(), m(p()), s.value = [], u = {
|
|
200
200
|
blockId: e,
|
|
201
201
|
timeoutId: setTimeout(() => {
|
|
202
202
|
u = null;
|
|
203
|
-
},
|
|
203
|
+
}, en)
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
function y() {
|
|
208
208
|
c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
209
209
|
c.value = !1, l = null;
|
|
210
|
-
},
|
|
210
|
+
}, tn);
|
|
211
211
|
}
|
|
212
212
|
function b() {
|
|
213
213
|
if (o.value.length === 0) return;
|
|
@@ -239,7 +239,7 @@ function rn(e) {
|
|
|
239
239
|
destroy: C
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function rn(e) {
|
|
243
243
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
244
244
|
...e,
|
|
245
245
|
id: Ce(),
|
|
@@ -255,7 +255,7 @@ function an(e) {
|
|
|
255
255
|
id: Ce()
|
|
256
256
|
})));
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function an(e) {
|
|
259
259
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
260
260
|
function o(n, r, a) {
|
|
261
261
|
let o = Pe(n, e.blockDefaults);
|
|
@@ -263,9 +263,9 @@ function on(e) {
|
|
|
263
263
|
}
|
|
264
264
|
function s(e, n, r) {
|
|
265
265
|
let o = JSON.parse(JSON.stringify(e));
|
|
266
|
-
if (o.id = Ce(),
|
|
266
|
+
if (o.id = Ce(), rn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
267
267
|
let t = JSON.parse(JSON.stringify(e));
|
|
268
|
-
return t.id = Ce(),
|
|
268
|
+
return t.id = Ce(), rn(t), t;
|
|
269
269
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
270
270
|
else {
|
|
271
271
|
let i = a?.(e.id) ?? null;
|
|
@@ -286,7 +286,7 @@ function on(e) {
|
|
|
286
286
|
updateBlockProperty: l
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function on(e) {
|
|
290
290
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
291
291
|
function c() {
|
|
292
292
|
return typeof a == "function" ? a() : a;
|
|
@@ -322,7 +322,7 @@ function sn(e) {
|
|
|
322
322
|
destroy: h
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function sn(e) {
|
|
326
326
|
let t = A(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
|
|
327
327
|
function i(e) {
|
|
328
328
|
return t.has(e);
|
|
@@ -340,7 +340,7 @@ function cn(e) {
|
|
|
340
340
|
hasHiddenBlocks: r
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function cn(e) {
|
|
344
344
|
let t = _(!1), r = _(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
|
|
345
345
|
async function o() {
|
|
346
346
|
let n = e.definition.value;
|
|
@@ -370,7 +370,7 @@ function ln(e) {
|
|
|
370
370
|
needsFetch: a
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function ln(e, t) {
|
|
374
374
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
375
375
|
e.addBlock = (r, i, a, o) => {
|
|
376
376
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -384,7 +384,7 @@ function un(e, t) {
|
|
|
384
384
|
t.record(), o(e);
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function un(e) {
|
|
388
388
|
let { provider: t } = e, n = _([]), r = _(!1), i = M(() => {
|
|
389
389
|
let e = /* @__PURE__ */ new Set();
|
|
390
390
|
for (let t of n.value) {
|
|
@@ -467,9 +467,9 @@ function dn(e) {
|
|
|
467
467
|
remove: m
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
var
|
|
471
|
-
function
|
|
472
|
-
let t = e.key ??
|
|
470
|
+
var dn = "templatical:saved-blocks";
|
|
471
|
+
function fn(e = {}) {
|
|
472
|
+
let t = e.key ?? dn;
|
|
473
473
|
function n() {
|
|
474
474
|
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.");
|
|
475
475
|
return localStorage;
|
|
@@ -522,26 +522,26 @@ function pn(e = {}) {
|
|
|
522
522
|
}
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region src/utils/activeEditorTracker.ts
|
|
525
|
-
var
|
|
526
|
-
function
|
|
527
|
-
let e = ++
|
|
528
|
-
return
|
|
525
|
+
var pn = /* @__PURE__ */ new Set(), mn = 0, hn = 0;
|
|
526
|
+
function gn() {
|
|
527
|
+
let e = ++hn;
|
|
528
|
+
return pn.add(e), mn === 0 && (mn = e), {
|
|
529
529
|
id: e,
|
|
530
|
-
isActive: () =>
|
|
530
|
+
isActive: () => pn.size <= 1 || mn === e,
|
|
531
531
|
claim: () => {
|
|
532
|
-
|
|
532
|
+
mn = e;
|
|
533
533
|
},
|
|
534
534
|
dispose: () => {
|
|
535
|
-
if (
|
|
536
|
-
let e = Array.from(
|
|
537
|
-
|
|
535
|
+
if (pn.delete(e), mn === e) {
|
|
536
|
+
let e = Array.from(pn);
|
|
537
|
+
mn = e[e.length - 1] ?? 0;
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
542
|
//#endregion
|
|
543
543
|
//#region src/composables/useImageUrlResolver.ts
|
|
544
|
-
function
|
|
544
|
+
function _n(e) {
|
|
545
545
|
let t = A(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
546
546
|
function r(e) {
|
|
547
547
|
return t.get(e);
|
|
@@ -574,7 +574,7 @@ function vn(e) {
|
|
|
574
574
|
lookup: a
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function vn(e) {
|
|
578
578
|
let t = P(Ct, null), n = M(e);
|
|
579
579
|
if (!t) return n;
|
|
580
580
|
let r;
|
|
@@ -604,7 +604,7 @@ function yn(e) {
|
|
|
604
604
|
}
|
|
605
605
|
//#endregion
|
|
606
606
|
//#region src/composables/useMergeTagPicker.ts
|
|
607
|
-
function
|
|
607
|
+
function yn() {
|
|
608
608
|
let e = _(!1), t = _([]), n = null;
|
|
609
609
|
function r(r) {
|
|
610
610
|
if (n) {
|
|
@@ -634,7 +634,7 @@ function bn() {
|
|
|
634
634
|
}
|
|
635
635
|
//#endregion
|
|
636
636
|
//#region src/composables/useLogicTagPicker.ts
|
|
637
|
-
function
|
|
637
|
+
function bn() {
|
|
638
638
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
639
639
|
function i(i, a) {
|
|
640
640
|
if (r) {
|
|
@@ -665,11 +665,11 @@ function xn() {
|
|
|
665
665
|
}
|
|
666
666
|
//#endregion
|
|
667
667
|
//#region src/composables/useTemplateLint.ts
|
|
668
|
-
function
|
|
668
|
+
function xn(e) {
|
|
669
669
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
let t = _([]), n = _(!1), r = _(!1), i = v(null), a =
|
|
671
|
+
function Sn(e) {
|
|
672
|
+
let t = _([]), n = _(!1), r = _(!1), i = v(null), a = xn(e.options), o = null, s = !1;
|
|
673
673
|
a || l();
|
|
674
674
|
async function l() {
|
|
675
675
|
try {
|
|
@@ -710,17 +710,17 @@ function Cn(e) {
|
|
|
710
710
|
}
|
|
711
711
|
//#endregion
|
|
712
712
|
//#region src/utils/blockTypeLabels.ts
|
|
713
|
-
function
|
|
713
|
+
function Cn(e, t) {
|
|
714
714
|
return t.blocks[e] ?? e;
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
if (e.type !== "custom") return
|
|
716
|
+
function wn(e, t, n = []) {
|
|
717
|
+
if (e.type !== "custom") return Cn(e.type, t);
|
|
718
718
|
let { customType: r } = e;
|
|
719
719
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
720
720
|
}
|
|
721
721
|
//#endregion
|
|
722
722
|
//#region src/composables/useKeyboardReorder.ts
|
|
723
|
-
function
|
|
723
|
+
function Tn(e, t, n = []) {
|
|
724
724
|
let r = _(null), i = _(""), a = null;
|
|
725
725
|
function o(t) {
|
|
726
726
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -747,7 +747,7 @@ function En(e, t, n = []) {
|
|
|
747
747
|
let i = o(r);
|
|
748
748
|
if (!i) return "";
|
|
749
749
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
750
|
-
return a ?
|
|
750
|
+
return a ? wn(a, t.t, n) : "";
|
|
751
751
|
}
|
|
752
752
|
function c(t, n) {
|
|
753
753
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -816,13 +816,13 @@ function En(e, t, n = []) {
|
|
|
816
816
|
}
|
|
817
817
|
//#endregion
|
|
818
818
|
//#region src/composables/useUiTheme.ts
|
|
819
|
-
function
|
|
819
|
+
function En(e) {
|
|
820
820
|
let t = $e("(prefers-color-scheme: dark)");
|
|
821
821
|
return { resolvedTheme: M(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
822
822
|
}
|
|
823
823
|
//#endregion
|
|
824
824
|
//#region src/composables/useThemeStyles.ts
|
|
825
|
-
var
|
|
825
|
+
var Dn = {
|
|
826
826
|
bg: "--tpl-bg",
|
|
827
827
|
bgElevated: "--tpl-bg-elevated",
|
|
828
828
|
bgHover: "--tpl-bg-hover",
|
|
@@ -846,10 +846,10 @@ var On = {
|
|
|
846
846
|
dangerLight: "--tpl-danger-light",
|
|
847
847
|
canvasBg: "--tpl-canvas-bg"
|
|
848
848
|
};
|
|
849
|
-
function
|
|
849
|
+
function On({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
850
850
|
return { themeStyles: M(() => {
|
|
851
851
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
852
|
-
if (a) for (let [e, t] of Object.entries(
|
|
852
|
+
if (a) for (let [e, t] of Object.entries(Dn)) {
|
|
853
853
|
let n = a[e];
|
|
854
854
|
n && (r[t] = n);
|
|
855
855
|
}
|
|
@@ -858,27 +858,27 @@ function kn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
858
858
|
}
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region src/utils/logger.ts
|
|
861
|
-
var
|
|
862
|
-
function
|
|
861
|
+
var kn = "[Templatical]";
|
|
862
|
+
function An() {
|
|
863
863
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
864
864
|
}
|
|
865
|
-
var
|
|
865
|
+
var jn = {
|
|
866
866
|
warn(...e) {
|
|
867
|
-
console.warn(
|
|
867
|
+
console.warn(kn, ...e);
|
|
868
868
|
},
|
|
869
869
|
error(...e) {
|
|
870
|
-
console.error(
|
|
870
|
+
console.error(kn, ...e);
|
|
871
871
|
},
|
|
872
872
|
debug(...e) {
|
|
873
|
-
|
|
873
|
+
An() || console.debug(kn, ...e);
|
|
874
874
|
},
|
|
875
875
|
info(...e) {
|
|
876
|
-
|
|
876
|
+
An() || console.info(kn, ...e);
|
|
877
877
|
}
|
|
878
878
|
};
|
|
879
879
|
//#endregion
|
|
880
880
|
//#region src/composables/useBlockRegistry.ts
|
|
881
|
-
function
|
|
881
|
+
function Mn() {
|
|
882
882
|
let e = v(/* @__PURE__ */ new Map());
|
|
883
883
|
function t(t, n) {
|
|
884
884
|
e.value.set(t, n), te(e);
|
|
@@ -912,13 +912,13 @@ function Nn() {
|
|
|
912
912
|
let t = a(e.customType);
|
|
913
913
|
if (!t) return o("Block definition not found");
|
|
914
914
|
try {
|
|
915
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
915
|
+
let { Liquid: n } = await import("./liquid.browser-BECWFL5Z.js");
|
|
916
916
|
return await new n({
|
|
917
917
|
strictVariables: !1,
|
|
918
918
|
strictFilters: !1
|
|
919
919
|
}).parseAndRender(t.template, e.fieldValues);
|
|
920
920
|
} catch (t) {
|
|
921
|
-
return
|
|
921
|
+
return jn.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
924
|
function c(t) {
|
|
@@ -936,9 +936,9 @@ function Nn() {
|
|
|
936
936
|
}
|
|
937
937
|
//#endregion
|
|
938
938
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
939
|
-
function
|
|
939
|
+
function Nn(e, t) {
|
|
940
940
|
return M(() => {
|
|
941
|
-
let n =
|
|
941
|
+
let n = Pn(e.value.blocks);
|
|
942
942
|
if (n.size === 0) return [];
|
|
943
943
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
944
944
|
for (let e of n) {
|
|
@@ -950,11 +950,11 @@ function Pn(e, t) {
|
|
|
950
950
|
return i;
|
|
951
951
|
});
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Pn(e) {
|
|
954
954
|
let t = /* @__PURE__ */ new Set();
|
|
955
|
-
return
|
|
955
|
+
return Fn(e, t), t;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Fn(e, t) {
|
|
958
958
|
for (let n of e) {
|
|
959
959
|
if (_e(n)) {
|
|
960
960
|
t.add(n.customType);
|
|
@@ -963,13 +963,13 @@ function In(e, t) {
|
|
|
963
963
|
if (n.type === "section") {
|
|
964
964
|
let e = n.children;
|
|
965
965
|
if (!e) continue;
|
|
966
|
-
for (let n of e)
|
|
966
|
+
for (let n of e) Fn(n, t);
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
//#endregion
|
|
971
971
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
972
|
-
var
|
|
972
|
+
var In = [
|
|
973
973
|
{
|
|
974
974
|
type: "section",
|
|
975
975
|
createBlock: Ge
|
|
@@ -1023,8 +1023,8 @@ var Ln = [
|
|
|
1023
1023
|
createBlock: Oe
|
|
1024
1024
|
}
|
|
1025
1025
|
];
|
|
1026
|
-
function
|
|
1027
|
-
for (let n of
|
|
1026
|
+
function Ln(e, t) {
|
|
1027
|
+
for (let n of In) {
|
|
1028
1028
|
let r = t[n.type];
|
|
1029
1029
|
r && e.registerBuiltIn(n.type, {
|
|
1030
1030
|
component: r,
|
|
@@ -1034,23 +1034,23 @@ function Rn(e, t) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
//#endregion
|
|
1036
1036
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1037
|
-
function
|
|
1037
|
+
function Rn(e) {
|
|
1038
1038
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1039
1039
|
}
|
|
1040
1040
|
//#endregion
|
|
1041
1041
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1042
|
-
function
|
|
1042
|
+
function zn(e) {
|
|
1043
1043
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function Bn(e, t, n) {
|
|
1046
1046
|
let r = new Set(e.map((e) => rt(e))), i = [], a = (e, t) => {
|
|
1047
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(rt(o)) && i.push(`${t}.${n}: ${o}`) :
|
|
1047
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(rt(o)) && i.push(`${t}.${n}: ${o}`) : zn(o) && a(o, `${t}.${n}`);
|
|
1048
1048
|
}, o = t;
|
|
1049
1049
|
for (let [e, t] of Object.entries(Be)) {
|
|
1050
1050
|
let n = o?.[e];
|
|
1051
1051
|
a({
|
|
1052
1052
|
...t,
|
|
1053
|
-
...
|
|
1053
|
+
...zn(n) ? n : {}
|
|
1054
1054
|
}, e);
|
|
1055
1055
|
}
|
|
1056
1056
|
return a({
|
|
@@ -1060,7 +1060,7 @@ function Vn(e, t, n) {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
//#endregion
|
|
1062
1062
|
//#region src/utils/resolveFieldColors.ts
|
|
1063
|
-
function
|
|
1063
|
+
function Vn(e, t) {
|
|
1064
1064
|
let n = nt({ presets: e.presets }, Ze), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
1065
1065
|
return {
|
|
1066
1066
|
presets: r ? t.presets : n.presets,
|
|
@@ -1073,9 +1073,9 @@ function Hn(e, t) {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
//#endregion
|
|
1075
1075
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1076
|
-
function
|
|
1076
|
+
function Hn(e, t) {
|
|
1077
1077
|
let n = [], r = (r, i) => {
|
|
1078
|
-
let a =
|
|
1078
|
+
let a = Vn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1079
1079
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1080
1080
|
id: s("invalid-presets"),
|
|
1081
1081
|
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." : "")
|
|
@@ -1099,7 +1099,7 @@ function Un(e, t) {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
//#endregion
|
|
1101
1101
|
//#region src/utils/keyboardShortcuts.ts
|
|
1102
|
-
function
|
|
1102
|
+
function Un(e) {
|
|
1103
1103
|
for (let t of e.composedPath()) {
|
|
1104
1104
|
if (!(t instanceof HTMLElement)) continue;
|
|
1105
1105
|
if (t.isContentEditable) return !0;
|
|
@@ -1108,18 +1108,18 @@ function Wn(e) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
return !1;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Wn(e, t) {
|
|
1112
1112
|
let n = e.metaKey || e.ctrlKey;
|
|
1113
1113
|
if (n && e.key.toLowerCase() === "s") {
|
|
1114
1114
|
e.preventDefault(), t.onSave?.();
|
|
1115
1115
|
return;
|
|
1116
1116
|
}
|
|
1117
1117
|
if (n && e.key.toLowerCase() === "z") {
|
|
1118
|
-
if (
|
|
1118
|
+
if (Un(e)) return;
|
|
1119
1119
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1120
1120
|
return;
|
|
1121
1121
|
}
|
|
1122
|
-
if (t.isPicking?.() && !
|
|
1122
|
+
if (t.isPicking?.() && !Un(e)) {
|
|
1123
1123
|
if (e.key === "Escape") {
|
|
1124
1124
|
e.preventDefault(), t.onCancelPick?.();
|
|
1125
1125
|
return;
|
|
@@ -1137,11 +1137,11 @@ function Gn(e, t) {
|
|
|
1137
1137
|
t.selectBlock(null);
|
|
1138
1138
|
return;
|
|
1139
1139
|
}
|
|
1140
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1140
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Un(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1141
1141
|
}
|
|
1142
1142
|
//#endregion
|
|
1143
1143
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1144
|
-
function
|
|
1144
|
+
function Gn(e, t, n, r = !1) {
|
|
1145
1145
|
if (!e) return [];
|
|
1146
1146
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1147
1147
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1175,20 +1175,20 @@ function Kn(e, t, n, r = !1) {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
//#endregion
|
|
1177
1177
|
//#region src/components/MergeTagPreviewText.vue
|
|
1178
|
-
var
|
|
1178
|
+
var Kn = y({
|
|
1179
1179
|
name: "MergeTagPreviewText",
|
|
1180
1180
|
props: { text: {
|
|
1181
1181
|
type: String,
|
|
1182
1182
|
required: !0
|
|
1183
1183
|
} },
|
|
1184
1184
|
setup(e) {
|
|
1185
|
-
let t = P(yt, []), n = P(At, Te.liquid), r = P(bt, null), i = M(() =>
|
|
1185
|
+
let t = P(yt, []), n = P(At, Te.liquid), r = P(bt, null), i = M(() => Gn(e.text, t, n, r?.value ?? !1));
|
|
1186
1186
|
return () => i.value.map((e, t) => e.type === "tag" ? ie("span", {
|
|
1187
1187
|
key: t,
|
|
1188
1188
|
class: "tpl-merge-tag-label"
|
|
1189
1189
|
}, e.value) : e.value);
|
|
1190
1190
|
}
|
|
1191
|
-
}),
|
|
1191
|
+
}), qn = { class: "tpl:text-center" }, Jn = ["href"], Yn = /* @__PURE__ */ y({
|
|
1192
1192
|
__name: "ButtonBlock",
|
|
1193
1193
|
props: {
|
|
1194
1194
|
block: {},
|
|
@@ -1209,17 +1209,17 @@ var qn = y({
|
|
|
1209
1209
|
};
|
|
1210
1210
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1211
1211
|
});
|
|
1212
|
-
return (t, r) => (f(), x("div",
|
|
1212
|
+
return (t, r) => (f(), x("div", qn, [b("a", {
|
|
1213
1213
|
href: e.block.url || "#",
|
|
1214
1214
|
style: i(n.value),
|
|
1215
1215
|
class: "tpl:cursor-default",
|
|
1216
1216
|
onClick: r[0] ||= F(() => {}, ["prevent"])
|
|
1217
|
-
}, [w(
|
|
1217
|
+
}, [w(Kn, { text: e.block.text }, null, 8, ["text"])], 12, Jn)]));
|
|
1218
1218
|
}
|
|
1219
|
-
}),
|
|
1219
|
+
}), Xn = I("bookmark", [["path", {
|
|
1220
1220
|
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",
|
|
1221
1221
|
key: "oz39mx"
|
|
1222
|
-
}]]),
|
|
1222
|
+
}]]), Zn = I("box", [
|
|
1223
1223
|
["path", {
|
|
1224
1224
|
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",
|
|
1225
1225
|
key: "hh9hay"
|
|
@@ -1232,13 +1232,13 @@ var qn = y({
|
|
|
1232
1232
|
d: "M12 22V12",
|
|
1233
1233
|
key: "d0xqtd"
|
|
1234
1234
|
}]
|
|
1235
|
-
]),
|
|
1235
|
+
]), Qn = I("code", [["path", {
|
|
1236
1236
|
d: "m16 18 6-6-6-6",
|
|
1237
1237
|
key: "eg8j8"
|
|
1238
1238
|
}], ["path", {
|
|
1239
1239
|
d: "m8 6-6 6 6 6",
|
|
1240
1240
|
key: "ppft3o"
|
|
1241
|
-
}]]),
|
|
1241
|
+
}]]), $n = I("copy", [["rect", {
|
|
1242
1242
|
width: "14",
|
|
1243
1243
|
height: "14",
|
|
1244
1244
|
x: "8",
|
|
@@ -1249,7 +1249,7 @@ var qn = y({
|
|
|
1249
1249
|
}], ["path", {
|
|
1250
1250
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1251
1251
|
key: "zix9uf"
|
|
1252
|
-
}]]),
|
|
1252
|
+
}]]), er = I("eye-off", [
|
|
1253
1253
|
["path", {
|
|
1254
1254
|
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",
|
|
1255
1255
|
key: "ct8e1f"
|
|
@@ -1266,10 +1266,10 @@ var qn = y({
|
|
|
1266
1266
|
d: "m2 2 20 20",
|
|
1267
1267
|
key: "1ooewy"
|
|
1268
1268
|
}]
|
|
1269
|
-
]),
|
|
1269
|
+
]), tr = I("funnel", [["path", {
|
|
1270
1270
|
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",
|
|
1271
1271
|
key: "sc7q7i"
|
|
1272
|
-
}]]),
|
|
1272
|
+
}]]), nr = I("grip-vertical", [
|
|
1273
1273
|
["circle", {
|
|
1274
1274
|
cx: "9",
|
|
1275
1275
|
cy: "12",
|
|
@@ -1306,7 +1306,7 @@ var qn = y({
|
|
|
1306
1306
|
r: "1",
|
|
1307
1307
|
key: "f4zoj3"
|
|
1308
1308
|
}]
|
|
1309
|
-
]),
|
|
1309
|
+
]), rr = I("image", [
|
|
1310
1310
|
["rect", {
|
|
1311
1311
|
width: "18",
|
|
1312
1312
|
height: "18",
|
|
@@ -1326,13 +1326,13 @@ var qn = y({
|
|
|
1326
1326
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1327
1327
|
key: "1xmnt7"
|
|
1328
1328
|
}]
|
|
1329
|
-
]),
|
|
1329
|
+
]), ir = I("navigation", [["polygon", {
|
|
1330
1330
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1331
1331
|
key: "1ltx0t"
|
|
1332
|
-
}]]),
|
|
1332
|
+
}]]), ar = I("puzzle", [["path", {
|
|
1333
1333
|
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",
|
|
1334
1334
|
key: "w46dr5"
|
|
1335
|
-
}]]),
|
|
1335
|
+
}]]), or = I("share-2", [
|
|
1336
1336
|
["circle", {
|
|
1337
1337
|
cx: "18",
|
|
1338
1338
|
cy: "5",
|
|
@@ -1365,7 +1365,7 @@ var qn = y({
|
|
|
1365
1365
|
y2: "10.49",
|
|
1366
1366
|
key: "1n3mei"
|
|
1367
1367
|
}]
|
|
1368
|
-
]),
|
|
1368
|
+
]), sr = I("table", [
|
|
1369
1369
|
["path", {
|
|
1370
1370
|
d: "M12 3v18",
|
|
1371
1371
|
key: "108xh3"
|
|
@@ -1386,7 +1386,7 @@ var qn = y({
|
|
|
1386
1386
|
d: "M3 15h18",
|
|
1387
1387
|
key: "5xshup"
|
|
1388
1388
|
}]
|
|
1389
|
-
]),
|
|
1389
|
+
]), cr = I("video", [["path", {
|
|
1390
1390
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1391
1391
|
key: "ftymec"
|
|
1392
1392
|
}], ["rect", {
|
|
@@ -1396,11 +1396,11 @@ var qn = y({
|
|
|
1396
1396
|
height: "12",
|
|
1397
1397
|
rx: "2",
|
|
1398
1398
|
key: "158x01"
|
|
1399
|
-
}]]),
|
|
1399
|
+
}]]), lr = ["innerHTML"], ur = [
|
|
1400
1400
|
"src",
|
|
1401
1401
|
"width",
|
|
1402
1402
|
"height"
|
|
1403
|
-
],
|
|
1403
|
+
], dr = /* @__PURE__ */ y({
|
|
1404
1404
|
__name: "CustomBlockIcon",
|
|
1405
1405
|
props: {
|
|
1406
1406
|
icon: {},
|
|
@@ -1416,14 +1416,14 @@ var qn = y({
|
|
|
1416
1416
|
height: `${n.value}px`
|
|
1417
1417
|
}),
|
|
1418
1418
|
innerHTML: e.icon
|
|
1419
|
-
}, null, 12,
|
|
1419
|
+
}, null, 12, lr)) : a.value ? (f(), x("img", {
|
|
1420
1420
|
key: 1,
|
|
1421
1421
|
src: e.icon,
|
|
1422
1422
|
width: n.value,
|
|
1423
1423
|
height: n.value,
|
|
1424
1424
|
class: "tpl:inline-block",
|
|
1425
1425
|
alt: ""
|
|
1426
|
-
}, null, 8,
|
|
1426
|
+
}, null, 8, ur)) : (f(), D(k(Zn), {
|
|
1427
1427
|
key: 2,
|
|
1428
1428
|
size: n.value,
|
|
1429
1429
|
"stroke-width": 1.5
|
|
@@ -1432,16 +1432,16 @@ var qn = y({
|
|
|
1432
1432
|
});
|
|
1433
1433
|
//#endregion
|
|
1434
1434
|
//#region src/composables/useEditorRoot.ts
|
|
1435
|
-
function
|
|
1435
|
+
function fr() {
|
|
1436
1436
|
return P(Et, document) ?? document;
|
|
1437
1437
|
}
|
|
1438
1438
|
//#endregion
|
|
1439
1439
|
//#region src/composables/useFocusTrap.ts
|
|
1440
|
-
var
|
|
1441
|
-
function
|
|
1442
|
-
let n =
|
|
1440
|
+
var pr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1441
|
+
function mr(e, t) {
|
|
1442
|
+
let n = fr(), r = null, i = null, a = null;
|
|
1443
1443
|
function o() {
|
|
1444
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1444
|
+
return e.value ? Array.from(e.value.querySelectorAll(pr)).filter((e) => e.offsetParent !== null) : [];
|
|
1445
1445
|
}
|
|
1446
1446
|
function s(e) {
|
|
1447
1447
|
if (e.key !== "Tab") return;
|
|
@@ -1471,7 +1471,7 @@ function hr(e, t) {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
//#endregion
|
|
1473
1473
|
//#region src/composables/useEmoji.ts
|
|
1474
|
-
function
|
|
1474
|
+
function hr() {
|
|
1475
1475
|
let [e, t] = Ye(!1), n = v([]), r = !1;
|
|
1476
1476
|
u(() => {
|
|
1477
1477
|
r = !0;
|
|
@@ -1497,7 +1497,7 @@ function gr() {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
//#endregion
|
|
1499
1499
|
//#region src/composables/useDragDrop.ts
|
|
1500
|
-
function
|
|
1500
|
+
function gr(e) {
|
|
1501
1501
|
let { onBlockMove: t, onBlockAdd: n } = e, r = _(!1), i = _(null), a = _(null);
|
|
1502
1502
|
function o(e) {
|
|
1503
1503
|
r.value = !0, i.value = e;
|
|
@@ -1547,7 +1547,7 @@ function _r(e) {
|
|
|
1547
1547
|
}
|
|
1548
1548
|
//#endregion
|
|
1549
1549
|
//#region src/composables/useFonts.ts
|
|
1550
|
-
var
|
|
1550
|
+
var _r = [
|
|
1551
1551
|
{
|
|
1552
1552
|
value: "Arial",
|
|
1553
1553
|
label: "Arial"
|
|
@@ -1576,7 +1576,7 @@ var vr = [
|
|
|
1576
1576
|
value: "Courier New",
|
|
1577
1577
|
label: "Courier New"
|
|
1578
1578
|
}
|
|
1579
|
-
],
|
|
1579
|
+
], vr = {
|
|
1580
1580
|
arial: "Arial, sans-serif",
|
|
1581
1581
|
helvetica: "Helvetica, sans-serif",
|
|
1582
1582
|
georgia: "Georgia, serif",
|
|
@@ -1584,23 +1584,23 @@ var vr = [
|
|
|
1584
1584
|
verdana: "Verdana, sans-serif",
|
|
1585
1585
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1586
1586
|
"courier new": "'Courier New', monospace"
|
|
1587
|
-
},
|
|
1588
|
-
function
|
|
1589
|
-
if (e === void 0 || e === !0) return [...
|
|
1587
|
+
}, yr = "Arial, sans-serif";
|
|
1588
|
+
function br(e) {
|
|
1589
|
+
if (e === void 0 || e === !0) return [..._r];
|
|
1590
1590
|
if (e === !1) return [];
|
|
1591
1591
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1592
1592
|
for (let i of e) {
|
|
1593
|
-
let e = i.toLowerCase(), a =
|
|
1593
|
+
let e = i.toLowerCase(), a = _r.find((t) => t.value.toLowerCase() === e);
|
|
1594
1594
|
if (!a) {
|
|
1595
|
-
r.has(e) || (r.add(e),
|
|
1595
|
+
r.has(e) || (r.add(e), jn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${_r.map((e) => e.value).join(", ")}.`));
|
|
1596
1596
|
continue;
|
|
1597
1597
|
}
|
|
1598
1598
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1599
1599
|
}
|
|
1600
1600
|
return t;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i =
|
|
1602
|
+
function xr(e) {
|
|
1603
|
+
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = br(e?.builtIns), a = M(() => e?.defaultFallback ?? yr);
|
|
1604
1604
|
function o(e) {
|
|
1605
1605
|
n.value = e;
|
|
1606
1606
|
}
|
|
@@ -1617,20 +1617,20 @@ function Sr(e) {
|
|
|
1617
1617
|
function l(e) {
|
|
1618
1618
|
return c.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1619
1619
|
}
|
|
1620
|
-
let d = e?.defaultFont ??
|
|
1621
|
-
l(d) ||
|
|
1620
|
+
let d = e?.defaultFont ?? yr.split(",")[0].trim();
|
|
1621
|
+
l(d) || jn.warn(`config.fonts: new templates seed "${d}", 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.`);
|
|
1622
1622
|
function f(e) {
|
|
1623
|
-
return
|
|
1623
|
+
return _r.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1624
1624
|
}
|
|
1625
1625
|
function p() {
|
|
1626
1626
|
if (e?.defaultFont) {
|
|
1627
|
-
if (!n.value && !f(e.defaultFont)) return
|
|
1627
|
+
if (!n.value && !f(e.defaultFont)) return yr;
|
|
1628
1628
|
if (l(e.defaultFont)) {
|
|
1629
1629
|
let t = c.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1630
1630
|
if (t) return t.value;
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
|
-
return
|
|
1633
|
+
return yr;
|
|
1634
1634
|
}
|
|
1635
1635
|
let m = M(() => p());
|
|
1636
1636
|
function h(e) {
|
|
@@ -1640,7 +1640,7 @@ function Sr(e) {
|
|
|
1640
1640
|
let e = n.fallback ?? a.value;
|
|
1641
1641
|
return `'${n.name}', ${e}`;
|
|
1642
1642
|
}
|
|
1643
|
-
return
|
|
1643
|
+
return vr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
|
|
1644
1644
|
}
|
|
1645
1645
|
let g = [], v = !1;
|
|
1646
1646
|
async function y() {
|
|
@@ -1656,7 +1656,7 @@ function Sr(e) {
|
|
|
1656
1656
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1657
1657
|
});
|
|
1658
1658
|
} catch (t) {
|
|
1659
|
-
|
|
1659
|
+
jn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1660
1660
|
}
|
|
1661
1661
|
});
|
|
1662
1662
|
await Promise.allSettled(e), !v && (r.value = !0);
|
|
@@ -1683,7 +1683,7 @@ function Sr(e) {
|
|
|
1683
1683
|
}
|
|
1684
1684
|
//#endregion
|
|
1685
1685
|
//#region src/composables/useLogicTag.ts
|
|
1686
|
-
function
|
|
1686
|
+
function Sr() {
|
|
1687
1687
|
let e = P(ct, []), t = P(vt, []), n = P(At, Te.liquid), r = P(ot, null), i = P(Rt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
1688
1688
|
async function c() {
|
|
1689
1689
|
if (r) {
|
|
@@ -1715,7 +1715,7 @@ function Cr() {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
//#endregion
|
|
1717
1717
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1718
|
-
function
|
|
1718
|
+
function Cr(e, t, n) {
|
|
1719
1719
|
return ve(e, n) ? {
|
|
1720
1720
|
type: "logicMergeTagNode",
|
|
1721
1721
|
attrs: {
|
|
@@ -1732,15 +1732,15 @@ function wr(e, t, n) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
//#endregion
|
|
1734
1734
|
//#region src/utils/insertLogicTag.ts
|
|
1735
|
-
function
|
|
1735
|
+
function wr(e) {
|
|
1736
1736
|
return "before" in e && "after" in e;
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1739
|
-
if (!
|
|
1740
|
-
e.chain().focus().insertContent(
|
|
1738
|
+
function Tr(e, t, n) {
|
|
1739
|
+
if (!wr(t)) {
|
|
1740
|
+
e.chain().focus().insertContent(Cr(t.value, t.label, n)).run();
|
|
1741
1741
|
return;
|
|
1742
1742
|
}
|
|
1743
|
-
let r =
|
|
1743
|
+
let r = Cr(t.before, t.label, n), i = Cr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1744
1744
|
if (a !== o) {
|
|
1745
1745
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1746
1746
|
return;
|
|
@@ -1749,20 +1749,20 @@ function Er(e, t, n) {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
//#endregion
|
|
1751
1751
|
//#region src/utils/linkColorExtension.ts
|
|
1752
|
-
function
|
|
1752
|
+
function Er(e) {
|
|
1753
1753
|
if (!e) return null;
|
|
1754
1754
|
let t = e.trim();
|
|
1755
1755
|
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;
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function Dr(e) {
|
|
1758
1758
|
return e.extend({ addAttributes() {
|
|
1759
1759
|
return {
|
|
1760
1760
|
...this.parent?.(),
|
|
1761
1761
|
color: {
|
|
1762
1762
|
default: null,
|
|
1763
|
-
parseHTML: (e) =>
|
|
1763
|
+
parseHTML: (e) => Er(et(e.style.color)),
|
|
1764
1764
|
renderHTML: (e) => {
|
|
1765
|
-
let t =
|
|
1765
|
+
let t = Er(e.color);
|
|
1766
1766
|
return t ? { style: `color: ${t}` } : {};
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
@@ -1771,9 +1771,9 @@ function Or(e) {
|
|
|
1771
1771
|
}
|
|
1772
1772
|
//#endregion
|
|
1773
1773
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1774
|
-
function
|
|
1774
|
+
function Or(e) {
|
|
1775
1775
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
1776
|
-
|
|
1776
|
+
mr(i, t);
|
|
1777
1777
|
function a() {
|
|
1778
1778
|
let i = e.value?.getAttributes("link") ?? {};
|
|
1779
1779
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -1782,7 +1782,7 @@ function kr(e) {
|
|
|
1782
1782
|
if (n.value) {
|
|
1783
1783
|
let t = c(n.value);
|
|
1784
1784
|
if (t !== null) {
|
|
1785
|
-
let n =
|
|
1785
|
+
let n = Er(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1786
1786
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
@@ -1829,8 +1829,8 @@ function kr(e) {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
//#endregion
|
|
1831
1831
|
//#region src/composables/useRichTextEditor.ts
|
|
1832
|
-
function
|
|
1833
|
-
let t = P(Dt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } =
|
|
1832
|
+
function kr(e) {
|
|
1833
|
+
let t = P(Dt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Yt(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = Sr(), f = P(Vt, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = le(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = Or(y), { start: k, stop: A } = Xe(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), j = v(null), ee = _(!0), M = _(null), te = !1;
|
|
1834
1834
|
async function N() {
|
|
1835
1835
|
M.value = null, ee.value = !0;
|
|
1836
1836
|
try {
|
|
@@ -1860,7 +1860,7 @@ function Ar(e) {
|
|
|
1860
1860
|
y.value = l, ee.value = !1, k();
|
|
1861
1861
|
} catch (t) {
|
|
1862
1862
|
if (te) return;
|
|
1863
|
-
|
|
1863
|
+
jn.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), M.value = t instanceof Error ? t.message : "Failed to load editor", ee.value = !1;
|
|
1864
1864
|
}
|
|
1865
1865
|
}
|
|
1866
1866
|
function ne() {
|
|
@@ -1890,7 +1890,7 @@ function Ar(e) {
|
|
|
1890
1890
|
}
|
|
1891
1891
|
async function F() {
|
|
1892
1892
|
let e = await d();
|
|
1893
|
-
te || (e && y.value ?
|
|
1893
|
+
te || (e && y.value ? Tr(y.value, e, o) : y.value?.commands.focus());
|
|
1894
1894
|
}
|
|
1895
1895
|
return {
|
|
1896
1896
|
editor: y,
|
|
@@ -1919,9 +1919,9 @@ function Ar(e) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
//#endregion
|
|
1921
1921
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1922
|
-
var
|
|
1923
|
-
function
|
|
1924
|
-
let t = $e(
|
|
1922
|
+
var Ar = "(max-width: 767px)";
|
|
1923
|
+
function jr(e) {
|
|
1924
|
+
let t = $e(Ar);
|
|
1925
1925
|
return {
|
|
1926
1926
|
isSmallScreen: t,
|
|
1927
1927
|
showNotice: M(() => (S(e) ?? !0) && t.value)
|
|
@@ -1929,20 +1929,20 @@ function Mr(e) {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
//#endregion
|
|
1931
1931
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1932
|
-
var
|
|
1932
|
+
var Mr = { class: "tpl:w-full" }, Nr = {
|
|
1933
1933
|
key: 0,
|
|
1934
1934
|
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)]"
|
|
1935
|
-
},
|
|
1935
|
+
}, Pr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Fr = {
|
|
1936
1936
|
key: 1,
|
|
1937
1937
|
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)]"
|
|
1938
|
-
},
|
|
1938
|
+
}, Ir = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Lr = {
|
|
1939
1939
|
key: 2,
|
|
1940
1940
|
class: "tpl:relative"
|
|
1941
|
-
},
|
|
1941
|
+
}, Rr = ["innerHTML"], zr = {
|
|
1942
1942
|
key: 0,
|
|
1943
1943
|
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]",
|
|
1944
1944
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1945
|
-
},
|
|
1945
|
+
}, Br = /* @__PURE__ */ y({
|
|
1946
1946
|
__name: "CustomBlock",
|
|
1947
1947
|
props: {
|
|
1948
1948
|
block: {},
|
|
@@ -1950,7 +1950,7 @@ var Nr = { class: "tpl:w-full" }, Pr = {
|
|
|
1950
1950
|
},
|
|
1951
1951
|
emits: ["fetchData"],
|
|
1952
1952
|
setup(e, { emit: t }) {
|
|
1953
|
-
let n = e, r = t, { t: i } = Ht(), o = P(Pt, null), s = _(""), l = _(!1), u = M(() => o?.getDefinition(n.block.customType)), d = M(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } =
|
|
1953
|
+
let n = e, r = t, { t: i } = Ht(), o = P(Pt, null), s = _(""), l = _(!1), u = M(() => o?.getDefinition(n.block.customType)), d = M(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = cn({
|
|
1954
1954
|
definition: u,
|
|
1955
1955
|
block: M(() => n.block),
|
|
1956
1956
|
onUpdate: (e, t) => {
|
|
@@ -1986,10 +1986,10 @@ var Nr = { class: "tpl:w-full" }, Pr = {
|
|
|
1986
1986
|
E();
|
|
1987
1987
|
}, { deep: !0 }), c(() => S?.value, () => {
|
|
1988
1988
|
E();
|
|
1989
|
-
}), (e, t) => (f(), x("div",
|
|
1989
|
+
}), (e, t) => (f(), x("div", Mr, [d.value ? l.value ? (f(), x("div", Fr, [w(k(Kt), {
|
|
1990
1990
|
size: 24,
|
|
1991
1991
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1992
|
-
}), b("span",
|
|
1992
|
+
}), b("span", Ir, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", Lr, [b("div", { innerHTML: s.value }, null, 8, Rr), k(v) && k(g) ? (f(), x("div", zr, [k(m) ? (f(), D(qt, {
|
|
1993
1993
|
key: 1,
|
|
1994
1994
|
class: "tpl:w-48"
|
|
1995
1995
|
})) : (f(), x("button", {
|
|
@@ -1997,16 +1997,16 @@ var Nr = { class: "tpl:w-full" }, Pr = {
|
|
|
1997
1997
|
type: "button",
|
|
1998
1998
|
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-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1999
1999
|
onClick: t[0] ||= F((...e) => k(h) && k(h)(...e), ["stop"])
|
|
2000
|
-
}, [u.value?.icon ? (f(), D(
|
|
2000
|
+
}, [u.value?.icon ? (f(), D(dr, {
|
|
2001
2001
|
key: 0,
|
|
2002
2002
|
icon: u.value.icon,
|
|
2003
2003
|
size: 16
|
|
2004
|
-
}, null, 8, ["icon"])) : N("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : N("", !0)])) : (f(), x("div",
|
|
2004
|
+
}, null, 8, ["icon"])) : N("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : N("", !0)])) : (f(), x("div", Nr, [w(k(ar), {
|
|
2005
2005
|
size: 24,
|
|
2006
2006
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2007
|
-
}), b("span",
|
|
2007
|
+
}), b("span", Pr, p(k(i).customBlocks.definitionNotFound), 1)]))]));
|
|
2008
2008
|
}
|
|
2009
|
-
}),
|
|
2009
|
+
}), Vr = { class: "tpl:w-full" }, Hr = /* @__PURE__ */ y({
|
|
2010
2010
|
__name: "DividerBlock",
|
|
2011
2011
|
props: {
|
|
2012
2012
|
block: {},
|
|
@@ -2018,21 +2018,21 @@ var Nr = { class: "tpl:w-full" }, Pr = {
|
|
|
2018
2018
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2019
2019
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2020
2020
|
}));
|
|
2021
|
-
return (e, t) => (f(), x("div",
|
|
2021
|
+
return (e, t) => (f(), x("div", Vr, [b("hr", {
|
|
2022
2022
|
class: "tpl:m-0 tpl:border-none",
|
|
2023
2023
|
style: i(n.value)
|
|
2024
2024
|
}, null, 4)]));
|
|
2025
2025
|
}
|
|
2026
|
-
}),
|
|
2026
|
+
}), Ur = { class: "tpl:w-full" }, Wr = ["srcdoc", "title"], Gr = {
|
|
2027
2027
|
key: 1,
|
|
2028
2028
|
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)]"
|
|
2029
|
-
},
|
|
2029
|
+
}, Kr = {
|
|
2030
2030
|
key: 0,
|
|
2031
2031
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2032
|
-
},
|
|
2032
|
+
}, qr = {
|
|
2033
2033
|
key: 1,
|
|
2034
2034
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2035
|
-
},
|
|
2035
|
+
}, Jr = /* @__PURE__ */ y({
|
|
2036
2036
|
__name: "HtmlBlock",
|
|
2037
2037
|
props: {
|
|
2038
2038
|
block: {},
|
|
@@ -2053,7 +2053,7 @@ var Nr = { class: "tpl:w-full" }, Pr = {
|
|
|
2053
2053
|
e || (g?.disconnect(), g = null);
|
|
2054
2054
|
}), h(() => {
|
|
2055
2055
|
g?.disconnect(), g = null;
|
|
2056
|
-
}), (e, t) => (f(), x("div",
|
|
2056
|
+
}), (e, t) => (f(), x("div", Ur, [o.value ? (f(), x("iframe", {
|
|
2057
2057
|
key: 0,
|
|
2058
2058
|
ref_key: "iframeRef",
|
|
2059
2059
|
ref: d,
|
|
@@ -2063,18 +2063,18 @@ var Nr = { class: "tpl:w-full" }, Pr = {
|
|
|
2063
2063
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2064
2064
|
style: i({ height: `${m.value}px` }),
|
|
2065
2065
|
onLoad: y
|
|
2066
|
-
}, null, 44,
|
|
2066
|
+
}, null, 44, Wr)) : (f(), x("div", Gr, [w(k(Qn), {
|
|
2067
2067
|
size: 24,
|
|
2068
2068
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2069
|
-
}), a.value ? (f(), x("span",
|
|
2069
|
+
}), a.value ? (f(), x("span", Kr, p(k(n).html.preview), 1)) : (f(), x("span", qr, p(k(n).html.empty), 1))]))]));
|
|
2070
2070
|
}
|
|
2071
|
-
}),
|
|
2072
|
-
function
|
|
2071
|
+
}), Yr = "image/";
|
|
2072
|
+
function Xr(e) {
|
|
2073
2073
|
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = Qe(t, {
|
|
2074
2074
|
preventDefaultForUnhandled: !0,
|
|
2075
2075
|
onDrop: (e) => {
|
|
2076
2076
|
if (!i()) return;
|
|
2077
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2077
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Yr));
|
|
2078
2078
|
t.length > 0 && n([t[0]]);
|
|
2079
2079
|
}
|
|
2080
2080
|
});
|
|
@@ -2082,17 +2082,17 @@ function Zr(e) {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
//#endregion
|
|
2084
2084
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2085
|
-
var
|
|
2085
|
+
var Zr = {
|
|
2086
2086
|
key: 0,
|
|
2087
2087
|
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)]",
|
|
2088
2088
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
2089
|
-
},
|
|
2089
|
+
}, Qr = ["href"], $r = ["src", "alt"], ei = ["src", "alt"], ti = {
|
|
2090
2090
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2091
2091
|
style: { opacity: "0.7" }
|
|
2092
|
-
},
|
|
2092
|
+
}, ni = ["href"], ri = ["src", "alt"], ii = ["src", "alt"], ai = {
|
|
2093
2093
|
key: 4,
|
|
2094
2094
|
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)]"
|
|
2095
|
-
},
|
|
2095
|
+
}, oi = ["aria-label"], si = { key: 1 }, ci = /* @__PURE__ */ y({
|
|
2096
2096
|
__name: "ImageBlock",
|
|
2097
2097
|
props: {
|
|
2098
2098
|
block: {},
|
|
@@ -2100,7 +2100,7 @@ var Qr = {
|
|
|
2100
2100
|
},
|
|
2101
2101
|
emits: ["update"],
|
|
2102
2102
|
setup(e, { emit: t }) {
|
|
2103
|
-
let n = e, r = t, { t: a } = Ht(), { syntax: o } =
|
|
2103
|
+
let n = e, r = t, { t: a } = Ht(), { syntax: o } = Yt(), s = P(kt, null), c = M(() => !!s), l = Xt();
|
|
2104
2104
|
async function u() {
|
|
2105
2105
|
let e = await s?.({ accept: ["images"] });
|
|
2106
2106
|
if (l.alive && e) {
|
|
@@ -2127,7 +2127,7 @@ var Qr = {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
|
-
let { isOver: v } =
|
|
2130
|
+
let { isOver: v } = Xr({
|
|
2131
2131
|
target: d,
|
|
2132
2132
|
enabled: h,
|
|
2133
2133
|
onFiles: g
|
|
@@ -2140,14 +2140,14 @@ var Qr = {
|
|
|
2140
2140
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2141
2141
|
marginRight: e === "center" ? "auto" : void 0
|
|
2142
2142
|
};
|
|
2143
|
-
}), C = M(() => De(n.block.src, o)), T =
|
|
2143
|
+
}), C = M(() => De(n.block.src, o)), T = vn(() => C.value ? void 0 : n.block.src), E = vn(() => C.value ? n.block.placeholderUrl : void 0);
|
|
2144
2144
|
return (t, n) => (f(), x("div", {
|
|
2145
2145
|
ref_key: "dropZoneRef",
|
|
2146
2146
|
ref: d,
|
|
2147
2147
|
"data-testid": "image-drop-zone",
|
|
2148
2148
|
class: "tpl:relative tpl:w-full",
|
|
2149
2149
|
style: i(y.value)
|
|
2150
|
-
}, [h.value && (k(v) || m.value) ? (f(), x("div",
|
|
2150
|
+
}, [h.value && (k(v) || m.value) ? (f(), x("div", Zr, [m.value ? (f(), x(j, { key: 0 }, [w(k(Ut), {
|
|
2151
2151
|
class: "tpl-spinner",
|
|
2152
2152
|
size: 20,
|
|
2153
2153
|
"stroke-width": 2
|
|
@@ -2166,22 +2166,22 @@ var Qr = {
|
|
|
2166
2166
|
src: k(E),
|
|
2167
2167
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
2168
2168
|
style: i(S.value)
|
|
2169
|
-
}, null, 12,
|
|
2169
|
+
}, null, 12, $r)], 8, Qr)) : (f(), x("img", {
|
|
2170
2170
|
key: 1,
|
|
2171
2171
|
class: "tpl:border-0",
|
|
2172
2172
|
src: k(E),
|
|
2173
2173
|
alt: e.block.alt,
|
|
2174
2174
|
style: i(S.value)
|
|
2175
|
-
}, null, 12,
|
|
2175
|
+
}, null, 12, ei))], 64)) : e.block.src && C.value ? (f(), x("div", {
|
|
2176
2176
|
key: 2,
|
|
2177
2177
|
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)]",
|
|
2178
2178
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
|
|
2179
|
-
}, [w(k(
|
|
2179
|
+
}, [w(k(rr), {
|
|
2180
2180
|
size: 32,
|
|
2181
2181
|
"stroke-width": 1.5,
|
|
2182
2182
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2183
2183
|
style: { opacity: "0.5" }
|
|
2184
|
-
}), b("span",
|
|
2184
|
+
}), b("span", ti, [w(Kn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(j, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
|
|
2185
2185
|
key: 0,
|
|
2186
2186
|
href: e.block.linkUrl,
|
|
2187
2187
|
target: "_blank",
|
|
@@ -2193,26 +2193,26 @@ var Qr = {
|
|
|
2193
2193
|
src: k(T),
|
|
2194
2194
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
2195
2195
|
style: i(S.value)
|
|
2196
|
-
}, null, 12,
|
|
2196
|
+
}, null, 12, ri)], 8, ni)) : (f(), x("img", {
|
|
2197
2197
|
key: 1,
|
|
2198
2198
|
class: "tpl:border-0",
|
|
2199
2199
|
src: k(T),
|
|
2200
2200
|
alt: e.block.alt,
|
|
2201
2201
|
style: i(S.value)
|
|
2202
|
-
}, null, 12,
|
|
2202
|
+
}, null, 12, ii))], 64)) : (f(), x("div", ai, [c.value ? (f(), x("button", {
|
|
2203
2203
|
key: 0,
|
|
2204
2204
|
"aria-label": k(a).image.browseMedia,
|
|
2205
2205
|
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:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
2206
2206
|
onClick: F(u, ["stop"])
|
|
2207
|
-
}, [w(k(
|
|
2207
|
+
}, [w(k(rr), {
|
|
2208
2208
|
size: 14,
|
|
2209
2209
|
"stroke-width": 1.5
|
|
2210
|
-
}), O(" " + p(k(a).image.browseMedia), 1)], 8,
|
|
2210
|
+
}), O(" " + p(k(a).image.browseMedia), 1)], 8, oi)) : (f(), x("span", si, p(k(a).image.clickToAdd), 1))]))], 4));
|
|
2211
2211
|
}
|
|
2212
|
-
}),
|
|
2212
|
+
}), li = { class: "tpl:w-full" }, ui = ["href"], di = {
|
|
2213
2213
|
key: 1,
|
|
2214
2214
|
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)]"
|
|
2215
|
-
},
|
|
2215
|
+
}, fi = /* @__PURE__ */ y({
|
|
2216
2216
|
__name: "MenuBlock",
|
|
2217
2217
|
props: {
|
|
2218
2218
|
block: {},
|
|
@@ -2231,7 +2231,7 @@ var Qr = {
|
|
|
2231
2231
|
function s(e) {
|
|
2232
2232
|
return e || n.block.linkColor || n.block.color;
|
|
2233
2233
|
}
|
|
2234
|
-
return (n, c) => (f(), x("div",
|
|
2234
|
+
return (n, c) => (f(), x("div", li, [o.value ? (f(), x("div", {
|
|
2235
2235
|
key: 0,
|
|
2236
2236
|
style: i(a.value)
|
|
2237
2237
|
}, [(f(!0), x(j, null, t(e.block.items, (t, n) => (f(), x(j, { key: t.id }, [b("a", {
|
|
@@ -2243,15 +2243,15 @@ var Qr = {
|
|
|
2243
2243
|
textDecoration: t.underline ? "underline" : "none"
|
|
2244
2244
|
}),
|
|
2245
2245
|
onClick: c[0] ||= F(() => {}, ["prevent"])
|
|
2246
|
-
}, [w(
|
|
2246
|
+
}, [w(Kn, { text: t.text || "..." }, null, 8, ["text"])], 12, ui), n < e.block.items.length - 1 ? (f(), x("span", {
|
|
2247
2247
|
key: 0,
|
|
2248
2248
|
style: i({
|
|
2249
2249
|
color: e.block.separatorColor,
|
|
2250
2250
|
padding: `0 ${e.block.spacing}px`
|
|
2251
2251
|
})
|
|
2252
|
-
}, p(e.block.separator), 5)) : N("", !0)], 64))), 128))], 4)) : (f(), x("div",
|
|
2252
|
+
}, p(e.block.separator), 5)) : N("", !0)], 64))), 128))], 4)) : (f(), x("div", di, [w(k(ir), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
|
|
2253
2253
|
}
|
|
2254
|
-
}),
|
|
2254
|
+
}), pi = /* @__PURE__ */ new Set([
|
|
2255
2255
|
"http",
|
|
2256
2256
|
"https",
|
|
2257
2257
|
"mailto",
|
|
@@ -2261,7 +2261,7 @@ var Qr = {
|
|
|
2261
2261
|
"sms",
|
|
2262
2262
|
"xmpp",
|
|
2263
2263
|
"cid"
|
|
2264
|
-
]),
|
|
2264
|
+
]), mi = /* @__PURE__ */ new Set([
|
|
2265
2265
|
"SCRIPT",
|
|
2266
2266
|
"STYLE",
|
|
2267
2267
|
"IFRAME",
|
|
@@ -2271,7 +2271,7 @@ var Qr = {
|
|
|
2271
2271
|
"META",
|
|
2272
2272
|
"BASE",
|
|
2273
2273
|
"FORM"
|
|
2274
|
-
]),
|
|
2274
|
+
]), hi = /* @__PURE__ */ new Set([
|
|
2275
2275
|
"href",
|
|
2276
2276
|
"xlink:href",
|
|
2277
2277
|
"formaction",
|
|
@@ -2280,16 +2280,16 @@ var Qr = {
|
|
|
2280
2280
|
"background",
|
|
2281
2281
|
"poster"
|
|
2282
2282
|
]);
|
|
2283
|
-
function
|
|
2283
|
+
function gi(e, t) {
|
|
2284
2284
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2285
2285
|
if (!n || n.startsWith("#")) return !0;
|
|
2286
2286
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2287
2287
|
if (!r) return !0;
|
|
2288
2288
|
let i = r[1].toLowerCase();
|
|
2289
|
-
return
|
|
2289
|
+
return pi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2290
2290
|
}
|
|
2291
|
-
function
|
|
2292
|
-
if (
|
|
2291
|
+
function _i(e) {
|
|
2292
|
+
if (mi.has(e.tagName)) {
|
|
2293
2293
|
e.remove();
|
|
2294
2294
|
return;
|
|
2295
2295
|
}
|
|
@@ -2301,29 +2301,29 @@ function vi(e) {
|
|
|
2301
2301
|
e.removeAttribute(n);
|
|
2302
2302
|
continue;
|
|
2303
2303
|
}
|
|
2304
|
-
if (
|
|
2305
|
-
|
|
2304
|
+
if (hi.has(t)) {
|
|
2305
|
+
gi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2306
2306
|
continue;
|
|
2307
2307
|
}
|
|
2308
2308
|
if (t === "src") {
|
|
2309
|
-
|
|
2309
|
+
gi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2310
2310
|
continue;
|
|
2311
2311
|
}
|
|
2312
2312
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2313
2313
|
}
|
|
2314
2314
|
let n = Array.from(e.children);
|
|
2315
|
-
for (let e of n)
|
|
2315
|
+
for (let e of n) _i(e);
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2317
|
+
function vi(e) {
|
|
2318
2318
|
if (typeof DOMParser > "u") return e;
|
|
2319
2319
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2320
|
-
for (let e of n)
|
|
2320
|
+
for (let e of n) _i(e);
|
|
2321
2321
|
return t.innerHTML;
|
|
2322
2322
|
}
|
|
2323
2323
|
//#endregion
|
|
2324
2324
|
//#region src/composables/useEditableTextBlock.ts
|
|
2325
|
-
function
|
|
2326
|
-
let t = P(yt, []), n = P(bt, null), { syntax: r } =
|
|
2325
|
+
function yi(e) {
|
|
2326
|
+
let t = P(yt, []), n = P(bt, null), { syntax: r } = Yt(), i = M(() => n?.value ? Ke(e(), t) : he(e(), t)), a = M(() => vi(me(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = tt(s), { toLocal: u } = it(), d = M(() => u({
|
|
2327
2327
|
top: c.value - 8,
|
|
2328
2328
|
left: l.value
|
|
2329
2329
|
}));
|
|
@@ -2344,14 +2344,14 @@ function bi(e) {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
//#endregion
|
|
2346
2346
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2347
|
-
var
|
|
2347
|
+
var bi = ["innerHTML"], xi = /* @__PURE__ */ y({
|
|
2348
2348
|
__name: "ParagraphBlock",
|
|
2349
2349
|
props: {
|
|
2350
2350
|
block: {},
|
|
2351
2351
|
viewport: {}
|
|
2352
2352
|
},
|
|
2353
2353
|
setup(e) {
|
|
2354
|
-
let t = e, n = C(() => import("./ParagraphEditor-
|
|
2354
|
+
let t = e, n = C(() => import("./ParagraphEditor-Cy-bpEjI.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = yi(() => t.block.content);
|
|
2355
2355
|
return (t, l) => (f(), x("div", {
|
|
2356
2356
|
ref_key: "blockRef",
|
|
2357
2357
|
ref: i,
|
|
@@ -2370,54 +2370,54 @@ var xi = ["innerHTML"], Si = /* @__PURE__ */ y({
|
|
|
2370
2370
|
key: 1,
|
|
2371
2371
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
2372
2372
|
innerHTML: k(o)
|
|
2373
|
-
}, null, 8,
|
|
2373
|
+
}, null, 8, bi))], 544));
|
|
2374
2374
|
}
|
|
2375
2375
|
});
|
|
2376
2376
|
//#endregion
|
|
2377
2377
|
//#region src/utils/blockComponentResolver.ts
|
|
2378
|
-
function
|
|
2378
|
+
function Si(e) {
|
|
2379
2379
|
let t = { fontFamily: e.fontFamily };
|
|
2380
2380
|
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;
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2382
|
+
function Ci(e, t, n) {
|
|
2383
2383
|
if (t) {
|
|
2384
2384
|
let n = t.getComponent(e);
|
|
2385
2385
|
if (n) return n;
|
|
2386
2386
|
}
|
|
2387
2387
|
return n[e.type] ?? null;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function wi(e) {
|
|
2390
2390
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2391
2391
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2392
2392
|
backgroundColor: n || "transparent"
|
|
2393
2393
|
};
|
|
2394
2394
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2395
2395
|
}
|
|
2396
|
-
function
|
|
2396
|
+
function Ti(e) {
|
|
2397
2397
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2398
2398
|
let t = e.wrapper, n = {};
|
|
2399
2399
|
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;
|
|
2400
2400
|
}
|
|
2401
2401
|
//#endregion
|
|
2402
2402
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2403
|
-
var
|
|
2403
|
+
var Ei = [
|
|
2404
2404
|
"data-block-id",
|
|
2405
2405
|
"data-block-type",
|
|
2406
2406
|
"data-tpl-picked"
|
|
2407
|
-
],
|
|
2407
|
+
], Di = ["aria-label"], Oi = [
|
|
2408
2408
|
"aria-label",
|
|
2409
2409
|
"aria-pressed",
|
|
2410
2410
|
"title"
|
|
2411
|
-
],
|
|
2411
|
+
], ki = ["aria-label", "title"], Ai = ["aria-label", "title"], ji = ["aria-label", "title"], Mi = {
|
|
2412
2412
|
key: 1,
|
|
2413
2413
|
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"
|
|
2414
|
-
},
|
|
2414
|
+
}, Ni = { 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)]" }, Pi = {
|
|
2415
2415
|
key: 2,
|
|
2416
2416
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2417
|
-
},
|
|
2417
|
+
}, Fi = ["aria-label", "title"], Ii = {
|
|
2418
2418
|
key: 3,
|
|
2419
2419
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2420
|
-
},
|
|
2420
|
+
}, Li = ["aria-label"], Ri = /*#__PURE__*/ Jt(/* @__PURE__ */ y({
|
|
2421
2421
|
__name: "BlockWrapper",
|
|
2422
2422
|
props: {
|
|
2423
2423
|
block: {},
|
|
@@ -2429,7 +2429,7 @@ var Di = [
|
|
|
2429
2429
|
},
|
|
2430
2430
|
emits: ["select"],
|
|
2431
2431
|
setup(e, { emit: t }) {
|
|
2432
|
-
let n = C(() => import("./BlockIssueBadge-
|
|
2432
|
+
let n = C(() => import("./BlockIssueBadge-Qxrl7Ujl.js")), r = e, a = t, { t: s, format: c } = Ht(), l = P(zt, null), u = _(null), d = M(() => l?.liftedBlockId.value === r.block.id), m = M(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
|
|
2433
2433
|
async function h() {
|
|
2434
2434
|
await re(), u.value?.focus();
|
|
2435
2435
|
}
|
|
@@ -2456,12 +2456,12 @@ var Di = [
|
|
|
2456
2456
|
desktop: s.viewport.desktop,
|
|
2457
2457
|
mobile: s.viewport.mobile
|
|
2458
2458
|
}[r.viewport] ?? r.viewport : ""), E = M(() => !!r.block.displayCondition), D = P(Ot, null), A = P(wt, null), j = P(It, {}), ee = M(() => j.savedBlocks?.isPicking.value === !0), te = M(() => !r.nested && j.savedBlocks?.isAvailable.value === !0 && j.savedBlocks?.canCreate.value === !0), ne = M(() => r.isSelected && !ee.value), ie = M(() => j.comments?.getBlockCount(r.block.id) ?? 0), ae = M(() => {
|
|
2459
|
-
let e =
|
|
2459
|
+
let e = wi(r.block), t = {
|
|
2460
2460
|
padding: e.padding,
|
|
2461
2461
|
backgroundColor: e.backgroundColor
|
|
2462
2462
|
};
|
|
2463
2463
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2464
|
-
}), oe = M(() =>
|
|
2464
|
+
}), oe = M(() => Ti(r.block));
|
|
2465
2465
|
function se(e) {
|
|
2466
2466
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2467
2467
|
}
|
|
@@ -2506,60 +2506,60 @@ var Di = [
|
|
|
2506
2506
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2507
2507
|
title: k(s).blockActions.drag,
|
|
2508
2508
|
onKeydown: g
|
|
2509
|
-
}, [w(k(
|
|
2509
|
+
}, [w(k(nr), {
|
|
2510
2510
|
size: 14,
|
|
2511
2511
|
"stroke-width": 1.5
|
|
2512
|
-
})], 40,
|
|
2512
|
+
})], 40, Oi),
|
|
2513
2513
|
b("button", {
|
|
2514
2514
|
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 tpl:duration-150",
|
|
2515
2515
|
"aria-label": k(s).blockActions.duplicate,
|
|
2516
2516
|
title: k(s).blockActions.duplicate,
|
|
2517
2517
|
onClick: F(le, ["stop"])
|
|
2518
|
-
}, [w(k(
|
|
2518
|
+
}, [w(k($n), {
|
|
2519
2519
|
size: 14,
|
|
2520
2520
|
"stroke-width": 1.5
|
|
2521
|
-
})], 8,
|
|
2521
|
+
})], 8, ki),
|
|
2522
2522
|
te.value ? (f(), x("button", {
|
|
2523
2523
|
key: 0,
|
|
2524
2524
|
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 tpl:duration-150",
|
|
2525
2525
|
"aria-label": k(s).blockActions.saveAsBlock,
|
|
2526
2526
|
title: k(s).blockActions.saveAsBlock,
|
|
2527
2527
|
onClick: F(ue, ["stop"])
|
|
2528
|
-
}, [w(k(
|
|
2528
|
+
}, [w(k(Xn), {
|
|
2529
2529
|
size: 14,
|
|
2530
2530
|
"stroke-width": 1.5
|
|
2531
|
-
})], 8,
|
|
2531
|
+
})], 8, Ai)) : N("", !0),
|
|
2532
2532
|
b("button", {
|
|
2533
2533
|
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 tpl:duration-150",
|
|
2534
2534
|
"aria-label": k(s).blockActions.delete,
|
|
2535
2535
|
title: k(s).blockActions.delete,
|
|
2536
2536
|
onClick: F(ce, ["stop"])
|
|
2537
|
-
}, [w(k(
|
|
2537
|
+
}, [w(k(Gt), {
|
|
2538
2538
|
size: 14,
|
|
2539
2539
|
"stroke-width": 1.5
|
|
2540
|
-
})], 8,
|
|
2541
|
-
], 8,
|
|
2542
|
-
v.value ? (f(), x("div",
|
|
2540
|
+
})], 8, ji)
|
|
2541
|
+
], 8, Di)) : N("", !0),
|
|
2542
|
+
v.value ? (f(), x("div", Mi, [b("span", Ni, [w(k(er), {
|
|
2543
2543
|
size: 12,
|
|
2544
2544
|
"stroke-width": 1.5
|
|
2545
2545
|
}), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : N("", !0),
|
|
2546
|
-
E.value && !v.value ? (f(), x("div",
|
|
2546
|
+
E.value && !v.value ? (f(), x("div", Pi, [b("button", {
|
|
2547
2547
|
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:duration-150 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2548
2548
|
"aria-label": k(s).blockActions.conditionToggle,
|
|
2549
2549
|
title: e.block.displayCondition?.label,
|
|
2550
2550
|
onClick: F(de, ["stop"])
|
|
2551
|
-
}, [w(k(
|
|
2551
|
+
}, [w(k(tr), {
|
|
2552
2552
|
size: 12,
|
|
2553
2553
|
"stroke-width": 2
|
|
2554
|
-
})], 8,
|
|
2555
|
-
ie.value > 0 && !v.value ? (f(), x("div",
|
|
2554
|
+
})], 8, Fi)])) : N("", !0),
|
|
2555
|
+
ie.value > 0 && !v.value ? (f(), x("div", Ii, [b("button", {
|
|
2556
2556
|
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:duration-150 tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2557
2557
|
"aria-label": k(c)(k(s).blockActions.comments, { count: String(ie.value) }),
|
|
2558
2558
|
onClick: r[0] ||= F((t) => k(j).comments?.openForBlock(e.block.id), ["stop"])
|
|
2559
|
-
}, [w(k(
|
|
2559
|
+
}, [w(k(Wt), {
|
|
2560
2560
|
size: 12,
|
|
2561
2561
|
"stroke-width": 2.5
|
|
2562
|
-
}), O(" " + p(ie.value), 1)], 8,
|
|
2562
|
+
}), O(" " + p(ie.value), 1)], 8, Li)])) : N("", !0),
|
|
2563
2563
|
oe.value ? (f(), x("div", {
|
|
2564
2564
|
key: 4,
|
|
2565
2565
|
class: "tpl-section-wrapper",
|
|
@@ -2572,31 +2572,31 @@ var Di = [
|
|
|
2572
2572
|
class: "tpl-block-content",
|
|
2573
2573
|
style: i(ae.value)
|
|
2574
2574
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2575
|
-
], 10,
|
|
2575
|
+
], 10, Ei));
|
|
2576
2576
|
}
|
|
2577
2577
|
}), [["__scopeId", "data-v-43c10a08"]]);
|
|
2578
2578
|
//#endregion
|
|
2579
2579
|
//#region src/utils/unwrapParagraph.ts
|
|
2580
|
-
function
|
|
2580
|
+
function zi(e) {
|
|
2581
2581
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2582
2582
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2583
2583
|
}
|
|
2584
2584
|
//#endregion
|
|
2585
2585
|
//#region src/components/blocks/TitleBlock.vue
|
|
2586
|
-
var
|
|
2586
|
+
var Bi = /* @__PURE__ */ y({
|
|
2587
2587
|
__name: "TitleBlock",
|
|
2588
2588
|
props: {
|
|
2589
2589
|
block: {},
|
|
2590
2590
|
viewport: {}
|
|
2591
2591
|
},
|
|
2592
2592
|
setup(e) {
|
|
2593
|
-
let t = e, n = C(() => import("./TitleEditor-
|
|
2593
|
+
let t = e, n = C(() => import("./TitleEditor-F7E_pU9H.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = yi(() => t.block.content), u = M(() => {
|
|
2594
2594
|
let e = {
|
|
2595
2595
|
fontSize: `${ze[t.block.level]}px`,
|
|
2596
2596
|
textAlign: t.block.textAlign
|
|
2597
2597
|
};
|
|
2598
2598
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2599
|
-
}), p = M(() => `h${t.block.level}`), m = M(() =>
|
|
2599
|
+
}), p = M(() => `h${t.block.level}`), m = M(() => zi(s.value));
|
|
2600
2600
|
return (t, s) => (f(), x("div", {
|
|
2601
2601
|
ref_key: "blockRef",
|
|
2602
2602
|
ref: a,
|
|
@@ -2622,88 +2622,88 @@ var Vi = /* @__PURE__ */ y({
|
|
|
2622
2622
|
});
|
|
2623
2623
|
//#endregion
|
|
2624
2624
|
//#region src/utils/sectionColumnDrop.ts
|
|
2625
|
-
function
|
|
2625
|
+
function Vi(e) {
|
|
2626
2626
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2627
2627
|
}
|
|
2628
2628
|
//#endregion
|
|
2629
2629
|
//#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
|
|
2630
|
-
var
|
|
2630
|
+
var Hi = Object.defineProperty, Ui = Object.getOwnPropertySymbols, Wi = Object.prototype.hasOwnProperty, Gi = Object.prototype.propertyIsEnumerable, Ki = (e, t, n) => t in e ? Hi(e, t, {
|
|
2631
2631
|
enumerable: !0,
|
|
2632
2632
|
configurable: !0,
|
|
2633
2633
|
writable: !0,
|
|
2634
2634
|
value: n
|
|
2635
|
-
}) : e[t] = n,
|
|
2636
|
-
for (var n in t ||= {})
|
|
2637
|
-
if (
|
|
2635
|
+
}) : e[t] = n, qi = (e, t) => {
|
|
2636
|
+
for (var n in t ||= {}) Wi.call(t, n) && Ki(e, n, t[n]);
|
|
2637
|
+
if (Ui) for (var n of Ui(t)) Gi.call(t, n) && Ki(e, n, t[n]);
|
|
2638
2638
|
return e;
|
|
2639
|
-
},
|
|
2639
|
+
}, Ji = (e, t) => {
|
|
2640
2640
|
var n = {};
|
|
2641
|
-
for (var r in e)
|
|
2642
|
-
if (e != null &&
|
|
2641
|
+
for (var r in e) Wi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2642
|
+
if (e != null && Ui) for (var r of Ui(e)) t.indexOf(r) < 0 && Gi.call(e, r) && (n[r] = e[r]);
|
|
2643
2643
|
return n;
|
|
2644
|
-
},
|
|
2645
|
-
function
|
|
2646
|
-
console.warn(
|
|
2644
|
+
}, Yi = "[vue-draggable-plus]: ";
|
|
2645
|
+
function Xi(e) {
|
|
2646
|
+
console.warn(Yi + e);
|
|
2647
2647
|
}
|
|
2648
|
-
function
|
|
2649
|
-
console.error(
|
|
2648
|
+
function Zi(e) {
|
|
2649
|
+
console.error(Yi + e);
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2651
|
+
function Qi(e, t, n) {
|
|
2652
2652
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2653
2653
|
}
|
|
2654
|
-
function
|
|
2654
|
+
function $i(e) {
|
|
2655
2655
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2656
2656
|
}
|
|
2657
|
-
function
|
|
2658
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2657
|
+
function ea(e) {
|
|
2658
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[$i(n)] = e[n]), t), {});
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2660
|
+
function ta(e, t) {
|
|
2661
2661
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2662
2662
|
}
|
|
2663
|
-
function
|
|
2663
|
+
function na(e, t, n) {
|
|
2664
2664
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2665
2665
|
}
|
|
2666
|
-
function
|
|
2666
|
+
function ra(e) {
|
|
2667
2667
|
return e === void 0;
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2669
|
+
function ia(e) {
|
|
2670
2670
|
return typeof e == "string";
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2672
|
+
function aa(e, t, n) {
|
|
2673
2673
|
let r = e.children[n];
|
|
2674
2674
|
e.insertBefore(t, r);
|
|
2675
2675
|
}
|
|
2676
|
-
function
|
|
2676
|
+
function oa(e) {
|
|
2677
2677
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2678
2678
|
}
|
|
2679
|
-
function
|
|
2679
|
+
function sa(e, t = document) {
|
|
2680
2680
|
let n = null;
|
|
2681
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2681
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Xi(`Element not found: ${e}`), n;
|
|
2682
2682
|
}
|
|
2683
|
-
function
|
|
2683
|
+
function ca(e, t, n = null) {
|
|
2684
2684
|
return function(...r) {
|
|
2685
2685
|
return e.apply(n, r), t.apply(n, r);
|
|
2686
2686
|
};
|
|
2687
2687
|
}
|
|
2688
|
-
function
|
|
2689
|
-
let n =
|
|
2688
|
+
function la(e, t) {
|
|
2689
|
+
let n = qi({}, e);
|
|
2690
2690
|
return Object.keys(t).forEach((r) => {
|
|
2691
|
-
n[r] ? n[r] =
|
|
2691
|
+
n[r] ? n[r] = ca(e[r], t[r]) : n[r] = t[r];
|
|
2692
2692
|
}), n;
|
|
2693
2693
|
}
|
|
2694
|
-
function
|
|
2694
|
+
function ua(e) {
|
|
2695
2695
|
return e instanceof HTMLElement;
|
|
2696
2696
|
}
|
|
2697
|
-
function
|
|
2697
|
+
function da(e, t) {
|
|
2698
2698
|
Object.keys(e).forEach((n) => {
|
|
2699
2699
|
t(n, e[n]);
|
|
2700
2700
|
});
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2702
|
+
function fa(e) {
|
|
2703
2703
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2704
2704
|
}
|
|
2705
|
-
var
|
|
2706
|
-
function
|
|
2705
|
+
var pa = Object.assign;
|
|
2706
|
+
function ma(e, t) {
|
|
2707
2707
|
var n = Object.keys(e);
|
|
2708
2708
|
if (Object.getOwnPropertySymbols) {
|
|
2709
2709
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2713,26 +2713,26 @@ function ha(e, t) {
|
|
|
2713
2713
|
}
|
|
2714
2714
|
return n;
|
|
2715
2715
|
}
|
|
2716
|
-
function
|
|
2716
|
+
function ha(e) {
|
|
2717
2717
|
for (var t = 1; t < arguments.length; t++) {
|
|
2718
2718
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2719
|
-
t % 2 ?
|
|
2720
|
-
|
|
2721
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2719
|
+
t % 2 ? ma(Object(n), !0).forEach(function(t) {
|
|
2720
|
+
_a(e, t, n[t]);
|
|
2721
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ma(Object(n)).forEach(function(t) {
|
|
2722
2722
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2723
2723
|
});
|
|
2724
2724
|
}
|
|
2725
2725
|
return e;
|
|
2726
2726
|
}
|
|
2727
|
-
function
|
|
2727
|
+
function ga(e) {
|
|
2728
2728
|
"@babel/helpers - typeof";
|
|
2729
|
-
return
|
|
2729
|
+
return ga = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2730
2730
|
return typeof e;
|
|
2731
2731
|
} : function(e) {
|
|
2732
2732
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2733
|
-
},
|
|
2733
|
+
}, ga(e);
|
|
2734
2734
|
}
|
|
2735
|
-
function
|
|
2735
|
+
function _a(e, t, n) {
|
|
2736
2736
|
return t in e ? Object.defineProperty(e, t, {
|
|
2737
2737
|
value: n,
|
|
2738
2738
|
enumerable: !0,
|
|
@@ -2740,45 +2740,45 @@ function va(e, t, n) {
|
|
|
2740
2740
|
writable: !0
|
|
2741
2741
|
}) : e[t] = n, e;
|
|
2742
2742
|
}
|
|
2743
|
-
function
|
|
2744
|
-
return
|
|
2743
|
+
function va() {
|
|
2744
|
+
return va = Object.assign || function(e) {
|
|
2745
2745
|
for (var t = 1; t < arguments.length; t++) {
|
|
2746
2746
|
var n = arguments[t];
|
|
2747
2747
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2748
2748
|
}
|
|
2749
2749
|
return e;
|
|
2750
|
-
},
|
|
2750
|
+
}, va.apply(this, arguments);
|
|
2751
2751
|
}
|
|
2752
|
-
function
|
|
2752
|
+
function ya(e, t) {
|
|
2753
2753
|
if (e == null) return {};
|
|
2754
2754
|
var n = {}, r = Object.keys(e), i, a;
|
|
2755
2755
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2756
2756
|
return n;
|
|
2757
2757
|
}
|
|
2758
|
-
function
|
|
2758
|
+
function ba(e, t) {
|
|
2759
2759
|
if (e == null) return {};
|
|
2760
|
-
var n =
|
|
2760
|
+
var n = ya(e, t), r, i;
|
|
2761
2761
|
if (Object.getOwnPropertySymbols) {
|
|
2762
2762
|
var a = Object.getOwnPropertySymbols(e);
|
|
2763
2763
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2764
2764
|
}
|
|
2765
2765
|
return n;
|
|
2766
2766
|
}
|
|
2767
|
-
var
|
|
2768
|
-
function
|
|
2767
|
+
var xa = "1.15.2";
|
|
2768
|
+
function Sa(e) {
|
|
2769
2769
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2770
2770
|
}
|
|
2771
|
-
var
|
|
2771
|
+
var Ca = Sa(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), wa = Sa(/Edge/i), Ta = Sa(/firefox/i), Ea = Sa(/safari/i) && !Sa(/chrome/i) && !Sa(/android/i), Da = Sa(/iP(ad|od|hone)/i), Oa = Sa(/chrome/i) && Sa(/android/i), ka = {
|
|
2772
2772
|
capture: !1,
|
|
2773
2773
|
passive: !1
|
|
2774
2774
|
};
|
|
2775
|
-
function I(e, t, n) {
|
|
2776
|
-
e.addEventListener(t, n, !wa && Aa);
|
|
2777
|
-
}
|
|
2778
2775
|
function L(e, t, n) {
|
|
2779
|
-
e.
|
|
2776
|
+
e.addEventListener(t, n, !Ca && ka);
|
|
2780
2777
|
}
|
|
2781
|
-
function
|
|
2778
|
+
function R(e, t, n) {
|
|
2779
|
+
e.removeEventListener(t, n, !Ca && ka);
|
|
2780
|
+
}
|
|
2781
|
+
function Aa(e, t) {
|
|
2782
2782
|
if (t) {
|
|
2783
2783
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2784
2784
|
if (e.matches) return e.matches(t);
|
|
@@ -2790,41 +2790,41 @@ function ja(e, t) {
|
|
|
2790
2790
|
return !1;
|
|
2791
2791
|
}
|
|
2792
2792
|
}
|
|
2793
|
-
function
|
|
2793
|
+
function ja(e) {
|
|
2794
2794
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2795
2795
|
}
|
|
2796
|
-
function
|
|
2796
|
+
function Ma(e, t, n, r) {
|
|
2797
2797
|
if (e) {
|
|
2798
2798
|
n ||= document;
|
|
2799
2799
|
do {
|
|
2800
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2800
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Aa(e, t) : Aa(e, t)) || r && e === n) return e;
|
|
2801
2801
|
if (e === n) break;
|
|
2802
|
-
} while (e =
|
|
2802
|
+
} while (e = ja(e));
|
|
2803
2803
|
}
|
|
2804
2804
|
return null;
|
|
2805
2805
|
}
|
|
2806
|
-
var
|
|
2807
|
-
function R(e, t, n) {
|
|
2808
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Pa, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Pa, " "));
|
|
2809
|
-
}
|
|
2806
|
+
var Na = /\s+/g;
|
|
2810
2807
|
function z(e, t, n) {
|
|
2808
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Na, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Na, " "));
|
|
2809
|
+
}
|
|
2810
|
+
function B(e, t, n) {
|
|
2811
2811
|
var r = e && e.style;
|
|
2812
2812
|
if (r) {
|
|
2813
2813
|
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];
|
|
2814
2814
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2815
2815
|
}
|
|
2816
2816
|
}
|
|
2817
|
-
function
|
|
2817
|
+
function Pa(e, t) {
|
|
2818
2818
|
var n = "";
|
|
2819
2819
|
if (typeof e == "string") n = e;
|
|
2820
2820
|
else do {
|
|
2821
|
-
var r =
|
|
2821
|
+
var r = B(e, "transform");
|
|
2822
2822
|
r && r !== "none" && (n = r + " " + n);
|
|
2823
2823
|
} while (!t && (e = e.parentNode));
|
|
2824
2824
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2825
2825
|
return i && new i(n);
|
|
2826
2826
|
}
|
|
2827
|
-
function
|
|
2827
|
+
function Fa(e, t, n) {
|
|
2828
2828
|
if (e) {
|
|
2829
2829
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2830
2830
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2832,21 +2832,21 @@ function Ia(e, t, n) {
|
|
|
2832
2832
|
}
|
|
2833
2833
|
return [];
|
|
2834
2834
|
}
|
|
2835
|
-
function
|
|
2835
|
+
function Ia() {
|
|
2836
2836
|
return document.scrollingElement || document.documentElement;
|
|
2837
2837
|
}
|
|
2838
|
-
function
|
|
2838
|
+
function V(e, t, n, r, i) {
|
|
2839
2839
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2840
2840
|
var a, o, s, c, l, u, d;
|
|
2841
|
-
if (e !== window && e.parentNode && e !==
|
|
2842
|
-
if (i && i.getBoundingClientRect && (
|
|
2841
|
+
if (e !== window && e.parentNode && e !== Ia() ? (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, !Ca)) do
|
|
2842
|
+
if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
|
|
2843
2843
|
var f = i.getBoundingClientRect();
|
|
2844
|
-
o -= f.top + parseInt(
|
|
2844
|
+
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;
|
|
2845
2845
|
break;
|
|
2846
2846
|
}
|
|
2847
2847
|
while (i = i.parentNode);
|
|
2848
2848
|
if (r && e !== window) {
|
|
2849
|
-
var p =
|
|
2849
|
+
var p = Pa(i || e), m = p && p.a, h = p && p.d;
|
|
2850
2850
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2851
2851
|
}
|
|
2852
2852
|
return {
|
|
@@ -2859,18 +2859,18 @@ function B(e, t, n, r, i) {
|
|
|
2859
2859
|
};
|
|
2860
2860
|
}
|
|
2861
2861
|
}
|
|
2862
|
-
function
|
|
2863
|
-
for (var r =
|
|
2864
|
-
var a =
|
|
2862
|
+
function La(e, t, n) {
|
|
2863
|
+
for (var r = Ua(e, !0), i = V(e)[t]; r;) {
|
|
2864
|
+
var a = V(r)[n], o = void 0;
|
|
2865
2865
|
if (o = i >= a, !o) return r;
|
|
2866
|
-
if (r ===
|
|
2867
|
-
r =
|
|
2866
|
+
if (r === Ia()) break;
|
|
2867
|
+
r = Ua(r, !1);
|
|
2868
2868
|
}
|
|
2869
2869
|
return !1;
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2871
|
+
function Ra(e, t, n, r) {
|
|
2872
2872
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2873
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2873
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ma(o[a], n.draggable, e, !1)) {
|
|
2874
2874
|
if (i === t) return o[a];
|
|
2875
2875
|
i++;
|
|
2876
2876
|
}
|
|
@@ -2878,96 +2878,96 @@ function za(e, t, n, r) {
|
|
|
2878
2878
|
}
|
|
2879
2879
|
return null;
|
|
2880
2880
|
}
|
|
2881
|
-
function
|
|
2882
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2881
|
+
function za(e, t) {
|
|
2882
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !Aa(n, t));) n = n.previousElementSibling;
|
|
2883
2883
|
return n || null;
|
|
2884
2884
|
}
|
|
2885
|
-
function
|
|
2885
|
+
function Ba(e, t) {
|
|
2886
2886
|
var n = 0;
|
|
2887
2887
|
if (!e || !e.parentNode) return -1;
|
|
2888
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2888
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Aa(e, t)) && n++;
|
|
2889
2889
|
return n;
|
|
2890
2890
|
}
|
|
2891
|
-
function
|
|
2892
|
-
var t = 0, n = 0, r =
|
|
2891
|
+
function Va(e) {
|
|
2892
|
+
var t = 0, n = 0, r = Ia();
|
|
2893
2893
|
if (e) do {
|
|
2894
|
-
var i =
|
|
2894
|
+
var i = Pa(e), a = i.a, o = i.d;
|
|
2895
2895
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2896
2896
|
} while (e !== r && (e = e.parentNode));
|
|
2897
2897
|
return [t, n];
|
|
2898
2898
|
}
|
|
2899
|
-
function
|
|
2899
|
+
function Ha(e, t) {
|
|
2900
2900
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2901
2901
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2902
2902
|
}
|
|
2903
2903
|
return -1;
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2906
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2905
|
+
function Ua(e, t) {
|
|
2906
|
+
if (!e || !e.getBoundingClientRect) return Ia();
|
|
2907
2907
|
var n = e, r = !1;
|
|
2908
2908
|
do
|
|
2909
2909
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2910
|
-
var i =
|
|
2910
|
+
var i = B(n);
|
|
2911
2911
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2912
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2912
|
+
if (!n.getBoundingClientRect || n === document.body) return Ia();
|
|
2913
2913
|
if (r || t) return n;
|
|
2914
2914
|
r = !0;
|
|
2915
2915
|
}
|
|
2916
2916
|
}
|
|
2917
2917
|
while (n = n.parentNode);
|
|
2918
|
-
return
|
|
2918
|
+
return Ia();
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2920
|
+
function Wa(e, t) {
|
|
2921
2921
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2922
2922
|
return e;
|
|
2923
2923
|
}
|
|
2924
|
-
function
|
|
2924
|
+
function Ga(e, t) {
|
|
2925
2925
|
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);
|
|
2926
2926
|
}
|
|
2927
|
-
var
|
|
2928
|
-
function
|
|
2927
|
+
var Ka;
|
|
2928
|
+
function qa(e, t) {
|
|
2929
2929
|
return function() {
|
|
2930
|
-
if (!
|
|
2930
|
+
if (!Ka) {
|
|
2931
2931
|
var n = arguments, r = this;
|
|
2932
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2933
|
-
|
|
2932
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ka = setTimeout(function() {
|
|
2933
|
+
Ka = void 0;
|
|
2934
2934
|
}, t);
|
|
2935
2935
|
}
|
|
2936
2936
|
};
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2939
|
-
clearTimeout(
|
|
2938
|
+
function Ja() {
|
|
2939
|
+
clearTimeout(Ka), Ka = void 0;
|
|
2940
2940
|
}
|
|
2941
|
-
function
|
|
2941
|
+
function Ya(e, t, n) {
|
|
2942
2942
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2943
2943
|
}
|
|
2944
|
-
function
|
|
2944
|
+
function Xa(e) {
|
|
2945
2945
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2946
2946
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2947
2947
|
}
|
|
2948
|
-
function
|
|
2948
|
+
function Za(e, t, n) {
|
|
2949
2949
|
var r = {};
|
|
2950
2950
|
return Array.from(e.children).forEach(function(i) {
|
|
2951
|
-
if (!(!
|
|
2952
|
-
var a =
|
|
2951
|
+
if (!(!Ma(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2952
|
+
var a = V(i);
|
|
2953
2953
|
r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
|
|
2954
2954
|
}
|
|
2955
2955
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2956
2956
|
}
|
|
2957
|
-
var
|
|
2957
|
+
var Qa = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2958
2958
|
function $a() {
|
|
2959
2959
|
var e = [], t;
|
|
2960
2960
|
return {
|
|
2961
2961
|
captureAnimationState: function() {
|
|
2962
2962
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2963
|
-
if (
|
|
2963
|
+
if (B(t, "display") !== "none" && t !== Q.ghost) {
|
|
2964
2964
|
e.push({
|
|
2965
2965
|
target: t,
|
|
2966
|
-
rect:
|
|
2966
|
+
rect: V(t)
|
|
2967
2967
|
});
|
|
2968
|
-
var n =
|
|
2968
|
+
var n = ha({}, e[e.length - 1].rect);
|
|
2969
2969
|
if (t.thisAnimationDuration) {
|
|
2970
|
-
var r =
|
|
2970
|
+
var r = Pa(t, !0);
|
|
2971
2971
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2972
2972
|
}
|
|
2973
2973
|
t.fromRect = n;
|
|
@@ -2978,7 +2978,7 @@ function $a() {
|
|
|
2978
2978
|
e.push(t);
|
|
2979
2979
|
},
|
|
2980
2980
|
removeAnimationState: function(t) {
|
|
2981
|
-
e.splice(
|
|
2981
|
+
e.splice(Ha(e, { target: t }), 1);
|
|
2982
2982
|
},
|
|
2983
2983
|
animateAll: function(n) {
|
|
2984
2984
|
var r = this;
|
|
@@ -2988,8 +2988,8 @@ function $a() {
|
|
|
2988
2988
|
}
|
|
2989
2989
|
var i = !1, a = 0;
|
|
2990
2990
|
e.forEach(function(e) {
|
|
2991
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2992
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2991
|
+
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Pa(n, !0);
|
|
2992
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Ga(c, s) && !Ga(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = to(u, c, l, r.options)), Ga(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() {
|
|
2993
2993
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2994
2994
|
}, t), n.thisAnimationDuration = t);
|
|
2995
2995
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2998,10 +2998,10 @@ function $a() {
|
|
|
2998
2998
|
},
|
|
2999
2999
|
animate: function(e, t, n, r) {
|
|
3000
3000
|
if (r) {
|
|
3001
|
-
|
|
3002
|
-
var i =
|
|
3003
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
3004
|
-
|
|
3001
|
+
B(e, "transition", ""), B(e, "transform", "");
|
|
3002
|
+
var i = Pa(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
3003
|
+
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = eo(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() {
|
|
3004
|
+
B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
3005
3005
|
}, r);
|
|
3006
3006
|
}
|
|
3007
3007
|
}
|
|
@@ -3027,7 +3027,7 @@ var no = [], ro = { initializeByDefault: !0 }, io = {
|
|
|
3027
3027
|
};
|
|
3028
3028
|
var i = e + "Global";
|
|
3029
3029
|
no.forEach(function(r) {
|
|
3030
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
3030
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ha({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ha({ sortable: t }, n)));
|
|
3031
3031
|
});
|
|
3032
3032
|
},
|
|
3033
3033
|
initializePlugins: function(e, t, n, r) {
|
|
@@ -3035,7 +3035,7 @@ var no = [], ro = { initializeByDefault: !0 }, io = {
|
|
|
3035
3035
|
var i = r.pluginName;
|
|
3036
3036
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
3037
3037
|
var a = new r(e, t, e.options);
|
|
3038
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
3038
|
+
a.sortable = e, a.options = e.options, e[i] = a, va(n, a.defaults);
|
|
3039
3039
|
}
|
|
3040
3040
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
3041
3041
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -3045,7 +3045,7 @@ var no = [], ro = { initializeByDefault: !0 }, io = {
|
|
|
3045
3045
|
getEventProperties: function(e, t) {
|
|
3046
3046
|
var n = {};
|
|
3047
3047
|
return no.forEach(function(r) {
|
|
3048
|
-
typeof r.eventProperties == "function" &&
|
|
3048
|
+
typeof r.eventProperties == "function" && va(n, r.eventProperties.call(t[r.pluginName], e));
|
|
3049
3049
|
}), n;
|
|
3050
3050
|
},
|
|
3051
3051
|
modifyOption: function(e, t, n) {
|
|
@@ -3057,20 +3057,20 @@ var no = [], ro = { initializeByDefault: !0 }, io = {
|
|
|
3057
3057
|
};
|
|
3058
3058
|
function ao(e) {
|
|
3059
3059
|
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;
|
|
3060
|
-
if (t ||= n && n[
|
|
3060
|
+
if (t ||= n && n[Qa], t) {
|
|
3061
3061
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
3062
|
-
window.CustomEvent && !
|
|
3062
|
+
window.CustomEvent && !Ca && !wa ? h = new CustomEvent(r, {
|
|
3063
3063
|
bubbles: !0,
|
|
3064
3064
|
cancelable: !0
|
|
3065
3065
|
}) : (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;
|
|
3066
|
-
var v =
|
|
3066
|
+
var v = ha(ha({}, m), io.getEventProperties(r, t));
|
|
3067
3067
|
for (var y in v) h[y] = v[y];
|
|
3068
3068
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
3069
3069
|
}
|
|
3070
3070
|
}
|
|
3071
3071
|
var oo = ["evt"], H = function(e, t) {
|
|
3072
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
3073
|
-
io.pluginEvent.bind(Q)(e, t,
|
|
3072
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ba(n, oo);
|
|
3073
|
+
io.pluginEvent.bind(Q)(e, t, ha({
|
|
3074
3074
|
dragEl: W,
|
|
3075
3075
|
parentEl: G,
|
|
3076
3076
|
ghostEl: K,
|
|
@@ -3105,7 +3105,7 @@ var oo = ["evt"], H = function(e, t) {
|
|
|
3105
3105
|
}, i));
|
|
3106
3106
|
};
|
|
3107
3107
|
function U(e) {
|
|
3108
|
-
ao(
|
|
3108
|
+
ao(ha({
|
|
3109
3109
|
putSortable: X,
|
|
3110
3110
|
cloneEl: J,
|
|
3111
3111
|
targetEl: W,
|
|
@@ -3116,14 +3116,14 @@ function U(e) {
|
|
|
3116
3116
|
newDraggableIndex: po
|
|
3117
3117
|
}, e));
|
|
3118
3118
|
}
|
|
3119
|
-
var W, G, K, q, so, co, J, lo, uo, Y, fo, po, mo, X, ho = !1, go = !1, _o = [], vo, yo, bo, xo, So, Co, wo, To, Eo, Do = !1, Oo = !1, ko, Z, Ao = [], jo = !1, Mo = [], No = typeof document < "u", Po =
|
|
3119
|
+
var W, G, K, q, so, co, J, lo, uo, Y, fo, po, mo, X, ho = !1, go = !1, _o = [], vo, yo, bo, xo, So, Co, wo, To, Eo, Do = !1, Oo = !1, ko, Z, Ao = [], jo = !1, Mo = [], No = typeof document < "u", Po = Da, Fo = wa || Ca ? "cssFloat" : "float", Io = No && !Oa && !Da && "draggable" in document.createElement("div"), Lo = function() {
|
|
3120
3120
|
if (No) {
|
|
3121
|
-
if (
|
|
3121
|
+
if (Ca) return !1;
|
|
3122
3122
|
var e = document.createElement("x");
|
|
3123
3123
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3124
3124
|
}
|
|
3125
3125
|
}(), Ro = function(e, t) {
|
|
3126
|
-
var n =
|
|
3126
|
+
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ra(e, 0, t), a = Ra(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;
|
|
3127
3127
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3128
3128
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3129
3129
|
if (i && o.float && o.float !== "none") {
|
|
@@ -3137,9 +3137,9 @@ var W, G, K, q, so, co, J, lo, uo, Y, fo, po, mo, X, ho = !1, go = !1, _o = [],
|
|
|
3137
3137
|
}, Bo = function(e, t) {
|
|
3138
3138
|
var n;
|
|
3139
3139
|
return _o.some(function(r) {
|
|
3140
|
-
var i = r[
|
|
3141
|
-
if (!(!i ||
|
|
3142
|
-
var a =
|
|
3140
|
+
var i = r[Qa].options.emptyInsertThreshold;
|
|
3141
|
+
if (!(!i || za(r))) {
|
|
3142
|
+
var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3143
3143
|
if (o && s) return n = r;
|
|
3144
3144
|
}
|
|
3145
3145
|
}), n;
|
|
@@ -3156,13 +3156,13 @@ var W, G, K, q, so, co, J, lo, uo, Y, fo, po, mo, X, ho = !1, go = !1, _o = [],
|
|
|
3156
3156
|
};
|
|
3157
3157
|
}
|
|
3158
3158
|
var n = {}, r = e.group;
|
|
3159
|
-
(!r ||
|
|
3159
|
+
(!r || ga(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;
|
|
3160
3160
|
}, Ho = function() {
|
|
3161
|
-
!Lo && K &&
|
|
3161
|
+
!Lo && K && B(K, "display", "none");
|
|
3162
3162
|
}, Uo = function() {
|
|
3163
|
-
!Lo && K &&
|
|
3163
|
+
!Lo && K && B(K, "display", "");
|
|
3164
3164
|
};
|
|
3165
|
-
No && !
|
|
3165
|
+
No && !Oa && document.addEventListener("click", function(e) {
|
|
3166
3166
|
if (go) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), go = !1, !1;
|
|
3167
3167
|
}, !0);
|
|
3168
3168
|
var Wo = function(e) {
|
|
@@ -3172,15 +3172,15 @@ var Wo = function(e) {
|
|
|
3172
3172
|
if (t) {
|
|
3173
3173
|
var n = {};
|
|
3174
3174
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3175
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3175
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[Qa]._onDragOver(n);
|
|
3176
3176
|
}
|
|
3177
3177
|
}
|
|
3178
3178
|
}, Go = function(e) {
|
|
3179
|
-
W && W.parentNode[
|
|
3179
|
+
W && W.parentNode[Qa]._isOutsideThisEl(e.target);
|
|
3180
3180
|
};
|
|
3181
3181
|
function Q(e, t) {
|
|
3182
3182
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3183
|
-
this.el = e, this.options = t =
|
|
3183
|
+
this.el = e, this.options = t = va({}, t), e[Qa] = this;
|
|
3184
3184
|
var n = {
|
|
3185
3185
|
group: null,
|
|
3186
3186
|
sort: !0,
|
|
@@ -3220,12 +3220,12 @@ function Q(e, t) {
|
|
|
3220
3220
|
x: 0,
|
|
3221
3221
|
y: 0
|
|
3222
3222
|
},
|
|
3223
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3223
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Ea,
|
|
3224
3224
|
emptyInsertThreshold: 5
|
|
3225
3225
|
};
|
|
3226
3226
|
for (var r in io.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3227
3227
|
for (var i in Vo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3228
|
-
this.nativeDraggable = !t.forceFallback && Io, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ?
|
|
3228
|
+
this.nativeDraggable = !t.forceFallback && Io, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), _o.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), va(this, $a());
|
|
3229
3229
|
}
|
|
3230
3230
|
Q.prototype = {
|
|
3231
3231
|
constructor: Q,
|
|
@@ -3238,8 +3238,8 @@ Q.prototype = {
|
|
|
3238
3238
|
_onTapStart: function(e) {
|
|
3239
3239
|
if (e.cancelable) {
|
|
3240
3240
|
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;
|
|
3241
|
-
if (ts(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable &&
|
|
3242
|
-
if (uo =
|
|
3241
|
+
if (ts(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ea && s && s.tagName.toUpperCase() === "SELECT") && (s = Ma(s, r.draggable, n, !1), !(s && s.animated) && co !== s)) {
|
|
3242
|
+
if (uo = Ba(s), fo = Ba(s, r.draggable), typeof l == "function") {
|
|
3243
3243
|
if (l.call(this, e, s, this)) {
|
|
3244
3244
|
U({
|
|
3245
3245
|
sortable: t,
|
|
@@ -3252,7 +3252,7 @@ Q.prototype = {
|
|
|
3252
3252
|
return;
|
|
3253
3253
|
}
|
|
3254
3254
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3255
|
-
if (r =
|
|
3255
|
+
if (r = Ma(c, r.trim(), n, !1), r) return U({
|
|
3256
3256
|
sortable: t,
|
|
3257
3257
|
rootEl: r,
|
|
3258
3258
|
name: "filter",
|
|
@@ -3264,14 +3264,14 @@ Q.prototype = {
|
|
|
3264
3264
|
i && e.cancelable && e.preventDefault();
|
|
3265
3265
|
return;
|
|
3266
3266
|
}
|
|
3267
|
-
r.handle && !
|
|
3267
|
+
r.handle && !Ma(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3268
3268
|
}
|
|
3269
3269
|
}
|
|
3270
3270
|
},
|
|
3271
3271
|
_prepareDragStart: function(e, t, n) {
|
|
3272
3272
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3273
3273
|
if (n && !W && n.parentNode === i) {
|
|
3274
|
-
var c =
|
|
3274
|
+
var c = V(n);
|
|
3275
3275
|
if (q = i, W = n, G = W.parentNode, so = W.nextSibling, co = n, mo = a.group, Q.dragged = W, vo = {
|
|
3276
3276
|
target: W,
|
|
3277
3277
|
clientX: (t || e).clientX,
|
|
@@ -3281,19 +3281,19 @@ Q.prototype = {
|
|
|
3281
3281
|
r._onDrop();
|
|
3282
3282
|
return;
|
|
3283
3283
|
}
|
|
3284
|
-
r._disableDelayedDragEvents(), !
|
|
3284
|
+
r._disableDelayedDragEvents(), !Ta && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
3285
3285
|
sortable: r,
|
|
3286
3286
|
name: "choose",
|
|
3287
3287
|
originalEvent: e
|
|
3288
|
-
}),
|
|
3288
|
+
}), z(W, a.chosenClass, !0);
|
|
3289
3289
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3290
|
-
|
|
3291
|
-
}),
|
|
3290
|
+
Fa(W, e.trim(), Jo);
|
|
3291
|
+
}), L(o, "dragover", Wo), L(o, "mousemove", Wo), L(o, "touchmove", Wo), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), Ta && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(wa || Ca))) {
|
|
3292
3292
|
if (Q.eventCanceled) {
|
|
3293
3293
|
this._onDrop();
|
|
3294
3294
|
return;
|
|
3295
3295
|
}
|
|
3296
|
-
|
|
3296
|
+
L(o, "mouseup", r._disableDelayedDrag), L(o, "touchend", r._disableDelayedDrag), L(o, "touchcancel", r._disableDelayedDrag), L(o, "mousemove", r._delayedDragTouchMoveHandler), L(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && L(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
3297
3297
|
} else s();
|
|
3298
3298
|
}
|
|
3299
3299
|
},
|
|
@@ -3306,10 +3306,10 @@ Q.prototype = {
|
|
|
3306
3306
|
},
|
|
3307
3307
|
_disableDelayedDragEvents: function() {
|
|
3308
3308
|
var e = this.el.ownerDocument;
|
|
3309
|
-
|
|
3309
|
+
R(e, "mouseup", this._disableDelayedDrag), R(e, "touchend", this._disableDelayedDrag), R(e, "touchcancel", this._disableDelayedDrag), R(e, "mousemove", this._delayedDragTouchMoveHandler), R(e, "touchmove", this._delayedDragTouchMoveHandler), R(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3310
3310
|
},
|
|
3311
3311
|
_triggerDragStart: function(e, t) {
|
|
3312
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
3312
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(W, "dragend", this), L(q, "dragstart", this._onDragStart));
|
|
3313
3313
|
try {
|
|
3314
3314
|
document.selection ? ns(function() {
|
|
3315
3315
|
document.selection.empty();
|
|
@@ -3318,9 +3318,9 @@ Q.prototype = {
|
|
|
3318
3318
|
},
|
|
3319
3319
|
_dragStarted: function(e, t) {
|
|
3320
3320
|
if (ho = !1, q && W) {
|
|
3321
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable &&
|
|
3321
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", Go);
|
|
3322
3322
|
var n = this.options;
|
|
3323
|
-
!e &&
|
|
3323
|
+
!e && z(W, n.dragClass, !1), z(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
3324
3324
|
sortable: this,
|
|
3325
3325
|
name: "start",
|
|
3326
3326
|
originalEvent: t
|
|
@@ -3331,10 +3331,10 @@ Q.prototype = {
|
|
|
3331
3331
|
if (yo) {
|
|
3332
3332
|
this._lastX = yo.clientX, this._lastY = yo.clientY, Ho();
|
|
3333
3333
|
for (var e = document.elementFromPoint(yo.clientX, yo.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(yo.clientX, yo.clientY), e !== t);) t = e;
|
|
3334
|
-
if (W.parentNode[
|
|
3335
|
-
if (t[
|
|
3334
|
+
if (W.parentNode[Qa]._isOutsideThisEl(e), t) do {
|
|
3335
|
+
if (t[Qa]) {
|
|
3336
3336
|
var n = void 0;
|
|
3337
|
-
if (n = t[
|
|
3337
|
+
if (n = t[Qa]._onDragOver({
|
|
3338
3338
|
clientX: yo.clientX,
|
|
3339
3339
|
clientY: yo.clientY,
|
|
3340
3340
|
target: e,
|
|
@@ -3348,7 +3348,7 @@ Q.prototype = {
|
|
|
3348
3348
|
},
|
|
3349
3349
|
_onTouchMove: function(e) {
|
|
3350
3350
|
if (vo) {
|
|
3351
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
3351
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && Pa(K, !0), o = K && a && a.a, s = K && a && a.d, c = Po && Z && Va(Z), l = (i.clientX - vo.clientX + r.x) / (o || 1) + (c ? c[0] - Ao[0] : 0) / (o || 1), u = (i.clientY - vo.clientY + r.y) / (s || 1) + (c ? c[1] - Ao[1] : 0) / (s || 1);
|
|
3352
3352
|
if (!Q.active && !ho) {
|
|
3353
3353
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3354
3354
|
this._onDragStart(e, !0);
|
|
@@ -3363,19 +3363,19 @@ Q.prototype = {
|
|
|
3363
3363
|
f: u
|
|
3364
3364
|
};
|
|
3365
3365
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3366
|
-
|
|
3366
|
+
B(K, "webkitTransform", d), B(K, "mozTransform", d), B(K, "msTransform", d), B(K, "transform", d), bo = l, xo = u, yo = i;
|
|
3367
3367
|
}
|
|
3368
3368
|
e.cancelable && e.preventDefault();
|
|
3369
3369
|
}
|
|
3370
3370
|
},
|
|
3371
3371
|
_appendGhost: function() {
|
|
3372
3372
|
if (!K) {
|
|
3373
|
-
var e = this.options.fallbackOnBody ? document.body : q, t =
|
|
3373
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = V(W, !0, Po, !0, e), n = this.options;
|
|
3374
3374
|
if (Po) {
|
|
3375
|
-
for (Z = e;
|
|
3376
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3375
|
+
for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3376
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Ia()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Ia(), Ao = Va(Z);
|
|
3377
3377
|
}
|
|
3378
|
-
K = W.cloneNode(!0),
|
|
3378
|
+
K = W.cloneNode(!0), z(K, n.ghostClass, !1), z(K, n.fallbackClass, !0), z(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", Po ? "absolute" : "fixed"), B(K, "zIndex", "100000"), B(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), B(K, "transform-origin", So / parseInt(K.style.width) * 100 + "% " + Co / parseInt(K.style.height) * 100 + "%");
|
|
3379
3379
|
}
|
|
3380
3380
|
},
|
|
3381
3381
|
_onDragStart: function(e, t) {
|
|
@@ -3384,18 +3384,18 @@ Q.prototype = {
|
|
|
3384
3384
|
this._onDrop();
|
|
3385
3385
|
return;
|
|
3386
3386
|
}
|
|
3387
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
3387
|
+
H("setupClone", this), Q.eventCanceled || (J = Xa(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), z(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = ns(function() {
|
|
3388
3388
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
3389
3389
|
sortable: n,
|
|
3390
3390
|
name: "clone"
|
|
3391
3391
|
}));
|
|
3392
|
-
}), !t &&
|
|
3392
|
+
}), !t && z(W, i.dragClass, !0), t ? (go = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), L(document, "drop", n), B(W, "transform", "translateZ(0)")), ho = !0, n._dragStartId = ns(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), wo = !0, Ea && B(document.body, "user-select", "none");
|
|
3393
3393
|
},
|
|
3394
3394
|
_onDragOver: function(e) {
|
|
3395
3395
|
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = mo === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3396
3396
|
if (jo) return;
|
|
3397
3397
|
function h(o, s) {
|
|
3398
|
-
H(o, p,
|
|
3398
|
+
H(o, p, ha({
|
|
3399
3399
|
evt: e,
|
|
3400
3400
|
isOwner: l,
|
|
3401
3401
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3407,7 +3407,7 @@ Q.prototype = {
|
|
|
3407
3407
|
target: n,
|
|
3408
3408
|
completed: _,
|
|
3409
3409
|
onMove: function(n, i) {
|
|
3410
|
-
return qo(q, t, W, r, n,
|
|
3410
|
+
return qo(q, t, W, r, n, V(n), e, i);
|
|
3411
3411
|
},
|
|
3412
3412
|
changed: v
|
|
3413
3413
|
}, s));
|
|
@@ -3416,12 +3416,12 @@ Q.prototype = {
|
|
|
3416
3416
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3417
3417
|
}
|
|
3418
3418
|
function _(r) {
|
|
3419
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3419
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(W, X ? X.options.ghostClass : c.options.ghostClass, !1), z(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() {
|
|
3420
3420
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3421
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (To = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[
|
|
3421
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (To = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[Qa]._isOutsideThisEl(e.target), !r && Wo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3422
3422
|
}
|
|
3423
3423
|
function v() {
|
|
3424
|
-
Y =
|
|
3424
|
+
Y = Ba(W), po = Ba(W, o.draggable), U({
|
|
3425
3425
|
sortable: p,
|
|
3426
3426
|
name: "change",
|
|
3427
3427
|
toEl: t,
|
|
@@ -3430,36 +3430,36 @@ Q.prototype = {
|
|
|
3430
3430
|
originalEvent: e
|
|
3431
3431
|
});
|
|
3432
3432
|
}
|
|
3433
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3433
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ma(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3434
3434
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3435
3435
|
if (go = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = mo.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
3436
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
3436
|
+
if (f = this._getDirection(e, n) === "vertical", r = V(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3437
3437
|
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (so ? q.insertBefore(W, so) : q.appendChild(W)), _(!0);
|
|
3438
|
-
var y =
|
|
3438
|
+
var y = za(t, o.draggable);
|
|
3439
3439
|
if (!y || Zo(e, f, this) && !y.animated) {
|
|
3440
3440
|
if (y === W) return _(!1);
|
|
3441
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
3441
|
+
if (y && t === e.target && (n = y), n && (i = V(n)), qo(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);
|
|
3442
3442
|
} else if (y && Xo(e, f, this)) {
|
|
3443
|
-
var b =
|
|
3443
|
+
var b = Ra(t, 0, o, !0);
|
|
3444
3444
|
if (b === W) return _(!1);
|
|
3445
|
-
if (n = b, i =
|
|
3445
|
+
if (n = b, i = V(n), qo(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
3446
3446
|
} else if (n.parentNode === t) {
|
|
3447
|
-
i =
|
|
3448
|
-
var x = 0, S, C = W.parentNode !== t, w = !zo(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E =
|
|
3447
|
+
i = V(n);
|
|
3448
|
+
var x = 0, S, C = W.parentNode !== t, w = !zo(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = La(n, "top", "top") || La(W, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3449
3449
|
To !== n && (S = i[T], Do = !1, Oo = !w && o.invertSwap || C), x = Qo(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Oo, To === n);
|
|
3450
3450
|
var O;
|
|
3451
3451
|
if (x !== 0) {
|
|
3452
|
-
var k =
|
|
3452
|
+
var k = Ba(W);
|
|
3453
3453
|
do
|
|
3454
3454
|
k -= x, O = G.children[k];
|
|
3455
|
-
while (O && (
|
|
3455
|
+
while (O && (B(O, "display") === "none" || O === K));
|
|
3456
3456
|
}
|
|
3457
3457
|
if (x === 0 || O === n) return _(!1);
|
|
3458
3458
|
To = n, Eo = x;
|
|
3459
3459
|
var A = n.nextElementSibling, j = !1;
|
|
3460
3460
|
j = x === 1;
|
|
3461
3461
|
var ee = qo(q, t, W, r, n, i, e, j);
|
|
3462
|
-
if (ee !== !1) return (ee === 1 || ee === -1) && (j = ee === 1), jo = !0, setTimeout(Yo, 30), g(), j && !A ? t.appendChild(W) : n.parentNode.insertBefore(W, j ? A : n), E &&
|
|
3462
|
+
if (ee !== !1) return (ee === 1 || ee === -1) && (j = ee === 1), jo = !0, setTimeout(Yo, 30), g(), j && !A ? t.appendChild(W) : n.parentNode.insertBefore(W, j ? A : n), E && Ya(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !Oo && (ko = Math.abs(S - V(n)[T])), v(), _(!0);
|
|
3463
3463
|
}
|
|
3464
3464
|
if (t.contains(W)) return _(!1);
|
|
3465
3465
|
}
|
|
@@ -3467,19 +3467,19 @@ Q.prototype = {
|
|
|
3467
3467
|
},
|
|
3468
3468
|
_ignoreWhileAnimating: null,
|
|
3469
3469
|
_offMoveEvents: function() {
|
|
3470
|
-
|
|
3470
|
+
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", Wo), R(document, "mousemove", Wo), R(document, "touchmove", Wo);
|
|
3471
3471
|
},
|
|
3472
3472
|
_offUpEvents: function() {
|
|
3473
3473
|
var e = this.el.ownerDocument;
|
|
3474
|
-
|
|
3474
|
+
R(e, "mouseup", this._onDrop), R(e, "touchend", this._onDrop), R(e, "pointerup", this._onDrop), R(e, "touchcancel", this._onDrop), R(document, "selectstart", this);
|
|
3475
3475
|
},
|
|
3476
3476
|
_onDrop: function(e) {
|
|
3477
3477
|
var t = this.el, n = this.options;
|
|
3478
|
-
if (Y =
|
|
3478
|
+
if (Y = Ba(W), po = Ba(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = Ba(W), po = Ba(W, n.draggable), Q.eventCanceled) {
|
|
3479
3479
|
this._nulling();
|
|
3480
3480
|
return;
|
|
3481
3481
|
}
|
|
3482
|
-
ho = !1, Oo = !1, Do = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), rs(this.cloneId), rs(this._dragStartId), this.nativeDraggable && (
|
|
3482
|
+
ho = !1, Oo = !1, Do = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), rs(this.cloneId), rs(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ea && B(document.body, "user-select", ""), B(W, "transform", ""), e && (wo && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && R(W, "dragend", this), Jo(W), W.style["will-change"] = "", wo && !ho && z(W, X ? X.options.ghostClass : this.options.ghostClass, !1), z(W, this.options.chosenClass, !1), U({
|
|
3483
3483
|
sortable: this,
|
|
3484
3484
|
name: "unchoose",
|
|
3485
3485
|
toEl: G,
|
|
@@ -3540,20 +3540,18 @@ Q.prototype = {
|
|
|
3540
3540
|
case "dragover":
|
|
3541
3541
|
W && (this._onDragOver(e), Ko(e));
|
|
3542
3542
|
break;
|
|
3543
|
-
case "selectstart":
|
|
3544
|
-
e.preventDefault();
|
|
3545
|
-
break;
|
|
3543
|
+
case "selectstart": e.preventDefault();
|
|
3546
3544
|
}
|
|
3547
3545
|
},
|
|
3548
3546
|
toArray: function() {
|
|
3549
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3547
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ma(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || es(t));
|
|
3550
3548
|
return e;
|
|
3551
3549
|
},
|
|
3552
3550
|
sort: function(e, t) {
|
|
3553
3551
|
var n = {}, r = this.el;
|
|
3554
3552
|
this.toArray().forEach(function(e, t) {
|
|
3555
3553
|
var i = r.children[t];
|
|
3556
|
-
|
|
3554
|
+
Ma(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3557
3555
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3558
3556
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3559
3557
|
}), t && this.animateAll();
|
|
@@ -3563,25 +3561,25 @@ Q.prototype = {
|
|
|
3563
3561
|
e && e.set && e.set(this);
|
|
3564
3562
|
},
|
|
3565
3563
|
closest: function(e, t) {
|
|
3566
|
-
return
|
|
3564
|
+
return Ma(e, t || this.options.draggable, this.el, !1);
|
|
3567
3565
|
},
|
|
3568
3566
|
option: function(e, t) {
|
|
3569
3567
|
var n = this.options;
|
|
3570
3568
|
if (t === void 0) return n[e];
|
|
3571
3569
|
var r = io.modifyOption(this, e, t);
|
|
3572
|
-
r === void 0 ?
|
|
3570
|
+
n[e] = r === void 0 ? t : r, e === "group" && Vo(n);
|
|
3573
3571
|
},
|
|
3574
3572
|
destroy: function() {
|
|
3575
3573
|
H("destroy", this);
|
|
3576
3574
|
var e = this.el;
|
|
3577
|
-
e[
|
|
3575
|
+
e[Qa] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3578
3576
|
e.removeAttribute("draggable");
|
|
3579
3577
|
}), this._onDrop(), this._disableDelayedDragEvents(), _o.splice(_o.indexOf(this.el), 1), this.el = e = null;
|
|
3580
3578
|
},
|
|
3581
3579
|
_hideClone: function() {
|
|
3582
3580
|
if (!lo) {
|
|
3583
3581
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3584
|
-
|
|
3582
|
+
B(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), lo = !0;
|
|
3585
3583
|
}
|
|
3586
3584
|
},
|
|
3587
3585
|
_showClone: function(e) {
|
|
@@ -3591,7 +3589,7 @@ Q.prototype = {
|
|
|
3591
3589
|
}
|
|
3592
3590
|
if (lo) {
|
|
3593
3591
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
3594
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : so ? q.insertBefore(J, so) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J),
|
|
3592
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : so ? q.insertBefore(J, so) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), B(J, "display", ""), lo = !1;
|
|
3595
3593
|
}
|
|
3596
3594
|
}
|
|
3597
3595
|
};
|
|
@@ -3599,11 +3597,11 @@ function Ko(e) {
|
|
|
3599
3597
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3600
3598
|
}
|
|
3601
3599
|
function qo(e, t, n, r, i, a, o, s) {
|
|
3602
|
-
var c, l = e[
|
|
3603
|
-
return window.CustomEvent && !
|
|
3600
|
+
var c, l = e[Qa], u = l.options.onMove, d;
|
|
3601
|
+
return window.CustomEvent && !Ca && !wa ? c = new CustomEvent("move", {
|
|
3604
3602
|
bubbles: !0,
|
|
3605
3603
|
cancelable: !0
|
|
3606
|
-
}) : (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 ||
|
|
3604
|
+
}) : (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;
|
|
3607
3605
|
}
|
|
3608
3606
|
function Jo(e) {
|
|
3609
3607
|
e.draggable = !1;
|
|
@@ -3612,11 +3610,11 @@ function Yo() {
|
|
|
3612
3610
|
jo = !1;
|
|
3613
3611
|
}
|
|
3614
3612
|
function Xo(e, t, n) {
|
|
3615
|
-
var r =
|
|
3613
|
+
var r = V(Ra(n.el, 0, n.options, !0)), i = Za(n.el, n.options, K), a = 10;
|
|
3616
3614
|
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;
|
|
3617
3615
|
}
|
|
3618
3616
|
function Zo(e, t, n) {
|
|
3619
|
-
var r =
|
|
3617
|
+
var r = V(za(n.el, n.options.draggable)), i = Za(n.el, n.options, K), a = 10;
|
|
3620
3618
|
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;
|
|
3621
3619
|
}
|
|
3622
3620
|
function Qo(e, t, n, r, i, a, o, s) {
|
|
@@ -3630,7 +3628,7 @@ function Qo(e, t, n, r, i, a, o, s) {
|
|
|
3630
3628
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3631
3629
|
}
|
|
3632
3630
|
function $o(e) {
|
|
3633
|
-
return
|
|
3631
|
+
return Ba(W) < Ba(e) ? 1 : -1;
|
|
3634
3632
|
}
|
|
3635
3633
|
function es(e) {
|
|
3636
3634
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
@@ -3649,37 +3647,37 @@ function ns(e) {
|
|
|
3649
3647
|
function rs(e) {
|
|
3650
3648
|
return clearTimeout(e);
|
|
3651
3649
|
}
|
|
3652
|
-
No &&
|
|
3650
|
+
No && L(document, "touchmove", function(e) {
|
|
3653
3651
|
(Q.active || ho) && e.cancelable && e.preventDefault();
|
|
3654
3652
|
}), Q.utils = {
|
|
3655
|
-
on:
|
|
3656
|
-
off:
|
|
3657
|
-
css:
|
|
3658
|
-
find:
|
|
3653
|
+
on: L,
|
|
3654
|
+
off: R,
|
|
3655
|
+
css: B,
|
|
3656
|
+
find: Fa,
|
|
3659
3657
|
is: function(e, t) {
|
|
3660
|
-
return !!
|
|
3658
|
+
return !!Ma(e, t, e, !1);
|
|
3661
3659
|
},
|
|
3662
|
-
extend:
|
|
3663
|
-
throttle:
|
|
3664
|
-
closest:
|
|
3665
|
-
toggleClass:
|
|
3666
|
-
clone:
|
|
3667
|
-
index:
|
|
3660
|
+
extend: Wa,
|
|
3661
|
+
throttle: qa,
|
|
3662
|
+
closest: Ma,
|
|
3663
|
+
toggleClass: z,
|
|
3664
|
+
clone: Xa,
|
|
3665
|
+
index: Ba,
|
|
3668
3666
|
nextTick: ns,
|
|
3669
3667
|
cancelNextTick: rs,
|
|
3670
3668
|
detectDirection: Ro,
|
|
3671
|
-
getChild:
|
|
3669
|
+
getChild: Ra
|
|
3672
3670
|
}, Q.get = function(e) {
|
|
3673
|
-
return e[
|
|
3671
|
+
return e[Qa];
|
|
3674
3672
|
}, Q.mount = function() {
|
|
3675
3673
|
var e = [...arguments];
|
|
3676
3674
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3677
3675
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3678
|
-
e.utils && (Q.utils =
|
|
3676
|
+
e.utils && (Q.utils = ha(ha({}, Q.utils), e.utils)), io.mount(e);
|
|
3679
3677
|
});
|
|
3680
3678
|
}, Q.create = function(e, t) {
|
|
3681
3679
|
return new Q(e, t);
|
|
3682
|
-
}, Q.version =
|
|
3680
|
+
}, Q.version = xa;
|
|
3683
3681
|
var $ = [], is, as, os = !1, ss, cs, ls, us;
|
|
3684
3682
|
function ds() {
|
|
3685
3683
|
function e() {
|
|
@@ -3694,14 +3692,14 @@ function ds() {
|
|
|
3694
3692
|
return e.prototype = {
|
|
3695
3693
|
dragStarted: function(e) {
|
|
3696
3694
|
var t = e.originalEvent;
|
|
3697
|
-
this.sortable.nativeDraggable ?
|
|
3695
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? L(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? L(document, "touchmove", this._handleFallbackAutoScroll) : L(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3698
3696
|
},
|
|
3699
3697
|
dragOverCompleted: function(e) {
|
|
3700
3698
|
var t = e.originalEvent;
|
|
3701
3699
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3702
3700
|
},
|
|
3703
3701
|
drop: function() {
|
|
3704
|
-
this.sortable.nativeDraggable ?
|
|
3702
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), ps(), fs(), Ja();
|
|
3705
3703
|
},
|
|
3706
3704
|
nulling: function() {
|
|
3707
3705
|
ls = as = is = os = us = ss = cs = null, $.length = 0;
|
|
@@ -3711,22 +3709,22 @@ function ds() {
|
|
|
3711
3709
|
},
|
|
3712
3710
|
_handleAutoScroll: function(e, t) {
|
|
3713
3711
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3714
|
-
if (ls = e, t || this.options.forceAutoScrollFallback ||
|
|
3712
|
+
if (ls = e, t || this.options.forceAutoScrollFallback || wa || Ca || Ea) {
|
|
3715
3713
|
ms(e, this.options, a, t);
|
|
3716
|
-
var o =
|
|
3714
|
+
var o = Ua(a, !0);
|
|
3717
3715
|
os && (!us || r !== ss || i !== cs) && (us && ps(), us = setInterval(function() {
|
|
3718
|
-
var a =
|
|
3716
|
+
var a = Ua(document.elementFromPoint(r, i), !0);
|
|
3719
3717
|
a !== o && (o = a, fs()), ms(e, n.options, a, t);
|
|
3720
3718
|
}, 10), ss = r, cs = i);
|
|
3721
3719
|
} else {
|
|
3722
|
-
if (!this.options.bubbleScroll ||
|
|
3720
|
+
if (!this.options.bubbleScroll || Ua(a, !0) === Ia()) {
|
|
3723
3721
|
fs();
|
|
3724
3722
|
return;
|
|
3725
3723
|
}
|
|
3726
|
-
ms(e, this.options,
|
|
3724
|
+
ms(e, this.options, Ua(a, !1), !1);
|
|
3727
3725
|
}
|
|
3728
3726
|
}
|
|
3729
|
-
},
|
|
3727
|
+
}, va(e, {
|
|
3730
3728
|
pluginName: "scroll",
|
|
3731
3729
|
initializeByDefault: !0
|
|
3732
3730
|
});
|
|
@@ -3739,22 +3737,22 @@ function fs() {
|
|
|
3739
3737
|
function ps() {
|
|
3740
3738
|
clearInterval(us);
|
|
3741
3739
|
}
|
|
3742
|
-
var ms =
|
|
3740
|
+
var ms = qa(function(e, t, n, r) {
|
|
3743
3741
|
if (t.scroll) {
|
|
3744
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3745
|
-
as !== n && (as = n, fs(), is = t.scroll, u = t.scrollFn, is === !0 && (is =
|
|
3742
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Ia(), l = !1, u;
|
|
3743
|
+
as !== n && (as = n, fs(), is = t.scroll, u = t.scrollFn, is === !0 && (is = Ua(n, !0)));
|
|
3746
3744
|
var d = 0, f = is;
|
|
3747
3745
|
do {
|
|
3748
|
-
var p = f, m =
|
|
3746
|
+
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;
|
|
3749
3747
|
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"));
|
|
3750
3748
|
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);
|
|
3751
3749
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3752
3750
|
($[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() {
|
|
3753
3751
|
r && this.layer === 0 && Q.active._onTouchMove(ls);
|
|
3754
3752
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3755
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3753
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[Qa], n, t, e, ls, $[this.layer].el) !== "continue" || Ya($[this.layer].el, n, t);
|
|
3756
3754
|
}.bind({ layer: d }), 24))), d++;
|
|
3757
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3755
|
+
} while (t.bubbleScroll && f !== c && (f = Ua(f, !1)));
|
|
3758
3756
|
os = l;
|
|
3759
3757
|
}
|
|
3760
3758
|
}, 30), hs = function(e) {
|
|
@@ -3779,11 +3777,11 @@ gs.prototype = {
|
|
|
3779
3777
|
onSpill: function(e) {
|
|
3780
3778
|
var t = e.dragEl, n = e.putSortable;
|
|
3781
3779
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3782
|
-
var r =
|
|
3780
|
+
var r = Ra(this.sortable.el, this.startIndex, this.options);
|
|
3783
3781
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3784
3782
|
},
|
|
3785
3783
|
drop: hs
|
|
3786
|
-
},
|
|
3784
|
+
}, va(gs, { pluginName: "revertOnSpill" });
|
|
3787
3785
|
function _s() {}
|
|
3788
3786
|
_s.prototype = {
|
|
3789
3787
|
onSpill: function(e) {
|
|
@@ -3791,7 +3789,7 @@ _s.prototype = {
|
|
|
3791
3789
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3792
3790
|
},
|
|
3793
3791
|
drop: hs
|
|
3794
|
-
},
|
|
3792
|
+
}, va(_s, { pluginName: "removeOnSpill" }), Q.mount(new ds()), Q.mount(_s, gs);
|
|
3795
3793
|
function vs(e) {
|
|
3796
3794
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3797
3795
|
}
|
|
@@ -3824,27 +3822,27 @@ function Es(...e) {
|
|
|
3824
3822
|
}
|
|
3825
3823
|
function m(e) {
|
|
3826
3824
|
let t = e.item[Ts];
|
|
3827
|
-
if (!
|
|
3828
|
-
if (
|
|
3825
|
+
if (!ra(t)) {
|
|
3826
|
+
if (oa(e.item), g(i)) {
|
|
3829
3827
|
let n = [...k(i)];
|
|
3830
|
-
i.value =
|
|
3828
|
+
i.value = na(n, e.newDraggableIndex, t);
|
|
3831
3829
|
return;
|
|
3832
3830
|
}
|
|
3833
|
-
|
|
3831
|
+
na(k(i), e.newDraggableIndex, t);
|
|
3834
3832
|
}
|
|
3835
3833
|
}
|
|
3836
3834
|
function h(e) {
|
|
3837
3835
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3838
|
-
if (
|
|
3839
|
-
|
|
3836
|
+
if (aa(t, n, r), o === "clone") {
|
|
3837
|
+
oa(s);
|
|
3840
3838
|
return;
|
|
3841
3839
|
}
|
|
3842
3840
|
if (g(i)) {
|
|
3843
3841
|
let e = [...k(i)];
|
|
3844
|
-
i.value =
|
|
3842
|
+
i.value = ta(e, a);
|
|
3845
3843
|
return;
|
|
3846
3844
|
}
|
|
3847
|
-
|
|
3845
|
+
ta(k(i), a);
|
|
3848
3846
|
}
|
|
3849
3847
|
function _(e) {
|
|
3850
3848
|
if (f) {
|
|
@@ -3852,12 +3850,12 @@ function Es(...e) {
|
|
|
3852
3850
|
return;
|
|
3853
3851
|
}
|
|
3854
3852
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3855
|
-
if (
|
|
3853
|
+
if (oa(n), aa(t, n, r), g(i)) {
|
|
3856
3854
|
let e = [...k(i)];
|
|
3857
|
-
i.value =
|
|
3855
|
+
i.value = Qi(e, a, o);
|
|
3858
3856
|
return;
|
|
3859
3857
|
}
|
|
3860
|
-
|
|
3858
|
+
Qi(k(i), a, o);
|
|
3861
3859
|
}
|
|
3862
3860
|
function v(e) {
|
|
3863
3861
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3888,19 +3886,19 @@ function Es(...e) {
|
|
|
3888
3886
|
};
|
|
3889
3887
|
function b(e) {
|
|
3890
3888
|
let n = k(r);
|
|
3891
|
-
return e ||=
|
|
3889
|
+
return e ||= ia(n) ? sa(n, t?.$el) : n, e && !ua(e) && (e = e.$el), e || Zi("Root element not found"), e;
|
|
3892
3890
|
}
|
|
3893
3891
|
function x() {
|
|
3894
|
-
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3895
|
-
return
|
|
3896
|
-
|
|
3897
|
-
}),
|
|
3892
|
+
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = Ji(e, ["immediate", "clone"]);
|
|
3893
|
+
return da(r, (e, t) => {
|
|
3894
|
+
fa(e) && (r[e] = (e, ...n) => (pa(e, ws()), t(e, ...n)));
|
|
3895
|
+
}), la(i === null ? {} : y, r);
|
|
3898
3896
|
}
|
|
3899
3897
|
let S = (e) => {
|
|
3900
3898
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3901
3899
|
};
|
|
3902
3900
|
c(() => a, () => {
|
|
3903
|
-
o &&
|
|
3901
|
+
o && da(x(), (e, t) => {
|
|
3904
3902
|
o?.option(e, t);
|
|
3905
3903
|
});
|
|
3906
3904
|
}, { deep: !0 });
|
|
@@ -3915,7 +3913,7 @@ function Es(...e) {
|
|
|
3915
3913
|
};
|
|
3916
3914
|
return bs(() => {
|
|
3917
3915
|
s && S();
|
|
3918
|
-
}), ys(C.destroy),
|
|
3916
|
+
}), ys(C.destroy), qi({
|
|
3919
3917
|
start: S,
|
|
3920
3918
|
pause: () => C?.option("disabled", !0),
|
|
3921
3919
|
resume: () => C?.option("disabled", !1)
|
|
@@ -3934,87 +3932,87 @@ var Ds = [
|
|
|
3934
3932
|
"clone",
|
|
3935
3933
|
"move",
|
|
3936
3934
|
"change"
|
|
3937
|
-
], Os =
|
|
3935
|
+
], Os = [
|
|
3936
|
+
"clone",
|
|
3937
|
+
"animation",
|
|
3938
|
+
"ghostClass",
|
|
3939
|
+
"group",
|
|
3940
|
+
"sort",
|
|
3941
|
+
"disabled",
|
|
3942
|
+
"store",
|
|
3943
|
+
"handle",
|
|
3944
|
+
"draggable",
|
|
3945
|
+
"swapThreshold",
|
|
3946
|
+
"invertSwap",
|
|
3947
|
+
"invertedSwapThreshold",
|
|
3948
|
+
"removeCloneOnHide",
|
|
3949
|
+
"direction",
|
|
3950
|
+
"chosenClass",
|
|
3951
|
+
"dragClass",
|
|
3952
|
+
"ignore",
|
|
3953
|
+
"filter",
|
|
3954
|
+
"preventOnFilter",
|
|
3955
|
+
"easing",
|
|
3956
|
+
"setData",
|
|
3957
|
+
"dropBubble",
|
|
3958
|
+
"dragoverBubble",
|
|
3959
|
+
"dataIdAttr",
|
|
3960
|
+
"delay",
|
|
3961
|
+
"delayOnTouchOnly",
|
|
3962
|
+
"touchStartThreshold",
|
|
3963
|
+
"forceFallback",
|
|
3964
|
+
"fallbackClass",
|
|
3965
|
+
"fallbackOnBody",
|
|
3966
|
+
"fallbackTolerance",
|
|
3967
|
+
"fallbackOffset",
|
|
3968
|
+
"supportPointer",
|
|
3969
|
+
"emptyInsertThreshold",
|
|
3970
|
+
"scroll",
|
|
3971
|
+
"forceAutoScrollFallback",
|
|
3972
|
+
"scrollSensitivity",
|
|
3973
|
+
"scrollSpeed",
|
|
3974
|
+
"bubbleScroll",
|
|
3975
|
+
"modelValue",
|
|
3976
|
+
"tag",
|
|
3977
|
+
"target",
|
|
3978
|
+
"customUpdate",
|
|
3979
|
+
...Ds.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3980
|
+
], ks = y({
|
|
3938
3981
|
name: "VueDraggable",
|
|
3939
3982
|
model: {
|
|
3940
3983
|
prop: "modelValue",
|
|
3941
3984
|
event: "update:modelValue"
|
|
3942
3985
|
},
|
|
3943
|
-
props:
|
|
3944
|
-
"clone",
|
|
3945
|
-
"animation",
|
|
3946
|
-
"ghostClass",
|
|
3947
|
-
"group",
|
|
3948
|
-
"sort",
|
|
3949
|
-
"disabled",
|
|
3950
|
-
"store",
|
|
3951
|
-
"handle",
|
|
3952
|
-
"draggable",
|
|
3953
|
-
"swapThreshold",
|
|
3954
|
-
"invertSwap",
|
|
3955
|
-
"invertedSwapThreshold",
|
|
3956
|
-
"removeCloneOnHide",
|
|
3957
|
-
"direction",
|
|
3958
|
-
"chosenClass",
|
|
3959
|
-
"dragClass",
|
|
3960
|
-
"ignore",
|
|
3961
|
-
"filter",
|
|
3962
|
-
"preventOnFilter",
|
|
3963
|
-
"easing",
|
|
3964
|
-
"setData",
|
|
3965
|
-
"dropBubble",
|
|
3966
|
-
"dragoverBubble",
|
|
3967
|
-
"dataIdAttr",
|
|
3968
|
-
"delay",
|
|
3969
|
-
"delayOnTouchOnly",
|
|
3970
|
-
"touchStartThreshold",
|
|
3971
|
-
"forceFallback",
|
|
3972
|
-
"fallbackClass",
|
|
3973
|
-
"fallbackOnBody",
|
|
3974
|
-
"fallbackTolerance",
|
|
3975
|
-
"fallbackOffset",
|
|
3976
|
-
"supportPointer",
|
|
3977
|
-
"emptyInsertThreshold",
|
|
3978
|
-
"scroll",
|
|
3979
|
-
"forceAutoScrollFallback",
|
|
3980
|
-
"scrollSensitivity",
|
|
3981
|
-
"scrollSpeed",
|
|
3982
|
-
"bubbleScroll",
|
|
3983
|
-
"modelValue",
|
|
3984
|
-
"tag",
|
|
3985
|
-
"target",
|
|
3986
|
-
"customUpdate",
|
|
3987
|
-
...Ds.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3988
|
-
],
|
|
3986
|
+
props: Os,
|
|
3989
3987
|
emits: ["update:modelValue", ...Ds],
|
|
3990
3988
|
setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
|
|
3991
3989
|
let o = Ds.reduce((e, t) => {
|
|
3992
3990
|
let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3993
3991
|
return e[n] = (...e) => r(t, ...e), e;
|
|
3994
3992
|
}, {}), s = M(() => {
|
|
3995
|
-
let n = e(t), { modelValue: r } = n, i =
|
|
3993
|
+
let n = e(t), { modelValue: r } = n, i = Ji(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
|
|
3996
3994
|
let r = k(n);
|
|
3997
3995
|
return r !== void 0 && (e[t] = r), e;
|
|
3998
3996
|
}, {});
|
|
3999
|
-
return
|
|
3997
|
+
return qi(qi({}, o), ea(qi(qi({}, a), s)));
|
|
4000
3998
|
}), c = M({
|
|
4001
3999
|
get: () => t.modelValue,
|
|
4002
4000
|
set: (e) => r("update:modelValue", e)
|
|
4003
4001
|
}), l = _(), u = A(Es(t.target || l, c, s));
|
|
4004
4002
|
return i(u), () => ie(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
|
|
4005
4003
|
}
|
|
4006
|
-
}),
|
|
4004
|
+
}), As = {
|
|
4007
4005
|
mounted: "mounted",
|
|
4008
4006
|
unmounted: "unmounted"
|
|
4009
4007
|
};
|
|
4010
|
-
|
|
4008
|
+
As.mounted, As.unmounted;
|
|
4011
4009
|
//#endregion
|
|
4012
4010
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4013
|
-
var
|
|
4011
|
+
var js = { class: "tpl:w-full" }, Ms = {
|
|
4014
4012
|
key: 0,
|
|
4015
4013
|
"data-testid": "section-drop-hint",
|
|
4016
4014
|
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)]"
|
|
4017
|
-
},
|
|
4015
|
+
}, Ns = /* @__PURE__ */ y({
|
|
4018
4016
|
__name: "SectionBlock",
|
|
4019
4017
|
props: {
|
|
4020
4018
|
block: {},
|
|
@@ -4022,12 +4020,12 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4022
4020
|
},
|
|
4023
4021
|
setup(e) {
|
|
4024
4022
|
let n = {
|
|
4025
|
-
title:
|
|
4026
|
-
paragraph:
|
|
4027
|
-
image:
|
|
4028
|
-
button:
|
|
4029
|
-
divider:
|
|
4030
|
-
custom:
|
|
4023
|
+
title: Bi,
|
|
4024
|
+
paragraph: xi,
|
|
4025
|
+
image: ci,
|
|
4026
|
+
button: Yn,
|
|
4027
|
+
divider: Hr,
|
|
4028
|
+
custom: Br
|
|
4031
4029
|
}, r = e, { t: a } = Ht(), s = dt(Dt, "SectionBlock"), c = P(wt, null), l = P(Pt, null), u = P(It, {});
|
|
4032
4030
|
function h(e) {
|
|
4033
4031
|
let t = u.savedBlocks;
|
|
@@ -4063,7 +4061,7 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4063
4061
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
4064
4062
|
}
|
|
4065
4063
|
function C(e) {
|
|
4066
|
-
return
|
|
4064
|
+
return Ci(e, l, n);
|
|
4067
4065
|
}
|
|
4068
4066
|
function T(e, t) {
|
|
4069
4067
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -4071,16 +4069,16 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4071
4069
|
dataSourceFetched: t.dataSourceFetched
|
|
4072
4070
|
});
|
|
4073
4071
|
}
|
|
4074
|
-
return (n, r) => (f(), x("div",
|
|
4072
|
+
return (n, r) => (f(), x("div", js, [b("div", { class: o(["tpl:flex tpl:gap-0", { "tpl:flex-col": v.value }]) }, [(f(!0), x(j, null, t(_.value, (n, r) => (f(), x("div", {
|
|
4075
4073
|
key: r,
|
|
4076
4074
|
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", y(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4077
4075
|
style: i({ width: v.value ? "100%" : g.value[r] })
|
|
4078
|
-
}, [w(k(
|
|
4076
|
+
}, [w(k(ks), {
|
|
4079
4077
|
"model-value": y(r),
|
|
4080
4078
|
group: {
|
|
4081
4079
|
name: "blocks",
|
|
4082
4080
|
pull: !0,
|
|
4083
|
-
put: (e, t, n) => k(
|
|
4081
|
+
put: (e, t, n) => k(Vi)(n)
|
|
4084
4082
|
},
|
|
4085
4083
|
animation: 150,
|
|
4086
4084
|
"ghost-class": "tpl-ghost",
|
|
@@ -4093,7 +4091,7 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4093
4091
|
class: "tpl:min-h-[60px]",
|
|
4094
4092
|
"onUpdate:modelValue": (e) => S(r, e)
|
|
4095
4093
|
}, {
|
|
4096
|
-
default: m(() => [(f(!0), x(j, null, t(y(r), (t) => ae((f(), x("div", { key: t.id }, [w(
|
|
4094
|
+
default: m(() => [(f(!0), x(j, null, t(y(r), (t) => ae((f(), x("div", { key: t.id }, [w(Ri, {
|
|
4097
4095
|
block: t,
|
|
4098
4096
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
4099
4097
|
viewport: e.viewport,
|
|
@@ -4125,13 +4123,13 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4125
4123
|
"model-value",
|
|
4126
4124
|
"group",
|
|
4127
4125
|
"onUpdate:modelValue"
|
|
4128
|
-
]), y(r).length === 0 ? (f(), x("div",
|
|
4126
|
+
]), y(r).length === 0 ? (f(), x("div", Ms, [b("span", null, p(k(a).section.dropHere), 1)])) : N("", !0)], 6))), 128))], 2)]));
|
|
4129
4127
|
}
|
|
4130
|
-
}),
|
|
4128
|
+
}), Ps = Me, Fs = {
|
|
4131
4129
|
small: 24,
|
|
4132
4130
|
medium: 32,
|
|
4133
4131
|
large: 48
|
|
4134
|
-
},
|
|
4132
|
+
}, Is = [
|
|
4135
4133
|
"facebook",
|
|
4136
4134
|
"twitter",
|
|
4137
4135
|
"instagram",
|
|
@@ -4149,11 +4147,11 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4149
4147
|
"github",
|
|
4150
4148
|
"dribbble",
|
|
4151
4149
|
"behance"
|
|
4152
|
-
],
|
|
4150
|
+
], Ls = [
|
|
4153
4151
|
"width",
|
|
4154
4152
|
"height",
|
|
4155
4153
|
"fill"
|
|
4156
|
-
],
|
|
4154
|
+
], Rs = ["d"], zs = /* @__PURE__ */ y({
|
|
4157
4155
|
__name: "SocialIconSvg",
|
|
4158
4156
|
props: {
|
|
4159
4157
|
platform: {},
|
|
@@ -4161,7 +4159,7 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4161
4159
|
iconSize: {}
|
|
4162
4160
|
},
|
|
4163
4161
|
setup(e) {
|
|
4164
|
-
let t = e, n = M(() =>
|
|
4162
|
+
let t = e, n = M(() => Ps[t.platform]), r = M(() => Fs[t.iconSize]), a = M(() => {
|
|
4165
4163
|
let e = {
|
|
4166
4164
|
display: "inline-flex",
|
|
4167
4165
|
alignItems: "center",
|
|
@@ -4205,12 +4203,12 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4205
4203
|
viewBox: "0 0 24 24",
|
|
4206
4204
|
fill: s.value,
|
|
4207
4205
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4208
|
-
}, [b("path", { d: n.value.path }, null, 8,
|
|
4206
|
+
}, [b("path", { d: n.value.path }, null, 8, Rs)], 8, Ls))], 4));
|
|
4209
4207
|
}
|
|
4210
|
-
}),
|
|
4208
|
+
}), Bs = { class: "tpl:w-full" }, Vs = ["href"], Hs = {
|
|
4211
4209
|
key: 1,
|
|
4212
4210
|
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)]"
|
|
4213
|
-
},
|
|
4211
|
+
}, Us = /* @__PURE__ */ y({
|
|
4214
4212
|
__name: "SocialIconsBlock",
|
|
4215
4213
|
props: {
|
|
4216
4214
|
block: {},
|
|
@@ -4223,7 +4221,7 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4223
4221
|
gap: `${n.block.spacing}px`,
|
|
4224
4222
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
4225
4223
|
})), o = M(() => n.block.icons.length > 0);
|
|
4226
|
-
return (n, s) => (f(), x("div",
|
|
4224
|
+
return (n, s) => (f(), x("div", Bs, [o.value ? (f(), x("div", {
|
|
4227
4225
|
key: 0,
|
|
4228
4226
|
style: i(a.value)
|
|
4229
4227
|
}, [(f(!0), x(j, null, t(e.block.icons, (t) => (f(), x("a", {
|
|
@@ -4231,7 +4229,7 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4231
4229
|
href: t.url || "#",
|
|
4232
4230
|
class: "tpl:cursor-default",
|
|
4233
4231
|
onClick: s[0] ||= F(() => {}, ["prevent"])
|
|
4234
|
-
}, [w(
|
|
4232
|
+
}, [w(zs, {
|
|
4235
4233
|
platform: t.platform,
|
|
4236
4234
|
"icon-style": e.block.iconStyle,
|
|
4237
4235
|
"icon-size": e.block.iconSize
|
|
@@ -4239,16 +4237,16 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4239
4237
|
"platform",
|
|
4240
4238
|
"icon-style",
|
|
4241
4239
|
"icon-size"
|
|
4242
|
-
])], 8,
|
|
4240
|
+
])], 8, Vs))), 128))], 4)) : (f(), x("div", Hs, [w(k(or), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
4243
4241
|
}
|
|
4244
|
-
}),
|
|
4242
|
+
}), Ws = { class: "tpl:w-full" }, Gs = {
|
|
4245
4243
|
key: 0,
|
|
4246
4244
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4247
4245
|
style: {
|
|
4248
4246
|
"background-color": "var(--tpl-bg-hover)",
|
|
4249
4247
|
color: "var(--tpl-text-dim)"
|
|
4250
4248
|
}
|
|
4251
|
-
},
|
|
4249
|
+
}, Ks = /* @__PURE__ */ y({
|
|
4252
4250
|
__name: "SpacerBlock",
|
|
4253
4251
|
props: {
|
|
4254
4252
|
block: {},
|
|
@@ -4260,23 +4258,23 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4260
4258
|
minHeight: `${t.block.height}px`,
|
|
4261
4259
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4262
4260
|
}));
|
|
4263
|
-
return (t, a) => (f(), x("div",
|
|
4261
|
+
return (t, a) => (f(), x("div", Ws, [b("div", {
|
|
4264
4262
|
style: i(r.value),
|
|
4265
4263
|
class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
|
|
4266
|
-
}, [k(n).state.previewMode ? N("", !0) : (f(), x("span",
|
|
4264
|
+
}, [k(n).state.previewMode ? N("", !0) : (f(), x("span", Gs, p(e.block.height) + "px ", 1))], 6)]));
|
|
4267
4265
|
}
|
|
4268
|
-
}),
|
|
4266
|
+
}), qs = { class: "tpl:w-full" }, Js = { key: 0 }, Ys = [
|
|
4269
4267
|
"aria-label",
|
|
4270
4268
|
"data-placeholder",
|
|
4271
4269
|
"onBlur"
|
|
4272
|
-
],
|
|
4270
|
+
], Xs = [
|
|
4273
4271
|
"aria-label",
|
|
4274
4272
|
"data-placeholder",
|
|
4275
4273
|
"onBlur"
|
|
4276
|
-
],
|
|
4274
|
+
], Zs = {
|
|
4277
4275
|
key: 1,
|
|
4278
4276
|
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)]"
|
|
4279
|
-
},
|
|
4277
|
+
}, Qs = /*#__PURE__*/ Jt(/* @__PURE__ */ y({
|
|
4280
4278
|
__name: "TableBlock",
|
|
4281
4279
|
props: {
|
|
4282
4280
|
block: {},
|
|
@@ -4321,11 +4319,11 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4321
4319
|
} : n);
|
|
4322
4320
|
o.updateBlock(r.block.id, { rows: a });
|
|
4323
4321
|
}
|
|
4324
|
-
return (e, r) => (f(), x("div",
|
|
4322
|
+
return (e, r) => (f(), x("div", qs, [s.value ? (f(), x("table", {
|
|
4325
4323
|
key: 0,
|
|
4326
4324
|
style: i(c.value),
|
|
4327
4325
|
class: "tpl-table-editable"
|
|
4328
|
-
}, [d.value ? (f(), x("thead",
|
|
4326
|
+
}, [d.value ? (f(), x("thead", Js, [b("tr", null, [(f(!0), x(j, null, t(d.value.cells, (e) => ae((f(), x("th", {
|
|
4329
4327
|
key: e.id,
|
|
4330
4328
|
style: i(u.value),
|
|
4331
4329
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -4334,7 +4332,7 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4334
4332
|
onBlur: (t) => g(d.value.id, e.id, t),
|
|
4335
4333
|
onKeydown: r[0] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4336
4334
|
onClick: F(h, ["stop"])
|
|
4337
|
-
}, null, 44,
|
|
4335
|
+
}, null, 44, Ys)), [[n, e.content]])), 128))])])) : N("", !0), b("tbody", null, [(f(!0), x(j, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(j, null, t(e.cells, (t) => ae((f(), x("td", {
|
|
4338
4336
|
key: t.id,
|
|
4339
4337
|
style: i(l.value),
|
|
4340
4338
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -4343,9 +4341,9 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4343
4341
|
onBlur: (n) => g(e.id, t.id, n),
|
|
4344
4342
|
onKeydown: r[1] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4345
4343
|
onClick: F(h, ["stop"])
|
|
4346
|
-
}, null, 44,
|
|
4344
|
+
}, null, 44, Xs)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", Zs, [w(k(sr), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
|
|
4347
4345
|
}
|
|
4348
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4346
|
+
}), [["__scopeId", "data-v-963ac422"]]), $s = /* @__PURE__ */ y({
|
|
4349
4347
|
__name: "VideoPlayButton",
|
|
4350
4348
|
props: { hoverEffect: {
|
|
4351
4349
|
type: Boolean,
|
|
@@ -4363,7 +4361,7 @@ var As = { class: "tpl:w-full" }, js = {
|
|
|
4363
4361
|
});
|
|
4364
4362
|
//#endregion
|
|
4365
4363
|
//#region src/utils/videoThumbnail.ts
|
|
4366
|
-
function
|
|
4364
|
+
function ec(e) {
|
|
4367
4365
|
if (!e) return {
|
|
4368
4366
|
platform: "unknown",
|
|
4369
4367
|
videoId: null,
|
|
@@ -4395,25 +4393,25 @@ function $s(e) {
|
|
|
4395
4393
|
thumbnailUrl: null
|
|
4396
4394
|
};
|
|
4397
4395
|
}
|
|
4398
|
-
function
|
|
4399
|
-
return t ||
|
|
4396
|
+
function tc(e, t) {
|
|
4397
|
+
return t || ec(e).thumbnailUrl;
|
|
4400
4398
|
}
|
|
4401
4399
|
//#endregion
|
|
4402
4400
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4403
|
-
var
|
|
4401
|
+
var nc = ["src", "alt"], rc = {
|
|
4404
4402
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4405
4403
|
style: { opacity: "0.7" }
|
|
4406
|
-
},
|
|
4404
|
+
}, ic = ["href"], ac = ["src", "alt"], oc = ["src", "alt"], sc = {
|
|
4407
4405
|
key: 3,
|
|
4408
4406
|
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)]"
|
|
4409
|
-
},
|
|
4407
|
+
}, cc = /* @__PURE__ */ y({
|
|
4410
4408
|
__name: "VideoBlock",
|
|
4411
4409
|
props: {
|
|
4412
4410
|
block: {},
|
|
4413
4411
|
viewport: {}
|
|
4414
4412
|
},
|
|
4415
4413
|
setup(e) {
|
|
4416
|
-
let t = e, { t: n } = Ht(), { syntax: r } =
|
|
4414
|
+
let t = e, { t: n } = Ht(), { syntax: r } = Yt(), a = M(() => De(t.block.url, r) || De(t.block.thumbnailUrl, r)), o = vn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = vn(() => a.value ? t.block.placeholderUrl : void 0), c = M(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : tc(t.block.url)), l = M(() => ({ textAlign: t.block.align })), u = M(() => {
|
|
4417
4415
|
let e = t.block.align;
|
|
4418
4416
|
return {
|
|
4419
4417
|
maxWidth: "100%",
|
|
@@ -4434,16 +4432,16 @@ var tc = ["src", "alt"], nc = {
|
|
|
4434
4432
|
class: "tpl:w-full tpl:border-0",
|
|
4435
4433
|
src: k(s),
|
|
4436
4434
|
alt: e.block.alt
|
|
4437
|
-
}, null, 8,
|
|
4435
|
+
}, null, 8, nc), w($s)], 4)) : a.value ? (f(), x("div", {
|
|
4438
4436
|
key: 1,
|
|
4439
4437
|
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)]",
|
|
4440
4438
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
4441
|
-
}, [w(k(
|
|
4439
|
+
}, [w(k(cr), {
|
|
4442
4440
|
size: 36,
|
|
4443
4441
|
"stroke-width": 1.5,
|
|
4444
4442
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4445
4443
|
style: { opacity: "0.5" }
|
|
4446
|
-
}), b("span",
|
|
4444
|
+
}), b("span", rc, [w(Kn, { text: d.value }, null, 8, ["text"])])], 4)) : c.value ? (f(), x(j, { key: 2 }, [e.block.url ? (f(), x("a", {
|
|
4447
4445
|
key: 0,
|
|
4448
4446
|
href: e.block.url,
|
|
4449
4447
|
target: "_blank",
|
|
@@ -4455,7 +4453,7 @@ var tc = ["src", "alt"], nc = {
|
|
|
4455
4453
|
class: "tpl:w-full tpl:border-0",
|
|
4456
4454
|
src: c.value,
|
|
4457
4455
|
alt: e.block.alt
|
|
4458
|
-
}, null, 8,
|
|
4456
|
+
}, null, 8, ac), w($s, { "hover-effect": "" })], 12, ic)) : (f(), x("div", {
|
|
4459
4457
|
key: 1,
|
|
4460
4458
|
class: "tpl:relative tpl:inline-block",
|
|
4461
4459
|
style: i(u.value)
|
|
@@ -4463,48 +4461,48 @@ var tc = ["src", "alt"], nc = {
|
|
|
4463
4461
|
class: "tpl:w-full tpl:border-0",
|
|
4464
4462
|
src: c.value,
|
|
4465
4463
|
alt: e.block.alt
|
|
4466
|
-
}, null, 8,
|
|
4464
|
+
}, null, 8, oc), w($s)], 4))], 64)) : (f(), x("div", sc, [w(k(cr), {
|
|
4467
4465
|
size: 40,
|
|
4468
4466
|
"stroke-width": 1.5,
|
|
4469
4467
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4470
4468
|
}), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
|
|
4471
4469
|
}
|
|
4472
|
-
}),
|
|
4473
|
-
section:
|
|
4474
|
-
title:
|
|
4475
|
-
paragraph:
|
|
4476
|
-
image:
|
|
4477
|
-
button:
|
|
4478
|
-
divider:
|
|
4479
|
-
video:
|
|
4480
|
-
social:
|
|
4481
|
-
menu:
|
|
4482
|
-
table:
|
|
4483
|
-
spacer:
|
|
4484
|
-
html:
|
|
4485
|
-
countdown: C(() => import("./CountdownBlock-
|
|
4470
|
+
}), lc = {
|
|
4471
|
+
section: Ns,
|
|
4472
|
+
title: Bi,
|
|
4473
|
+
paragraph: xi,
|
|
4474
|
+
image: ci,
|
|
4475
|
+
button: Yn,
|
|
4476
|
+
divider: Hr,
|
|
4477
|
+
video: cc,
|
|
4478
|
+
social: Us,
|
|
4479
|
+
menu: fi,
|
|
4480
|
+
table: Qs,
|
|
4481
|
+
spacer: Ks,
|
|
4482
|
+
html: Jr,
|
|
4483
|
+
countdown: C(() => import("./CountdownBlock-aZIKfBWY.js"))
|
|
4486
4484
|
};
|
|
4487
|
-
function
|
|
4485
|
+
function uc(e) {
|
|
4488
4486
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Ht(r);
|
|
4489
4487
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4490
|
-
let { resolvedTheme: l } =
|
|
4488
|
+
let { resolvedTheme: l } = En(M(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = On({
|
|
4491
4489
|
themeOverrides: d,
|
|
4492
4490
|
resolvedTheme: l,
|
|
4493
4491
|
extraStyles: e.themeExtraStyles
|
|
4494
|
-
}), p =
|
|
4492
|
+
}), p = nn({
|
|
4495
4493
|
content: t.content,
|
|
4496
4494
|
setContent: (e, n) => t.setContent(e, n),
|
|
4497
4495
|
...e.historyOptions
|
|
4498
4496
|
});
|
|
4499
|
-
|
|
4500
|
-
let m =
|
|
4497
|
+
ln(t, p);
|
|
4498
|
+
let m = an({
|
|
4501
4499
|
addBlock: t.addBlock,
|
|
4502
4500
|
removeBlock: t.removeBlock,
|
|
4503
4501
|
updateBlock: t.updateBlock,
|
|
4504
4502
|
selectBlock: t.selectBlock,
|
|
4505
4503
|
findBlockLocation: t.findBlockLocation,
|
|
4506
4504
|
blockDefaults: n.blockDefaults
|
|
4507
|
-
}), h =
|
|
4505
|
+
}), h = sn(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? on({
|
|
4508
4506
|
content: t.content,
|
|
4509
4507
|
isDirty: () => t.state.isDirty,
|
|
4510
4508
|
...e.autoSaveOptions
|
|
@@ -4512,25 +4510,25 @@ function lc(e) {
|
|
|
4512
4510
|
g && (v = c(p.isNavigating, (e) => {
|
|
4513
4511
|
e ? g.pause() : g.resume();
|
|
4514
4512
|
}));
|
|
4515
|
-
let y =
|
|
4513
|
+
let y = Tn(t, {
|
|
4516
4514
|
t: a,
|
|
4517
4515
|
format: o
|
|
4518
4516
|
}, n.customBlocks ?? []), b = nt(n.colors);
|
|
4519
|
-
if (b.allowCustomIgnored &&
|
|
4520
|
-
let e =
|
|
4521
|
-
e.length > 0 &&
|
|
4517
|
+
if (b.allowCustomIgnored && jn.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 && jn.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4518
|
+
let e = Bn(b.presets, n.blockDefaults, n.templateDefaults);
|
|
4519
|
+
e.length > 0 && jn.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.`);
|
|
4522
4520
|
}
|
|
4523
|
-
let x =
|
|
4524
|
-
|
|
4521
|
+
let x = Mn();
|
|
4522
|
+
Ln(x, lc);
|
|
4525
4523
|
let S = /* @__PURE__ */ new Set();
|
|
4526
4524
|
function C(e) {
|
|
4527
4525
|
for (let t of e) {
|
|
4528
|
-
x.registerCustom(t,
|
|
4529
|
-
for (let e of
|
|
4526
|
+
x.registerCustom(t, Br);
|
|
4527
|
+
for (let e of Hn(t, b)) S.has(e.id) || (S.add(e.id), jn.warn(e.message));
|
|
4530
4528
|
}
|
|
4531
4529
|
}
|
|
4532
4530
|
n.customBlocks?.length && C(n.customBlocks);
|
|
4533
|
-
let w =
|
|
4531
|
+
let w = gn();
|
|
4534
4532
|
if (s() && u(w.dispose), e.containerEl) {
|
|
4535
4533
|
let t = e.containerEl;
|
|
4536
4534
|
at(document, "pointerdown", (e) => {
|
|
@@ -4539,7 +4537,7 @@ function lc(e) {
|
|
|
4539
4537
|
}, { capture: !0 });
|
|
4540
4538
|
}
|
|
4541
4539
|
function T(r) {
|
|
4542
|
-
w.isActive() &&
|
|
4540
|
+
w.isActive() && Wn(r, {
|
|
4543
4541
|
history: p,
|
|
4544
4542
|
selectBlock: (e) => t.selectBlock(e),
|
|
4545
4543
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4553,21 +4551,23 @@ function lc(e) {
|
|
|
4553
4551
|
}
|
|
4554
4552
|
at(document, "keydown", T);
|
|
4555
4553
|
let D = _(null);
|
|
4556
|
-
E(Et, e.editorRoot ?? document), E(gt, D), E(Vt, r), E(Dt, t), E(Lt, p), E(Ot, m), E(wt, h), E(xt, i), E(_t, f), E(st, l), E(St, n.blockDefaults), E(Pt, x), E(Tt, n.customBlocks ?? []), E(mt, n.paletteBlocks), E(Bt,
|
|
4554
|
+
E(Et, e.editorRoot ?? document), E(gt, D), E(Vt, r), E(Dt, t), E(Lt, p), E(Ot, m), E(wt, h), E(xt, i), E(_t, f), E(st, l), E(St, n.blockDefaults), E(Pt, x), E(Tt, n.customBlocks ?? []), E(mt, n.paletteBlocks), E(Bt, Rn(n.htmlBlockPreview)), E(jt, b), E(Ft, Nn(t.content, x));
|
|
4557
4555
|
let O = ge(n.mergeTags?.syntax);
|
|
4558
4556
|
E(yt, n.mergeTags?.tags ?? []), E(At, O), E(pt, n.mergeTags?.onRequest ?? null), E(ut, n.mergeTags?.autocomplete !== !1);
|
|
4559
4557
|
let k = _(Ne(n.mergeTags?.tags ?? []));
|
|
4560
|
-
E(ht, k)
|
|
4561
|
-
let A =
|
|
4558
|
+
E(ht, k);
|
|
4559
|
+
let A = yn();
|
|
4560
|
+
E(lt, A), E(ct, n.logicTags?.tags ?? []), E(vt, n.logicTags?.pairs ?? []), E(ot, n.logicTags?.onRequest ?? null), E(Rt, bn()), E(kt, n.onRequestMedia ?? null), E(Ct, n.resolveImageUrl ? _n(n.resolveImageUrl) : null), E(Mt, n.displayConditions?.conditions ?? []), E(Nt, n.displayConditions?.allowCustom ?? !1), E(It, e.capabilities ?? {}), E(zt, y);
|
|
4561
|
+
let j = xn(n.lint) ? null : Sn({
|
|
4562
4562
|
content: t.content,
|
|
4563
4563
|
options: n.lint ?? {},
|
|
4564
4564
|
updateBlock: t.updateBlock,
|
|
4565
4565
|
updateSettings: t.updateSettings,
|
|
4566
4566
|
removeBlock: t.removeBlock
|
|
4567
4567
|
});
|
|
4568
|
-
E(ft,
|
|
4569
|
-
function
|
|
4570
|
-
v?.(),
|
|
4568
|
+
E(ft, j);
|
|
4569
|
+
function ee() {
|
|
4570
|
+
v?.(), j?.destroy(), g?.destroy(), p.destroy();
|
|
4571
4571
|
}
|
|
4572
4572
|
return {
|
|
4573
4573
|
t: a,
|
|
@@ -4581,12 +4581,12 @@ function lc(e) {
|
|
|
4581
4581
|
themeOverrides: d,
|
|
4582
4582
|
registry: x,
|
|
4583
4583
|
keyboardReorder: y,
|
|
4584
|
-
templateLint:
|
|
4584
|
+
templateLint: j,
|
|
4585
4585
|
popoverRoot: D,
|
|
4586
4586
|
mergeTagSampleMode: k,
|
|
4587
4587
|
registerCustomBlocks: C,
|
|
4588
|
-
destroy:
|
|
4588
|
+
destroy: ee
|
|
4589
4589
|
};
|
|
4590
4590
|
}
|
|
4591
4591
|
//#endregion
|
|
4592
|
-
export {
|
|
4592
|
+
export { sr as A, Vn as B, Dr as C, hr as D, gr as E, er as F, cn as G, wn as H, $n as I, Qt as K, Qn as L, ir as M, rr as N, mr as O, nr as P, Xn as R, kr as S, xr as T, Cn as U, jn as V, fn as W, Xr as _, Us as a, Br as b, ks as c, wi as d, Si as f, ci as g, fi as h, Ks as i, or as j, dr as k, Bi as l, xi as m, cc as n, Is as o, Ci as p, un as q, Qs as r, Ns as s, uc as t, Ri as u, Jr as v, Sr as w, jr as x, Hr as y, Yn as z };
|