@templatical/editor 0.56.0 → 0.56.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/{AiAltTextPopover-DdsvhE78.js → AiAltTextPopover-CpZ7UeAZ.js} +3 -3
- package/dist/{AiAltTextReview-P6to1_0t.js → AiAltTextReview-LYxvn7Qe.js} +4 -4
- package/dist/{AiChatPanel-BSlmzMRC.js → AiChatPanel-Cy05P-iO.js} +53 -53
- package/dist/{AiPanels-DAsnX-a3.js → AiPanels-CwKmXzyr.js} +1 -1
- package/dist/{AiRewriteMenu-DIISOR6U.js → AiRewriteMenu-DgqJHnza.js} +8 -8
- package/dist/{BlockIssueBadge-Bmtc50BQ.js → BlockIssueBadge-CxHJmuOh.js} +3 -3
- package/dist/{BlockPreviewCanvas-BYIzNn-9.js → BlockPreviewCanvas-DEmNZkEG.js} +44 -44
- package/dist/{CloudPanels-w34W8_BP.js → CloudPanels-Bmlf05Il.js} +11 -11
- package/dist/{CollaborationNotices-HTbCebjV.js → CollaborationNotices-C27GCMvK.js} +7 -7
- package/dist/{CommentsPanel-C5qG17Ki.js → CommentsPanel-B5NqPMmY.js} +1 -1
- package/dist/{CommentsSidebar-C7CWcUYZ.js → CommentsSidebar-BDrcrDxS.js} +42 -42
- package/dist/{CountdownBlock-BTXcCvjZ.js → CountdownBlock-D8dqjm3F.js} +6 -6
- package/dist/{CountdownToolbar-CP-pkntQ.js → CountdownToolbar-IjpCOjCd.js} +30 -30
- package/dist/{IssuesPanel-CiiNBzH0.js → IssuesPanel-uwuzeMSW.js} +87 -87
- package/dist/LanguageMenu-C-eQ0lFy.js +403 -0
- package/dist/{LocaleNotices-CTCZ7BYv.js → LocaleNotices-CDK_9D7P.js} +8 -8
- package/dist/{LogicTagInsertButton-DEOPc4RC.js → LogicTagInsertButton-BSolF7Fd.js} +3 -3
- package/dist/{MediaEditModal-DJsPLTwP.js → MediaEditModal-C8yc9dxt.js} +7 -7
- package/dist/{MediaPanels-D2WD2aE2.js → MediaPanels-FI4I8asn.js} +1 -1
- package/dist/{MergeTagInput-C9icdxw7.js → MergeTagInput-B1nl2ZMT.js} +12 -12
- package/dist/{MergeTagTextarea-CrAcmT3A.js → MergeTagTextarea-DJlf3VbS.js} +1 -1
- package/dist/{ParagraphEditor-BWBQ3jKz.js → ParagraphEditor-Dqco128s.js} +156 -156
- package/dist/{RestoreVersionDialog-CqAp16yQ.js → RestoreVersionDialog-hqLCuGV5.js} +12 -12
- package/dist/{RichTextEditorContent-xbBjVPVQ.js → RichTextEditorContent-xIEF0Y3Z.js} +2 -2
- package/dist/{SaveBlockDialog-pebNJBTc.js → SaveBlockDialog-CQlCP_XC.js} +46 -46
- package/dist/{SavedBlocksBrowserModal-CvagMcv7.js → SavedBlocksBrowserModal-BXA32Fx6.js} +23 -23
- package/dist/{SavedBlocksPanels-B9AAVBDm.js → SavedBlocksPanels-BKUzbamj.js} +1 -1
- package/dist/{SavedBlocksPickBar-BIANWe3i.js → SavedBlocksPickBar-BlvF-4UF.js} +9 -9
- package/dist/{TemplateSettings-ORq4PbCN.js → TemplateSettings-CYFtR8zv.js} +41 -41
- package/dist/{TestEmailModal-DRjCpcPl.js → TestEmailModal-BbaL17HO.js} +20 -20
- package/dist/{TestEmailPanel-H0v8El__.js → TestEmailPanel-DhB1CSpg.js} +1 -1
- package/dist/{TitleEditor-CEGbJXeU.js → TitleEditor-3BRl8u5l.js} +21 -21
- package/dist/{Toolbar-XT-uGA9J.js → Toolbar-pzNIakGM.js} +656 -656
- package/dist/{TplModal-7NQq5-VW.js → TplModal-WNuWhHZm.js} +4 -4
- package/dist/{VersionHistoryMenu-C8BE3Pr-.js → VersionHistoryMenu--T-Qp_mH.js} +15 -15
- package/dist/{VersionHistoryPanels-CuKuOSJG.js → VersionHistoryPanels-BPubvYIE.js} +1 -1
- package/dist/{VersionPreviewBanner-BVFBkveR.js → VersionPreviewBanner-ClL3Wkln.js} +7 -7
- package/dist/{WrapperBlock-Bdw-072t.js → WrapperBlock-CjfCPceb.js} +11 -11
- package/dist/{blockTypeIcons-CGplGmmr.js → blockTypeIcons-12OMwVyN.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js → AiAltTextPopover-PFjTrl0y.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js.map → AiAltTextPopover-PFjTrl0y.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js → AiAltTextReview-BMjzvApH.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js.map → AiAltTextReview-BMjzvApH.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js → AiChatPanel-C2gpq4kP.js} +107 -107
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js.map → AiChatPanel-C2gpq4kP.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js → AiPanels-Cx3PE2mE.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js.map → AiPanels-Cx3PE2mE.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js → AiRewriteMenu-CnkyjPEu.js} +11 -11
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js.map → AiRewriteMenu-CnkyjPEu.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js → BlockIssueBadge-DncZ-HDf.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js.map → BlockIssueBadge-DncZ-HDf.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js +156 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-B3HkuENF.js.map → BlockPreviewCanvas-CCSEzL46.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js → CloudPanels-CRztnw4M.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js.map → CloudPanels-CRztnw4M.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js → CollaborationNotices-IuLYT2x7.js} +8 -8
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js.map → CollaborationNotices-IuLYT2x7.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js → CommentsPanel-lgjJNrrY.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js.map → CommentsPanel-lgjJNrrY.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js → CommentsSidebar-DTold7iy.js} +214 -214
- package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js.map → CommentsSidebar-DTold7iy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js → CountdownBlock-8aPSExrv.js} +7 -7
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js.map → CountdownBlock-8aPSExrv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js → CountdownToolbar-CnWQEW5g.js} +50 -50
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js.map → CountdownToolbar-CnWQEW5g.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js → IssuesPanel-CrplCzo8.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js.map → IssuesPanel-CrplCzo8.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js → LanguageMenu-B6MNInCL.js} +110 -110
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js.map → LanguageMenu-B6MNInCL.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js → LocaleNotices-TxeAl8Iq.js} +9 -9
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js.map → LocaleNotices-TxeAl8Iq.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js → LogicTagInsertButton-DvSVx2DB.js} +4 -4
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js.map → LogicTagInsertButton-DvSVx2DB.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js → MediaEditModal-tGK6htBl.js} +8 -8
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js.map → MediaEditModal-tGK6htBl.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js → MediaPanels-BVrQYz2C.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js.map → MediaPanels-BVrQYz2C.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js → MergeTagInput-DeuNH3re.js} +13 -13
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js.map → MergeTagInput-DeuNH3re.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js → MergeTagTextarea-B2xxIU3e.js} +2 -2
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js.map → MergeTagTextarea-B2xxIU3e.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js → ParagraphEditor-Bx_Hlw8d.js} +106 -106
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js.map → ParagraphEditor-Bx_Hlw8d.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js → RestoreVersionDialog-CPrrWTsT.js} +12 -12
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js.map → RestoreVersionDialog-CPrrWTsT.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js → RichTextEditorContent-Dze4C9VI.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js.map → RichTextEditorContent-Dze4C9VI.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js → SaveBlockDialog-CXVwnfsy.js} +51 -51
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js.map → SaveBlockDialog-CXVwnfsy.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js → SavedBlocksBrowserModal-BDTmenOE.js} +23 -23
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js.map → SavedBlocksBrowserModal-BDTmenOE.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js → SavedBlocksPanels-B41Rk_v1.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js.map → SavedBlocksPanels-B41Rk_v1.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js → SavedBlocksPickBar-B97z_rFH.js} +11 -11
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js.map → SavedBlocksPickBar-B97z_rFH.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js → TemplateSettings-YwwRbxPc.js} +102 -102
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js.map → TemplateSettings-YwwRbxPc.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js → TestEmailModal-BiFP2Cbx.js} +20 -20
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js.map → TestEmailModal-BiFP2Cbx.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js → TestEmailPanel-BrivPMk2.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js.map → TestEmailPanel-BrivPMk2.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js → TitleEditor-CzPkkL2s.js} +19 -19
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js.map → TitleEditor-CzPkkL2s.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js → Toolbar-VH07SzX7.js} +550 -550
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js.map → Toolbar-VH07SzX7.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js → TplModal-DMe6J811.js} +6 -6
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js.map → TplModal-DMe6J811.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js → VersionHistoryMenu-DkwbKhBl.js} +15 -15
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js.map → VersionHistoryMenu-DkwbKhBl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js → VersionHistoryPanels-CgxhMRAl.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js.map → VersionHistoryPanels-CgxhMRAl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js → VersionPreviewBanner-WVBDBrwQ.js} +8 -8
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js.map → VersionPreviewBanner-WVBDBrwQ.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js → WrapperBlock-CCCIcqe2.js} +12 -12
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js.map → WrapperBlock-CCCIcqe2.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CsfQlmcf.js → composables-D3lsO7Io.js} +925 -925
- package/dist/cdn/chunks/composables-D3lsO7Io.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js → createCloudRuntime-CE79GB1H.js} +15 -15
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js.map → createCloudRuntime-CE79GB1H.js.map} +1 -1
- package/dist/cdn/chunks/dist-Cf1pSluo.js +405 -0
- package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-Cf1pSluo.js.map} +1 -1
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js → editor-modal-CN69NlOK.js} +170 -170
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js.map → editor-modal-CN69NlOK.js.map} +1 -1
- package/dist/cdn/chunks/en-Bcz4gS9U.js +1 -0
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js → extensions-8dlM-fU4.js} +96 -96
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js.map → extensions-8dlM-fU4.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js → sanitizeHtml-B3njfkSy.js} +11 -11
- package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js.map → sanitizeHtml-B3njfkSy.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js → socialIcons-BFgc3qqJ.js} +2 -2
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js.map → socialIcons-BFgc3qqJ.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bfj1jHnn.js → src-GgKlXNxy.js} +2 -2
- package/dist/cdn/chunks/{src-Bfj1jHnn.js.map → src-GgKlXNxy.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-C940SvId.js} +3 -3
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js.map → tiptap-C940SvId.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js → useLogicTag-B0PDeDxl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js.map → useLogicTag-B0PDeDxl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js → useMergeTag-BSU75bKk.js} +7 -7
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js.map → useMergeTag-BSU75bKk.js.map} +1 -1
- package/dist/cdn/editor.js +325 -325
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-CRX6rncm.js → composables-DreAt_0A.js} +1031 -1031
- package/dist/{createCloudRuntime-DplyIlsy.js → createCloudRuntime-CL4tUlDC.js} +14 -14
- package/dist/{dist-ChOb5XHW.js → dist-0GWMyHtM.js} +1 -1
- package/dist/{dist-6DU0me3E.js → dist-B_0FPmoy.js} +1 -1
- package/dist/{dist-B8dY8drK.js → dist-BjzK1g4Z.js} +1 -1
- package/dist/{dist-54VCNoC0.js → dist-BsumKKh9.js} +1 -1
- package/dist/{dist-BWflWcpW.js → dist-C3avsUq9.js} +2 -2
- package/dist/{dist-fqSers8_.js → dist-CCLRTtJP.js} +197 -197
- package/dist/dist-CiYotUR8.js +406 -0
- package/dist/{dist-C3hu_C3w.js → dist-Cr1CLCmx.js} +1 -1
- package/dist/{dist-D_XrUEET.js → dist-CsknfjrZ.js} +3 -3
- package/dist/{dist-TAv500j6.js → dist-DDytHU_6.js} +1 -1
- package/dist/{dist-CcOn7WCo.js → dist-DKV9m4Uu.js} +1 -1
- package/dist/{dist-B9a7iVye.js → dist-Dq9VnANT.js} +1 -1
- package/dist/{dist-DZ3X-uB8.js → dist-ZrT0vAB6.js} +1 -1
- package/dist/{editor-modal-D9HT9bD6.js → editor-modal-BD32TXws.js} +106 -106
- package/dist/en-Dgs_-NBw.js +1 -0
- package/dist/{extensions-Cm6K4SRX.js → extensions-DKxHlSd7.js} +179 -179
- package/dist/{socialIcons-CJD6OsI7.js → socialIcons-oo4uL16Y.js} +1 -1
- package/dist/templatical-editor.js +526 -526
- package/dist/{useLogicTag-DLkYos2Q.js → useLogicTag-B4Zpk3eo.js} +3 -3
- package/dist/{useMergeTag-IoWOO679.js → useMergeTag-B5qlq8px.js} +7 -7
- package/package.json +7 -7
- package/dist/LanguageMenu-B981Av-6.js +0 -403
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js +0 -156
- package/dist/cdn/chunks/composables-CsfQlmcf.js.map +0 -1
- package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
- package/dist/cdn/chunks/en-CVxNoHww.js +0 -1
- package/dist/dist-0alKVRc_.js +0 -406
- package/dist/en-De3uAutQ.js +0 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as Bt } from "./createLucideIcon-CfBdtoUw.js";
|
|
7
|
-
import { t as Vt } from "./clock-Df0ZiXwQ.js";
|
|
8
|
-
import { n as Ht } from "./upload-DR9pqVON.js";
|
|
9
|
-
import { t as Ut } from "./image-C3yuPDxx.js";
|
|
10
|
-
import { n as Wt, r as Gt, t as Kt } from "./sanitizeHtml-wBibnBF4.js";
|
|
11
|
-
import { t as qt } from "./message-circle-C4TonoBs.js";
|
|
12
|
-
import { t as Jt } from "./pencil-M9vkOB7C.js";
|
|
13
|
-
import { t as Yt } from "./trash-Cr7rD5Hh.js";
|
|
14
|
-
import { t as Xt } from "./triangle-alert-CKcpwtUj.js";
|
|
15
|
-
import { $ as Zt, A as Qt, B as $t, C as en, D as tn, F as nn, G as rn, H as an, I as on, J as sn, K as cn, L as ln, M as un, N as dn, O as fn, P as pn, R as mn, S as hn, T as gn, U as _n, V as vn, W as yn, Y as bn, Z as xn, _ as Sn, a as Cn, at as wn, b as Tn, c as En, d as Dn, et as On, g as kn, h as An, i as jn, it as Mn, j as Nn, k as Pn, l as Fn, m as In, nt as Ln, ot as Rn, p as zn, q as Bn, r as Vn, rt as Hn, s as Un, st as Wn, tt as Gn, u as Kn, v as qn, w as Jn, x as Yn, y as Xn, z as Zn } from "./keys-w_VRjoMu.js";
|
|
16
|
-
import { t as Qn } from "./useI18n-zeWYtWSv.js";
|
|
17
|
-
import { n as $n } from "./useLocalizedDisplay-Cbhx208c.js";
|
|
18
|
-
import { t as er } from "./plural-CyxrJXL1.js";
|
|
19
|
-
import { t as tr } from "./languageName-DEEOhDWI.js";
|
|
20
|
-
import { m as nr, w as rr, x as ir } from "./styleConstants-CgiNKdnc.js";
|
|
21
|
-
import { _ as ar, h as or, v as sr, y as cr } from "./dist-CX7skkvG.js";
|
|
22
|
-
import { a as lr, c as ur, i as dr, l as fr } from "./dist-0alKVRc_.js";
|
|
23
|
-
import { t as pr } from "./useEditorRoot-BcXKhM_8.js";
|
|
1
|
+
import { a as e, c as t, i as n, l as r } from "./dist-CiYotUR8.js";
|
|
2
|
+
import { c as i, o as a, s as o } from "./runtime-dom.esm-bundler-DlHp8xgy.js";
|
|
3
|
+
import { A as s, B as c, D as l, F as u, Ft as d, H as f, L as p, M as m, Mt as h, N as g, O as _, P as v, Pt as y, Q as b, S as x, U as S, W as C, Y as w, Z as T, _ as E, a as ee, at as D, b as O, c as k, ct as A, d as j, et as M, f as N, g as te, j as P, k as ne, l as F, nt as re, ot as I, q as ie, r as L, st as ae, u as oe, v as se, w as R, y as z } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
4
|
+
import { t as ce } from "./useEditorRoot-BcXKhM_8.js";
|
|
5
|
+
import { t as le } from "./useI18n-zeWYtWSv.js";
|
|
24
6
|
import "./useCloudI18n-BczJoFf4.js";
|
|
25
|
-
import { t as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { t as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
7
|
+
import { t as B } from "./useMergeTag-B5qlq8px.js";
|
|
8
|
+
import { _ as ue, h as de, v as fe, y as pe } from "./dist-CX7skkvG.js";
|
|
9
|
+
import { $ as me, At as he, B as ge, Bt as _e, F as ve, G as ye, Gt as be, H as xe, Ht as Se, J as Ce, Jt as we, K as Te, Kt as Ee, L as De, Lt as Oe, M as ke, Mt as Ae, N as je, Ot as Me, P as Ne, Qt as Pe, R as Fe, Rt as Ie, Ut as Le, V as Re, Vt as ze, Wt as Be, Xt as Ve, Y as He, Yt as Ue, Z as We, Zt as Ge, _t as Ke, at as qe, bt as Je, c as Ye, dt as Xe, en as Ze, f as Qe, g as $e, in as et, it as tt, j as nt, k as rt, lt as it, mt as at, nn as ot, nt as st, o as ct, p as lt, pt as ut, q as dt, qt as ft, rn as pt, rt as mt, s as ht, st as gt, tn as _t, ut as vt, v as yt, x as bt, xt, y as St, yt as Ct, z as wt, zt as Tt } from "./dist-BMUUt3zJ.js";
|
|
10
|
+
import { t as Et } from "./logger-BOu7oEtk.js";
|
|
11
|
+
import { a as Dt, c as Ot, i as kt, n as At, o as jt, t as Mt } from "./usePopoverPosition-Br3zt_MQ.js";
|
|
12
|
+
import { n as Nt } from "./useLocalizedDisplay-Cbhx208c.js";
|
|
13
|
+
import { $ as Pt, A as Ft, B as It, C as Lt, D as Rt, F as zt, G as Bt, H as Vt, I as Ht, J as Ut, K as Wt, L as Gt, M as Kt, N as qt, O as Jt, P as Yt, R as Xt, S as Zt, T as Qt, U as $t, V as en, W as tn, Y as nn, Z as rn, _ as an, a as on, at as sn, b as cn, c as ln, d as un, et as dn, g as fn, h as pn, i as mn, it as hn, j as gn, k as _n, l as vn, m as yn, nt as bn, ot as xn, p as Sn, q as Cn, r as wn, rt as Tn, s as En, st as Dn, tt as On, u as kn, v as An, w as jn, x as Mn, y as Nn, z as Pn } from "./keys-w_VRjoMu.js";
|
|
14
|
+
import { t as Fn } from "./useLogicTag-B4Zpk3eo.js";
|
|
15
|
+
import { B as In, C as Ln, D as Rn, E as zn, F as Bn, H as Vn, O as Hn, P as Un, T as Wn, U as Gn, _ as Kn, a as qn, f as Jn, h as Yn, k as Xn, n as Zn, o as Qn, t as $n, u as er, v as tr, w as nr, x as rr, y as ir, z as ar } from "./socialIcons-oo4uL16Y.js";
|
|
16
|
+
import { r as or, t as sr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
17
|
+
import { n as cr, r as lr, t as ur } from "./sanitizeHtml-wBibnBF4.js";
|
|
18
|
+
import { t as dr } from "./createLucideIcon-CfBdtoUw.js";
|
|
19
|
+
import { t as fr } from "./LoadingTrack-BG8cg9xi.js";
|
|
20
|
+
import { t as pr } from "./triangle-alert-CKcpwtUj.js";
|
|
21
|
+
import { t as mr } from "./image-C3yuPDxx.js";
|
|
22
|
+
import { t as hr } from "./clock-Df0ZiXwQ.js";
|
|
23
|
+
import { t as gr } from "./pencil-M9vkOB7C.js";
|
|
24
|
+
import { t as _r } from "./languageName-DEEOhDWI.js";
|
|
25
|
+
import { t as vr } from "./plural-CyxrJXL1.js";
|
|
26
|
+
import { m as yr, w as br, x as xr } from "./styleConstants-CgiNKdnc.js";
|
|
27
|
+
import { t as Sr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
28
|
+
import { n as Cr } from "./upload-DR9pqVON.js";
|
|
29
|
+
import { t as wr } from "./message-circle-C4TonoBs.js";
|
|
30
|
+
import { t as Tr } from "./trash-Cr7rD5Hh.js";
|
|
31
31
|
import { t as Er } from "./readableTextColor-BfZUGnVj.js";
|
|
32
|
-
var Dr =
|
|
32
|
+
var Dr = dr({
|
|
33
33
|
name: "bookmark",
|
|
34
34
|
size: 24,
|
|
35
35
|
node: [["path", {
|
|
36
36
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
37
37
|
key: "oz39mx"
|
|
38
38
|
}]]
|
|
39
|
-
}), Or =
|
|
39
|
+
}), Or = dr({
|
|
40
40
|
name: "box",
|
|
41
41
|
size: 24,
|
|
42
42
|
node: [
|
|
@@ -53,7 +53,7 @@ var Dr = Bt({
|
|
|
53
53
|
key: "d0xqtd"
|
|
54
54
|
}]
|
|
55
55
|
]
|
|
56
|
-
}), kr =
|
|
56
|
+
}), kr = dr({
|
|
57
57
|
name: "eye-off",
|
|
58
58
|
size: 24,
|
|
59
59
|
node: [
|
|
@@ -74,7 +74,7 @@ var Dr = Bt({
|
|
|
74
74
|
key: "1ooewy"
|
|
75
75
|
}]
|
|
76
76
|
]
|
|
77
|
-
}), Ar =
|
|
77
|
+
}), Ar = dr({
|
|
78
78
|
name: "funnel",
|
|
79
79
|
size: 24,
|
|
80
80
|
node: [["path", {
|
|
@@ -82,7 +82,7 @@ var Dr = Bt({
|
|
|
82
82
|
key: "sc7q7i"
|
|
83
83
|
}]],
|
|
84
84
|
aliases: ["filter"]
|
|
85
|
-
}), jr =
|
|
85
|
+
}), jr = dr({
|
|
86
86
|
name: "grip-vertical",
|
|
87
87
|
size: 24,
|
|
88
88
|
node: [
|
|
@@ -123,14 +123,14 @@ var Dr = Bt({
|
|
|
123
123
|
key: "f4zoj3"
|
|
124
124
|
}]
|
|
125
125
|
]
|
|
126
|
-
}), Mr =
|
|
126
|
+
}), Mr = dr({
|
|
127
127
|
name: "puzzle",
|
|
128
128
|
size: 24,
|
|
129
129
|
node: [["path", {
|
|
130
130
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
131
131
|
key: "w46dr5"
|
|
132
132
|
}]]
|
|
133
|
-
}), Nr =
|
|
133
|
+
}), Nr = dr({
|
|
134
134
|
name: "video",
|
|
135
135
|
size: 24,
|
|
136
136
|
node: [["path", {
|
|
@@ -145,75 +145,75 @@ var Dr = Bt({
|
|
|
145
145
|
key: "158x01"
|
|
146
146
|
}]]
|
|
147
147
|
}), Pr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
148
|
-
function Fr(
|
|
149
|
-
let r =
|
|
148
|
+
function Fr(t, n) {
|
|
149
|
+
let r = ce(), i = null, a = null, o = null;
|
|
150
150
|
function s() {
|
|
151
|
-
return
|
|
151
|
+
return t.value ? Array.from(t.value.querySelectorAll(Pr)).filter((e) => e.offsetParent !== null) : [];
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function l(e) {
|
|
154
154
|
if (e.key !== "Tab") return;
|
|
155
155
|
let t = s();
|
|
156
156
|
if (t.length === 0) return;
|
|
157
157
|
let n = t[0], i = t[t.length - 1];
|
|
158
158
|
e.shiftKey ? r.activeElement === n && (e.preventDefault(), i.focus()) : r.activeElement === i && (e.preventDefault(), n.focus());
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
let
|
|
162
|
-
|
|
160
|
+
function u() {
|
|
161
|
+
let n = a !== null || o !== null;
|
|
162
|
+
n && d({ restoreFocus: !1 }), n || (i = r.activeElement), o = requestAnimationFrame(() => {
|
|
163
163
|
o = null;
|
|
164
|
-
let
|
|
165
|
-
|
|
166
|
-
}), a =
|
|
164
|
+
let e = s();
|
|
165
|
+
e.length > 0 && (t.value?.querySelector("[autofocus], input:not([disabled])") ?? e[0]).focus();
|
|
166
|
+
}), a = e(t, "keydown", l);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function d(e = {}) {
|
|
169
169
|
let t = e.restoreFocus !== !1;
|
|
170
170
|
o !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(o), o = null), a?.(), a = null, t && i && i.focus && (i.focus(), i = null);
|
|
171
171
|
}
|
|
172
|
-
let
|
|
173
|
-
e && t ?
|
|
172
|
+
let f = c([n, t], ([e, t]) => {
|
|
173
|
+
e && t ? u() : d();
|
|
174
174
|
}, { flush: "post" });
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
T(() => {
|
|
176
|
+
f(), d();
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
// src/composables/useEmoji.ts
|
|
180
180
|
function Ir() {
|
|
181
|
-
let [e,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}),
|
|
185
|
-
if (e &&
|
|
181
|
+
let [e, t] = fe(!1), n = re([]), r = !1;
|
|
182
|
+
T(() => {
|
|
183
|
+
r = !0;
|
|
184
|
+
}), c(e, async (e) => {
|
|
185
|
+
if (e && n.value.length === 0) {
|
|
186
186
|
let { emojiCategories: e } = await import("./emojiData-CBNuCfum.js");
|
|
187
|
-
if (
|
|
188
|
-
|
|
187
|
+
if (r) return;
|
|
188
|
+
n.value = e;
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
|
-
function
|
|
192
|
-
|
|
191
|
+
function i() {
|
|
192
|
+
t();
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function a() {
|
|
195
195
|
e.value = !1;
|
|
196
196
|
}
|
|
197
197
|
return {
|
|
198
|
-
categories:
|
|
198
|
+
categories: n,
|
|
199
199
|
isOpen: e,
|
|
200
|
-
toggle:
|
|
201
|
-
close:
|
|
200
|
+
toggle: i,
|
|
201
|
+
close: a
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
// src/composables/useBlockRegistry.ts
|
|
205
205
|
function Lr() {
|
|
206
|
-
let e =
|
|
206
|
+
let e = re(/* @__PURE__ */ new Map());
|
|
207
207
|
function t(t, n) {
|
|
208
|
-
e.value.set(t, n),
|
|
208
|
+
e.value.set(t, n), ae(e);
|
|
209
209
|
}
|
|
210
210
|
function n(t, n) {
|
|
211
211
|
let r = `custom:${t.type}`, i = {
|
|
212
212
|
component: n,
|
|
213
|
-
createBlock: () =>
|
|
213
|
+
createBlock: () => Ne(t),
|
|
214
214
|
definition: t
|
|
215
215
|
};
|
|
216
|
-
e.value.set(r, i),
|
|
216
|
+
e.value.set(r, i), ae(e);
|
|
217
217
|
}
|
|
218
218
|
function r(t) {
|
|
219
219
|
if (t.type === "custom") {
|
|
@@ -236,9 +236,9 @@ function Lr() {
|
|
|
236
236
|
let t = a(e.customType);
|
|
237
237
|
if (!t) return o("Block definition not found");
|
|
238
238
|
try {
|
|
239
|
-
return await
|
|
239
|
+
return await ve(await import("./liquid.browser-DUXEekoN.js")).parseAndRender(t.template, e.fieldValues);
|
|
240
240
|
} catch (t) {
|
|
241
|
-
return
|
|
241
|
+
return Et.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function c(t) {
|
|
@@ -291,12 +291,12 @@ function Br(e) {
|
|
|
291
291
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
292
292
|
for (let i of e) {
|
|
293
293
|
let e = i.toLowerCase(), a = Rr.find((t) => t.value.toLowerCase() === e);
|
|
294
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
294
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), Et.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Rr.map((e) => e.value).join(", ")}.`));
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}
|
|
298
298
|
function Vr(e) {
|
|
299
|
-
let t =
|
|
299
|
+
let t = M(e?.customFonts ?? []), n = M(!1), r = Br(e?.builtIns), i = k(() => e?.defaultFallback ?? zr), a = k(() => {
|
|
300
300
|
let e = [...r], n = t.value.map((e) => ({
|
|
301
301
|
value: e.name,
|
|
302
302
|
label: e.name,
|
|
@@ -308,7 +308,7 @@ function Vr(e) {
|
|
|
308
308
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
309
309
|
}
|
|
310
310
|
let s = e?.defaultFont ?? zr.split(",")[0].trim();
|
|
311
|
-
o(s) ||
|
|
311
|
+
o(s) || Et.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
312
312
|
function c() {
|
|
313
313
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
314
314
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
@@ -316,9 +316,9 @@ function Vr(e) {
|
|
|
316
316
|
}
|
|
317
317
|
return zr;
|
|
318
318
|
}
|
|
319
|
-
let l =
|
|
319
|
+
let l = k(() => c());
|
|
320
320
|
function u(e) {
|
|
321
|
-
return
|
|
321
|
+
return ze(e, {
|
|
322
322
|
customFonts: t.value,
|
|
323
323
|
defaultFallback: i.value
|
|
324
324
|
});
|
|
@@ -337,16 +337,16 @@ function Vr(e) {
|
|
|
337
337
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
338
338
|
});
|
|
339
339
|
} catch (t) {
|
|
340
|
-
|
|
340
|
+
Et.warn(`Failed to load custom font "${e.name}":`, t);
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
|
-
await Promise.allSettled(e),
|
|
343
|
+
await Promise.allSettled(e), f || (n.value = !0);
|
|
344
344
|
}
|
|
345
345
|
function m() {
|
|
346
346
|
for (let e of d) e.remove();
|
|
347
347
|
d.length = 0;
|
|
348
348
|
}
|
|
349
|
-
return
|
|
349
|
+
return ie() && T(() => {
|
|
350
350
|
f = !0, m();
|
|
351
351
|
}), {
|
|
352
352
|
fonts: a,
|
|
@@ -386,7 +386,7 @@ var Hr = {
|
|
|
386
386
|
canvasBg: "--tpl-canvas-bg"
|
|
387
387
|
};
|
|
388
388
|
function Ur({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
389
|
-
return { themeStyles:
|
|
389
|
+
return { themeStyles: k(() => {
|
|
390
390
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
391
391
|
if (a) for (let [e, t] of Object.entries(Hr)) {
|
|
392
392
|
let n = a[e];
|
|
@@ -397,11 +397,11 @@ function Ur({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
397
397
|
}
|
|
398
398
|
// src/utils/mergeTagNodeSpec.ts
|
|
399
399
|
function Wr(e, t, n) {
|
|
400
|
-
return
|
|
400
|
+
return Ct(e, n) ? {
|
|
401
401
|
type: "logicMergeTagNode",
|
|
402
402
|
attrs: {
|
|
403
403
|
value: e,
|
|
404
|
-
keyword:
|
|
404
|
+
keyword: it(e, n)
|
|
405
405
|
}
|
|
406
406
|
} : {
|
|
407
407
|
type: "mergeTagNode",
|
|
@@ -435,7 +435,7 @@ function Jr(e) {
|
|
|
435
435
|
...this.parent?.(),
|
|
436
436
|
color: {
|
|
437
437
|
default: null,
|
|
438
|
-
parseHTML: (e) => qr(
|
|
438
|
+
parseHTML: (e) => qr(jt(e.style.color)),
|
|
439
439
|
renderHTML: (e) => {
|
|
440
440
|
let t = qr(e.color);
|
|
441
441
|
return t ? { style: `color: ${t}` } : {};
|
|
@@ -445,8 +445,8 @@ function Jr(e) {
|
|
|
445
445
|
} });
|
|
446
446
|
}
|
|
447
447
|
// src/composables/useRichTextLinkDialog.ts
|
|
448
|
-
function Yr(e, t =
|
|
449
|
-
let r =
|
|
448
|
+
function Yr(e, t = $e.liquid, n = () => !0) {
|
|
449
|
+
let r = M(!1), i = M(""), a = M(""), o = M(null);
|
|
450
450
|
Fr(o, r);
|
|
451
451
|
function s() {
|
|
452
452
|
if (!n()) return;
|
|
@@ -475,8 +475,8 @@ function Yr(e, t = He.liquid, n = () => !0) {
|
|
|
475
475
|
if (t.startsWith("#")) return t;
|
|
476
476
|
if (t.startsWith("//")) return `https:${t}`;
|
|
477
477
|
if (l.test(t)) return t;
|
|
478
|
-
let n =
|
|
479
|
-
return n ?
|
|
478
|
+
let n = mt(t);
|
|
479
|
+
return n ? lt.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
480
480
|
}
|
|
481
481
|
function f() {
|
|
482
482
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -500,92 +500,92 @@ function Yr(e, t = He.liquid, n = () => !0) {
|
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
// src/composables/useRichTextEditor.ts
|
|
503
|
-
function Xr(
|
|
504
|
-
let n =
|
|
505
|
-
|
|
506
|
-
let t =
|
|
503
|
+
function Xr(t) {
|
|
504
|
+
let n = R(An, null), r = Ot(), { mergeTags: i, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: l, autocomplete: u } = B(), { canInsertLogicTag: d, isRequesting: f, requestLogicTag: p } = Fn(), m = R(bn, null), h = (w(m) ? m.value : m)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", g = ut(l), _ = re(null), v = n?.content ? Nt(n) : null, y = () => _e(v?.settings.value ?? { locale: "en" });
|
|
505
|
+
c(y, (e) => {
|
|
506
|
+
let t = _.value?.view.dom;
|
|
507
507
|
t && t.setAttribute("dir", e);
|
|
508
508
|
});
|
|
509
|
-
let { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog:
|
|
510
|
-
|
|
511
|
-
if (
|
|
512
|
-
|
|
513
|
-
let e =
|
|
509
|
+
let { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: T, insertLink: E, removeLink: ee, closeLinkDialog: D, handleLinkKeydown: O } = Yr(_, l, () => r.value);
|
|
510
|
+
c(r, (e) => {
|
|
511
|
+
if (_.value?.setEditable(e, !1), !e) {
|
|
512
|
+
D();
|
|
513
|
+
let e = _.value;
|
|
514
514
|
e && e.view.dispatch(e.state.tr);
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
|
-
let { start:
|
|
518
|
-
async function
|
|
519
|
-
te.value = null,
|
|
517
|
+
let { start: k, stop: A } = ue(() => _.value?.commands.focus("end"), 0, { immediate: !1 }), j = re(null), N = M(!0), te = M(null), P = !1, F = null;
|
|
518
|
+
async function I() {
|
|
519
|
+
te.value = null, N.value = !0;
|
|
520
520
|
try {
|
|
521
|
-
let { TiptapEditor:
|
|
521
|
+
let { TiptapEditor: e, EC: a, extensions: o } = await t.loadExtensions({
|
|
522
522
|
mergeTags: i,
|
|
523
|
-
syntax:
|
|
524
|
-
triggerChar:
|
|
525
|
-
autocompleteEnabled:
|
|
526
|
-
suggestionEmptyText:
|
|
523
|
+
syntax: l,
|
|
524
|
+
triggerChar: g,
|
|
525
|
+
autocompleteEnabled: u,
|
|
526
|
+
suggestionEmptyText: h
|
|
527
527
|
});
|
|
528
|
-
if (
|
|
529
|
-
|
|
528
|
+
if (P) return;
|
|
529
|
+
j.value = a;
|
|
530
530
|
let s = /* @__PURE__ */ new Map();
|
|
531
531
|
o.forEach((e, t) => s.set(e.name, t));
|
|
532
|
-
let
|
|
532
|
+
let c = new e({
|
|
533
533
|
extensions: o.filter((e, t) => s.get(e.name) === t),
|
|
534
|
-
content:
|
|
534
|
+
content: t.blockContent(),
|
|
535
535
|
editable: r.value,
|
|
536
536
|
editorProps: { attributes: { dir: y() } },
|
|
537
|
-
onUpdate: ({ editor:
|
|
538
|
-
!
|
|
537
|
+
onUpdate: ({ editor: e }) => {
|
|
538
|
+
!P && r.value && n && (F = e.getHTML(), n.updateBlock(t.blockId(), { content: F }));
|
|
539
539
|
}
|
|
540
540
|
});
|
|
541
|
-
if (
|
|
542
|
-
|
|
541
|
+
if (P) {
|
|
542
|
+
c.destroy();
|
|
543
543
|
return;
|
|
544
544
|
}
|
|
545
|
-
|
|
546
|
-
} catch (
|
|
547
|
-
if (
|
|
548
|
-
|
|
545
|
+
_.value = c, N.value = !1, k();
|
|
546
|
+
} catch (e) {
|
|
547
|
+
if (P) return;
|
|
548
|
+
Et.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), te.value = e instanceof Error ? e.message : "Failed to load editor", N.value = !1;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
|
|
551
|
+
function ie() {
|
|
552
|
+
_.value?.destroy(), _.value = null, I();
|
|
553
553
|
}
|
|
554
|
-
|
|
555
|
-
let
|
|
556
|
-
|
|
554
|
+
I();
|
|
555
|
+
let L = c(() => t.blockContent(), (e) => {
|
|
556
|
+
_.value && e !== F && (F = e, _.value.getHTML() !== e && _.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
557
557
|
});
|
|
558
|
-
function
|
|
559
|
-
if (o.value ||
|
|
560
|
-
let n =
|
|
558
|
+
function ae(e) {
|
|
559
|
+
if (o.value || f.value) return;
|
|
560
|
+
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
561
561
|
if (!r) return;
|
|
562
|
-
|
|
562
|
+
t.onClickOutsideSideEffect?.(r);
|
|
563
563
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
564
|
-
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i ||
|
|
564
|
+
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
565
565
|
}
|
|
566
|
-
|
|
567
|
-
|
|
566
|
+
e(document, "mousedown", ae), ne(() => {
|
|
567
|
+
P = !0, L(), A(), _.value?.destroy();
|
|
568
568
|
});
|
|
569
|
-
async function
|
|
569
|
+
async function oe() {
|
|
570
570
|
if (!r.value) return;
|
|
571
571
|
let e = await s();
|
|
572
|
-
!
|
|
572
|
+
!P && r.value && (e && _.value ? _.value.chain().focus().insertMergeTag({
|
|
573
573
|
label: e.label,
|
|
574
574
|
value: e.value
|
|
575
|
-
}).run() :
|
|
575
|
+
}).run() : _.value?.commands.focus());
|
|
576
576
|
}
|
|
577
|
-
async function
|
|
577
|
+
async function se() {
|
|
578
578
|
if (!r.value) return;
|
|
579
|
-
let e = await
|
|
580
|
-
!
|
|
579
|
+
let e = await p();
|
|
580
|
+
!P && r.value && (e && _.value ? Kr(_.value, e, l) : _.value?.commands.focus());
|
|
581
581
|
}
|
|
582
582
|
return {
|
|
583
|
-
editor:
|
|
584
|
-
EditorContent:
|
|
585
|
-
isLoading:
|
|
583
|
+
editor: _,
|
|
584
|
+
EditorContent: j,
|
|
585
|
+
isLoading: N,
|
|
586
586
|
isEditable: r,
|
|
587
587
|
initError: te,
|
|
588
|
-
retry:
|
|
588
|
+
retry: ie,
|
|
589
589
|
showLinkDialog: b,
|
|
590
590
|
linkUrl: x,
|
|
591
591
|
linkColor: S,
|
|
@@ -593,16 +593,16 @@ function Xr(e) {
|
|
|
593
593
|
mergeTags: i,
|
|
594
594
|
canRequestMergeTag: a,
|
|
595
595
|
isRequestingMergeTag: o,
|
|
596
|
-
syntax:
|
|
597
|
-
canInsertLogicTag:
|
|
598
|
-
isRequestingLogicTag:
|
|
599
|
-
openLinkDialog:
|
|
600
|
-
insertLink:
|
|
601
|
-
removeLink:
|
|
602
|
-
closeLinkDialog:
|
|
603
|
-
handleLinkKeydown:
|
|
604
|
-
handleAddMergeTag:
|
|
605
|
-
handleAddLogicTag:
|
|
596
|
+
syntax: l,
|
|
597
|
+
canInsertLogicTag: d,
|
|
598
|
+
isRequestingLogicTag: f,
|
|
599
|
+
openLinkDialog: T,
|
|
600
|
+
insertLink: E,
|
|
601
|
+
removeLink: ee,
|
|
602
|
+
closeLinkDialog: D,
|
|
603
|
+
handleLinkKeydown: O,
|
|
604
|
+
handleAddMergeTag: oe,
|
|
605
|
+
handleAddLogicTag: se
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
// src/utils/activeEditorTracker.ts
|
|
@@ -635,62 +635,62 @@ function ti(e) {
|
|
|
635
635
|
// src/composables/usePreviewResolution.ts
|
|
636
636
|
var ni = 500;
|
|
637
637
|
function ri(e) {
|
|
638
|
-
let
|
|
639
|
-
function
|
|
640
|
-
|
|
638
|
+
let t = typeof e.resolvePreview == "function", n = M(null), r = M(!1), i = M(!1), a = 0, o = null;
|
|
639
|
+
function s() {
|
|
640
|
+
o !== null && (clearTimeout(o), o = null);
|
|
641
641
|
}
|
|
642
642
|
async function l() {
|
|
643
643
|
let t = e.resolvePreview;
|
|
644
644
|
if (!t) return;
|
|
645
|
-
let
|
|
646
|
-
|
|
645
|
+
let o = ++a;
|
|
646
|
+
r.value = !0;
|
|
647
647
|
let s = {
|
|
648
|
-
content:
|
|
648
|
+
content: ft(e.getContent()),
|
|
649
649
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
650
650
|
};
|
|
651
651
|
try {
|
|
652
652
|
let e = await t(s);
|
|
653
|
-
if (
|
|
654
|
-
if (!
|
|
655
|
-
|
|
653
|
+
if (o !== a) return;
|
|
654
|
+
if (!xt(e)) {
|
|
655
|
+
i.value = !0;
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
658
|
-
|
|
658
|
+
n.value = e, i.value = !1;
|
|
659
659
|
} catch {
|
|
660
|
-
if (
|
|
661
|
-
|
|
660
|
+
if (o !== a) return;
|
|
661
|
+
i.value = !0;
|
|
662
662
|
} finally {
|
|
663
|
-
|
|
663
|
+
o === a && (r.value = !1);
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
function u() {
|
|
667
|
-
|
|
668
|
-
|
|
667
|
+
t && (s(), n.value === null ? l() : o = setTimeout(() => {
|
|
668
|
+
o = null, l();
|
|
669
669
|
}, ni));
|
|
670
670
|
}
|
|
671
|
-
return
|
|
671
|
+
return c(() => [
|
|
672
672
|
e.isActive(),
|
|
673
673
|
e.getRecipient?.(),
|
|
674
674
|
e.getLocale?.()
|
|
675
|
-
], ([e, , t],
|
|
676
|
-
|
|
675
|
+
], ([e, , t], o) => {
|
|
676
|
+
o && t !== o[2] && (s(), a++, n.value = null, r.value = !1, i.value = !1), e ? u() : (s(), a++, r.value = !1, n.value = null, i.value = !1);
|
|
677
677
|
}, {
|
|
678
678
|
immediate: !0,
|
|
679
679
|
flush: "sync"
|
|
680
|
-
}),
|
|
681
|
-
|
|
680
|
+
}), T(() => {
|
|
681
|
+
s(), a++;
|
|
682
682
|
}), {
|
|
683
|
-
isConfigured:
|
|
684
|
-
content:
|
|
685
|
-
isResolving:
|
|
686
|
-
isInitialResolve:
|
|
687
|
-
hasFailed:
|
|
688
|
-
supersedesSamples:
|
|
683
|
+
isConfigured: t,
|
|
684
|
+
content: k(() => n.value ?? e.getContent()),
|
|
685
|
+
isResolving: r,
|
|
686
|
+
isInitialResolve: k(() => r.value && n.value === null),
|
|
687
|
+
hasFailed: i,
|
|
688
|
+
supersedesSamples: k(() => t)
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
// src/composables/useMergeTagPicker.ts
|
|
692
692
|
function ii() {
|
|
693
|
-
let e =
|
|
693
|
+
let e = M(!1), t = M([]), n = M(null), r = null;
|
|
694
694
|
function i(i, a) {
|
|
695
695
|
if (r) {
|
|
696
696
|
let e = r;
|
|
@@ -704,7 +704,7 @@ function ii() {
|
|
|
704
704
|
let a = r;
|
|
705
705
|
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
706
706
|
}
|
|
707
|
-
return
|
|
707
|
+
return ie() && T(() => {
|
|
708
708
|
if (r) {
|
|
709
709
|
let e = r;
|
|
710
710
|
r = null, e(null);
|
|
@@ -720,7 +720,7 @@ function ii() {
|
|
|
720
720
|
}
|
|
721
721
|
// src/composables/useLogicTagPicker.ts
|
|
722
722
|
function ai() {
|
|
723
|
-
let e =
|
|
723
|
+
let e = M(!1), t = M([]), n = M([]), r = null;
|
|
724
724
|
function i(i, a) {
|
|
725
725
|
if (r) {
|
|
726
726
|
let e = r;
|
|
@@ -734,7 +734,7 @@ function ai() {
|
|
|
734
734
|
let a = r;
|
|
735
735
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
736
736
|
}
|
|
737
|
-
return
|
|
737
|
+
return ie() && T(() => {
|
|
738
738
|
if (r) {
|
|
739
739
|
let e = r;
|
|
740
740
|
r = null, e(null);
|
|
@@ -754,31 +754,31 @@ function oi(e) {
|
|
|
754
754
|
}
|
|
755
755
|
var si = !1;
|
|
756
756
|
function ci(e) {
|
|
757
|
-
let
|
|
758
|
-
|
|
759
|
-
}, { deep: !0 }),
|
|
757
|
+
let t = M([]), n = M(0), r = M(-1), i = c(e.content, () => {
|
|
758
|
+
n.value++;
|
|
759
|
+
}, { deep: !0 }), a = M(!1), o = M(!1), s = re(null), l = oi(e.options), u = null, d = !1;
|
|
760
760
|
l || f();
|
|
761
761
|
async function f() {
|
|
762
762
|
try {
|
|
763
763
|
let t = await import("@templatical/quality");
|
|
764
764
|
if (d) return;
|
|
765
|
-
|
|
765
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u = pe(n, p, { debounce: e.debounce ?? 500 });
|
|
766
766
|
} catch {
|
|
767
767
|
if (d) return;
|
|
768
|
-
|
|
768
|
+
o.value = !0, si || (si = !0, Et.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
771
|
function p() {
|
|
772
|
-
if (!
|
|
773
|
-
let
|
|
772
|
+
if (!s.value) return;
|
|
773
|
+
let i = s.value.lintTemplate(e.content.value, {
|
|
774
774
|
...e.options,
|
|
775
775
|
...e.customBlocks === void 0 ? {} : { customBlocks: e.customBlocks },
|
|
776
776
|
...e.mergeTagSyntax === void 0 ? {} : { mergeTagSyntax: e.mergeTagSyntax }
|
|
777
777
|
});
|
|
778
|
-
|
|
778
|
+
r.value = n.value, t.value = i;
|
|
779
779
|
}
|
|
780
|
-
let m =
|
|
781
|
-
|
|
780
|
+
let m = c(() => e.options, () => {
|
|
781
|
+
s.value && p();
|
|
782
782
|
}, { deep: !0 });
|
|
783
783
|
function h(t) {
|
|
784
784
|
t.fix && t.fix.apply({
|
|
@@ -791,21 +791,21 @@ function ci(e) {
|
|
|
791
791
|
});
|
|
792
792
|
}
|
|
793
793
|
function g() {
|
|
794
|
-
d = !0, u?.(),
|
|
794
|
+
d = !0, u?.(), i(), m();
|
|
795
795
|
}
|
|
796
796
|
return {
|
|
797
|
-
issues:
|
|
798
|
-
contentVersion:
|
|
799
|
-
lintVersion:
|
|
800
|
-
ready:
|
|
801
|
-
unavailable:
|
|
797
|
+
issues: t,
|
|
798
|
+
contentVersion: n,
|
|
799
|
+
lintVersion: r,
|
|
800
|
+
ready: a,
|
|
801
|
+
unavailable: o,
|
|
802
802
|
applyFix: h,
|
|
803
803
|
destroy: g
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
// src/composables/useKeyboardReorder.ts
|
|
807
807
|
function li(e, t, n = []) {
|
|
808
|
-
let r =
|
|
808
|
+
let r = M(null), i = M(""), a = null;
|
|
809
809
|
function o(t) {
|
|
810
810
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
811
811
|
if (r !== -1) return {
|
|
@@ -831,7 +831,7 @@ function li(e, t, n = []) {
|
|
|
831
831
|
let i = o(r);
|
|
832
832
|
if (!i) return "";
|
|
833
833
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
834
|
-
return a ?
|
|
834
|
+
return a ? ir(a, t.t, n) : "";
|
|
835
835
|
}
|
|
836
836
|
function c(t, n) {
|
|
837
837
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -900,12 +900,12 @@ function li(e, t, n = []) {
|
|
|
900
900
|
}
|
|
901
901
|
// src/composables/useUiTheme.ts
|
|
902
902
|
function ui(e) {
|
|
903
|
-
let
|
|
904
|
-
return { resolvedTheme:
|
|
903
|
+
let n = t("(prefers-color-scheme: dark)");
|
|
904
|
+
return { resolvedTheme: k(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
|
|
905
905
|
}
|
|
906
906
|
// src/composables/useCustomBlockStylesheets.ts
|
|
907
907
|
function di(e, t) {
|
|
908
|
-
return
|
|
908
|
+
return k(() => {
|
|
909
909
|
let n = fi(e.value.blocks);
|
|
910
910
|
if (n.size === 0) return [];
|
|
911
911
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
@@ -923,66 +923,66 @@ function fi(e) {
|
|
|
923
923
|
return pi(e, t), t;
|
|
924
924
|
}
|
|
925
925
|
function pi(e, t) {
|
|
926
|
-
for (let n of e) if (
|
|
926
|
+
for (let n of e) if (Ke(n)) t.add(n.customType);
|
|
927
927
|
else if (n.type === "section") {
|
|
928
928
|
let e = n.children;
|
|
929
929
|
if (!e) continue;
|
|
930
930
|
for (let n of e) pi(n, t);
|
|
931
|
-
} else
|
|
931
|
+
} else Me(n) && pi(n.children, t);
|
|
932
932
|
}
|
|
933
933
|
// src/utils/registerBuiltInBlocks.ts
|
|
934
934
|
var mi = [
|
|
935
935
|
{
|
|
936
936
|
type: "section",
|
|
937
|
-
createBlock:
|
|
937
|
+
createBlock: xe
|
|
938
938
|
},
|
|
939
939
|
{
|
|
940
940
|
type: "title",
|
|
941
|
-
createBlock:
|
|
941
|
+
createBlock: Ce
|
|
942
942
|
},
|
|
943
943
|
{
|
|
944
944
|
type: "paragraph",
|
|
945
|
-
createBlock:
|
|
945
|
+
createBlock: Re
|
|
946
946
|
},
|
|
947
947
|
{
|
|
948
948
|
type: "image",
|
|
949
|
-
createBlock:
|
|
949
|
+
createBlock: wt
|
|
950
950
|
},
|
|
951
951
|
{
|
|
952
952
|
type: "button",
|
|
953
|
-
createBlock:
|
|
953
|
+
createBlock: ke
|
|
954
954
|
},
|
|
955
955
|
{
|
|
956
956
|
type: "divider",
|
|
957
|
-
createBlock:
|
|
957
|
+
createBlock: De
|
|
958
958
|
},
|
|
959
959
|
{
|
|
960
960
|
type: "video",
|
|
961
|
-
createBlock:
|
|
961
|
+
createBlock: He
|
|
962
962
|
},
|
|
963
963
|
{
|
|
964
964
|
type: "social",
|
|
965
|
-
createBlock:
|
|
965
|
+
createBlock: ye
|
|
966
966
|
},
|
|
967
967
|
{
|
|
968
968
|
type: "menu",
|
|
969
|
-
createBlock:
|
|
969
|
+
createBlock: ge
|
|
970
970
|
},
|
|
971
971
|
{
|
|
972
972
|
type: "table",
|
|
973
|
-
createBlock:
|
|
973
|
+
createBlock: dt
|
|
974
974
|
},
|
|
975
975
|
{
|
|
976
976
|
type: "spacer",
|
|
977
|
-
createBlock:
|
|
977
|
+
createBlock: Te
|
|
978
978
|
},
|
|
979
979
|
{
|
|
980
980
|
type: "html",
|
|
981
|
-
createBlock:
|
|
981
|
+
createBlock: Fe
|
|
982
982
|
},
|
|
983
983
|
{
|
|
984
984
|
type: "countdown",
|
|
985
|
-
createBlock:
|
|
985
|
+
createBlock: je
|
|
986
986
|
}
|
|
987
987
|
];
|
|
988
988
|
function hi(e, t) {
|
|
@@ -1003,10 +1003,10 @@ function _i(e) {
|
|
|
1003
1003
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1004
1004
|
}
|
|
1005
1005
|
function vi(e, t, n) {
|
|
1006
|
-
let r = new Set(e.map((e) =>
|
|
1007
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1006
|
+
let r = new Set(e.map((e) => Dt(e))), i = [], a = (e, t) => {
|
|
1007
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Dt(o)) && i.push(`${t}.${n}: ${o}`) : _i(o) && a(o, `${t}.${n}`);
|
|
1008
1008
|
}, o = t;
|
|
1009
|
-
for (let [e, t] of Object.entries(
|
|
1009
|
+
for (let [e, t] of Object.entries(ct)) {
|
|
1010
1010
|
let n = o?.[e];
|
|
1011
1011
|
a({
|
|
1012
1012
|
...t,
|
|
@@ -1014,7 +1014,7 @@ function vi(e, t, n) {
|
|
|
1014
1014
|
}, e);
|
|
1015
1015
|
}
|
|
1016
1016
|
return a({
|
|
1017
|
-
...
|
|
1017
|
+
...ht,
|
|
1018
1018
|
...n ?? {}
|
|
1019
1019
|
}, "template"), i;
|
|
1020
1020
|
}
|
|
@@ -1173,7 +1173,7 @@ function zi(e) {
|
|
|
1173
1173
|
// src/utils/collectColorFieldIssues.ts
|
|
1174
1174
|
function Bi(e, t) {
|
|
1175
1175
|
let n = [], r = (r, i) => {
|
|
1176
|
-
let a =
|
|
1176
|
+
let a = tr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1177
1177
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1178
1178
|
id: s("invalid-presets"),
|
|
1179
1179
|
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." : "")
|
|
@@ -1184,8 +1184,8 @@ function Bi(e, t) {
|
|
|
1184
1184
|
id: s("allow-custom-ignored"),
|
|
1185
1185
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1186
1186
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1187
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1188
|
-
e !== "" && !t.has(
|
|
1187
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Dt(e)));
|
|
1188
|
+
e !== "" && !t.has(Dt(e)) && n.push({
|
|
1189
1189
|
id: s("off-palette-default"),
|
|
1190
1190
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1191
1191
|
});
|
|
@@ -1244,9 +1244,9 @@ function Wi(e, t, n) {
|
|
|
1244
1244
|
var Gi = "--tpl-block-bg-layer", Ki = "--tpl-email-frame-width", qi = "tpl-has-bg-image";
|
|
1245
1245
|
function Ji(e, t) {
|
|
1246
1246
|
if (t === null) return {};
|
|
1247
|
-
let n =
|
|
1247
|
+
let n = Tt(e);
|
|
1248
1248
|
if (n === null) return {};
|
|
1249
|
-
let r = t?.trim(), i = r ?
|
|
1249
|
+
let r = t?.trim(), i = r ? st(r) : n.url;
|
|
1250
1250
|
return {
|
|
1251
1251
|
backgroundImage: `url("${i}")`,
|
|
1252
1252
|
backgroundSize: n.size,
|
|
@@ -1282,10 +1282,10 @@ function $i(e, t = {}) {
|
|
|
1282
1282
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1283
1283
|
backgroundColor: r || "transparent"
|
|
1284
1284
|
};
|
|
1285
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1286
|
-
let n =
|
|
1285
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Qe.paragraphGap : Qe.paragraphGap}px`), e.type === "section") {
|
|
1286
|
+
let n = et(e.borderRadius);
|
|
1287
1287
|
n !== null && (i.borderRadius = n);
|
|
1288
|
-
let r =
|
|
1288
|
+
let r = Se(e);
|
|
1289
1289
|
r?.applied && e.backgroundImage ? (Object.assign(i, Zi(r, t.heroBoxWidth)), Object.assign(i, Ji({
|
|
1290
1290
|
...e.backgroundImage,
|
|
1291
1291
|
size: "cover",
|
|
@@ -1296,13 +1296,13 @@ function $i(e, t = {}) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
function ea(e, t, n, r) {
|
|
1298
1298
|
return e.type === "section" ? $i(e, {
|
|
1299
|
-
backgroundImageUrl:
|
|
1299
|
+
backgroundImageUrl: Ln(t, e.backgroundImage, n),
|
|
1300
1300
|
heroBoxWidth: r
|
|
1301
1301
|
}) : $i(e);
|
|
1302
1302
|
}
|
|
1303
1303
|
function ta(e) {
|
|
1304
1304
|
let t = {};
|
|
1305
|
-
for (let [n, r] of Object.entries(
|
|
1305
|
+
for (let [n, r] of Object.entries(pt(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1306
1306
|
return t;
|
|
1307
1307
|
}
|
|
1308
1308
|
var na = {
|
|
@@ -1327,7 +1327,7 @@ function aa(e, t = {}) {
|
|
|
1327
1327
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1328
1328
|
let n = e.wrapper, r = {};
|
|
1329
1329
|
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = ra(n.padding)), !n.fullWidth) {
|
|
1330
|
-
let e =
|
|
1330
|
+
let e = et(n.borderRadius);
|
|
1331
1331
|
e !== null && (r.borderRadius = e);
|
|
1332
1332
|
}
|
|
1333
1333
|
return Object.assign(r, Ji(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, na), r;
|
|
@@ -1341,24 +1341,24 @@ function oa(e, t = {}) {
|
|
|
1341
1341
|
function sa(e, t, n, r = !1) {
|
|
1342
1342
|
if (!e) return [];
|
|
1343
1343
|
let i = [], a = 0;
|
|
1344
|
-
for (let o of
|
|
1344
|
+
for (let o of we(e, n)) {
|
|
1345
1345
|
o.index > a && i.push({
|
|
1346
1346
|
type: "text",
|
|
1347
1347
|
value: e.slice(a, o.index)
|
|
1348
1348
|
});
|
|
1349
1349
|
let s = o.value;
|
|
1350
|
-
if (
|
|
1351
|
-
let e = r ?
|
|
1350
|
+
if (Je(s, n)) {
|
|
1351
|
+
let e = r ? Xe(s, t) : void 0;
|
|
1352
1352
|
i.push(e === void 0 ? {
|
|
1353
1353
|
type: "tag",
|
|
1354
|
-
value:
|
|
1354
|
+
value: vt(s, t)
|
|
1355
1355
|
} : {
|
|
1356
1356
|
type: "text",
|
|
1357
1357
|
value: e
|
|
1358
1358
|
});
|
|
1359
|
-
} else
|
|
1359
|
+
} else Ct(s, n) ? i.push({
|
|
1360
1360
|
type: "tag",
|
|
1361
|
-
value:
|
|
1361
|
+
value: it(s, n)
|
|
1362
1362
|
}) : i.push({
|
|
1363
1363
|
type: "text",
|
|
1364
1364
|
value: s
|
|
@@ -1371,31 +1371,31 @@ function sa(e, t, n, r = !1) {
|
|
|
1371
1371
|
}), i;
|
|
1372
1372
|
}
|
|
1373
1373
|
// src/components/MergeTagPreviewText.vue
|
|
1374
|
-
var ca =
|
|
1374
|
+
var ca = z({
|
|
1375
1375
|
name: "MergeTagPreviewText",
|
|
1376
1376
|
props: { text: {
|
|
1377
1377
|
type: String,
|
|
1378
1378
|
required: !0
|
|
1379
1379
|
} },
|
|
1380
1380
|
setup(e) {
|
|
1381
|
-
let t =
|
|
1382
|
-
return () => i.value.map((e, t) => e.type === "tag" ?
|
|
1381
|
+
let t = R(Yt, en), n = R(It, $e.liquid), r = R(xn, null), i = k(() => sa(e.text, t.value, n, r?.value ?? !1));
|
|
1382
|
+
return () => i.value.map((e, t) => e.type === "tag" ? x("span", {
|
|
1383
1383
|
key: t,
|
|
1384
1384
|
class: "tpl-merge-tag-label"
|
|
1385
1385
|
}, e.value) : e.value);
|
|
1386
1386
|
}
|
|
1387
|
-
}), la = ["href"], ua = /* @__PURE__ */
|
|
1387
|
+
}), la = ["href"], ua = /* @__PURE__ */ z({
|
|
1388
1388
|
__name: "ButtonBlock",
|
|
1389
1389
|
props: {
|
|
1390
1390
|
block: {},
|
|
1391
1391
|
viewport: {}
|
|
1392
1392
|
},
|
|
1393
1393
|
setup(e) {
|
|
1394
|
-
let t = e, n =
|
|
1394
|
+
let t = e, n = Dn(cn, "ButtonBlock");
|
|
1395
1395
|
function r(e) {
|
|
1396
1396
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1397
1397
|
}
|
|
1398
|
-
let
|
|
1398
|
+
let a = k(() => {
|
|
1399
1399
|
let e = {
|
|
1400
1400
|
display: "inline-block",
|
|
1401
1401
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -1404,46 +1404,46 @@ var ca = R({
|
|
|
1404
1404
|
fontSize: `${t.block.fontSize}px`,
|
|
1405
1405
|
fontWeight: r(t.block.fontWeight),
|
|
1406
1406
|
textDecoration: "none",
|
|
1407
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1407
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : et(t.block.borderRadius) ?? "0px",
|
|
1408
1408
|
textAlign: "center"
|
|
1409
1409
|
};
|
|
1410
1410
|
return Object.assign(e, ta(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1411
|
-
}),
|
|
1412
|
-
return (t, n) => (
|
|
1411
|
+
}), o = k(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1412
|
+
return (t, n) => (m(), N("div", { style: y(o.value) }, [F("a", {
|
|
1413
1413
|
href: e.block.url || "#",
|
|
1414
|
-
style:
|
|
1414
|
+
style: y(a.value),
|
|
1415
1415
|
class: "tpl:cursor-default",
|
|
1416
|
-
onClick: n[0] ||=
|
|
1417
|
-
}, [
|
|
1416
|
+
onClick: n[0] ||= i(() => {}, ["prevent"])
|
|
1417
|
+
}, [E(ca, { text: e.block.text }, null, 8, ["text"])], 12, la)], 4));
|
|
1418
1418
|
}
|
|
1419
1419
|
}), da = ["innerHTML"], fa = [
|
|
1420
1420
|
"src",
|
|
1421
1421
|
"width",
|
|
1422
1422
|
"height"
|
|
1423
|
-
], pa = /* @__PURE__ */
|
|
1423
|
+
], pa = /* @__PURE__ */ z({
|
|
1424
1424
|
__name: "CustomBlockIcon",
|
|
1425
1425
|
props: {
|
|
1426
1426
|
icon: {},
|
|
1427
1427
|
size: {}
|
|
1428
1428
|
},
|
|
1429
1429
|
setup(e) {
|
|
1430
|
-
let t = e, n =
|
|
1431
|
-
return (t, o) => r.value ? (
|
|
1430
|
+
let t = e, n = k(() => t.size ?? 20), r = k(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = k(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = k(() => r.value ? cr(t.icon ?? "") : "");
|
|
1431
|
+
return (t, o) => r.value ? (m(), N("span", {
|
|
1432
1432
|
key: 0,
|
|
1433
1433
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
1434
|
-
style:
|
|
1434
|
+
style: y({
|
|
1435
1435
|
width: `${n.value}px`,
|
|
1436
1436
|
height: `${n.value}px`
|
|
1437
1437
|
}),
|
|
1438
1438
|
innerHTML: a.value
|
|
1439
|
-
}, null, 12, da)) : i.value ? (
|
|
1439
|
+
}, null, 12, da)) : i.value ? (m(), N("img", {
|
|
1440
1440
|
key: 1,
|
|
1441
1441
|
src: e.icon,
|
|
1442
1442
|
width: n.value,
|
|
1443
1443
|
height: n.value,
|
|
1444
1444
|
class: "tpl:inline-block",
|
|
1445
1445
|
alt: ""
|
|
1446
|
-
}, null, 8, fa)) : (
|
|
1446
|
+
}, null, 8, fa)) : (m(), oe(A(Or), {
|
|
1447
1447
|
key: 2,
|
|
1448
1448
|
size: n.value,
|
|
1449
1449
|
"stroke-width": 1.5
|
|
@@ -1462,85 +1462,85 @@ var ca = R({
|
|
|
1462
1462
|
key: 0,
|
|
1463
1463
|
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]",
|
|
1464
1464
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1465
|
-
}, Sa = /* @__PURE__ */
|
|
1465
|
+
}, Sa = /* @__PURE__ */ z({
|
|
1466
1466
|
__name: "CustomBlock",
|
|
1467
1467
|
props: {
|
|
1468
1468
|
block: {},
|
|
1469
1469
|
viewport: {}
|
|
1470
1470
|
},
|
|
1471
1471
|
emits: ["fetchData"],
|
|
1472
|
-
setup(
|
|
1473
|
-
let
|
|
1472
|
+
setup(e, { emit: t }) {
|
|
1473
|
+
let n = e, r = t, { t: a } = le(), o = R(vn, null), l = M(""), u = k(() => ur(l.value)), f = M(!1), p = k(() => o?.getDefinition(n.block.customType)), h = k(() => !!p.value), g = k(() => n.block), { isFetching: _, fetch: v, needsFetch: y, hasDataSource: b } = In({
|
|
1474
1474
|
definition: p,
|
|
1475
|
-
block:
|
|
1475
|
+
block: g,
|
|
1476
1476
|
onUpdate: (e, t) => {
|
|
1477
|
-
|
|
1477
|
+
r("fetchData", {
|
|
1478
1478
|
fieldValues: e,
|
|
1479
1479
|
dataSourceFetched: t
|
|
1480
1480
|
});
|
|
1481
1481
|
}
|
|
1482
|
-
}), x =
|
|
1483
|
-
if (!S?.value) return
|
|
1482
|
+
}), x = R(Yt, en), S = R(xn, null), C = k(() => {
|
|
1483
|
+
if (!S?.value) return n.block;
|
|
1484
1484
|
let e = {};
|
|
1485
|
-
for (let [t,
|
|
1485
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? _t(r, x.value) : r;
|
|
1486
1486
|
return {
|
|
1487
|
-
...
|
|
1487
|
+
...n.block,
|
|
1488
1488
|
fieldValues: e
|
|
1489
1489
|
};
|
|
1490
1490
|
});
|
|
1491
|
-
async function
|
|
1492
|
-
if (
|
|
1491
|
+
async function w() {
|
|
1492
|
+
if (o) {
|
|
1493
1493
|
f.value = !1;
|
|
1494
1494
|
try {
|
|
1495
|
-
let e = await
|
|
1496
|
-
e.includes("Template render error:") && (f.value = !0),
|
|
1495
|
+
let e = await o.renderCustomBlock(C.value);
|
|
1496
|
+
e.includes("Template render error:") && (f.value = !0), l.value = e;
|
|
1497
1497
|
} catch {
|
|
1498
|
-
f.value = !0,
|
|
1498
|
+
f.value = !0, l.value = "";
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
let
|
|
1503
|
-
return
|
|
1504
|
-
|
|
1505
|
-
}),
|
|
1506
|
-
|
|
1507
|
-
}, { deep: !0 }),
|
|
1508
|
-
|
|
1509
|
-
}), (e, t) => (
|
|
1502
|
+
let T = de(w, 150);
|
|
1503
|
+
return s(() => {
|
|
1504
|
+
w();
|
|
1505
|
+
}), c(() => n.block.fieldValues, () => {
|
|
1506
|
+
T();
|
|
1507
|
+
}, { deep: !0 }), c(() => S?.value, () => {
|
|
1508
|
+
T();
|
|
1509
|
+
}), (e, t) => (m(), N("div", ma, [h.value ? f.value ? (m(), N("div", _a, [E(A(pr), {
|
|
1510
1510
|
size: 24,
|
|
1511
1511
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1512
|
-
}),
|
|
1512
|
+
}), F("span", va, d(A(a).customBlocks.renderError), 1)])) : (m(), N("div", ya, [F("div", { innerHTML: u.value }, null, 8, ba), A(b) && A(y) ? (m(), N("div", xa, [A(_) ? (m(), oe(fr, {
|
|
1513
1513
|
key: 1,
|
|
1514
1514
|
class: "tpl:w-48"
|
|
1515
|
-
})) : (
|
|
1515
|
+
})) : (m(), N("button", {
|
|
1516
1516
|
key: 0,
|
|
1517
1517
|
type: "button",
|
|
1518
1518
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1519
|
-
onClick: t[0] ||=
|
|
1520
|
-
}, [p.value?.icon ? (
|
|
1519
|
+
onClick: t[0] ||= i((...e) => A(v) && A(v)(...e), ["stop"])
|
|
1520
|
+
}, [p.value?.icon ? (m(), oe(pa, {
|
|
1521
1521
|
key: 0,
|
|
1522
1522
|
icon: p.value.icon,
|
|
1523
1523
|
size: 16
|
|
1524
|
-
}, null, 8, ["icon"])) :
|
|
1524
|
+
}, null, 8, ["icon"])) : j("", !0), te(" " + d(p.value?.dataSource?.label || A(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (m(), N("div", ha, [E(A(Mr), {
|
|
1525
1525
|
size: 24,
|
|
1526
1526
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1527
|
-
}),
|
|
1527
|
+
}), F("span", ga, d(A(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1528
1528
|
}
|
|
1529
|
-
}), Ca = { class: "tpl:w-full" }, wa = /* @__PURE__ */
|
|
1529
|
+
}), Ca = { class: "tpl:w-full" }, wa = /* @__PURE__ */ z({
|
|
1530
1530
|
__name: "DividerBlock",
|
|
1531
1531
|
props: {
|
|
1532
1532
|
block: {},
|
|
1533
1533
|
viewport: {}
|
|
1534
1534
|
},
|
|
1535
1535
|
setup(e) {
|
|
1536
|
-
let t = e, n =
|
|
1536
|
+
let t = e, n = k(() => ({
|
|
1537
1537
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1538
1538
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1539
1539
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1540
1540
|
}));
|
|
1541
|
-
return (e, t) => (
|
|
1541
|
+
return (e, t) => (m(), N("div", Ca, [F("hr", {
|
|
1542
1542
|
class: "tpl:m-0 tpl:border-none",
|
|
1543
|
-
style:
|
|
1543
|
+
style: y(n.value)
|
|
1544
1544
|
}, null, 4)]));
|
|
1545
1545
|
}
|
|
1546
1546
|
}), Ta = { class: "tpl:w-full" }, Ea = ["srcdoc", "title"], Da = {
|
|
@@ -1552,41 +1552,41 @@ var ca = R({
|
|
|
1552
1552
|
}, ka = {
|
|
1553
1553
|
key: 1,
|
|
1554
1554
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1555
|
-
}, Aa = /* @__PURE__ */
|
|
1555
|
+
}, Aa = /* @__PURE__ */ z({
|
|
1556
1556
|
__name: "HtmlBlock",
|
|
1557
1557
|
props: {
|
|
1558
1558
|
block: {},
|
|
1559
1559
|
viewport: {}
|
|
1560
1560
|
},
|
|
1561
1561
|
setup(e) {
|
|
1562
|
-
let
|
|
1563
|
-
function
|
|
1564
|
-
let e =
|
|
1565
|
-
e && (
|
|
1562
|
+
let t = e, { t: n } = le(), r = R(Zt, !1), i = k(() => t.block.content.trim().length > 0), a = k(() => r && i.value), o = R(Yt, en), s = R(xn, null), l = k(() => s?.value ? _t(t.block.content, o.value) : t.block.content), u = M(null), f = M(60), p = null;
|
|
1563
|
+
function h() {
|
|
1564
|
+
let e = u.value?.contentDocument;
|
|
1565
|
+
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1568
|
-
|
|
1569
|
-
let e =
|
|
1570
|
-
e && typeof ResizeObserver < "u" && (
|
|
1567
|
+
function g() {
|
|
1568
|
+
p?.disconnect(), p = null, h();
|
|
1569
|
+
let e = u.value?.contentDocument?.documentElement;
|
|
1570
|
+
e && typeof ResizeObserver < "u" && (p = new ResizeObserver(() => h()), p.observe(e));
|
|
1571
1571
|
}
|
|
1572
|
-
return
|
|
1573
|
-
e || (
|
|
1574
|
-
}),
|
|
1575
|
-
|
|
1576
|
-
}), (e, t) => (
|
|
1572
|
+
return c(a, (e) => {
|
|
1573
|
+
e || (p?.disconnect(), p = null);
|
|
1574
|
+
}), ne(() => {
|
|
1575
|
+
p?.disconnect(), p = null;
|
|
1576
|
+
}), (e, t) => (m(), N("div", Ta, [a.value ? (m(), N("iframe", {
|
|
1577
1577
|
key: 0,
|
|
1578
1578
|
ref_key: "iframeRef",
|
|
1579
|
-
ref:
|
|
1580
|
-
srcdoc:
|
|
1579
|
+
ref: u,
|
|
1580
|
+
srcdoc: l.value,
|
|
1581
1581
|
sandbox: "allow-same-origin",
|
|
1582
|
-
title:
|
|
1582
|
+
title: A(n).html.preview,
|
|
1583
1583
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1584
|
-
style:
|
|
1585
|
-
onLoad:
|
|
1586
|
-
}, null, 44, Ea)) : (
|
|
1584
|
+
style: y({ height: `${f.value}px` }),
|
|
1585
|
+
onLoad: g
|
|
1586
|
+
}, null, 44, Ea)) : (m(), N("div", Da, [E(A(Xn), {
|
|
1587
1587
|
size: 24,
|
|
1588
1588
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1589
|
-
}),
|
|
1589
|
+
}), i.value ? (m(), N("span", Oa, d(A(n).html.preview), 1)) : (m(), N("span", ka, d(A(n).html.empty), 1))]))]));
|
|
1590
1590
|
}
|
|
1591
1591
|
}), ja = ["data-drop-enabled"], Ma = ["href"], Na = ["src", "alt"], Pa = ["src", "alt"], Fa = {
|
|
1592
1592
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
@@ -1594,7 +1594,7 @@ var ca = R({
|
|
|
1594
1594
|
}, Ia = ["href"], La = ["src", "alt"], Ra = ["src", "alt"], za = {
|
|
1595
1595
|
key: 4,
|
|
1596
1596
|
class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1597
|
-
}, Ba = ["aria-label"], Va = { key: 1 }, Ha = /* @__PURE__ */
|
|
1597
|
+
}, Ba = ["aria-label"], Va = { key: 1 }, Ha = /* @__PURE__ */ z({
|
|
1598
1598
|
__name: "ImageBlock",
|
|
1599
1599
|
props: {
|
|
1600
1600
|
block: {},
|
|
@@ -1602,111 +1602,111 @@ var ca = R({
|
|
|
1602
1602
|
},
|
|
1603
1603
|
emits: ["update"],
|
|
1604
1604
|
setup(e, { emit: t }) {
|
|
1605
|
-
let n = e, r = t, { t: a } =
|
|
1606
|
-
function
|
|
1605
|
+
let n = e, r = t, { t: a } = le(), { syntax: o } = B(), s = k(() => rt(n.block.src, o));
|
|
1606
|
+
function c(e) {
|
|
1607
1607
|
let t = {
|
|
1608
1608
|
src: e.url,
|
|
1609
|
-
...
|
|
1609
|
+
...Yn(Kn(e.width, e.height))
|
|
1610
1610
|
};
|
|
1611
1611
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1612
1612
|
}
|
|
1613
|
-
let
|
|
1614
|
-
target:
|
|
1615
|
-
blocked:
|
|
1616
|
-
apply:
|
|
1617
|
-
}), _ =
|
|
1618
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1613
|
+
let l = M(), { canBrowse: u, dropEnabled: f, isUploading: p, showOverlay: h, openMediaBrowser: g } = er({
|
|
1614
|
+
target: l,
|
|
1615
|
+
blocked: s,
|
|
1616
|
+
apply: c
|
|
1617
|
+
}), _ = k(() => ({ textAlign: n.block.align })), v = k(() => {
|
|
1618
|
+
let e = n.block.border, t = ["left", "right"].map((t) => ot(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1619
1619
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1620
|
-
}), b =
|
|
1620
|
+
}), b = k(() => {
|
|
1621
1621
|
let e = n.block.align;
|
|
1622
1622
|
return {
|
|
1623
1623
|
maxWidth: "100%",
|
|
1624
1624
|
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1625
1625
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1626
|
-
borderRadius:
|
|
1626
|
+
borderRadius: et(n.block.borderRadius) ?? void 0,
|
|
1627
1627
|
...ta(n.block.border),
|
|
1628
1628
|
display: "block",
|
|
1629
1629
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1630
1630
|
marginRight: e === "center" ? "auto" : void 0
|
|
1631
1631
|
};
|
|
1632
|
-
}), x =
|
|
1633
|
-
return (t, n) => (
|
|
1632
|
+
}), x = Wn(() => s.value ? void 0 : n.block.src), S = Wn(() => s.value ? n.block.placeholderUrl : void 0);
|
|
1633
|
+
return (t, n) => (m(), N("div", {
|
|
1634
1634
|
ref_key: "dropZoneRef",
|
|
1635
|
-
ref:
|
|
1635
|
+
ref: l,
|
|
1636
1636
|
"data-testid": "image-drop-zone",
|
|
1637
|
-
"data-drop-enabled":
|
|
1637
|
+
"data-drop-enabled": A(f),
|
|
1638
1638
|
class: "tpl:relative tpl:w-full",
|
|
1639
|
-
style:
|
|
1640
|
-
}, [
|
|
1639
|
+
style: y(_.value)
|
|
1640
|
+
}, [A(h) ? (m(), oe(Jn, {
|
|
1641
1641
|
key: 0,
|
|
1642
|
-
uploading:
|
|
1642
|
+
uploading: A(p),
|
|
1643
1643
|
size: "canvas"
|
|
1644
|
-
}, null, 8, ["uploading"])) :
|
|
1644
|
+
}, null, 8, ["uploading"])) : j("", !0), e.block.src && s.value && e.block.placeholderUrl ? (m(), N(L, { key: 1 }, [e.block.linkUrl ? (m(), N("a", {
|
|
1645
1645
|
key: 0,
|
|
1646
1646
|
href: e.block.linkUrl,
|
|
1647
1647
|
target: "_blank",
|
|
1648
1648
|
rel: "noopener noreferrer",
|
|
1649
|
-
onClick: n[0] ||=
|
|
1650
|
-
}, [
|
|
1649
|
+
onClick: n[0] ||= i(() => {}, ["prevent"])
|
|
1650
|
+
}, [F("img", {
|
|
1651
1651
|
class: "tpl:border-0",
|
|
1652
1652
|
loading: "lazy",
|
|
1653
|
-
src:
|
|
1654
|
-
alt: e.block.alt ||
|
|
1655
|
-
style:
|
|
1656
|
-
}, null, 12, Na)], 8, Ma)) : (
|
|
1653
|
+
src: A(S),
|
|
1654
|
+
alt: e.block.alt || A(a).image.altTextPlaceholder,
|
|
1655
|
+
style: y(b.value)
|
|
1656
|
+
}, null, 12, Na)], 8, Ma)) : (m(), N("img", {
|
|
1657
1657
|
key: 1,
|
|
1658
1658
|
class: "tpl:border-0",
|
|
1659
|
-
src:
|
|
1659
|
+
src: A(S),
|
|
1660
1660
|
alt: e.block.alt,
|
|
1661
|
-
style:
|
|
1662
|
-
}, null, 12, Pa))], 64)) : e.block.src &&
|
|
1661
|
+
style: y(b.value)
|
|
1662
|
+
}, null, 12, Pa))], 64)) : e.block.src && s.value ? (m(), N("div", {
|
|
1663
1663
|
key: 2,
|
|
1664
1664
|
class: "tpl:!flex tpl:box-border tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1665
|
-
style:
|
|
1666
|
-
}, [
|
|
1665
|
+
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, b.value])
|
|
1666
|
+
}, [E(A(mr), {
|
|
1667
1667
|
size: 32,
|
|
1668
1668
|
"stroke-width": 1.5,
|
|
1669
1669
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1670
1670
|
style: { opacity: "0.5" }
|
|
1671
|
-
}),
|
|
1671
|
+
}), F("span", Fa, [E(ca, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (m(), N(L, { key: 3 }, [e.block.linkUrl ? (m(), N("a", {
|
|
1672
1672
|
key: 0,
|
|
1673
1673
|
href: e.block.linkUrl,
|
|
1674
1674
|
target: "_blank",
|
|
1675
1675
|
rel: "noopener noreferrer",
|
|
1676
|
-
onClick: n[1] ||=
|
|
1677
|
-
}, [
|
|
1676
|
+
onClick: n[1] ||= i(() => {}, ["prevent"])
|
|
1677
|
+
}, [F("img", {
|
|
1678
1678
|
class: "tpl:border-0",
|
|
1679
1679
|
loading: "lazy",
|
|
1680
|
-
src:
|
|
1681
|
-
alt: e.block.alt ||
|
|
1682
|
-
style:
|
|
1683
|
-
}, null, 12, La)], 8, Ia)) : (
|
|
1680
|
+
src: A(x),
|
|
1681
|
+
alt: e.block.alt || A(a).image.altTextPlaceholder,
|
|
1682
|
+
style: y(b.value)
|
|
1683
|
+
}, null, 12, La)], 8, Ia)) : (m(), N("img", {
|
|
1684
1684
|
key: 1,
|
|
1685
1685
|
class: "tpl:border-0",
|
|
1686
|
-
src:
|
|
1686
|
+
src: A(x),
|
|
1687
1687
|
alt: e.block.alt,
|
|
1688
|
-
style:
|
|
1689
|
-
}, null, 12, Ra))], 64)) : (
|
|
1688
|
+
style: y(b.value)
|
|
1689
|
+
}, null, 12, Ra))], 64)) : (m(), N("div", za, [A(u) ? (m(), N("button", {
|
|
1690
1690
|
key: 0,
|
|
1691
|
-
"aria-label":
|
|
1691
|
+
"aria-label": A(a).image.browseMedia,
|
|
1692
1692
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1693
|
-
onClick: n[2] ||=
|
|
1694
|
-
}, [
|
|
1693
|
+
onClick: n[2] ||= i((...e) => A(g) && A(g)(...e), ["stop"])
|
|
1694
|
+
}, [E(A(mr), {
|
|
1695
1695
|
size: 14,
|
|
1696
1696
|
"stroke-width": 1.5
|
|
1697
|
-
}),
|
|
1697
|
+
}), te(" " + d(A(a).image.browseMedia), 1)], 8, Ba)) : (m(), N("span", Va, d(A(a).image.clickToAdd), 1))]))], 12, ja));
|
|
1698
1698
|
}
|
|
1699
1699
|
}), Ua = { class: "tpl:w-full" }, Wa = ["href"], Ga = {
|
|
1700
1700
|
key: 1,
|
|
1701
1701
|
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)]"
|
|
1702
|
-
}, Ka = /* @__PURE__ */
|
|
1702
|
+
}, Ka = /* @__PURE__ */ z({
|
|
1703
1703
|
__name: "MenuBlock",
|
|
1704
1704
|
props: {
|
|
1705
1705
|
block: {},
|
|
1706
1706
|
viewport: {}
|
|
1707
1707
|
},
|
|
1708
1708
|
setup(e) {
|
|
1709
|
-
let t = e, { t: n } =
|
|
1709
|
+
let t = e, { t: n } = le(), r = Dn(cn, "MenuBlock"), a = k(() => ({
|
|
1710
1710
|
display: "flex",
|
|
1711
1711
|
flexWrap: "wrap",
|
|
1712
1712
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1714,79 +1714,79 @@ var ca = R({
|
|
|
1714
1714
|
fontSize: `${t.block.fontSize}px`,
|
|
1715
1715
|
fontFamily: t.block.fontFamily ? r.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1716
1716
|
alignItems: "center"
|
|
1717
|
-
})), o =
|
|
1718
|
-
function
|
|
1717
|
+
})), o = k(() => t.block.items.length > 0);
|
|
1718
|
+
function s(e) {
|
|
1719
1719
|
return e || t.block.linkColor || t.block.color;
|
|
1720
1720
|
}
|
|
1721
|
-
return (t, r) => (
|
|
1721
|
+
return (t, r) => (m(), N("div", Ua, [o.value ? (m(), N("div", {
|
|
1722
1722
|
key: 0,
|
|
1723
|
-
style:
|
|
1724
|
-
}, [(
|
|
1723
|
+
style: y(a.value)
|
|
1724
|
+
}, [(m(!0), N(L, null, v(e.block.items, (t, n) => (m(), N(L, { key: t.id }, [F("a", {
|
|
1725
1725
|
href: t.url || "#",
|
|
1726
1726
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1727
|
-
style:
|
|
1728
|
-
color:
|
|
1727
|
+
style: y({
|
|
1728
|
+
color: s(t.color),
|
|
1729
1729
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1730
1730
|
textDecoration: t.underline ? "underline" : "none"
|
|
1731
1731
|
}),
|
|
1732
|
-
onClick: r[0] ||=
|
|
1733
|
-
}, [
|
|
1732
|
+
onClick: r[0] ||= i(() => {}, ["prevent"])
|
|
1733
|
+
}, [E(ca, { text: t.text || "..." }, null, 8, ["text"])], 12, Wa), n < e.block.items.length - 1 ? (m(), N("span", {
|
|
1734
1734
|
key: 0,
|
|
1735
|
-
style:
|
|
1735
|
+
style: y({
|
|
1736
1736
|
color: e.block.separatorColor,
|
|
1737
1737
|
padding: `0 ${e.block.spacing}px`
|
|
1738
1738
|
})
|
|
1739
|
-
},
|
|
1739
|
+
}, d(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (m(), N("div", Ga, [E(A(Hn), { size: 16 }), F("span", null, d(A(n).menu.addLinks), 1)]))]));
|
|
1740
1740
|
}
|
|
1741
1741
|
});
|
|
1742
1742
|
// src/composables/useEditableTextBlock.ts
|
|
1743
1743
|
function qa(e) {
|
|
1744
|
-
let t =
|
|
1745
|
-
top:
|
|
1746
|
-
left:
|
|
1744
|
+
let t = R(Yt, en), r = R(xn, null), { syntax: i } = B(), a = k(() => r?.value ? Ze(e(), t.value) : Be(e(), t.value)), o = k(() => tt(ur(Le(a.value, i)))), s = M(!1), c = M(null), { top: l, left: u } = n(c), { toLocal: d } = Mt(), f = k(() => d({
|
|
1745
|
+
top: l.value - 8,
|
|
1746
|
+
left: u.value
|
|
1747
1747
|
}));
|
|
1748
|
-
function f() {
|
|
1749
|
-
o.value = !0;
|
|
1750
|
-
}
|
|
1751
1748
|
function p() {
|
|
1752
|
-
|
|
1749
|
+
s.value = !0;
|
|
1750
|
+
}
|
|
1751
|
+
function m() {
|
|
1752
|
+
s.value = !1;
|
|
1753
1753
|
}
|
|
1754
1754
|
return {
|
|
1755
|
-
isEditing:
|
|
1756
|
-
blockRef:
|
|
1757
|
-
toolbarPosition:
|
|
1758
|
-
resolvedContent:
|
|
1759
|
-
handleDoubleClick:
|
|
1760
|
-
handleEditorDone:
|
|
1755
|
+
isEditing: s,
|
|
1756
|
+
blockRef: c,
|
|
1757
|
+
toolbarPosition: f,
|
|
1758
|
+
resolvedContent: o,
|
|
1759
|
+
handleDoubleClick: p,
|
|
1760
|
+
handleEditorDone: m
|
|
1761
1761
|
};
|
|
1762
1762
|
}
|
|
1763
1763
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1764
|
-
var Ja = ["innerHTML"], Ya = /* @__PURE__ */
|
|
1764
|
+
var Ja = ["innerHTML"], Ya = /* @__PURE__ */ z({
|
|
1765
1765
|
__name: "ParagraphBlock",
|
|
1766
1766
|
props: {
|
|
1767
1767
|
block: {},
|
|
1768
1768
|
viewport: {}
|
|
1769
1769
|
},
|
|
1770
1770
|
setup(e) {
|
|
1771
|
-
let t = e, n =
|
|
1772
|
-
return (t,
|
|
1771
|
+
let t = e, n = se(() => import("./ParagraphEditor-Dqco128s.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = qa(() => t.block.content);
|
|
1772
|
+
return (t, l) => (m(), N("div", {
|
|
1773
1773
|
ref_key: "blockRef",
|
|
1774
1774
|
ref: i,
|
|
1775
1775
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1776
|
-
onDblclick:
|
|
1777
|
-
}, [
|
|
1776
|
+
onDblclick: l[0] ||= (...e) => A(s) && A(s)(...e)
|
|
1777
|
+
}, [A(r) ? (m(), oe(A(n), {
|
|
1778
1778
|
key: 0,
|
|
1779
1779
|
block: e.block,
|
|
1780
|
-
"toolbar-position":
|
|
1781
|
-
onDone:
|
|
1780
|
+
"toolbar-position": A(a),
|
|
1781
|
+
onDone: A(c)
|
|
1782
1782
|
}, null, 8, [
|
|
1783
1783
|
"block",
|
|
1784
1784
|
"toolbar-position",
|
|
1785
1785
|
"onDone"
|
|
1786
|
-
])) : (
|
|
1786
|
+
])) : (m(), N("div", {
|
|
1787
1787
|
key: 1,
|
|
1788
1788
|
class: "tpl-text-content tpl:outline-none",
|
|
1789
|
-
innerHTML:
|
|
1789
|
+
innerHTML: A(o)
|
|
1790
1790
|
}, null, 8, Ja))], 544));
|
|
1791
1791
|
}
|
|
1792
1792
|
});
|
|
@@ -1807,16 +1807,16 @@ function Xa(e, t, n, r = 0, i) {
|
|
|
1807
1807
|
function Za(e, t, n) {
|
|
1808
1808
|
let r = [], i = "\0MT";
|
|
1809
1809
|
for (; e.includes(i);) i += "_";
|
|
1810
|
-
let a = n === "html" ?
|
|
1810
|
+
let a = n === "html" ? Ie(e, (e) => {
|
|
1811
1811
|
let t = r.push(e) - 1;
|
|
1812
1812
|
return `${i}${t}\u0000`;
|
|
1813
1813
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1814
1814
|
start: e.index,
|
|
1815
1815
|
end: e.index + e[0].length
|
|
1816
|
-
})), s = [], c =
|
|
1816
|
+
})), s = [], c = Ue(a, t, "logic"), l = [], u = 0;
|
|
1817
1817
|
for (let e of ["logic", "value"]) {
|
|
1818
1818
|
let r = 0;
|
|
1819
|
-
for (let i of e === "logic" ? c :
|
|
1819
|
+
for (let i of e === "logic" ? c : Ue(a, t, "value")) {
|
|
1820
1820
|
let t = i.index, a = t + i.value.length;
|
|
1821
1821
|
for (; o[r]?.end <= t;) r++;
|
|
1822
1822
|
let c = o[r];
|
|
@@ -1832,7 +1832,7 @@ function Za(e, t, n) {
|
|
|
1832
1832
|
}), s.push({
|
|
1833
1833
|
start: t,
|
|
1834
1834
|
end: a,
|
|
1835
|
-
value: n === "html" ?
|
|
1835
|
+
value: n === "html" ? We(i.value) : i.value
|
|
1836
1836
|
});
|
|
1837
1837
|
}
|
|
1838
1838
|
}
|
|
@@ -1876,7 +1876,7 @@ var $a = [
|
|
|
1876
1876
|
}, mo = ["onClick"], ho = {
|
|
1877
1877
|
key: 7,
|
|
1878
1878
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1879
|
-
}, go = ["data-testid", "disabled"], _o = /*#__PURE__*/
|
|
1879
|
+
}, go = ["data-testid", "disabled"], _o = /*#__PURE__*/ Sr(/* @__PURE__ */ z({
|
|
1880
1880
|
__name: "LocaleStatusChip",
|
|
1881
1881
|
props: {
|
|
1882
1882
|
blockId: {},
|
|
@@ -1895,290 +1895,290 @@ var $a = [
|
|
|
1895
1895
|
editable: { type: Boolean }
|
|
1896
1896
|
},
|
|
1897
1897
|
emits: ["target"],
|
|
1898
|
-
setup(e, { emit:
|
|
1899
|
-
let
|
|
1898
|
+
setup(e, { emit: t }) {
|
|
1899
|
+
let n = e, r = t, a = R(An, null), s = R(Tn, null), l = R(Rt, null), u = R(hn, "en") ?? "en", { t: f, format: g } = le(), b = ce(), x = At(), { toLocal: S } = Mt(), C = M(null), w = M(null), T = M(!1), E = M(!1), D = M(null), O = M(null), te = null, ne = M({
|
|
1900
1900
|
top: 0,
|
|
1901
1901
|
left: 0
|
|
1902
|
-
}),
|
|
1902
|
+
}), re = M({
|
|
1903
1903
|
maxHeight: 0,
|
|
1904
1904
|
maxWidth: 0
|
|
1905
|
-
}),
|
|
1906
|
-
function
|
|
1905
|
+
}), I = `tpl-locale-popover-${gt()}`, ie = k(() => _r(a?.activeLocale?.value ?? "")), ae = k(() => _r(a?.content.value.settings.locale ?? "en"));
|
|
1906
|
+
function se(e, t) {
|
|
1907
1907
|
switch (e) {
|
|
1908
|
-
case "tags-differ": return
|
|
1909
|
-
case "hidden": return
|
|
1910
|
-
case "changed": return
|
|
1911
|
-
case "default-stale": return
|
|
1912
|
-
case "missing": return t === 1 ?
|
|
1913
|
-
default: return t === 1 ?
|
|
1908
|
+
case "tags-differ": return f.localization.tagsDiffer;
|
|
1909
|
+
case "hidden": return g(f.localization.hidden, { language: ie.value });
|
|
1910
|
+
case "changed": return g(f.localization.changed, { language: ie.value });
|
|
1911
|
+
case "default-stale": return vr(f.localization.staleLanguages, t, u);
|
|
1912
|
+
case "missing": return t === 1 ? f.localization.notTranslated : vr(f.localization.notTranslatedCount, t, u);
|
|
1913
|
+
default: return t === 1 ? f.localization.outOfDate : vr(f.localization.staleCount, t, u);
|
|
1914
1914
|
}
|
|
1915
1915
|
}
|
|
1916
|
-
let
|
|
1917
|
-
function
|
|
1918
|
-
|
|
1916
|
+
let z = k(() => se(n.state, n.count)), B = k(() => n.popoverState ?? n.state), ue = k(() => n.popoverCount ?? n.count), de = k(() => se(B.value, ue.value)), fe = k(() => n.state === "hidden" ? kr : n.state === "changed" ? gr : n.state === "default-stale" ? lr : n.state === "stale" ? hr : pr), pe = k(() => B.value === "default-stale" || (B.value === "missing" || B.value === "stale") && ue.value > 1), me = k(() => n.editable && n.eligibleGaps && s?.isAvailable.value);
|
|
1917
|
+
function he(e = !1) {
|
|
1918
|
+
T.value = !1, E.value = !1, te = null, e && C.value?.focus({ preventScroll: !0 });
|
|
1919
1919
|
}
|
|
1920
|
-
async function
|
|
1921
|
-
if (
|
|
1922
|
-
|
|
1920
|
+
async function ge() {
|
|
1921
|
+
if (T.value) return he();
|
|
1922
|
+
x.value && (T.value = !0, await _e());
|
|
1923
1923
|
}
|
|
1924
|
-
async function
|
|
1925
|
-
let e =
|
|
1926
|
-
if (!e || !
|
|
1927
|
-
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8,
|
|
1928
|
-
|
|
1929
|
-
maxHeight:
|
|
1930
|
-
maxWidth:
|
|
1924
|
+
async function _e() {
|
|
1925
|
+
let e = x.value;
|
|
1926
|
+
if (!e || !T.value) return;
|
|
1927
|
+
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
|
|
1928
|
+
re.value = {
|
|
1929
|
+
maxHeight: u - c,
|
|
1930
|
+
maxWidth: d - l
|
|
1931
1931
|
};
|
|
1932
|
-
let
|
|
1933
|
-
if (te =
|
|
1932
|
+
let f = C.value.getBoundingClientRect();
|
|
1933
|
+
if (te = f, ne.value = S({
|
|
1934
1934
|
top: c,
|
|
1935
1935
|
left: l
|
|
1936
|
-
}), await
|
|
1937
|
-
let
|
|
1938
|
-
|
|
1939
|
-
top: Math.max(c, Math.min(v,
|
|
1940
|
-
left: Math.max(l, Math.min(
|
|
1941
|
-
}), await
|
|
1936
|
+
}), await _(), !T.value || !w.value) return;
|
|
1937
|
+
let p = w.value.getBoundingClientRect(), m = Math.min(p.height, re.value.maxHeight), h = Math.min(p.width, re.value.maxWidth), g = f.bottom + 4, v = g + m <= u ? g : f.top - m - 4;
|
|
1938
|
+
ne.value = S({
|
|
1939
|
+
top: Math.max(c, Math.min(v, u - m)),
|
|
1940
|
+
left: Math.max(l, Math.min(f.left, d - h))
|
|
1941
|
+
}), await _(), T.value && (E.value ? O.value : w.value)?.focus({ preventScroll: !0 });
|
|
1942
1942
|
}
|
|
1943
|
-
|
|
1944
|
-
|
|
1943
|
+
c(E, async () => {
|
|
1944
|
+
T.value && (await _e(), T.value && !E.value && D.value?.focus({ preventScroll: !0 }));
|
|
1945
1945
|
});
|
|
1946
|
-
function
|
|
1946
|
+
function ve(e) {
|
|
1947
1947
|
let t = e.composedPath();
|
|
1948
|
-
!t.includes(
|
|
1948
|
+
!t.includes(C.value) && !t.includes(w.value) && he();
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1951
|
-
if (e.composedPath().includes(
|
|
1952
|
-
let t =
|
|
1953
|
-
t && te && t.top === te.top && t.right === te.right ||
|
|
1950
|
+
function ye(e) {
|
|
1951
|
+
if (e.composedPath().includes(w.value)) return;
|
|
1952
|
+
let t = C.value?.getBoundingClientRect();
|
|
1953
|
+
t && te && t.top === te.top && t.right === te.right || he();
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1956
|
-
|
|
1955
|
+
function be() {
|
|
1956
|
+
b.removeEventListener("click", ve, !0), b.removeEventListener("scroll", ye, !0);
|
|
1957
1957
|
}
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
}, { flush: "sync" }),
|
|
1961
|
-
|
|
1962
|
-
}),
|
|
1963
|
-
() =>
|
|
1964
|
-
() =>
|
|
1965
|
-
() =>
|
|
1966
|
-
() =>
|
|
1967
|
-
() =>
|
|
1968
|
-
], () =>
|
|
1969
|
-
let
|
|
1970
|
-
(
|
|
1958
|
+
c(T, (e) => {
|
|
1959
|
+
be(), e ? (b.addEventListener("click", ve, !0), b.addEventListener("scroll", ye, !0)) : r("target", null);
|
|
1960
|
+
}, { flush: "sync" }), c(B, () => {
|
|
1961
|
+
E.value = !1, T.value && _e();
|
|
1962
|
+
}), c([
|
|
1963
|
+
() => n.blockId,
|
|
1964
|
+
() => n.state,
|
|
1965
|
+
() => a?.activeLocale?.value,
|
|
1966
|
+
() => a?.state.template?.id,
|
|
1967
|
+
() => a?.loadVersion?.value
|
|
1968
|
+
], () => he()), P(be);
|
|
1969
|
+
let xe = (e) => {
|
|
1970
|
+
(T.value || x.value) && (r("target", e ?? null), T.value || ge());
|
|
1971
1971
|
};
|
|
1972
|
-
|
|
1973
|
-
t &&
|
|
1974
|
-
}, { immediate: !0 }),
|
|
1975
|
-
|
|
1972
|
+
c(() => n.blockId, (e, t) => {
|
|
1973
|
+
t && l?.get(t) === xe && l.delete(t), l?.set(e, xe);
|
|
1974
|
+
}, { immediate: !0 }), P(() => {
|
|
1975
|
+
l?.get(n.blockId) === xe && l.delete(n.blockId);
|
|
1976
1976
|
});
|
|
1977
|
-
function be() {
|
|
1978
|
-
l?.keepTranslations?.(r.blockId, r.stale), pe(!0);
|
|
1979
|
-
}
|
|
1980
|
-
function xe(e) {
|
|
1981
|
-
l?.resetLocaleFields?.(r.blockId, e), pe(!0);
|
|
1982
|
-
}
|
|
1983
1977
|
function Se() {
|
|
1984
|
-
|
|
1978
|
+
a?.keepTranslations?.(n.blockId, n.stale), he(!0);
|
|
1985
1979
|
}
|
|
1986
1980
|
function Ce(e) {
|
|
1987
|
-
|
|
1981
|
+
a?.resetLocaleFields?.(n.blockId, e), he(!0);
|
|
1988
1982
|
}
|
|
1989
1983
|
function we() {
|
|
1990
|
-
|
|
1991
|
-
only: B.value === "tags-differ" ? "all" : "gaps",
|
|
1992
|
-
blockId: r.blockId
|
|
1993
|
-
}));
|
|
1984
|
+
a?.setBlockHidden?.(n.blockId, !1), he(!0);
|
|
1994
1985
|
}
|
|
1995
|
-
function Te() {
|
|
1996
|
-
|
|
1986
|
+
function Te(e) {
|
|
1987
|
+
a?.setActiveLocale?.(e), he();
|
|
1997
1988
|
}
|
|
1998
1989
|
function Ee() {
|
|
1999
|
-
|
|
1990
|
+
me.value && !s?.running.value && (B.value === "tags-differ" && n.replacesCurrent ? E.value = !0 : s?.translate({
|
|
1991
|
+
only: B.value === "tags-differ" ? "all" : "gaps",
|
|
1992
|
+
blockId: n.blockId
|
|
1993
|
+
}));
|
|
2000
1994
|
}
|
|
2001
1995
|
function De() {
|
|
2002
|
-
|
|
1996
|
+
E.value = !1;
|
|
1997
|
+
}
|
|
1998
|
+
function Oe() {
|
|
1999
|
+
E.value ? De() : he(!0);
|
|
2000
|
+
}
|
|
2001
|
+
function ke() {
|
|
2002
|
+
me.value && !s?.running.value && n.translationCount && (E.value = !1, s?.translate({
|
|
2003
2003
|
only: "all",
|
|
2004
|
-
blockId:
|
|
2004
|
+
blockId: n.blockId
|
|
2005
2005
|
}));
|
|
2006
2006
|
}
|
|
2007
|
-
return (t, n) => (
|
|
2007
|
+
return (t, n) => (m(), N(L, null, [F("button", {
|
|
2008
2008
|
ref_key: "trigger",
|
|
2009
|
-
ref:
|
|
2009
|
+
ref: C,
|
|
2010
2010
|
type: "button",
|
|
2011
2011
|
"data-testid": "locale-chip",
|
|
2012
2012
|
"data-state": e.state,
|
|
2013
|
-
"aria-label":
|
|
2014
|
-
title:
|
|
2015
|
-
"aria-expanded":
|
|
2016
|
-
"aria-controls":
|
|
2013
|
+
"aria-label": z.value,
|
|
2014
|
+
title: z.value,
|
|
2015
|
+
"aria-expanded": T.value,
|
|
2016
|
+
"aria-controls": T.value ? I : void 0,
|
|
2017
2017
|
"aria-haspopup": "dialog",
|
|
2018
2018
|
class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
|
|
2019
|
-
onClick:
|
|
2020
|
-
onKeydown: [
|
|
2021
|
-
}, [(
|
|
2019
|
+
onClick: i(ge, ["stop"]),
|
|
2020
|
+
onKeydown: [o(i(ge, ["stop", "prevent"]), ["enter"]), o(i(Oe, ["stop", "prevent"]), ["esc"])]
|
|
2021
|
+
}, [(m(), oe(p(fe.value), {
|
|
2022
2022
|
size: 12,
|
|
2023
2023
|
"stroke-width": 2,
|
|
2024
2024
|
"aria-hidden": "true"
|
|
2025
|
-
}))], 40, $a),
|
|
2025
|
+
}))], 40, $a), A(x) && T.value ? (m(), oe(ee, {
|
|
2026
2026
|
key: 0,
|
|
2027
|
-
to:
|
|
2028
|
-
}, [
|
|
2029
|
-
id:
|
|
2027
|
+
to: A(x)
|
|
2028
|
+
}, [F("div", {
|
|
2029
|
+
id: I,
|
|
2030
2030
|
ref_key: "popover",
|
|
2031
|
-
ref:
|
|
2031
|
+
ref: w,
|
|
2032
2032
|
role: "dialog",
|
|
2033
|
-
"aria-label":
|
|
2034
|
-
"aria-labelledby":
|
|
2035
|
-
"aria-describedby":
|
|
2033
|
+
"aria-label": E.value ? void 0 : de.value,
|
|
2034
|
+
"aria-labelledby": E.value ? `${I}-question` : void 0,
|
|
2035
|
+
"aria-describedby": E.value ? `${I}-warning` : void 0,
|
|
2036
2036
|
tabindex: "-1",
|
|
2037
2037
|
"data-testid": "locale-popover",
|
|
2038
2038
|
class: "tpl-locale-popover tpl:absolute tpl:z-[10000] tpl:w-[300px] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-sm tpl:text-[var(--tpl-chrome-text)] tpl:shadow-[var(--tpl-shadow-md)] tpl:outline-none",
|
|
2039
|
-
style:
|
|
2040
|
-
top: `${
|
|
2041
|
-
left: `${
|
|
2042
|
-
maxHeight: `${
|
|
2043
|
-
maxWidth: `${
|
|
2039
|
+
style: y({
|
|
2040
|
+
top: `${ne.value.top}px`,
|
|
2041
|
+
left: `${ne.value.left}px`,
|
|
2042
|
+
maxHeight: `${re.value.maxHeight}px`,
|
|
2043
|
+
maxWidth: `${re.value.maxWidth}px`
|
|
2044
2044
|
}),
|
|
2045
|
-
onClick: n[2] ||=
|
|
2046
|
-
onKeydown:
|
|
2047
|
-
}, [
|
|
2048
|
-
|
|
2049
|
-
id: `${
|
|
2045
|
+
onClick: n[2] ||= i(() => {}, ["stop"]),
|
|
2046
|
+
onKeydown: o(i(Oe, ["stop", "prevent"]), ["esc"])
|
|
2047
|
+
}, [E.value ? (m(), N(L, { key: 0 }, [
|
|
2048
|
+
F("h3", {
|
|
2049
|
+
id: `${I}-question`,
|
|
2050
2050
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
2051
|
-
},
|
|
2052
|
-
|
|
2053
|
-
id: `${
|
|
2051
|
+
}, d(A(vr)(A(f).localization.translationConfirmation, e.translationCount ?? 0, A(u))), 9, to),
|
|
2052
|
+
F("p", {
|
|
2053
|
+
id: `${I}-warning`,
|
|
2054
2054
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
2055
|
-
},
|
|
2056
|
-
|
|
2055
|
+
}, d(A(g)(A(f).localization.translationDescription, { language: ie.value })), 9, no),
|
|
2056
|
+
F("div", ro, [F("button", {
|
|
2057
2057
|
ref_key: "confirmationCancel",
|
|
2058
|
-
ref:
|
|
2058
|
+
ref: O,
|
|
2059
2059
|
type: "button",
|
|
2060
2060
|
"data-testid": "translation-confirm-cancel",
|
|
2061
|
-
class:
|
|
2062
|
-
onClick:
|
|
2063
|
-
},
|
|
2061
|
+
class: h(A(br)),
|
|
2062
|
+
onClick: De
|
|
2063
|
+
}, d(A(f).localization.cancel), 3), F("button", {
|
|
2064
2064
|
type: "button",
|
|
2065
2065
|
"data-testid": "translation-confirm",
|
|
2066
|
-
class:
|
|
2067
|
-
disabled: !
|
|
2068
|
-
onClick:
|
|
2069
|
-
},
|
|
2070
|
-
], 64)) : (
|
|
2071
|
-
|
|
2072
|
-
B.value === "missing" ? (
|
|
2066
|
+
class: h(A(xr)),
|
|
2067
|
+
disabled: !me.value || !!A(s)?.running.value || !e.translationCount,
|
|
2068
|
+
onClick: ke
|
|
2069
|
+
}, d(A(vr)(A(f).localization.translateAllFields, e.translationCount ?? 0, A(u))), 11, io)])
|
|
2070
|
+
], 64)) : (m(), N(L, { key: 1 }, [
|
|
2071
|
+
pe.value ? (m(), N("p", ao, d(de.value), 1)) : j("", !0),
|
|
2072
|
+
B.value === "missing" ? (m(), N("p", oo, d(A(g)(A(f).localization.missingExplanation, { default: ae.value })), 1)) : B.value === "stale" ? (m(), N(L, { key: 2 }, [F("p", so, d(A(g)(A(f).localization.staleExplanation, { default: ae.value })), 1), F("p", co, d(A(g)(A(f).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : B.value === "tags-differ" ? (m(), N("p", lo, d(A(g)(A(f).localization.tagsDifferExplanation, { default: ae.value })), 1)) : B.value === "changed" ? (m(), N("p", uo, d(A(vr)(A(f).localization.changedProperties, ue.value, A(u), { default: ae.value })), 1)) : B.value === "hidden" ? (m(), N("p", fo, d(A(g)(A(f).localization.hiddenExplanation, { language: ie.value })), 1)) : (m(), N("ul", po, [(m(!0), N(L, null, v(e.staleLocales, (e) => (m(), N("li", {
|
|
2073
2073
|
key: e,
|
|
2074
2074
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
2075
|
-
}, [
|
|
2075
|
+
}, [F("span", null, d(A(_r)(e)), 1), F("button", {
|
|
2076
2076
|
type: "button",
|
|
2077
|
-
class:
|
|
2078
|
-
onClick: (t) =>
|
|
2079
|
-
},
|
|
2080
|
-
e.editable && B.value !== "default-stale" ? (
|
|
2081
|
-
|
|
2077
|
+
class: h(A(yr)),
|
|
2078
|
+
onClick: (t) => Te(e)
|
|
2079
|
+
}, d(A(f).localization.open), 11, mo)]))), 128))])),
|
|
2080
|
+
e.editable && B.value !== "default-stale" ? (m(), N("div", ho, [
|
|
2081
|
+
me.value && (B.value === "missing" || B.value === "stale" || B.value === "tags-differ") ? (m(), N("button", {
|
|
2082
2082
|
key: 0,
|
|
2083
2083
|
type: "button",
|
|
2084
2084
|
ref_key: "retranslate",
|
|
2085
|
-
ref:
|
|
2085
|
+
ref: D,
|
|
2086
2086
|
"data-testid": B.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
2087
|
-
class:
|
|
2088
|
-
disabled: !!
|
|
2089
|
-
onClick:
|
|
2090
|
-
},
|
|
2091
|
-
B.value === "stale" || B.value === "tags-differ" ? (
|
|
2087
|
+
class: h(A(br)),
|
|
2088
|
+
disabled: !!A(s)?.running.value,
|
|
2089
|
+
onClick: Ee
|
|
2090
|
+
}, d(B.value === "missing" ? A(f).localization.translate : A(f).localization.retranslate), 11, go)) : j("", !0),
|
|
2091
|
+
B.value === "stale" || B.value === "tags-differ" ? (m(), N(L, { key: 1 }, [B.value === "stale" ? (m(), N("button", {
|
|
2092
2092
|
key: 0,
|
|
2093
2093
|
type: "button",
|
|
2094
2094
|
"data-testid": "locale-keep",
|
|
2095
|
-
class:
|
|
2096
|
-
onClick:
|
|
2097
|
-
},
|
|
2095
|
+
class: h(me.value ? A(yr) : A(br)),
|
|
2096
|
+
onClick: Se
|
|
2097
|
+
}, d(A(f).localization.keep), 3)) : j("", !0), F("button", {
|
|
2098
2098
|
type: "button",
|
|
2099
2099
|
"data-testid": "locale-use-default",
|
|
2100
|
-
class:
|
|
2101
|
-
onClick: n[0] ||= (t) =>
|
|
2102
|
-
},
|
|
2103
|
-
B.value === "changed" ? (
|
|
2100
|
+
class: h(B.value === "tags-differ" && !me.value ? A(br) : A(yr)),
|
|
2101
|
+
onClick: n[0] ||= (t) => Ce(B.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2102
|
+
}, d(A(g)(A(f).localization.useDefaultLanguage, { default: ae.value })), 3)], 64)) : j("", !0),
|
|
2103
|
+
B.value === "changed" ? (m(), N("button", {
|
|
2104
2104
|
key: 2,
|
|
2105
2105
|
type: "button",
|
|
2106
2106
|
"data-testid": "locale-reset",
|
|
2107
|
-
class:
|
|
2108
|
-
onClick: n[1] ||= (t) =>
|
|
2109
|
-
},
|
|
2110
|
-
B.value === "hidden" ? (
|
|
2107
|
+
class: h(A(br)),
|
|
2108
|
+
onClick: n[1] ||= (t) => Ce(e.setPaths)
|
|
2109
|
+
}, d(A(f).localization.resetChanges), 3)) : j("", !0),
|
|
2110
|
+
B.value === "hidden" ? (m(), N("button", {
|
|
2111
2111
|
key: 3,
|
|
2112
2112
|
type: "button",
|
|
2113
2113
|
"data-testid": "locale-show",
|
|
2114
|
-
class:
|
|
2115
|
-
onClick:
|
|
2116
|
-
},
|
|
2117
|
-
])) :
|
|
2118
|
-
], 64))], 44, eo)], 8, ["to"])) :
|
|
2114
|
+
class: h(A(br)),
|
|
2115
|
+
onClick: we
|
|
2116
|
+
}, d(A(f).localization.show), 3)) : j("", !0)
|
|
2117
|
+
])) : j("", !0)
|
|
2118
|
+
], 64))], 44, eo)], 8, ["to"])) : j("", !0)], 64));
|
|
2119
2119
|
}
|
|
2120
|
-
}), [["__scopeId", "data-v-3343ae7d"]]), vo = /* @__PURE__ */
|
|
2120
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), vo = /* @__PURE__ */ z({
|
|
2121
2121
|
__name: "LocaleMarkers",
|
|
2122
2122
|
props: { block: {} },
|
|
2123
2123
|
setup(e) {
|
|
2124
|
-
let
|
|
2125
|
-
blocks: [
|
|
2126
|
-
...
|
|
2124
|
+
let t = e, n = R(An, null), r = R(Jt, void 0), i = R(pn, []), a = R(It, $e.liquid), o = R(mn, k(() => /* @__PURE__ */ new Set())), s = k(() => n?.activeLocale?.value), l = k(() => s.value ? t.block.l10n?.[s.value] : void 0), u = k(() => ({
|
|
2125
|
+
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2126
|
+
...t.block,
|
|
2127
2127
|
children: []
|
|
2128
|
-
} :
|
|
2128
|
+
} : t.block],
|
|
2129
2129
|
settings: {
|
|
2130
|
-
locale:
|
|
2131
|
-
locales:
|
|
2130
|
+
locale: n.content.value.settings.locale,
|
|
2131
|
+
locales: n.content.value.settings.locales
|
|
2132
2132
|
}
|
|
2133
|
-
})),
|
|
2133
|
+
})), d = k(() => n && s.value && !o.value.has(s.value) ? he(u.value, s.value, i) : {
|
|
2134
2134
|
missing: [],
|
|
2135
2135
|
stale: [],
|
|
2136
2136
|
translated: []
|
|
2137
|
-
}),
|
|
2138
|
-
let
|
|
2139
|
-
return typeof r == "string" && i !== void 0 && Qa(r, i,
|
|
2140
|
-
})), h =
|
|
2141
|
-
syntax:
|
|
2142
|
-
definitions:
|
|
2143
|
-
doNotTranslate:
|
|
2144
|
-
blockId:
|
|
2145
|
-
only:
|
|
2146
|
-
}).strings : []), _ =
|
|
2147
|
-
let
|
|
2148
|
-
return
|
|
2149
|
-
})), v =
|
|
2150
|
-
let
|
|
2151
|
-
return Array.isArray(i) ?
|
|
2152
|
-
})), y =
|
|
2137
|
+
}), f = k(() => d.value.stale.map((e) => e.slice(t.block.id.length + 1))), p = k(() => d.value.translated.flatMap((e) => {
|
|
2138
|
+
let n = e.slice(t.block.id.length + 1), r = Oe(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || St[t.block.type]?.includes(n) ? "html" : "text";
|
|
2139
|
+
return typeof r == "string" && i !== void 0 && Qa(r, i, a, o) ? [n] : [];
|
|
2140
|
+
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ? Ae(u.value, s.value, {
|
|
2141
|
+
syntax: a,
|
|
2142
|
+
definitions: i,
|
|
2143
|
+
doNotTranslate: r?.doNotTranslate,
|
|
2144
|
+
blockId: t.block.id,
|
|
2145
|
+
only: C.value === "tags-differ" ? "all" : "gaps"
|
|
2146
|
+
}).strings : []), _ = k(() => g.value.some(({ id: e }) => {
|
|
2147
|
+
let n = e.slice(t.block.id.length + 1);
|
|
2148
|
+
return d.value.translated.includes(e) && !p.value.includes(n);
|
|
2149
|
+
})), v = k(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2150
|
+
let n = e.split("."), r = n.pop(), i = n.length ? Oe(t.block, n.join(".")) : t.block;
|
|
2151
|
+
return Array.isArray(i) ? Oe(i, r) !== void 0 : i !== void 0;
|
|
2152
|
+
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && he(u.value, e, i).stale.length > 0) : []), b = k(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : d.value.missing.length ? "missing" : f.value.length ? "stale" : p.value.length ? "tags-differ" : v.value.length ? "changed" : null : y.value.length ? "default-stale" : null);
|
|
2153
2153
|
function x(e) {
|
|
2154
|
-
return e === "missing" ?
|
|
2154
|
+
return e === "missing" ? d.value.missing.length : e === "stale" ? f.value.length : e === "tags-differ" ? p.value.length : e === "default-stale" ? y.value.length : v.value.length;
|
|
2155
2155
|
}
|
|
2156
|
-
let S =
|
|
2157
|
-
|
|
2156
|
+
let S = k(() => x(b.value)), C = k(() => h.value && x(h.value) > 0 ? h.value : b.value), w = k(() => x(C.value));
|
|
2157
|
+
c([b, () => C.value !== (h.value ?? b.value)], () => {
|
|
2158
2158
|
h.value = null;
|
|
2159
2159
|
});
|
|
2160
|
-
let
|
|
2161
|
-
let e =
|
|
2160
|
+
let T = k(() => {
|
|
2161
|
+
let e = Oe(t.block, f.value[0] ?? "");
|
|
2162
2162
|
if (typeof e != "string") return "";
|
|
2163
|
-
let
|
|
2164
|
-
return Array.from(
|
|
2163
|
+
let n = e.split(/<[^>]*>/).join("");
|
|
2164
|
+
return Array.from(n).slice(0, 60).join("");
|
|
2165
2165
|
});
|
|
2166
|
-
return (t, n) =>
|
|
2166
|
+
return (t, n) => A(r) && b.value ? (m(), oe(_o, {
|
|
2167
2167
|
key: 0,
|
|
2168
2168
|
"block-id": e.block.id,
|
|
2169
2169
|
state: b.value,
|
|
2170
2170
|
count: S.value,
|
|
2171
|
-
"popover-state":
|
|
2172
|
-
"popover-count":
|
|
2173
|
-
stale:
|
|
2174
|
-
"tags-differ":
|
|
2171
|
+
"popover-state": C.value ?? void 0,
|
|
2172
|
+
"popover-count": w.value,
|
|
2173
|
+
stale: f.value,
|
|
2174
|
+
"tags-differ": p.value,
|
|
2175
2175
|
"set-paths": v.value,
|
|
2176
2176
|
"stale-locales": y.value,
|
|
2177
|
-
excerpt:
|
|
2177
|
+
excerpt: T.value,
|
|
2178
2178
|
"eligible-gaps": g.value.length > 0,
|
|
2179
2179
|
"translation-count": g.value.length,
|
|
2180
2180
|
"replaces-current": _.value,
|
|
2181
|
-
editable: !!
|
|
2181
|
+
editable: !!s.value && A(r).locales.includes(s.value),
|
|
2182
2182
|
onTarget: n[0] ||= (e) => h.value = e
|
|
2183
2183
|
}, null, 8, [
|
|
2184
2184
|
"block-id",
|
|
@@ -2195,7 +2195,7 @@ var $a = [
|
|
|
2195
2195
|
"translation-count",
|
|
2196
2196
|
"replaces-current",
|
|
2197
2197
|
"editable"
|
|
2198
|
-
])) :
|
|
2198
|
+
])) : j("", !0);
|
|
2199
2199
|
}
|
|
2200
2200
|
}), yo = [
|
|
2201
2201
|
"data-block-id",
|
|
@@ -2211,7 +2211,7 @@ var $a = [
|
|
|
2211
2211
|
}, Oo = { 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)]" }, ko = {
|
|
2212
2212
|
key: 4,
|
|
2213
2213
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2214
|
-
}, Ao = ["aria-label", "title"], jo = /*#__PURE__*/
|
|
2214
|
+
}, Ao = ["aria-label", "title"], jo = /*#__PURE__*/ Sr(/* @__PURE__ */ z({
|
|
2215
2215
|
__name: "BlockWrapper",
|
|
2216
2216
|
props: {
|
|
2217
2217
|
block: {},
|
|
@@ -2223,226 +2223,226 @@ var $a = [
|
|
|
2223
2223
|
picked: { type: Boolean }
|
|
2224
2224
|
},
|
|
2225
2225
|
emits: ["select"],
|
|
2226
|
-
setup(
|
|
2227
|
-
let
|
|
2228
|
-
async function
|
|
2229
|
-
await
|
|
2226
|
+
setup(t, { emit: n }) {
|
|
2227
|
+
let a = se(() => import("./BlockIssueBadge-CxHJmuOh.js")), o = t, s = k(() => o.displayBlock ?? o.block), l = n, { t: p, format: g } = le(), v = R(jn, null), b = M(null), x = k(() => v?.liftedBlockId.value === o.block.id), S = k(() => x.value ? g(p.blockActions.dragLifted, { block: o.block.type }) : p.blockActions.drag);
|
|
2228
|
+
async function C() {
|
|
2229
|
+
await _(), b.value?.focus();
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2232
|
-
|
|
2231
|
+
function w(e) {
|
|
2232
|
+
v && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), x.value ? v.drop(o.block.id) : v.lift(o.block.id)) : x.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), v.cancel(), C()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), v.moveUp(o.block.id), C()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), v.moveDown(o.block.id), C())));
|
|
2233
2233
|
}
|
|
2234
|
-
let
|
|
2235
|
-
desktop:
|
|
2236
|
-
mobile:
|
|
2237
|
-
}[
|
|
2234
|
+
let T = k(() => !o.viewport || !s.value.visibility ? !1 : s.value.visibility[o.viewport] === !1), ee = k(() => !!(Ce?.activeLocale?.value && o.block.l10n?.[Ce.activeLocale.value]?.hidden)), D = k(() => o.previewMode === !0 && (T.value || ee.value)), O = k(() => o.viewport ? {
|
|
2235
|
+
desktop: p.viewport.desktop,
|
|
2236
|
+
mobile: p.viewport.mobile
|
|
2237
|
+
}[o.viewport] ?? o.viewport : ""), P = k(() => !!s.value.displayCondition), ne = R(En, null), re = R(yn, null), I = R(un, {}), ie = k(() => I.savedBlocks?.isPicking.value === !0), L = k(() => !o.nested && I.savedBlocks?.isAvailable.value === !0 && I.savedBlocks?.canCreate.value === !0), ae = k(() => o.isSelected && !ie.value), z = k(() => I.comments?.getBlockCount(o.block.id) ?? 0), ce = M(null), B = M(null), ue = M(null), de = M(null), fe = M({
|
|
2238
2238
|
left: "calc(100% + 8px)",
|
|
2239
2239
|
top: "50%"
|
|
2240
|
-
}),
|
|
2241
|
-
function
|
|
2242
|
-
let e =
|
|
2240
|
+
}), pe = M(!1), me = k(() => B.value ?? de.value), he = k(() => me.value?.closest(".tpl-body"));
|
|
2241
|
+
function ge() {
|
|
2242
|
+
let e = pe.value, t = B.value, n = de.value, r = ce.value;
|
|
2243
2243
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2244
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2244
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = he.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2245
2245
|
if (n?.offsetWidth) {
|
|
2246
2246
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2247
2247
|
if (e === i) {
|
|
2248
|
-
|
|
2248
|
+
pe.value = !i, _(ge);
|
|
2249
2249
|
return;
|
|
2250
2250
|
}
|
|
2251
2251
|
}
|
|
2252
2252
|
if (!t?.offsetWidth) return;
|
|
2253
|
-
let
|
|
2254
|
-
if (
|
|
2253
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = ue.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
|
|
2254
|
+
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2255
2255
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2256
|
-
e > r.offsetHeight / 2 && (
|
|
2256
|
+
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
2257
2257
|
}
|
|
2258
|
-
if (
|
|
2259
|
-
let e =
|
|
2258
|
+
if (u < r.offsetWidth && m === "50%") {
|
|
2259
|
+
let e = d?.getBoundingClientRect();
|
|
2260
2260
|
if (e?.width) {
|
|
2261
2261
|
let n = l ? (e.right - i.left) / a + 8 : (e.left - i.left) / a - t.offsetWidth - 8;
|
|
2262
|
-
|
|
2262
|
+
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2263
2263
|
}
|
|
2264
2264
|
}
|
|
2265
|
-
(
|
|
2266
|
-
left: `${
|
|
2267
|
-
top:
|
|
2265
|
+
(fe.value.left !== `${u}px` || fe.value.top !== m) && (fe.value = {
|
|
2266
|
+
left: `${u}px`,
|
|
2267
|
+
top: m
|
|
2268
2268
|
});
|
|
2269
2269
|
}
|
|
2270
|
-
|
|
2271
|
-
oe.value,
|
|
2272
|
-
B.value,
|
|
2270
|
+
f(ge), r(k(() => me.value ? [
|
|
2273
2271
|
ce.value,
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
let
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2272
|
+
B.value,
|
|
2273
|
+
ue.value,
|
|
2274
|
+
de.value,
|
|
2275
|
+
he.value
|
|
2276
|
+
].filter((e) => !!e) : []), ge), e(he, "scroll", ge, { passive: !0 });
|
|
2277
|
+
let ve = k(() => I.collaboration?.lockOf(o.block.id) ?? null), ye = k(() => ve.value?.holder.type === "guest" ? p.collaboration.guest : ve.value?.holder.name ?? ""), be = k(() => I.collaboration?.agentHighlightOf(o.block.id) ?? I.ai?.highlightOf(o.block.id) ?? null), xe = nr(() => s.value.type === "section" ? s.value.backgroundImage : void 0), Se = nr(() => s.value.type === "section" ? s.value.wrapper?.backgroundImage : void 0), Ce = R(An, null), we = Ce ? Nt(Ce) : null, Te = R(_n, null) ?? we?.content ?? null;
|
|
2278
|
+
c([() => Ce?.activeLocale?.value, () => we && _e(we.settings.value)], ge, { flush: "post" });
|
|
2279
|
+
let Ee = R(Qt, void 0), De = k(() => $i(s.value, {
|
|
2280
|
+
backgroundImageUrl: xe.value,
|
|
2281
|
+
heroBoxWidth: qn(s.value) ? Qn(s.value, Te?.value, Ee) : void 0
|
|
2282
|
+
})), Oe = k(() => aa(s.value, { backgroundImageUrl: Se.value })), ke = k(() => {
|
|
2283
|
+
let e = s.value;
|
|
2284
2284
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2285
|
-
}),
|
|
2286
|
-
function
|
|
2287
|
-
|
|
2285
|
+
}), Ae = k(() => ia(ke.value?.wrapper?.padding));
|
|
2286
|
+
function je(e) {
|
|
2287
|
+
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), l("select"));
|
|
2288
2288
|
}
|
|
2289
|
-
function
|
|
2290
|
-
|
|
2289
|
+
function Me() {
|
|
2290
|
+
ne?.deleteBlock(o.block.id);
|
|
2291
2291
|
}
|
|
2292
|
-
function
|
|
2293
|
-
|
|
2292
|
+
function Ne() {
|
|
2293
|
+
ne?.duplicateBlock(o.block);
|
|
2294
2294
|
}
|
|
2295
|
-
function
|
|
2296
|
-
|
|
2295
|
+
function Pe() {
|
|
2296
|
+
I.savedBlocks?.startPicking(o.block.id);
|
|
2297
2297
|
}
|
|
2298
|
-
function
|
|
2299
|
-
|
|
2298
|
+
function Fe() {
|
|
2299
|
+
re?.toggleBlock(o.block.id);
|
|
2300
2300
|
}
|
|
2301
|
-
return (
|
|
2301
|
+
return (e, n) => D.value ? j("", !0) : (m(), N("div", {
|
|
2302
2302
|
key: 0,
|
|
2303
2303
|
ref_key: "blockElement",
|
|
2304
|
-
ref:
|
|
2305
|
-
class:
|
|
2306
|
-
"tpl-block--selected":
|
|
2307
|
-
"tpl-block--locale-hidden":
|
|
2308
|
-
"tpl-block--picked":
|
|
2309
|
-
"tpl-block--idle": !
|
|
2310
|
-
"tpl-block--lifted":
|
|
2304
|
+
ref: ce,
|
|
2305
|
+
class: h(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2306
|
+
"tpl-block--selected": t.isSelected,
|
|
2307
|
+
"tpl-block--locale-hidden": ee.value,
|
|
2308
|
+
"tpl-block--picked": t.picked,
|
|
2309
|
+
"tpl-block--idle": !t.isSelected && !t.picked,
|
|
2310
|
+
"tpl-block--lifted": x.value
|
|
2311
2311
|
}]),
|
|
2312
|
-
"data-block-id":
|
|
2313
|
-
"data-block-type":
|
|
2314
|
-
"data-tpl-picked":
|
|
2315
|
-
onClick:
|
|
2312
|
+
"data-block-id": t.block.id,
|
|
2313
|
+
"data-block-type": t.block.type,
|
|
2314
|
+
"data-tpl-picked": t.picked || void 0,
|
|
2315
|
+
onClick: je
|
|
2316
2316
|
}, [
|
|
2317
|
-
|
|
2317
|
+
F("div", {
|
|
2318
2318
|
ref_key: "badgesElement",
|
|
2319
|
-
ref:
|
|
2319
|
+
ref: ue,
|
|
2320
2320
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2321
2321
|
}, [
|
|
2322
|
-
|
|
2322
|
+
z.value > 0 && !T.value ? (m(), N("button", {
|
|
2323
2323
|
key: 0,
|
|
2324
2324
|
ref_key: "commentElement",
|
|
2325
|
-
ref:
|
|
2326
|
-
class:
|
|
2327
|
-
"aria-label":
|
|
2328
|
-
onClick: n[0] ||=
|
|
2329
|
-
}, [
|
|
2325
|
+
ref: de,
|
|
2326
|
+
class: h(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", pe.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2327
|
+
"aria-label": A(g)(A(p).blockActions.comments, { count: String(z.value) }),
|
|
2328
|
+
onClick: n[0] ||= i((e) => A(I).comments?.openForBlock(t.block.id), ["stop"])
|
|
2329
|
+
}, [E(A(wr), {
|
|
2330
2330
|
size: 12,
|
|
2331
2331
|
"stroke-width": 2.5
|
|
2332
|
-
}),
|
|
2333
|
-
|
|
2334
|
-
|
|
2332
|
+
}), te(" " + d(z.value), 1)], 10, bo)) : j("", !0),
|
|
2333
|
+
E(A(a), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2334
|
+
t.previewMode ? j("", !0) : (m(), oe(vo, {
|
|
2335
2335
|
key: 1,
|
|
2336
|
-
block:
|
|
2336
|
+
block: t.block
|
|
2337
2337
|
}, null, 8, ["block"]))
|
|
2338
2338
|
], 512),
|
|
2339
|
-
|
|
2339
|
+
ve.value ? (m(), N("div", {
|
|
2340
2340
|
key: 0,
|
|
2341
2341
|
"data-testid": "block-lock",
|
|
2342
|
-
"data-lock-holder":
|
|
2342
|
+
"data-lock-holder": ve.value.holder.sessionId,
|
|
2343
2343
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2344
|
-
style:
|
|
2345
|
-
outline: `2px solid ${
|
|
2344
|
+
style: y({
|
|
2345
|
+
outline: `2px solid ${ve.value.holder.color}`,
|
|
2346
2346
|
outlineOffset: "-1px"
|
|
2347
2347
|
})
|
|
2348
|
-
}, [
|
|
2348
|
+
}, [F("span", {
|
|
2349
2349
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2350
|
-
style:
|
|
2351
|
-
backgroundColor:
|
|
2352
|
-
color:
|
|
2350
|
+
style: y({
|
|
2351
|
+
backgroundColor: ve.value.holder.color,
|
|
2352
|
+
color: A(Er)(ve.value.holder.color)
|
|
2353
2353
|
})
|
|
2354
|
-
},
|
|
2355
|
-
|
|
2356
|
-
key:
|
|
2354
|
+
}, d(A(g)(A(p).collaboration.editing, { name: ye.value })), 5)], 12, xo)) : j("", !0),
|
|
2355
|
+
be.value === null ? j("", !0) : (m(), N("div", {
|
|
2356
|
+
key: be.value,
|
|
2357
2357
|
"data-testid": "block-agent-highlight",
|
|
2358
2358
|
"aria-hidden": "true",
|
|
2359
2359
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
2360
2360
|
})),
|
|
2361
|
-
|
|
2361
|
+
ae.value ? (m(), N("div", {
|
|
2362
2362
|
key: 2,
|
|
2363
2363
|
ref_key: "actionsElement",
|
|
2364
2364
|
ref: B,
|
|
2365
|
-
style:
|
|
2365
|
+
style: y(fe.value),
|
|
2366
2366
|
role: "toolbar",
|
|
2367
|
-
"aria-label":
|
|
2367
|
+
"aria-label": A(p).blockActions.drag,
|
|
2368
2368
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2369
2369
|
}, [
|
|
2370
|
-
|
|
2370
|
+
F("button", {
|
|
2371
2371
|
ref_key: "dragButtonRef",
|
|
2372
|
-
ref:
|
|
2372
|
+
ref: b,
|
|
2373
2373
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
|
|
2374
|
-
"aria-label":
|
|
2375
|
-
"aria-pressed":
|
|
2374
|
+
"aria-label": S.value,
|
|
2375
|
+
"aria-pressed": x.value,
|
|
2376
2376
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2377
|
-
title:
|
|
2378
|
-
onKeydown:
|
|
2379
|
-
}, [
|
|
2377
|
+
title: A(p).blockActions.drag,
|
|
2378
|
+
onKeydown: w
|
|
2379
|
+
}, [E(A(jr), {
|
|
2380
2380
|
size: 14,
|
|
2381
2381
|
"stroke-width": 1.5
|
|
2382
2382
|
})], 40, Co),
|
|
2383
|
-
|
|
2383
|
+
F("button", {
|
|
2384
2384
|
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",
|
|
2385
|
-
"aria-label":
|
|
2386
|
-
title:
|
|
2387
|
-
onClick:
|
|
2388
|
-
}, [
|
|
2385
|
+
"aria-label": A(p).blockActions.duplicate,
|
|
2386
|
+
title: A(p).blockActions.duplicate,
|
|
2387
|
+
onClick: i(Ne, ["stop"])
|
|
2388
|
+
}, [E(A(Cr), {
|
|
2389
2389
|
size: 14,
|
|
2390
2390
|
"stroke-width": 1.5
|
|
2391
2391
|
})], 8, wo),
|
|
2392
|
-
|
|
2392
|
+
L.value ? (m(), N("button", {
|
|
2393
2393
|
key: 0,
|
|
2394
2394
|
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",
|
|
2395
|
-
"aria-label":
|
|
2396
|
-
title:
|
|
2397
|
-
onClick:
|
|
2398
|
-
}, [
|
|
2395
|
+
"aria-label": A(p).blockActions.saveAsBlock,
|
|
2396
|
+
title: A(p).blockActions.saveAsBlock,
|
|
2397
|
+
onClick: i(Pe, ["stop"])
|
|
2398
|
+
}, [E(A(Dr), {
|
|
2399
2399
|
size: 14,
|
|
2400
2400
|
"stroke-width": 1.5
|
|
2401
|
-
})], 8, To)) :
|
|
2402
|
-
|
|
2401
|
+
})], 8, To)) : j("", !0),
|
|
2402
|
+
F("button", {
|
|
2403
2403
|
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",
|
|
2404
|
-
"aria-label":
|
|
2405
|
-
title:
|
|
2406
|
-
onClick:
|
|
2407
|
-
}, [
|
|
2404
|
+
"aria-label": A(p).blockActions.delete,
|
|
2405
|
+
title: A(p).blockActions.delete,
|
|
2406
|
+
onClick: i(Me, ["stop"])
|
|
2407
|
+
}, [E(A(Tr), {
|
|
2408
2408
|
size: 14,
|
|
2409
2409
|
"stroke-width": 1.5
|
|
2410
2410
|
})], 8, Eo)
|
|
2411
|
-
], 12, So)) :
|
|
2412
|
-
|
|
2411
|
+
], 12, So)) : j("", !0),
|
|
2412
|
+
T.value ? (m(), N("div", Do, [F("span", Oo, [E(A(kr), {
|
|
2413
2413
|
size: 12,
|
|
2414
2414
|
"stroke-width": 1.5
|
|
2415
|
-
}),
|
|
2416
|
-
|
|
2415
|
+
}), te(" " + d(A(g)(A(p).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : j("", !0),
|
|
2416
|
+
P.value && !T.value ? (m(), N("div", ko, [F("button", {
|
|
2417
2417
|
"data-testid": "condition-toggle",
|
|
2418
2418
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2419
|
-
"aria-label":
|
|
2420
|
-
title:
|
|
2421
|
-
onClick:
|
|
2422
|
-
}, [
|
|
2419
|
+
"aria-label": A(p).blockActions.conditionToggle,
|
|
2420
|
+
title: t.block.displayCondition?.label,
|
|
2421
|
+
onClick: i(Fe, ["stop"])
|
|
2422
|
+
}, [E(A(Ar), {
|
|
2423
2423
|
size: 12,
|
|
2424
2424
|
"stroke-width": 2
|
|
2425
|
-
})], 8, Ao)])) :
|
|
2426
|
-
|
|
2425
|
+
})], 8, Ao)])) : j("", !0),
|
|
2426
|
+
Oe.value ? (m(), N("div", {
|
|
2427
2427
|
key: 5,
|
|
2428
|
-
class:
|
|
2429
|
-
style:
|
|
2430
|
-
}, [
|
|
2428
|
+
class: h(["tpl-section-wrapper tpl-email-surface", A(Yi)(Oe.value)]),
|
|
2429
|
+
style: y(Oe.value)
|
|
2430
|
+
}, [ke.value ? (m(), N("div", {
|
|
2431
2431
|
key: 0,
|
|
2432
2432
|
class: "tpl-band-frame",
|
|
2433
|
-
style:
|
|
2434
|
-
}, [
|
|
2435
|
-
class:
|
|
2436
|
-
style:
|
|
2437
|
-
}, [
|
|
2433
|
+
style: y(Ae.value)
|
|
2434
|
+
}, [F("div", {
|
|
2435
|
+
class: h(["tpl-block-content tpl-email-surface", A(Yi)(De.value)]),
|
|
2436
|
+
style: y(De.value)
|
|
2437
|
+
}, [u(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (m(), N("div", {
|
|
2438
2438
|
key: 1,
|
|
2439
|
-
class:
|
|
2440
|
-
style:
|
|
2441
|
-
}, [
|
|
2439
|
+
class: h(["tpl-block-content tpl-email-surface", A(Yi)(De.value)]),
|
|
2440
|
+
style: y(De.value)
|
|
2441
|
+
}, [u(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (m(), N("div", {
|
|
2442
2442
|
key: 6,
|
|
2443
|
-
class:
|
|
2444
|
-
style:
|
|
2445
|
-
}, [
|
|
2443
|
+
class: h(["tpl-block-content tpl-email-surface", A(Yi)(De.value)]),
|
|
2444
|
+
style: y(De.value)
|
|
2445
|
+
}, [u(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2446
2446
|
], 10, yo));
|
|
2447
2447
|
}
|
|
2448
2448
|
}), [["__scopeId", "data-v-872194d3"]]);
|
|
@@ -2450,7 +2450,7 @@ var $a = [
|
|
|
2450
2450
|
function Mo(e) {
|
|
2451
2451
|
let t = /^\s*<p\b/.exec(e);
|
|
2452
2452
|
if (!t) return e;
|
|
2453
|
-
let n =
|
|
2453
|
+
let n = qe(e, t[0].length);
|
|
2454
2454
|
if (n === -1) return e;
|
|
2455
2455
|
let r = /<\/p>\s*$/.exec(e);
|
|
2456
2456
|
if (!r || r.index <= n) return e;
|
|
@@ -2458,55 +2458,55 @@ function Mo(e) {
|
|
|
2458
2458
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2459
2459
|
}
|
|
2460
2460
|
// src/components/blocks/TitleBlock.vue
|
|
2461
|
-
var No = /* @__PURE__ */
|
|
2461
|
+
var No = /* @__PURE__ */ z({
|
|
2462
2462
|
__name: "TitleBlock",
|
|
2463
2463
|
props: {
|
|
2464
2464
|
block: {},
|
|
2465
2465
|
viewport: {}
|
|
2466
2466
|
},
|
|
2467
2467
|
setup(e) {
|
|
2468
|
-
let t = e, n =
|
|
2468
|
+
let t = e, n = se(() => import("./TitleEditor-3BRl8u5l.js")), r = Dn(cn, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = qa(() => t.block.content), u = k(() => {
|
|
2469
2469
|
let e = {
|
|
2470
|
-
fontSize: `${
|
|
2471
|
-
lineHeight: String(
|
|
2470
|
+
fontSize: `${Ye[t.block.level]}px`,
|
|
2471
|
+
lineHeight: String(yt),
|
|
2472
2472
|
fontWeight: "700",
|
|
2473
2473
|
textAlign: t.block.textAlign
|
|
2474
2474
|
};
|
|
2475
2475
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2476
|
-
}),
|
|
2477
|
-
return (t, r) => (
|
|
2476
|
+
}), d = k(() => `h${t.block.level}`), f = k(() => ur(Mo(s.value)));
|
|
2477
|
+
return (t, r) => (m(), N("div", {
|
|
2478
2478
|
ref_key: "blockRef",
|
|
2479
2479
|
ref: a,
|
|
2480
2480
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2481
|
-
style:
|
|
2482
|
-
onDblclick: r[0] ||= (...e) =>
|
|
2483
|
-
}, [
|
|
2481
|
+
style: y(u.value),
|
|
2482
|
+
onDblclick: r[0] ||= (...e) => A(c) && A(c)(...e)
|
|
2483
|
+
}, [A(i) ? (m(), oe(A(n), {
|
|
2484
2484
|
key: 0,
|
|
2485
2485
|
block: e.block,
|
|
2486
|
-
"toolbar-position":
|
|
2487
|
-
onDone:
|
|
2486
|
+
"toolbar-position": A(o),
|
|
2487
|
+
onDone: A(l)
|
|
2488
2488
|
}, null, 8, [
|
|
2489
2489
|
"block",
|
|
2490
2490
|
"toolbar-position",
|
|
2491
2491
|
"onDone"
|
|
2492
|
-
])) : (
|
|
2492
|
+
])) : (m(), oe(p(d.value), {
|
|
2493
2493
|
key: 1,
|
|
2494
2494
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
2495
2495
|
style: {
|
|
2496
2496
|
color: "inherit",
|
|
2497
2497
|
fontWeight: "inherit"
|
|
2498
2498
|
},
|
|
2499
|
-
innerHTML:
|
|
2499
|
+
innerHTML: f.value
|
|
2500
2500
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2501
2501
|
}
|
|
2502
2502
|
}), Po = "hero", Fo = "#1f2937", Io = "#ffffff";
|
|
2503
2503
|
function Lo(e, t) {
|
|
2504
|
-
let n =
|
|
2504
|
+
let n = nt("title", e);
|
|
2505
2505
|
n.color = Io, n.textAlign = "center";
|
|
2506
|
-
let r =
|
|
2506
|
+
let r = nt("paragraph", e);
|
|
2507
2507
|
r.content = `<p style="text-align: center"><span style="color: ${Io}">${Ro(t)}</span></p>`;
|
|
2508
|
-
let i =
|
|
2509
|
-
return i.align = "center",
|
|
2508
|
+
let i = nt("button", e);
|
|
2509
|
+
return i.align = "center", xe({
|
|
2510
2510
|
columns: "1",
|
|
2511
2511
|
children: [[
|
|
2512
2512
|
n,
|
|
@@ -3345,21 +3345,21 @@ Q.prototype = {
|
|
|
3345
3345
|
if (n = b, i = W(n), Yc(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
3346
3346
|
} else if (n.parentNode === t) {
|
|
3347
3347
|
i = W(n);
|
|
3348
|
-
var x = 0, S, C = G.parentNode !== t, w = !Vc(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ls(n, "top", "top") || Ls(G, "top", "top"),
|
|
3348
|
+
var x = 0, S, C = G.parentNode !== t, w = !Vc(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ls(n, "top", "top") || Ls(G, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
3349
3349
|
Dc !== n && (S = i[T], kc = !1, Ac = !w && o.invertSwap || C), x = el(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Ac, Dc === n);
|
|
3350
|
-
var
|
|
3350
|
+
var D;
|
|
3351
3351
|
if (x !== 0) {
|
|
3352
|
-
var
|
|
3352
|
+
var O = Bs(G);
|
|
3353
3353
|
do
|
|
3354
|
-
|
|
3355
|
-
while (
|
|
3354
|
+
O -= x, D = K.children[O];
|
|
3355
|
+
while (D && (U(D, "display") === "none" || D === q));
|
|
3356
3356
|
}
|
|
3357
|
-
if (x === 0 ||
|
|
3357
|
+
if (x === 0 || D === n) return _(!1);
|
|
3358
3358
|
Dc = n, Oc = x;
|
|
3359
|
-
var
|
|
3360
|
-
|
|
3361
|
-
var
|
|
3362
|
-
if (
|
|
3359
|
+
var k = n.nextElementSibling, A = !1;
|
|
3360
|
+
A = x === 1;
|
|
3361
|
+
var j = Yc(J, t, G, r, n, i, e, A);
|
|
3362
|
+
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1), Nc = !0, setTimeout(Zc, 30), g(), A && !k ? t.appendChild(G) : n.parentNode.insertBefore(G, A ? k : n), E && Ys(E, 0, ee - E.scrollTop), K = G.parentNode, S !== void 0 && !Ac && (jc = Math.abs(S - W(n)[T])), v(), _(!0);
|
|
3363
3363
|
}
|
|
3364
3364
|
if (t.contains(G)) return _(!1);
|
|
3365
3365
|
}
|
|
@@ -3636,11 +3636,11 @@ var gl = qs(function(e, t, n, r) {
|
|
|
3636
3636
|
sl !== n && (sl = n, ml(), ol = t.scroll, u = t.scrollFn, ol === !0 && (ol = Us(n, !0)));
|
|
3637
3637
|
var d = 0, f = ol;
|
|
3638
3638
|
do {
|
|
3639
|
-
var p = f, m = W(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 = U(p), E = p.scrollLeft,
|
|
3639
|
+
var p = f, m = W(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 = U(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
3640
3640
|
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"));
|
|
3641
|
-
var
|
|
3642
|
-
if (!$[d]) for (var
|
|
3643
|
-
($[d].vx !=
|
|
3641
|
+
var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
|
|
3642
|
+
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3643
|
+
($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3644
3644
|
r && this.layer === 0 && Q.active._onTouchMove(dl);
|
|
3645
3645
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3646
3646
|
typeof u == "function" && u.call(Q.dragged.parentNode[Qs], n, t, e, dl, $[this.layer].el) !== "continue" || Ys($[this.layer].el, n, t);
|
|
@@ -3687,10 +3687,10 @@ function bl(e) {
|
|
|
3687
3687
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3688
3688
|
}
|
|
3689
3689
|
function xl(e) {
|
|
3690
|
-
|
|
3690
|
+
O() && P(e);
|
|
3691
3691
|
}
|
|
3692
|
-
function Sl(
|
|
3693
|
-
|
|
3692
|
+
function Sl(e) {
|
|
3693
|
+
O() ? s(e) : _(e);
|
|
3694
3694
|
}
|
|
3695
3695
|
var Cl = null, wl = null;
|
|
3696
3696
|
function Tl(e = null, t = null) {
|
|
@@ -3704,106 +3704,106 @@ function El() {
|
|
|
3704
3704
|
}
|
|
3705
3705
|
var Dl = Symbol("cloneElement");
|
|
3706
3706
|
function Ol(...e) {
|
|
3707
|
-
let
|
|
3708
|
-
Array.isArray(
|
|
3709
|
-
let
|
|
3710
|
-
function
|
|
3711
|
-
let { from: t, oldIndex:
|
|
3712
|
-
|
|
3713
|
-
let s =
|
|
3714
|
-
Tl(s, c),
|
|
3707
|
+
let t = O()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3708
|
+
Array.isArray(A(i)) || (a = i, i = null);
|
|
3709
|
+
let o = null, { immediate: s = !0, clone: l = bl, forceFallback: u, fallbackOnBody: d, customUpdate: f } = A(a) ?? {};
|
|
3710
|
+
function p(e) {
|
|
3711
|
+
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3712
|
+
n = u && !d ? o.slice(0, -1) : o;
|
|
3713
|
+
let s = A(A(i)?.[r]), c = l(s);
|
|
3714
|
+
Tl(s, c), a[Dl] = c;
|
|
3715
3715
|
}
|
|
3716
|
-
function
|
|
3716
|
+
function m(e) {
|
|
3717
3717
|
let t = e.item[Dl];
|
|
3718
3718
|
if (!ns(t)) {
|
|
3719
|
-
if (as(e.item),
|
|
3720
|
-
let n = [...
|
|
3721
|
-
|
|
3719
|
+
if (as(e.item), w(i)) {
|
|
3720
|
+
let n = [...A(i)];
|
|
3721
|
+
i.value = ts(n, e.newDraggableIndex, t);
|
|
3722
3722
|
return;
|
|
3723
3723
|
}
|
|
3724
|
-
ts(
|
|
3724
|
+
ts(A(i), e.newDraggableIndex, t);
|
|
3725
3725
|
}
|
|
3726
3726
|
}
|
|
3727
|
-
function
|
|
3728
|
-
let { from: t, item: n, oldIndex: r, oldDraggableIndex:
|
|
3727
|
+
function h(e) {
|
|
3728
|
+
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3729
3729
|
if (is(t, n, r), o === "clone") as(s);
|
|
3730
|
-
else if (
|
|
3731
|
-
let e = [...
|
|
3732
|
-
|
|
3733
|
-
} else es(
|
|
3730
|
+
else if (w(i)) {
|
|
3731
|
+
let e = [...A(i)];
|
|
3732
|
+
i.value = es(e, a);
|
|
3733
|
+
} else es(A(i), a);
|
|
3734
3734
|
}
|
|
3735
|
-
function
|
|
3736
|
-
if (
|
|
3737
|
-
|
|
3735
|
+
function g(e) {
|
|
3736
|
+
if (f) {
|
|
3737
|
+
f(e);
|
|
3738
3738
|
return;
|
|
3739
3739
|
}
|
|
3740
|
-
let { from: t, item: n, oldIndex: r, oldDraggableIndex:
|
|
3741
|
-
if (as(n), is(t, n, r),
|
|
3742
|
-
let e = [...
|
|
3743
|
-
|
|
3744
|
-
} else Zo(
|
|
3745
|
-
}
|
|
3746
|
-
function
|
|
3747
|
-
let { newIndex: t, oldIndex:
|
|
3740
|
+
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3741
|
+
if (as(n), is(t, n, r), w(i)) {
|
|
3742
|
+
let e = [...A(i)];
|
|
3743
|
+
i.value = Zo(e, a, o);
|
|
3744
|
+
} else Zo(A(i), a, o);
|
|
3745
|
+
}
|
|
3746
|
+
function v(e) {
|
|
3747
|
+
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
3748
3748
|
try {
|
|
3749
3749
|
if (s) {
|
|
3750
3750
|
let e = null;
|
|
3751
|
-
|
|
3752
|
-
if (e &&
|
|
3753
|
-
let o = a.childNodes[
|
|
3751
|
+
n?.some((t, r) => {
|
|
3752
|
+
if (e && n?.length !== a.childNodes.length) return i.insertBefore(e, t.nextSibling), !0;
|
|
3753
|
+
let o = a.childNodes[r];
|
|
3754
3754
|
e = a?.replaceChild(t, o);
|
|
3755
3755
|
});
|
|
3756
3756
|
}
|
|
3757
3757
|
} catch (e) {
|
|
3758
3758
|
o = e;
|
|
3759
3759
|
} finally {
|
|
3760
|
-
|
|
3760
|
+
n = null;
|
|
3761
3761
|
}
|
|
3762
|
-
|
|
3762
|
+
_(() => {
|
|
3763
3763
|
if (Tl(), o) throw o;
|
|
3764
3764
|
});
|
|
3765
3765
|
}
|
|
3766
|
-
let
|
|
3767
|
-
onUpdate:
|
|
3768
|
-
onStart:
|
|
3769
|
-
onAdd:
|
|
3770
|
-
onRemove:
|
|
3771
|
-
onEnd:
|
|
3766
|
+
let y = {
|
|
3767
|
+
onUpdate: g,
|
|
3768
|
+
onStart: p,
|
|
3769
|
+
onAdd: m,
|
|
3770
|
+
onRemove: h,
|
|
3771
|
+
onEnd: v
|
|
3772
3772
|
};
|
|
3773
|
-
function
|
|
3774
|
-
let
|
|
3775
|
-
return e ||= rs(
|
|
3773
|
+
function b(e) {
|
|
3774
|
+
let n = A(r);
|
|
3775
|
+
return e ||= rs(n) ? os(n, t?.$el) : n, e && !ls(e) && (e = e.$el), e || Xo("Root element not found"), e;
|
|
3776
3776
|
}
|
|
3777
|
-
function
|
|
3778
|
-
let e =
|
|
3777
|
+
function x() {
|
|
3778
|
+
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r = qo(e, ["immediate", "clone"]);
|
|
3779
3779
|
return us(r, (e, t) => {
|
|
3780
3780
|
ds(e) && (r[e] = (e, ...n) => (fs(e, El()), t(e, ...n)));
|
|
3781
|
-
}), cs(
|
|
3781
|
+
}), cs(i === null ? {} : y, r);
|
|
3782
3782
|
}
|
|
3783
|
-
let
|
|
3784
|
-
e =
|
|
3783
|
+
let S = (e) => {
|
|
3784
|
+
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3785
3785
|
};
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3786
|
+
c(() => a, () => {
|
|
3787
|
+
o && us(x(), (e, t) => {
|
|
3788
|
+
o?.option(e, t);
|
|
3789
3789
|
});
|
|
3790
3790
|
}, { deep: !0 });
|
|
3791
|
-
let
|
|
3792
|
-
option: (e, t) =>
|
|
3791
|
+
let C = {
|
|
3792
|
+
option: (e, t) => o?.option(e, t),
|
|
3793
3793
|
destroy: () => {
|
|
3794
|
-
|
|
3794
|
+
o?.destroy(), o = null;
|
|
3795
3795
|
},
|
|
3796
|
-
save: () =>
|
|
3797
|
-
toArray: () =>
|
|
3798
|
-
closest: (...e) =>
|
|
3796
|
+
save: () => o?.save(),
|
|
3797
|
+
toArray: () => o?.toArray(),
|
|
3798
|
+
closest: (...e) => o?.closest(...e)
|
|
3799
3799
|
};
|
|
3800
3800
|
return Sl(() => {
|
|
3801
|
-
|
|
3802
|
-
}), xl(
|
|
3803
|
-
start:
|
|
3804
|
-
pause: () =>
|
|
3805
|
-
resume: () =>
|
|
3806
|
-
},
|
|
3801
|
+
s && S();
|
|
3802
|
+
}), xl(C.destroy), Ko({
|
|
3803
|
+
start: S,
|
|
3804
|
+
pause: () => C?.option("disabled", !0),
|
|
3805
|
+
resume: () => C?.option("disabled", !1)
|
|
3806
|
+
}, C);
|
|
3807
3807
|
}
|
|
3808
3808
|
var kl = [
|
|
3809
3809
|
"update",
|
|
@@ -3863,7 +3863,7 @@ var kl = [
|
|
|
3863
3863
|
"target",
|
|
3864
3864
|
"customUpdate",
|
|
3865
3865
|
...kl.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3866
|
-
], jl =
|
|
3866
|
+
], jl = z({
|
|
3867
3867
|
name: "VueDraggable",
|
|
3868
3868
|
model: {
|
|
3869
3869
|
prop: "modelValue",
|
|
@@ -3875,17 +3875,17 @@ var kl = [
|
|
|
3875
3875
|
let a = kl.reduce((e, t) => {
|
|
3876
3876
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3877
3877
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3878
|
-
}, {}), o =
|
|
3879
|
-
let t =
|
|
3880
|
-
let r =
|
|
3878
|
+
}, {}), o = k(() => {
|
|
3879
|
+
let t = D(e), { modelValue: n } = t, r = qo(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3880
|
+
let r = A(n);
|
|
3881
3881
|
return r !== void 0 && (e[t] = r), e;
|
|
3882
3882
|
}, {});
|
|
3883
3883
|
return Ko(Ko({}, a), $o(Ko(Ko({}, i), o)));
|
|
3884
|
-
}), s =
|
|
3884
|
+
}), s = k({
|
|
3885
3885
|
get: () => e.modelValue,
|
|
3886
3886
|
set: (e) => n("update:modelValue", e)
|
|
3887
|
-
}), c =
|
|
3888
|
-
return r(l), () =>
|
|
3887
|
+
}), c = M(), l = b(Ol(e.target || c, s, o));
|
|
3888
|
+
return r(l), () => x(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3889
3889
|
}
|
|
3890
3890
|
}), Ml = {
|
|
3891
3891
|
mounted: "mounted",
|
|
@@ -3901,7 +3901,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
3901
3901
|
key: 0,
|
|
3902
3902
|
"data-testid": "section-drop-hint",
|
|
3903
3903
|
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)]"
|
|
3904
|
-
}, Il = /* @__PURE__ */
|
|
3904
|
+
}, Il = /* @__PURE__ */ z({
|
|
3905
3905
|
__name: "SectionBlock",
|
|
3906
3906
|
props: {
|
|
3907
3907
|
block: {},
|
|
@@ -3916,15 +3916,15 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
3916
3916
|
button: ua,
|
|
3917
3917
|
divider: wa,
|
|
3918
3918
|
custom: Sa
|
|
3919
|
-
},
|
|
3920
|
-
|
|
3921
|
-
let
|
|
3922
|
-
function
|
|
3923
|
-
let t =
|
|
3924
|
-
t?.isPicking.value ? t.togglePick(
|
|
3919
|
+
}, n = e, { t: r } = le(), i = Dn(An, "SectionBlock"), { displayBlock: o } = Nt(i), s = k(() => n.sourceBlock ?? n.block), c = R(mn, k(() => /* @__PURE__ */ new Set()));
|
|
3920
|
+
g(mn, k(() => /* @__PURE__ */ new Set([...c.value, ...Object.entries(s.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
3921
|
+
let u = R(yn, null), f = R(vn, null), _ = R(un, {}), b = R(on, null);
|
|
3922
|
+
function x(e) {
|
|
3923
|
+
let t = _.savedBlocks;
|
|
3924
|
+
t?.isPicking.value ? t.togglePick(n.block.id) : i.selectBlock(e);
|
|
3925
3925
|
}
|
|
3926
|
-
let
|
|
3927
|
-
switch (
|
|
3926
|
+
let w = k(() => {
|
|
3927
|
+
switch (n.block.columns) {
|
|
3928
3928
|
case "2": return ["50%", "50%"];
|
|
3929
3929
|
case "3": return [
|
|
3930
3930
|
"33.33%",
|
|
@@ -3948,57 +3948,57 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
3948
3948
|
];
|
|
3949
3949
|
default: return ["100%"];
|
|
3950
3950
|
}
|
|
3951
|
-
}),
|
|
3952
|
-
let e =
|
|
3951
|
+
}), T = k(() => {
|
|
3952
|
+
let e = w.value.length, t = [...(i.state.previewMode ? n.block : s.value).children];
|
|
3953
3953
|
for (; t.length < e;) t.push([]);
|
|
3954
3954
|
return t.slice(0, e);
|
|
3955
|
-
}),
|
|
3956
|
-
function
|
|
3957
|
-
return
|
|
3955
|
+
}), ee = k(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
|
|
3956
|
+
function D(e) {
|
|
3957
|
+
return T.value[e] || [];
|
|
3958
3958
|
}
|
|
3959
|
-
function
|
|
3960
|
-
return
|
|
3959
|
+
function O(e) {
|
|
3960
|
+
return b?.value === !1 || !u?.isHidden(e);
|
|
3961
3961
|
}
|
|
3962
3962
|
function te(e) {
|
|
3963
|
-
return !
|
|
3963
|
+
return !D(e).some((e) => O(e.id));
|
|
3964
3964
|
}
|
|
3965
|
-
let
|
|
3966
|
-
function
|
|
3967
|
-
return
|
|
3965
|
+
let P = M(null);
|
|
3966
|
+
function ne(e) {
|
|
3967
|
+
return i.state.previewMode ? !1 : te(e) ? !0 : P.value === e && D(e).filter((e) => O(e.id)).length <= 1;
|
|
3968
3968
|
}
|
|
3969
|
-
let
|
|
3970
|
-
if (
|
|
3971
|
-
let e =
|
|
3969
|
+
let re = k(() => {
|
|
3970
|
+
if (i.state.previewMode) return !1;
|
|
3971
|
+
let e = Se(n.block);
|
|
3972
3972
|
return e !== null && !e.applied && e.reason === "image";
|
|
3973
3973
|
});
|
|
3974
|
-
function
|
|
3975
|
-
return
|
|
3974
|
+
function I(e) {
|
|
3975
|
+
return D(e).length === 0 && !i.state.previewMode;
|
|
3976
3976
|
}
|
|
3977
3977
|
function ie(e) {
|
|
3978
|
-
return
|
|
3978
|
+
return D(e).length === 0 && i.state.previewMode;
|
|
3979
3979
|
}
|
|
3980
3980
|
function ae(e, t) {
|
|
3981
|
-
Xa(
|
|
3981
|
+
Xa(i, t, n.block.id, e);
|
|
3982
3982
|
}
|
|
3983
|
-
function
|
|
3984
|
-
return Wi(e,
|
|
3983
|
+
function se(e) {
|
|
3984
|
+
return Wi(e, f, t);
|
|
3985
3985
|
}
|
|
3986
|
-
function
|
|
3987
|
-
e.type === "custom" &&
|
|
3986
|
+
function z(e, t) {
|
|
3987
|
+
e.type === "custom" && i.updateBlock(e.id, {
|
|
3988
3988
|
fieldValues: t.fieldValues,
|
|
3989
3989
|
dataSourceFetched: t.dataSourceFetched
|
|
3990
3990
|
});
|
|
3991
3991
|
}
|
|
3992
|
-
return (t,
|
|
3993
|
-
key:
|
|
3994
|
-
class:
|
|
3995
|
-
style:
|
|
3996
|
-
}, [
|
|
3997
|
-
"model-value":
|
|
3992
|
+
return (t, s) => (m(), N("div", Nl, [re.value ? (m(), N("div", Pl, [F("span", null, d(A(r).section.heroAddImage), 1)])) : j("", !0), F("div", { class: h(["tpl:flex tpl:gap-0", { "tpl:flex-col": ee.value }]) }, [(m(!0), N(L, null, v(T.value, (t, c) => (m(), N("div", {
|
|
3993
|
+
key: c,
|
|
3994
|
+
class: h(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", I(c) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3995
|
+
style: y({ width: ee.value ? "100%" : w.value[c] })
|
|
3996
|
+
}, [E(A(jl), {
|
|
3997
|
+
"model-value": D(c),
|
|
3998
3998
|
group: {
|
|
3999
3999
|
name: "blocks",
|
|
4000
4000
|
pull: !0,
|
|
4001
|
-
put: (e, t, n) =>
|
|
4001
|
+
put: (e, t, n) => A(Bo)(n)
|
|
4002
4002
|
},
|
|
4003
4003
|
animation: 150,
|
|
4004
4004
|
"ghost-class": "tpl-ghost",
|
|
@@ -4008,28 +4008,28 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4008
4008
|
"inverted-swap-threshold": .65,
|
|
4009
4009
|
"empty-insert-threshold": 20,
|
|
4010
4010
|
"force-fallback": !0,
|
|
4011
|
-
class:
|
|
4012
|
-
"tpl:min-h-[60px]":
|
|
4013
|
-
"tpl:min-h-[34px]": ie(
|
|
4011
|
+
class: h(["tpl:grow", {
|
|
4012
|
+
"tpl:min-h-[60px]": ne(c),
|
|
4013
|
+
"tpl:min-h-[34px]": ie(c)
|
|
4014
4014
|
}]),
|
|
4015
|
-
onUpdate: (e) =>
|
|
4016
|
-
onStart: (e) =>
|
|
4017
|
-
onEnd:
|
|
4018
|
-
"onUpdate:modelValue": (e) => ae(
|
|
4015
|
+
onUpdate: (e) => A(Xa)(A(i), D(c), n.block.id, c, e),
|
|
4016
|
+
onStart: (e) => P.value = c,
|
|
4017
|
+
onEnd: s[0] ||= (e) => P.value = null,
|
|
4018
|
+
"onUpdate:modelValue": (e) => ae(c, e)
|
|
4019
4019
|
}, {
|
|
4020
|
-
default:
|
|
4020
|
+
default: S(() => [(m(!0), N(L, null, v(D(c), (t) => C((m(), N("div", { key: t.id }, [E(jo, {
|
|
4021
4021
|
block: t,
|
|
4022
|
-
"display-block":
|
|
4023
|
-
"is-selected":
|
|
4022
|
+
"display-block": A(o)(t),
|
|
4023
|
+
"is-selected": A(i).state.selectedBlockId === t.id,
|
|
4024
4024
|
viewport: e.viewport,
|
|
4025
|
-
"preview-mode":
|
|
4025
|
+
"preview-mode": A(i).state.previewMode,
|
|
4026
4026
|
nested: "",
|
|
4027
|
-
onSelect: (e) =>
|
|
4027
|
+
onSelect: (e) => x(t.id)
|
|
4028
4028
|
}, {
|
|
4029
|
-
default:
|
|
4029
|
+
default: S(() => [(m(), oe(p(se(t)), l({ block: A(o)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
|
|
4030
4030
|
viewport: e.viewport,
|
|
4031
|
-
onFetchData: (e) =>
|
|
4032
|
-
onUpdate: (e) =>
|
|
4031
|
+
onFetchData: (e) => z(t, e),
|
|
4032
|
+
onUpdate: (e) => A(i).updateBlock(t.id, e)
|
|
4033
4033
|
}), null, 16, [
|
|
4034
4034
|
"block",
|
|
4035
4035
|
"viewport",
|
|
@@ -4044,7 +4044,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4044
4044
|
"viewport",
|
|
4045
4045
|
"preview-mode",
|
|
4046
4046
|
"onSelect"
|
|
4047
|
-
])])), [[
|
|
4047
|
+
])])), [[a, O(t.id)]])), 128))]),
|
|
4048
4048
|
_: 2
|
|
4049
4049
|
}, 1032, [
|
|
4050
4050
|
"model-value",
|
|
@@ -4053,14 +4053,14 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4053
4053
|
"onUpdate",
|
|
4054
4054
|
"onStart",
|
|
4055
4055
|
"onUpdate:modelValue"
|
|
4056
|
-
]),
|
|
4056
|
+
]), I(c) ? (m(), N("div", Fl, [F("span", null, d(A(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))], 2)]));
|
|
4057
4057
|
}
|
|
4058
4058
|
}), Ll = ["width", "height"], Rl = [
|
|
4059
4059
|
"d",
|
|
4060
4060
|
"stroke",
|
|
4061
4061
|
"stroke-opacity",
|
|
4062
4062
|
"stroke-width"
|
|
4063
|
-
], zl = ["d", "fill"], Bl = /* @__PURE__ */
|
|
4063
|
+
], zl = ["d", "fill"], Bl = /* @__PURE__ */ z({
|
|
4064
4064
|
__name: "SocialIconSvg",
|
|
4065
4065
|
props: {
|
|
4066
4066
|
platform: {},
|
|
@@ -4069,7 +4069,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4069
4069
|
iconSize: {}
|
|
4070
4070
|
},
|
|
4071
4071
|
setup(e) {
|
|
4072
|
-
let t = e, n =
|
|
4072
|
+
let t = e, n = k(() => Zn[t.platform]), r = k(() => $n[t.iconSize]), i = k(() => Ve(t.platform, t.iconTone)), a = k(() => Pe(t.iconStyle, t.iconTone)), o = k(() => {
|
|
4073
4073
|
let e = {
|
|
4074
4074
|
display: "inline-flex",
|
|
4075
4075
|
alignItems: "center",
|
|
@@ -4088,7 +4088,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4088
4088
|
backgroundColor: "transparent",
|
|
4089
4089
|
border: `2px solid ${n}`,
|
|
4090
4090
|
borderRadius: "4px",
|
|
4091
|
-
...a.value && { boxShadow:
|
|
4091
|
+
...a.value && { boxShadow: l(a.value) }
|
|
4092
4092
|
};
|
|
4093
4093
|
case "rounded": return {
|
|
4094
4094
|
...e,
|
|
@@ -4107,57 +4107,57 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4107
4107
|
};
|
|
4108
4108
|
default: return e;
|
|
4109
4109
|
}
|
|
4110
|
-
}),
|
|
4111
|
-
function
|
|
4110
|
+
}), s = k(() => Ge(t.iconStyle)), c = k(() => Math.floor(r.value * s.value));
|
|
4111
|
+
function l(e) {
|
|
4112
4112
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
4113
4113
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
4114
4114
|
}
|
|
4115
|
-
let
|
|
4116
|
-
return (e, t) => (
|
|
4117
|
-
width:
|
|
4118
|
-
height:
|
|
4115
|
+
let u = k(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
|
|
4116
|
+
return (e, t) => (m(), N("span", { style: y(o.value) }, [(m(), N("svg", {
|
|
4117
|
+
width: c.value,
|
|
4118
|
+
height: c.value,
|
|
4119
4119
|
viewBox: "0 0 24 24",
|
|
4120
4120
|
overflow: "visible",
|
|
4121
4121
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4122
|
-
}, [a.value ? (
|
|
4122
|
+
}, [a.value ? (m(), N("path", {
|
|
4123
4123
|
key: 0,
|
|
4124
4124
|
"data-testid": "social-icon-halo",
|
|
4125
4125
|
d: n.value.path,
|
|
4126
4126
|
fill: "none",
|
|
4127
4127
|
stroke: a.value.color,
|
|
4128
4128
|
"stroke-opacity": a.value.opacity,
|
|
4129
|
-
"stroke-width": a.value.width /
|
|
4129
|
+
"stroke-width": a.value.width / s.value,
|
|
4130
4130
|
"stroke-linejoin": "round"
|
|
4131
|
-
}, null, 8, Rl)) :
|
|
4131
|
+
}, null, 8, Rl)) : j("", !0), F("path", {
|
|
4132
4132
|
d: n.value.path,
|
|
4133
|
-
fill:
|
|
4133
|
+
fill: u.value
|
|
4134
4134
|
}, null, 8, zl)], 8, Ll))], 4));
|
|
4135
4135
|
}
|
|
4136
4136
|
}), Vl = { class: "tpl:w-full" }, Hl = ["href"], Ul = {
|
|
4137
4137
|
key: 1,
|
|
4138
4138
|
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)]"
|
|
4139
|
-
}, Wl = /* @__PURE__ */
|
|
4139
|
+
}, Wl = /* @__PURE__ */ z({
|
|
4140
4140
|
__name: "SocialIconsBlock",
|
|
4141
4141
|
props: {
|
|
4142
4142
|
block: {},
|
|
4143
4143
|
viewport: {}
|
|
4144
4144
|
},
|
|
4145
4145
|
setup(e) {
|
|
4146
|
-
let t = e, { t: n } =
|
|
4146
|
+
let t = e, { t: n } = le(), r = k(() => ({
|
|
4147
4147
|
display: "flex",
|
|
4148
4148
|
flexWrap: "wrap",
|
|
4149
4149
|
gap: `${t.block.spacing}px`,
|
|
4150
4150
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4151
|
-
})), a =
|
|
4152
|
-
return (t, o) => (
|
|
4151
|
+
})), a = k(() => t.block.icons.length > 0);
|
|
4152
|
+
return (t, o) => (m(), N("div", Vl, [a.value ? (m(), N("div", {
|
|
4153
4153
|
key: 0,
|
|
4154
|
-
style:
|
|
4155
|
-
}, [(
|
|
4154
|
+
style: y(r.value)
|
|
4155
|
+
}, [(m(!0), N(L, null, v(e.block.icons, (t) => (m(), N("a", {
|
|
4156
4156
|
key: t.id,
|
|
4157
4157
|
href: t.url || "#",
|
|
4158
4158
|
class: "tpl:cursor-default",
|
|
4159
|
-
onClick: o[0] ||=
|
|
4160
|
-
}, [
|
|
4159
|
+
onClick: o[0] ||= i(() => {}, ["prevent"])
|
|
4160
|
+
}, [E(Bl, {
|
|
4161
4161
|
platform: t.platform,
|
|
4162
4162
|
"icon-style": e.block.iconStyle,
|
|
4163
4163
|
"icon-tone": e.block.iconTone,
|
|
@@ -4167,7 +4167,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4167
4167
|
"icon-style",
|
|
4168
4168
|
"icon-tone",
|
|
4169
4169
|
"icon-size"
|
|
4170
|
-
])], 8, Hl))), 128))], 4)) : (
|
|
4170
|
+
])], 8, Hl))), 128))], 4)) : (m(), N("div", Ul, [E(A(Rn), { size: 16 }), F("span", null, d(A(n).social.addIcons), 1)]))]));
|
|
4171
4171
|
}
|
|
4172
4172
|
}), Gl = { class: "tpl:w-full" }, Kl = {
|
|
4173
4173
|
key: 0,
|
|
@@ -4176,22 +4176,22 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4176
4176
|
"background-color": "var(--tpl-bg-hover)",
|
|
4177
4177
|
color: "var(--tpl-text-dim)"
|
|
4178
4178
|
}
|
|
4179
|
-
}, ql = /* @__PURE__ */
|
|
4179
|
+
}, ql = /* @__PURE__ */ z({
|
|
4180
4180
|
__name: "SpacerBlock",
|
|
4181
4181
|
props: {
|
|
4182
4182
|
block: {},
|
|
4183
4183
|
viewport: {}
|
|
4184
4184
|
},
|
|
4185
4185
|
setup(e) {
|
|
4186
|
-
let t = e, n =
|
|
4186
|
+
let t = e, n = Dn(An, "SpacerBlock"), r = k(() => ({
|
|
4187
4187
|
height: `${t.block.height}px`,
|
|
4188
4188
|
minHeight: `${t.block.height}px`,
|
|
4189
4189
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4190
4190
|
}));
|
|
4191
|
-
return (t,
|
|
4192
|
-
style:
|
|
4193
|
-
class:
|
|
4194
|
-
}, [
|
|
4191
|
+
return (t, i) => (m(), N("div", Gl, [F("div", {
|
|
4192
|
+
style: y(r.value),
|
|
4193
|
+
class: h(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !A(n).state.previewMode }])
|
|
4194
|
+
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span", Kl, d(e.block.height) + "px ", 1))], 6)]));
|
|
4195
4195
|
}
|
|
4196
4196
|
}), Jl = { class: "tpl:w-full" }, Yl = { key: 0 }, Xl = [
|
|
4197
4197
|
"aria-label",
|
|
@@ -4204,7 +4204,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4204
4204
|
], Ql = {
|
|
4205
4205
|
key: 1,
|
|
4206
4206
|
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)]"
|
|
4207
|
-
}, $l = /*#__PURE__*/
|
|
4207
|
+
}, $l = /*#__PURE__*/ Sr(/* @__PURE__ */ z({
|
|
4208
4208
|
__name: "TableBlock",
|
|
4209
4209
|
props: {
|
|
4210
4210
|
block: {},
|
|
@@ -4218,28 +4218,28 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4218
4218
|
updated(e, t) {
|
|
4219
4219
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4220
4220
|
}
|
|
4221
|
-
}, n = e, { t: r } =
|
|
4221
|
+
}, n = e, { t: r } = le(), a = Dn(An, "TableBlock"), s = Dn(cn, "TableBlock"), c = k(() => n.block.rows.length > 0), l = k(() => {
|
|
4222
4222
|
let e = {
|
|
4223
4223
|
width: "100%",
|
|
4224
4224
|
borderCollapse: "collapse",
|
|
4225
4225
|
fontSize: `${n.block.fontSize}px`,
|
|
4226
4226
|
textAlign: n.block.textAlign,
|
|
4227
|
-
fontFamily: n.block.fontFamily ?
|
|
4227
|
+
fontFamily: n.block.fontFamily ? s.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
4228
4228
|
};
|
|
4229
4229
|
return n.block.color && (e.color = n.block.color), e;
|
|
4230
|
-
}), u =
|
|
4230
|
+
}), u = k(() => ({
|
|
4231
4231
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
4232
4232
|
padding: `${n.block.cellPadding}px`,
|
|
4233
4233
|
textAlign: n.block.textAlign
|
|
4234
|
-
})),
|
|
4234
|
+
})), f = k(() => ({
|
|
4235
4235
|
...u.value,
|
|
4236
4236
|
fontWeight: "bold",
|
|
4237
4237
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
4238
|
-
})),
|
|
4239
|
-
function
|
|
4238
|
+
})), p = k(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), h = k(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
4239
|
+
function g() {
|
|
4240
4240
|
a.selectBlock(n.block.id);
|
|
4241
4241
|
}
|
|
4242
|
-
function
|
|
4242
|
+
function _(e, t, r) {
|
|
4243
4243
|
let i = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
4244
4244
|
...n,
|
|
4245
4245
|
cells: n.cells.map((e) => e.id === t ? {
|
|
@@ -4249,44 +4249,44 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4249
4249
|
} : n);
|
|
4250
4250
|
a.updateBlock(n.block.id, { rows: o });
|
|
4251
4251
|
}
|
|
4252
|
-
return (e, n) => (
|
|
4252
|
+
return (e, n) => (m(), N("div", Jl, [c.value ? (m(), N("table", {
|
|
4253
4253
|
key: 0,
|
|
4254
|
-
style:
|
|
4254
|
+
style: y(l.value),
|
|
4255
4255
|
class: "tpl-table-editable"
|
|
4256
|
-
}, [
|
|
4256
|
+
}, [p.value ? (m(), N("thead", Yl, [F("tr", null, [(m(!0), N(L, null, v(p.value.cells, (e) => C((m(), N("th", {
|
|
4257
4257
|
key: e.id,
|
|
4258
|
-
style: f
|
|
4259
|
-
"aria-label":
|
|
4258
|
+
style: y(f.value),
|
|
4259
|
+
"aria-label": A(r).table.cellPlaceholder,
|
|
4260
4260
|
contenteditable: "true",
|
|
4261
|
-
"data-placeholder":
|
|
4262
|
-
onBlur: (t) =>
|
|
4263
|
-
onKeydown: n[0] ||=
|
|
4264
|
-
onClick:
|
|
4265
|
-
}, null, 44, Xl)), [[t, e.content]])), 128))])])) :
|
|
4266
|
-
key:
|
|
4267
|
-
style:
|
|
4268
|
-
"aria-label":
|
|
4261
|
+
"data-placeholder": A(r).table.cellPlaceholder,
|
|
4262
|
+
onBlur: (t) => _(p.value.id, e.id, t),
|
|
4263
|
+
onKeydown: n[0] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4264
|
+
onClick: i(g, ["stop"])
|
|
4265
|
+
}, null, 44, Xl)), [[t, e.content]])), 128))])])) : j("", !0), F("tbody", null, [(m(!0), N(L, null, v(h.value, (e) => (m(), N("tr", { key: e.id }, [(m(!0), N(L, null, v(e.cells, (a) => C((m(), N("td", {
|
|
4266
|
+
key: a.id,
|
|
4267
|
+
style: y(u.value),
|
|
4268
|
+
"aria-label": A(r).table.cellPlaceholder,
|
|
4269
4269
|
contenteditable: "true",
|
|
4270
|
-
"data-placeholder":
|
|
4271
|
-
onBlur: (t) =>
|
|
4272
|
-
onKeydown: n[1] ||=
|
|
4273
|
-
onClick:
|
|
4274
|
-
}, null, 44, Zl)), [[t,
|
|
4270
|
+
"data-placeholder": A(r).table.cellPlaceholder,
|
|
4271
|
+
onBlur: (t) => _(e.id, a.id, t),
|
|
4272
|
+
onKeydown: n[1] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4273
|
+
onClick: i(g, ["stop"])
|
|
4274
|
+
}, null, 44, Zl)), [[t, a.content]])), 128))]))), 128))])], 4)) : (m(), N("div", Ql, [E(A(zn), { size: 16 }), F("span", null, d(A(r).table.empty), 1)]))]));
|
|
4275
4275
|
}
|
|
4276
|
-
}), [["__scopeId", "data-v-6751d456"]]), eu = /* @__PURE__ */
|
|
4276
|
+
}), [["__scopeId", "data-v-6751d456"]]), eu = /* @__PURE__ */ z({
|
|
4277
4277
|
__name: "VideoPlayButton",
|
|
4278
4278
|
props: { hoverEffect: {
|
|
4279
4279
|
type: Boolean,
|
|
4280
4280
|
default: !1
|
|
4281
4281
|
} },
|
|
4282
4282
|
setup(e) {
|
|
4283
|
-
return (t, n) => (
|
|
4283
|
+
return (t, n) => (m(), N("div", { class: h(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [F("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [F("svg", {
|
|
4284
4284
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
4285
4285
|
width: "28",
|
|
4286
4286
|
height: "28",
|
|
4287
4287
|
viewBox: "0 0 24 24",
|
|
4288
4288
|
fill: "currentColor"
|
|
4289
|
-
}, [
|
|
4289
|
+
}, [F("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
4290
4290
|
}
|
|
4291
4291
|
});
|
|
4292
4292
|
// src/utils/videoThumbnail.ts
|
|
@@ -4332,14 +4332,14 @@ var ru = ["src", "alt"], iu = {
|
|
|
4332
4332
|
}, au = ["href"], ou = ["src", "alt"], su = ["src", "alt"], cu = {
|
|
4333
4333
|
key: 3,
|
|
4334
4334
|
class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
4335
|
-
}, lu = /* @__PURE__ */
|
|
4335
|
+
}, lu = /* @__PURE__ */ z({
|
|
4336
4336
|
__name: "VideoBlock",
|
|
4337
4337
|
props: {
|
|
4338
4338
|
block: {},
|
|
4339
4339
|
viewport: {}
|
|
4340
4340
|
},
|
|
4341
4341
|
setup(e) {
|
|
4342
|
-
let t = e, { t: n } =
|
|
4342
|
+
let t = e, { t: n } = le(), { syntax: r } = B(), a = k(() => rt(t.block.url, r) || rt(t.block.thumbnailUrl, r)), o = Wn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = Wn(() => a.value ? t.block.placeholderUrl : void 0), c = k(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : nu(t.block.url)), l = k(() => ({ textAlign: t.block.align })), u = k(() => {
|
|
4343
4343
|
let e = t.block.align;
|
|
4344
4344
|
return {
|
|
4345
4345
|
maxWidth: "100%",
|
|
@@ -4349,55 +4349,55 @@ var ru = ["src", "alt"], iu = {
|
|
|
4349
4349
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4350
4350
|
marginRight: e === "center" ? "auto" : void 0
|
|
4351
4351
|
};
|
|
4352
|
-
}),
|
|
4353
|
-
return (t, r) => (
|
|
4352
|
+
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() => rt(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4353
|
+
return (t, r) => (m(), N("div", {
|
|
4354
4354
|
class: "tpl:w-full",
|
|
4355
|
-
style:
|
|
4356
|
-
}, [a.value && e.block.placeholderUrl ? (
|
|
4355
|
+
style: y(l.value)
|
|
4356
|
+
}, [a.value && e.block.placeholderUrl ? (m(), N("div", {
|
|
4357
4357
|
key: 0,
|
|
4358
4358
|
class: "tpl:relative tpl:inline-block",
|
|
4359
|
-
style:
|
|
4360
|
-
}, [
|
|
4359
|
+
style: y(u.value)
|
|
4360
|
+
}, [F("img", {
|
|
4361
4361
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
4362
|
-
src:
|
|
4362
|
+
src: A(s),
|
|
4363
4363
|
alt: e.block.alt,
|
|
4364
|
-
style: f
|
|
4365
|
-
}, null, 12, ru),
|
|
4364
|
+
style: y(f.value)
|
|
4365
|
+
}, null, 12, ru), E(eu)], 4)) : a.value ? (m(), N("div", {
|
|
4366
4366
|
key: 1,
|
|
4367
4367
|
class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
4368
|
-
style:
|
|
4369
|
-
}, [
|
|
4368
|
+
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
4369
|
+
}, [E(A(Nr), {
|
|
4370
4370
|
size: 36,
|
|
4371
4371
|
"stroke-width": 1.5,
|
|
4372
4372
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4373
4373
|
style: { opacity: "0.5" }
|
|
4374
|
-
}),
|
|
4374
|
+
}), F("span", iu, [E(ca, { text: p.value }, null, 8, ["text"])])], 4)) : c.value ? (m(), N(L, { key: 2 }, [e.block.url ? (m(), N("a", {
|
|
4375
4375
|
key: 0,
|
|
4376
4376
|
href: e.block.url,
|
|
4377
4377
|
target: "_blank",
|
|
4378
4378
|
rel: "noopener noreferrer",
|
|
4379
4379
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
4380
|
-
style:
|
|
4381
|
-
onClick: r[0] ||=
|
|
4382
|
-
}, [
|
|
4380
|
+
style: y(u.value),
|
|
4381
|
+
onClick: r[0] ||= i(() => {}, ["prevent"])
|
|
4382
|
+
}, [F("img", {
|
|
4383
4383
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
4384
|
-
src:
|
|
4384
|
+
src: c.value,
|
|
4385
4385
|
alt: e.block.alt,
|
|
4386
|
-
style: f
|
|
4387
|
-
}, null, 12, ou),
|
|
4386
|
+
style: y(f.value)
|
|
4387
|
+
}, null, 12, ou), E(eu, { "hover-effect": "" })], 12, au)) : (m(), N("div", {
|
|
4388
4388
|
key: 1,
|
|
4389
4389
|
class: "tpl:relative tpl:inline-block",
|
|
4390
|
-
style:
|
|
4391
|
-
}, [
|
|
4390
|
+
style: y(u.value)
|
|
4391
|
+
}, [F("img", {
|
|
4392
4392
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
4393
|
-
src:
|
|
4393
|
+
src: c.value,
|
|
4394
4394
|
alt: e.block.alt,
|
|
4395
|
-
style: f
|
|
4396
|
-
}, null, 12, su),
|
|
4395
|
+
style: y(f.value)
|
|
4396
|
+
}, null, 12, su), E(eu)], 4))], 64)) : (m(), N("div", cu, [E(A(Nr), {
|
|
4397
4397
|
size: 40,
|
|
4398
4398
|
"stroke-width": 1.5,
|
|
4399
4399
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4400
|
-
}),
|
|
4400
|
+
}), F("span", null, d(A(n).video.addVideo), 1)]))], 4));
|
|
4401
4401
|
}
|
|
4402
4402
|
}), uu = {
|
|
4403
4403
|
section: Il,
|
|
@@ -4412,118 +4412,118 @@ var ru = ["src", "alt"], iu = {
|
|
|
4412
4412
|
table: $l,
|
|
4413
4413
|
spacer: ql,
|
|
4414
4414
|
html: Aa,
|
|
4415
|
-
countdown:
|
|
4415
|
+
countdown: se(() => import("./CountdownBlock-D8dqjm3F.js"))
|
|
4416
4416
|
};
|
|
4417
|
-
function du(
|
|
4418
|
-
let { editor: n, config: r, translations: i, fontsManager: a } =
|
|
4417
|
+
function du(t) {
|
|
4418
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = le(i), l = k(() => me(me(me(yi(i), zi(n.content.value.settings?.locale)), _e(n.content.value.settings) === "rtl" ? {
|
|
4419
4419
|
title: { textAlign: "right" },
|
|
4420
4420
|
table: { textAlign: "right" }
|
|
4421
4421
|
} : {}), r.blockDefaults ?? {}));
|
|
4422
4422
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4423
|
-
let { resolvedTheme: u } = ui(
|
|
4423
|
+
let { resolvedTheme: u } = ui(k(() => n.state.uiTheme)), d = M(r.theme ?? {}), { themeStyles: f } = Ur({
|
|
4424
4424
|
themeOverrides: d,
|
|
4425
4425
|
resolvedTheme: u,
|
|
4426
4426
|
extraStyles: () => ({
|
|
4427
4427
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
4428
|
-
...
|
|
4428
|
+
...t.themeExtraStyles?.()
|
|
4429
4429
|
})
|
|
4430
|
-
}), p =
|
|
4430
|
+
}), p = t.history ?? Vn({
|
|
4431
4431
|
content: n.content,
|
|
4432
4432
|
setContent: (e, t) => n.setContent(e, t)
|
|
4433
4433
|
});
|
|
4434
|
-
|
|
4435
|
-
let m =
|
|
4434
|
+
t.history || Gn(n, p);
|
|
4435
|
+
let m = Bn({
|
|
4436
4436
|
addBlock: n.addBlock,
|
|
4437
4437
|
removeBlock: n.removeBlock,
|
|
4438
4438
|
updateBlock: n.updateBlock,
|
|
4439
4439
|
selectBlock: n.selectBlock,
|
|
4440
4440
|
findBlockLocation: n.findBlockLocation,
|
|
4441
|
-
blockDefaults: () =>
|
|
4442
|
-
}), h =
|
|
4441
|
+
blockDefaults: () => l.value
|
|
4442
|
+
}), h = ar(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? Un({
|
|
4443
4443
|
content: n.content,
|
|
4444
4444
|
isDirty: () => n.state.isDirty,
|
|
4445
|
-
...
|
|
4446
|
-
}) : null,
|
|
4447
|
-
|
|
4448
|
-
e ?
|
|
4445
|
+
...t.autoSaveOptions
|
|
4446
|
+
}) : null, v = null;
|
|
4447
|
+
_ && (v = c(p.isNavigating, (e) => {
|
|
4448
|
+
e ? _.pause() : _.resume();
|
|
4449
4449
|
}));
|
|
4450
4450
|
let y = li(n, {
|
|
4451
4451
|
t: o,
|
|
4452
4452
|
format: s
|
|
4453
|
-
}, r.customBlocks ?? []), b =
|
|
4454
|
-
if (b.allowCustomIgnored &&
|
|
4453
|
+
}, r.customBlocks ?? []), b = kt(r.colors);
|
|
4454
|
+
if (b.allowCustomIgnored && Et.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 && Et.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4455
4455
|
let e = vi(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4456
|
-
e.length > 0 &&
|
|
4456
|
+
e.length > 0 && Et.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.`);
|
|
4457
4457
|
}
|
|
4458
|
-
let x =
|
|
4459
|
-
for (let e of x.unknown)
|
|
4458
|
+
let x = or(r.templateSettings);
|
|
4459
|
+
for (let e of x.unknown) Et.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${sr.join(", ")}) — skipping it.`);
|
|
4460
4460
|
let S = Lr();
|
|
4461
4461
|
hi(S, uu);
|
|
4462
|
-
let
|
|
4463
|
-
function
|
|
4462
|
+
let C = /* @__PURE__ */ new Set();
|
|
4463
|
+
function w(e) {
|
|
4464
4464
|
for (let t of e) {
|
|
4465
4465
|
S.registerCustom(t, Sa);
|
|
4466
|
-
for (let e of Bi(t, b))
|
|
4466
|
+
for (let e of Bi(t, b)) C.has(e.id) || (C.add(e.id), Et.warn(e.message));
|
|
4467
4467
|
}
|
|
4468
4468
|
}
|
|
4469
|
-
r.customBlocks?.length &&
|
|
4470
|
-
let
|
|
4471
|
-
if (
|
|
4472
|
-
let
|
|
4473
|
-
|
|
4474
|
-
let
|
|
4475
|
-
|
|
4469
|
+
r.customBlocks?.length && w(r.customBlocks);
|
|
4470
|
+
let E = ei();
|
|
4471
|
+
if (ie() && T(E.dispose), t.containerEl) {
|
|
4472
|
+
let n = t.containerEl;
|
|
4473
|
+
e(document, "pointerdown", (e) => {
|
|
4474
|
+
let t = n.value;
|
|
4475
|
+
t && (e.composedPath?.() ?? []).includes(t) && E.claim();
|
|
4476
4476
|
}, { capture: !0 });
|
|
4477
4477
|
}
|
|
4478
|
-
function
|
|
4479
|
-
let
|
|
4480
|
-
|
|
4478
|
+
function ee() {
|
|
4479
|
+
let e = t.capabilities?.templates;
|
|
4480
|
+
e ? e.save() : _?.flush();
|
|
4481
4481
|
}
|
|
4482
|
-
function
|
|
4483
|
-
|
|
4482
|
+
function D(e) {
|
|
4483
|
+
E.isActive() && Hi(e, {
|
|
4484
4484
|
history: p,
|
|
4485
4485
|
selectBlock: (e) => n.selectBlock(e),
|
|
4486
4486
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
4487
4487
|
removeBlock: (e) => n.removeBlock(e),
|
|
4488
|
-
onSave:
|
|
4489
|
-
isPicking: () =>
|
|
4490
|
-
onConfirmPick: () =>
|
|
4491
|
-
onCancelPick: () =>
|
|
4488
|
+
onSave: ee,
|
|
4489
|
+
isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
4490
|
+
onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
|
|
4491
|
+
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4492
4492
|
});
|
|
4493
4493
|
}
|
|
4494
|
-
|
|
4495
|
-
let
|
|
4496
|
-
|
|
4497
|
-
let
|
|
4494
|
+
e(document, "keydown", D);
|
|
4495
|
+
let O = M(null), A = t.editorRoot ?? document;
|
|
4496
|
+
g(Nn, A), g(Cn, O), g(Rt, /* @__PURE__ */ new Map()), g(bn, i), g(An, n), g(Mn, p), g(En, m), g(yn, h), g(cn, a), g(On, f), g(sn, u), g(ln, l), g(hn, r.locale), g(vn, S), g(pn, r.customBlocks ?? []), g(Wt, r.paletteBlocks), g(Zt, gi(r.htmlBlockPreview)), g(Qt, r.layout), g(rn, r.sectionWrapper), g(Sn, b), g(dn, x.fields), g(fn, di(n.content, S));
|
|
4497
|
+
let j = Ee(r.mergeTags?.syntax);
|
|
4498
4498
|
for (let e of ["opener", "closer"]) {
|
|
4499
|
-
let t =
|
|
4500
|
-
typeof t == "string" && t.trim() === "" &&
|
|
4499
|
+
let t = j[e];
|
|
4500
|
+
typeof t == "string" && t.trim() === "" && Et.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
4501
4501
|
}
|
|
4502
|
-
typeof
|
|
4503
|
-
let
|
|
4502
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && ut(j) === null && Et.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
4503
|
+
let N = re(r.mergeTags?.tags ?? []);
|
|
4504
4504
|
function te(e) {
|
|
4505
|
-
Array.isArray(e) ?
|
|
4505
|
+
Array.isArray(e) ? N.value = e : Et.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4506
4506
|
}
|
|
4507
|
-
|
|
4508
|
-
let
|
|
4509
|
-
|
|
4510
|
-
let
|
|
4507
|
+
g(Yt, N), g(It, j), g(Bt, r.mergeTags?.onRequest ?? null), g(zt, r.mergeTags?.autocomplete !== !1), g(Pn, r.mergeTags?.showRawValue !== !1);
|
|
4508
|
+
let P = M(at(r.mergeTags?.tags ?? []));
|
|
4509
|
+
g(Xt, P);
|
|
4510
|
+
let ne = ri({
|
|
4511
4511
|
resolvePreview: r.resolvePreview,
|
|
4512
4512
|
getContent: () => {
|
|
4513
4513
|
let e = n.content.value;
|
|
4514
4514
|
if (!n.state.previewMode) return e;
|
|
4515
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
4516
|
-
return r.layout ?
|
|
4515
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = be(e, t);
|
|
4516
|
+
return r.layout ? bt(be(r.layout, t, { missing: "default" }), i) : i;
|
|
4517
4517
|
},
|
|
4518
4518
|
isActive: () => n.state.previewMode,
|
|
4519
4519
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
4520
4520
|
});
|
|
4521
|
-
|
|
4522
|
-
let
|
|
4523
|
-
|
|
4524
|
-
let
|
|
4525
|
-
|
|
4526
|
-
let
|
|
4521
|
+
g(Ut, ne), g(nn, r.resolvePreview);
|
|
4522
|
+
let F = k(() => !(n.state.previewMode && ne.isConfigured));
|
|
4523
|
+
g(on, F);
|
|
4524
|
+
let I = ii();
|
|
4525
|
+
g(Ht, I), g(Gt, M(!1)), g(qt, M(!1)), g(gn, r.logicTags?.tags ?? []), g(Ft, r.logicTags?.pairs ?? []), g($t, r.logicTags?.onRequest ?? null), g(Kt, ai()), g(tn, r.onRequestMedia ?? null), g(kn, r.canDropMedia ?? null), g(Lt, r.resolveImageUrl ? rr(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && Et.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), g(an, r.displayConditions?.conditions ?? []), g(wn, r.displayConditions?.allowCustom ?? !1), g(Vt, r.displayConditions?.onRequest ?? null), g(un, t.capabilities ?? {}), g(jn, y);
|
|
4526
|
+
let L = oi(r.lint) ? null : ci({
|
|
4527
4527
|
content: n.content,
|
|
4528
4528
|
get options() {
|
|
4529
4529
|
return ti({
|
|
@@ -4533,47 +4533,47 @@ function du(e) {
|
|
|
4533
4533
|
});
|
|
4534
4534
|
},
|
|
4535
4535
|
customBlocks: r.customBlocks,
|
|
4536
|
-
mergeTagSyntax:
|
|
4536
|
+
mergeTagSyntax: j,
|
|
4537
4537
|
updateBlock: n.updateBlock,
|
|
4538
4538
|
updateSettings: n.updateSettings,
|
|
4539
4539
|
removeBlock: n.removeBlock
|
|
4540
4540
|
});
|
|
4541
|
-
|
|
4542
|
-
function
|
|
4543
|
-
|
|
4541
|
+
g(Pt, L);
|
|
4542
|
+
function ae() {
|
|
4543
|
+
v?.(), L?.destroy(), _?.destroy(), p.destroy();
|
|
4544
4544
|
}
|
|
4545
4545
|
return {
|
|
4546
4546
|
t: o,
|
|
4547
4547
|
format: s,
|
|
4548
|
-
editorRoot:
|
|
4548
|
+
editorRoot: A,
|
|
4549
4549
|
history: p,
|
|
4550
4550
|
blockActions: m,
|
|
4551
4551
|
conditionPreview: h,
|
|
4552
|
-
autoSave:
|
|
4552
|
+
autoSave: _,
|
|
4553
4553
|
resolvedTheme: u,
|
|
4554
4554
|
themeStyles: f,
|
|
4555
4555
|
themeOverrides: d,
|
|
4556
4556
|
registry: S,
|
|
4557
4557
|
keyboardReorder: y,
|
|
4558
|
-
templateLint:
|
|
4559
|
-
popoverRoot:
|
|
4560
|
-
mergeTagSampleMode:
|
|
4561
|
-
previewResolution:
|
|
4562
|
-
appliesConditionFilter:
|
|
4563
|
-
registerCustomBlocks:
|
|
4558
|
+
templateLint: L,
|
|
4559
|
+
popoverRoot: O,
|
|
4560
|
+
mergeTagSampleMode: P,
|
|
4561
|
+
previewResolution: ne,
|
|
4562
|
+
appliesConditionFilter: F,
|
|
4563
|
+
registerCustomBlocks: w,
|
|
4564
4564
|
setMergeTags: te,
|
|
4565
|
-
mergeTags:
|
|
4566
|
-
mergeTagSyntax:
|
|
4567
|
-
destroy:
|
|
4565
|
+
mergeTags: N,
|
|
4566
|
+
mergeTagSyntax: j,
|
|
4567
|
+
destroy: ae
|
|
4568
4568
|
};
|
|
4569
4569
|
}
|
|
4570
4570
|
// src/composables/useSmallScreenNotice.ts
|
|
4571
4571
|
var fu = "(max-width: 767px)";
|
|
4572
4572
|
function pu(e) {
|
|
4573
|
-
let
|
|
4573
|
+
let n = t(fu);
|
|
4574
4574
|
return {
|
|
4575
|
-
isSmallScreen:
|
|
4576
|
-
showNotice:
|
|
4575
|
+
isSmallScreen: n,
|
|
4576
|
+
showNotice: k(() => (I(e) ?? !0) && n.value)
|
|
4577
4577
|
};
|
|
4578
4578
|
}
|
|
4579
4579
|
export { Di as A, Jr as B, Yi as C, Ui as D, ea as E, ji as F, kr as G, Ir as H, Ai as I, Dr as K, ri as L, Pi as M, Ni as N, oa as O, Mi as P, ti as R, Ki as S, $i as T, Fr as U, Vr as V, jr as W, Aa as _, ql as a, pa as b, jl as c, No as d, jo as f, Ha as g, Ka as h, $l as i, Fi as j, Wi as k, Po as l, Ya as m, du as n, Wl as o, Xa as p, lu as r, Il as s, pu as t, Lo as u, wa as v, ia as w, ua as x, Sa as y, Xr as z };
|