@templatical/editor 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CXpsSTbt.js → AiChatSidebar-CnRXeK77.js} +14 -14
- package/dist/{AiFeatureMenu-De9ow6Ej.js → AiFeatureMenu-BYDDrpj6.js} +8 -8
- package/dist/{BlockIssueBadge-FEuyG1p0.js → BlockIssueBadge-DM-vXeD6.js} +5 -5
- package/dist/{CloudEditor-Ccoru8Up.js → CloudEditor-B9a_K6Cm.js} +23 -23
- package/dist/{CollaboratorBar-CmHq6XiL.js → CollaboratorBar-HN4whzM-.js} +5 -5
- package/dist/{CommentsSidebar-DaWP5ZGl.js → CommentsSidebar-_llWQ4VT.js} +14 -14
- package/dist/{CountdownBlock-C51M6s-J.js → CountdownBlock-I99sC0C5.js} +4 -4
- package/dist/{CountdownToolbar-C2QkG8S0.js → CountdownToolbar-BUhOUiQ9.js} +4 -4
- package/dist/{DesignReferenceSidebar-BwIRFmpA.js → DesignReferenceSidebar-0GwjUn2V.js} +11 -11
- package/dist/{IssuesPanel-B6ukjc1i.js → IssuesPanel-4MKZe8yP.js} +8 -8
- package/dist/{LoadingTrack-CZ6tO326.js → LoadingTrack-xCOLUR3o.js} +2 -2
- package/dist/{ModuleBrowserModal-0n6DoZtA.js → ModuleBrowserModal-DPZBsvqk.js} +11 -11
- package/dist/{ModulePreviewCanvas-DEtTEvMM.js → ModulePreviewCanvas-CK4j11-e.js} +3 -3
- package/dist/{NumberWithSuffix-wOM0319c.js → NumberWithSuffix-CxMFy_j3.js} +4 -4
- package/dist/{ParagraphEditor-PQZp1plL.js → ParagraphEditor-DBus_iHH.js} +28 -28
- package/dist/{RichTextEditorContent-C02UzFoS.js → RichTextEditorContent-B_KCY6T1.js} +6 -6
- package/dist/{SaveModuleDialog-WWMn87Oi.js → SaveModuleDialog-DORRSbBo.js} +7 -7
- package/dist/{SnapshotHistory-Dy_Iy7VG.js → SnapshotHistory-DTMVEk03.js} +10 -10
- package/dist/{TemplateScoringPanel-BpQgtaDl.js → TemplateScoringPanel-BIwEwFxD.js} +15 -15
- package/dist/{TestEmailModal--4EVFj1A.js → TestEmailModal-DJmYp0Qi.js} +5 -5
- package/dist/{TitleEditor-C6z6Jzeg.js → TitleEditor-70d9AF1V.js} +15 -15
- package/dist/{TplModal-D5xlYbls.js → TplModal-BEfwlvPC.js} +4 -4
- package/dist/{blockTypeIcons-jZR-IBPY.js → blockTypeIcons-2DRoPa3K.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-8gbvVwXD.js → AiFeatureMenu-CcuKnisc.js} +3 -3
- package/dist/cdn/chunks/{AiFeatureMenu-8gbvVwXD.js.map → AiFeatureMenu-CcuKnisc.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CYoY-wyI.js → BlockIssueBadge-Sr3is7Wr.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-CYoY-wyI.js.map → BlockIssueBadge-Sr3is7Wr.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DGAV0qxk.js → CloudEditor-Bi10d2Gq.js} +9 -9
- package/dist/cdn/chunks/{CloudEditor-DGAV0qxk.js.map → CloudEditor-Bi10d2Gq.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BrzkrQJM.js → CollaboratorBar-C0zeecvl.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-BrzkrQJM.js.map → CollaboratorBar-C0zeecvl.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-BSEKrpZY.js → CountdownBlock-CpSUUDDs.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-BSEKrpZY.js.map → CountdownBlock-CpSUUDDs.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DME9toD5.js → CountdownToolbar-BBzdR-00.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DME9toD5.js.map → CountdownToolbar-BBzdR-00.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BqGOXisb.js → IssuesPanel-Bthq6qoZ.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-BqGOXisb.js.map → IssuesPanel-Bthq6qoZ.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Bz2oCRS9.js → ModuleBrowserModal-CFMd6M7E.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-Bz2oCRS9.js.map → ModuleBrowserModal-CFMd6M7E.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-8i2U3rd6.js → ModulePreviewCanvas-BkcPcF5C.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-8i2U3rd6.js.map → ModulePreviewCanvas-BkcPcF5C.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-C6HZCvvh.js → NumberWithSuffix-C2hH_ZIK.js} +4 -4
- package/dist/cdn/chunks/{NumberWithSuffix-C6HZCvvh.js.map → NumberWithSuffix-C2hH_ZIK.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DfKVmv1W.js → ParagraphEditor-BIWXLPfu.js} +21 -21
- package/dist/cdn/chunks/ParagraphEditor-BIWXLPfu.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-B-HY9asd.js → RichTextEditorContent-DU0gc4bi.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-B-HY9asd.js.map → RichTextEditorContent-DU0gc4bi.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BgwBxW_S.js → SaveModuleDialog-DR9EZlWe.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-BgwBxW_S.js.map → SaveModuleDialog-DR9EZlWe.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C2p3SosJ.js → TitleEditor-DZcx2N4R.js} +12 -12
- package/dist/cdn/chunks/TitleEditor-DZcx2N4R.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-Bck6aYVw.js → blockTypeIcons-eVGGIdne.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-Bck6aYVw.js.map → blockTypeIcons-eVGGIdne.js.map} +1 -1
- package/dist/cdn/chunks/{de-RQrZR56a.js → de-CTYXVU9v.js} +1 -1
- package/dist/cdn/chunks/{de-RQrZR56a.js.map → de-CTYXVU9v.js.map} +1 -1
- package/dist/cdn/chunks/{de-DG1WWVXM.js → de-DFYCT4QU.js} +1 -1
- package/dist/cdn/chunks/{de-DG1WWVXM.js.map → de-DFYCT4QU.js.map} +1 -1
- package/dist/cdn/chunks/{de-BBEGQDsd.js → de-ED7c5RpG.js} +1 -2
- package/dist/cdn/chunks/{de-BBEGQDsd.js.map → de-ED7c5RpG.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-CLpL3kf8.js → draggable-BwWMFq33.js} +2 -2
- package/dist/cdn/chunks/{draggable-CLpL3kf8.js.map → draggable-BwWMFq33.js.map} +1 -1
- package/dist/cdn/chunks/{emojiData-EMFlj6FJ.js → emojiData-6m0DBh7O.js} +1 -1
- package/dist/cdn/chunks/{emojiData-EMFlj6FJ.js.map → emojiData-6m0DBh7O.js.map} +1 -1
- package/dist/cdn/chunks/{en-Bl1ecfRF.js → en-BtmIaJeb.js} +1 -1
- package/dist/cdn/chunks/{en-Bl1ecfRF.js.map → en-BtmIaJeb.js.map} +1 -1
- package/dist/cdn/chunks/{en-BE6OV83-.js → en-DE_y1YWU.js} +1 -1
- package/dist/cdn/chunks/{en-BE6OV83-.js.map → en-DE_y1YWU.js.map} +1 -1
- package/dist/cdn/chunks/{en-CHha-_ta.js → en-ivilDUn0.js} +1 -2
- package/dist/cdn/chunks/{en-CHha-_ta.js.map → en-ivilDUn0.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-DdH6DxVo.js → extensions-CvCoOuWB.js} +4 -4
- package/dist/cdn/chunks/{extensions-DdH6DxVo.js.map → extensions-CvCoOuWB.js.map} +1 -1
- package/dist/cdn/chunks/{features-BOcQhi9B.js → features-CUYy5kZQ.js} +720 -720
- package/dist/cdn/chunks/{features-BOcQhi9B.js.map → features-CUYy5kZQ.js.map} +1 -1
- package/dist/cdn/chunks/{icons-BVyDCkxF.js → icons-C4zY5-I3.js} +2 -2
- package/dist/cdn/chunks/{icons-BVyDCkxF.js.map → icons-C4zY5-I3.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-cpFt-Vmw.js → liquid.browser-rMoPo2t_.js} +1 -1
- package/dist/cdn/chunks/{liquid.browser-cpFt-Vmw.js.map → liquid.browser-rMoPo2t_.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CPZI4Yxq.js → media-library-BNt3msId.js} +5 -5
- package/dist/cdn/chunks/{media-library-CPZI4Yxq.js.map → media-library-BNt3msId.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CQl2JxRp.js → pt-BR-B2ZvFlRL.js} +1 -1
- package/dist/cdn/chunks/{pt-BR-CQl2JxRp.js.map → pt-BR-B2ZvFlRL.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CFomv2R8.js → pt-BR-B5tm2iBl.js} +1 -2
- package/dist/cdn/chunks/{pt-BR-CFomv2R8.js.map → pt-BR-B5tm2iBl.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BYRTP5Ww.js → pt-BR-BibOQm-o.js} +1 -1
- package/dist/cdn/chunks/{pt-BR-BYRTP5Ww.js.map → pt-BR-BibOQm-o.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-bjpcqCZG.js → pusher-CHo5Cua0.js} +2 -2
- package/dist/cdn/chunks/{pusher-bjpcqCZG.js.map → pusher-CHo5Cua0.js.map} +1 -1
- package/dist/cdn/chunks/{quality-Cytz80Z5.js → quality-BTPRPGB-.js} +3 -3
- package/dist/cdn/chunks/{quality-Cytz80Z5.js.map → quality-BTPRPGB-.js.map} +1 -1
- package/dist/cdn/chunks/{readableTextColor-DhoK4XiZ.js → readableTextColor-f8Kykfnh.js} +1 -1
- package/dist/cdn/chunks/{readableTextColor-DhoK4XiZ.js.map → readableTextColor-f8Kykfnh.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Bsqzjvsr.js → renderer-IOmuuZjJ.js} +6 -6
- package/dist/cdn/chunks/{renderer-Bsqzjvsr.js.map → renderer-IOmuuZjJ.js.map} +1 -1
- package/dist/cdn/chunks/{src-BRhJ_W0W.js → src-Dp0ZFQ4-.js} +8 -8
- package/dist/cdn/chunks/{src-BRhJ_W0W.js.map → src-Dp0ZFQ4-.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-DP1VOca8.js → styleConstants-lGobwiLH.js} +1 -1
- package/dist/cdn/chunks/{styleConstants-DP1VOca8.js.map → styleConstants-lGobwiLH.js.map} +1 -1
- package/dist/cdn/chunks/{styles-MrOGXwzJ.js → styles-DtgjgsBH.js} +11 -11
- package/dist/cdn/chunks/{styles-MrOGXwzJ.js.map → styles-DtgjgsBH.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-BCvhHXDe.js → tiptap-BErAJEvo.js} +8 -8
- package/dist/cdn/chunks/{tiptap-BCvhHXDe.js.map → tiptap-BErAJEvo.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +13 -13
- package/dist/{check-DwVS7v3N.js → check-ChQyfxJ3.js} +1 -1
- package/dist/{chevron-down-CytfFjil.js → chevron-down-DJjo0jSV.js} +1 -1
- package/dist/{circle-alert-9J8Q4fwU.js → circle-alert-CPH6l3Lc.js} +1 -1
- package/dist/{clock-CL2fYWmc.js → clock-DHl_BIkU.js} +1 -1
- package/dist/{cloud-DHsOqOnH.js → cloud-Dz8Ay2FM.js} +2 -2
- package/dist/{createLucideIcon-DTECxBv6.js → createLucideIcon-XgXOJ05E.js} +1 -1
- package/dist/{de-KFqjrxG3.js → de-ED7c5RpG.js} +0 -1
- package/dist/{dist-BjSjVZRA.js → dist-BS5Oi67L.js} +1 -1
- package/dist/{dist-3RAjjDZq.js → dist-BTgujVMy.js} +1 -1
- package/dist/{dist-BoGj0ys1.js → dist-BtDBsF3N.js} +1 -1
- package/dist/{dist-UekZXGFH.js → dist-BySzGkeC.js} +1 -1
- package/dist/{dist-B5FKze93.js → dist-BygsE-n3.js} +3 -3
- package/dist/{dist-DgD8K8y0.js → dist-CDZCyoRy.js} +1 -1
- package/dist/{dist-DPiqL9q5.js → dist-CDtcJMB2.js} +1 -1
- package/dist/{dist-BWVK8w_m.js → dist-D7JUZ2Kd.js} +1 -1
- package/dist/{dist-DpF3BN6Y.js → dist-DWhP3Dp2.js} +780 -780
- package/dist/{dist-qFGe50Kc.js → dist-DnGTaPRX.js} +1 -1
- package/dist/{dist-CkhqaMca.js → dist-HO0vjY5Z.js} +1 -1
- package/dist/{dist-D8IxYzaU.js → dist-T-ORzNfM.js} +3 -3
- package/dist/{dist-DiYYRj9J.js → dist-v-O2Subd.js} +1 -1
- package/dist/{en-CNm94YYD.js → en-ivilDUn0.js} +0 -1
- package/dist/{extensions-BTheidN4.js → extensions-BmGiz8Oo.js} +6 -6
- package/dist/{formatRelativeTime-bvx5sFh5.js → formatRelativeTime-CyDg5cDD.js} +1 -1
- package/dist/{image-up-YgXg9o1y.js → image-up-CPBCOMit.js} +1 -1
- package/dist/{info-W-213KLD.js → info-DIY9mguM.js} +1 -1
- package/dist/{keys-XS_XrjqL.js → keys-B8K7Z7Ef.js} +1 -1
- package/dist/{list-checks-BQrZlWzC.js → list-checks-CSCyu3fH.js} +1 -1
- package/dist/{loader-circle-BQPHssrF.js → loader-circle-Rz_4vJLH.js} +1 -1
- package/dist/{message-circle-iMgHXBeH.js → message-circle-D-umK_MU.js} +1 -1
- package/dist/{pt-BR-gxZZAUWp.js → pt-BR-B5tm2iBl.js} +0 -1
- package/dist/{refresh-cw-DFozdLYp.js → refresh-cw-CvWF4jfR.js} +1 -1
- package/dist/{scan-line-D3NN0Gre.js → scan-line-wanvAFDr.js} +1 -1
- package/dist/{send-DBhq0GU2.js → send-BhbhbIFT.js} +1 -1
- package/dist/{shield-check-DquM3-E5.js → shield-check-CXPPMWth.js} +1 -1
- package/dist/{sparkles-CTGknLJy.js → sparkles-CrUN0KWY.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DfdDKEGV.js → styles-DFeOGKa_.js} +29 -29
- package/dist/templatical-editor.js +13 -13
- package/dist/{text-align-end-BPOHCD7K.js → text-align-end-Bkq8oBrD.js} +1 -1
- package/dist/{trash-2-VyX2kcG0.js → trash-2-BpY5BCLT.js} +1 -1
- package/dist/{triangle-alert-HIqW9Hwv.js → triangle-alert-MwJBKR2e.js} +1 -1
- package/dist/{useAliveFlag-t3e0dokQ.js → useAliveFlag-BLyG8L4d.js} +1 -1
- package/dist/{useCloudI18n-oETj4WiF.js → useCloudI18n-DFzVgYhJ.js} +2 -2
- package/dist/{useEditorCore-YaOoz7QB.js → useEditorCore-BXz-UXPd.js} +20 -20
- package/dist/{useI18n-tMHqPsE4.js → useI18n-CBbStVlD.js} +2 -2
- package/dist/{useMergeTag-Bv8ASt6n.js → useMergeTag-CS2bmWA0.js} +3 -3
- package/dist/usePopoverRoot-62PlZQQ3.js +8 -0
- package/dist/{vue.runtime.esm-bundler-xiAB6UTz.js → vue.runtime.esm-bundler-BDSGA5hA.js} +1 -1
- package/dist/{x-C1j-AamY.js → x-rcnxRG8Y.js} +1 -1
- package/package.json +9 -9
- package/dist/cdn/chunks/ParagraphEditor-DfKVmv1W.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-C2p3SosJ.js.map +0 -1
- package/dist/usePopoverRoot-Bs6kLsI3.js +0 -8
- /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-B3ysoDQm.js} +0 -0
- /package/dist/cdn/chunks/{rolldown-runtime-C266TIVP.js → rolldown-runtime-Dqa2HsxW.js} +0 -0
- /package/dist/{de-GOtR9DwW.js → de-CTYXVU9v.js} +0 -0
- /package/dist/{dist-DJmnUmW9.js → dist-Cipw2HFH.js} +0 -0
- /package/dist/{emojiData-DrBuvEoP.js → emojiData-6m0DBh7O.js} +0 -0
- /package/dist/{en-dFFQVzNn.js → en-BtmIaJeb.js} +0 -0
- /package/dist/{liquid.browser-Dc30h4PN.js → liquid.browser-IgQrXHPQ.js} +0 -0
- /package/dist/{pt-BR-iOr79aDg.js → pt-BR-B2ZvFlRL.js} +0 -0
- /package/dist/{readableTextColor-CXzrEnNb.js → readableTextColor-f8Kykfnh.js} +0 -0
- /package/dist/{rolldown-runtime-CAFD8bLK.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
- /package/dist/{styleConstants-DkfOPzGu.js → styleConstants-lGobwiLH.js} +0 -0
- /package/dist/{timeouts-BSGxjuUF.js → timeouts-Bmi_yePw.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as e, r as t } from "./rolldown-runtime-
|
|
2
|
-
import { $ as n, A as r, B as i, C as a, F as o, G as s, H as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, S as _, T as v, U as y, V as b, X as x, Y as S, Z as C, a as w, at as T, b as E, c as D, ct as O, d as ee, et as te, f as k, g as A, h as j, it as M, k as ne, l as N, m as P, n as re, nt as F, o as ie, ot as
|
|
1
|
+
import { n as e, r as t } from "./rolldown-runtime-Dqa2HsxW.js";
|
|
2
|
+
import { $ as n, A as r, B as i, C as a, F as o, G as s, H as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, S as _, T as v, U as y, V as b, X as x, Y as S, Z as C, a as w, at as T, b as E, c as D, ct as O, d as ee, et as te, f as k, g as A, h as j, it as M, k as ne, l as N, m as P, n as re, nt as F, o as ie, ot as I, p as L, rt as ae, s as oe, st as R, t as se, u as z, v as B, w as ce, x as V, y as H, z as U } from "./draggable-BwWMFq33.js";
|
|
3
3
|
//#region src/constants/timeouts.ts
|
|
4
|
-
var
|
|
4
|
+
var le = 3e4, ue = 4e3, de = 5e3, fe = {
|
|
5
5
|
1: 36,
|
|
6
6
|
2: 28,
|
|
7
7
|
3: 22,
|
|
@@ -9,58 +9,58 @@ var ue = 3e4, de = 4e3, fe = 5e3, pe = {
|
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region ../types/src/guards.ts
|
|
12
|
-
function
|
|
12
|
+
function pe(e) {
|
|
13
13
|
return e.type === "section";
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function me(e) {
|
|
16
16
|
return e.type === "title";
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function he(e) {
|
|
19
19
|
return e.type === "paragraph";
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function ge(e) {
|
|
22
22
|
return e.type === "image";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function _e(e) {
|
|
25
25
|
return e.type === "button";
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function ve(e) {
|
|
28
28
|
return e.type === "divider";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function ye(e) {
|
|
31
31
|
return e.type === "video";
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function be(e) {
|
|
34
34
|
return e.type === "social";
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function xe(e) {
|
|
37
37
|
return e.type === "spacer";
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Se(e) {
|
|
40
40
|
return e.type === "html";
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Ce(e) {
|
|
43
43
|
return e.type === "menu";
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function we(e) {
|
|
46
46
|
return e.type === "table";
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Te(e) {
|
|
49
49
|
return e.type === "custom";
|
|
50
50
|
}
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region ../types/src/defaults.ts
|
|
53
|
-
var
|
|
53
|
+
var Ee = {
|
|
54
54
|
content: "<p>Enter your title</p>",
|
|
55
55
|
level: 2,
|
|
56
56
|
color: "#1a1a1a",
|
|
57
57
|
textAlign: "left"
|
|
58
|
-
},
|
|
58
|
+
}, De = { content: "<p>Enter your text here</p>" }, Oe = {
|
|
59
59
|
src: "",
|
|
60
60
|
alt: "",
|
|
61
61
|
width: "full",
|
|
62
62
|
align: "center"
|
|
63
|
-
},
|
|
63
|
+
}, ke = {
|
|
64
64
|
text: "Click Here",
|
|
65
65
|
url: "",
|
|
66
66
|
backgroundColor: "#333333",
|
|
@@ -73,30 +73,30 @@ var De = {
|
|
|
73
73
|
bottom: 12,
|
|
74
74
|
left: 24
|
|
75
75
|
}
|
|
76
|
-
},
|
|
76
|
+
}, Ae = {
|
|
77
77
|
lineStyle: "solid",
|
|
78
78
|
color: "#e0e0e0",
|
|
79
79
|
thickness: 1,
|
|
80
80
|
width: "full"
|
|
81
|
-
},
|
|
81
|
+
}, je = { columns: "1" }, Me = {
|
|
82
82
|
url: "",
|
|
83
83
|
thumbnailUrl: "",
|
|
84
84
|
alt: "Video",
|
|
85
85
|
width: "full",
|
|
86
86
|
align: "center"
|
|
87
|
-
},
|
|
87
|
+
}, Ne = {
|
|
88
88
|
iconStyle: "solid",
|
|
89
89
|
iconSize: "medium",
|
|
90
90
|
spacing: 10,
|
|
91
91
|
align: "center"
|
|
92
|
-
},
|
|
92
|
+
}, Pe = { height: 24 }, Fe = { content: "" }, Ie = {
|
|
93
93
|
fontSize: 15,
|
|
94
94
|
color: "#1a1a1a",
|
|
95
95
|
textAlign: "center",
|
|
96
96
|
separator: "|",
|
|
97
97
|
separatorColor: "#e0e0e0",
|
|
98
98
|
spacing: 10
|
|
99
|
-
},
|
|
99
|
+
}, Le = {
|
|
100
100
|
hasHeaderRow: !0,
|
|
101
101
|
borderColor: "#e0e0e0",
|
|
102
102
|
borderWidth: 1,
|
|
@@ -104,7 +104,7 @@ var De = {
|
|
|
104
104
|
fontSize: 15,
|
|
105
105
|
color: "#1a1a1a",
|
|
106
106
|
textAlign: "left"
|
|
107
|
-
},
|
|
107
|
+
}, Re = {
|
|
108
108
|
targetDate: "",
|
|
109
109
|
timezone: "UTC",
|
|
110
110
|
showDays: !0,
|
|
@@ -124,30 +124,30 @@ var De = {
|
|
|
124
124
|
expiredMessage: "This offer has expired",
|
|
125
125
|
expiredImageUrl: "",
|
|
126
126
|
hideOnExpiry: !1
|
|
127
|
-
},
|
|
127
|
+
}, ze = {
|
|
128
128
|
width: 600,
|
|
129
129
|
backgroundColor: "#ffffff",
|
|
130
130
|
fontFamily: "Arial",
|
|
131
131
|
locale: "en"
|
|
132
132
|
};
|
|
133
|
-
function
|
|
133
|
+
function Be(e) {
|
|
134
134
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Ve(e, t) {
|
|
137
137
|
let n = { ...e };
|
|
138
138
|
for (let r of Object.keys(t)) {
|
|
139
139
|
let i = e[r], a = t[r];
|
|
140
|
-
a !== void 0 && (
|
|
140
|
+
a !== void 0 && (Be(i) && Be(a) ? n[r] = Ve(i, a) : n[r] = a);
|
|
141
141
|
}
|
|
142
142
|
return n;
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region ../types/src/template.ts
|
|
146
|
-
function
|
|
146
|
+
function He(e = "Arial", t) {
|
|
147
147
|
return {
|
|
148
148
|
blocks: [],
|
|
149
149
|
settings: {
|
|
150
|
-
...
|
|
150
|
+
...ze,
|
|
151
151
|
fontFamily: e,
|
|
152
152
|
...t
|
|
153
153
|
}
|
|
@@ -155,13 +155,13 @@ function Ue(e = "Arial", t) {
|
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region ../types/src/factory.ts
|
|
158
|
-
function
|
|
159
|
-
return !t || Object.keys(t).length === 0 ? e :
|
|
158
|
+
function W(e, t) {
|
|
159
|
+
return !t || Object.keys(t).length === 0 ? e : Ve(e, t);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function G() {
|
|
162
162
|
return crypto.randomUUID();
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ue(e = 0) {
|
|
165
165
|
return {
|
|
166
166
|
top: e,
|
|
167
167
|
right: e,
|
|
@@ -169,169 +169,169 @@ function We(e = 0) {
|
|
|
169
169
|
left: e
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function K(e = 10) {
|
|
173
173
|
return {
|
|
174
|
-
padding:
|
|
175
|
-
margin:
|
|
174
|
+
padding: Ue(e),
|
|
175
|
+
margin: Ue(0)
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return
|
|
180
|
-
id:
|
|
178
|
+
function We(e = {}) {
|
|
179
|
+
return W({
|
|
180
|
+
id: G(),
|
|
181
181
|
type: "title",
|
|
182
|
+
...Ee,
|
|
183
|
+
styles: K()
|
|
184
|
+
}, e);
|
|
185
|
+
}
|
|
186
|
+
function Ge(e = {}) {
|
|
187
|
+
return W({
|
|
188
|
+
id: G(),
|
|
189
|
+
type: "paragraph",
|
|
182
190
|
...De,
|
|
183
|
-
styles:
|
|
191
|
+
styles: K()
|
|
184
192
|
}, e);
|
|
185
193
|
}
|
|
186
194
|
function Ke(e = {}) {
|
|
187
|
-
return
|
|
188
|
-
id:
|
|
189
|
-
type: "
|
|
195
|
+
return W({
|
|
196
|
+
id: G(),
|
|
197
|
+
type: "image",
|
|
190
198
|
...Oe,
|
|
191
|
-
styles:
|
|
199
|
+
styles: K()
|
|
192
200
|
}, e);
|
|
193
201
|
}
|
|
194
202
|
function qe(e = {}) {
|
|
195
|
-
return
|
|
196
|
-
id:
|
|
197
|
-
type: "
|
|
203
|
+
return W({
|
|
204
|
+
id: G(),
|
|
205
|
+
type: "button",
|
|
198
206
|
...ke,
|
|
199
|
-
styles:
|
|
207
|
+
styles: K()
|
|
200
208
|
}, e);
|
|
201
209
|
}
|
|
202
210
|
function Je(e = {}) {
|
|
203
|
-
return
|
|
204
|
-
id:
|
|
205
|
-
type: "
|
|
211
|
+
return W({
|
|
212
|
+
id: G(),
|
|
213
|
+
type: "divider",
|
|
206
214
|
...Ae,
|
|
207
|
-
styles:
|
|
215
|
+
styles: K(20)
|
|
208
216
|
}, e);
|
|
209
217
|
}
|
|
210
218
|
function Ye(e = {}) {
|
|
211
|
-
return
|
|
212
|
-
id:
|
|
213
|
-
type: "
|
|
219
|
+
return W({
|
|
220
|
+
id: G(),
|
|
221
|
+
type: "section",
|
|
214
222
|
...je,
|
|
215
|
-
|
|
223
|
+
children: [[]],
|
|
224
|
+
styles: K(20)
|
|
216
225
|
}, e);
|
|
217
226
|
}
|
|
218
227
|
function Xe(e = {}) {
|
|
219
|
-
return
|
|
220
|
-
id:
|
|
221
|
-
type: "
|
|
228
|
+
return W({
|
|
229
|
+
id: G(),
|
|
230
|
+
type: "video",
|
|
222
231
|
...Me,
|
|
223
|
-
|
|
224
|
-
styles: G(20)
|
|
232
|
+
styles: K()
|
|
225
233
|
}, e);
|
|
226
234
|
}
|
|
227
235
|
function Ze(e = {}) {
|
|
228
|
-
return
|
|
229
|
-
id:
|
|
230
|
-
type: "
|
|
236
|
+
return W({
|
|
237
|
+
id: G(),
|
|
238
|
+
type: "social",
|
|
239
|
+
icons: [],
|
|
231
240
|
...Ne,
|
|
232
|
-
styles:
|
|
241
|
+
styles: K()
|
|
233
242
|
}, e);
|
|
234
243
|
}
|
|
235
244
|
function Qe(e = {}) {
|
|
236
|
-
return
|
|
237
|
-
id:
|
|
238
|
-
type: "
|
|
239
|
-
icons: [],
|
|
245
|
+
return W({
|
|
246
|
+
id: G(),
|
|
247
|
+
type: "spacer",
|
|
240
248
|
...Pe,
|
|
241
|
-
styles:
|
|
249
|
+
styles: K(0)
|
|
242
250
|
}, e);
|
|
243
251
|
}
|
|
244
252
|
function $e(e = {}) {
|
|
245
|
-
return
|
|
246
|
-
id:
|
|
247
|
-
type: "
|
|
253
|
+
return W({
|
|
254
|
+
id: G(),
|
|
255
|
+
type: "html",
|
|
248
256
|
...Fe,
|
|
249
|
-
styles:
|
|
257
|
+
styles: K()
|
|
250
258
|
}, e);
|
|
251
259
|
}
|
|
252
260
|
function et(e = {}) {
|
|
253
|
-
return
|
|
254
|
-
id:
|
|
255
|
-
type: "html",
|
|
256
|
-
...Ie,
|
|
257
|
-
styles: G()
|
|
258
|
-
}, e);
|
|
259
|
-
}
|
|
260
|
-
function tt(e = {}) {
|
|
261
|
-
return U({
|
|
262
|
-
id: W(),
|
|
261
|
+
return W({
|
|
262
|
+
id: G(),
|
|
263
263
|
type: "menu",
|
|
264
264
|
items: [],
|
|
265
|
-
...
|
|
266
|
-
styles:
|
|
265
|
+
...Ie,
|
|
266
|
+
styles: K()
|
|
267
267
|
}, e);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function tt(e, t) {
|
|
270
270
|
return Array.from({ length: t }, () => ({
|
|
271
|
-
id:
|
|
271
|
+
id: G(),
|
|
272
272
|
cells: Array.from({ length: e }, () => ({
|
|
273
|
-
id:
|
|
273
|
+
id: G(),
|
|
274
274
|
content: ""
|
|
275
275
|
}))
|
|
276
276
|
}));
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
return
|
|
280
|
-
id:
|
|
278
|
+
function nt(e = {}) {
|
|
279
|
+
return W({
|
|
280
|
+
id: G(),
|
|
281
281
|
type: "table",
|
|
282
|
-
rows:
|
|
283
|
-
...
|
|
284
|
-
styles:
|
|
282
|
+
rows: tt(3, 3),
|
|
283
|
+
...Le,
|
|
284
|
+
styles: K()
|
|
285
285
|
}, e);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
return
|
|
289
|
-
id:
|
|
287
|
+
function rt(e = {}) {
|
|
288
|
+
return W({
|
|
289
|
+
id: G(),
|
|
290
290
|
type: "countdown",
|
|
291
|
-
...
|
|
292
|
-
styles:
|
|
291
|
+
...Re,
|
|
292
|
+
styles: K()
|
|
293
293
|
}, e);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function it(e) {
|
|
296
296
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function at(e) {
|
|
299
299
|
let t = {};
|
|
300
|
-
for (let n of e.fields) t[n.key] =
|
|
300
|
+
for (let n of e.fields) t[n.key] = it(n);
|
|
301
301
|
return {
|
|
302
|
-
id:
|
|
302
|
+
id: G(),
|
|
303
303
|
type: "custom",
|
|
304
304
|
customType: e.type,
|
|
305
305
|
fieldValues: t,
|
|
306
|
-
styles:
|
|
306
|
+
styles: K(),
|
|
307
307
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function ot(e, t) {
|
|
311
311
|
switch (e) {
|
|
312
|
-
case "section": return
|
|
313
|
-
case "title": return
|
|
314
|
-
case "paragraph": return
|
|
315
|
-
case "image": return
|
|
316
|
-
case "button": return
|
|
317
|
-
case "divider": return
|
|
318
|
-
case "video": return
|
|
319
|
-
case "social": return
|
|
320
|
-
case "spacer": return
|
|
321
|
-
case "html": return
|
|
322
|
-
case "menu": return
|
|
323
|
-
case "table": return
|
|
324
|
-
case "countdown": return
|
|
312
|
+
case "section": return Ye(t?.section);
|
|
313
|
+
case "title": return We(t?.title);
|
|
314
|
+
case "paragraph": return Ge(t?.paragraph);
|
|
315
|
+
case "image": return Ke(t?.image);
|
|
316
|
+
case "button": return qe(t?.button);
|
|
317
|
+
case "divider": return Je(t?.divider);
|
|
318
|
+
case "video": return Xe(t?.video);
|
|
319
|
+
case "social": return Ze(t?.social);
|
|
320
|
+
case "spacer": return Qe(t?.spacer);
|
|
321
|
+
case "html": return $e(t?.html);
|
|
322
|
+
case "menu": return et(t?.menu);
|
|
323
|
+
case "table": return nt(t?.table);
|
|
324
|
+
case "countdown": return rt(t?.countdown);
|
|
325
325
|
default: throw Error(`Unknown block type: ${e}`);
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function st(e) {
|
|
329
329
|
let t = JSON.parse(JSON.stringify(e));
|
|
330
|
-
return t.id =
|
|
330
|
+
return t.id = G(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => st(e)))), t;
|
|
331
331
|
}
|
|
332
332
|
//#endregion
|
|
333
333
|
//#region ../types/src/merge-tags.ts
|
|
334
|
-
var
|
|
334
|
+
var ct = {
|
|
335
335
|
liquid: {
|
|
336
336
|
value: /\{\{.+?\}\}/g,
|
|
337
337
|
logic: /\{%-?\s*(\w+).*?-?%\}/g
|
|
@@ -348,52 +348,52 @@ var lt = {
|
|
|
348
348
|
value: /%%=.+?=%%/g,
|
|
349
349
|
logic: /%%\[\s*(\w+).*?\]%%/g
|
|
350
350
|
}
|
|
351
|
-
},
|
|
351
|
+
}, lt = {
|
|
352
352
|
liquid: "{{",
|
|
353
353
|
handlebars: "{{",
|
|
354
354
|
mailchimp: "*|",
|
|
355
355
|
ampscript: "%%="
|
|
356
356
|
};
|
|
357
|
-
function
|
|
358
|
-
for (let t of Object.keys(
|
|
357
|
+
function ut(e) {
|
|
358
|
+
for (let t of Object.keys(ct)) if (ct[t].value.source === e.value.source) return lt[t];
|
|
359
359
|
return null;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
return e ? typeof e == "string" ?
|
|
361
|
+
function dt(e) {
|
|
362
|
+
return e ? typeof e == "string" ? ct[e] ?? ct.liquid : e : ct.liquid;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function ft(e) {
|
|
365
365
|
let t = e.source, n = e.flags.replace("g", "");
|
|
366
366
|
return RegExp(`^${t}$`, n);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function pt(e, t) {
|
|
369
369
|
let n = e?.trim() || "";
|
|
370
|
-
return
|
|
370
|
+
return ft(t.logic).test(n) ? !1 : ft(t.value).test(n);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function mt(e, t) {
|
|
373
373
|
let n = t.find((t) => t.value === e);
|
|
374
374
|
return n ? n.label : e;
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
return e.replace(/(<span[^>]*\sdata-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${
|
|
376
|
+
function ht(e, t) {
|
|
377
|
+
return e.replace(/(<span[^>]*\sdata-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${mt(r, t)}${a}`);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function gt(e, t) {
|
|
380
380
|
if (!e) return !1;
|
|
381
381
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
382
382
|
return n.test(e) || r.test(e);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
return
|
|
384
|
+
function _t(e, t) {
|
|
385
|
+
return ft(t.logic).test(e?.trim() || "");
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function vt(e, t) {
|
|
388
388
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
389
389
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
return e.replace(/(<span[^>]*\sdata-logic-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${
|
|
391
|
+
function yt(e, t) {
|
|
392
|
+
return e.replace(/(<span[^>]*\sdata-logic-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${vt(r, t)}${a}`);
|
|
393
393
|
}
|
|
394
394
|
//#endregion
|
|
395
395
|
//#region ../types/src/config.ts
|
|
396
|
-
var
|
|
396
|
+
var bt = class extends Error {
|
|
397
397
|
statusCode;
|
|
398
398
|
constructor(e, t) {
|
|
399
399
|
super(e), this.statusCode = t, this.name = "SdkError";
|
|
@@ -410,12 +410,12 @@ var xt = class extends Error {
|
|
|
410
410
|
};
|
|
411
411
|
//#endregion
|
|
412
412
|
//#region ../core/src/editor.ts
|
|
413
|
-
function
|
|
413
|
+
function xt(e) {
|
|
414
414
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function St(e) {
|
|
417
417
|
let t = S({
|
|
418
|
-
content: e.content ??
|
|
418
|
+
content: e.content ?? He(e.defaultFontFamily, e.templateDefaults),
|
|
419
419
|
selectedBlockId: null,
|
|
420
420
|
viewport: "desktop",
|
|
421
421
|
darkMode: !1,
|
|
@@ -503,7 +503,7 @@ function Ct(e) {
|
|
|
503
503
|
if (s(n)) return;
|
|
504
504
|
let o = i(t.content.blocks, n);
|
|
505
505
|
if (o && o.type === "section") {
|
|
506
|
-
if (r < 0 || r >=
|
|
506
|
+
if (r < 0 || r >= xt(o.columns)) return;
|
|
507
507
|
o.children[r] = o.children[r] || [];
|
|
508
508
|
let t = o.children[r];
|
|
509
509
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -535,7 +535,7 @@ function Ct(e) {
|
|
|
535
535
|
let u;
|
|
536
536
|
if (r) {
|
|
537
537
|
let e = i(t.content.blocks, r);
|
|
538
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
538
|
+
if (!e || e.type !== "section" || a < 0 || a >= xt(e.columns)) return;
|
|
539
539
|
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
540
540
|
} else u = t.content.blocks;
|
|
541
541
|
let [d] = c.blocks.splice(l, 1);
|
|
@@ -566,9 +566,9 @@ function Ct(e) {
|
|
|
566
566
|
}
|
|
567
567
|
//#endregion
|
|
568
568
|
//#region ../core/src/history.ts
|
|
569
|
-
var
|
|
570
|
-
function
|
|
571
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
569
|
+
var Ct = 50, wt = 300, Tt = 1500;
|
|
570
|
+
function Et(e) {
|
|
571
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = Ct } = e, a = C([]), o = C([]), s = C(!1), c = null, l = null, u = y(() => a.value.length > 0), d = y(() => o.value.length > 0);
|
|
572
572
|
function f() {
|
|
573
573
|
let e = /* @__PURE__ */ new WeakSet();
|
|
574
574
|
return JSON.parse(JSON.stringify(t.value, (t, n) => {
|
|
@@ -593,21 +593,21 @@ function Dt(e) {
|
|
|
593
593
|
if (l && l.blockId === e) {
|
|
594
594
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
595
595
|
l = null;
|
|
596
|
-
},
|
|
596
|
+
}, wt);
|
|
597
597
|
return;
|
|
598
598
|
}
|
|
599
599
|
m(), p(f()), o.value = [], l = {
|
|
600
600
|
blockId: e,
|
|
601
601
|
timeoutId: setTimeout(() => {
|
|
602
602
|
l = null;
|
|
603
|
-
},
|
|
603
|
+
}, wt)
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
function _() {
|
|
608
608
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
609
609
|
s.value = !1, c = null;
|
|
610
|
-
},
|
|
610
|
+
}, Tt);
|
|
611
611
|
}
|
|
612
612
|
function v() {
|
|
613
613
|
if (a.value.length === 0) return;
|
|
@@ -641,33 +641,33 @@ function Dt(e) {
|
|
|
641
641
|
}
|
|
642
642
|
//#endregion
|
|
643
643
|
//#region ../core/src/block-actions.ts
|
|
644
|
-
function
|
|
644
|
+
function Dt(e) {
|
|
645
645
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
646
646
|
...e,
|
|
647
|
-
id:
|
|
647
|
+
id: G(),
|
|
648
648
|
cells: e.cells.map((e) => ({
|
|
649
649
|
...e,
|
|
650
|
-
id:
|
|
650
|
+
id: G()
|
|
651
651
|
}))
|
|
652
652
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
653
653
|
...e,
|
|
654
|
-
id:
|
|
654
|
+
id: G()
|
|
655
655
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
656
656
|
...e,
|
|
657
|
-
id:
|
|
657
|
+
id: G()
|
|
658
658
|
})));
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function Ot(e) {
|
|
661
661
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
662
662
|
function o(n, r, a) {
|
|
663
|
-
let o =
|
|
663
|
+
let o = ot(n, e.blockDefaults);
|
|
664
664
|
return t(o, r, a), i(o.id), o;
|
|
665
665
|
}
|
|
666
666
|
function s(e, n, r) {
|
|
667
667
|
let o = JSON.parse(JSON.stringify(e));
|
|
668
|
-
if (o.id =
|
|
668
|
+
if (o.id = G(), Dt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
669
669
|
let t = JSON.parse(JSON.stringify(e));
|
|
670
|
-
return t.id =
|
|
670
|
+
return t.id = G(), Dt(t), t;
|
|
671
671
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
672
672
|
else {
|
|
673
673
|
let i = a?.(e.id) ?? null;
|
|
@@ -690,7 +690,7 @@ function kt(e) {
|
|
|
690
690
|
}
|
|
691
691
|
//#endregion
|
|
692
692
|
//#region ../core/src/auto-save.ts
|
|
693
|
-
function
|
|
693
|
+
function kt(e) {
|
|
694
694
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
695
695
|
function c() {
|
|
696
696
|
return typeof a == "function" ? a() : a;
|
|
@@ -728,7 +728,7 @@ function At(e) {
|
|
|
728
728
|
}
|
|
729
729
|
//#endregion
|
|
730
730
|
//#region ../core/src/condition-preview.ts
|
|
731
|
-
function
|
|
731
|
+
function At(e) {
|
|
732
732
|
let t = S(/* @__PURE__ */ new Set()), n = y(() => t.size > 0);
|
|
733
733
|
function r(e) {
|
|
734
734
|
return t.has(e);
|
|
@@ -748,7 +748,7 @@ function jt(e) {
|
|
|
748
748
|
}
|
|
749
749
|
//#endregion
|
|
750
750
|
//#region ../core/src/data-source-fetch.ts
|
|
751
|
-
function
|
|
751
|
+
function jt(e) {
|
|
752
752
|
let t = C(!1), n = C(!1), r = y(() => !!e.definition.value?.dataSource), i = y(() => r.value && !e.block.value.dataSourceFetched);
|
|
753
753
|
async function a() {
|
|
754
754
|
let r = e.definition.value;
|
|
@@ -780,7 +780,7 @@ function Mt(e) {
|
|
|
780
780
|
}
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region ../core/src/history-interceptor.ts
|
|
783
|
-
function
|
|
783
|
+
function Mt(e, t) {
|
|
784
784
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
785
785
|
e.addBlock = (r, i, a, o) => {
|
|
786
786
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -796,10 +796,10 @@ function Nt(e, t) {
|
|
|
796
796
|
}
|
|
797
797
|
//#endregion
|
|
798
798
|
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
799
|
-
function
|
|
799
|
+
function Nt(e, t) {
|
|
800
800
|
return s() ? (l(e, t), !0) : !1;
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function Pt() {
|
|
803
803
|
let e = /* @__PURE__ */ new Set(), t = (t) => {
|
|
804
804
|
e.delete(t);
|
|
805
805
|
};
|
|
@@ -807,7 +807,7 @@ function Ft() {
|
|
|
807
807
|
on: (n) => {
|
|
808
808
|
e.add(n);
|
|
809
809
|
let r = () => t(n);
|
|
810
|
-
return
|
|
810
|
+
return Nt(r), { off: r };
|
|
811
811
|
},
|
|
812
812
|
off: t,
|
|
813
813
|
trigger: (...t) => Promise.all(Array.from(e).map((e) => e(...t))),
|
|
@@ -816,18 +816,18 @@ function Ft() {
|
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
|
-
var
|
|
819
|
+
var Ft = /* @__PURE__ */ new WeakMap(), It = (...e) => {
|
|
820
820
|
let t = e[0], n = _()?.proxy ?? s();
|
|
821
|
-
if (n == null && !
|
|
822
|
-
return n &&
|
|
823
|
-
},
|
|
821
|
+
if (n == null && !ce()) throw Error("injectLocal must be called in setup");
|
|
822
|
+
return n && Ft.has(n) && t in Ft.get(n) ? Ft.get(n)[t] : v(...e);
|
|
823
|
+
}, Lt = typeof window < "u" && typeof document < "u";
|
|
824
824
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
825
|
-
var
|
|
826
|
-
function
|
|
825
|
+
var Rt = (e) => e != null, zt = Object.prototype.toString, Bt = (e) => zt.call(e) === "[object Object]", Vt = () => {}, Ht = (e, t) => Object.hasOwn(e, t), Ut = /* @__PURE__ */ Wt();
|
|
826
|
+
function Wt() {
|
|
827
827
|
var e, t;
|
|
828
|
-
return
|
|
828
|
+
return Lt && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function Gt(e, t) {
|
|
831
831
|
function n(...n) {
|
|
832
832
|
return new Promise((r, i) => {
|
|
833
833
|
Promise.resolve(e(() => t.apply(this, n), {
|
|
@@ -839,10 +839,10 @@ function Kt(e, t) {
|
|
|
839
839
|
}
|
|
840
840
|
return n;
|
|
841
841
|
}
|
|
842
|
-
var
|
|
843
|
-
function
|
|
844
|
-
let n, r, i =
|
|
845
|
-
clearTimeout(e), i(), i =
|
|
842
|
+
var Kt = (e) => e();
|
|
843
|
+
function qt(e, t = {}) {
|
|
844
|
+
let n, r, i = Vt, a = (e) => {
|
|
845
|
+
clearTimeout(e), i(), i = Vt;
|
|
846
846
|
}, o;
|
|
847
847
|
return (s) => {
|
|
848
848
|
let c = F(e), l = F(t.maxWait);
|
|
@@ -855,7 +855,7 @@ function Jt(e, t = {}) {
|
|
|
855
855
|
});
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function Jt(e) {
|
|
859
859
|
let t;
|
|
860
860
|
function n() {
|
|
861
861
|
return t ||= e(), t;
|
|
@@ -865,26 +865,26 @@ function Yt(e) {
|
|
|
865
865
|
t = void 0, e && await e;
|
|
866
866
|
}, n;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Yt(e) {
|
|
869
869
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function Xt(e) {
|
|
872
872
|
return Array.isArray(e) ? e : [e];
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function Zt(e) {
|
|
875
875
|
return e || _();
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
877
|
+
function Qt(e, t = 200, n = {}) {
|
|
878
|
+
return Gt(qt(t, n), e);
|
|
879
879
|
}
|
|
880
|
-
function
|
|
881
|
-
let { eventFilter: r =
|
|
882
|
-
return
|
|
880
|
+
function $t(e, t, n = {}) {
|
|
881
|
+
let { eventFilter: r = Kt, ...i } = n;
|
|
882
|
+
return U(e, Gt(r, t), i);
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
|
|
884
|
+
function en(e, t = !0, n) {
|
|
885
|
+
Zt(n) ? r(e, n) : t ? e() : m(e);
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function tn(e, t = 1e3, r = {}) {
|
|
888
888
|
let { immediate: i = !0, immediateCallback: a = !1 } = r, o = null, s = n(!1);
|
|
889
889
|
function c() {
|
|
890
890
|
o &&= (clearInterval(o), null);
|
|
@@ -896,15 +896,15 @@ function nn(e, t = 1e3, r = {}) {
|
|
|
896
896
|
let n = F(t);
|
|
897
897
|
n <= 0 || (s.value = !0, a && e(), c(), s.value && (o = setInterval(e, n)));
|
|
898
898
|
}
|
|
899
|
-
return i &&
|
|
900
|
-
s.value &&
|
|
901
|
-
})),
|
|
899
|
+
return i && Lt && d(), (u(t) || typeof t == "function") && Nt(U(t, () => {
|
|
900
|
+
s.value && Lt && d();
|
|
901
|
+
})), Nt(l), {
|
|
902
902
|
isActive: g(s),
|
|
903
903
|
pause: l,
|
|
904
904
|
resume: d
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function nn(e, t, r = {}) {
|
|
908
908
|
let { immediate: i = !0, immediateCallback: a = !1 } = r, o = n(!1), s;
|
|
909
909
|
function c() {
|
|
910
910
|
s &&= (clearTimeout(s), void 0);
|
|
@@ -917,13 +917,13 @@ function rn(e, t, r = {}) {
|
|
|
917
917
|
o.value = !1, s = void 0, e(...n);
|
|
918
918
|
}, F(t));
|
|
919
919
|
}
|
|
920
|
-
return i && (o.value = !0,
|
|
920
|
+
return i && (o.value = !0, Lt && u()), Nt(l), {
|
|
921
921
|
isPending: g(o),
|
|
922
922
|
start: u,
|
|
923
923
|
stop: l
|
|
924
924
|
};
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function rn(e = !1, t = {}) {
|
|
927
927
|
let { truthyValue: r = !0, falsyValue: i = !1 } = t, a = u(e), o = n(e);
|
|
928
928
|
function s(e) {
|
|
929
929
|
if (arguments.length) return o.value = e, o.value;
|
|
@@ -934,61 +934,61 @@ function an(e = !1, t = {}) {
|
|
|
934
934
|
}
|
|
935
935
|
return a ? s : [o, s];
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function an(e, t, n = {}) {
|
|
938
938
|
let { debounce: r = 0, maxWait: i = void 0, ...a } = n;
|
|
939
|
-
return
|
|
939
|
+
return $t(e, t, {
|
|
940
940
|
...a,
|
|
941
|
-
eventFilter:
|
|
941
|
+
eventFilter: qt(r, { maxWait: i })
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
return
|
|
944
|
+
function on(e, t, n) {
|
|
945
|
+
return U(e, t, {
|
|
946
946
|
...n,
|
|
947
947
|
immediate: !0
|
|
948
948
|
});
|
|
949
949
|
}
|
|
950
950
|
//#endregion
|
|
951
951
|
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
952
|
-
var
|
|
953
|
-
function
|
|
952
|
+
var sn = Lt ? window : void 0, cn = Lt ? window.document : void 0, ln = Lt ? window.navigator : void 0;
|
|
953
|
+
function q(e) {
|
|
954
954
|
let t = F(e);
|
|
955
955
|
return t?.$el ?? t;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function J(...e) {
|
|
958
958
|
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = k(() => {
|
|
959
|
-
let t =
|
|
959
|
+
let t = Xt(F(e[0])).filter((e) => e != null);
|
|
960
960
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
961
961
|
});
|
|
962
|
-
return
|
|
963
|
-
n.value?.map((e) =>
|
|
964
|
-
|
|
965
|
-
|
|
962
|
+
return on(() => [
|
|
963
|
+
n.value?.map((e) => q(e)) ?? [sn].filter((e) => e != null),
|
|
964
|
+
Xt(F(n.value ? e[1] : e[0])),
|
|
965
|
+
Xt(M(n.value ? e[2] : e[1])),
|
|
966
966
|
F(n.value ? e[3] : e[2])
|
|
967
967
|
], ([e, n, r, i], a, o) => {
|
|
968
968
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
969
|
-
let s =
|
|
969
|
+
let s = Bt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
970
970
|
o(() => {
|
|
971
971
|
c.forEach((e) => e());
|
|
972
972
|
});
|
|
973
973
|
}, { flush: "post" });
|
|
974
974
|
}
|
|
975
|
-
var
|
|
976
|
-
function
|
|
977
|
-
let { window: r =
|
|
975
|
+
var un = !1;
|
|
976
|
+
function dn(e, t, n = {}) {
|
|
977
|
+
let { window: r = sn, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
|
|
978
978
|
if (!r) return s ? {
|
|
979
|
-
stop:
|
|
980
|
-
cancel:
|
|
981
|
-
trigger:
|
|
982
|
-
} :
|
|
983
|
-
if (
|
|
984
|
-
|
|
979
|
+
stop: Vt,
|
|
980
|
+
cancel: Vt,
|
|
981
|
+
trigger: Vt
|
|
982
|
+
} : Vt;
|
|
983
|
+
if (Ut && !un) {
|
|
984
|
+
un = !0;
|
|
985
985
|
let e = { passive: !0 };
|
|
986
|
-
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click",
|
|
986
|
+
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Vt, e)), r.document.documentElement.addEventListener("click", Vt, e);
|
|
987
987
|
}
|
|
988
988
|
let c = !0, l = (e) => F(i).some((t) => {
|
|
989
989
|
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
990
990
|
{
|
|
991
|
-
let n =
|
|
991
|
+
let n = q(t);
|
|
992
992
|
return n && (e.target === n || e.composedPath().includes(n));
|
|
993
993
|
}
|
|
994
994
|
});
|
|
@@ -1001,7 +1001,7 @@ function fn(e, t, n = {}) {
|
|
|
1001
1001
|
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
|
|
1002
1002
|
}
|
|
1003
1003
|
let f = (n) => {
|
|
1004
|
-
let r =
|
|
1004
|
+
let r = q(e);
|
|
1005
1005
|
if (n.target != null && !(!(r instanceof Element) && u(e) && d(e, n)) && !(!r || r === n.target || n.composedPath().includes(r))) {
|
|
1006
1006
|
if ("detail" in n && n.detail === 0 && (c = !l(n)), !c) {
|
|
1007
1007
|
c = !0;
|
|
@@ -1010,7 +1010,7 @@ function fn(e, t, n = {}) {
|
|
|
1010
1010
|
t(n);
|
|
1011
1011
|
}
|
|
1012
1012
|
}, p = !1, m = [
|
|
1013
|
-
|
|
1013
|
+
J(r, "click", (e) => {
|
|
1014
1014
|
p || (p = !0, setTimeout(() => {
|
|
1015
1015
|
p = !1;
|
|
1016
1016
|
}, 0), f(e));
|
|
@@ -1018,13 +1018,13 @@ function fn(e, t, n = {}) {
|
|
|
1018
1018
|
passive: !0,
|
|
1019
1019
|
capture: a
|
|
1020
1020
|
}),
|
|
1021
|
-
|
|
1022
|
-
let n =
|
|
1021
|
+
J(r, "pointerdown", (t) => {
|
|
1022
|
+
let n = q(e);
|
|
1023
1023
|
c = !l(t) && !!(n && !t.composedPath().includes(n));
|
|
1024
1024
|
}, { passive: !0 }),
|
|
1025
|
-
o &&
|
|
1025
|
+
o && J(r, "blur", (n) => {
|
|
1026
1026
|
setTimeout(() => {
|
|
1027
|
-
let i =
|
|
1027
|
+
let i = q(e), a = r.document.activeElement;
|
|
1028
1028
|
for (; a?.shadowRoot;) a = a.shadowRoot.activeElement;
|
|
1029
1029
|
a?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
|
|
1030
1030
|
}, 0);
|
|
@@ -1040,21 +1040,21 @@ function fn(e, t, n = {}) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
} : h;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function fn() {
|
|
1044
1044
|
let e = n(!1), t = _();
|
|
1045
1045
|
return t && r(() => {
|
|
1046
1046
|
e.value = !0;
|
|
1047
1047
|
}, t), e;
|
|
1048
1048
|
}
|
|
1049
1049
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1050
|
+
function pn(e) {
|
|
1051
|
+
return fn(), k(() => !!e());
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
let { window: r =
|
|
1053
|
+
function mn(e, t, n = {}) {
|
|
1054
|
+
let { window: r = sn, ...i } = n, a, o = /* @__PURE__ */ pn(() => r && "MutationObserver" in r), s = () => {
|
|
1055
1055
|
a &&= (a.disconnect(), void 0);
|
|
1056
|
-
}, c =
|
|
1057
|
-
let t =
|
|
1056
|
+
}, c = U(k(() => {
|
|
1057
|
+
let t = Xt(F(e)).map(q).filter(Rt);
|
|
1058
1058
|
return new Set(t);
|
|
1059
1059
|
}), (e) => {
|
|
1060
1060
|
s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
|
|
@@ -1064,39 +1064,39 @@ function hn(e, t, n = {}) {
|
|
|
1064
1064
|
}), l = () => a?.takeRecords(), u = () => {
|
|
1065
1065
|
c(), s();
|
|
1066
1066
|
};
|
|
1067
|
-
return
|
|
1067
|
+
return Nt(u), {
|
|
1068
1068
|
isSupported: o,
|
|
1069
1069
|
stop: u,
|
|
1070
1070
|
takeRecords: l
|
|
1071
1071
|
};
|
|
1072
1072
|
}
|
|
1073
|
-
var
|
|
1073
|
+
var hn = Symbol("vueuse-ssr-width");
|
|
1074
1074
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1075
|
-
function
|
|
1076
|
-
let e =
|
|
1075
|
+
function gn() {
|
|
1076
|
+
let e = ce() ? It(hn, null) : null;
|
|
1077
1077
|
return typeof e == "number" ? e : void 0;
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1080
|
-
let { window: r =
|
|
1079
|
+
function _n(e, t = {}) {
|
|
1080
|
+
let { window: r = sn, ssrWidth: a = /* @__PURE__ */ gn() } = t, o = /* @__PURE__ */ pn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
|
|
1081
1081
|
return i(() => {
|
|
1082
1082
|
if (s.value) {
|
|
1083
1083
|
s.value = !o.value, l.value = F(e).split(",").some((e) => {
|
|
1084
1084
|
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), r = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = !!(n || r);
|
|
1085
|
-
return n && i && (i = a >=
|
|
1085
|
+
return n && i && (i = a >= Yt(n[1])), r && i && (i = a <= Yt(r[1])), t ? !i : i;
|
|
1086
1086
|
});
|
|
1087
1087
|
return;
|
|
1088
1088
|
}
|
|
1089
1089
|
o.value && (c.value = r.matchMedia(F(e)), l.value = c.value.matches);
|
|
1090
|
-
}),
|
|
1090
|
+
}), J(c, "change", (e) => {
|
|
1091
1091
|
l.value = e.matches;
|
|
1092
1092
|
}, { passive: !0 }), k(() => l.value);
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
let { controls: r = !1, navigator: i =
|
|
1094
|
+
function vn(e, t = {}) {
|
|
1095
|
+
let { controls: r = !1, navigator: i = ln } = t, a = /* @__PURE__ */ pn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
|
|
1096
1096
|
c.value = o.value?.state ?? "prompt";
|
|
1097
1097
|
};
|
|
1098
|
-
|
|
1099
|
-
let u =
|
|
1098
|
+
J(o, "change", l, { passive: !0 });
|
|
1099
|
+
let u = Jt(async () => {
|
|
1100
1100
|
if (a.value) {
|
|
1101
1101
|
if (!o.value) try {
|
|
1102
1102
|
o.value = await i.permissions.query(s);
|
|
@@ -1114,8 +1114,8 @@ function yn(e, t = {}) {
|
|
|
1114
1114
|
query: u
|
|
1115
1115
|
} : c;
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1118
|
-
let { navigator: t =
|
|
1117
|
+
function yn(e = {}) {
|
|
1118
|
+
let { navigator: t = ln, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ pn(() => t && "clipboard" in t), c = vn("clipboard-read"), l = vn("clipboard-write"), u = k(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = nn(() => f.value = !1, a, { immediate: !1 }), h = 0;
|
|
1119
1119
|
async function _() {
|
|
1120
1120
|
let e = !(s.value && S(c.value));
|
|
1121
1121
|
if (!e) try {
|
|
@@ -1125,7 +1125,7 @@ function bn(e = {}) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
e && (d.value = x());
|
|
1127
1127
|
}
|
|
1128
|
-
u.value && r &&
|
|
1128
|
+
u.value && r && J(["copy", "cut"], _, { passive: !0 });
|
|
1129
1129
|
async function v(e) {
|
|
1130
1130
|
let n = e ?? F(i);
|
|
1131
1131
|
if (u.value && n != null) {
|
|
@@ -1167,9 +1167,9 @@ function bn(e = {}) {
|
|
|
1167
1167
|
copy: v
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function bn(e, t = {}) {
|
|
1171
1171
|
let r = n(!1), i = n(null), a = 0, o = !0;
|
|
1172
|
-
if (
|
|
1172
|
+
if (Lt) {
|
|
1173
1173
|
let n = typeof t == "function" ? { onDrop: t } : t, s = n.multiple ?? !0, c = n.preventDefaultForUnhandled ?? !1, l = (e) => {
|
|
1174
1174
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
1175
1175
|
return t.length === 0 ? null : s ? t : [t[0]];
|
|
@@ -1205,19 +1205,19 @@ function xn(e, t = {}) {
|
|
|
1205
1205
|
break;
|
|
1206
1206
|
}
|
|
1207
1207
|
};
|
|
1208
|
-
|
|
1208
|
+
J(e, "dragenter", (e) => p(e, "enter")), J(e, "dragover", (e) => p(e, "over")), J(e, "dragleave", (e) => p(e, "leave")), J(e, "drop", (e) => p(e, "drop"));
|
|
1209
1209
|
}
|
|
1210
1210
|
return {
|
|
1211
1211
|
files: i,
|
|
1212
1212
|
isOverDropZone: r
|
|
1213
1213
|
};
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1216
|
-
let { window: r =
|
|
1215
|
+
function xn(e, t, n = {}) {
|
|
1216
|
+
let { window: r = sn, ...i } = n, a, o = /* @__PURE__ */ pn(() => r && "ResizeObserver" in r), s = () => {
|
|
1217
1217
|
a &&= (a.disconnect(), void 0);
|
|
1218
|
-
}, c =
|
|
1218
|
+
}, c = U(k(() => {
|
|
1219
1219
|
let t = F(e);
|
|
1220
|
-
return Array.isArray(t) ? t.map((e) =>
|
|
1220
|
+
return Array.isArray(t) ? t.map((e) => q(e)) : [q(t)];
|
|
1221
1221
|
}), (e) => {
|
|
1222
1222
|
if (s(), o.value && r) {
|
|
1223
1223
|
a = new ResizeObserver(t);
|
|
@@ -1229,15 +1229,15 @@ function Sn(e, t, n = {}) {
|
|
|
1229
1229
|
}), l = () => {
|
|
1230
1230
|
s(), c();
|
|
1231
1231
|
};
|
|
1232
|
-
return
|
|
1232
|
+
return Nt(l), {
|
|
1233
1233
|
isSupported: o,
|
|
1234
1234
|
stop: l
|
|
1235
1235
|
};
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Sn(e, t = {}) {
|
|
1238
1238
|
let { reset: r = !0, windowResize: i = !0, windowScroll: a = !0, immediate: o = !0, updateTiming: s = "sync" } = t, c = n(0), l = n(0), u = n(0), d = n(0), f = n(0), p = n(0), m = n(0), h = n(0);
|
|
1239
1239
|
function g() {
|
|
1240
|
-
let t =
|
|
1240
|
+
let t = q(e);
|
|
1241
1241
|
if (!t) {
|
|
1242
1242
|
r && (c.value = 0, l.value = 0, u.value = 0, d.value = 0, f.value = 0, p.value = 0, m.value = 0, h.value = 0);
|
|
1243
1243
|
return;
|
|
@@ -1248,10 +1248,10 @@ function Cn(e, t = {}) {
|
|
|
1248
1248
|
function _() {
|
|
1249
1249
|
s === "sync" ? g() : s === "next-frame" && requestAnimationFrame(() => g());
|
|
1250
1250
|
}
|
|
1251
|
-
return
|
|
1251
|
+
return xn(e, _), U(() => q(e), (e) => !e && _()), mn(e, _, { attributeFilter: ["style", "class"] }), a && J("scroll", _, {
|
|
1252
1252
|
capture: !0,
|
|
1253
1253
|
passive: !0
|
|
1254
|
-
}), i &&
|
|
1254
|
+
}), i && J("resize", _, { passive: !0 }), en(() => {
|
|
1255
1255
|
o && _();
|
|
1256
1256
|
}), {
|
|
1257
1257
|
height: c,
|
|
@@ -1265,29 +1265,29 @@ function Cn(e, t = {}) {
|
|
|
1265
1265
|
update: _
|
|
1266
1266
|
};
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1269
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s =
|
|
1268
|
+
function Cn(e, t, r = {}) {
|
|
1269
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = sn, immediate: c = !0 } = r, l = /* @__PURE__ */ pn(() => s && "IntersectionObserver" in s), u = k(() => Xt(F(e)).map(q).filter(Rt)), d = Vt, f = n(c), p = l.value ? U(() => [
|
|
1270
1270
|
u.value,
|
|
1271
|
-
|
|
1271
|
+
q(i),
|
|
1272
1272
|
F(a),
|
|
1273
1273
|
f.value
|
|
1274
1274
|
], ([e, n, r]) => {
|
|
1275
1275
|
if (d(), !f.value || !e.length) return;
|
|
1276
1276
|
let i = new IntersectionObserver(t, {
|
|
1277
|
-
root:
|
|
1277
|
+
root: q(n),
|
|
1278
1278
|
rootMargin: r,
|
|
1279
1279
|
threshold: o
|
|
1280
1280
|
});
|
|
1281
1281
|
e.forEach((e) => e && i.observe(e)), d = () => {
|
|
1282
|
-
i.disconnect(), d =
|
|
1282
|
+
i.disconnect(), d = Vt;
|
|
1283
1283
|
};
|
|
1284
1284
|
}, {
|
|
1285
1285
|
immediate: c,
|
|
1286
1286
|
flush: "post"
|
|
1287
|
-
}) :
|
|
1287
|
+
}) : Vt, m = () => {
|
|
1288
1288
|
d(), p(), f.value = !1;
|
|
1289
1289
|
};
|
|
1290
|
-
return
|
|
1290
|
+
return Nt(m), {
|
|
1291
1291
|
isSupported: l,
|
|
1292
1292
|
isActive: f,
|
|
1293
1293
|
pause() {
|
|
@@ -1299,22 +1299,22 @@ function wn(e, t, r = {}) {
|
|
|
1299
1299
|
stop: m
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
1302
|
-
var
|
|
1302
|
+
var wn = {
|
|
1303
1303
|
multiple: !0,
|
|
1304
1304
|
accept: "*",
|
|
1305
1305
|
reset: !1,
|
|
1306
1306
|
directory: !1
|
|
1307
1307
|
};
|
|
1308
|
-
function
|
|
1308
|
+
function Tn(e) {
|
|
1309
1309
|
if (!e) return null;
|
|
1310
1310
|
if (e instanceof FileList) return e;
|
|
1311
1311
|
let t = new DataTransfer();
|
|
1312
1312
|
for (let n of e) t.items.add(n);
|
|
1313
1313
|
return t.files;
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1316
|
-
let { document: t =
|
|
1317
|
-
let r =
|
|
1315
|
+
function En(e = {}) {
|
|
1316
|
+
let { document: t = cn } = e, n = C(Tn(e.initialFiles)), { on: r, trigger: a } = Pt(), { on: o, trigger: s } = Pt(), c = k(() => {
|
|
1317
|
+
let r = q(e.input) ?? (t ? t.createElement("input") : void 0);
|
|
1318
1318
|
return r && (r.type = "file", r.onchange = (e) => {
|
|
1319
1319
|
n.value = e.target.files, a(n.value);
|
|
1320
1320
|
}, r.oncancel = () => {
|
|
@@ -1324,7 +1324,7 @@ function Dn(e = {}) {
|
|
|
1324
1324
|
n.value = null, c.value && c.value.value && (c.value.value = "", a(null));
|
|
1325
1325
|
}, u = (e) => {
|
|
1326
1326
|
let t = c.value;
|
|
1327
|
-
t && (t.multiple = F(e.multiple), t.accept = F(e.accept), t.webkitdirectory = F(e.directory),
|
|
1327
|
+
t && (t.multiple = F(e.multiple), t.accept = F(e.accept), t.webkitdirectory = F(e.directory), Ht(e, "capture") && (t.capture = F(e.capture)));
|
|
1328
1328
|
};
|
|
1329
1329
|
return i(() => {
|
|
1330
1330
|
u(e);
|
|
@@ -1334,7 +1334,7 @@ function Dn(e = {}) {
|
|
|
1334
1334
|
let n = c.value;
|
|
1335
1335
|
if (!n) return;
|
|
1336
1336
|
let r = {
|
|
1337
|
-
...
|
|
1337
|
+
...wn,
|
|
1338
1338
|
...e,
|
|
1339
1339
|
...t
|
|
1340
1340
|
};
|
|
@@ -1347,48 +1347,48 @@ function Dn(e = {}) {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
//#endregion
|
|
1349
1349
|
//#region src/utils/activeEditorTracker.ts
|
|
1350
|
-
var
|
|
1351
|
-
function
|
|
1352
|
-
let e = ++
|
|
1353
|
-
return
|
|
1350
|
+
var Dn = /* @__PURE__ */ new Set(), On = 0, kn = 0;
|
|
1351
|
+
function An() {
|
|
1352
|
+
let e = ++kn;
|
|
1353
|
+
return Dn.add(e), On === 0 && (On = e), {
|
|
1354
1354
|
id: e,
|
|
1355
|
-
isActive: () =>
|
|
1355
|
+
isActive: () => Dn.size <= 1 || On === e,
|
|
1356
1356
|
claim: () => {
|
|
1357
|
-
|
|
1357
|
+
On = e;
|
|
1358
1358
|
},
|
|
1359
1359
|
dispose: () => {
|
|
1360
|
-
if (
|
|
1361
|
-
let e = Array.from(
|
|
1362
|
-
|
|
1360
|
+
if (Dn.delete(e), On === e) {
|
|
1361
|
+
let e = Array.from(Dn);
|
|
1362
|
+
On = e[e.length - 1] ?? 0;
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
1365
|
};
|
|
1366
1366
|
}
|
|
1367
1367
|
//#endregion
|
|
1368
1368
|
//#region src/keys.ts
|
|
1369
|
-
var
|
|
1370
|
-
function
|
|
1369
|
+
var jn = Symbol("translations"), Mn = Symbol("editor"), Nn = Symbol("history"), Pn = Symbol("blockActions"), Fn = Symbol("conditionPreview"), In = Symbol("fontsManager"), Ln = Symbol("themeStyles"), Rn = Symbol("tplUiTheme"), zn = Symbol("blockDefaults"), Bn = Symbol("blockRegistry"), Vn = Symbol("customBlockDefinitions"), Hn = Symbol("mergeTags"), Un = Symbol("mergeTagSyntax"), Wn = Symbol("onRequestMergeTag"), Gn = Symbol("mergeTagAutocomplete"), Kn = Symbol("onRequestMedia"), qn = Symbol("displayConditions"), Jn = Symbol("allowCustomConditions"), Yn = Symbol("capabilities"), Xn = Symbol("keyboardReorder"), Zn = Symbol("templateLint"), Qn = Symbol("editorRoot"), $n = Symbol("popoverRoot"), er = Symbol("authManager"), tr = Symbol("aiConfig"), nr = Symbol("comments"), rr = Symbol("savedModulesHeadless"), ir = Symbol("scoring"), ar = Symbol("cloudTranslations");
|
|
1370
|
+
function Y(e, t) {
|
|
1371
1371
|
let n = v(e, null);
|
|
1372
1372
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
1373
1373
|
return n;
|
|
1374
1374
|
}
|
|
1375
1375
|
//#endregion
|
|
1376
1376
|
//#region src/composables/useTemplateLint.ts
|
|
1377
|
-
function
|
|
1377
|
+
function or(e) {
|
|
1378
1378
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1381
|
-
let t = C([]), r = C(!1), i = C(!1), a = n(null), o =
|
|
1380
|
+
function sr(e) {
|
|
1381
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = or(e.options), s = null, c = !1;
|
|
1382
1382
|
o || l();
|
|
1383
1383
|
async function l() {
|
|
1384
1384
|
try {
|
|
1385
|
-
let t = await import("./quality-
|
|
1385
|
+
let t = await import("./quality-BTPRPGB-.js").then((e) => e.t);
|
|
1386
1386
|
if (c) return;
|
|
1387
1387
|
a.value = {
|
|
1388
1388
|
lintAccessibility: t.lintAccessibility,
|
|
1389
1389
|
lintStructure: t.lintStructure,
|
|
1390
1390
|
lintLinks: t.lintLinks
|
|
1391
|
-
}, r.value = !0, u(), s =
|
|
1391
|
+
}, r.value = !0, u(), s = an(e.content, u, {
|
|
1392
1392
|
debounce: e.debounce ?? 500,
|
|
1393
1393
|
deep: !0
|
|
1394
1394
|
});
|
|
@@ -1406,7 +1406,7 @@ function cr(e) {
|
|
|
1406
1406
|
...i
|
|
1407
1407
|
];
|
|
1408
1408
|
}
|
|
1409
|
-
let d =
|
|
1409
|
+
let d = U(() => e.options, () => {
|
|
1410
1410
|
a.value && u();
|
|
1411
1411
|
}, { deep: !0 });
|
|
1412
1412
|
function f(t) {
|
|
@@ -1429,8 +1429,8 @@ function cr(e) {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
//#endregion
|
|
1431
1431
|
//#region src/composables/useI18n.ts
|
|
1432
|
-
function
|
|
1433
|
-
let t = e ?? v(
|
|
1432
|
+
function cr(e) {
|
|
1433
|
+
let t = e ?? v(jn, null);
|
|
1434
1434
|
if (!t) throw Error("useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.");
|
|
1435
1435
|
let n = u(t) ? t.value : t;
|
|
1436
1436
|
function r(e, t) {
|
|
@@ -1545,7 +1545,7 @@ function ur(e, t) {
|
|
|
1545
1545
|
//#endregion
|
|
1546
1546
|
//#region src/composables/useUiTheme.ts
|
|
1547
1547
|
function dr(e) {
|
|
1548
|
-
let t =
|
|
1548
|
+
let t = _n("(prefers-color-scheme: dark)");
|
|
1549
1549
|
return { resolvedTheme: k(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1550
1550
|
}
|
|
1551
1551
|
//#endregion
|
|
@@ -1609,13 +1609,13 @@ var gr = {
|
|
|
1609
1609
|
function _r() {
|
|
1610
1610
|
let e = n(/* @__PURE__ */ new Map());
|
|
1611
1611
|
function t(t, n) {
|
|
1612
|
-
e.value.set(t, n),
|
|
1612
|
+
e.value.set(t, n), ae(e);
|
|
1613
1613
|
}
|
|
1614
1614
|
function r(t, n) {
|
|
1615
1615
|
let r = `custom:${t.type}`;
|
|
1616
1616
|
e.value.set(r, {
|
|
1617
1617
|
component: n,
|
|
1618
|
-
createBlock: () =>
|
|
1618
|
+
createBlock: () => at(t),
|
|
1619
1619
|
sidebarItem: {
|
|
1620
1620
|
type: r,
|
|
1621
1621
|
label: t.name,
|
|
@@ -1624,7 +1624,7 @@ function _r() {
|
|
|
1624
1624
|
isCustom: !0
|
|
1625
1625
|
},
|
|
1626
1626
|
definition: t
|
|
1627
|
-
}),
|
|
1627
|
+
}), ae(e);
|
|
1628
1628
|
}
|
|
1629
1629
|
function i(t) {
|
|
1630
1630
|
if (t.type === "custom") {
|
|
@@ -1652,7 +1652,7 @@ function _r() {
|
|
|
1652
1652
|
let t = s(e.customType);
|
|
1653
1653
|
if (!t) return c("Block definition not found");
|
|
1654
1654
|
try {
|
|
1655
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
1655
|
+
let { Liquid: n } = await import("./liquid.browser-rMoPo2t_.js");
|
|
1656
1656
|
return await new n({
|
|
1657
1657
|
strictVariables: !1,
|
|
1658
1658
|
strictFilters: !1
|
|
@@ -1681,67 +1681,67 @@ var vr = [
|
|
|
1681
1681
|
{
|
|
1682
1682
|
type: "section",
|
|
1683
1683
|
label: "Section",
|
|
1684
|
-
createBlock:
|
|
1684
|
+
createBlock: Ye
|
|
1685
1685
|
},
|
|
1686
1686
|
{
|
|
1687
1687
|
type: "title",
|
|
1688
1688
|
label: "Title",
|
|
1689
|
-
createBlock:
|
|
1689
|
+
createBlock: We
|
|
1690
1690
|
},
|
|
1691
1691
|
{
|
|
1692
1692
|
type: "paragraph",
|
|
1693
1693
|
label: "Paragraph",
|
|
1694
|
-
createBlock:
|
|
1694
|
+
createBlock: Ge
|
|
1695
1695
|
},
|
|
1696
1696
|
{
|
|
1697
1697
|
type: "image",
|
|
1698
1698
|
label: "Image",
|
|
1699
|
-
createBlock:
|
|
1699
|
+
createBlock: Ke
|
|
1700
1700
|
},
|
|
1701
1701
|
{
|
|
1702
1702
|
type: "button",
|
|
1703
1703
|
label: "Button",
|
|
1704
|
-
createBlock:
|
|
1704
|
+
createBlock: qe
|
|
1705
1705
|
},
|
|
1706
1706
|
{
|
|
1707
1707
|
type: "divider",
|
|
1708
1708
|
label: "Divider",
|
|
1709
|
-
createBlock:
|
|
1709
|
+
createBlock: Je
|
|
1710
1710
|
},
|
|
1711
1711
|
{
|
|
1712
1712
|
type: "video",
|
|
1713
1713
|
label: "Video",
|
|
1714
|
-
createBlock:
|
|
1714
|
+
createBlock: Xe
|
|
1715
1715
|
},
|
|
1716
1716
|
{
|
|
1717
1717
|
type: "social",
|
|
1718
1718
|
label: "Social",
|
|
1719
|
-
createBlock:
|
|
1719
|
+
createBlock: Ze
|
|
1720
1720
|
},
|
|
1721
1721
|
{
|
|
1722
1722
|
type: "menu",
|
|
1723
1723
|
label: "Menu",
|
|
1724
|
-
createBlock:
|
|
1724
|
+
createBlock: et
|
|
1725
1725
|
},
|
|
1726
1726
|
{
|
|
1727
1727
|
type: "table",
|
|
1728
1728
|
label: "Table",
|
|
1729
|
-
createBlock:
|
|
1729
|
+
createBlock: nt
|
|
1730
1730
|
},
|
|
1731
1731
|
{
|
|
1732
1732
|
type: "spacer",
|
|
1733
1733
|
label: "Spacer",
|
|
1734
|
-
createBlock:
|
|
1734
|
+
createBlock: Qe
|
|
1735
1735
|
},
|
|
1736
1736
|
{
|
|
1737
1737
|
type: "html",
|
|
1738
1738
|
label: "HTML",
|
|
1739
|
-
createBlock:
|
|
1739
|
+
createBlock: $e
|
|
1740
1740
|
},
|
|
1741
1741
|
{
|
|
1742
1742
|
type: "countdown",
|
|
1743
1743
|
label: "Countdown",
|
|
1744
|
-
createBlock:
|
|
1744
|
+
createBlock: rt
|
|
1745
1745
|
}
|
|
1746
1746
|
];
|
|
1747
1747
|
function yr(e, t) {
|
|
@@ -1788,7 +1788,7 @@ function xr(e, t) {
|
|
|
1788
1788
|
}
|
|
1789
1789
|
//#endregion
|
|
1790
1790
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1791
|
-
var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */
|
|
1791
|
+
var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */ V({
|
|
1792
1792
|
__name: "ButtonBlock",
|
|
1793
1793
|
props: {
|
|
1794
1794
|
block: {},
|
|
@@ -1809,9 +1809,9 @@ var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */ B({
|
|
|
1809
1809
|
};
|
|
1810
1810
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1811
1811
|
});
|
|
1812
|
-
return (t, r) => (f(), A("div", Sr, [
|
|
1812
|
+
return (t, r) => (f(), A("div", Sr, [L("a", {
|
|
1813
1813
|
href: e.block.url || "#",
|
|
1814
|
-
style:
|
|
1814
|
+
style: R(n.value),
|
|
1815
1815
|
class: "tpl:cursor-default",
|
|
1816
1816
|
onClick: r[0] ||= N(() => {}, ["prevent"])
|
|
1817
1817
|
}, O(e.block.text), 13, Cr)]));
|
|
@@ -2319,7 +2319,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2319
2319
|
"src",
|
|
2320
2320
|
"width",
|
|
2321
2321
|
"height"
|
|
2322
|
-
], wi = /* @__PURE__ */
|
|
2322
|
+
], wi = /* @__PURE__ */ V({
|
|
2323
2323
|
__name: "CustomBlockIcon",
|
|
2324
2324
|
props: {
|
|
2325
2325
|
icon: {},
|
|
@@ -2330,7 +2330,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2330
2330
|
return (t, a) => r.value ? (f(), A("span", {
|
|
2331
2331
|
key: 0,
|
|
2332
2332
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
2333
|
-
style:
|
|
2333
|
+
style: R({
|
|
2334
2334
|
width: `${n.value}px`,
|
|
2335
2335
|
height: `${n.value}px`
|
|
2336
2336
|
}),
|
|
@@ -2360,7 +2360,7 @@ var ki = /* @__PURE__ */ Ti(Ei, [["render", Oi], ["__scopeId", "data-v-1ed538ec"
|
|
|
2360
2360
|
//#endregion
|
|
2361
2361
|
//#region src/composables/useEditorRoot.ts
|
|
2362
2362
|
function Ai() {
|
|
2363
|
-
return v(
|
|
2363
|
+
return v(Qn, document) ?? document;
|
|
2364
2364
|
}
|
|
2365
2365
|
//#endregion
|
|
2366
2366
|
//#region src/composables/useFocusTrap.ts
|
|
@@ -2383,13 +2383,13 @@ function Mi(e, t) {
|
|
|
2383
2383
|
a = null;
|
|
2384
2384
|
let t = o();
|
|
2385
2385
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
2386
|
-
}), i =
|
|
2386
|
+
}), i = J(e, "keydown", s);
|
|
2387
2387
|
}
|
|
2388
2388
|
function u(e = {}) {
|
|
2389
2389
|
let t = e.restoreFocus !== !1;
|
|
2390
2390
|
a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
|
|
2391
2391
|
}
|
|
2392
|
-
let d =
|
|
2392
|
+
let d = U([t, e], ([e, t]) => {
|
|
2393
2393
|
e && t ? c() : u();
|
|
2394
2394
|
}, { flush: "post" });
|
|
2395
2395
|
l(() => {
|
|
@@ -2402,7 +2402,7 @@ function Ni(e, t) {
|
|
|
2402
2402
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2403
2403
|
}
|
|
2404
2404
|
function Pi(e) {
|
|
2405
|
-
let t = e ?? v(
|
|
2405
|
+
let t = e ?? v(ar, null);
|
|
2406
2406
|
return {
|
|
2407
2407
|
t: t ? u(t) ? t.value : t : null,
|
|
2408
2408
|
format: Ni
|
|
@@ -2419,12 +2419,12 @@ function Fi(e) {
|
|
|
2419
2419
|
//#endregion
|
|
2420
2420
|
//#region src/composables/useMergeTag.ts
|
|
2421
2421
|
function Ii() {
|
|
2422
|
-
let e = v(
|
|
2422
|
+
let e = v(Hn, []), t = v(Un, ct.liquid), n = v(Wn, null), r = v(Gn, !0), i = C(!1);
|
|
2423
2423
|
function a(e) {
|
|
2424
|
-
return
|
|
2424
|
+
return pt(e, t);
|
|
2425
2425
|
}
|
|
2426
2426
|
function o(t) {
|
|
2427
|
-
return
|
|
2427
|
+
return mt(t, e);
|
|
2428
2428
|
}
|
|
2429
2429
|
async function s() {
|
|
2430
2430
|
if (!n) return null;
|
|
@@ -2449,12 +2449,12 @@ function Ii() {
|
|
|
2449
2449
|
//#endregion
|
|
2450
2450
|
//#region src/composables/useEmoji.ts
|
|
2451
2451
|
function Li() {
|
|
2452
|
-
let [e, t] =
|
|
2452
|
+
let [e, t] = rn(!1), r = n([]), i = !1;
|
|
2453
2453
|
l(() => {
|
|
2454
2454
|
i = !0;
|
|
2455
|
-
}),
|
|
2455
|
+
}), U(e, async (e) => {
|
|
2456
2456
|
if (e && r.value.length === 0) {
|
|
2457
|
-
let { emojiCategories: e } = await import("./emojiData-
|
|
2457
|
+
let { emojiCategories: e } = await import("./emojiData-6m0DBh7O.js");
|
|
2458
2458
|
if (i) return;
|
|
2459
2459
|
r.value = e;
|
|
2460
2460
|
}
|
|
@@ -2694,7 +2694,7 @@ function Ui(e) {
|
|
|
2694
2694
|
//#endregion
|
|
2695
2695
|
//#region src/composables/useRichTextEditor.ts
|
|
2696
2696
|
function Wi(e) {
|
|
2697
|
-
let t = v(
|
|
2697
|
+
let t = v(Mn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Ii(), l = v(jn, null), d = (u(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = ut(s), p = n(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S } = Ui(p), { start: w, stop: T } = nn(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), E = n(null), D = C(!0), O = C(null), ee = !1;
|
|
2698
2698
|
async function te() {
|
|
2699
2699
|
O.value = null, D.value = !0;
|
|
2700
2700
|
try {
|
|
@@ -2731,7 +2731,7 @@ function Wi(e) {
|
|
|
2731
2731
|
p.value?.destroy(), p.value = null, te();
|
|
2732
2732
|
}
|
|
2733
2733
|
te();
|
|
2734
|
-
let A =
|
|
2734
|
+
let A = U(() => e.blockContent(), (e) => {
|
|
2735
2735
|
p.value && p.value.getHTML() !== e && p.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2736
2736
|
});
|
|
2737
2737
|
function j(t) {
|
|
@@ -2739,7 +2739,7 @@ function Wi(e) {
|
|
|
2739
2739
|
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
2740
2740
|
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
2741
2741
|
}
|
|
2742
|
-
|
|
2742
|
+
J(document, "mousedown", j), ne(() => {
|
|
2743
2743
|
ee = !0, A(), T(), p.value?.destroy();
|
|
2744
2744
|
});
|
|
2745
2745
|
async function M() {
|
|
@@ -2785,7 +2785,7 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2785
2785
|
key: 0,
|
|
2786
2786
|
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]",
|
|
2787
2787
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2788
|
-
}, $i = /* @__PURE__ */
|
|
2788
|
+
}, $i = /* @__PURE__ */ V({
|
|
2789
2789
|
__name: "CustomBlock",
|
|
2790
2790
|
props: {
|
|
2791
2791
|
block: {},
|
|
@@ -2793,7 +2793,7 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2793
2793
|
},
|
|
2794
2794
|
emits: ["fetchData"],
|
|
2795
2795
|
setup(e, { emit: t }) {
|
|
2796
|
-
let n = e, i = t, { t: a } =
|
|
2796
|
+
let n = e, i = t, { t: a } = cr(), o = v(Bn, null), s = C(""), c = C(!1), l = k(() => o?.getDefinition(n.block.customType)), u = k(() => !!l.value), { isFetching: d, fetch: p, needsFetch: m, hasDataSource: h } = jt({
|
|
2797
2797
|
definition: l,
|
|
2798
2798
|
block: k(() => n.block),
|
|
2799
2799
|
onUpdate: (e, t) => {
|
|
@@ -2814,15 +2814,15 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2814
2814
|
}
|
|
2815
2815
|
}
|
|
2816
2816
|
}
|
|
2817
|
-
let _ =
|
|
2817
|
+
let _ = Qt(g, 150);
|
|
2818
2818
|
return r(() => {
|
|
2819
2819
|
g();
|
|
2820
|
-
}),
|
|
2820
|
+
}), U(() => n.block.fieldValues, () => {
|
|
2821
2821
|
_();
|
|
2822
|
-
}, { deep: !0 }), (e, t) => (f(), A("div", Gi, [u.value ? c.value ? (f(), A("div", Ji, [
|
|
2822
|
+
}, { deep: !0 }), (e, t) => (f(), A("div", Gi, [u.value ? c.value ? (f(), A("div", Ji, [H(M(gi), {
|
|
2823
2823
|
size: 24,
|
|
2824
2824
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2825
|
-
}),
|
|
2825
|
+
}), L("span", Yi, O(M(a).customBlocks.renderError), 1)])) : (f(), A("div", Xi, [L("div", { innerHTML: s.value }, null, 8, Zi), M(h) && M(m) ? (f(), A("div", Qi, [M(d) ? (f(), P(ki, {
|
|
2826
2826
|
key: 1,
|
|
2827
2827
|
class: "tpl:w-48"
|
|
2828
2828
|
})) : (f(), A("button", {
|
|
@@ -2834,12 +2834,12 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2834
2834
|
key: 0,
|
|
2835
2835
|
icon: l.value.icon,
|
|
2836
2836
|
size: 16
|
|
2837
|
-
}, null, 8, ["icon"])) : j("", !0),
|
|
2837
|
+
}, null, 8, ["icon"])) : j("", !0), B(" " + O(l.value?.dataSource?.label || M(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (f(), A("div", Ki, [H(M(ai), {
|
|
2838
2838
|
size: 24,
|
|
2839
2839
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2840
|
-
}),
|
|
2840
|
+
}), L("span", qi, O(M(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2841
2841
|
}
|
|
2842
|
-
}), ea = { class: "tpl:w-full" }, ta = /* @__PURE__ */
|
|
2842
|
+
}), ea = { class: "tpl:w-full" }, ta = /* @__PURE__ */ V({
|
|
2843
2843
|
__name: "DividerBlock",
|
|
2844
2844
|
props: {
|
|
2845
2845
|
block: {},
|
|
@@ -2851,9 +2851,9 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2851
2851
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2852
2852
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2853
2853
|
}));
|
|
2854
|
-
return (e, t) => (f(), A("div", ea, [
|
|
2854
|
+
return (e, t) => (f(), A("div", ea, [L("hr", {
|
|
2855
2855
|
class: "tpl:m-0 tpl:border-none",
|
|
2856
|
-
style:
|
|
2856
|
+
style: R(n.value)
|
|
2857
2857
|
}, null, 4)]));
|
|
2858
2858
|
}
|
|
2859
2859
|
}), na = { class: "tpl:w-full" }, ra = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, ia = {
|
|
@@ -2862,15 +2862,15 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2862
2862
|
}, aa = {
|
|
2863
2863
|
key: 1,
|
|
2864
2864
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2865
|
-
}, oa = /* @__PURE__ */
|
|
2865
|
+
}, oa = /* @__PURE__ */ V({
|
|
2866
2866
|
__name: "HtmlBlock",
|
|
2867
2867
|
props: {
|
|
2868
2868
|
block: {},
|
|
2869
2869
|
viewport: {}
|
|
2870
2870
|
},
|
|
2871
2871
|
setup(e) {
|
|
2872
|
-
let t = e, { t: n } =
|
|
2873
|
-
return (e, t) => (f(), A("div", na, [
|
|
2872
|
+
let t = e, { t: n } = cr(), r = k(() => t.block.content.trim().length > 0);
|
|
2873
|
+
return (e, t) => (f(), A("div", na, [L("div", ra, [H(M(Wr), {
|
|
2874
2874
|
size: 24,
|
|
2875
2875
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2876
2876
|
}), r.value ? (f(), A("span", ia, O(M(n).html.preview), 1)) : (f(), A("span", aa, O(M(n).html.empty), 1))])]));
|
|
@@ -2892,7 +2892,7 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2892
2892
|
}, fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
2893
2893
|
key: 3,
|
|
2894
2894
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2895
|
-
}, ga = ["aria-label"], _a = { key: 1 }, va = /* @__PURE__ */
|
|
2895
|
+
}, ga = ["aria-label"], _a = { key: 1 }, va = /* @__PURE__ */ V({
|
|
2896
2896
|
__name: "ImageBlock",
|
|
2897
2897
|
props: {
|
|
2898
2898
|
block: {},
|
|
@@ -2900,7 +2900,7 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2900
2900
|
},
|
|
2901
2901
|
emits: ["update"],
|
|
2902
2902
|
setup(e, { emit: t }) {
|
|
2903
|
-
let n = e, r = t, { t: i } =
|
|
2903
|
+
let n = e, r = t, { t: i } = cr(), { syntax: a } = Ii(), o = v(Kn, null), s = k(() => !!o), c = sa();
|
|
2904
2904
|
async function l() {
|
|
2905
2905
|
let e = await o?.({ accept: ["images"] });
|
|
2906
2906
|
if (c.alive && e) {
|
|
@@ -2917,76 +2917,76 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2917
2917
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2918
2918
|
marginRight: e === "center" ? "auto" : void 0
|
|
2919
2919
|
};
|
|
2920
|
-
}), p = k(() =>
|
|
2920
|
+
}), p = k(() => gt(n.block.src, a));
|
|
2921
2921
|
return (t, n) => (f(), A("div", {
|
|
2922
2922
|
class: "tpl:w-full",
|
|
2923
|
-
style:
|
|
2924
|
-
}, [e.block.src && p.value && e.block.placeholderUrl ? (f(), A(
|
|
2923
|
+
style: R(u.value)
|
|
2924
|
+
}, [e.block.src && p.value && e.block.placeholderUrl ? (f(), A(z, { key: 0 }, [e.block.linkUrl ? (f(), A("a", {
|
|
2925
2925
|
key: 0,
|
|
2926
2926
|
href: e.block.linkUrl,
|
|
2927
2927
|
target: "_blank",
|
|
2928
2928
|
rel: "noopener noreferrer",
|
|
2929
2929
|
onClick: n[0] ||= N(() => {}, ["prevent"])
|
|
2930
|
-
}, [
|
|
2930
|
+
}, [L("img", {
|
|
2931
2931
|
class: "tpl:border-0",
|
|
2932
2932
|
loading: "lazy",
|
|
2933
2933
|
src: e.block.placeholderUrl,
|
|
2934
2934
|
alt: e.block.alt || M(i).image.altTextPlaceholder,
|
|
2935
|
-
style:
|
|
2935
|
+
style: R(d.value)
|
|
2936
2936
|
}, null, 12, la)], 8, ca)) : (f(), A("img", {
|
|
2937
2937
|
key: 1,
|
|
2938
2938
|
class: "tpl:border-0",
|
|
2939
2939
|
src: e.block.placeholderUrl,
|
|
2940
2940
|
alt: e.block.alt,
|
|
2941
|
-
style:
|
|
2941
|
+
style: R(d.value)
|
|
2942
2942
|
}, null, 12, ua))], 64)) : e.block.src && p.value ? (f(), A("div", {
|
|
2943
2943
|
key: 1,
|
|
2944
2944
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2945
|
-
style:
|
|
2946
|
-
}, [
|
|
2945
|
+
style: R([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
2946
|
+
}, [H(M($r), {
|
|
2947
2947
|
size: 32,
|
|
2948
2948
|
"stroke-width": 1.5,
|
|
2949
2949
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2950
2950
|
style: { opacity: "0.5" }
|
|
2951
|
-
}),
|
|
2951
|
+
}), L("span", da, O(e.block.src), 1)], 4)) : e.block.src ? (f(), A(z, { key: 2 }, [e.block.linkUrl ? (f(), A("a", {
|
|
2952
2952
|
key: 0,
|
|
2953
2953
|
href: e.block.linkUrl,
|
|
2954
2954
|
target: "_blank",
|
|
2955
2955
|
rel: "noopener noreferrer",
|
|
2956
2956
|
onClick: n[1] ||= N(() => {}, ["prevent"])
|
|
2957
|
-
}, [
|
|
2957
|
+
}, [L("img", {
|
|
2958
2958
|
class: "tpl:border-0",
|
|
2959
2959
|
loading: "lazy",
|
|
2960
2960
|
src: e.block.src,
|
|
2961
2961
|
alt: e.block.alt || M(i).image.altTextPlaceholder,
|
|
2962
|
-
style:
|
|
2962
|
+
style: R(d.value)
|
|
2963
2963
|
}, null, 12, pa)], 8, fa)) : (f(), A("img", {
|
|
2964
2964
|
key: 1,
|
|
2965
2965
|
class: "tpl:border-0",
|
|
2966
2966
|
src: e.block.src,
|
|
2967
2967
|
alt: e.block.alt,
|
|
2968
|
-
style:
|
|
2968
|
+
style: R(d.value)
|
|
2969
2969
|
}, null, 12, ma))], 64)) : (f(), A("div", ha, [s.value ? (f(), A("button", {
|
|
2970
2970
|
key: 0,
|
|
2971
2971
|
"aria-label": M(i).image.browseMedia,
|
|
2972
2972
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
2973
2973
|
onClick: N(l, ["stop"])
|
|
2974
|
-
}, [
|
|
2974
|
+
}, [H(M($r), {
|
|
2975
2975
|
size: 14,
|
|
2976
2976
|
"stroke-width": 1.5
|
|
2977
|
-
}),
|
|
2977
|
+
}), B(" " + O(M(i).image.browseMedia), 1)], 8, ga)) : (f(), A("span", _a, O(M(i).image.clickToAdd), 1))]))], 4));
|
|
2978
2978
|
}
|
|
2979
2979
|
}), ya = { class: "tpl:w-full" }, ba = ["href"], xa = {
|
|
2980
2980
|
key: 1,
|
|
2981
2981
|
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)]"
|
|
2982
|
-
}, Sa = /* @__PURE__ */
|
|
2982
|
+
}, Sa = /* @__PURE__ */ V({
|
|
2983
2983
|
__name: "MenuBlock",
|
|
2984
2984
|
props: {
|
|
2985
2985
|
block: {},
|
|
2986
2986
|
viewport: {}
|
|
2987
2987
|
},
|
|
2988
2988
|
setup(e) {
|
|
2989
|
-
let t = e, { t: n } =
|
|
2989
|
+
let t = e, { t: n } = cr(), r = k(() => ({
|
|
2990
2990
|
display: "flex",
|
|
2991
2991
|
flexWrap: "wrap",
|
|
2992
2992
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -3000,11 +3000,11 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
3000
3000
|
}
|
|
3001
3001
|
return (t, o) => (f(), A("div", ya, [i.value ? (f(), A("div", {
|
|
3002
3002
|
key: 0,
|
|
3003
|
-
style:
|
|
3004
|
-
}, [(f(!0), A(
|
|
3003
|
+
style: R(r.value)
|
|
3004
|
+
}, [(f(!0), A(z, null, h(e.block.items, (t, n) => (f(), A(z, { key: t.id }, [L("a", {
|
|
3005
3005
|
href: t.url || "#",
|
|
3006
3006
|
class: "tpl:cursor-default tpl:no-underline",
|
|
3007
|
-
style:
|
|
3007
|
+
style: R({
|
|
3008
3008
|
color: a(t.color),
|
|
3009
3009
|
fontWeight: t.bold ? "bold" : "normal",
|
|
3010
3010
|
textDecoration: t.underline ? "underline" : "none"
|
|
@@ -3012,11 +3012,11 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
3012
3012
|
onClick: o[0] ||= N(() => {}, ["prevent"])
|
|
3013
3013
|
}, O(t.text || "..."), 13, ba), n < e.block.items.length - 1 ? (f(), A("span", {
|
|
3014
3014
|
key: 0,
|
|
3015
|
-
style:
|
|
3015
|
+
style: R({
|
|
3016
3016
|
color: e.block.separatorColor,
|
|
3017
3017
|
padding: `0 ${e.block.spacing}px`
|
|
3018
3018
|
})
|
|
3019
|
-
}, O(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), A("div", xa, [
|
|
3019
|
+
}, O(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), A("div", xa, [H(M(ri), { size: 16 }), L("span", null, O(M(n).menu.addLinks), 1)]))]));
|
|
3020
3020
|
}
|
|
3021
3021
|
}), Ca = new Set([
|
|
3022
3022
|
"http",
|
|
@@ -3090,7 +3090,7 @@ function Oa(e) {
|
|
|
3090
3090
|
//#endregion
|
|
3091
3091
|
//#region src/composables/useEditableTextBlock.ts
|
|
3092
3092
|
function ka(e) {
|
|
3093
|
-
let t = v(
|
|
3093
|
+
let t = v(Hn, []), { syntax: n } = Ii(), r = k(() => Oa(yt(ht(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = Sn(a), c = k(() => ({
|
|
3094
3094
|
top: o.value - 8,
|
|
3095
3095
|
left: s.value
|
|
3096
3096
|
}));
|
|
@@ -3111,14 +3111,14 @@ function ka(e) {
|
|
|
3111
3111
|
}
|
|
3112
3112
|
//#endregion
|
|
3113
3113
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3114
|
-
var Aa = ["innerHTML"], ja = /* @__PURE__ */
|
|
3114
|
+
var Aa = ["innerHTML"], ja = /* @__PURE__ */ V({
|
|
3115
3115
|
__name: "ParagraphBlock",
|
|
3116
3116
|
props: {
|
|
3117
3117
|
block: {},
|
|
3118
3118
|
viewport: {}
|
|
3119
3119
|
},
|
|
3120
3120
|
setup(e) {
|
|
3121
|
-
let t = e, n = E(() => import("./ParagraphEditor-
|
|
3121
|
+
let t = e, n = E(() => import("./ParagraphEditor-BIWXLPfu.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ka(() => t.block.content);
|
|
3122
3122
|
return (t, l) => (f(), A("div", {
|
|
3123
3123
|
ref_key: "blockRef",
|
|
3124
3124
|
ref: i,
|
|
@@ -3172,7 +3172,7 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3172
3172
|
}, Ua = ["aria-label", "title"], Wa = {
|
|
3173
3173
|
key: 3,
|
|
3174
3174
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3175
|
-
}, Ga = ["aria-label"], Ka = /* @__PURE__ */ Ti(/* @__PURE__ */
|
|
3175
|
+
}, Ga = ["aria-label"], Ka = /* @__PURE__ */ Ti(/* @__PURE__ */ V({
|
|
3176
3176
|
__name: "BlockWrapper",
|
|
3177
3177
|
props: {
|
|
3178
3178
|
block: {},
|
|
@@ -3182,7 +3182,7 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3182
3182
|
},
|
|
3183
3183
|
emits: ["select"],
|
|
3184
3184
|
setup(e, { emit: t }) {
|
|
3185
|
-
let n = E(() => import("./BlockIssueBadge-
|
|
3185
|
+
let n = E(() => import("./BlockIssueBadge-Sr3is7Wr.js")), r = e, i = t, { t: a, format: s } = cr(), c = v(Xn, null), l = C(null), u = k(() => c?.liftedBlockId.value === r.block.id), d = k(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
3186
3186
|
async function p() {
|
|
3187
3187
|
await m(), l.value?.focus();
|
|
3188
3188
|
}
|
|
@@ -3209,7 +3209,7 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3209
3209
|
desktop: a.viewport.desktop,
|
|
3210
3210
|
tablet: a.viewport.tablet,
|
|
3211
3211
|
mobile: a.viewport.mobile
|
|
3212
|
-
}[r.viewport] ?? r.viewport : ""), y = k(() => !!r.block.displayCondition), b = v(
|
|
3212
|
+
}[r.viewport] ?? r.viewport : ""), y = k(() => !!r.block.displayCondition), b = v(Pn, null), x = v(Fn, null), S = v(Yn, {}), w = k(() => !!S.savedModules), T = k(() => S.comments?.getBlockCount(r.block.id) ?? 0), D = k(() => ({ margin: Na(r.block).margin })), ee = k(() => {
|
|
3213
3213
|
let e = Na(r.block);
|
|
3214
3214
|
return {
|
|
3215
3215
|
padding: e.padding,
|
|
@@ -3232,24 +3232,24 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3232
3232
|
x?.toggleBlock(r.block.id);
|
|
3233
3233
|
}
|
|
3234
3234
|
return (t, r) => (f(), A("div", {
|
|
3235
|
-
class:
|
|
3235
|
+
class: I(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
3236
3236
|
"tpl-block--selected": e.isSelected,
|
|
3237
3237
|
"tpl-block--idle": !e.isSelected,
|
|
3238
3238
|
"tpl-block--lifted": u.value
|
|
3239
3239
|
}]),
|
|
3240
|
-
style:
|
|
3240
|
+
style: R(D.value),
|
|
3241
3241
|
"data-block-id": e.block.id,
|
|
3242
3242
|
"data-block-type": e.block.type,
|
|
3243
3243
|
onClick: te
|
|
3244
3244
|
}, [
|
|
3245
|
-
|
|
3245
|
+
H(M(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
3246
3246
|
e.isSelected ? (f(), A("div", {
|
|
3247
3247
|
key: 0,
|
|
3248
3248
|
role: "toolbar",
|
|
3249
3249
|
"aria-label": M(a).blockActions.drag,
|
|
3250
3250
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
3251
3251
|
}, [
|
|
3252
|
-
|
|
3252
|
+
L("button", {
|
|
3253
3253
|
ref_key: "dragButtonRef",
|
|
3254
3254
|
ref: l,
|
|
3255
3255
|
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:duration-150 tpl:active:cursor-grabbing",
|
|
@@ -3258,16 +3258,16 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3258
3258
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3259
3259
|
title: M(a).blockActions.drag,
|
|
3260
3260
|
onKeydown: h
|
|
3261
|
-
}, [
|
|
3261
|
+
}, [H(M(Zr), {
|
|
3262
3262
|
size: 14,
|
|
3263
3263
|
"stroke-width": 1.5
|
|
3264
3264
|
})], 40, Ia),
|
|
3265
|
-
|
|
3265
|
+
L("button", {
|
|
3266
3266
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3267
3267
|
"aria-label": M(a).blockActions.duplicate,
|
|
3268
3268
|
title: M(a).blockActions.duplicate,
|
|
3269
3269
|
onClick: N(P, ["stop"])
|
|
3270
|
-
}, [
|
|
3270
|
+
}, [H(M(Gr), {
|
|
3271
3271
|
size: 14,
|
|
3272
3272
|
"stroke-width": 1.5
|
|
3273
3273
|
})], 8, La),
|
|
@@ -3277,44 +3277,44 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3277
3277
|
"aria-label": M(a).blockActions.saveAsModule,
|
|
3278
3278
|
title: M(a).blockActions.saveAsModule,
|
|
3279
3279
|
onClick: N(re, ["stop"])
|
|
3280
|
-
}, [
|
|
3280
|
+
}, [H(M(Pr), {
|
|
3281
3281
|
size: 14,
|
|
3282
3282
|
"stroke-width": 1.5
|
|
3283
3283
|
})], 8, Ra)) : j("", !0),
|
|
3284
|
-
|
|
3284
|
+
L("button", {
|
|
3285
3285
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3286
3286
|
"aria-label": M(a).blockActions.delete,
|
|
3287
3287
|
title: M(a).blockActions.delete,
|
|
3288
3288
|
onClick: N(ne, ["stop"])
|
|
3289
|
-
}, [
|
|
3289
|
+
}, [H(M(hi), {
|
|
3290
3290
|
size: 14,
|
|
3291
3291
|
"stroke-width": 1.5
|
|
3292
3292
|
})], 8, za)
|
|
3293
3293
|
], 8, Fa)) : j("", !0),
|
|
3294
|
-
g.value ? (f(), A("div", Ba, [
|
|
3294
|
+
g.value ? (f(), A("div", Ba, [L("span", Va, [H(M(Kr), {
|
|
3295
3295
|
size: 12,
|
|
3296
3296
|
"stroke-width": 1.5
|
|
3297
|
-
}),
|
|
3298
|
-
y.value && !g.value ? (f(), A("div", Ha, [
|
|
3297
|
+
}), B(" " + O(M(s)(M(a).blockActions.hiddenOnViewport, { viewport: _.value })), 1)])])) : j("", !0),
|
|
3298
|
+
y.value && !g.value ? (f(), A("div", Ha, [L("button", {
|
|
3299
3299
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
3300
3300
|
"aria-label": M(a).blockActions.conditionToggle,
|
|
3301
3301
|
title: e.block.displayCondition?.label,
|
|
3302
3302
|
onClick: N(F, ["stop"])
|
|
3303
|
-
}, [
|
|
3303
|
+
}, [H(M(Xr), {
|
|
3304
3304
|
size: 12,
|
|
3305
3305
|
"stroke-width": 2
|
|
3306
3306
|
})], 8, Ua)])) : j("", !0),
|
|
3307
|
-
T.value > 0 && !g.value ? (f(), A("div", Wa, [
|
|
3307
|
+
T.value > 0 && !g.value ? (f(), A("div", Wa, [L("button", {
|
|
3308
3308
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
3309
3309
|
"aria-label": M(s)(M(a).blockActions.comments, { count: String(T.value) }),
|
|
3310
3310
|
onClick: r[0] ||= N((t) => M(S).comments?.openForBlock(e.block.id), ["stop"])
|
|
3311
|
-
}, [
|
|
3311
|
+
}, [H(M(ni), {
|
|
3312
3312
|
size: 12,
|
|
3313
3313
|
"stroke-width": 2.5
|
|
3314
|
-
}),
|
|
3315
|
-
|
|
3314
|
+
}), B(" " + O(T.value), 1)], 8, Ga)])) : j("", !0),
|
|
3315
|
+
L("div", {
|
|
3316
3316
|
class: "tpl-block-content",
|
|
3317
|
-
style:
|
|
3317
|
+
style: R(ee.value)
|
|
3318
3318
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4)
|
|
3319
3319
|
], 14, Pa));
|
|
3320
3320
|
}
|
|
@@ -3327,16 +3327,16 @@ function qa(e) {
|
|
|
3327
3327
|
}
|
|
3328
3328
|
//#endregion
|
|
3329
3329
|
//#region src/components/blocks/TitleBlock.vue
|
|
3330
|
-
var Ja = /* @__PURE__ */
|
|
3330
|
+
var Ja = /* @__PURE__ */ V({
|
|
3331
3331
|
__name: "TitleBlock",
|
|
3332
3332
|
props: {
|
|
3333
3333
|
block: {},
|
|
3334
3334
|
viewport: {}
|
|
3335
3335
|
},
|
|
3336
3336
|
setup(e) {
|
|
3337
|
-
let t = e, n = E(() => import("./TitleEditor-
|
|
3337
|
+
let t = e, n = E(() => import("./TitleEditor-DZcx2N4R.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ka(() => t.block.content), l = k(() => {
|
|
3338
3338
|
let e = {
|
|
3339
|
-
fontSize: `${
|
|
3339
|
+
fontSize: `${fe[t.block.level]}px`,
|
|
3340
3340
|
color: t.block.color,
|
|
3341
3341
|
textAlign: t.block.textAlign
|
|
3342
3342
|
};
|
|
@@ -3346,7 +3346,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3346
3346
|
ref_key: "blockRef",
|
|
3347
3347
|
ref: i,
|
|
3348
3348
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
3349
|
-
style:
|
|
3349
|
+
style: R(l.value),
|
|
3350
3350
|
onDblclick: o[0] ||= (...e) => M(s) && M(s)(...e)
|
|
3351
3351
|
}, [M(r) ? (f(), P(M(n), {
|
|
3352
3352
|
key: 0,
|
|
@@ -3368,7 +3368,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3368
3368
|
key: 0,
|
|
3369
3369
|
"data-testid": "section-drop-hint",
|
|
3370
3370
|
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-text-dim)]"
|
|
3371
|
-
}, Qa = /* @__PURE__ */
|
|
3371
|
+
}, Qa = /* @__PURE__ */ V({
|
|
3372
3372
|
__name: "SectionBlock",
|
|
3373
3373
|
props: {
|
|
3374
3374
|
block: {},
|
|
@@ -3382,7 +3382,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3382
3382
|
button: wr,
|
|
3383
3383
|
divider: ta,
|
|
3384
3384
|
custom: $i
|
|
3385
|
-
}, n = e, { t: r } =
|
|
3385
|
+
}, n = e, { t: r } = cr(), i = Y(Mn, "SectionBlock"), a = v(Fn, null), o = v(Bn, null), s = k(() => {
|
|
3386
3386
|
switch (n.block.columns) {
|
|
3387
3387
|
case "2": return ["50%", "50%"];
|
|
3388
3388
|
case "3": return [
|
|
@@ -3416,11 +3416,11 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3416
3416
|
dataSourceFetched: t.dataSourceFetched
|
|
3417
3417
|
});
|
|
3418
3418
|
}
|
|
3419
|
-
return (t, n) => (f(), A("div", Ya, [
|
|
3419
|
+
return (t, n) => (f(), A("div", Ya, [L("div", Xa, [(f(!0), A(z, null, h(l.value, (t, n) => (f(), A("div", {
|
|
3420
3420
|
key: n,
|
|
3421
|
-
class:
|
|
3422
|
-
style:
|
|
3423
|
-
}, [
|
|
3421
|
+
class: I(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3422
|
+
style: R({ width: s.value[n] })
|
|
3423
|
+
}, [H(M(se), {
|
|
3424
3424
|
"model-value": u(n),
|
|
3425
3425
|
group: {
|
|
3426
3426
|
name: "blocks",
|
|
@@ -3438,7 +3438,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3438
3438
|
class: "tpl:min-h-[60px]",
|
|
3439
3439
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3440
3440
|
}, {
|
|
3441
|
-
default: b(() => [(f(!0), A(
|
|
3441
|
+
default: b(() => [(f(!0), A(z, null, h(u(n), (t) => c((f(), A("div", { key: t.id }, [H(Ka, {
|
|
3442
3442
|
block: t,
|
|
3443
3443
|
"is-selected": M(i).state.selectedBlockId === t.id,
|
|
3444
3444
|
viewport: e.viewport,
|
|
@@ -3459,13 +3459,13 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3459
3459
|
"is-selected",
|
|
3460
3460
|
"viewport",
|
|
3461
3461
|
"onSelect"
|
|
3462
|
-
])])), [[
|
|
3462
|
+
])])), [[oe, !M(a)?.isHidden(t.id)]])), 128))]),
|
|
3463
3463
|
_: 2
|
|
3464
3464
|
}, 1032, [
|
|
3465
3465
|
"model-value",
|
|
3466
3466
|
"group",
|
|
3467
3467
|
"onUpdate:modelValue"
|
|
3468
|
-
]), u(n).length === 0 ? (f(), A("div", Za, [
|
|
3468
|
+
]), u(n).length === 0 ? (f(), A("div", Za, [L("span", null, O(M(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))])]));
|
|
3469
3469
|
}
|
|
3470
3470
|
}), $a = {
|
|
3471
3471
|
facebook: {
|
|
@@ -3573,7 +3573,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3573
3573
|
"width",
|
|
3574
3574
|
"height",
|
|
3575
3575
|
"fill"
|
|
3576
|
-
], ro = ["d"], io = /* @__PURE__ */
|
|
3576
|
+
], ro = ["d"], io = /* @__PURE__ */ V({
|
|
3577
3577
|
__name: "SocialIconSvg",
|
|
3578
3578
|
props: {
|
|
3579
3579
|
platform: {},
|
|
@@ -3619,25 +3619,25 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3619
3619
|
default: return e;
|
|
3620
3620
|
}
|
|
3621
3621
|
}), a = k(() => Math.floor(r.value * .6)), o = k(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
3622
|
-
return (e, t) => (f(), A("span", { style:
|
|
3622
|
+
return (e, t) => (f(), A("span", { style: R(i.value) }, [(f(), A("svg", {
|
|
3623
3623
|
width: a.value,
|
|
3624
3624
|
height: a.value,
|
|
3625
3625
|
viewBox: "0 0 24 24",
|
|
3626
3626
|
fill: o.value,
|
|
3627
3627
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3628
|
-
}, [
|
|
3628
|
+
}, [L("path", { d: n.value.path }, null, 8, ro)], 8, no))], 4));
|
|
3629
3629
|
}
|
|
3630
3630
|
}), ao = { class: "tpl:w-full" }, oo = ["href"], so = {
|
|
3631
3631
|
key: 1,
|
|
3632
3632
|
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)]"
|
|
3633
|
-
}, co = /* @__PURE__ */
|
|
3633
|
+
}, co = /* @__PURE__ */ V({
|
|
3634
3634
|
__name: "SocialIconsBlock",
|
|
3635
3635
|
props: {
|
|
3636
3636
|
block: {},
|
|
3637
3637
|
viewport: {}
|
|
3638
3638
|
},
|
|
3639
3639
|
setup(e) {
|
|
3640
|
-
let t = e, { t: n } =
|
|
3640
|
+
let t = e, { t: n } = cr(), r = k(() => ({
|
|
3641
3641
|
display: "flex",
|
|
3642
3642
|
flexWrap: "wrap",
|
|
3643
3643
|
gap: `${t.block.spacing}px`,
|
|
@@ -3645,13 +3645,13 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3645
3645
|
})), i = k(() => t.block.icons.length > 0);
|
|
3646
3646
|
return (t, a) => (f(), A("div", ao, [i.value ? (f(), A("div", {
|
|
3647
3647
|
key: 0,
|
|
3648
|
-
style:
|
|
3649
|
-
}, [(f(!0), A(
|
|
3648
|
+
style: R(r.value)
|
|
3649
|
+
}, [(f(!0), A(z, null, h(e.block.icons, (t) => (f(), A("a", {
|
|
3650
3650
|
key: t.id,
|
|
3651
3651
|
href: t.url || "#",
|
|
3652
3652
|
class: "tpl:cursor-default",
|
|
3653
3653
|
onClick: a[0] ||= N(() => {}, ["prevent"])
|
|
3654
|
-
}, [
|
|
3654
|
+
}, [H(io, {
|
|
3655
3655
|
platform: t.platform,
|
|
3656
3656
|
"icon-style": e.block.iconStyle,
|
|
3657
3657
|
"icon-size": e.block.iconSize
|
|
@@ -3659,7 +3659,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3659
3659
|
"platform",
|
|
3660
3660
|
"icon-style",
|
|
3661
3661
|
"icon-size"
|
|
3662
|
-
])], 8, oo))), 128))], 4)) : (f(), A("div", so, [
|
|
3662
|
+
])], 8, oo))), 128))], 4)) : (f(), A("div", so, [H(M(ui), { size: 16 }), L("span", null, O(M(n).social.addIcons), 1)]))]));
|
|
3663
3663
|
}
|
|
3664
3664
|
}), lo = { class: "tpl:w-full" }, uo = {
|
|
3665
3665
|
key: 0,
|
|
@@ -3668,21 +3668,21 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3668
3668
|
"background-color": "var(--tpl-bg-hover)",
|
|
3669
3669
|
color: "var(--tpl-text-dim)"
|
|
3670
3670
|
}
|
|
3671
|
-
}, fo = /* @__PURE__ */
|
|
3671
|
+
}, fo = /* @__PURE__ */ V({
|
|
3672
3672
|
__name: "SpacerBlock",
|
|
3673
3673
|
props: {
|
|
3674
3674
|
block: {},
|
|
3675
3675
|
viewport: {}
|
|
3676
3676
|
},
|
|
3677
3677
|
setup(e) {
|
|
3678
|
-
let t = e, n =
|
|
3678
|
+
let t = e, n = Y(Mn, "SpacerBlock"), r = k(() => ({
|
|
3679
3679
|
height: `${t.block.height}px`,
|
|
3680
3680
|
minHeight: `${t.block.height}px`,
|
|
3681
3681
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3682
3682
|
}));
|
|
3683
|
-
return (t, i) => (f(), A("div", lo, [
|
|
3684
|
-
style:
|
|
3685
|
-
class:
|
|
3683
|
+
return (t, i) => (f(), A("div", lo, [L("div", {
|
|
3684
|
+
style: R(r.value),
|
|
3685
|
+
class: I(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !M(n).state.previewMode }])
|
|
3686
3686
|
}, [M(n).state.previewMode ? j("", !0) : (f(), A("span", uo, O(e.block.height) + "px ", 1))], 6)]));
|
|
3687
3687
|
}
|
|
3688
3688
|
}), po = { class: "tpl:w-full" }, mo = { key: 0 }, ho = [
|
|
@@ -3696,7 +3696,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3696
3696
|
], _o = {
|
|
3697
3697
|
key: 1,
|
|
3698
3698
|
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)]"
|
|
3699
|
-
}, vo = /* @__PURE__ */ Ti(/* @__PURE__ */
|
|
3699
|
+
}, vo = /* @__PURE__ */ Ti(/* @__PURE__ */ V({
|
|
3700
3700
|
__name: "TableBlock",
|
|
3701
3701
|
props: {
|
|
3702
3702
|
block: {},
|
|
@@ -3710,7 +3710,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3710
3710
|
updated(e, t) {
|
|
3711
3711
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3712
3712
|
}
|
|
3713
|
-
}, n = e, { t: r } =
|
|
3713
|
+
}, n = e, { t: r } = cr(), i = Y(Mn, "TableBlock"), a = k(() => n.block.rows.length > 0), o = k(() => ({
|
|
3714
3714
|
width: "100%",
|
|
3715
3715
|
borderCollapse: "collapse",
|
|
3716
3716
|
fontSize: `${n.block.fontSize}px`,
|
|
@@ -3741,42 +3741,42 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3741
3741
|
}
|
|
3742
3742
|
return (e, n) => (f(), A("div", po, [a.value ? (f(), A("table", {
|
|
3743
3743
|
key: 0,
|
|
3744
|
-
style:
|
|
3744
|
+
style: R(o.value),
|
|
3745
3745
|
class: "tpl-table-editable"
|
|
3746
|
-
}, [u.value ? (f(), A("thead", mo, [
|
|
3746
|
+
}, [u.value ? (f(), A("thead", mo, [L("tr", null, [(f(!0), A(z, null, h(u.value.cells, (e) => c((f(), A("th", {
|
|
3747
3747
|
key: e.id,
|
|
3748
|
-
style:
|
|
3748
|
+
style: R(l.value),
|
|
3749
3749
|
"aria-label": M(r).table.cellPlaceholder,
|
|
3750
3750
|
contenteditable: "true",
|
|
3751
3751
|
"data-placeholder": M(r).table.cellPlaceholder,
|
|
3752
3752
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3753
3753
|
onKeydown: n[0] ||= D(N((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3754
3754
|
onClick: N(p, ["stop"])
|
|
3755
|
-
}, null, 44, ho)), [[t, e.content]])), 128))])])) : j("", !0),
|
|
3755
|
+
}, null, 44, ho)), [[t, e.content]])), 128))])])) : j("", !0), L("tbody", null, [(f(!0), A(z, null, h(d.value, (e) => (f(), A("tr", { key: e.id }, [(f(!0), A(z, null, h(e.cells, (i) => c((f(), A("td", {
|
|
3756
3756
|
key: i.id,
|
|
3757
|
-
style:
|
|
3757
|
+
style: R(s.value),
|
|
3758
3758
|
"aria-label": M(r).table.cellPlaceholder,
|
|
3759
3759
|
contenteditable: "true",
|
|
3760
3760
|
"data-placeholder": M(r).table.cellPlaceholder,
|
|
3761
3761
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3762
3762
|
onKeydown: n[1] ||= D(N((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3763
3763
|
onClick: N(p, ["stop"])
|
|
3764
|
-
}, null, 44, go)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), A("div", _o, [
|
|
3764
|
+
}, null, 44, go)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), A("div", _o, [H(M(mi), { size: 16 }), L("span", null, O(M(r).table.empty), 1)]))]));
|
|
3765
3765
|
}
|
|
3766
|
-
}), [["__scopeId", "data-v-4f49860b"]]), yo = /* @__PURE__ */
|
|
3766
|
+
}), [["__scopeId", "data-v-4f49860b"]]), yo = /* @__PURE__ */ V({
|
|
3767
3767
|
__name: "VideoPlayButton",
|
|
3768
3768
|
props: { hoverEffect: {
|
|
3769
3769
|
type: Boolean,
|
|
3770
3770
|
default: !1
|
|
3771
3771
|
} },
|
|
3772
3772
|
setup(e) {
|
|
3773
|
-
return (t, n) => (f(), A("div", { class:
|
|
3773
|
+
return (t, n) => (f(), A("div", { class: I(["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] ||= [L("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-white/90 tpl:shadow-lg" }, [L("svg", {
|
|
3774
3774
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
3775
3775
|
width: "28",
|
|
3776
3776
|
height: "28",
|
|
3777
3777
|
viewBox: "0 0 24 24",
|
|
3778
3778
|
fill: "currentColor"
|
|
3779
|
-
}, [
|
|
3779
|
+
}, [L("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
3780
3780
|
}
|
|
3781
3781
|
});
|
|
3782
3782
|
//#endregion
|
|
@@ -3824,14 +3824,14 @@ var So = ["src", "alt"], Co = {
|
|
|
3824
3824
|
}, wo = ["href"], To = ["src", "alt"], Eo = ["src", "alt"], Do = {
|
|
3825
3825
|
key: 3,
|
|
3826
3826
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
3827
|
-
}, Oo = /* @__PURE__ */
|
|
3827
|
+
}, Oo = /* @__PURE__ */ V({
|
|
3828
3828
|
__name: "VideoBlock",
|
|
3829
3829
|
props: {
|
|
3830
3830
|
block: {},
|
|
3831
3831
|
viewport: {}
|
|
3832
3832
|
},
|
|
3833
3833
|
setup(e) {
|
|
3834
|
-
let t = e, { t: n } =
|
|
3834
|
+
let t = e, { t: n } = cr(), { syntax: r } = Ii(), i = k(() => gt(t.block.url, r) || gt(t.block.thumbnailUrl, r)), a = k(() => i.value ? null : xo(t.block.url, t.block.thumbnailUrl)), o = k(() => ({ textAlign: t.block.align })), s = k(() => {
|
|
3835
3835
|
let e = t.block.align;
|
|
3836
3836
|
return {
|
|
3837
3837
|
maxWidth: "100%",
|
|
@@ -3840,52 +3840,52 @@ var So = ["src", "alt"], Co = {
|
|
|
3840
3840
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3841
3841
|
marginRight: e === "center" ? "auto" : void 0
|
|
3842
3842
|
};
|
|
3843
|
-
}), c = k(() =>
|
|
3843
|
+
}), c = k(() => gt(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
3844
3844
|
return (t, r) => (f(), A("div", {
|
|
3845
3845
|
class: "tpl:w-full",
|
|
3846
|
-
style:
|
|
3846
|
+
style: R(o.value)
|
|
3847
3847
|
}, [i.value && e.block.placeholderUrl ? (f(), A("div", {
|
|
3848
3848
|
key: 0,
|
|
3849
3849
|
class: "tpl:relative tpl:inline-block",
|
|
3850
|
-
style:
|
|
3851
|
-
}, [
|
|
3850
|
+
style: R(s.value)
|
|
3851
|
+
}, [L("img", {
|
|
3852
3852
|
class: "tpl:w-full tpl:border-0",
|
|
3853
3853
|
src: e.block.placeholderUrl,
|
|
3854
3854
|
alt: e.block.alt
|
|
3855
|
-
}, null, 8, So),
|
|
3855
|
+
}, null, 8, So), H(yo)], 4)) : i.value ? (f(), A("div", {
|
|
3856
3856
|
key: 1,
|
|
3857
3857
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
3858
|
-
style:
|
|
3859
|
-
}, [
|
|
3858
|
+
style: R([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3859
|
+
}, [H(M(yi), {
|
|
3860
3860
|
size: 36,
|
|
3861
3861
|
"stroke-width": 1.5,
|
|
3862
3862
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3863
3863
|
style: { opacity: "0.5" }
|
|
3864
|
-
}),
|
|
3864
|
+
}), L("span", Co, O(c.value), 1)], 4)) : a.value ? (f(), A(z, { key: 2 }, [e.block.url ? (f(), A("a", {
|
|
3865
3865
|
key: 0,
|
|
3866
3866
|
href: e.block.url,
|
|
3867
3867
|
target: "_blank",
|
|
3868
3868
|
rel: "noopener noreferrer",
|
|
3869
3869
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
3870
|
-
style:
|
|
3870
|
+
style: R(s.value),
|
|
3871
3871
|
onClick: r[0] ||= N(() => {}, ["prevent"])
|
|
3872
|
-
}, [
|
|
3872
|
+
}, [L("img", {
|
|
3873
3873
|
class: "tpl:w-full tpl:border-0",
|
|
3874
3874
|
src: a.value,
|
|
3875
3875
|
alt: e.block.alt
|
|
3876
|
-
}, null, 8, To),
|
|
3876
|
+
}, null, 8, To), H(yo, { "hover-effect": "" })], 12, wo)) : (f(), A("div", {
|
|
3877
3877
|
key: 1,
|
|
3878
3878
|
class: "tpl:relative tpl:inline-block",
|
|
3879
|
-
style:
|
|
3880
|
-
}, [
|
|
3879
|
+
style: R(s.value)
|
|
3880
|
+
}, [L("img", {
|
|
3881
3881
|
class: "tpl:w-full tpl:border-0",
|
|
3882
3882
|
src: a.value,
|
|
3883
3883
|
alt: e.block.alt
|
|
3884
|
-
}, null, 8, Eo),
|
|
3884
|
+
}, null, 8, Eo), H(yo)], 4))], 64)) : (f(), A("div", Do, [H(M(yi), {
|
|
3885
3885
|
size: 40,
|
|
3886
3886
|
"stroke-width": 1.5,
|
|
3887
3887
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3888
|
-
}),
|
|
3888
|
+
}), L("span", null, O(M(n).video.addVideo), 1)]))], 4));
|
|
3889
3889
|
}
|
|
3890
3890
|
}), ko = {
|
|
3891
3891
|
section: Qa,
|
|
@@ -3900,34 +3900,34 @@ var So = ["src", "alt"], Co = {
|
|
|
3900
3900
|
table: vo,
|
|
3901
3901
|
spacer: fo,
|
|
3902
3902
|
html: oa,
|
|
3903
|
-
countdown: E(() => import("./CountdownBlock-
|
|
3903
|
+
countdown: E(() => import("./CountdownBlock-CpSUUDDs.js").then((e) => e.n))
|
|
3904
3904
|
};
|
|
3905
3905
|
function Ao(e) {
|
|
3906
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3906
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = cr(r);
|
|
3907
3907
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3908
3908
|
let { resolvedTheme: c } = dr(k(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = pr({
|
|
3909
3909
|
themeOverrides: u,
|
|
3910
3910
|
resolvedTheme: c,
|
|
3911
3911
|
extraStyles: e.themeExtraStyles
|
|
3912
|
-
}), f =
|
|
3912
|
+
}), f = Et({
|
|
3913
3913
|
content: t.content,
|
|
3914
3914
|
setContent: (e, n) => t.setContent(e, n),
|
|
3915
3915
|
...e.historyOptions
|
|
3916
3916
|
});
|
|
3917
|
-
|
|
3918
|
-
let m =
|
|
3917
|
+
Mt(t, f);
|
|
3918
|
+
let m = Ot({
|
|
3919
3919
|
addBlock: t.addBlock,
|
|
3920
3920
|
removeBlock: t.removeBlock,
|
|
3921
3921
|
updateBlock: t.updateBlock,
|
|
3922
3922
|
selectBlock: t.selectBlock,
|
|
3923
3923
|
findBlockLocation: t.findBlockLocation,
|
|
3924
3924
|
blockDefaults: n.blockDefaults
|
|
3925
|
-
}), h =
|
|
3925
|
+
}), h = At(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? kt({
|
|
3926
3926
|
content: t.content,
|
|
3927
3927
|
isDirty: () => t.state.isDirty,
|
|
3928
3928
|
...e.autoSaveOptions
|
|
3929
3929
|
}) : null, _ = null;
|
|
3930
|
-
g && (_ =
|
|
3930
|
+
g && (_ = U(f.isNavigating, (e) => {
|
|
3931
3931
|
e ? g.pause() : g.resume();
|
|
3932
3932
|
}));
|
|
3933
3933
|
let v = ur(t, {
|
|
@@ -3938,10 +3938,10 @@ function Ao(e) {
|
|
|
3938
3938
|
function b(e) {
|
|
3939
3939
|
for (let t of e) y.registerCustom(t, $i);
|
|
3940
3940
|
}
|
|
3941
|
-
let x =
|
|
3941
|
+
let x = An();
|
|
3942
3942
|
if (s() && l(x.dispose), e.containerEl) {
|
|
3943
3943
|
let t = e.containerEl;
|
|
3944
|
-
|
|
3944
|
+
J(document, "pointerdown", (e) => {
|
|
3945
3945
|
let n = t.value;
|
|
3946
3946
|
n && (e.composedPath?.() ?? []).includes(n) && x.claim();
|
|
3947
3947
|
}, { capture: !0 });
|
|
@@ -3956,19 +3956,19 @@ function Ao(e) {
|
|
|
3956
3956
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
3957
3957
|
});
|
|
3958
3958
|
}
|
|
3959
|
-
|
|
3959
|
+
J(document, "keydown", S);
|
|
3960
3960
|
let w = C(null);
|
|
3961
|
-
p(
|
|
3962
|
-
let T =
|
|
3963
|
-
p(
|
|
3964
|
-
let E =
|
|
3961
|
+
p(Qn, e.editorRoot ?? document), p($n, w), p(jn, r), p(Mn, t), p(Nn, f), p(Pn, m), p(Fn, h), p(In, i), p(Ln, d), p(Rn, c), p(zn, n.blockDefaults), p(Bn, y), p(Vn, n.customBlocks ?? []);
|
|
3962
|
+
let T = dt(n.mergeTags?.syntax);
|
|
3963
|
+
p(Hn, n.mergeTags?.tags ?? []), p(Un, T), p(Wn, n.mergeTags?.onRequest ?? null), p(Gn, n.mergeTags?.autocomplete !== !1), p(Kn, n.onRequestMedia ?? null), p(qn, n.displayConditions?.conditions ?? []), p(Jn, n.displayConditions?.allowCustom ?? !1), p(Yn, e.capabilities ?? {}), p(Xn, v);
|
|
3964
|
+
let E = or(n.lint) ? null : sr({
|
|
3965
3965
|
content: t.content,
|
|
3966
3966
|
options: n.lint ?? {},
|
|
3967
3967
|
updateBlock: t.updateBlock,
|
|
3968
3968
|
updateSettings: t.updateSettings,
|
|
3969
3969
|
removeBlock: t.removeBlock
|
|
3970
3970
|
});
|
|
3971
|
-
p(
|
|
3971
|
+
p(Zn, E);
|
|
3972
3972
|
function D() {
|
|
3973
3973
|
_?.(), E?.destroy(), g?.destroy(), f.destroy();
|
|
3974
3974
|
}
|
|
@@ -4066,7 +4066,7 @@ var jo = class e {
|
|
|
4066
4066
|
};
|
|
4067
4067
|
e === "POST" && this.requestOptions.body && (t["Content-Type"] = "application/json", n.body = JSON.stringify(this.requestOptions.body));
|
|
4068
4068
|
let r = await fetch(this.url, n);
|
|
4069
|
-
if (!r.ok) throw new
|
|
4069
|
+
if (!r.ok) throw new bt(`Token refresh failed: ${r.status}`, r.status);
|
|
4070
4070
|
let i = await r.json();
|
|
4071
4071
|
if (!i.token || !i.expires_at || !i.project_id || !i.tenant) throw Error("Invalid token response: missing token, expires_at, project_id, or tenant");
|
|
4072
4072
|
return this.accessToken = i.token, this.expiresAt = /* @__PURE__ */ new Date(i.expires_at * 1e3), this._projectId = i.project_id, this._tenantSlug = i.tenant, i.test_email?.allowed_emails && i.test_email?.signature ? this._testEmailConfig = {
|
|
@@ -4192,7 +4192,7 @@ var No = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${No}/templates/{te
|
|
|
4192
4192
|
});
|
|
4193
4193
|
if (!n.ok) {
|
|
4194
4194
|
let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` }));
|
|
4195
|
-
throw new
|
|
4195
|
+
throw new bt(this.extractFirstValidationError(e), n.status);
|
|
4196
4196
|
}
|
|
4197
4197
|
if (n.status !== 204) return (await n.json()).data;
|
|
4198
4198
|
}
|
|
@@ -4369,7 +4369,7 @@ var Bo = class {
|
|
|
4369
4369
|
if (this.pusher) return;
|
|
4370
4370
|
let e;
|
|
4371
4371
|
try {
|
|
4372
|
-
({default: e} = await import("./pusher-
|
|
4372
|
+
({default: e} = await import("./pusher-CHo5Cua0.js").then((e) => /* @__PURE__ */ t(e.t(), 1)));
|
|
4373
4373
|
} catch {
|
|
4374
4374
|
throw Error("Cloud features require the optional peer dependency 'pusher-js'. Install it with: npm install pusher-js");
|
|
4375
4375
|
}
|
|
@@ -4455,7 +4455,7 @@ function Vo(e, t) {
|
|
|
4455
4455
|
function Ho(e) {
|
|
4456
4456
|
let t = new Ro(e.authManager), n = S({
|
|
4457
4457
|
template: null,
|
|
4458
|
-
content:
|
|
4458
|
+
content: He(e.defaultFontFamily, e.templateDefaults),
|
|
4459
4459
|
selectedBlockId: null,
|
|
4460
4460
|
viewport: "desktop",
|
|
4461
4461
|
darkMode: !1,
|
|
@@ -4587,7 +4587,7 @@ function Ho(e) {
|
|
|
4587
4587
|
}
|
|
4588
4588
|
}
|
|
4589
4589
|
async function w() {
|
|
4590
|
-
if (!n.template?.id) throw new
|
|
4590
|
+
if (!n.template?.id) throw new bt("No template loaded. Call create() or load() before saving.");
|
|
4591
4591
|
n.isSaving = !0;
|
|
4592
4592
|
try {
|
|
4593
4593
|
let e = await t.updateTemplate(n.template.id, n.content);
|
|
@@ -5266,7 +5266,7 @@ function Yo(e) {
|
|
|
5266
5266
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5267
5267
|
function Xo(e) {
|
|
5268
5268
|
let { comments: t, channel: n } = e;
|
|
5269
|
-
|
|
5269
|
+
U(n, (e, n) => {
|
|
5270
5270
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5271
5271
|
Zo(t, e);
|
|
5272
5272
|
});
|
|
@@ -5378,9 +5378,9 @@ function ts(e) {
|
|
|
5378
5378
|
function v(e) {
|
|
5379
5379
|
r.value && r.value.trigger("client-block_unlocked", { blockId: e });
|
|
5380
5380
|
}
|
|
5381
|
-
return
|
|
5381
|
+
return U(() => n.state.selectedBlockId, (e, t) => {
|
|
5382
5382
|
s || (t && v(t), e && _(e));
|
|
5383
|
-
}),
|
|
5383
|
+
}), U(r, (t, n) => {
|
|
5384
5384
|
if (n && $o(n), !t) {
|
|
5385
5385
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5386
5386
|
return;
|
|
@@ -5593,7 +5593,7 @@ function as(e) {
|
|
|
5593
5593
|
//#region ../core/src/cloud/test-email.ts
|
|
5594
5594
|
function os(e) {
|
|
5595
5595
|
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new Ro(t), l = C(!1), u = C(null), d = C(null);
|
|
5596
|
-
o &&
|
|
5596
|
+
o && U(o, (e) => {
|
|
5597
5597
|
e && (d.value = t.testEmailConfig);
|
|
5598
5598
|
}, { immediate: !0 });
|
|
5599
5599
|
let f = k(() => d.value !== null), p = k(() => d.value?.allowedEmails ?? []);
|
|
@@ -5787,7 +5787,7 @@ async function ps(e = {}) {
|
|
|
5787
5787
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5788
5788
|
function ms(e) {
|
|
5789
5789
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5790
|
-
|
|
5790
|
+
U(n, (e, n) => {
|
|
5791
5791
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5792
5792
|
Vo(t, e), r?.(e);
|
|
5793
5793
|
});
|
|
@@ -5842,7 +5842,7 @@ var hs = {
|
|
|
5842
5842
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
5843
5843
|
"backdrop-filter": "blur(2px)"
|
|
5844
5844
|
}
|
|
5845
|
-
}, js = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ms = ["onClick"], Ns = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ps = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Fs = ["placeholder", "disabled"], Is = ["disabled"], Ls = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Rs = /* @__PURE__ */
|
|
5845
|
+
}, js = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ms = ["onClick"], Ns = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ps = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Fs = ["placeholder", "disabled"], Is = ["disabled"], Ls = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Rs = /* @__PURE__ */ V({
|
|
5846
5846
|
__name: "AiChatSidebar",
|
|
5847
5847
|
props: {
|
|
5848
5848
|
visible: { type: Boolean },
|
|
@@ -5850,15 +5850,15 @@ var hs = {
|
|
|
5850
5850
|
},
|
|
5851
5851
|
emits: ["close"],
|
|
5852
5852
|
setup(e, { emit: t }) {
|
|
5853
|
-
let n = e, r = t, i =
|
|
5853
|
+
let n = e, r = t, i = Y(ar, "AiChatSidebar"), a = Y(Mn, "AiChatSidebar"), o = Y(er, "AiChatSidebar"), s = v(Hn, []), l = sa(), u = Go({
|
|
5854
5854
|
authManager: o,
|
|
5855
5855
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
5856
5856
|
onApply: n.onApply,
|
|
5857
5857
|
onError: void 0
|
|
5858
|
-
}), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } =
|
|
5858
|
+
}), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } = tn(() => {
|
|
5859
5859
|
_.value < (u.suggestions.value?.length ?? 0) ? _.value++ : y();
|
|
5860
|
-
}, 150, { immediate: !1 }), { start: S } =
|
|
5861
|
-
|
|
5860
|
+
}, 150, { immediate: !1 }), { start: S } = nn(() => x(), 100, { immediate: !1 });
|
|
5861
|
+
U(() => u.suggestions.value?.length ?? 0, (e) => {
|
|
5862
5862
|
if (y(), e === 0) {
|
|
5863
5863
|
_.value = 0;
|
|
5864
5864
|
return;
|
|
@@ -5870,7 +5870,7 @@ var hs = {
|
|
|
5870
5870
|
p.value && (p.value.scrollTop = p.value.scrollHeight);
|
|
5871
5871
|
});
|
|
5872
5872
|
}
|
|
5873
|
-
|
|
5873
|
+
U(() => u.messages.value?.length ?? 0, () => w()), U(() => n.visible, async (e) => {
|
|
5874
5874
|
if (e && !g.value) {
|
|
5875
5875
|
if (g.value = !0, await u.loadConversation(), !l.alive) return;
|
|
5876
5876
|
(u.messages.value?.length ?? 0) === 0 && a.content.value.blocks.length === 0 && u.loadSuggestions(a.content.value, s);
|
|
@@ -5898,38 +5898,38 @@ var hs = {
|
|
|
5898
5898
|
"leave-to-class": "tpl:translate-x-full"
|
|
5899
5899
|
}, {
|
|
5900
5900
|
default: b(() => [e.visible ? (f(), A("div", hs, [
|
|
5901
|
-
|
|
5901
|
+
L("div", gs, [L("div", _s, [H(M(pi), {
|
|
5902
5902
|
size: 13,
|
|
5903
5903
|
"stroke-width": 2
|
|
5904
|
-
}),
|
|
5904
|
+
}), L("span", null, O(M(i).aiChat.title), 1)]), L("div", vs, [(M(u).messages.value?.length ?? 0) > 0 ? (f(), A("button", {
|
|
5905
5905
|
key: 0,
|
|
5906
5906
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5907
5907
|
title: M(i).aiChat.clear,
|
|
5908
5908
|
onClick: n[0] ||= (e) => M(u).clearChat()
|
|
5909
|
-
}, [
|
|
5909
|
+
}, [H(M(hi), {
|
|
5910
5910
|
size: 14,
|
|
5911
5911
|
"stroke-width": 2
|
|
5912
|
-
})], 8, ys)) : j("", !0),
|
|
5912
|
+
})], 8, ys)) : j("", !0), L("button", {
|
|
5913
5913
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5914
5914
|
onClick: n[1] ||= (e) => r("close")
|
|
5915
|
-
}, [
|
|
5915
|
+
}, [H(M(bi), {
|
|
5916
5916
|
size: 14,
|
|
5917
5917
|
"stroke-width": 2
|
|
5918
5918
|
})])])]),
|
|
5919
|
-
|
|
5920
|
-
|
|
5919
|
+
L("div", bs, [
|
|
5920
|
+
L("div", {
|
|
5921
5921
|
ref_key: "messagesContainer",
|
|
5922
5922
|
ref: p,
|
|
5923
5923
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
5924
|
-
}, [M(u).isLoadingHistory.value ? (f(), A("div", xs, [
|
|
5924
|
+
}, [M(u).isLoadingHistory.value ? (f(), A("div", xs, [H(M(ti), {
|
|
5925
5925
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
5926
5926
|
size: 24,
|
|
5927
5927
|
"stroke-width": 2
|
|
5928
|
-
}),
|
|
5928
|
+
}), L("p", Ss, O(M(i).aiChat.loadingHistory), 1)])) : (M(u).messages.value?.length ?? 0) === 0 ? (f(), A("div", Cs, [H(M(pi), {
|
|
5929
5929
|
size: 32,
|
|
5930
5930
|
"stroke-width": 1.5,
|
|
5931
5931
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
5932
|
-
}),
|
|
5932
|
+
}), L("p", ws, O(M(i).aiChat.placeholder), 1)])) : (f(), A("div", Ts, [(f(!0), A(z, null, h(M(u).messages.value, (e, t) => (f(), A("div", {
|
|
5933
5933
|
key: e.id,
|
|
5934
5934
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5935
5935
|
}, [e.role === "user" ? (f(), A("div", Es, O(e.content), 1)) : (f(), A("div", Ds, [!E(e.content) && M(u).isGenerating.value && t === (M(u).messages.value?.length ?? 0) - 1 ? (f(), P(ki, { key: 0 })) : (f(), A("div", Os, O(E(e.content) || M(i).aiChat.applied), 1)), e.id === M(u).lastApplyMessageId.value && !M(u).isGenerating.value ? (f(), A("button", {
|
|
@@ -5941,21 +5941,21 @@ var hs = {
|
|
|
5941
5941
|
"background-color": "transparent"
|
|
5942
5942
|
},
|
|
5943
5943
|
onClick: n[2] ||= (e) => M(u).toggleLastRevert()
|
|
5944
|
-
}, [M(u).isLastChangeReverted.value ? (f(), A(
|
|
5944
|
+
}, [M(u).isLastChangeReverted.value ? (f(), A(z, { key: 0 }, [H(M(oi), {
|
|
5945
5945
|
size: 12,
|
|
5946
5946
|
"stroke-width": 2
|
|
5947
|
-
}),
|
|
5947
|
+
}), B(" " + O(M(i).aiChat.reapply), 1)], 64)) : (f(), A(z, { key: 1 }, [H(M(_i), {
|
|
5948
5948
|
size: 12,
|
|
5949
5949
|
"stroke-width": 2
|
|
5950
|
-
}),
|
|
5951
|
-
M(u).error.value ? (f(), A("div", ks, [
|
|
5950
|
+
}), B(" " + O(M(i).aiChat.revert), 1)], 64))])) : j("", !0)]))]))), 128))]))], 512),
|
|
5951
|
+
M(u).error.value ? (f(), A("div", ks, [H(M(Vr), {
|
|
5952
5952
|
size: 14,
|
|
5953
5953
|
"stroke-width": 2,
|
|
5954
5954
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
5955
|
-
}),
|
|
5956
|
-
(M(u).suggestions.value?.length ?? 0) > 0 ? (f(), A("div", As, [
|
|
5955
|
+
}), L("span", null, O(M(u).error.value === "ai_apply_failed" ? M(i).aiChat.applyFailed : M(i).aiChat.error), 1)])) : j("", !0),
|
|
5956
|
+
(M(u).suggestions.value?.length ?? 0) > 0 ? (f(), A("div", As, [L("div", js, [(f(!0), A(z, null, h(M(u).suggestions.value ?? [], (e, t) => (f(), A("button", {
|
|
5957
5957
|
key: t,
|
|
5958
|
-
class:
|
|
5958
|
+
class: I(["tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", (M(u).suggestions.value?.length ?? 0) - 1 - t < _.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
5959
5959
|
style: {
|
|
5960
5960
|
"border-color": "var(--tpl-border)",
|
|
5961
5961
|
color: "var(--tpl-primary)",
|
|
@@ -5965,21 +5965,21 @@ var hs = {
|
|
|
5965
5965
|
onClick: (t) => D(e)
|
|
5966
5966
|
}, O(e), 11, Ms))), 128))])])) : j("", !0)
|
|
5967
5967
|
]),
|
|
5968
|
-
|
|
5968
|
+
L("div", Ns, [L("div", Ps, [c(L("textarea", {
|
|
5969
5969
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
5970
5970
|
class: "tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
5971
5971
|
placeholder: M(i).aiChat.inputPlaceholder,
|
|
5972
5972
|
disabled: M(u).isGenerating.value,
|
|
5973
5973
|
rows: "3",
|
|
5974
5974
|
onKeydown: ee
|
|
5975
|
-
}, null, 40, Fs), [[ie, d.value]]),
|
|
5975
|
+
}, null, 40, Fs), [[ie, d.value]]), L("button", {
|
|
5976
5976
|
class: "tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
5977
5977
|
disabled: !d.value.trim() || M(u).isGenerating.value,
|
|
5978
5978
|
onClick: T
|
|
5979
|
-
}, [
|
|
5979
|
+
}, [H(M(li), {
|
|
5980
5980
|
size: 16,
|
|
5981
5981
|
"stroke-width": 2
|
|
5982
|
-
})], 8, Is)]),
|
|
5982
|
+
})], 8, Is)]), L("p", Ls, O(M(i).aiMenu.disclaimer), 1)])
|
|
5983
5983
|
])) : j("", !0)]),
|
|
5984
5984
|
_: 1
|
|
5985
5985
|
}));
|
|
@@ -5989,7 +5989,7 @@ function Ws(e, t, n, r) {
|
|
|
5989
5989
|
let i = new Date(e).getTime();
|
|
5990
5990
|
if (Number.isNaN(i)) return null;
|
|
5991
5991
|
let a = Date.now() - i;
|
|
5992
|
-
if (a < -
|
|
5992
|
+
if (a < -6e4) return null;
|
|
5993
5993
|
let o = Math.floor(a / Vs), s = Math.floor(a / Hs), c = Math.floor(a / Us);
|
|
5994
5994
|
return o < 1 ? t.justNow : o < 60 ? n ? n(t.minutesAgo, { minutes: o }) : t.minutesAgo.replace("{minutes}", String(o)) : s < 24 ? n ? n(t.hoursAgo, { hours: s }) : t.hoursAgo.replace("{hours}", String(s)) : r !== void 0 && c >= r ? null : n ? n(t.daysAgo, { days: c }) : t.daysAgo.replace("{days}", String(c));
|
|
5995
5995
|
}
|
|
@@ -6055,12 +6055,12 @@ var Gs = {
|
|
|
6055
6055
|
}, Yc = {
|
|
6056
6056
|
key: 1,
|
|
6057
6057
|
class: "tpl-comments-input-wrapper tpl:flex tpl:min-h-[68px] tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]"
|
|
6058
|
-
}, Xc = ["placeholder", "disabled"], Zc = ["disabled"], Qc = /* @__PURE__ */
|
|
6058
|
+
}, Xc = ["placeholder", "disabled"], Zc = ["disabled"], Qc = /* @__PURE__ */ V({
|
|
6059
6059
|
__name: "CommentsSidebar",
|
|
6060
6060
|
props: { visible: { type: Boolean } },
|
|
6061
6061
|
emits: ["close", "filterBlock"],
|
|
6062
6062
|
setup(e, { expose: t, emit: n }) {
|
|
6063
|
-
let r = e, i = n, { format: a } =
|
|
6063
|
+
let r = e, i = n, { format: a } = cr(), { t: o } = Fi(), s = Y(Mn, "CommentsSidebar"), l = Y(er, "CommentsSidebar"), u = Y(nr, "CommentsSidebar"), d = C("unresolved"), p = C(null), g = C(""), _ = C(null), v = C(""), y = C(null), x = C(""), S = C(/* @__PURE__ */ new Set()), w = C(null), T = C(null), E = k(() => l.userConfig?.id ?? null), D = k(() => {
|
|
6064
6064
|
let e = /* @__PURE__ */ new Set();
|
|
6065
6065
|
for (let t of s.content.value.blocks) if (e.add(t.id), t.type === "section") for (let n of t.children) for (let t of n) e.add(t.id);
|
|
6066
6066
|
return e;
|
|
@@ -6072,9 +6072,9 @@ var Gs = {
|
|
|
6072
6072
|
let e = u.comments.value;
|
|
6073
6073
|
return d.value === "unresolved" ? e = e.filter((e) => !e.resolved_at) : d.value === "block" && p.value && (e = e.filter((e) => e.block_id === p.value)), e;
|
|
6074
6074
|
});
|
|
6075
|
-
|
|
6075
|
+
U(() => r.visible, (e) => {
|
|
6076
6076
|
e && u.loadComments();
|
|
6077
|
-
}),
|
|
6077
|
+
}), U(() => s.state.selectedBlockId, (e) => {
|
|
6078
6078
|
d.value === "block" && e && (p.value = e);
|
|
6079
6079
|
});
|
|
6080
6080
|
function N(e, t) {
|
|
@@ -6083,70 +6083,70 @@ var Gs = {
|
|
|
6083
6083
|
function F(e) {
|
|
6084
6084
|
N("block", e), i("filterBlock", e);
|
|
6085
6085
|
}
|
|
6086
|
-
function
|
|
6086
|
+
function ae(e) {
|
|
6087
6087
|
S.value.has(e) ? S.value.delete(e) : S.value.add(e);
|
|
6088
6088
|
}
|
|
6089
|
-
function
|
|
6089
|
+
function oe(e) {
|
|
6090
6090
|
_.value = e, v.value = "", y.value = null, S.value.has(e) || S.value.add(e);
|
|
6091
6091
|
}
|
|
6092
|
-
function
|
|
6092
|
+
function se() {
|
|
6093
6093
|
_.value = null, v.value = "";
|
|
6094
6094
|
}
|
|
6095
|
-
function
|
|
6095
|
+
function ce(e) {
|
|
6096
6096
|
y.value = e.id, x.value = e.body, _.value = null;
|
|
6097
6097
|
}
|
|
6098
|
-
function
|
|
6098
|
+
function V() {
|
|
6099
6099
|
y.value = null, x.value = "";
|
|
6100
6100
|
}
|
|
6101
|
-
function
|
|
6101
|
+
function le(e) {
|
|
6102
6102
|
w.value = e;
|
|
6103
6103
|
}
|
|
6104
|
-
function
|
|
6104
|
+
function ue() {
|
|
6105
6105
|
w.value = null;
|
|
6106
6106
|
}
|
|
6107
|
-
async function
|
|
6107
|
+
async function de() {
|
|
6108
6108
|
let e = g.value.trim();
|
|
6109
6109
|
e && (await u.addComment(e, (d.value === "block" ? p.value : void 0) ?? void 0), g.value = "");
|
|
6110
6110
|
}
|
|
6111
|
-
async function
|
|
6111
|
+
async function fe(e) {
|
|
6112
6112
|
let t = v.value.trim();
|
|
6113
6113
|
if (!t) return;
|
|
6114
6114
|
let n = u.comments.value.find((t) => t.id === e);
|
|
6115
6115
|
await u.addComment(t, n?.block_id ?? void 0, e), _.value = null, v.value = "";
|
|
6116
6116
|
}
|
|
6117
|
-
async function
|
|
6117
|
+
async function pe(e) {
|
|
6118
6118
|
let t = x.value.trim();
|
|
6119
6119
|
t && (await u.editComment(e, t), y.value = null, x.value = "");
|
|
6120
6120
|
}
|
|
6121
|
-
async function
|
|
6121
|
+
async function me(e) {
|
|
6122
6122
|
await u.removeComment(e), w.value = null;
|
|
6123
6123
|
}
|
|
6124
|
-
async function
|
|
6124
|
+
async function he(e) {
|
|
6125
6125
|
await u.toggleResolve(e);
|
|
6126
6126
|
}
|
|
6127
|
-
function
|
|
6127
|
+
function ge(e) {
|
|
6128
6128
|
return e.author_identifier === E.value;
|
|
6129
6129
|
}
|
|
6130
|
-
function
|
|
6130
|
+
function _e(e) {
|
|
6131
6131
|
return Ws(e, o.snapshotHistory) ?? e;
|
|
6132
6132
|
}
|
|
6133
|
-
function
|
|
6134
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
6133
|
+
function ve(e) {
|
|
6134
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), de());
|
|
6135
6135
|
}
|
|
6136
|
-
function
|
|
6137
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
6136
|
+
function ye(e, t) {
|
|
6137
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe(t));
|
|
6138
6138
|
}
|
|
6139
|
-
function
|
|
6140
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
6139
|
+
function be(e, t) {
|
|
6140
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), pe(t)), e.key === "Escape" && V();
|
|
6141
6141
|
}
|
|
6142
|
-
function
|
|
6142
|
+
function xe() {
|
|
6143
6143
|
m(() => {
|
|
6144
6144
|
T.value?.focus();
|
|
6145
6145
|
});
|
|
6146
6146
|
}
|
|
6147
6147
|
return t({
|
|
6148
6148
|
filterByBlock: F,
|
|
6149
|
-
focusNewComment:
|
|
6149
|
+
focusNewComment: xe
|
|
6150
6150
|
}), (t, n) => (f(), P(re, {
|
|
6151
6151
|
"enter-active-class": "tpl-comments-slide-enter-active",
|
|
6152
6152
|
"enter-from-class": "tpl:translate-x-full",
|
|
@@ -6156,87 +6156,87 @@ var Gs = {
|
|
|
6156
6156
|
"leave-to-class": "tpl:translate-x-full"
|
|
6157
6157
|
}, {
|
|
6158
6158
|
default: b(() => [e.visible ? (f(), A("div", Gs, [
|
|
6159
|
-
|
|
6160
|
-
|
|
6159
|
+
L("div", Ks, [L("div", qs, [
|
|
6160
|
+
H(M(ni), {
|
|
6161
6161
|
size: 13,
|
|
6162
6162
|
"stroke-width": 2
|
|
6163
6163
|
}),
|
|
6164
|
-
|
|
6164
|
+
L("span", null, O(M(o).comments.title), 1),
|
|
6165
6165
|
M(u).unresolvedCount.value > 0 ? (f(), A("span", Js, O(M(u).unresolvedCount.value), 1)) : j("", !0)
|
|
6166
|
-
]),
|
|
6166
|
+
]), L("button", {
|
|
6167
6167
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6168
6168
|
onClick: n[0] ||= (e) => i("close")
|
|
6169
|
-
}, [
|
|
6169
|
+
}, [H(M(bi), {
|
|
6170
6170
|
size: 14,
|
|
6171
6171
|
"stroke-width": 2
|
|
6172
6172
|
})])]),
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
class:
|
|
6173
|
+
L("div", Ys, [
|
|
6174
|
+
L("button", {
|
|
6175
|
+
class: I(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
|
|
6176
6176
|
onClick: n[1] ||= (e) => N("unresolved")
|
|
6177
6177
|
}, O(M(o).comments.filterUnresolved), 3),
|
|
6178
|
-
|
|
6179
|
-
class:
|
|
6178
|
+
L("button", {
|
|
6179
|
+
class: I(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "all" ? "tpl-comment-filter--active" : ""]),
|
|
6180
6180
|
onClick: n[2] ||= (e) => N("all")
|
|
6181
6181
|
}, O(M(o).comments.filterAll), 3),
|
|
6182
6182
|
M(s).state.selectedBlockId ? (f(), A("button", {
|
|
6183
6183
|
key: 0,
|
|
6184
|
-
class:
|
|
6184
|
+
class: I(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "block" ? "tpl-comment-filter--active" : ""]),
|
|
6185
6185
|
onClick: n[3] ||= (e) => N("block", M(s).state.selectedBlockId ?? void 0)
|
|
6186
6186
|
}, O(M(o).comments.filterBlock), 3)) : j("", !0)
|
|
6187
6187
|
]),
|
|
6188
|
-
|
|
6188
|
+
L("div", Xs, [M(u).isLoading.value ? (f(), A("div", Zs, [H(M(ti), {
|
|
6189
6189
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6190
6190
|
size: 24,
|
|
6191
6191
|
"stroke-width": 2
|
|
6192
|
-
})])) : ne.value.length === 0 ? (f(), A("div", Qs, [
|
|
6192
|
+
})])) : ne.value.length === 0 ? (f(), A("div", Qs, [H(M(ni), {
|
|
6193
6193
|
size: 32,
|
|
6194
6194
|
"stroke-width": 1.5,
|
|
6195
6195
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6196
|
-
}),
|
|
6196
|
+
}), L("p", $s, O(d.value === "all" ? M(o).comments.noCommentsHint : M(o).comments.noComments), 1)])) : (f(), A("div", ec, [(f(!0), A(z, null, h(ne.value, (e) => (f(), A("div", {
|
|
6197
6197
|
key: e.id,
|
|
6198
6198
|
class: "tpl-comment-thread"
|
|
6199
6199
|
}, [
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6200
|
+
L("div", tc, [
|
|
6201
|
+
L("div", nc, [L("div", rc, [
|
|
6202
|
+
L("span", ic, O(ge(e) ? M(o).comments.ownedByYou : e.author_name), 1),
|
|
6203
|
+
L("span", ac, O(_e(e.created_at)), 1),
|
|
6204
6204
|
e.updated_at === e.created_at ? j("", !0) : (f(), A("span", oc, " (" + O(M(o).comments.edited) + ") ", 1))
|
|
6205
|
-
]),
|
|
6206
|
-
|
|
6205
|
+
]), L("div", sc, [
|
|
6206
|
+
L("button", {
|
|
6207
6207
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6208
6208
|
title: e.resolved_at ? M(o).comments.unresolve : M(o).comments.resolve,
|
|
6209
|
-
onClick: (t) =>
|
|
6210
|
-
}, [
|
|
6209
|
+
onClick: (t) => he(e.id)
|
|
6210
|
+
}, [H(M(Hr), {
|
|
6211
6211
|
size: 13,
|
|
6212
6212
|
"stroke-width": 2,
|
|
6213
6213
|
class: "tpl-resolve-icon",
|
|
6214
|
-
style:
|
|
6214
|
+
style: R({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6215
6215
|
}, null, 8, ["style"])], 8, cc),
|
|
6216
|
-
|
|
6216
|
+
ge(e) ? (f(), A("button", {
|
|
6217
6217
|
key: 0,
|
|
6218
6218
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6219
6219
|
title: M(o).comments.edit,
|
|
6220
|
-
onClick: (t) =>
|
|
6221
|
-
}, [
|
|
6220
|
+
onClick: (t) => ce(e)
|
|
6221
|
+
}, [H(M(ii), {
|
|
6222
6222
|
size: 12,
|
|
6223
6223
|
"stroke-width": 2
|
|
6224
6224
|
})], 8, lc)) : j("", !0),
|
|
6225
|
-
|
|
6225
|
+
ge(e) ? (f(), A("button", {
|
|
6226
6226
|
key: 1,
|
|
6227
6227
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6228
6228
|
title: M(o).comments.delete,
|
|
6229
|
-
onClick: (t) =>
|
|
6230
|
-
}, [
|
|
6229
|
+
onClick: (t) => le(e.id)
|
|
6230
|
+
}, [H(M(hi), {
|
|
6231
6231
|
size: 12,
|
|
6232
6232
|
"stroke-width": 2
|
|
6233
6233
|
})], 8, uc)) : j("", !0)
|
|
6234
6234
|
])]),
|
|
6235
|
-
|
|
6236
|
-
default: b(() => [e.resolved_at ? (f(), A("div", dc, [
|
|
6235
|
+
H(re, { name: "tpl-resolve" }, {
|
|
6236
|
+
default: b(() => [e.resolved_at ? (f(), A("div", dc, [H(M(Ir), {
|
|
6237
6237
|
size: 10,
|
|
6238
6238
|
"stroke-width": 2.5
|
|
6239
|
-
}),
|
|
6239
|
+
}), L("span", null, O(M(a)(M(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : j("", !0)]),
|
|
6240
6240
|
_: 2
|
|
6241
6241
|
}, 1024),
|
|
6242
6242
|
e.block_id && ee(e.block_id) ? (f(), A("span", fc, O(M(o).comments.missingBlock), 1)) : e.block_id ? (f(), A("button", {
|
|
@@ -6244,42 +6244,42 @@ var Gs = {
|
|
|
6244
6244
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6245
6245
|
onClick: (t) => M(s).selectBlock(e.block_id ?? "")
|
|
6246
6246
|
}, " Block ", 8, pc)) : j("", !0),
|
|
6247
|
-
y.value === e.id ? (f(), A("div", mc, [c(
|
|
6247
|
+
y.value === e.id ? (f(), A("div", mc, [c(L("textarea", {
|
|
6248
6248
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6249
6249
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6250
6250
|
rows: "3",
|
|
6251
|
-
onKeydown: (t) =>
|
|
6252
|
-
}, null, 40, hc), [[ie, x.value]]),
|
|
6251
|
+
onKeydown: (t) => be(t, e.id)
|
|
6252
|
+
}, null, 40, hc), [[ie, x.value]]), L("div", gc, [L("button", {
|
|
6253
6253
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6254
6254
|
disabled: !x.value.trim() || M(u).isSubmitting.value,
|
|
6255
|
-
onClick: (t) =>
|
|
6256
|
-
}, O(M(o).comments.save), 9, _c),
|
|
6255
|
+
onClick: (t) => pe(e.id)
|
|
6256
|
+
}, O(M(o).comments.save), 9, _c), L("button", {
|
|
6257
6257
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6258
|
-
onClick: n[5] ||= (e) =>
|
|
6258
|
+
onClick: n[5] ||= (e) => V()
|
|
6259
6259
|
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p", vc, O(e.body), 1)),
|
|
6260
6260
|
w.value === e.id ? (f(), A("div", yc, [
|
|
6261
|
-
|
|
6262
|
-
|
|
6261
|
+
L("span", bc, O(M(o).comments.deleteConfirm), 1),
|
|
6262
|
+
L("button", {
|
|
6263
6263
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6264
|
-
onClick: (t) =>
|
|
6264
|
+
onClick: (t) => me(e.id)
|
|
6265
6265
|
}, O(M(o).comments.delete), 9, xc),
|
|
6266
|
-
|
|
6266
|
+
L("button", {
|
|
6267
6267
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6268
|
-
onClick: n[6] ||= (e) =>
|
|
6268
|
+
onClick: n[6] ||= (e) => ue()
|
|
6269
6269
|
}, O(M(o).comments.cancel), 1)
|
|
6270
6270
|
])) : j("", !0),
|
|
6271
|
-
y.value !== e.id && w.value !== e.id ? (f(), A("div", Sc, [
|
|
6271
|
+
y.value !== e.id && w.value !== e.id ? (f(), A("div", Sc, [L("button", {
|
|
6272
6272
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6273
6273
|
title: M(o).comments.reply,
|
|
6274
|
-
onClick: (t) =>
|
|
6275
|
-
}, [
|
|
6274
|
+
onClick: (t) => oe(e.id)
|
|
6275
|
+
}, [H(M(ci), {
|
|
6276
6276
|
size: 13,
|
|
6277
6277
|
"stroke-width": 2,
|
|
6278
6278
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6279
6279
|
})], 8, Cc), (e.replies?.length ?? 0) > 0 ? (f(), A("button", {
|
|
6280
6280
|
key: 0,
|
|
6281
6281
|
class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-[11px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6282
|
-
onClick: (t) =>
|
|
6282
|
+
onClick: (t) => ae(e.id)
|
|
6283
6283
|
}, [S.value.has(e.id) ? (f(), P(M(Br), {
|
|
6284
6284
|
key: 0,
|
|
6285
6285
|
size: 11,
|
|
@@ -6288,86 +6288,86 @@ var Gs = {
|
|
|
6288
6288
|
key: 1,
|
|
6289
6289
|
size: 11,
|
|
6290
6290
|
"stroke-width": 2
|
|
6291
|
-
})),
|
|
6291
|
+
})), B(" " + O((e.replies?.length ?? 0) === 1 ? M(a)(M(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : M(a)(M(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, wc)) : j("", !0)])) : j("", !0)
|
|
6292
6292
|
]),
|
|
6293
|
-
|
|
6294
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), A("div", Tc, [(f(!0), A(
|
|
6293
|
+
H(re, { name: "tpl-replies" }, {
|
|
6294
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), A("div", Tc, [(f(!0), A(z, null, h(e.replies, (t, r) => (f(), A("div", {
|
|
6295
6295
|
key: t.id,
|
|
6296
|
-
class:
|
|
6296
|
+
class: I(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", r < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
|
|
6297
6297
|
}, [
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6298
|
+
L("div", Ec, [L("div", Dc, [
|
|
6299
|
+
L("span", Oc, O(ge(t) ? M(o).comments.ownedByYou : t.author_name), 1),
|
|
6300
|
+
L("span", kc, O(_e(t.created_at)), 1),
|
|
6301
6301
|
t.updated_at === t.created_at ? j("", !0) : (f(), A("span", Ac, " (" + O(M(o).comments.edited) + ") ", 1))
|
|
6302
|
-
]),
|
|
6302
|
+
]), L("div", jc, [ge(t) ? (f(), A("button", {
|
|
6303
6303
|
key: 0,
|
|
6304
6304
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6305
6305
|
title: M(o).comments.edit,
|
|
6306
|
-
onClick: (e) =>
|
|
6307
|
-
}, [
|
|
6306
|
+
onClick: (e) => ce(t)
|
|
6307
|
+
}, [H(M(ii), {
|
|
6308
6308
|
size: 11,
|
|
6309
6309
|
"stroke-width": 2
|
|
6310
|
-
})], 8, Mc)) : j("", !0),
|
|
6310
|
+
})], 8, Mc)) : j("", !0), ge(t) ? (f(), A("button", {
|
|
6311
6311
|
key: 1,
|
|
6312
6312
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6313
6313
|
title: M(o).comments.delete,
|
|
6314
|
-
onClick: (e) =>
|
|
6315
|
-
}, [
|
|
6314
|
+
onClick: (e) => le(t.id)
|
|
6315
|
+
}, [H(M(hi), {
|
|
6316
6316
|
size: 11,
|
|
6317
6317
|
"stroke-width": 2
|
|
6318
6318
|
})], 8, Nc)) : j("", !0)])]),
|
|
6319
|
-
y.value === t.id ? (f(), A("div", Pc, [c(
|
|
6319
|
+
y.value === t.id ? (f(), A("div", Pc, [c(L("textarea", {
|
|
6320
6320
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6321
6321
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6322
6322
|
rows: "2",
|
|
6323
|
-
onKeydown: (e) =>
|
|
6324
|
-
}, null, 40, Fc), [[ie, x.value]]),
|
|
6323
|
+
onKeydown: (e) => be(e, t.id)
|
|
6324
|
+
}, null, 40, Fc), [[ie, x.value]]), L("div", Ic, [L("button", {
|
|
6325
6325
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6326
6326
|
disabled: !x.value.trim() || M(u).isSubmitting.value,
|
|
6327
|
-
onClick: (e) =>
|
|
6328
|
-
}, O(M(o).comments.save), 9, Lc),
|
|
6327
|
+
onClick: (e) => pe(t.id)
|
|
6328
|
+
}, O(M(o).comments.save), 9, Lc), L("button", {
|
|
6329
6329
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6330
|
-
onClick: n[8] ||= (e) =>
|
|
6330
|
+
onClick: n[8] ||= (e) => V()
|
|
6331
6331
|
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p", Rc, O(t.body), 1)),
|
|
6332
6332
|
w.value === t.id ? (f(), A("div", zc, [
|
|
6333
|
-
|
|
6334
|
-
|
|
6333
|
+
L("span", Bc, O(M(o).comments.deleteConfirm), 1),
|
|
6334
|
+
L("button", {
|
|
6335
6335
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6336
|
-
onClick: (e) =>
|
|
6336
|
+
onClick: (e) => me(t.id)
|
|
6337
6337
|
}, O(M(o).comments.delete), 9, Vc),
|
|
6338
|
-
|
|
6338
|
+
L("button", {
|
|
6339
6339
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6340
|
-
onClick: n[9] ||= (e) =>
|
|
6340
|
+
onClick: n[9] ||= (e) => ue()
|
|
6341
6341
|
}, O(M(o).comments.cancel), 1)
|
|
6342
6342
|
])) : j("", !0)
|
|
6343
6343
|
], 2))), 128))])) : j("", !0)]),
|
|
6344
6344
|
_: 2
|
|
6345
6345
|
}, 1024),
|
|
6346
|
-
|
|
6347
|
-
default: b(() => [_.value === e.id ? (f(), A("div", Hc, [
|
|
6346
|
+
H(re, { name: "tpl-replies" }, {
|
|
6347
|
+
default: b(() => [_.value === e.id ? (f(), A("div", Hc, [L("div", Uc, [c(L("textarea", {
|
|
6348
6348
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6349
6349
|
class: "tpl:flex-1 tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6350
6350
|
placeholder: M(o).comments.replyPlaceholder,
|
|
6351
6351
|
rows: "2",
|
|
6352
|
-
onKeydown: (t) =>
|
|
6353
|
-
}, null, 40, Wc), [[ie, v.value]]),
|
|
6352
|
+
onKeydown: (t) => ye(t, e.id)
|
|
6353
|
+
}, null, 40, Wc), [[ie, v.value]]), L("div", Gc, [L("button", {
|
|
6354
6354
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6355
6355
|
disabled: !v.value.trim() || M(u).isSubmitting.value,
|
|
6356
|
-
onClick: (t) =>
|
|
6357
|
-
}, [
|
|
6356
|
+
onClick: (t) => fe(e.id)
|
|
6357
|
+
}, [H(M(li), {
|
|
6358
6358
|
size: 14,
|
|
6359
6359
|
"stroke-width": 2
|
|
6360
|
-
})], 8, Kc),
|
|
6360
|
+
})], 8, Kc), L("button", {
|
|
6361
6361
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6362
|
-
onClick: n[11] ||= (e) =>
|
|
6363
|
-
}, [
|
|
6362
|
+
onClick: n[11] ||= (e) => se()
|
|
6363
|
+
}, [H(M(bi), {
|
|
6364
6364
|
size: 14,
|
|
6365
6365
|
"stroke-width": 2
|
|
6366
6366
|
})])])])])) : j("", !0)]),
|
|
6367
6367
|
_: 2
|
|
6368
6368
|
}, 1024)
|
|
6369
6369
|
]))), 128))]))]),
|
|
6370
|
-
|
|
6370
|
+
L("div", qc, [te.value ? (f(), A("div", Jc, O(M(o).comments.saveTemplateFirst), 1)) : (f(), A("div", Yc, [c(L("textarea", {
|
|
6371
6371
|
ref_key: "newCommentInput",
|
|
6372
6372
|
ref: T,
|
|
6373
6373
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6375,11 +6375,11 @@ var Gs = {
|
|
|
6375
6375
|
placeholder: M(o).comments.placeholder,
|
|
6376
6376
|
disabled: M(u).isSubmitting.value,
|
|
6377
6377
|
rows: "2",
|
|
6378
|
-
onKeydown:
|
|
6379
|
-
}, null, 40, Xc), [[ie, g.value]]),
|
|
6378
|
+
onKeydown: ve
|
|
6379
|
+
}, null, 40, Xc), [[ie, g.value]]), L("button", {
|
|
6380
6380
|
class: "tpl-comments-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6381
6381
|
disabled: !g.value.trim() || M(u).isSubmitting.value,
|
|
6382
|
-
onClick:
|
|
6382
|
+
onClick: de
|
|
6383
6383
|
}, [M(u).isSubmitting.value ? (f(), P(M(ti), {
|
|
6384
6384
|
key: 0,
|
|
6385
6385
|
class: "tpl-spinner",
|
|
@@ -6415,7 +6415,7 @@ var Gs = {
|
|
|
6415
6415
|
}, Sl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Cl = { class: "tpl:flex tpl:gap-2" }, wl = {
|
|
6416
6416
|
key: 1,
|
|
6417
6417
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6418
|
-
}, Tl = ["disabled"], El = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Dl = /* @__PURE__ */
|
|
6418
|
+
}, Tl = ["disabled"], El = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Dl = /* @__PURE__ */ V({
|
|
6419
6419
|
__name: "DesignReferenceSidebar",
|
|
6420
6420
|
props: {
|
|
6421
6421
|
visible: { type: Boolean },
|
|
@@ -6423,8 +6423,8 @@ var Gs = {
|
|
|
6423
6423
|
},
|
|
6424
6424
|
emits: ["close", "apply"],
|
|
6425
6425
|
setup(e, { emit: t }) {
|
|
6426
|
-
let n = e, r = t, { t: i } = Fi(), a =
|
|
6427
|
-
authManager:
|
|
6426
|
+
let n = e, r = t, { t: i } = Fi(), a = Y(Mn, "DesignReferenceSidebar"), o = Jo({
|
|
6427
|
+
authManager: Y(er, "DesignReferenceSidebar"),
|
|
6428
6428
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6429
6429
|
onApply: (e) => r("apply", e)
|
|
6430
6430
|
}), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = k(() => o.isGenerating.value ? !1 : u.value !== null);
|
|
@@ -6483,7 +6483,7 @@ var Gs = {
|
|
|
6483
6483
|
function D() {
|
|
6484
6484
|
m.value = !1;
|
|
6485
6485
|
}
|
|
6486
|
-
return
|
|
6486
|
+
return U(() => n.visible, (e) => {
|
|
6487
6487
|
e || (m.value = !1);
|
|
6488
6488
|
}), ne(() => {
|
|
6489
6489
|
p.value &&= (URL.revokeObjectURL(p.value), null);
|
|
@@ -6495,58 +6495,58 @@ var Gs = {
|
|
|
6495
6495
|
"leave-from-class": "tpl:translate-x-0",
|
|
6496
6496
|
"leave-to-class": "tpl:translate-x-full"
|
|
6497
6497
|
}, {
|
|
6498
|
-
default: b(() => [e.visible ? (f(), A("div", tl, [
|
|
6498
|
+
default: b(() => [e.visible ? (f(), A("div", tl, [L("div", nl, [L("div", rl, [H(M(Qr), {
|
|
6499
6499
|
size: 13,
|
|
6500
6500
|
"stroke-width": 2
|
|
6501
|
-
}),
|
|
6501
|
+
}), L("span", null, O(M(i).designReference.title), 1)]), L("button", {
|
|
6502
6502
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6503
6503
|
onClick: n[0] ||= (e) => r("close")
|
|
6504
|
-
}, [
|
|
6504
|
+
}, [H(M(bi), {
|
|
6505
6505
|
size: 14,
|
|
6506
6506
|
"stroke-width": 2
|
|
6507
|
-
})])]),
|
|
6508
|
-
|
|
6507
|
+
})])]), L("div", il, [M(o).isGenerating.value ? (f(), A("div", al, [L("div", ol, [H(ki), L("p", sl, O(M(i).designReference.generating), 1)])])) : (f(), A("div", cl, [
|
|
6508
|
+
L("div", ll, [L("button", {
|
|
6509
6509
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6510
|
-
style:
|
|
6510
|
+
style: R({
|
|
6511
6511
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
6512
6512
|
color: l.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
6513
6513
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6514
6514
|
}),
|
|
6515
6515
|
onClick: n[1] ||= (e) => _("image")
|
|
6516
|
-
}, [
|
|
6516
|
+
}, [H(M(Jr), {
|
|
6517
6517
|
size: 12,
|
|
6518
6518
|
"stroke-width": 2
|
|
6519
|
-
}),
|
|
6519
|
+
}), B(" " + O(M(i).designReference.uploadImage), 1)], 4), L("button", {
|
|
6520
6520
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6521
|
-
style:
|
|
6521
|
+
style: R({
|
|
6522
6522
|
backgroundColor: l.value === "pdf" ? "var(--tpl-bg)" : "transparent",
|
|
6523
6523
|
color: l.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
6524
6524
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6525
6525
|
}),
|
|
6526
6526
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6527
|
-
}, [
|
|
6527
|
+
}, [H(M(Yr), {
|
|
6528
6528
|
size: 12,
|
|
6529
6529
|
"stroke-width": 2
|
|
6530
|
-
}),
|
|
6531
|
-
|
|
6530
|
+
}), B(" " + O(M(i).designReference.uploadPdf), 1)], 4)]),
|
|
6531
|
+
L("div", null, [u.value ? (f(), A("div", ul, [L("div", dl, [p.value ? (f(), A("img", {
|
|
6532
6532
|
key: 0,
|
|
6533
6533
|
src: p.value,
|
|
6534
6534
|
alt: u.value.name,
|
|
6535
6535
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6536
|
-
}, null, 8, fl)) : (f(), A("div", pl, [
|
|
6536
|
+
}, null, 8, fl)) : (f(), A("div", pl, [H(M(Yr), {
|
|
6537
6537
|
size: 32,
|
|
6538
6538
|
"stroke-width": 1.5,
|
|
6539
6539
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6540
|
-
}),
|
|
6540
|
+
}), L("span", ml, O(u.value.name), 1)])), L("button", {
|
|
6541
6541
|
class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
|
|
6542
6542
|
onClick: x
|
|
6543
|
-
}, [
|
|
6543
|
+
}, [H(M(bi), {
|
|
6544
6544
|
size: 12,
|
|
6545
6545
|
"stroke-width": 2
|
|
6546
6546
|
})])])])) : (f(), A("div", {
|
|
6547
6547
|
key: 1,
|
|
6548
6548
|
class: "tpl-design-dropzone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border-2 tpl:border-dashed tpl:px-4 tpl:py-8 tpl:transition-colors tpl:duration-150",
|
|
6549
|
-
style:
|
|
6549
|
+
style: R({
|
|
6550
6550
|
borderColor: h.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
|
|
6551
6551
|
backgroundColor: h.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
|
|
6552
6552
|
}),
|
|
@@ -6555,14 +6555,14 @@ var Gs = {
|
|
|
6555
6555
|
onDragleave: w,
|
|
6556
6556
|
onDrop: T
|
|
6557
6557
|
}, [
|
|
6558
|
-
|
|
6558
|
+
H(M(vi), {
|
|
6559
6559
|
size: 24,
|
|
6560
6560
|
"stroke-width": 1.5,
|
|
6561
6561
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6562
6562
|
}),
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
], 36)),
|
|
6563
|
+
L("span", hl, O(M(i).designReference.dropHint), 1),
|
|
6564
|
+
L("span", gl, O(l.value === "image" ? M(i).designReference.acceptedImages : M(i).designReference.acceptedPdf), 1)
|
|
6565
|
+
], 36)), L("input", {
|
|
6566
6566
|
ref_key: "fileInput",
|
|
6567
6567
|
ref: s,
|
|
6568
6568
|
type: "file",
|
|
@@ -6570,35 +6570,35 @@ var Gs = {
|
|
|
6570
6570
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6571
6571
|
onChange: v
|
|
6572
6572
|
}, null, 40, _l)]),
|
|
6573
|
-
|
|
6573
|
+
L("div", vl, [L("label", yl, O(M(i).designReference.promptLabel), 1), c(L("textarea", {
|
|
6574
6574
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6575
|
-
class:
|
|
6575
|
+
class: I(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
|
|
6576
6576
|
placeholder: M(i).designReference.promptPlaceholder,
|
|
6577
6577
|
rows: "3"
|
|
6578
6578
|
}, null, 8, bl), [[ie, d.value]])]),
|
|
6579
|
-
m.value ? (f(), A("div", xl, [
|
|
6579
|
+
m.value ? (f(), A("div", xl, [L("p", Sl, O(M(i).designReference.replaceWarning), 1), L("div", Cl, [L("button", {
|
|
6580
6580
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
6581
6581
|
style: { "background-color": "transparent" },
|
|
6582
6582
|
onClick: D
|
|
6583
|
-
}, O(M(i).designReference.replaceCancel), 1),
|
|
6583
|
+
}, O(M(i).designReference.replaceCancel), 1), L("button", {
|
|
6584
6584
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6585
6585
|
onClick: E
|
|
6586
6586
|
}, O(M(i).designReference.replaceConfirm), 1)])])) : j("", !0),
|
|
6587
|
-
M(o).error.value ? (f(), A("div", wl, [
|
|
6587
|
+
M(o).error.value ? (f(), A("div", wl, [H(M(Vr), {
|
|
6588
6588
|
size: 14,
|
|
6589
6589
|
"stroke-width": 2,
|
|
6590
6590
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6591
|
-
}),
|
|
6591
|
+
}), L("span", null, O(M(i).designReference.error), 1)])) : j("", !0),
|
|
6592
6592
|
m.value ? j("", !0) : (f(), A("button", {
|
|
6593
6593
|
key: 2,
|
|
6594
6594
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6595
6595
|
disabled: !g.value,
|
|
6596
6596
|
onClick: E
|
|
6597
|
-
}, [
|
|
6597
|
+
}, [H(M(Qr), {
|
|
6598
6598
|
size: 16,
|
|
6599
6599
|
"stroke-width": 2
|
|
6600
|
-
}),
|
|
6601
|
-
|
|
6600
|
+
}), B(" " + O(M(i).designReference.generate), 1)], 8, Tl)),
|
|
6601
|
+
L("p", El, O(M(i).aiMenu.disclaimer), 1)
|
|
6602
6602
|
]))])])) : j("", !0)]),
|
|
6603
6603
|
_: 1
|
|
6604
6604
|
}));
|
|
@@ -6607,25 +6607,25 @@ var Gs = {
|
|
|
6607
6607
|
//#endregion
|
|
6608
6608
|
//#region src/composables/usePopoverRoot.ts
|
|
6609
6609
|
function Al() {
|
|
6610
|
-
return v(
|
|
6610
|
+
return v($n, C(null));
|
|
6611
6611
|
}
|
|
6612
6612
|
//#endregion
|
|
6613
6613
|
//#region src/cloud/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
6614
|
-
var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */
|
|
6614
|
+
var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ V({
|
|
6615
6615
|
__name: "TplModal",
|
|
6616
6616
|
props: { visible: { type: Boolean } },
|
|
6617
6617
|
emits: ["close", "keydown"],
|
|
6618
6618
|
setup(e, { emit: t }) {
|
|
6619
6619
|
let n = e, r = t, i = C(null);
|
|
6620
6620
|
Mi(i, k(() => n.visible));
|
|
6621
|
-
let a = v(
|
|
6621
|
+
let a = v(Rn), s = Al();
|
|
6622
6622
|
function c(e) {
|
|
6623
6623
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
6624
6624
|
}
|
|
6625
6625
|
return (t, n) => M(s) ? (f(), P(ee, {
|
|
6626
6626
|
key: 0,
|
|
6627
6627
|
to: M(s)
|
|
6628
|
-
}, [
|
|
6628
|
+
}, [H(re, {
|
|
6629
6629
|
"enter-active-class": "tpl:transition tpl:duration-150",
|
|
6630
6630
|
"enter-from-class": "tpl:opacity-0",
|
|
6631
6631
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -6644,7 +6644,7 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
|
6644
6644
|
},
|
|
6645
6645
|
onClick: n[0] ||= N((e) => r("close"), ["self"]),
|
|
6646
6646
|
onKeydown: c
|
|
6647
|
-
}, [
|
|
6647
|
+
}, [L("div", {
|
|
6648
6648
|
ref_key: "dialogRef",
|
|
6649
6649
|
ref: i
|
|
6650
6650
|
}, [o(t.$slots, "default")], 512)], 40, jl)) : j("", !0)]),
|
|
@@ -6670,7 +6670,7 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
|
6670
6670
|
}, Bl = ["disabled", "onClick"], Vl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Hl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ul = {
|
|
6671
6671
|
key: 0,
|
|
6672
6672
|
class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-[10px] tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
|
|
6673
|
-
}, Wl = ["disabled", "title"], Gl = /* @__PURE__ */
|
|
6673
|
+
}, Wl = ["disabled", "title"], Gl = /* @__PURE__ */ V({
|
|
6674
6674
|
__name: "SnapshotHistory",
|
|
6675
6675
|
props: {
|
|
6676
6676
|
snapshots: {},
|
|
@@ -6679,8 +6679,8 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
|
6679
6679
|
},
|
|
6680
6680
|
emits: ["load", "navigate"],
|
|
6681
6681
|
setup(e, { emit: t }) {
|
|
6682
|
-
let n = e, r = t, { format: i } =
|
|
6683
|
-
|
|
6682
|
+
let n = e, r = t, { format: i } = cr(), { t: a } = Fi(), o = C(!1), s = C(null), c = C(-1);
|
|
6683
|
+
U(() => n.snapshots.length, () => {
|
|
6684
6684
|
c.value = -1;
|
|
6685
6685
|
});
|
|
6686
6686
|
let l = k(() => c.value > 0 && n.snapshots.length > 0 && !n.isRestoring), u = k(() => c.value < n.snapshots.length - 1 && n.snapshots.length > 0 && !n.isRestoring);
|
|
@@ -6706,54 +6706,54 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
|
6706
6706
|
minute: "2-digit"
|
|
6707
6707
|
}) : t;
|
|
6708
6708
|
}
|
|
6709
|
-
return
|
|
6709
|
+
return dn(s, () => {
|
|
6710
6710
|
o.value = !1;
|
|
6711
6711
|
}), (t, n) => (f(), A("div", {
|
|
6712
6712
|
ref_key: "dropdownRef",
|
|
6713
6713
|
ref: s,
|
|
6714
6714
|
class: "tpl:relative tpl:flex tpl:items-center tpl:gap-0.5"
|
|
6715
6715
|
}, [
|
|
6716
|
-
|
|
6716
|
+
L("button", {
|
|
6717
6717
|
class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] disabled:tpl:cursor-not-allowed disabled:tpl:opacity-30 disabled:hover:tpl:bg-transparent tpl:text-[var(--tpl-text-muted)]",
|
|
6718
6718
|
disabled: !u.value,
|
|
6719
6719
|
title: M(a).snapshotHistory.olderSnapshot,
|
|
6720
6720
|
onClick: N(p, ["stop"])
|
|
6721
|
-
}, [
|
|
6721
|
+
}, [H(M(Rr), {
|
|
6722
6722
|
size: 14,
|
|
6723
6723
|
"stroke-width": 2
|
|
6724
6724
|
})], 8, Nl),
|
|
6725
|
-
|
|
6725
|
+
L("button", {
|
|
6726
6726
|
class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6727
6727
|
title: M(a).snapshotHistory.tooltip,
|
|
6728
6728
|
onClick: N(m, ["stop"])
|
|
6729
|
-
}, [
|
|
6729
|
+
}, [H(M(Ur), {
|
|
6730
6730
|
size: 16,
|
|
6731
6731
|
"stroke-width": 1.5
|
|
6732
|
-
}),
|
|
6733
|
-
class:
|
|
6732
|
+
}), H(M(Lr), {
|
|
6733
|
+
class: I(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6734
6734
|
size: 10,
|
|
6735
6735
|
"stroke-width": 2
|
|
6736
6736
|
}, null, 8, ["class"])], 8, Pl),
|
|
6737
|
-
|
|
6738
|
-
default: b(() => [o.value ? (f(), A("div", Fl, [
|
|
6737
|
+
H(re, { name: "tpl-dropdown" }, {
|
|
6738
|
+
default: b(() => [o.value ? (f(), A("div", Fl, [L("div", Il, O(M(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), A("div", Ll, [H(M(ti), {
|
|
6739
6739
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6740
6740
|
size: 20,
|
|
6741
6741
|
"stroke-width": 2
|
|
6742
|
-
})])) : e.snapshots.length === 0 ? (f(), A("div", Rl, O(M(a).snapshotHistory.noSnapshots), 1)) : (f(), A("div", zl, [(f(!0), A(
|
|
6742
|
+
})])) : e.snapshots.length === 0 ? (f(), A("div", Rl, O(M(a).snapshotHistory.noSnapshots), 1)) : (f(), A("div", zl, [(f(!0), A(z, null, h(e.snapshots, (t) => (f(), A("button", {
|
|
6743
6743
|
key: t.id,
|
|
6744
6744
|
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-b tpl:border-b-[var(--tpl-border-light)] tpl:border-l-2 tpl:border-l-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:duration-150 last:tpl:border-b-0 hover:tpl:border-l-[var(--tpl-primary)] hover:tpl:bg-[var(--tpl-bg-hover)]",
|
|
6745
6745
|
style: { "background-color": "transparent" },
|
|
6746
6746
|
disabled: e.isRestoring,
|
|
6747
6747
|
onClick: (e) => g(t.id)
|
|
6748
|
-
}, [
|
|
6748
|
+
}, [L("div", Vl, [L("div", Hl, [L("span", null, O(_(t.created_at)), 1), t.is_autosave ? (f(), A("span", Ul, O(M(a).snapshotHistory.auto), 1)) : j("", !0)])])], 8, Bl))), 128))]))])) : j("", !0)]),
|
|
6749
6749
|
_: 1
|
|
6750
6750
|
}),
|
|
6751
|
-
|
|
6751
|
+
L("button", {
|
|
6752
6752
|
class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] disabled:tpl:cursor-not-allowed disabled:tpl:opacity-30 disabled:hover:tpl:bg-transparent tpl:text-[var(--tpl-text-muted)]",
|
|
6753
6753
|
disabled: !l.value,
|
|
6754
6754
|
title: M(a).snapshotHistory.newerSnapshot,
|
|
6755
6755
|
onClick: N(d, ["stop"])
|
|
6756
|
-
}, [
|
|
6756
|
+
}, [H(M(zr), {
|
|
6757
6757
|
size: 14,
|
|
6758
6758
|
"stroke-width": 2
|
|
6759
6759
|
})], 8, Wl)
|
|
@@ -6815,12 +6815,12 @@ var Ql = {
|
|
|
6815
6815
|
}, Tu = {
|
|
6816
6816
|
key: 3,
|
|
6817
6817
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6818
|
-
}, Eu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Du = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ou = /* @__PURE__ */
|
|
6818
|
+
}, Eu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Du = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ou = /* @__PURE__ */ V({
|
|
6819
6819
|
__name: "TemplateScoringPanel",
|
|
6820
6820
|
props: { visible: { type: Boolean } },
|
|
6821
6821
|
emits: ["close"],
|
|
6822
6822
|
setup(e, { emit: t }) {
|
|
6823
|
-
let n = e, r = t, { t: i } = Fi(), a =
|
|
6823
|
+
let n = e, r = t, { t: i } = Fi(), a = Y(Mn, "TemplateScoringPanel"), o = Y(ir, "TemplateScoringPanel"), s = v(Hn, []), c = C({
|
|
6824
6824
|
spam: !0,
|
|
6825
6825
|
readability: !0,
|
|
6826
6826
|
accessibility: !0,
|
|
@@ -6843,7 +6843,7 @@ var Ql = {
|
|
|
6843
6843
|
function m() {
|
|
6844
6844
|
o.score(a.content.value, s);
|
|
6845
6845
|
}
|
|
6846
|
-
|
|
6846
|
+
U(() => n.visible, (e) => {
|
|
6847
6847
|
e && !o.scoringResult.value && !o.isScoring.value && m();
|
|
6848
6848
|
});
|
|
6849
6849
|
async function g(e) {
|
|
@@ -6866,98 +6866,98 @@ var Ql = {
|
|
|
6866
6866
|
"leave-from-class": "tpl:translate-x-0",
|
|
6867
6867
|
"leave-to-class": "tpl:translate-x-full"
|
|
6868
6868
|
}, {
|
|
6869
|
-
default: b(() => [e.visible ? (f(), A("div", Ql, [
|
|
6869
|
+
default: b(() => [e.visible ? (f(), A("div", Ql, [L("div", $l, [L("div", eu, [H(M(di), {
|
|
6870
6870
|
size: 13,
|
|
6871
6871
|
"stroke-width": 2
|
|
6872
|
-
}),
|
|
6872
|
+
}), L("span", null, O(M(i).scoring.title), 1)]), L("div", tu, [M(o).scoringResult.value && !M(o).isScoring.value ? (f(), A("button", {
|
|
6873
6873
|
key: 0,
|
|
6874
6874
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6875
6875
|
title: M(i).scoring.rescore,
|
|
6876
6876
|
onClick: n[0] ||= (e) => m()
|
|
6877
|
-
}, [
|
|
6877
|
+
}, [H(M(si), {
|
|
6878
6878
|
size: 14,
|
|
6879
6879
|
"stroke-width": 2
|
|
6880
|
-
})], 8, nu)) : j("", !0),
|
|
6880
|
+
})], 8, nu)) : j("", !0), L("button", {
|
|
6881
6881
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6882
6882
|
onClick: n[1] ||= (e) => r("close")
|
|
6883
|
-
}, [
|
|
6883
|
+
}, [H(M(bi), {
|
|
6884
6884
|
size: 14,
|
|
6885
6885
|
"stroke-width": 2
|
|
6886
|
-
})])])]),
|
|
6887
|
-
|
|
6886
|
+
})])])]), L("div", ru, [M(o).isScoring.value ? (f(), A("div", iu, [L("p", au, O(M(i).scoring.scoring), 1), H(ki, { class: "tpl:w-3/4" })])) : M(o).error.value && !M(o).scoringResult.value ? (f(), A("div", ou, [
|
|
6887
|
+
H(M(Vr), {
|
|
6888
6888
|
size: 32,
|
|
6889
6889
|
"stroke-width": 1.5,
|
|
6890
6890
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
6891
6891
|
}),
|
|
6892
|
-
|
|
6893
|
-
|
|
6892
|
+
L("p", su, O(M(i).scoring.error), 1),
|
|
6893
|
+
L("button", {
|
|
6894
6894
|
class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
|
|
6895
6895
|
onClick: n[2] ||= (e) => m()
|
|
6896
|
-
}, [
|
|
6896
|
+
}, [H(M(si), {
|
|
6897
6897
|
size: 12,
|
|
6898
6898
|
"stroke-width": 2
|
|
6899
|
-
}),
|
|
6899
|
+
}), B(" " + O(M(i).scoring.rescore), 1)])
|
|
6900
6900
|
])) : M(o).scoringResult.value ? (f(), A("div", cu, [
|
|
6901
|
-
|
|
6901
|
+
L("div", {
|
|
6902
6902
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
6903
|
-
style:
|
|
6903
|
+
style: R({ backgroundColor: M(Yl)(M(o).scoringResult.value.score) })
|
|
6904
6904
|
}, [
|
|
6905
|
-
|
|
6905
|
+
L("span", {
|
|
6906
6906
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
6907
|
-
style:
|
|
6907
|
+
style: R({ color: M(Jl)(M(o).scoringResult.value.score) })
|
|
6908
6908
|
}, O(M(o).scoringResult.value.score), 5),
|
|
6909
|
-
|
|
6909
|
+
L("span", lu, O(M(i).scoring.overallScore), 1),
|
|
6910
6910
|
_() > 0 ? (f(), A("span", uu, O(_()) + " " + O(M(i).scoring.findings), 1)) : j("", !0)
|
|
6911
6911
|
], 4),
|
|
6912
|
-
M(o).fixError.value ? (f(), A("div", du, [
|
|
6912
|
+
M(o).fixError.value ? (f(), A("div", du, [H(M(Vr), {
|
|
6913
6913
|
size: 14,
|
|
6914
6914
|
"stroke-width": 2,
|
|
6915
6915
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6916
|
-
}),
|
|
6917
|
-
(f(), A(
|
|
6916
|
+
}), L("span", null, O(M(i).scoring.fixError), 1)])) : j("", !0),
|
|
6917
|
+
(f(), A(z, null, h(u, (e) => L("div", {
|
|
6918
6918
|
key: e,
|
|
6919
6919
|
class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
6920
|
-
}, [
|
|
6920
|
+
}, [L("button", {
|
|
6921
6921
|
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-2.5 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100 tpl:bg-[var(--tpl-bg)]",
|
|
6922
6922
|
onClick: (t) => l(e)
|
|
6923
6923
|
}, [
|
|
6924
6924
|
(f(), P(d(p[e]), {
|
|
6925
6925
|
size: 14,
|
|
6926
6926
|
"stroke-width": 2,
|
|
6927
|
-
style:
|
|
6927
|
+
style: R({ color: M(Jl)(M(o).scoringResult.value.categories[e].score) })
|
|
6928
6928
|
}, null, 8, ["style"])),
|
|
6929
|
-
|
|
6930
|
-
|
|
6929
|
+
L("span", pu, O(M(i).scoring.categories[e]), 1),
|
|
6930
|
+
L("span", {
|
|
6931
6931
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
6932
|
-
style:
|
|
6932
|
+
style: R({
|
|
6933
6933
|
color: M(Jl)(M(o).scoringResult.value.categories[e].score),
|
|
6934
6934
|
backgroundColor: M(Yl)(M(o).scoringResult.value.categories[e].score)
|
|
6935
6935
|
})
|
|
6936
6936
|
}, O(M(o).scoringResult.value.categories[e].score), 5),
|
|
6937
6937
|
M(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), A("span", mu, O(M(o).scoringResult.value.categories[e].findings.length), 1)) : j("", !0),
|
|
6938
|
-
|
|
6938
|
+
H(M(Lr), {
|
|
6939
6939
|
size: 12,
|
|
6940
6940
|
"stroke-width": 2,
|
|
6941
|
-
class:
|
|
6941
|
+
class: I(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
6942
6942
|
}, null, 8, ["class"])
|
|
6943
|
-
], 8, fu), c.value[e] ? (f(), A("div", hu, [M(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), A("div", gu, O(M(i).scoring.noFindings), 1)) : j("", !0), (f(!0), A(
|
|
6943
|
+
], 8, fu), c.value[e] ? (f(), A("div", hu, [M(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), A("div", gu, O(M(i).scoring.noFindings), 1)) : j("", !0), (f(!0), A(z, null, h(M(o).scoringResult.value.categories[e].findings, (e) => (f(), A("div", {
|
|
6944
6944
|
key: e.id,
|
|
6945
6945
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
6946
|
-
}, [
|
|
6946
|
+
}, [L("div", _u, [(f(), P(d(M(e.severity === "high" ? Vr : e.severity === "medium" ? gi : ei)), {
|
|
6947
6947
|
size: 13,
|
|
6948
6948
|
"stroke-width": 2,
|
|
6949
6949
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
6950
|
-
style:
|
|
6951
|
-
}, null, 8, ["style"])),
|
|
6952
|
-
|
|
6950
|
+
style: R({ color: M(Xl)(e.severity) })
|
|
6951
|
+
}, null, 8, ["style"])), L("div", vu, [
|
|
6952
|
+
L("div", yu, [L("span", {
|
|
6953
6953
|
class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
|
|
6954
|
-
style:
|
|
6954
|
+
style: R({
|
|
6955
6955
|
color: M(Xl)(e.severity),
|
|
6956
6956
|
backgroundColor: M(Zl)(e.severity)
|
|
6957
6957
|
})
|
|
6958
|
-
}, O(M(i).scoring.severity[e.severity]), 5),
|
|
6958
|
+
}, O(M(i).scoring.severity[e.severity]), 5), L("span", bu, O(e.message), 1)]),
|
|
6959
6959
|
e.suggestion ? (f(), A("p", xu, O(e.suggestion), 1)) : j("", !0),
|
|
6960
|
-
e.blockId ? (f(), A("div", Su, [
|
|
6960
|
+
e.blockId ? (f(), A("div", Su, [L("button", {
|
|
6961
6961
|
class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
|
|
6962
6962
|
style: { "background-color": "transparent" },
|
|
6963
6963
|
disabled: M(o).fixingFindingId.value !== null,
|
|
@@ -6971,13 +6971,13 @@ var Ql = {
|
|
|
6971
6971
|
key: 1,
|
|
6972
6972
|
size: 11,
|
|
6973
6973
|
"stroke-width": 2
|
|
6974
|
-
})),
|
|
6974
|
+
})), B(" " + O(M(o).fixingFindingId.value === e.id ? M(i).scoring.fixing : M(i).scoring.fix), 1)], 8, Cu), M(o).fixError.value ? (f(), A("p", wu, O(M(o).fixError.value), 1)) : j("", !0)])) : j("", !0)
|
|
6975
6975
|
])])]))), 128))])) : j("", !0)])), 64))
|
|
6976
|
-
])) : (f(), A("div", Tu, [
|
|
6976
|
+
])) : (f(), A("div", Tu, [H(M(di), {
|
|
6977
6977
|
size: 32,
|
|
6978
6978
|
"stroke-width": 1.5,
|
|
6979
6979
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6980
|
-
}),
|
|
6980
|
+
}), L("p", Eu, O(M(i).scoring.emptyState), 1)])), L("p", Du, O(M(i).aiMenu.disclaimer), 1)])])) : j("", !0)]),
|
|
6981
6981
|
_: 1
|
|
6982
6982
|
}));
|
|
6983
6983
|
}
|
|
@@ -6991,7 +6991,7 @@ var Ql = {
|
|
|
6991
6991
|
}, zu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Bu = ["disabled"], Vu = ["disabled"], Hu = {
|
|
6992
6992
|
key: 0,
|
|
6993
6993
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
6994
|
-
}, Uu = { key: 1 }, Wu = /* @__PURE__ */
|
|
6994
|
+
}, Uu = { key: 1 }, Wu = /* @__PURE__ */ V({
|
|
6995
6995
|
__name: "TestEmailModal",
|
|
6996
6996
|
props: {
|
|
6997
6997
|
visible: { type: Boolean },
|
|
@@ -7002,7 +7002,7 @@ var Ql = {
|
|
|
7002
7002
|
emits: ["send", "close"],
|
|
7003
7003
|
setup(e, { emit: t }) {
|
|
7004
7004
|
let n = e, r = t, { t: i } = Fi(), a = C("");
|
|
7005
|
-
|
|
7005
|
+
U(() => n.visible, (e) => {
|
|
7006
7006
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7007
7007
|
});
|
|
7008
7008
|
function o() {
|
|
@@ -7019,7 +7019,7 @@ var Ql = {
|
|
|
7019
7019
|
onClose: s,
|
|
7020
7020
|
onKeydown: l
|
|
7021
7021
|
}, {
|
|
7022
|
-
default: b(() => [
|
|
7022
|
+
default: b(() => [L("div", {
|
|
7023
7023
|
role: "dialog",
|
|
7024
7024
|
"aria-modal": "true",
|
|
7025
7025
|
"aria-busy": e.isSending,
|
|
@@ -7030,8 +7030,8 @@ var Ql = {
|
|
|
7030
7030
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7031
7031
|
}
|
|
7032
7032
|
}, [
|
|
7033
|
-
|
|
7034
|
-
|
|
7033
|
+
L("h3", Mu, O(M(i).testEmail.title), 1),
|
|
7034
|
+
L("div", Nu, [L("label", Pu, O(M(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), A("input", {
|
|
7035
7035
|
key: 0,
|
|
7036
7036
|
type: "text",
|
|
7037
7037
|
value: a.value,
|
|
@@ -7042,32 +7042,32 @@ var Ql = {
|
|
|
7042
7042
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7043
7043
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
7044
7044
|
disabled: e.isSending
|
|
7045
|
-
}, [(f(!0), A(
|
|
7045
|
+
}, [(f(!0), A(z, null, h(e.allowedEmails, (e) => (f(), A("option", {
|
|
7046
7046
|
key: e,
|
|
7047
7047
|
value: e
|
|
7048
7048
|
}, O(e), 9, Lu))), 128))], 8, Iu)), [[w, a.value]])]),
|
|
7049
7049
|
e.error ? (f(), A("p", Ru, O(e.error), 1)) : j("", !0),
|
|
7050
|
-
|
|
7050
|
+
L("div", zu, [L("button", {
|
|
7051
7051
|
type: "button",
|
|
7052
|
-
class:
|
|
7052
|
+
class: I(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": e.isSending }]),
|
|
7053
7053
|
disabled: e.isSending,
|
|
7054
7054
|
onClick: s
|
|
7055
|
-
}, O(M(i).testEmail.cancel), 11, Bu),
|
|
7055
|
+
}, O(M(i).testEmail.cancel), 11, Bu), L("button", {
|
|
7056
7056
|
type: "button",
|
|
7057
7057
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
7058
7058
|
disabled: !a.value || e.isSending,
|
|
7059
7059
|
onClick: o
|
|
7060
|
-
}, [e.isSending ? (f(), A("span", Hu, [
|
|
7060
|
+
}, [e.isSending ? (f(), A("span", Hu, [H(M(ti), {
|
|
7061
7061
|
class: "tpl:animate-spin",
|
|
7062
7062
|
size: 12,
|
|
7063
7063
|
"stroke-width": 2
|
|
7064
|
-
}),
|
|
7064
|
+
}), B(" " + O(M(i).testEmail.sending), 1)])) : (f(), A("span", Uu, O(M(i).testEmail.send), 1))], 8, Vu)])
|
|
7065
7065
|
], 8, ju)]),
|
|
7066
7066
|
_: 1
|
|
7067
7067
|
}, 8, ["visible"]));
|
|
7068
7068
|
}
|
|
7069
7069
|
}), Gu = /* @__PURE__ */ e({ default: () => Ku }), Ku = Wu;
|
|
7070
7070
|
//#endregion
|
|
7071
|
-
export { Ii as $,
|
|
7071
|
+
export { Ii as $, Zn as $t, Ao as A, pe as An, Ir as At, Na as B, Bn as Bt, Ho as C, _e as Cn, Kr as Ct, Z as D, ge as Dn, Vr as Dt, $ as E, Se as En, Ur as Et, $a as F, ye as Fn, cr as Ft, sa as G, Vn as Gt, ja as H, ar as Ht, to as I, fe as In, tr as It, $i as J, In as Jt, oa as K, qn as Kt, Qa as L, ue as Ln, Jn as Lt, vo as M, xe as Mn, wr as Mt, fo as N, we as Nn, gr as Nt, jo as O, Ce as On, zr as Ot, co as P, me as Pn, lr as Pt, Li as Q, ir as Qt, Ja as R, de as Rn, er as Rt, Ko as S, G as Sn, qr as St, Ro as T, ve as Tn, Wr as Tt, Sa as U, nr as Ut, Ma as V, Yn as Vt, va as W, Fn as Wt, Hi as X, Kn as Xt, Wi as Y, Un as Yt, Ri as Z, rr as Zt, ns as _, mt as _n, ni as _t, Al as a, bn as an, bi as at, Yo as b, ot as bn, $r as bt, zs as c, Cn as cn, hi as ct, cs as d, nn as dn, di as dt, Ln as en, Pi as et, ss as f, jt as fn, ui as ft, rs as g, vt as gn, ri as gt, is as h, gt as hn, ii as ht, Ml as i, yn as in, wi as it, Oo as j, be as jn, X as jt, Mo as k, he as kn, Lr as kt, ms as l, Qt as ln, mi as lt, as as m, ct as mn, si as mt, ku as n, Y as nn, Mi as nt, Ol as o, J as on, vi as ot, os as p, St as pn, li as pt, ta as q, Mn as qt, Kl as r, dn as rn, Ti as rt, $c as s, En as sn, gi as st, Gu as t, Rn as tn, Fi as tt, ps as u, tn as un, pi as ut, ts as v, _t as vn, ti as vt, zo as w, Te as wn, Gr as wt, qo as x, at as xn, Qr as xt, Xo as y, st as yn, ei as yt, Ka as z, le as zn, zn as zt };
|
|
7072
7072
|
|
|
7073
|
-
//# sourceMappingURL=features-
|
|
7073
|
+
//# sourceMappingURL=features-CUYy5kZQ.js.map
|