@templatical/editor 0.9.1 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-BUKj9n02.js → AiChatSidebar-Dz5bH1z3.js} +13 -13
- package/dist/{AiFeatureMenu-Co14YVJt.js → AiFeatureMenu-D2Xn0jFx.js} +7 -7
- package/dist/{BlockIssueBadge-DThKKeub.js → BlockIssueBadge-CnqD1cGo.js} +5 -5
- package/dist/{CloudEditor-DHB1FoQD.js → CloudEditor-BizZwsfD.js} +237 -233
- package/dist/{CollaboratorBar-Bc6q0gB9.js → CollaboratorBar-Bn2JDu6l.js} +4 -4
- package/dist/{CommentsSidebar-DiH4R4F0.js → CommentsSidebar-BAG6rdVC.js} +12 -12
- package/dist/{CountdownBlock-BTPefclD.js → CountdownBlock-B_Hr9Bm9.js} +3 -3
- package/dist/{CountdownToolbar-Dvr2icg-.js → CountdownToolbar-DaqDLKLk.js} +3 -3
- package/dist/{DesignReferenceSidebar-BP32MgpS.js → DesignReferenceSidebar-I9LWjvrj.js} +9 -9
- package/dist/{IssuesPanel-B1LT91IX.js → IssuesPanel-B32Ifp4x.js} +8 -8
- package/dist/{LoadingTrack-xCOLUR3o.js → LoadingTrack-UTqOUN4O.js} +1 -1
- package/dist/{ModuleBrowserModal-CWegFoOA.js → ModuleBrowserModal-DodRped1.js} +10 -10
- package/dist/{ModulePreviewCanvas-D9WUSSRT.js → ModulePreviewCanvas-DhcnddJF.js} +3 -3
- package/dist/{NumberWithSuffix-CxUBW_V2.js → NumberWithSuffix-DB7GyyCI.js} +3 -3
- package/dist/{ParagraphEditor-DrAz2yot.js → ParagraphEditor-pJA9BHAL.js} +26 -26
- package/dist/{RichTextEditorContent-gR169m1-.js → RichTextEditorContent-dTGSUff_.js} +6 -6
- package/dist/{SaveModuleDialog-DWidA0c9.js → SaveModuleDialog-D634e99d.js} +7 -7
- package/dist/{SnapshotHistory-CIo2Jaw-.js → SnapshotHistory-m_nGAHlb.js} +9 -9
- package/dist/{TemplateScoringPanel-seBvvn8O.js → TemplateScoringPanel-BOQh9neV.js} +14 -14
- package/dist/{TestEmailModal-BuCuWp3N.js → TestEmailModal-DOcwoKkc.js} +5 -5
- package/dist/{TitleEditor-BmW0uMl7.js → TitleEditor-t6JMWamY.js} +12 -12
- package/dist/{TplModal-YFpBaiLj.js → TplModal-BAtbfDB0.js} +4 -4
- package/dist/{blockTypeIcons-DCkHXPhx.js → blockTypeIcons-C4lXx3Au.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js → AiFeatureMenu-BeOyHAoZ.js} +3 -3
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js.map → AiFeatureMenu-BeOyHAoZ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js → BlockIssueBadge-C6YilQdl.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js.map → BlockIssueBadge-C6YilQdl.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CrZk-OwQ.js → CloudEditor-DEA37rdW.js} +178 -174
- package/dist/cdn/chunks/CloudEditor-DEA37rdW.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js → CollaboratorBar-CKW7jOW4.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js.map → CollaboratorBar-CKW7jOW4.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js → CountdownBlock-DU9ga9Ki.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js.map → CountdownBlock-DU9ga9Ki.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js → CountdownToolbar-BHWsxth7.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js.map → CountdownToolbar-BHWsxth7.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js → IssuesPanel-BkYhij39.js} +9 -9
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js.map → IssuesPanel-BkYhij39.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js → ModuleBrowserModal-D51w942J.js} +9 -9
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js.map → ModuleBrowserModal-D51w942J.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js → ModulePreviewCanvas-BqTqcKHS.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js.map → ModulePreviewCanvas-BqTqcKHS.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js → NumberWithSuffix-DuUcF2zG.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js.map → NumberWithSuffix-DuUcF2zG.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js → ParagraphEditor-Bqjn3ZNm.js} +45 -45
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js.map → ParagraphEditor-Bqjn3ZNm.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js → RichTextEditorContent-mIkkb5EK.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js.map → RichTextEditorContent-mIkkb5EK.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js → SaveModuleDialog-Felfmkcj.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js.map → SaveModuleDialog-Felfmkcj.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js → TitleEditor-Dcldr8D6.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js.map → TitleEditor-Dcldr8D6.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-D05Wqf5u.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-YOEe5mDE.js.map → blockTypeIcons-D05Wqf5u.js.map} +1 -1
- package/dist/{de-CATfXDKV.js → cdn/chunks/de-DIAGP7yH.js} +2 -6
- package/dist/cdn/chunks/de-DIAGP7yH.js.map +1 -0
- package/dist/cdn/chunks/{draggable-BwWMFq33.js → draggable-J_1CPXYc.js} +1254 -1253
- package/dist/cdn/chunks/draggable-J_1CPXYc.js.map +1 -0
- package/dist/{en-CwCAgYL5.js → cdn/chunks/en-nqIW8Q9W.js} +2 -6
- package/dist/cdn/chunks/en-nqIW8Q9W.js.map +1 -0
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js → extensions-CNmpC18A.js} +127 -124
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js.map → extensions-CNmpC18A.js.map} +1 -1
- package/dist/cdn/chunks/{features-D-2kVhHY.js → features-_ar9QbVv.js} +1006 -979
- package/dist/cdn/chunks/features-_ar9QbVv.js.map +1 -0
- package/dist/cdn/chunks/{icons-fZoyKV_s.js → icons-CnwCLJX-.js} +19 -33
- package/dist/cdn/chunks/icons-CnwCLJX-.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CO2WOETY.js → media-library-9jyt7Bf9.js} +83 -79
- package/dist/cdn/chunks/media-library-9jyt7Bf9.js.map +1 -0
- package/dist/{pt-BR-D3Mg7AKe.js → cdn/chunks/pt-BR-DCNnLLx9.js} +2 -6
- package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +1 -0
- package/dist/cdn/chunks/{quality-BxPiS-wv.js → quality-CO9mj_RH.js} +494 -484
- package/dist/cdn/chunks/quality-CO9mj_RH.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CfHPFI5v.js → renderer-m6XTCWCL.js} +135 -117
- package/dist/cdn/chunks/renderer-m6XTCWCL.js.map +1 -0
- package/dist/cdn/chunks/{src-ftxPuuQh.js → src-DfMSYqvE.js} +9 -9
- package/dist/cdn/chunks/{src-ftxPuuQh.js.map → src-DfMSYqvE.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CVUvPdKD.js → styles-1uFWdD5T.js} +1045 -1074
- package/dist/cdn/chunks/styles-1uFWdD5T.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BBbH3IT9.js → tiptap-CJbIm_hE.js} +5 -5
- package/dist/cdn/chunks/{tiptap-BBbH3IT9.js.map → tiptap-CJbIm_hE.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +109 -100
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ChQyfxJ3.js → check-Bs6_uQpm.js} +1 -1
- package/dist/{chevron-down-DJjo0jSV.js → chevron-down-so1rnGwF.js} +1 -1
- package/dist/{circle-alert-CPH6l3Lc.js → circle-alert-CrKv0AuW.js} +1 -1
- package/dist/{clock-DHl_BIkU.js → clock-Cpx6GYpa.js} +1 -1
- package/dist/{cloud-VxYMtfXC.js → cloud-bHhCNRZa.js} +80 -74
- package/dist/{createLucideIcon-XgXOJ05E.js → createLucideIcon-DFBxEm5K.js} +3 -3
- package/dist/{cdn/chunks/de-CATfXDKV.js → de-DIAGP7yH.js} +0 -8
- package/dist/{dist-C0jo8wtG.js → dist-0RguD1vS.js} +1 -1
- package/dist/{dist-CNLAS2v2.js → dist-2-A7SaKm.js} +3 -3
- package/dist/{dist-UK-lbEBc.js → dist-74n2Mqc6.js} +1 -1
- package/dist/{dist-BzuC8o3y.js → dist-B3CcePtK.js} +3 -3
- package/dist/{dist-D8C6jIXM.js → dist-BejBMbBX.js} +3 -3
- package/dist/{dist-CIV3Brg-.js → dist-BufRk8ZY.js} +4 -6
- package/dist/{dist-DILjuzSv.js → dist-Bvje_Tqb.js} +1 -1
- package/dist/{dist-BDgf2G-V.js → dist-BxHa6kIT.js} +3 -3
- package/dist/{dist-CUpJmrjt.js → dist-CIK3BYgh.js} +1 -1
- package/dist/{dist-C8wMh_gi.js → dist-CMkZaqX1.js} +1 -1
- package/dist/{dist-BxP6TB0l.js → dist-CoaWXQ7N.js} +1 -1
- package/dist/{dist-D5lmdi1F.js → dist-D1YvgM6p.js} +1 -1
- package/dist/{dist-DYO-w_Jf.js → dist-DJ5YJLXn.js} +1 -1
- package/dist/{dist-DXaxGLsw.js → dist-DwEpKyry.js} +1 -1
- package/dist/{cdn/chunks/en-CwCAgYL5.js → en-nqIW8Q9W.js} +0 -8
- package/dist/{extensions-Mj2-D8uK.js → extensions-C810eSzv.js} +107 -104
- package/dist/{image-up-CPBCOMit.js → image-up-kMLE5GsI.js} +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/{info-DIY9mguM.js → info-xqRxLfNz.js} +1 -1
- package/dist/keys-BoYBr3PU.js +10 -0
- package/dist/{list-checks-CSCyu3fH.js → list-checks-C81htkBJ.js} +1 -1
- package/dist/{loader-circle-Rz_4vJLH.js → loader-circle-C6cZPIum.js} +1 -1
- package/dist/{message-circle-D-umK_MU.js → message-circle-dqOBRe07.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-D3Mg7AKe.js → pt-BR-DCNnLLx9.js} +0 -8
- package/dist/{refresh-cw-CvWF4jfR.js → refresh-cw-DCjNd6o0.js} +1 -1
- package/dist/{scan-line-wanvAFDr.js → scan-line-DXz0nZVJ.js} +1 -1
- package/dist/{send-BhbhbIFT.js → send-C4uH_WaI.js} +1 -1
- package/dist/{shield-check-CXPPMWth.js → shield-check-B3U68ssA.js} +1 -1
- package/dist/{sparkles-CrUN0KWY.js → sparkles-CsDweGUy.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-CxwIlb7Y.js → styles-CBlNpqL9.js} +1031 -1074
- package/dist/templatical-editor.js +116 -107
- package/dist/{text-align-end-Bkq8oBrD.js → text-align-start-BkKQePFp.js} +11 -11
- package/dist/{trash-2-BpY5BCLT.js → trash-2-BIOkaEz1.js} +1 -1
- package/dist/{triangle-alert-MwJBKR2e.js → triangle-alert-Bbgu6uUG.js} +1 -1
- package/dist/{useAliveFlag-BLyG8L4d.js → useAliveFlag-Bc99FWyR.js} +1 -1
- package/dist/{useCloudI18n-DKWJg6rJ.js → useCloudI18n-DiwsLi6z.js} +2 -2
- package/dist/{useEditorCore-CEkf_VWX.js → useEditorCore-7c1QpPlw.js} +717 -694
- package/dist/{useI18n-Besvmtxy.js → useI18n-DskZMfRJ.js} +2 -2
- package/dist/{useMergeTag-WNzaCpXR.js → useMergeTag-Co4xYwG6.js} +4 -4
- package/dist/usePopoverRoot-DYH_gX8o.js +8 -0
- package/dist/{vue.runtime.esm-bundler-BDSGA5hA.js → vue.runtime.esm-bundler-D0Hg03Ub.js} +1289 -1288
- package/dist/{x-rcnxRG8Y.js → x-DWU6NCuE.js} +1 -1
- package/package.json +10 -10
- package/dist/cdn/chunks/CloudEditor-CrZk-OwQ.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-YOEe5mDE.js +0 -22
- package/dist/cdn/chunks/de-CATfXDKV.js.map +0 -1
- package/dist/cdn/chunks/draggable-BwWMFq33.js.map +0 -1
- package/dist/cdn/chunks/en-CwCAgYL5.js.map +0 -1
- package/dist/cdn/chunks/features-D-2kVhHY.js.map +0 -1
- package/dist/cdn/chunks/icons-fZoyKV_s.js.map +0 -1
- package/dist/cdn/chunks/media-library-CO2WOETY.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-D3Mg7AKe.js.map +0 -1
- package/dist/cdn/chunks/quality-BxPiS-wv.js.map +0 -1
- package/dist/cdn/chunks/renderer-CfHPFI5v.js.map +0 -1
- package/dist/cdn/chunks/styles-CVUvPdKD.js.map +0 -1
- package/dist/keys-BiQlvx51.js +0 -10
- package/dist/usePopoverRoot-CKt956u-.js +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
|
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 ee, b as T, c as E, ct as D, d as te, et as ne, f as O, g as k, h as A, it as j, k as re, l as M, m as N, n as ie, nt as P, o as ae, ot as F, p as I, rt as oe, s as se, st as L, t as ce, u as R, v as z, w as le, x as B, y as V, z as H } from "./draggable-J_1CPXYc.js";
|
|
3
3
|
//#region src/constants/timeouts.ts
|
|
4
4
|
var ue = 3e4, de = 4e3, fe = 5e3, pe = {
|
|
5
5
|
1: 36,
|
|
@@ -170,10 +170,7 @@ function We(e = 0) {
|
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
function G(e = 10) {
|
|
173
|
-
return {
|
|
174
|
-
padding: We(e),
|
|
175
|
-
margin: We(0)
|
|
176
|
-
};
|
|
173
|
+
return { padding: We(e) };
|
|
177
174
|
}
|
|
178
175
|
function Ge(e = {}) {
|
|
179
176
|
return U({
|
|
@@ -298,12 +295,13 @@ function at(e) {
|
|
|
298
295
|
function ot(e) {
|
|
299
296
|
let t = {};
|
|
300
297
|
for (let n of e.fields) t[n.key] = at(n);
|
|
298
|
+
let n = U(G(), e.defaultStyles);
|
|
301
299
|
return {
|
|
302
300
|
id: W(),
|
|
303
301
|
type: "custom",
|
|
304
302
|
customType: e.type,
|
|
305
303
|
fieldValues: t,
|
|
306
|
-
styles:
|
|
304
|
+
styles: n,
|
|
307
305
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
308
306
|
};
|
|
309
307
|
}
|
|
@@ -745,7 +743,7 @@ function jt(e) {
|
|
|
745
743
|
o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
746
744
|
}, i));
|
|
747
745
|
}
|
|
748
|
-
let m =
|
|
746
|
+
let m = ee(t, () => {
|
|
749
747
|
c() && !s && n() && p();
|
|
750
748
|
}, { deep: !0 });
|
|
751
749
|
function h() {
|
|
@@ -828,7 +826,7 @@ function Pt(e, t) {
|
|
|
828
826
|
};
|
|
829
827
|
}
|
|
830
828
|
//#endregion
|
|
831
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.
|
|
829
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.35_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
832
830
|
function Ft(e, t) {
|
|
833
831
|
return s() ? (l(e, t), !0) : !1;
|
|
834
832
|
}
|
|
@@ -878,7 +876,7 @@ function Yt(e, t = {}) {
|
|
|
878
876
|
clearTimeout(e), i(), i = Ut;
|
|
879
877
|
}, o;
|
|
880
878
|
return (s) => {
|
|
881
|
-
let c =
|
|
879
|
+
let c = P(e), l = P(t.maxWait);
|
|
882
880
|
return n && a(n), c <= 0 || l !== void 0 && l <= 0 ? (r &&= (a(r), void 0), Promise.resolve(s())) : new Promise((e, u) => {
|
|
883
881
|
i = t.rejectOnCancel ? u : e, o = s, l && !r && (r = setTimeout(() => {
|
|
884
882
|
n && a(n), r = void 0, e(o());
|
|
@@ -911,7 +909,7 @@ function en(e, t = 200, n = {}) {
|
|
|
911
909
|
return qt(Yt(t, n), e);
|
|
912
910
|
}
|
|
913
911
|
function tn(e, t = 200, n = {}) {
|
|
914
|
-
let r = C(
|
|
912
|
+
let r = C(P(e)), i = en(() => {
|
|
915
913
|
r.value = e.value;
|
|
916
914
|
}, t, n);
|
|
917
915
|
return H(e, () => i()), g(r);
|
|
@@ -932,7 +930,7 @@ function an(e, t = 1e3, r = {}) {
|
|
|
932
930
|
s.value = !1, c();
|
|
933
931
|
}
|
|
934
932
|
function d() {
|
|
935
|
-
let n =
|
|
933
|
+
let n = P(t);
|
|
936
934
|
n <= 0 || (s.value = !0, a && e(), c(), s.value && (o = setInterval(e, n)));
|
|
937
935
|
}
|
|
938
936
|
return i && zt && d(), (u(t) || typeof t == "function") && Ft(H(t, () => {
|
|
@@ -954,7 +952,7 @@ function on(e, t, r = {}) {
|
|
|
954
952
|
function u(...n) {
|
|
955
953
|
a && e(), c(), o.value = !0, s = setTimeout(() => {
|
|
956
954
|
o.value = !1, s = void 0, e(...n);
|
|
957
|
-
},
|
|
955
|
+
}, P(t));
|
|
958
956
|
}
|
|
959
957
|
return i && (o.value = !0, zt && u()), Ft(l), {
|
|
960
958
|
isPending: g(o),
|
|
@@ -967,8 +965,8 @@ function sn(e = !1, t = {}) {
|
|
|
967
965
|
function s(e) {
|
|
968
966
|
if (arguments.length) return o.value = e, o.value;
|
|
969
967
|
{
|
|
970
|
-
let e =
|
|
971
|
-
return o.value = o.value === e ?
|
|
968
|
+
let e = P(r);
|
|
969
|
+
return o.value = o.value === e ? P(i) : e, o.value;
|
|
972
970
|
}
|
|
973
971
|
}
|
|
974
972
|
return a ? s : [o, s];
|
|
@@ -987,22 +985,22 @@ function ln(e, t, n) {
|
|
|
987
985
|
});
|
|
988
986
|
}
|
|
989
987
|
//#endregion
|
|
990
|
-
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.
|
|
988
|
+
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.35_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
991
989
|
var un = zt ? window : void 0, dn = zt ? window.document : void 0, fn = zt ? window.navigator : void 0;
|
|
992
990
|
function K(e) {
|
|
993
|
-
let t =
|
|
991
|
+
let t = P(e);
|
|
994
992
|
return t?.$el ?? t;
|
|
995
993
|
}
|
|
996
994
|
function q(...e) {
|
|
997
|
-
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n =
|
|
998
|
-
let t = Qt(
|
|
995
|
+
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = O(() => {
|
|
996
|
+
let t = Qt(P(e[0])).filter((e) => e != null);
|
|
999
997
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
1000
998
|
});
|
|
1001
999
|
return ln(() => [
|
|
1002
1000
|
n.value?.map((e) => K(e)) ?? [un].filter((e) => e != null),
|
|
1003
|
-
Qt(
|
|
1004
|
-
Qt(
|
|
1005
|
-
|
|
1001
|
+
Qt(P(n.value ? e[1] : e[0])),
|
|
1002
|
+
Qt(j(n.value ? e[2] : e[1])),
|
|
1003
|
+
P(n.value ? e[3] : e[2])
|
|
1006
1004
|
], ([e, n, r, i], a, o) => {
|
|
1007
1005
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
1008
1006
|
let s = Ht(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
@@ -1024,7 +1022,7 @@ function mn(e, t, n = {}) {
|
|
|
1024
1022
|
let e = { passive: !0 };
|
|
1025
1023
|
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Ut, e)), r.document.documentElement.addEventListener("click", Ut, e);
|
|
1026
1024
|
}
|
|
1027
|
-
let c = !0, l = (e) =>
|
|
1025
|
+
let c = !0, l = (e) => P(i).some((t) => {
|
|
1028
1026
|
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
1029
1027
|
{
|
|
1030
1028
|
let n = K(t);
|
|
@@ -1032,11 +1030,11 @@ function mn(e, t, n = {}) {
|
|
|
1032
1030
|
}
|
|
1033
1031
|
});
|
|
1034
1032
|
function u(e) {
|
|
1035
|
-
let t =
|
|
1033
|
+
let t = P(e);
|
|
1036
1034
|
return t && t.$.subTree.shapeFlag === 16;
|
|
1037
1035
|
}
|
|
1038
1036
|
function d(e, t) {
|
|
1039
|
-
let n =
|
|
1037
|
+
let n = P(e), r = n.$.subTree && n.$.subTree.children;
|
|
1040
1038
|
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
|
|
1041
1039
|
}
|
|
1042
1040
|
let f = (n) => {
|
|
@@ -1087,13 +1085,13 @@ function hn() {
|
|
|
1087
1085
|
}
|
|
1088
1086
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1089
1087
|
function gn(e) {
|
|
1090
|
-
return hn(),
|
|
1088
|
+
return hn(), O(() => !!e());
|
|
1091
1089
|
}
|
|
1092
1090
|
function _n(e, t, n = {}) {
|
|
1093
1091
|
let { window: r = un, ...i } = n, a, o = /* @__PURE__ */ gn(() => r && "MutationObserver" in r), s = () => {
|
|
1094
1092
|
a &&= (a.disconnect(), void 0);
|
|
1095
|
-
}, c = H(
|
|
1096
|
-
let t = Qt(
|
|
1093
|
+
}, c = H(O(() => {
|
|
1094
|
+
let t = Qt(P(e)).map(K).filter(Bt);
|
|
1097
1095
|
return new Set(t);
|
|
1098
1096
|
}), (e) => {
|
|
1099
1097
|
s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
|
|
@@ -1119,16 +1117,16 @@ function bn(e, t = {}) {
|
|
|
1119
1117
|
let { window: r = un, ssrWidth: a = /* @__PURE__ */ yn() } = t, o = /* @__PURE__ */ gn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
|
|
1120
1118
|
return i(() => {
|
|
1121
1119
|
if (s.value) {
|
|
1122
|
-
s.value = !o.value, l.value =
|
|
1120
|
+
s.value = !o.value, l.value = P(e).split(",").some((e) => {
|
|
1123
1121
|
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);
|
|
1124
1122
|
return n && i && (i = a >= Zt(n[1])), r && i && (i = a <= Zt(r[1])), t ? !i : i;
|
|
1125
1123
|
});
|
|
1126
1124
|
return;
|
|
1127
1125
|
}
|
|
1128
|
-
o.value && (c.value = r.matchMedia(
|
|
1126
|
+
o.value && (c.value = r.matchMedia(P(e)), l.value = c.value.matches);
|
|
1129
1127
|
}), q(c, "change", (e) => {
|
|
1130
1128
|
l.value = e.matches;
|
|
1131
|
-
}, { passive: !0 }),
|
|
1129
|
+
}, { passive: !0 }), O(() => l.value);
|
|
1132
1130
|
}
|
|
1133
1131
|
function xn(e, t = {}) {
|
|
1134
1132
|
let { controls: r = !1, navigator: i = fn } = t, a = /* @__PURE__ */ gn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
|
|
@@ -1144,7 +1142,7 @@ function xn(e, t = {}) {
|
|
|
1144
1142
|
} finally {
|
|
1145
1143
|
l();
|
|
1146
1144
|
}
|
|
1147
|
-
if (r) return
|
|
1145
|
+
if (r) return ne(o.value);
|
|
1148
1146
|
}
|
|
1149
1147
|
});
|
|
1150
1148
|
return u(), r ? {
|
|
@@ -1154,7 +1152,7 @@ function xn(e, t = {}) {
|
|
|
1154
1152
|
} : c;
|
|
1155
1153
|
}
|
|
1156
1154
|
function Sn(e = {}) {
|
|
1157
|
-
let { navigator: t = fn, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ gn(() => t && "clipboard" in t), c = xn("clipboard-read"), l = xn("clipboard-write"), u =
|
|
1155
|
+
let { navigator: t = fn, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ gn(() => t && "clipboard" in t), c = xn("clipboard-read"), l = xn("clipboard-write"), u = O(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = on(() => f.value = !1, a, { immediate: !1 }), h = 0;
|
|
1158
1156
|
async function _() {
|
|
1159
1157
|
let e = !(s.value && S(c.value));
|
|
1160
1158
|
if (!e) try {
|
|
@@ -1166,7 +1164,7 @@ function Sn(e = {}) {
|
|
|
1166
1164
|
}
|
|
1167
1165
|
u.value && r && q(["copy", "cut"], _, { passive: !0 });
|
|
1168
1166
|
async function v(e) {
|
|
1169
|
-
let n = e ??
|
|
1167
|
+
let n = e ?? P(i);
|
|
1170
1168
|
if (u.value && n != null) {
|
|
1171
1169
|
p.value = !0;
|
|
1172
1170
|
let e = !(s.value && S(l.value));
|
|
@@ -1213,7 +1211,7 @@ function Cn(e, t = {}) {
|
|
|
1213
1211
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
1214
1212
|
return t.length === 0 ? null : s ? t : [t[0]];
|
|
1215
1213
|
}, u = (e) => {
|
|
1216
|
-
let t =
|
|
1214
|
+
let t = j(n.dataTypes);
|
|
1217
1215
|
return typeof t == "function" ? t(e) : t?.length ? e.length === 0 ? !1 : e.every((e) => t.some((t) => e.includes(t))) : !0;
|
|
1218
1216
|
}, d = (e) => n.checkValidity ? n.checkValidity(e) : u(Array.from(e ?? []).map((e) => e.type)) && (s || e.length <= 1), f = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !("chrome" in window), p = (e, t) => {
|
|
1219
1217
|
let s = e.dataTransfer?.items;
|
|
@@ -1254,8 +1252,8 @@ function Cn(e, t = {}) {
|
|
|
1254
1252
|
function wn(e, t, n = {}) {
|
|
1255
1253
|
let { window: r = un, ...i } = n, a, o = /* @__PURE__ */ gn(() => r && "ResizeObserver" in r), s = () => {
|
|
1256
1254
|
a &&= (a.disconnect(), void 0);
|
|
1257
|
-
}, c = H(
|
|
1258
|
-
let t =
|
|
1255
|
+
}, c = H(O(() => {
|
|
1256
|
+
let t = P(e);
|
|
1259
1257
|
return Array.isArray(t) ? t.map((e) => K(e)) : [K(t)];
|
|
1260
1258
|
}), (e) => {
|
|
1261
1259
|
if (s(), o.value && r) {
|
|
@@ -1305,10 +1303,10 @@ function Tn(e, t = {}) {
|
|
|
1305
1303
|
};
|
|
1306
1304
|
}
|
|
1307
1305
|
function En(e, t, r = {}) {
|
|
1308
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s = un, immediate: c = !0 } = r, l = /* @__PURE__ */ gn(() => s && "IntersectionObserver" in s), u =
|
|
1306
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = un, immediate: c = !0 } = r, l = /* @__PURE__ */ gn(() => s && "IntersectionObserver" in s), u = O(() => Qt(P(e)).map(K).filter(Bt)), d = Ut, f = n(c), p = l.value ? H(() => [
|
|
1309
1307
|
u.value,
|
|
1310
1308
|
K(i),
|
|
1311
|
-
|
|
1309
|
+
P(a),
|
|
1312
1310
|
f.value
|
|
1313
1311
|
], ([e, n, r]) => {
|
|
1314
1312
|
if (d(), !f.value || !e.length) return;
|
|
@@ -1352,7 +1350,7 @@ function On(e) {
|
|
|
1352
1350
|
return t.files;
|
|
1353
1351
|
}
|
|
1354
1352
|
function kn(e = {}) {
|
|
1355
|
-
let { document: t = dn } = e, n = C(On(e.initialFiles)), { on: r, trigger: a } = It(), { on: o, trigger: s } = It(), c =
|
|
1353
|
+
let { document: t = dn } = e, n = C(On(e.initialFiles)), { on: r, trigger: a } = It(), { on: o, trigger: s } = It(), c = O(() => {
|
|
1356
1354
|
let r = K(e.input) ?? (t ? t.createElement("input") : void 0);
|
|
1357
1355
|
return r && (r.type = "file", r.onchange = (e) => {
|
|
1358
1356
|
n.value = e.target.files, a(n.value);
|
|
@@ -1363,7 +1361,7 @@ function kn(e = {}) {
|
|
|
1363
1361
|
n.value = null, c.value && c.value.value && (c.value.value = "", a(null));
|
|
1364
1362
|
}, u = (e) => {
|
|
1365
1363
|
let t = c.value;
|
|
1366
|
-
t && (t.multiple =
|
|
1364
|
+
t && (t.multiple = P(e.multiple), t.accept = P(e.accept), t.webkitdirectory = P(e.directory), Wt(e, "capture") && (t.capture = P(e.capture)));
|
|
1367
1365
|
};
|
|
1368
1366
|
return i(() => {
|
|
1369
1367
|
u(e);
|
|
@@ -1377,7 +1375,7 @@ function kn(e = {}) {
|
|
|
1377
1375
|
...e,
|
|
1378
1376
|
...t
|
|
1379
1377
|
};
|
|
1380
|
-
u(r),
|
|
1378
|
+
u(r), P(r.reset) && l(), n.click();
|
|
1381
1379
|
},
|
|
1382
1380
|
reset: l,
|
|
1383
1381
|
onCancel: o,
|
|
@@ -1405,7 +1403,7 @@ function Nn() {
|
|
|
1405
1403
|
}
|
|
1406
1404
|
//#endregion
|
|
1407
1405
|
//#region src/keys.ts
|
|
1408
|
-
var Pn = Symbol("translations"), Fn = Symbol("editor"), In = Symbol("history"), Ln = Symbol("blockActions"), Rn = Symbol("conditionPreview"), zn = Symbol("fontsManager"), Bn = Symbol("themeStyles"), Vn = Symbol("tplUiTheme"), Hn = Symbol("blockDefaults"), Un = Symbol("blockRegistry"), Wn = Symbol("customBlockDefinitions"), Gn = Symbol("
|
|
1406
|
+
var Pn = Symbol("translations"), Fn = Symbol("editor"), In = Symbol("history"), Ln = Symbol("blockActions"), Rn = Symbol("conditionPreview"), zn = Symbol("fontsManager"), Bn = Symbol("themeStyles"), Vn = Symbol("tplUiTheme"), Hn = Symbol("blockDefaults"), Un = Symbol("blockRegistry"), Wn = Symbol("customBlockDefinitions"), Gn = Symbol("customBlockStylesheets"), Kn = Symbol("mergeTags"), qn = Symbol("mergeTagSyntax"), Jn = Symbol("onRequestMergeTag"), Yn = Symbol("mergeTagAutocomplete"), Xn = Symbol("mergeTagPicker"), Zn = Symbol("onRequestMedia"), Qn = Symbol("displayConditions"), $n = Symbol("allowCustomConditions"), er = Symbol("capabilities"), tr = Symbol("keyboardReorder"), nr = Symbol("templateLint"), rr = Symbol("editorRoot"), ir = Symbol("popoverRoot"), ar = Symbol("authManager"), or = Symbol("aiConfig"), sr = Symbol("comments"), cr = Symbol("savedModulesHeadless"), lr = Symbol("scoring"), ur = Symbol("cloudTranslations");
|
|
1409
1407
|
function J(e, t) {
|
|
1410
1408
|
let n = v(e, null);
|
|
1411
1409
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
@@ -1413,7 +1411,7 @@ function J(e, t) {
|
|
|
1413
1411
|
}
|
|
1414
1412
|
//#endregion
|
|
1415
1413
|
//#region src/composables/useMergeTagPicker.ts
|
|
1416
|
-
function
|
|
1414
|
+
function dr() {
|
|
1417
1415
|
let e = C(!1), t = C([]), n = null;
|
|
1418
1416
|
function r(r) {
|
|
1419
1417
|
if (n) {
|
|
@@ -1443,21 +1441,17 @@ function ur() {
|
|
|
1443
1441
|
}
|
|
1444
1442
|
//#endregion
|
|
1445
1443
|
//#region src/composables/useTemplateLint.ts
|
|
1446
|
-
function
|
|
1444
|
+
function fr(e) {
|
|
1447
1445
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1448
1446
|
}
|
|
1449
|
-
function
|
|
1450
|
-
let t = C([]), r = C(!1), i = C(!1), a = n(null), o =
|
|
1447
|
+
function pr(e) {
|
|
1448
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = fr(e.options), s = null, c = !1;
|
|
1451
1449
|
o || l();
|
|
1452
1450
|
async function l() {
|
|
1453
1451
|
try {
|
|
1454
|
-
let t = await import("./quality-
|
|
1452
|
+
let t = await import("./quality-CO9mj_RH.js").then((e) => e.t);
|
|
1455
1453
|
if (c) return;
|
|
1456
|
-
a.value = {
|
|
1457
|
-
lintAccessibility: t.lintAccessibility,
|
|
1458
|
-
lintStructure: t.lintStructure,
|
|
1459
|
-
lintLinks: t.lintLinks
|
|
1460
|
-
}, r.value = !0, u(), s = cn(e.content, u, {
|
|
1454
|
+
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = cn(e.content, u, {
|
|
1461
1455
|
debounce: e.debounce ?? 500,
|
|
1462
1456
|
deep: !0
|
|
1463
1457
|
});
|
|
@@ -1467,13 +1461,7 @@ function fr(e) {
|
|
|
1467
1461
|
}
|
|
1468
1462
|
}
|
|
1469
1463
|
function u() {
|
|
1470
|
-
|
|
1471
|
-
let n = a.value.lintAccessibility(e.content.value, e.options), r = a.value.lintStructure(e.content.value, e.options), i = a.value.lintLinks(e.content.value, e.options);
|
|
1472
|
-
t.value = [
|
|
1473
|
-
...n,
|
|
1474
|
-
...r,
|
|
1475
|
-
...i
|
|
1476
|
-
];
|
|
1464
|
+
a.value && (t.value = a.value.lintTemplate(e.content.value, e.options));
|
|
1477
1465
|
}
|
|
1478
1466
|
let d = H(() => e.options, () => {
|
|
1479
1467
|
a.value && u();
|
|
@@ -1512,12 +1500,12 @@ function Y(e) {
|
|
|
1512
1500
|
}
|
|
1513
1501
|
//#endregion
|
|
1514
1502
|
//#region src/utils/blockTypeLabels.ts
|
|
1515
|
-
function
|
|
1503
|
+
function mr(e, t) {
|
|
1516
1504
|
return t.blocks[e] ?? e;
|
|
1517
1505
|
}
|
|
1518
1506
|
//#endregion
|
|
1519
1507
|
//#region src/composables/useKeyboardReorder.ts
|
|
1520
|
-
function
|
|
1508
|
+
function hr(e, t) {
|
|
1521
1509
|
let n = C(null), r = C(""), i = null;
|
|
1522
1510
|
function a(t) {
|
|
1523
1511
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1544,7 +1532,7 @@ function mr(e, t) {
|
|
|
1544
1532
|
let r = a(n);
|
|
1545
1533
|
if (!r) return "";
|
|
1546
1534
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1547
|
-
return i ?
|
|
1535
|
+
return i ? mr(i.type, t.t) : "";
|
|
1548
1536
|
}
|
|
1549
1537
|
function s(t, n) {
|
|
1550
1538
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1613,13 +1601,13 @@ function mr(e, t) {
|
|
|
1613
1601
|
}
|
|
1614
1602
|
//#endregion
|
|
1615
1603
|
//#region src/composables/useUiTheme.ts
|
|
1616
|
-
function
|
|
1604
|
+
function gr(e) {
|
|
1617
1605
|
let t = bn("(prefers-color-scheme: dark)");
|
|
1618
|
-
return { resolvedTheme:
|
|
1606
|
+
return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1619
1607
|
}
|
|
1620
1608
|
//#endregion
|
|
1621
1609
|
//#region src/composables/useThemeStyles.ts
|
|
1622
|
-
var
|
|
1610
|
+
var _r = {
|
|
1623
1611
|
bg: "--tpl-bg",
|
|
1624
1612
|
bgElevated: "--tpl-bg-elevated",
|
|
1625
1613
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1643,10 +1631,10 @@ var gr = {
|
|
|
1643
1631
|
dangerLight: "--tpl-danger-light",
|
|
1644
1632
|
canvasBg: "--tpl-canvas-bg"
|
|
1645
1633
|
};
|
|
1646
|
-
function
|
|
1647
|
-
return { themeStyles:
|
|
1634
|
+
function vr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1635
|
+
return { themeStyles: O(() => {
|
|
1648
1636
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1649
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1637
|
+
if (a) for (let [e, t] of Object.entries(_r)) {
|
|
1650
1638
|
let n = a[e];
|
|
1651
1639
|
n && (r[t] = n);
|
|
1652
1640
|
}
|
|
@@ -1655,27 +1643,27 @@ function _r({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1655
1643
|
}
|
|
1656
1644
|
//#endregion
|
|
1657
1645
|
//#region src/utils/logger.ts
|
|
1658
|
-
var
|
|
1659
|
-
function
|
|
1646
|
+
var yr = "[Templatical]";
|
|
1647
|
+
function br() {
|
|
1660
1648
|
return typeof process < "u" && !0;
|
|
1661
1649
|
}
|
|
1662
|
-
var
|
|
1650
|
+
var xr = {
|
|
1663
1651
|
warn(...e) {
|
|
1664
|
-
console.warn(
|
|
1652
|
+
console.warn(yr, ...e);
|
|
1665
1653
|
},
|
|
1666
1654
|
error(...e) {
|
|
1667
|
-
console.error(
|
|
1655
|
+
console.error(yr, ...e);
|
|
1668
1656
|
},
|
|
1669
1657
|
debug(...e) {
|
|
1670
|
-
|
|
1658
|
+
br() || console.debug(yr, ...e);
|
|
1671
1659
|
},
|
|
1672
1660
|
info(...e) {
|
|
1673
|
-
|
|
1661
|
+
br() || console.info(yr, ...e);
|
|
1674
1662
|
}
|
|
1675
1663
|
};
|
|
1676
1664
|
//#endregion
|
|
1677
1665
|
//#region src/composables/useBlockRegistry.ts
|
|
1678
|
-
function
|
|
1666
|
+
function Sr() {
|
|
1679
1667
|
let e = n(/* @__PURE__ */ new Map());
|
|
1680
1668
|
function t(t, n) {
|
|
1681
1669
|
e.value.set(t, n), oe(e);
|
|
@@ -1727,7 +1715,7 @@ function xr() {
|
|
|
1727
1715
|
strictFilters: !1
|
|
1728
1716
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1729
1717
|
} catch (t) {
|
|
1730
|
-
return
|
|
1718
|
+
return xr.error(`Failed to render custom block "${e.customType}":`, t), c(`Render error: ${e.customType}`);
|
|
1731
1719
|
}
|
|
1732
1720
|
}
|
|
1733
1721
|
function u(t) {
|
|
@@ -1745,8 +1733,41 @@ function xr() {
|
|
|
1745
1733
|
};
|
|
1746
1734
|
}
|
|
1747
1735
|
//#endregion
|
|
1736
|
+
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1737
|
+
function Cr(e, t) {
|
|
1738
|
+
return O(() => {
|
|
1739
|
+
let n = wr(e.value.blocks);
|
|
1740
|
+
if (n.size === 0) return [];
|
|
1741
|
+
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1742
|
+
for (let e of n) {
|
|
1743
|
+
let n = t.getDefinition(e)?.stylesheet;
|
|
1744
|
+
if (!n) continue;
|
|
1745
|
+
let a = n.trim();
|
|
1746
|
+
a === "" || r.has(a) || (r.add(a), i.push(a));
|
|
1747
|
+
}
|
|
1748
|
+
return i;
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
function wr(e) {
|
|
1752
|
+
let t = /* @__PURE__ */ new Set();
|
|
1753
|
+
return Tr(e, t), t;
|
|
1754
|
+
}
|
|
1755
|
+
function Tr(e, t) {
|
|
1756
|
+
for (let n of e) {
|
|
1757
|
+
if (Ee(n)) {
|
|
1758
|
+
t.add(n.customType);
|
|
1759
|
+
continue;
|
|
1760
|
+
}
|
|
1761
|
+
if (n.type === "section") {
|
|
1762
|
+
let e = n.children;
|
|
1763
|
+
if (!e) continue;
|
|
1764
|
+
for (let n of e) Tr(n, t);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
//#endregion
|
|
1748
1769
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1749
|
-
var
|
|
1770
|
+
var Er = [
|
|
1750
1771
|
{
|
|
1751
1772
|
type: "section",
|
|
1752
1773
|
label: "Section",
|
|
@@ -1813,8 +1834,8 @@ var Sr = [
|
|
|
1813
1834
|
createBlock: it
|
|
1814
1835
|
}
|
|
1815
1836
|
];
|
|
1816
|
-
function
|
|
1817
|
-
for (let n of
|
|
1837
|
+
function Dr(e, t) {
|
|
1838
|
+
for (let n of Er) {
|
|
1818
1839
|
let r = t[n.type];
|
|
1819
1840
|
r && e.registerBuiltIn(n.type, {
|
|
1820
1841
|
component: r,
|
|
@@ -1829,7 +1850,7 @@ function Cr(e, t) {
|
|
|
1829
1850
|
}
|
|
1830
1851
|
//#endregion
|
|
1831
1852
|
//#region src/utils/keyboardShortcuts.ts
|
|
1832
|
-
function
|
|
1853
|
+
function Or(e) {
|
|
1833
1854
|
for (let t of e.composedPath()) {
|
|
1834
1855
|
if (!(t instanceof HTMLElement)) continue;
|
|
1835
1856
|
if (t.isContentEditable) return !0;
|
|
@@ -1838,14 +1859,14 @@ function wr(e) {
|
|
|
1838
1859
|
}
|
|
1839
1860
|
return !1;
|
|
1840
1861
|
}
|
|
1841
|
-
function
|
|
1862
|
+
function kr(e, t) {
|
|
1842
1863
|
let n = e.metaKey || e.ctrlKey;
|
|
1843
1864
|
if (n && e.key.toLowerCase() === "s") {
|
|
1844
1865
|
e.preventDefault(), t.onSave?.();
|
|
1845
1866
|
return;
|
|
1846
1867
|
}
|
|
1847
1868
|
if (n && e.key.toLowerCase() === "z") {
|
|
1848
|
-
if (
|
|
1869
|
+
if (Or(e)) return;
|
|
1849
1870
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1850
1871
|
return;
|
|
1851
1872
|
}
|
|
@@ -1853,18 +1874,18 @@ function Tr(e, t) {
|
|
|
1853
1874
|
t.selectBlock(null);
|
|
1854
1875
|
return;
|
|
1855
1876
|
}
|
|
1856
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1877
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Or(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1857
1878
|
}
|
|
1858
1879
|
//#endregion
|
|
1859
1880
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1860
|
-
var
|
|
1881
|
+
var Ar = { class: "tpl:text-center" }, jr = ["href"], Mr = /* @__PURE__ */ B({
|
|
1861
1882
|
__name: "ButtonBlock",
|
|
1862
1883
|
props: {
|
|
1863
1884
|
block: {},
|
|
1864
1885
|
viewport: {}
|
|
1865
1886
|
},
|
|
1866
1887
|
setup(e) {
|
|
1867
|
-
let t = e, n =
|
|
1888
|
+
let t = e, n = O(() => {
|
|
1868
1889
|
let e = {
|
|
1869
1890
|
display: "inline-block",
|
|
1870
1891
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -1878,17 +1899,17 @@ var Er = { class: "tpl:text-center" }, Dr = ["href"], Or = /* @__PURE__ */ B({
|
|
|
1878
1899
|
};
|
|
1879
1900
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1880
1901
|
});
|
|
1881
|
-
return (t, r) => (f(),
|
|
1902
|
+
return (t, r) => (f(), k("div", Ar, [I("a", {
|
|
1882
1903
|
href: e.block.url || "#",
|
|
1883
1904
|
style: L(n.value),
|
|
1884
1905
|
class: "tpl:cursor-default",
|
|
1885
|
-
onClick: r[0] ||=
|
|
1886
|
-
},
|
|
1906
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1907
|
+
}, D(e.block.text), 13, jr)]));
|
|
1887
1908
|
}
|
|
1888
|
-
}),
|
|
1889
|
-
let t =
|
|
1909
|
+
}), Nr = (e) => e === "", Pr = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Fr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ir = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Lr = (e) => {
|
|
1910
|
+
let t = Ir(e);
|
|
1890
1911
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1891
|
-
},
|
|
1912
|
+
}, Rr = {
|
|
1892
1913
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1893
1914
|
width: 24,
|
|
1894
1915
|
height: 24,
|
|
@@ -1898,35 +1919,35 @@ var Er = { class: "tpl:text-center" }, Dr = ["href"], Or = /* @__PURE__ */ B({
|
|
|
1898
1919
|
"stroke-width": 2,
|
|
1899
1920
|
"stroke-linecap": "round",
|
|
1900
1921
|
"stroke-linejoin": "round"
|
|
1901
|
-
},
|
|
1902
|
-
function
|
|
1903
|
-
return v(
|
|
1922
|
+
}, zr = Symbol("lucide-icons");
|
|
1923
|
+
function Br() {
|
|
1924
|
+
return v(zr, {});
|
|
1904
1925
|
}
|
|
1905
1926
|
//#endregion
|
|
1906
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.
|
|
1907
|
-
var
|
|
1908
|
-
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } =
|
|
1909
|
-
let e =
|
|
1910
|
-
return e ? Number(t) * 24 / Number(s ?? d ??
|
|
1927
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.17.0_vue@3.5.35_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
1928
|
+
var Vr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
|
|
1929
|
+
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = Br(), g = O(() => {
|
|
1930
|
+
let e = Nr(n) || Nr(r) || n === !0 || r === !0 || m === !0, t = i || o || p || Rr["stroke-width"];
|
|
1931
|
+
return e ? Number(t) * 24 / Number(s ?? d ?? Rr.width) : t;
|
|
1911
1932
|
});
|
|
1912
1933
|
return a("svg", {
|
|
1913
|
-
...
|
|
1934
|
+
...Rr,
|
|
1914
1935
|
...l,
|
|
1915
|
-
width: s ?? d ??
|
|
1916
|
-
height: s ?? d ??
|
|
1917
|
-
stroke: c ?? f ??
|
|
1936
|
+
width: s ?? d ?? Rr.width,
|
|
1937
|
+
height: s ?? d ?? Rr.height,
|
|
1938
|
+
stroke: c ?? f ?? Rr.stroke,
|
|
1918
1939
|
"stroke-width": g.value,
|
|
1919
|
-
class:
|
|
1940
|
+
class: Pr("lucide", h, ...e ? [`lucide-${Fr(Lr(e))}-icon`, `lucide-${Fr(e)}`] : ["lucide-icon"])
|
|
1920
1941
|
}, [...t.map((e) => a(...e)), ...u.default ? [u.default()] : []]);
|
|
1921
|
-
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(
|
|
1942
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(Vr, {
|
|
1922
1943
|
...i,
|
|
1923
1944
|
...n,
|
|
1924
1945
|
iconNode: t,
|
|
1925
1946
|
name: e
|
|
1926
|
-
}, r.default ? { default: r.default } : void 0),
|
|
1947
|
+
}, r.default ? { default: r.default } : void 0), Hr = X("bookmark", [["path", {
|
|
1927
1948
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
1928
1949
|
key: "oz39mx"
|
|
1929
|
-
}]]),
|
|
1950
|
+
}]]), Ur = X("box", [
|
|
1930
1951
|
["path", {
|
|
1931
1952
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1932
1953
|
key: "hh9hay"
|
|
@@ -1939,22 +1960,22 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1939
1960
|
d: "M12 22V12",
|
|
1940
1961
|
key: "d0xqtd"
|
|
1941
1962
|
}]
|
|
1942
|
-
]),
|
|
1963
|
+
]), Wr = X("check", [["path", {
|
|
1943
1964
|
d: "M20 6 9 17l-5-5",
|
|
1944
1965
|
key: "1gmf2c"
|
|
1945
|
-
}]]),
|
|
1966
|
+
}]]), Gr = X("chevron-down", [["path", {
|
|
1946
1967
|
d: "m6 9 6 6 6-6",
|
|
1947
1968
|
key: "qrunsl"
|
|
1948
|
-
}]]),
|
|
1969
|
+
}]]), Kr = X("chevron-left", [["path", {
|
|
1949
1970
|
d: "m15 18-6-6 6-6",
|
|
1950
1971
|
key: "1wnfg3"
|
|
1951
|
-
}]]),
|
|
1972
|
+
}]]), qr = X("chevron-right", [["path", {
|
|
1952
1973
|
d: "m9 18 6-6-6-6",
|
|
1953
1974
|
key: "mthhwq"
|
|
1954
|
-
}]]),
|
|
1975
|
+
}]]), Jr = X("chevron-up", [["path", {
|
|
1955
1976
|
d: "m18 15-6-6-6 6",
|
|
1956
1977
|
key: "153udz"
|
|
1957
|
-
}]]),
|
|
1978
|
+
}]]), Yr = X("circle-alert", [
|
|
1958
1979
|
["circle", {
|
|
1959
1980
|
cx: "12",
|
|
1960
1981
|
cy: "12",
|
|
@@ -1975,7 +1996,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1975
1996
|
y2: "16",
|
|
1976
1997
|
key: "4dfq90"
|
|
1977
1998
|
}]
|
|
1978
|
-
]),
|
|
1999
|
+
]), Xr = X("circle-check", [["circle", {
|
|
1979
2000
|
cx: "12",
|
|
1980
2001
|
cy: "12",
|
|
1981
2002
|
r: "10",
|
|
@@ -1983,7 +2004,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1983
2004
|
}], ["path", {
|
|
1984
2005
|
d: "m9 12 2 2 4-4",
|
|
1985
2006
|
key: "dzmm74"
|
|
1986
|
-
}]]),
|
|
2007
|
+
}]]), Zr = X("clock", [["circle", {
|
|
1987
2008
|
cx: "12",
|
|
1988
2009
|
cy: "12",
|
|
1989
2010
|
r: "10",
|
|
@@ -1991,13 +2012,13 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1991
2012
|
}], ["path", {
|
|
1992
2013
|
d: "M12 6v6l4 2",
|
|
1993
2014
|
key: "mmk7yg"
|
|
1994
|
-
}]]),
|
|
2015
|
+
}]]), Qr = X("code", [["path", {
|
|
1995
2016
|
d: "m16 18 6-6-6-6",
|
|
1996
2017
|
key: "eg8j8"
|
|
1997
2018
|
}], ["path", {
|
|
1998
2019
|
d: "m8 6-6 6 6 6",
|
|
1999
2020
|
key: "ppft3o"
|
|
2000
|
-
}]]),
|
|
2021
|
+
}]]), $r = X("copy", [["rect", {
|
|
2001
2022
|
width: "14",
|
|
2002
2023
|
height: "14",
|
|
2003
2024
|
x: "8",
|
|
@@ -2008,7 +2029,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2008
2029
|
}], ["path", {
|
|
2009
2030
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
2010
2031
|
key: "zix9uf"
|
|
2011
|
-
}]]),
|
|
2032
|
+
}]]), ei = X("eye-off", [
|
|
2012
2033
|
["path", {
|
|
2013
2034
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
2014
2035
|
key: "ct8e1f"
|
|
@@ -2025,7 +2046,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2025
2046
|
d: "m2 2 20 20",
|
|
2026
2047
|
key: "1ooewy"
|
|
2027
2048
|
}]
|
|
2028
|
-
]),
|
|
2049
|
+
]), ti = X("eye", [["path", {
|
|
2029
2050
|
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
2030
2051
|
key: "1nclc0"
|
|
2031
2052
|
}], ["circle", {
|
|
@@ -2033,7 +2054,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2033
2054
|
cy: "12",
|
|
2034
2055
|
r: "3",
|
|
2035
2056
|
key: "1v7zrd"
|
|
2036
|
-
}]]),
|
|
2057
|
+
}]]), ni = X("file-image", [
|
|
2037
2058
|
["path", {
|
|
2038
2059
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
2039
2060
|
key: "1oefj6"
|
|
@@ -2052,7 +2073,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2052
2073
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
2053
2074
|
key: "wt3hpn"
|
|
2054
2075
|
}]
|
|
2055
|
-
]),
|
|
2076
|
+
]), ri = X("file-text", [
|
|
2056
2077
|
["path", {
|
|
2057
2078
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
2058
2079
|
key: "1oefj6"
|
|
@@ -2073,10 +2094,10 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2073
2094
|
d: "M16 17H8",
|
|
2074
2095
|
key: "z1uh3a"
|
|
2075
2096
|
}]
|
|
2076
|
-
]),
|
|
2097
|
+
]), ii = X("funnel", [["path", {
|
|
2077
2098
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
2078
2099
|
key: "sc7q7i"
|
|
2079
|
-
}]]),
|
|
2100
|
+
}]]), ai = X("grip-vertical", [
|
|
2080
2101
|
["circle", {
|
|
2081
2102
|
cx: "9",
|
|
2082
2103
|
cy: "12",
|
|
@@ -2113,7 +2134,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2113
2134
|
r: "1",
|
|
2114
2135
|
key: "f4zoj3"
|
|
2115
2136
|
}]
|
|
2116
|
-
]),
|
|
2137
|
+
]), oi = X("image-up", [
|
|
2117
2138
|
["path", {
|
|
2118
2139
|
d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
|
|
2119
2140
|
key: "9csbqa"
|
|
@@ -2132,7 +2153,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2132
2153
|
r: "2",
|
|
2133
2154
|
key: "af1f0g"
|
|
2134
2155
|
}]
|
|
2135
|
-
]),
|
|
2156
|
+
]), si = X("image", [
|
|
2136
2157
|
["rect", {
|
|
2137
2158
|
width: "18",
|
|
2138
2159
|
height: "18",
|
|
@@ -2152,7 +2173,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2152
2173
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
2153
2174
|
key: "1xmnt7"
|
|
2154
2175
|
}]
|
|
2155
|
-
]),
|
|
2176
|
+
]), ci = X("info", [
|
|
2156
2177
|
["circle", {
|
|
2157
2178
|
cx: "12",
|
|
2158
2179
|
cy: "12",
|
|
@@ -2167,31 +2188,31 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2167
2188
|
d: "M12 8h.01",
|
|
2168
2189
|
key: "e9boi3"
|
|
2169
2190
|
}]
|
|
2170
|
-
]),
|
|
2191
|
+
]), li = X("loader-circle", [["path", {
|
|
2171
2192
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
2172
2193
|
key: "13zald"
|
|
2173
|
-
}]]),
|
|
2194
|
+
}]]), ui = X("message-circle", [["path", {
|
|
2174
2195
|
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
2175
2196
|
key: "1sd12s"
|
|
2176
|
-
}]]),
|
|
2197
|
+
}]]), di = X("navigation", [["polygon", {
|
|
2177
2198
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
2178
2199
|
key: "1ltx0t"
|
|
2179
|
-
}]]),
|
|
2200
|
+
}]]), fi = X("pencil", [["path", {
|
|
2180
2201
|
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
2181
2202
|
key: "1a8usu"
|
|
2182
2203
|
}], ["path", {
|
|
2183
2204
|
d: "m15 5 4 4",
|
|
2184
2205
|
key: "1mk7zo"
|
|
2185
|
-
}]]),
|
|
2206
|
+
}]]), pi = X("puzzle", [["path", {
|
|
2186
2207
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
2187
2208
|
key: "w46dr5"
|
|
2188
|
-
}]]),
|
|
2209
|
+
}]]), mi = X("redo-2", [["path", {
|
|
2189
2210
|
d: "m15 14 5-5-5-5",
|
|
2190
2211
|
key: "12vg1m"
|
|
2191
2212
|
}], ["path", {
|
|
2192
2213
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
2193
2214
|
key: "6uklza"
|
|
2194
|
-
}]]),
|
|
2215
|
+
}]]), hi = X("refresh-cw", [
|
|
2195
2216
|
["path", {
|
|
2196
2217
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
2197
2218
|
key: "v9h5vc"
|
|
@@ -2208,19 +2229,19 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2208
2229
|
d: "M8 16H3v5",
|
|
2209
2230
|
key: "1cv678"
|
|
2210
2231
|
}]
|
|
2211
|
-
]),
|
|
2232
|
+
]), gi = X("reply", [["path", {
|
|
2212
2233
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
2213
2234
|
key: "5vmcpk"
|
|
2214
2235
|
}], ["path", {
|
|
2215
2236
|
d: "m9 17-5-5 5-5",
|
|
2216
2237
|
key: "nvlc11"
|
|
2217
|
-
}]]),
|
|
2238
|
+
}]]), _i = X("send", [["path", {
|
|
2218
2239
|
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
2219
2240
|
key: "1ffxy3"
|
|
2220
2241
|
}], ["path", {
|
|
2221
2242
|
d: "m21.854 2.147-10.94 10.939",
|
|
2222
2243
|
key: "12cjpa"
|
|
2223
|
-
}]]),
|
|
2244
|
+
}]]), vi = X("share-2", [
|
|
2224
2245
|
["circle", {
|
|
2225
2246
|
cx: "18",
|
|
2226
2247
|
cy: "5",
|
|
@@ -2253,13 +2274,13 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2253
2274
|
y2: "10.49",
|
|
2254
2275
|
key: "1n3mei"
|
|
2255
2276
|
}]
|
|
2256
|
-
]),
|
|
2277
|
+
]), yi = X("shield-check", [["path", {
|
|
2257
2278
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
2258
2279
|
key: "oel41y"
|
|
2259
2280
|
}], ["path", {
|
|
2260
2281
|
d: "m9 12 2 2 4-4",
|
|
2261
2282
|
key: "dzmm74"
|
|
2262
|
-
}]]),
|
|
2283
|
+
}]]), bi = X("shield-x", [
|
|
2263
2284
|
["path", {
|
|
2264
2285
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
2265
2286
|
key: "oel41y"
|
|
@@ -2272,7 +2293,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2272
2293
|
d: "m9.5 9.5 5 5",
|
|
2273
2294
|
key: "18nt4w"
|
|
2274
2295
|
}]
|
|
2275
|
-
]),
|
|
2296
|
+
]), xi = X("sparkles", [
|
|
2276
2297
|
["path", {
|
|
2277
2298
|
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
2278
2299
|
key: "1s2grr"
|
|
@@ -2291,7 +2312,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2291
2312
|
r: "2",
|
|
2292
2313
|
key: "6kqj1y"
|
|
2293
2314
|
}]
|
|
2294
|
-
]),
|
|
2315
|
+
]), Si = X("table", [
|
|
2295
2316
|
["path", {
|
|
2296
2317
|
d: "M12 3v18",
|
|
2297
2318
|
key: "108xh3"
|
|
@@ -2312,7 +2333,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2312
2333
|
d: "M3 15h18",
|
|
2313
2334
|
key: "5xshup"
|
|
2314
2335
|
}]
|
|
2315
|
-
]),
|
|
2336
|
+
]), Ci = X("trash-2", [
|
|
2316
2337
|
["path", {
|
|
2317
2338
|
d: "M10 11v6",
|
|
2318
2339
|
key: "nco0om"
|
|
@@ -2333,7 +2354,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2333
2354
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2334
2355
|
key: "e791ji"
|
|
2335
2356
|
}]
|
|
2336
|
-
]),
|
|
2357
|
+
]), wi = X("triangle-alert", [
|
|
2337
2358
|
["path", {
|
|
2338
2359
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
2339
2360
|
key: "wmoenq"
|
|
@@ -2346,13 +2367,13 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2346
2367
|
d: "M12 17h.01",
|
|
2347
2368
|
key: "p32p05"
|
|
2348
2369
|
}]
|
|
2349
|
-
]),
|
|
2370
|
+
]), Ti = X("undo-2", [["path", {
|
|
2350
2371
|
d: "M9 14 4 9l5-5",
|
|
2351
2372
|
key: "102s5s"
|
|
2352
2373
|
}], ["path", {
|
|
2353
2374
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2354
2375
|
key: "f3b9sd"
|
|
2355
|
-
}]]),
|
|
2376
|
+
}]]), Ei = X("upload", [
|
|
2356
2377
|
["path", {
|
|
2357
2378
|
d: "M12 3v12",
|
|
2358
2379
|
key: "1x0j5s"
|
|
@@ -2365,7 +2386,7 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2365
2386
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2366
2387
|
key: "ih7n3h"
|
|
2367
2388
|
}]
|
|
2368
|
-
]),
|
|
2389
|
+
]), Di = X("video", [["path", {
|
|
2369
2390
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2370
2391
|
key: "ftymec"
|
|
2371
2392
|
}], ["rect", {
|
|
@@ -2375,28 +2396,28 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2375
2396
|
height: "12",
|
|
2376
2397
|
rx: "2",
|
|
2377
2398
|
key: "158x01"
|
|
2378
|
-
}]]),
|
|
2399
|
+
}]]), Oi = X("x", [["path", {
|
|
2379
2400
|
d: "M18 6 6 18",
|
|
2380
2401
|
key: "1bl5f8"
|
|
2381
2402
|
}], ["path", {
|
|
2382
2403
|
d: "m6 6 12 12",
|
|
2383
2404
|
key: "d8bk6v"
|
|
2384
|
-
}]]),
|
|
2405
|
+
}]]), ki = X("zap", [["path", {
|
|
2385
2406
|
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
2386
2407
|
key: "1xq2db"
|
|
2387
|
-
}]]),
|
|
2408
|
+
}]]), Ai = ["innerHTML"], ji = [
|
|
2388
2409
|
"src",
|
|
2389
2410
|
"width",
|
|
2390
2411
|
"height"
|
|
2391
|
-
],
|
|
2412
|
+
], Mi = /* @__PURE__ */ B({
|
|
2392
2413
|
__name: "CustomBlockIcon",
|
|
2393
2414
|
props: {
|
|
2394
2415
|
icon: {},
|
|
2395
2416
|
size: {}
|
|
2396
2417
|
},
|
|
2397
2418
|
setup(e) {
|
|
2398
|
-
let t = e, n =
|
|
2399
|
-
return (t, a) => r.value ? (f(),
|
|
2419
|
+
let t = e, n = O(() => t.size ?? 20), r = O(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = O(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
2420
|
+
return (t, a) => r.value ? (f(), k("span", {
|
|
2400
2421
|
key: 0,
|
|
2401
2422
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
2402
2423
|
style: L({
|
|
@@ -2404,40 +2425,40 @@ var Lr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2404
2425
|
height: `${n.value}px`
|
|
2405
2426
|
}),
|
|
2406
2427
|
innerHTML: e.icon
|
|
2407
|
-
}, null, 12,
|
|
2428
|
+
}, null, 12, Ai)) : i.value ? (f(), k("img", {
|
|
2408
2429
|
key: 1,
|
|
2409
2430
|
src: e.icon,
|
|
2410
2431
|
width: n.value,
|
|
2411
2432
|
height: n.value,
|
|
2412
2433
|
class: "tpl:inline-block",
|
|
2413
2434
|
alt: ""
|
|
2414
|
-
}, null, 8,
|
|
2435
|
+
}, null, 8, ji)) : (f(), N(j(Ur), {
|
|
2415
2436
|
key: 2,
|
|
2416
2437
|
size: n.value,
|
|
2417
2438
|
"stroke-width": 1.5
|
|
2418
2439
|
}, null, 8, ["size"]));
|
|
2419
2440
|
}
|
|
2420
|
-
}),
|
|
2441
|
+
}), Ni = (e, t) => {
|
|
2421
2442
|
let n = e.__vccOpts || e;
|
|
2422
2443
|
for (let [e, r] of t) n[e] = r;
|
|
2423
2444
|
return n;
|
|
2424
|
-
},
|
|
2425
|
-
function
|
|
2426
|
-
return f(),
|
|
2445
|
+
}, Pi = {}, Fi = { class: "tpl-loading-track" };
|
|
2446
|
+
function Ii(e, t) {
|
|
2447
|
+
return f(), k("div", Fi);
|
|
2427
2448
|
}
|
|
2428
|
-
var
|
|
2449
|
+
var Li = /* @__PURE__ */ Ni(Pi, [["render", Ii], ["__scopeId", "data-v-1ed538ec"]]);
|
|
2429
2450
|
//#endregion
|
|
2430
2451
|
//#region src/composables/useEditorRoot.ts
|
|
2431
|
-
function
|
|
2432
|
-
return v(
|
|
2452
|
+
function Ri() {
|
|
2453
|
+
return v(rr, document) ?? document;
|
|
2433
2454
|
}
|
|
2434
2455
|
//#endregion
|
|
2435
2456
|
//#region src/composables/useFocusTrap.ts
|
|
2436
|
-
var
|
|
2437
|
-
function
|
|
2438
|
-
let n =
|
|
2457
|
+
var zi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2458
|
+
function Bi(e, t) {
|
|
2459
|
+
let n = Ri(), r = null, i = null, a = null;
|
|
2439
2460
|
function o() {
|
|
2440
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2461
|
+
return e.value ? Array.from(e.value.querySelectorAll(zi)).filter((e) => e.offsetParent !== null) : [];
|
|
2441
2462
|
}
|
|
2442
2463
|
function s(e) {
|
|
2443
2464
|
if (e.key !== "Tab") return;
|
|
@@ -2467,18 +2488,18 @@ function Ii(e, t) {
|
|
|
2467
2488
|
}
|
|
2468
2489
|
//#endregion
|
|
2469
2490
|
//#region src/composables/useCloudI18n.ts
|
|
2470
|
-
function
|
|
2491
|
+
function Vi(e, t) {
|
|
2471
2492
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2472
2493
|
}
|
|
2473
|
-
function
|
|
2474
|
-
let t = e ?? v(
|
|
2494
|
+
function Hi(e) {
|
|
2495
|
+
let t = e ?? v(ur, null);
|
|
2475
2496
|
return {
|
|
2476
2497
|
t: t ? u(t) ? t.value : t : null,
|
|
2477
|
-
format:
|
|
2498
|
+
format: Vi
|
|
2478
2499
|
};
|
|
2479
2500
|
}
|
|
2480
|
-
function
|
|
2481
|
-
let { t, format: n } =
|
|
2501
|
+
function Ui(e) {
|
|
2502
|
+
let { t, format: n } = Hi(e);
|
|
2482
2503
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2483
2504
|
return {
|
|
2484
2505
|
t,
|
|
@@ -2487,8 +2508,8 @@ function zi(e) {
|
|
|
2487
2508
|
}
|
|
2488
2509
|
//#endregion
|
|
2489
2510
|
//#region src/composables/useMergeTag.ts
|
|
2490
|
-
function
|
|
2491
|
-
let e = v(
|
|
2511
|
+
function Wi() {
|
|
2512
|
+
let e = v(Kn, []), t = v(qn, lt.liquid), n = v(Jn, null), r = v(Yn, !0), i = v(Xn, null), a = C(!1);
|
|
2492
2513
|
function o(e) {
|
|
2493
2514
|
return mt(e, t);
|
|
2494
2515
|
}
|
|
@@ -2527,7 +2548,7 @@ function Bi() {
|
|
|
2527
2548
|
}
|
|
2528
2549
|
//#endregion
|
|
2529
2550
|
//#region src/composables/useEmoji.ts
|
|
2530
|
-
function
|
|
2551
|
+
function Gi() {
|
|
2531
2552
|
let [e, t] = sn(!1), r = n([]), i = !1;
|
|
2532
2553
|
l(() => {
|
|
2533
2554
|
i = !0;
|
|
@@ -2553,7 +2574,7 @@ function Vi() {
|
|
|
2553
2574
|
}
|
|
2554
2575
|
//#endregion
|
|
2555
2576
|
//#region src/composables/useDragDrop.ts
|
|
2556
|
-
function
|
|
2577
|
+
function Ki(e) {
|
|
2557
2578
|
let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
|
|
2558
2579
|
function o(e) {
|
|
2559
2580
|
r.value = !0, i.value = e;
|
|
@@ -2603,7 +2624,7 @@ function Hi(e) {
|
|
|
2603
2624
|
}
|
|
2604
2625
|
//#endregion
|
|
2605
2626
|
//#region src/composables/useFonts.ts
|
|
2606
|
-
var
|
|
2627
|
+
var qi = [
|
|
2607
2628
|
{
|
|
2608
2629
|
value: "Arial",
|
|
2609
2630
|
label: "Arial"
|
|
@@ -2632,7 +2653,7 @@ var Ui = [
|
|
|
2632
2653
|
value: "Courier New",
|
|
2633
2654
|
label: "Courier New"
|
|
2634
2655
|
}
|
|
2635
|
-
],
|
|
2656
|
+
], Ji = {
|
|
2636
2657
|
arial: "Arial, sans-serif",
|
|
2637
2658
|
helvetica: "Helvetica, sans-serif",
|
|
2638
2659
|
georgia: "Georgia, serif",
|
|
@@ -2640,14 +2661,14 @@ var Ui = [
|
|
|
2640
2661
|
verdana: "Verdana, sans-serif",
|
|
2641
2662
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2642
2663
|
"courier new": "'Courier New', monospace"
|
|
2643
|
-
},
|
|
2644
|
-
function
|
|
2645
|
-
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i =
|
|
2664
|
+
}, Yi = "Arial, sans-serif";
|
|
2665
|
+
function Xi(e) {
|
|
2666
|
+
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ?? Yi);
|
|
2646
2667
|
function a(e) {
|
|
2647
2668
|
n.value = e;
|
|
2648
2669
|
}
|
|
2649
|
-
let o =
|
|
2650
|
-
let e = [...
|
|
2670
|
+
let o = O(() => {
|
|
2671
|
+
let e = [...qi];
|
|
2651
2672
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2652
2673
|
let r = t.value.map((e) => ({
|
|
2653
2674
|
value: e.name,
|
|
@@ -2660,23 +2681,23 @@ function Ki(e) {
|
|
|
2660
2681
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2661
2682
|
}
|
|
2662
2683
|
function u(e) {
|
|
2663
|
-
return
|
|
2684
|
+
return qi.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2664
2685
|
}
|
|
2665
2686
|
function d() {
|
|
2666
2687
|
if (e?.defaultFont) {
|
|
2667
|
-
if (!n.value && !u(e.defaultFont)) return
|
|
2688
|
+
if (!n.value && !u(e.defaultFont)) return Yi;
|
|
2668
2689
|
if (c(e.defaultFont)) {
|
|
2669
2690
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2670
2691
|
if (t) return t.value;
|
|
2671
2692
|
}
|
|
2672
2693
|
}
|
|
2673
|
-
return
|
|
2694
|
+
return Yi;
|
|
2674
2695
|
}
|
|
2675
|
-
let f =
|
|
2696
|
+
let f = O(() => d());
|
|
2676
2697
|
function p(e) {
|
|
2677
2698
|
if (!e) return i.value;
|
|
2678
2699
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2679
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2700
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Ji[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2680
2701
|
}
|
|
2681
2702
|
let m = [], h = !1;
|
|
2682
2703
|
async function g() {
|
|
@@ -2692,7 +2713,7 @@ function Ki(e) {
|
|
|
2692
2713
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2693
2714
|
});
|
|
2694
2715
|
} catch (t) {
|
|
2695
|
-
|
|
2716
|
+
xr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2696
2717
|
}
|
|
2697
2718
|
});
|
|
2698
2719
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -2719,9 +2740,9 @@ function Ki(e) {
|
|
|
2719
2740
|
}
|
|
2720
2741
|
//#endregion
|
|
2721
2742
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2722
|
-
function
|
|
2743
|
+
function Zi(e) {
|
|
2723
2744
|
let t = C(!1), n = C(""), r = C(null);
|
|
2724
|
-
|
|
2745
|
+
Bi(r, t);
|
|
2725
2746
|
function i() {
|
|
2726
2747
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
2727
2748
|
}
|
|
@@ -2772,10 +2793,10 @@ function qi(e) {
|
|
|
2772
2793
|
}
|
|
2773
2794
|
//#endregion
|
|
2774
2795
|
//#region src/composables/useRichTextEditor.ts
|
|
2775
|
-
function
|
|
2776
|
-
let t = v(Fn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } =
|
|
2777
|
-
async function
|
|
2778
|
-
|
|
2796
|
+
function Qi(e) {
|
|
2797
|
+
let t = v(Fn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Wi(), l = v(Pn, null), d = (u(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = dt(s), p = n(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S } = Zi(p), { start: w, stop: ee } = on(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), T = n(null), E = C(!0), D = C(null), te = !1;
|
|
2798
|
+
async function ne() {
|
|
2799
|
+
D.value = null, E.value = !0;
|
|
2779
2800
|
try {
|
|
2780
2801
|
let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
|
|
2781
2802
|
mergeTags: r,
|
|
@@ -2784,8 +2805,8 @@ function Ji(e) {
|
|
|
2784
2805
|
autocompleteEnabled: c,
|
|
2785
2806
|
suggestionEmptyText: d
|
|
2786
2807
|
});
|
|
2787
|
-
if (
|
|
2788
|
-
|
|
2808
|
+
if (te) return;
|
|
2809
|
+
T.value = i;
|
|
2789
2810
|
let o = /* @__PURE__ */ new Map();
|
|
2790
2811
|
a.forEach((e, t) => o.set(e.name, t));
|
|
2791
2812
|
let l = new n({
|
|
@@ -2793,47 +2814,47 @@ function Ji(e) {
|
|
|
2793
2814
|
content: e.blockContent(),
|
|
2794
2815
|
editable: !0,
|
|
2795
2816
|
onUpdate: ({ editor: n }) => {
|
|
2796
|
-
|
|
2817
|
+
te || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
2797
2818
|
}
|
|
2798
2819
|
});
|
|
2799
|
-
if (
|
|
2820
|
+
if (te) {
|
|
2800
2821
|
l.destroy();
|
|
2801
2822
|
return;
|
|
2802
2823
|
}
|
|
2803
|
-
p.value = l,
|
|
2824
|
+
p.value = l, E.value = !1, w();
|
|
2804
2825
|
} catch (t) {
|
|
2805
|
-
if (
|
|
2806
|
-
|
|
2826
|
+
if (te) return;
|
|
2827
|
+
xr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), D.value = t instanceof Error ? t.message : "Failed to load editor", E.value = !1;
|
|
2807
2828
|
}
|
|
2808
2829
|
}
|
|
2809
|
-
function
|
|
2810
|
-
p.value?.destroy(), p.value = null,
|
|
2830
|
+
function O() {
|
|
2831
|
+
p.value?.destroy(), p.value = null, ne();
|
|
2811
2832
|
}
|
|
2812
|
-
|
|
2813
|
-
let
|
|
2833
|
+
ne();
|
|
2834
|
+
let k = H(() => e.blockContent(), (e) => {
|
|
2814
2835
|
p.value && p.value.getHTML() !== e && p.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2815
2836
|
});
|
|
2816
|
-
function
|
|
2837
|
+
function A(t) {
|
|
2817
2838
|
if (a.value) return;
|
|
2818
2839
|
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
2819
2840
|
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
2820
2841
|
}
|
|
2821
|
-
q(document, "mousedown",
|
|
2822
|
-
|
|
2842
|
+
q(document, "mousedown", A), re(() => {
|
|
2843
|
+
te = !0, k(), ee(), p.value?.destroy();
|
|
2823
2844
|
});
|
|
2824
|
-
async function
|
|
2845
|
+
async function j() {
|
|
2825
2846
|
let e = await o();
|
|
2826
|
-
|
|
2847
|
+
te || (e && p.value ? p.value.chain().focus().insertMergeTag({
|
|
2827
2848
|
label: e.label,
|
|
2828
2849
|
value: e.value
|
|
2829
2850
|
}).run() : p.value?.commands.focus());
|
|
2830
2851
|
}
|
|
2831
2852
|
return {
|
|
2832
2853
|
editor: p,
|
|
2833
|
-
EditorContent:
|
|
2834
|
-
isLoading:
|
|
2835
|
-
initError:
|
|
2836
|
-
retry:
|
|
2854
|
+
EditorContent: T,
|
|
2855
|
+
isLoading: E,
|
|
2856
|
+
initError: D,
|
|
2857
|
+
retry: O,
|
|
2837
2858
|
showLinkDialog: m,
|
|
2838
2859
|
linkUrl: h,
|
|
2839
2860
|
linkDialogRef: g,
|
|
@@ -2846,25 +2867,25 @@ function Ji(e) {
|
|
|
2846
2867
|
removeLink: b,
|
|
2847
2868
|
closeLinkDialog: x,
|
|
2848
2869
|
handleLinkKeydown: S,
|
|
2849
|
-
handleAddMergeTag:
|
|
2870
|
+
handleAddMergeTag: j
|
|
2850
2871
|
};
|
|
2851
2872
|
}
|
|
2852
2873
|
//#endregion
|
|
2853
2874
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2854
|
-
var
|
|
2875
|
+
var $i = { class: "tpl:w-full" }, ea = {
|
|
2855
2876
|
key: 0,
|
|
2856
2877
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
2857
|
-
},
|
|
2878
|
+
}, ta = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, na = {
|
|
2858
2879
|
key: 1,
|
|
2859
2880
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
2860
|
-
},
|
|
2881
|
+
}, ra = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ia = {
|
|
2861
2882
|
key: 2,
|
|
2862
2883
|
class: "tpl:relative"
|
|
2863
|
-
},
|
|
2884
|
+
}, aa = ["innerHTML"], oa = {
|
|
2864
2885
|
key: 0,
|
|
2865
2886
|
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]",
|
|
2866
2887
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2867
|
-
},
|
|
2888
|
+
}, sa = /* @__PURE__ */ B({
|
|
2868
2889
|
__name: "CustomBlock",
|
|
2869
2890
|
props: {
|
|
2870
2891
|
block: {},
|
|
@@ -2872,9 +2893,9 @@ var Yi = { class: "tpl:w-full" }, Xi = {
|
|
|
2872
2893
|
},
|
|
2873
2894
|
emits: ["fetchData"],
|
|
2874
2895
|
setup(e, { emit: t }) {
|
|
2875
|
-
let n = e, i = t, { t: a } = Y(), o = v(Un, null), s = C(""), c = C(!1), l =
|
|
2896
|
+
let n = e, i = t, { t: a } = Y(), o = v(Un, null), s = C(""), c = C(!1), l = O(() => o?.getDefinition(n.block.customType)), u = O(() => !!l.value), { isFetching: d, fetch: p, needsFetch: m, hasDataSource: h } = Nt({
|
|
2876
2897
|
definition: l,
|
|
2877
|
-
block:
|
|
2898
|
+
block: O(() => n.block),
|
|
2878
2899
|
onUpdate: (e, t) => {
|
|
2879
2900
|
i("fetchData", {
|
|
2880
2901
|
fieldValues: e,
|
|
@@ -2898,80 +2919,80 @@ var Yi = { class: "tpl:w-full" }, Xi = {
|
|
|
2898
2919
|
g();
|
|
2899
2920
|
}), H(() => n.block.fieldValues, () => {
|
|
2900
2921
|
_();
|
|
2901
|
-
}, { deep: !0 }), (e, t) => (f(),
|
|
2922
|
+
}, { deep: !0 }), (e, t) => (f(), k("div", $i, [u.value ? c.value ? (f(), k("div", na, [V(j(wi), {
|
|
2902
2923
|
size: 24,
|
|
2903
2924
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2904
|
-
}), I("span",
|
|
2925
|
+
}), I("span", ra, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", ia, [I("div", { innerHTML: s.value }, null, 8, aa), j(h) && j(m) ? (f(), k("div", oa, [j(d) ? (f(), N(Li, {
|
|
2905
2926
|
key: 1,
|
|
2906
2927
|
class: "tpl:w-48"
|
|
2907
|
-
})) : (f(),
|
|
2928
|
+
})) : (f(), k("button", {
|
|
2908
2929
|
key: 0,
|
|
2909
2930
|
type: "button",
|
|
2910
2931
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
2911
|
-
onClick: t[0] ||=
|
|
2912
|
-
}, [l.value?.icon ? (f(),
|
|
2932
|
+
onClick: t[0] ||= M((...e) => j(p) && j(p)(...e), ["stop"])
|
|
2933
|
+
}, [l.value?.icon ? (f(), N(Mi, {
|
|
2913
2934
|
key: 0,
|
|
2914
2935
|
icon: l.value.icon,
|
|
2915
2936
|
size: 16
|
|
2916
|
-
}, null, 8, ["icon"])) :
|
|
2937
|
+
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", ea, [V(j(pi), {
|
|
2917
2938
|
size: 24,
|
|
2918
2939
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2919
|
-
}), I("span",
|
|
2940
|
+
}), I("span", ta, D(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2920
2941
|
}
|
|
2921
|
-
}),
|
|
2942
|
+
}), ca = { class: "tpl:w-full" }, la = /* @__PURE__ */ B({
|
|
2922
2943
|
__name: "DividerBlock",
|
|
2923
2944
|
props: {
|
|
2924
2945
|
block: {},
|
|
2925
2946
|
viewport: {}
|
|
2926
2947
|
},
|
|
2927
2948
|
setup(e) {
|
|
2928
|
-
let t = e, n =
|
|
2949
|
+
let t = e, n = O(() => ({
|
|
2929
2950
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
2930
2951
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2931
2952
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2932
2953
|
}));
|
|
2933
|
-
return (e, t) => (f(),
|
|
2954
|
+
return (e, t) => (f(), k("div", ca, [I("hr", {
|
|
2934
2955
|
class: "tpl:m-0 tpl:border-none",
|
|
2935
2956
|
style: L(n.value)
|
|
2936
2957
|
}, null, 4)]));
|
|
2937
2958
|
}
|
|
2938
|
-
}),
|
|
2959
|
+
}), ua = { class: "tpl:w-full" }, da = { 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)]" }, fa = {
|
|
2939
2960
|
key: 0,
|
|
2940
2961
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2941
|
-
},
|
|
2962
|
+
}, pa = {
|
|
2942
2963
|
key: 1,
|
|
2943
2964
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2944
|
-
},
|
|
2965
|
+
}, ma = /* @__PURE__ */ B({
|
|
2945
2966
|
__name: "HtmlBlock",
|
|
2946
2967
|
props: {
|
|
2947
2968
|
block: {},
|
|
2948
2969
|
viewport: {}
|
|
2949
2970
|
},
|
|
2950
2971
|
setup(e) {
|
|
2951
|
-
let t = e, { t: n } = Y(), r =
|
|
2952
|
-
return (e, t) => (f(),
|
|
2972
|
+
let t = e, { t: n } = Y(), r = O(() => t.block.content.trim().length > 0);
|
|
2973
|
+
return (e, t) => (f(), k("div", ua, [I("div", da, [V(j(Qr), {
|
|
2953
2974
|
size: 24,
|
|
2954
2975
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2955
|
-
}), r.value ? (f(),
|
|
2976
|
+
}), r.value ? (f(), k("span", fa, D(j(n).html.preview), 1)) : (f(), k("span", pa, D(j(n).html.empty), 1))])]));
|
|
2956
2977
|
}
|
|
2957
2978
|
});
|
|
2958
2979
|
//#endregion
|
|
2959
2980
|
//#region src/composables/useAliveFlag.ts
|
|
2960
|
-
function
|
|
2981
|
+
function ha() {
|
|
2961
2982
|
let e = { alive: !0 };
|
|
2962
|
-
return
|
|
2983
|
+
return re(() => {
|
|
2963
2984
|
e.alive = !1;
|
|
2964
2985
|
}), e;
|
|
2965
2986
|
}
|
|
2966
2987
|
//#endregion
|
|
2967
2988
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2968
|
-
var
|
|
2989
|
+
var ga = ["href"], _a = ["src", "alt"], va = ["src", "alt"], ya = {
|
|
2969
2990
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2970
2991
|
style: { opacity: "0.7" }
|
|
2971
|
-
},
|
|
2992
|
+
}, ba = ["href"], xa = ["src", "alt"], Sa = ["src", "alt"], Ca = {
|
|
2972
2993
|
key: 3,
|
|
2973
2994
|
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)]"
|
|
2974
|
-
},
|
|
2995
|
+
}, wa = ["aria-label"], Ta = { key: 1 }, Ea = /* @__PURE__ */ B({
|
|
2975
2996
|
__name: "ImageBlock",
|
|
2976
2997
|
props: {
|
|
2977
2998
|
block: {},
|
|
@@ -2979,7 +3000,7 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
2979
3000
|
},
|
|
2980
3001
|
emits: ["update"],
|
|
2981
3002
|
setup(e, { emit: t }) {
|
|
2982
|
-
let n = e, r = t, { t: i } = Y(), { syntax: a } =
|
|
3003
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = Wi(), o = v(Zn, null), s = O(() => !!o), c = ha();
|
|
2983
3004
|
async function l() {
|
|
2984
3005
|
let e = await o?.({ accept: ["images"] });
|
|
2985
3006
|
if (c.alive && e) {
|
|
@@ -2987,7 +3008,7 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
2987
3008
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
2988
3009
|
}
|
|
2989
3010
|
}
|
|
2990
|
-
let u =
|
|
3011
|
+
let u = O(() => ({ textAlign: n.block.align })), d = O(() => {
|
|
2991
3012
|
let e = n.block.align;
|
|
2992
3013
|
return {
|
|
2993
3014
|
maxWidth: "100%",
|
|
@@ -2996,76 +3017,76 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
2996
3017
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2997
3018
|
marginRight: e === "center" ? "auto" : void 0
|
|
2998
3019
|
};
|
|
2999
|
-
}), p =
|
|
3000
|
-
return (t, n) => (f(),
|
|
3020
|
+
}), p = O(() => _t(n.block.src, a));
|
|
3021
|
+
return (t, n) => (f(), k("div", {
|
|
3001
3022
|
class: "tpl:w-full",
|
|
3002
3023
|
style: L(u.value)
|
|
3003
|
-
}, [e.block.src && p.value && e.block.placeholderUrl ? (f(),
|
|
3024
|
+
}, [e.block.src && p.value && e.block.placeholderUrl ? (f(), k(R, { key: 0 }, [e.block.linkUrl ? (f(), k("a", {
|
|
3004
3025
|
key: 0,
|
|
3005
3026
|
href: e.block.linkUrl,
|
|
3006
3027
|
target: "_blank",
|
|
3007
3028
|
rel: "noopener noreferrer",
|
|
3008
|
-
onClick: n[0] ||=
|
|
3029
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
3009
3030
|
}, [I("img", {
|
|
3010
3031
|
class: "tpl:border-0",
|
|
3011
3032
|
loading: "lazy",
|
|
3012
3033
|
src: e.block.placeholderUrl,
|
|
3013
|
-
alt: e.block.alt ||
|
|
3034
|
+
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3014
3035
|
style: L(d.value)
|
|
3015
|
-
}, null, 12,
|
|
3036
|
+
}, null, 12, _a)], 8, ga)) : (f(), k("img", {
|
|
3016
3037
|
key: 1,
|
|
3017
3038
|
class: "tpl:border-0",
|
|
3018
3039
|
src: e.block.placeholderUrl,
|
|
3019
3040
|
alt: e.block.alt,
|
|
3020
3041
|
style: L(d.value)
|
|
3021
|
-
}, null, 12,
|
|
3042
|
+
}, null, 12, va))], 64)) : e.block.src && p.value ? (f(), k("div", {
|
|
3022
3043
|
key: 1,
|
|
3023
3044
|
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)]",
|
|
3024
3045
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
3025
|
-
}, [V(
|
|
3046
|
+
}, [V(j(si), {
|
|
3026
3047
|
size: 32,
|
|
3027
3048
|
"stroke-width": 1.5,
|
|
3028
3049
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3029
3050
|
style: { opacity: "0.5" }
|
|
3030
|
-
}), I("span",
|
|
3051
|
+
}), I("span", ya, D(e.block.src), 1)], 4)) : e.block.src ? (f(), k(R, { key: 2 }, [e.block.linkUrl ? (f(), k("a", {
|
|
3031
3052
|
key: 0,
|
|
3032
3053
|
href: e.block.linkUrl,
|
|
3033
3054
|
target: "_blank",
|
|
3034
3055
|
rel: "noopener noreferrer",
|
|
3035
|
-
onClick: n[1] ||=
|
|
3056
|
+
onClick: n[1] ||= M(() => {}, ["prevent"])
|
|
3036
3057
|
}, [I("img", {
|
|
3037
3058
|
class: "tpl:border-0",
|
|
3038
3059
|
loading: "lazy",
|
|
3039
3060
|
src: e.block.src,
|
|
3040
|
-
alt: e.block.alt ||
|
|
3061
|
+
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3041
3062
|
style: L(d.value)
|
|
3042
|
-
}, null, 12,
|
|
3063
|
+
}, null, 12, xa)], 8, ba)) : (f(), k("img", {
|
|
3043
3064
|
key: 1,
|
|
3044
3065
|
class: "tpl:border-0",
|
|
3045
3066
|
src: e.block.src,
|
|
3046
3067
|
alt: e.block.alt,
|
|
3047
3068
|
style: L(d.value)
|
|
3048
|
-
}, null, 12,
|
|
3069
|
+
}, null, 12, Sa))], 64)) : (f(), k("div", Ca, [s.value ? (f(), k("button", {
|
|
3049
3070
|
key: 0,
|
|
3050
|
-
"aria-label":
|
|
3071
|
+
"aria-label": j(i).image.browseMedia,
|
|
3051
3072
|
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)]",
|
|
3052
|
-
onClick:
|
|
3053
|
-
}, [V(
|
|
3073
|
+
onClick: M(l, ["stop"])
|
|
3074
|
+
}, [V(j(si), {
|
|
3054
3075
|
size: 14,
|
|
3055
3076
|
"stroke-width": 1.5
|
|
3056
|
-
}), z(" " +
|
|
3077
|
+
}), z(" " + D(j(i).image.browseMedia), 1)], 8, wa)) : (f(), k("span", Ta, D(j(i).image.clickToAdd), 1))]))], 4));
|
|
3057
3078
|
}
|
|
3058
|
-
}),
|
|
3079
|
+
}), Da = { class: "tpl:w-full" }, Oa = ["href"], ka = {
|
|
3059
3080
|
key: 1,
|
|
3060
3081
|
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)]"
|
|
3061
|
-
},
|
|
3082
|
+
}, Aa = /* @__PURE__ */ B({
|
|
3062
3083
|
__name: "MenuBlock",
|
|
3063
3084
|
props: {
|
|
3064
3085
|
block: {},
|
|
3065
3086
|
viewport: {}
|
|
3066
3087
|
},
|
|
3067
3088
|
setup(e) {
|
|
3068
|
-
let t = e, { t: n } = Y(), r =
|
|
3089
|
+
let t = e, { t: n } = Y(), r = O(() => ({
|
|
3069
3090
|
display: "flex",
|
|
3070
3091
|
flexWrap: "wrap",
|
|
3071
3092
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -3073,14 +3094,14 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3073
3094
|
fontSize: `${t.block.fontSize}px`,
|
|
3074
3095
|
fontFamily: t.block.fontFamily || "inherit",
|
|
3075
3096
|
alignItems: "center"
|
|
3076
|
-
})), i =
|
|
3097
|
+
})), i = O(() => t.block.items.length > 0);
|
|
3077
3098
|
function a(e) {
|
|
3078
3099
|
return e || t.block.linkColor || t.block.color;
|
|
3079
3100
|
}
|
|
3080
|
-
return (t, o) => (f(),
|
|
3101
|
+
return (t, o) => (f(), k("div", Da, [i.value ? (f(), k("div", {
|
|
3081
3102
|
key: 0,
|
|
3082
3103
|
style: L(r.value)
|
|
3083
|
-
}, [(f(!0),
|
|
3104
|
+
}, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
|
|
3084
3105
|
href: t.url || "#",
|
|
3085
3106
|
class: "tpl:cursor-default tpl:no-underline",
|
|
3086
3107
|
style: L({
|
|
@@ -3088,16 +3109,16 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3088
3109
|
fontWeight: t.bold ? "bold" : "normal",
|
|
3089
3110
|
textDecoration: t.underline ? "underline" : "none"
|
|
3090
3111
|
}),
|
|
3091
|
-
onClick: o[0] ||=
|
|
3092
|
-
},
|
|
3112
|
+
onClick: o[0] ||= M(() => {}, ["prevent"])
|
|
3113
|
+
}, D(t.text || "..."), 13, Oa), n < e.block.items.length - 1 ? (f(), k("span", {
|
|
3093
3114
|
key: 0,
|
|
3094
3115
|
style: L({
|
|
3095
3116
|
color: e.block.separatorColor,
|
|
3096
3117
|
padding: `0 ${e.block.spacing}px`
|
|
3097
3118
|
})
|
|
3098
|
-
},
|
|
3119
|
+
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", ka, [V(j(di), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
|
|
3099
3120
|
}
|
|
3100
|
-
}),
|
|
3121
|
+
}), ja = new Set([
|
|
3101
3122
|
"http",
|
|
3102
3123
|
"https",
|
|
3103
3124
|
"mailto",
|
|
@@ -3107,7 +3128,7 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3107
3128
|
"sms",
|
|
3108
3129
|
"xmpp",
|
|
3109
3130
|
"cid"
|
|
3110
|
-
]),
|
|
3131
|
+
]), Ma = new Set([
|
|
3111
3132
|
"SCRIPT",
|
|
3112
3133
|
"STYLE",
|
|
3113
3134
|
"IFRAME",
|
|
@@ -3117,7 +3138,7 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3117
3138
|
"META",
|
|
3118
3139
|
"BASE",
|
|
3119
3140
|
"FORM"
|
|
3120
|
-
]),
|
|
3141
|
+
]), Na = new Set([
|
|
3121
3142
|
"href",
|
|
3122
3143
|
"xlink:href",
|
|
3123
3144
|
"formaction",
|
|
@@ -3126,16 +3147,16 @@ var fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
|
3126
3147
|
"background",
|
|
3127
3148
|
"poster"
|
|
3128
3149
|
]);
|
|
3129
|
-
function
|
|
3130
|
-
let n = e.
|
|
3150
|
+
function Pa(e, t) {
|
|
3151
|
+
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
3131
3152
|
if (!n || n.startsWith("#")) return !0;
|
|
3132
3153
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3133
3154
|
if (!r) return !0;
|
|
3134
3155
|
let i = r[1].toLowerCase();
|
|
3135
|
-
return
|
|
3156
|
+
return ja.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3136
3157
|
}
|
|
3137
|
-
function
|
|
3138
|
-
if (
|
|
3158
|
+
function Fa(e) {
|
|
3159
|
+
if (Ma.has(e.tagName)) {
|
|
3139
3160
|
e.remove();
|
|
3140
3161
|
return;
|
|
3141
3162
|
}
|
|
@@ -3147,29 +3168,29 @@ function ja(e) {
|
|
|
3147
3168
|
e.removeAttribute(n);
|
|
3148
3169
|
continue;
|
|
3149
3170
|
}
|
|
3150
|
-
if (
|
|
3151
|
-
|
|
3171
|
+
if (Na.has(t)) {
|
|
3172
|
+
Pa(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3152
3173
|
continue;
|
|
3153
3174
|
}
|
|
3154
3175
|
if (t === "src") {
|
|
3155
|
-
|
|
3176
|
+
Pa(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3156
3177
|
continue;
|
|
3157
3178
|
}
|
|
3158
3179
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3159
3180
|
}
|
|
3160
3181
|
let n = Array.from(e.children);
|
|
3161
|
-
for (let e of n)
|
|
3182
|
+
for (let e of n) Fa(e);
|
|
3162
3183
|
}
|
|
3163
|
-
function
|
|
3184
|
+
function Ia(e) {
|
|
3164
3185
|
if (typeof DOMParser > "u") return e;
|
|
3165
3186
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3166
|
-
for (let e of n)
|
|
3187
|
+
for (let e of n) Fa(e);
|
|
3167
3188
|
return t.innerHTML;
|
|
3168
3189
|
}
|
|
3169
3190
|
//#endregion
|
|
3170
3191
|
//#region src/composables/useEditableTextBlock.ts
|
|
3171
|
-
function
|
|
3172
|
-
let t = v(
|
|
3192
|
+
function La(e) {
|
|
3193
|
+
let t = v(Kn, []), { syntax: n } = Wi(), r = O(() => Ia(bt(gt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = Tn(a), c = O(() => ({
|
|
3173
3194
|
top: o.value - 8,
|
|
3174
3195
|
left: s.value
|
|
3175
3196
|
}));
|
|
@@ -3190,68 +3211,67 @@ function Na(e) {
|
|
|
3190
3211
|
}
|
|
3191
3212
|
//#endregion
|
|
3192
3213
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3193
|
-
var
|
|
3214
|
+
var Ra = ["innerHTML"], za = /* @__PURE__ */ B({
|
|
3194
3215
|
__name: "ParagraphBlock",
|
|
3195
3216
|
props: {
|
|
3196
3217
|
block: {},
|
|
3197
3218
|
viewport: {}
|
|
3198
3219
|
},
|
|
3199
3220
|
setup(e) {
|
|
3200
|
-
let t = e, n =
|
|
3201
|
-
return (t, l) => (f(),
|
|
3221
|
+
let t = e, n = T(() => import("./ParagraphEditor-Bqjn3ZNm.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = La(() => t.block.content);
|
|
3222
|
+
return (t, l) => (f(), k("div", {
|
|
3202
3223
|
ref_key: "blockRef",
|
|
3203
3224
|
ref: i,
|
|
3204
3225
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
3205
|
-
onDblclick: l[0] ||= (...e) =>
|
|
3206
|
-
}, [
|
|
3226
|
+
onDblclick: l[0] ||= (...e) => j(s) && j(s)(...e)
|
|
3227
|
+
}, [j(r) ? (f(), N(j(n), {
|
|
3207
3228
|
key: 0,
|
|
3208
3229
|
block: e.block,
|
|
3209
|
-
"toolbar-position":
|
|
3210
|
-
onDone:
|
|
3230
|
+
"toolbar-position": j(a),
|
|
3231
|
+
onDone: j(c)
|
|
3211
3232
|
}, null, 8, [
|
|
3212
3233
|
"block",
|
|
3213
3234
|
"toolbar-position",
|
|
3214
3235
|
"onDone"
|
|
3215
|
-
])) : (f(),
|
|
3236
|
+
])) : (f(), k("div", {
|
|
3216
3237
|
key: 1,
|
|
3217
3238
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
3218
|
-
innerHTML:
|
|
3219
|
-
}, null, 8,
|
|
3239
|
+
innerHTML: j(o)
|
|
3240
|
+
}, null, 8, Ra))], 544));
|
|
3220
3241
|
}
|
|
3221
3242
|
});
|
|
3222
3243
|
//#endregion
|
|
3223
3244
|
//#region src/utils/blockComponentResolver.ts
|
|
3224
|
-
function
|
|
3245
|
+
function Ba(e, t, n) {
|
|
3225
3246
|
if (t) {
|
|
3226
3247
|
let n = t.getComponent(e);
|
|
3227
3248
|
if (n) return n;
|
|
3228
3249
|
}
|
|
3229
3250
|
return n[e.type] ?? null;
|
|
3230
3251
|
}
|
|
3231
|
-
function
|
|
3232
|
-
let { padding: t,
|
|
3252
|
+
function Va(e) {
|
|
3253
|
+
let { padding: t, backgroundColor: n } = e.styles;
|
|
3233
3254
|
return {
|
|
3234
3255
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
3235
|
-
|
|
3236
|
-
backgroundColor: r || "transparent"
|
|
3256
|
+
backgroundColor: n || "transparent"
|
|
3237
3257
|
};
|
|
3238
3258
|
}
|
|
3239
3259
|
//#endregion
|
|
3240
3260
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3241
|
-
var
|
|
3261
|
+
var Ha = ["data-block-id", "data-block-type"], Ua = ["aria-label"], Wa = [
|
|
3242
3262
|
"aria-label",
|
|
3243
3263
|
"aria-pressed",
|
|
3244
3264
|
"title"
|
|
3245
|
-
],
|
|
3265
|
+
], Ga = ["aria-label", "title"], Ka = ["aria-label", "title"], qa = ["aria-label", "title"], Ja = {
|
|
3246
3266
|
key: 1,
|
|
3247
3267
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
3248
|
-
},
|
|
3268
|
+
}, Ya = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Xa = {
|
|
3249
3269
|
key: 2,
|
|
3250
3270
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3251
|
-
},
|
|
3271
|
+
}, Za = ["aria-label", "title"], Qa = {
|
|
3252
3272
|
key: 3,
|
|
3253
3273
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3254
|
-
},
|
|
3274
|
+
}, $a = ["aria-label"], eo = /* @__PURE__ */ Ni(/* @__PURE__ */ B({
|
|
3255
3275
|
__name: "BlockWrapper",
|
|
3256
3276
|
props: {
|
|
3257
3277
|
block: {},
|
|
@@ -3261,7 +3281,7 @@ var Ra = ["data-block-id", "data-block-type"], za = ["aria-label"], Ba = [
|
|
|
3261
3281
|
},
|
|
3262
3282
|
emits: ["select"],
|
|
3263
3283
|
setup(e, { emit: t }) {
|
|
3264
|
-
let n =
|
|
3284
|
+
let n = T(() => import("./BlockIssueBadge-C6YilQdl.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(tr, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
3265
3285
|
async function p() {
|
|
3266
3286
|
await m(), l.value?.focus();
|
|
3267
3287
|
}
|
|
@@ -3284,48 +3304,47 @@ var Ra = ["data-block-id", "data-block-type"], za = ["aria-label"], Ba = [
|
|
|
3284
3304
|
}
|
|
3285
3305
|
}
|
|
3286
3306
|
}
|
|
3287
|
-
let g =
|
|
3307
|
+
let g = O(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), _ = O(() => r.previewMode === !0 && g.value), y = O(() => r.viewport ? {
|
|
3288
3308
|
desktop: a.viewport.desktop,
|
|
3289
|
-
tablet: a.viewport.tablet,
|
|
3290
3309
|
mobile: a.viewport.mobile
|
|
3291
|
-
}[r.viewport] ?? r.viewport : ""),
|
|
3292
|
-
let e =
|
|
3310
|
+
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Ln, null), S = v(Rn, null), w = v(er, {}), ee = O(() => !!w.savedModules), E = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
|
|
3311
|
+
let e = Va(r.block);
|
|
3293
3312
|
return {
|
|
3294
3313
|
padding: e.padding,
|
|
3295
3314
|
backgroundColor: e.backgroundColor
|
|
3296
3315
|
};
|
|
3297
3316
|
});
|
|
3298
|
-
function
|
|
3317
|
+
function ne(e) {
|
|
3299
3318
|
r.previewMode || (e.stopPropagation(), i("select"));
|
|
3300
3319
|
}
|
|
3301
|
-
function
|
|
3302
|
-
|
|
3320
|
+
function re() {
|
|
3321
|
+
x?.deleteBlock(r.block.id);
|
|
3303
3322
|
}
|
|
3304
|
-
function
|
|
3305
|
-
|
|
3323
|
+
function N() {
|
|
3324
|
+
x?.duplicateBlock(r.block);
|
|
3306
3325
|
}
|
|
3307
|
-
function
|
|
3308
|
-
|
|
3326
|
+
function ie() {
|
|
3327
|
+
w.savedModules?.openSaveDialog(r.block.id);
|
|
3309
3328
|
}
|
|
3310
|
-
function
|
|
3311
|
-
|
|
3329
|
+
function P() {
|
|
3330
|
+
S?.toggleBlock(r.block.id);
|
|
3312
3331
|
}
|
|
3313
|
-
return (t, r) => (f(),
|
|
3314
|
-
|
|
3332
|
+
return (t, r) => _.value ? A("", !0) : (f(), k("div", {
|
|
3333
|
+
key: 0,
|
|
3334
|
+
class: F(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
3315
3335
|
"tpl-block--selected": e.isSelected,
|
|
3316
3336
|
"tpl-block--idle": !e.isSelected,
|
|
3317
3337
|
"tpl-block--lifted": u.value
|
|
3318
3338
|
}]),
|
|
3319
|
-
style: L(D.value),
|
|
3320
3339
|
"data-block-id": e.block.id,
|
|
3321
3340
|
"data-block-type": e.block.type,
|
|
3322
|
-
onClick:
|
|
3341
|
+
onClick: ne
|
|
3323
3342
|
}, [
|
|
3324
|
-
V(
|
|
3325
|
-
e.isSelected ? (f(),
|
|
3343
|
+
V(j(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
3344
|
+
e.isSelected ? (f(), k("div", {
|
|
3326
3345
|
key: 0,
|
|
3327
3346
|
role: "toolbar",
|
|
3328
|
-
"aria-label":
|
|
3347
|
+
"aria-label": j(a).blockActions.drag,
|
|
3329
3348
|
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)]"
|
|
3330
3349
|
}, [
|
|
3331
3350
|
I("button", {
|
|
@@ -3335,119 +3354,119 @@ var Ra = ["data-block-id", "data-block-type"], za = ["aria-label"], Ba = [
|
|
|
3335
3354
|
"aria-label": d.value,
|
|
3336
3355
|
"aria-pressed": u.value,
|
|
3337
3356
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3338
|
-
title:
|
|
3357
|
+
title: j(a).blockActions.drag,
|
|
3339
3358
|
onKeydown: h
|
|
3340
|
-
}, [V(
|
|
3359
|
+
}, [V(j(ai), {
|
|
3341
3360
|
size: 14,
|
|
3342
3361
|
"stroke-width": 1.5
|
|
3343
|
-
})], 40,
|
|
3362
|
+
})], 40, Wa),
|
|
3344
3363
|
I("button", {
|
|
3345
3364
|
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",
|
|
3346
|
-
"aria-label":
|
|
3347
|
-
title:
|
|
3348
|
-
onClick: N
|
|
3349
|
-
}, [V(
|
|
3365
|
+
"aria-label": j(a).blockActions.duplicate,
|
|
3366
|
+
title: j(a).blockActions.duplicate,
|
|
3367
|
+
onClick: M(N, ["stop"])
|
|
3368
|
+
}, [V(j($r), {
|
|
3350
3369
|
size: 14,
|
|
3351
3370
|
"stroke-width": 1.5
|
|
3352
|
-
})], 8,
|
|
3353
|
-
|
|
3371
|
+
})], 8, Ga),
|
|
3372
|
+
ee.value ? (f(), k("button", {
|
|
3354
3373
|
key: 0,
|
|
3355
3374
|
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",
|
|
3356
|
-
"aria-label":
|
|
3357
|
-
title:
|
|
3358
|
-
onClick:
|
|
3359
|
-
}, [V(
|
|
3375
|
+
"aria-label": j(a).blockActions.saveAsModule,
|
|
3376
|
+
title: j(a).blockActions.saveAsModule,
|
|
3377
|
+
onClick: M(ie, ["stop"])
|
|
3378
|
+
}, [V(j(Hr), {
|
|
3360
3379
|
size: 14,
|
|
3361
3380
|
"stroke-width": 1.5
|
|
3362
|
-
})], 8,
|
|
3381
|
+
})], 8, Ka)) : A("", !0),
|
|
3363
3382
|
I("button", {
|
|
3364
3383
|
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",
|
|
3365
|
-
"aria-label":
|
|
3366
|
-
title:
|
|
3367
|
-
onClick:
|
|
3368
|
-
}, [V(
|
|
3384
|
+
"aria-label": j(a).blockActions.delete,
|
|
3385
|
+
title: j(a).blockActions.delete,
|
|
3386
|
+
onClick: M(re, ["stop"])
|
|
3387
|
+
}, [V(j(Ci), {
|
|
3369
3388
|
size: 14,
|
|
3370
3389
|
"stroke-width": 1.5
|
|
3371
|
-
})], 8,
|
|
3372
|
-
], 8,
|
|
3373
|
-
g.value ? (f(),
|
|
3390
|
+
})], 8, qa)
|
|
3391
|
+
], 8, Ua)) : A("", !0),
|
|
3392
|
+
g.value ? (f(), k("div", Ja, [I("span", Ya, [V(j(ei), {
|
|
3374
3393
|
size: 12,
|
|
3375
3394
|
"stroke-width": 1.5
|
|
3376
|
-
}), z(" " +
|
|
3377
|
-
|
|
3395
|
+
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
|
|
3396
|
+
b.value && !g.value ? (f(), k("div", Xa, [I("button", {
|
|
3378
3397
|
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)]",
|
|
3379
|
-
"aria-label":
|
|
3398
|
+
"aria-label": j(a).blockActions.conditionToggle,
|
|
3380
3399
|
title: e.block.displayCondition?.label,
|
|
3381
|
-
onClick:
|
|
3382
|
-
}, [V(
|
|
3400
|
+
onClick: M(P, ["stop"])
|
|
3401
|
+
}, [V(j(ii), {
|
|
3383
3402
|
size: 12,
|
|
3384
3403
|
"stroke-width": 2
|
|
3385
|
-
})], 8,
|
|
3386
|
-
|
|
3404
|
+
})], 8, Za)])) : A("", !0),
|
|
3405
|
+
E.value > 0 && !g.value ? (f(), k("div", Qa, [I("button", {
|
|
3387
3406
|
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)]",
|
|
3388
|
-
"aria-label":
|
|
3389
|
-
onClick: r[0] ||=
|
|
3390
|
-
}, [V(
|
|
3407
|
+
"aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
|
|
3408
|
+
onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
|
|
3409
|
+
}, [V(j(ui), {
|
|
3391
3410
|
size: 12,
|
|
3392
3411
|
"stroke-width": 2.5
|
|
3393
|
-
}), z(" " +
|
|
3412
|
+
}), z(" " + D(E.value), 1)], 8, $a)])) : A("", !0),
|
|
3394
3413
|
I("div", {
|
|
3395
3414
|
class: "tpl-block-content",
|
|
3396
|
-
style: L(
|
|
3415
|
+
style: L(te.value)
|
|
3397
3416
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4)
|
|
3398
|
-
],
|
|
3417
|
+
], 10, Ha));
|
|
3399
3418
|
}
|
|
3400
|
-
}), [["__scopeId", "data-v-
|
|
3419
|
+
}), [["__scopeId", "data-v-4a48371d"]]);
|
|
3401
3420
|
//#endregion
|
|
3402
3421
|
//#region src/utils/unwrapParagraph.ts
|
|
3403
|
-
function
|
|
3422
|
+
function to(e) {
|
|
3404
3423
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3405
3424
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3406
3425
|
}
|
|
3407
3426
|
//#endregion
|
|
3408
3427
|
//#region src/components/blocks/TitleBlock.vue
|
|
3409
|
-
var
|
|
3428
|
+
var no = /* @__PURE__ */ B({
|
|
3410
3429
|
__name: "TitleBlock",
|
|
3411
3430
|
props: {
|
|
3412
3431
|
block: {},
|
|
3413
3432
|
viewport: {}
|
|
3414
3433
|
},
|
|
3415
3434
|
setup(e) {
|
|
3416
|
-
let t = e, n =
|
|
3435
|
+
let t = e, n = T(() => import("./TitleEditor-Dcldr8D6.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = La(() => t.block.content), l = O(() => {
|
|
3417
3436
|
let e = {
|
|
3418
3437
|
fontSize: `${pe[t.block.level]}px`,
|
|
3419
3438
|
color: t.block.color,
|
|
3420
3439
|
textAlign: t.block.textAlign
|
|
3421
3440
|
};
|
|
3422
3441
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3423
|
-
}), u =
|
|
3424
|
-
return (t, o) => (f(),
|
|
3442
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => to(o.value));
|
|
3443
|
+
return (t, o) => (f(), k("div", {
|
|
3425
3444
|
ref_key: "blockRef",
|
|
3426
3445
|
ref: i,
|
|
3427
3446
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
3428
3447
|
style: L(l.value),
|
|
3429
|
-
onDblclick: o[0] ||= (...e) =>
|
|
3430
|
-
}, [
|
|
3448
|
+
onDblclick: o[0] ||= (...e) => j(s) && j(s)(...e)
|
|
3449
|
+
}, [j(r) ? (f(), N(j(n), {
|
|
3431
3450
|
key: 0,
|
|
3432
3451
|
block: e.block,
|
|
3433
|
-
"toolbar-position":
|
|
3434
|
-
onDone:
|
|
3452
|
+
"toolbar-position": j(a),
|
|
3453
|
+
onDone: j(c)
|
|
3435
3454
|
}, null, 8, [
|
|
3436
3455
|
"block",
|
|
3437
3456
|
"toolbar-position",
|
|
3438
3457
|
"onDone"
|
|
3439
|
-
])) : (f(),
|
|
3458
|
+
])) : (f(), N(d(u.value), {
|
|
3440
3459
|
key: 1,
|
|
3441
3460
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-tight tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
|
|
3442
3461
|
style: { color: "inherit" },
|
|
3443
3462
|
innerHTML: p.value
|
|
3444
3463
|
}, null, 8, ["innerHTML"]))], 36));
|
|
3445
3464
|
}
|
|
3446
|
-
}),
|
|
3465
|
+
}), ro = { class: "tpl:w-full" }, io = { class: "tpl:flex tpl:gap-0" }, ao = {
|
|
3447
3466
|
key: 0,
|
|
3448
3467
|
"data-testid": "section-drop-hint",
|
|
3449
3468
|
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)]"
|
|
3450
|
-
},
|
|
3469
|
+
}, oo = /* @__PURE__ */ B({
|
|
3451
3470
|
__name: "SectionBlock",
|
|
3452
3471
|
props: {
|
|
3453
3472
|
block: {},
|
|
@@ -3455,13 +3474,13 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3455
3474
|
},
|
|
3456
3475
|
setup(e) {
|
|
3457
3476
|
let t = {
|
|
3458
|
-
title:
|
|
3459
|
-
paragraph:
|
|
3460
|
-
image:
|
|
3461
|
-
button:
|
|
3462
|
-
divider:
|
|
3463
|
-
custom:
|
|
3464
|
-
}, n = e, { t: r } = Y(), i = J(Fn, "SectionBlock"), a = v(Rn, null), o = v(Un, null), s =
|
|
3477
|
+
title: no,
|
|
3478
|
+
paragraph: za,
|
|
3479
|
+
image: Ea,
|
|
3480
|
+
button: Mr,
|
|
3481
|
+
divider: la,
|
|
3482
|
+
custom: sa
|
|
3483
|
+
}, n = e, { t: r } = Y(), i = J(Fn, "SectionBlock"), a = v(Rn, null), o = v(Un, null), s = O(() => {
|
|
3465
3484
|
switch (n.block.columns) {
|
|
3466
3485
|
case "2": return ["50%", "50%"];
|
|
3467
3486
|
case "3": return [
|
|
@@ -3473,7 +3492,7 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3473
3492
|
case "2-1": return ["66.67%", "33.33%"];
|
|
3474
3493
|
default: return ["100%"];
|
|
3475
3494
|
}
|
|
3476
|
-
}), l =
|
|
3495
|
+
}), l = O(() => {
|
|
3477
3496
|
let e = s.value.length, t = [...n.block.children];
|
|
3478
3497
|
for (; t.length < e;) t.push([]);
|
|
3479
3498
|
return t.slice(0, e);
|
|
@@ -3487,7 +3506,7 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3487
3506
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3488
3507
|
}
|
|
3489
3508
|
function m(e) {
|
|
3490
|
-
return
|
|
3509
|
+
return Ba(e, o, t);
|
|
3491
3510
|
}
|
|
3492
3511
|
function g(e, t) {
|
|
3493
3512
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3495,11 +3514,11 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3495
3514
|
dataSourceFetched: t.dataSourceFetched
|
|
3496
3515
|
});
|
|
3497
3516
|
}
|
|
3498
|
-
return (t, n) => (f(),
|
|
3517
|
+
return (t, n) => (f(), k("div", ro, [I("div", io, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
|
|
3499
3518
|
key: n,
|
|
3500
|
-
class:
|
|
3519
|
+
class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3501
3520
|
style: L({ width: s.value[n] })
|
|
3502
|
-
}, [V(
|
|
3521
|
+
}, [V(j(ce), {
|
|
3503
3522
|
"model-value": u(n),
|
|
3504
3523
|
group: {
|
|
3505
3524
|
name: "blocks",
|
|
@@ -3517,13 +3536,14 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3517
3536
|
class: "tpl:min-h-[60px]",
|
|
3518
3537
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3519
3538
|
}, {
|
|
3520
|
-
default: b(() => [(f(!0),
|
|
3539
|
+
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(eo, {
|
|
3521
3540
|
block: t,
|
|
3522
|
-
"is-selected":
|
|
3541
|
+
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3523
3542
|
viewport: e.viewport,
|
|
3524
|
-
|
|
3543
|
+
"preview-mode": j(i).state.previewMode,
|
|
3544
|
+
onSelect: (e) => j(i).selectBlock(t.id)
|
|
3525
3545
|
}, {
|
|
3526
|
-
default: b(() => [(f(),
|
|
3546
|
+
default: b(() => [(f(), N(d(m(t)), {
|
|
3527
3547
|
block: t,
|
|
3528
3548
|
viewport: e.viewport,
|
|
3529
3549
|
onFetchData: (e) => g(t, e)
|
|
@@ -3537,16 +3557,17 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3537
3557
|
"block",
|
|
3538
3558
|
"is-selected",
|
|
3539
3559
|
"viewport",
|
|
3560
|
+
"preview-mode",
|
|
3540
3561
|
"onSelect"
|
|
3541
|
-
])])), [[se, !
|
|
3562
|
+
])])), [[se, !j(a)?.isHidden(t.id)]])), 128))]),
|
|
3542
3563
|
_: 2
|
|
3543
3564
|
}, 1032, [
|
|
3544
3565
|
"model-value",
|
|
3545
3566
|
"group",
|
|
3546
3567
|
"onUpdate:modelValue"
|
|
3547
|
-
]), u(n).length === 0 ? (f(),
|
|
3568
|
+
]), u(n).length === 0 ? (f(), k("div", ao, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
|
|
3548
3569
|
}
|
|
3549
|
-
}),
|
|
3570
|
+
}), so = {
|
|
3550
3571
|
facebook: {
|
|
3551
3572
|
name: "Facebook",
|
|
3552
3573
|
color: "#1877F2",
|
|
@@ -3627,11 +3648,11 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3627
3648
|
color: "#1769FF",
|
|
3628
3649
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
3629
3650
|
}
|
|
3630
|
-
},
|
|
3651
|
+
}, co = {
|
|
3631
3652
|
small: 24,
|
|
3632
3653
|
medium: 32,
|
|
3633
3654
|
large: 48
|
|
3634
|
-
},
|
|
3655
|
+
}, lo = [
|
|
3635
3656
|
"facebook",
|
|
3636
3657
|
"twitter",
|
|
3637
3658
|
"instagram",
|
|
@@ -3648,11 +3669,11 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3648
3669
|
"github",
|
|
3649
3670
|
"dribbble",
|
|
3650
3671
|
"behance"
|
|
3651
|
-
],
|
|
3672
|
+
], uo = [
|
|
3652
3673
|
"width",
|
|
3653
3674
|
"height",
|
|
3654
3675
|
"fill"
|
|
3655
|
-
],
|
|
3676
|
+
], fo = ["d"], po = /* @__PURE__ */ B({
|
|
3656
3677
|
__name: "SocialIconSvg",
|
|
3657
3678
|
props: {
|
|
3658
3679
|
platform: {},
|
|
@@ -3660,7 +3681,7 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3660
3681
|
iconSize: {}
|
|
3661
3682
|
},
|
|
3662
3683
|
setup(e) {
|
|
3663
|
-
let t = e, n =
|
|
3684
|
+
let t = e, n = O(() => so[t.platform]), r = O(() => co[t.iconSize]), i = O(() => {
|
|
3664
3685
|
let e = {
|
|
3665
3686
|
display: "inline-flex",
|
|
3666
3687
|
alignItems: "center",
|
|
@@ -3697,40 +3718,40 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3697
3718
|
};
|
|
3698
3719
|
default: return e;
|
|
3699
3720
|
}
|
|
3700
|
-
}), a =
|
|
3701
|
-
return (e, t) => (f(),
|
|
3721
|
+
}), a = O(() => Math.floor(r.value * .6)), o = O(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
3722
|
+
return (e, t) => (f(), k("span", { style: L(i.value) }, [(f(), k("svg", {
|
|
3702
3723
|
width: a.value,
|
|
3703
3724
|
height: a.value,
|
|
3704
3725
|
viewBox: "0 0 24 24",
|
|
3705
3726
|
fill: o.value,
|
|
3706
3727
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3707
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
3728
|
+
}, [I("path", { d: n.value.path }, null, 8, fo)], 8, uo))], 4));
|
|
3708
3729
|
}
|
|
3709
|
-
}),
|
|
3730
|
+
}), mo = { class: "tpl:w-full" }, ho = ["href"], go = {
|
|
3710
3731
|
key: 1,
|
|
3711
3732
|
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)]"
|
|
3712
|
-
},
|
|
3733
|
+
}, _o = /* @__PURE__ */ B({
|
|
3713
3734
|
__name: "SocialIconsBlock",
|
|
3714
3735
|
props: {
|
|
3715
3736
|
block: {},
|
|
3716
3737
|
viewport: {}
|
|
3717
3738
|
},
|
|
3718
3739
|
setup(e) {
|
|
3719
|
-
let t = e, { t: n } = Y(), r =
|
|
3740
|
+
let t = e, { t: n } = Y(), r = O(() => ({
|
|
3720
3741
|
display: "flex",
|
|
3721
3742
|
flexWrap: "wrap",
|
|
3722
3743
|
gap: `${t.block.spacing}px`,
|
|
3723
3744
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3724
|
-
})), i =
|
|
3725
|
-
return (t, a) => (f(),
|
|
3745
|
+
})), i = O(() => t.block.icons.length > 0);
|
|
3746
|
+
return (t, a) => (f(), k("div", mo, [i.value ? (f(), k("div", {
|
|
3726
3747
|
key: 0,
|
|
3727
3748
|
style: L(r.value)
|
|
3728
|
-
}, [(f(!0),
|
|
3749
|
+
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
3729
3750
|
key: t.id,
|
|
3730
3751
|
href: t.url || "#",
|
|
3731
3752
|
class: "tpl:cursor-default",
|
|
3732
|
-
onClick: a[0] ||=
|
|
3733
|
-
}, [V(
|
|
3753
|
+
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
3754
|
+
}, [V(po, {
|
|
3734
3755
|
platform: t.platform,
|
|
3735
3756
|
"icon-style": e.block.iconStyle,
|
|
3736
3757
|
"icon-size": e.block.iconSize
|
|
@@ -3738,44 +3759,44 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3738
3759
|
"platform",
|
|
3739
3760
|
"icon-style",
|
|
3740
3761
|
"icon-size"
|
|
3741
|
-
])], 8,
|
|
3762
|
+
])], 8, ho))), 128))], 4)) : (f(), k("div", go, [V(j(vi), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
3742
3763
|
}
|
|
3743
|
-
}),
|
|
3764
|
+
}), vo = { class: "tpl:w-full" }, yo = {
|
|
3744
3765
|
key: 0,
|
|
3745
3766
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3746
3767
|
style: {
|
|
3747
3768
|
"background-color": "var(--tpl-bg-hover)",
|
|
3748
3769
|
color: "var(--tpl-text-dim)"
|
|
3749
3770
|
}
|
|
3750
|
-
},
|
|
3771
|
+
}, bo = /* @__PURE__ */ B({
|
|
3751
3772
|
__name: "SpacerBlock",
|
|
3752
3773
|
props: {
|
|
3753
3774
|
block: {},
|
|
3754
3775
|
viewport: {}
|
|
3755
3776
|
},
|
|
3756
3777
|
setup(e) {
|
|
3757
|
-
let t = e, n = J(Fn, "SpacerBlock"), r =
|
|
3778
|
+
let t = e, n = J(Fn, "SpacerBlock"), r = O(() => ({
|
|
3758
3779
|
height: `${t.block.height}px`,
|
|
3759
3780
|
minHeight: `${t.block.height}px`,
|
|
3760
3781
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3761
3782
|
}));
|
|
3762
|
-
return (t, i) => (f(),
|
|
3783
|
+
return (t, i) => (f(), k("div", vo, [I("div", {
|
|
3763
3784
|
style: L(r.value),
|
|
3764
|
-
class:
|
|
3765
|
-
}, [
|
|
3785
|
+
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
3786
|
+
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span", yo, D(e.block.height) + "px ", 1))], 6)]));
|
|
3766
3787
|
}
|
|
3767
|
-
}),
|
|
3788
|
+
}), xo = { class: "tpl:w-full" }, So = { key: 0 }, Co = [
|
|
3768
3789
|
"aria-label",
|
|
3769
3790
|
"data-placeholder",
|
|
3770
3791
|
"onBlur"
|
|
3771
|
-
],
|
|
3792
|
+
], wo = [
|
|
3772
3793
|
"aria-label",
|
|
3773
3794
|
"data-placeholder",
|
|
3774
3795
|
"onBlur"
|
|
3775
|
-
],
|
|
3796
|
+
], To = {
|
|
3776
3797
|
key: 1,
|
|
3777
3798
|
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)]"
|
|
3778
|
-
},
|
|
3799
|
+
}, Eo = /* @__PURE__ */ Ni(/* @__PURE__ */ B({
|
|
3779
3800
|
__name: "TableBlock",
|
|
3780
3801
|
props: {
|
|
3781
3802
|
block: {},
|
|
@@ -3787,24 +3808,24 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3787
3808
|
e.textContent = t.value ?? "";
|
|
3788
3809
|
},
|
|
3789
3810
|
updated(e, t) {
|
|
3790
|
-
t.value !== t.oldValue && e.
|
|
3811
|
+
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3791
3812
|
}
|
|
3792
|
-
}, n = e, { t: r } = Y(), i = J(Fn, "TableBlock"), a =
|
|
3813
|
+
}, n = e, { t: r } = Y(), i = J(Fn, "TableBlock"), a = O(() => n.block.rows.length > 0), o = O(() => ({
|
|
3793
3814
|
width: "100%",
|
|
3794
3815
|
borderCollapse: "collapse",
|
|
3795
3816
|
fontSize: `${n.block.fontSize}px`,
|
|
3796
3817
|
color: n.block.color,
|
|
3797
3818
|
textAlign: n.block.textAlign,
|
|
3798
3819
|
fontFamily: n.block.fontFamily || "inherit"
|
|
3799
|
-
})), s =
|
|
3820
|
+
})), s = O(() => ({
|
|
3800
3821
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
3801
3822
|
padding: `${n.block.cellPadding}px`,
|
|
3802
3823
|
textAlign: n.block.textAlign
|
|
3803
|
-
})), l =
|
|
3824
|
+
})), l = O(() => ({
|
|
3804
3825
|
...s.value,
|
|
3805
3826
|
fontWeight: "bold",
|
|
3806
3827
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
3807
|
-
})), u =
|
|
3828
|
+
})), u = O(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), d = O(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
3808
3829
|
function p() {
|
|
3809
3830
|
i.selectBlock(n.block.id);
|
|
3810
3831
|
}
|
|
@@ -3818,38 +3839,38 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3818
3839
|
} : n);
|
|
3819
3840
|
i.updateBlock(n.block.id, { rows: o });
|
|
3820
3841
|
}
|
|
3821
|
-
return (e, n) => (f(),
|
|
3842
|
+
return (e, n) => (f(), k("div", xo, [a.value ? (f(), k("table", {
|
|
3822
3843
|
key: 0,
|
|
3823
3844
|
style: L(o.value),
|
|
3824
3845
|
class: "tpl-table-editable"
|
|
3825
|
-
}, [u.value ? (f(),
|
|
3846
|
+
}, [u.value ? (f(), k("thead", So, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
|
|
3826
3847
|
key: e.id,
|
|
3827
3848
|
style: L(l.value),
|
|
3828
|
-
"aria-label":
|
|
3849
|
+
"aria-label": j(r).table.cellPlaceholder,
|
|
3829
3850
|
contenteditable: "true",
|
|
3830
|
-
"data-placeholder":
|
|
3851
|
+
"data-placeholder": j(r).table.cellPlaceholder,
|
|
3831
3852
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3832
|
-
onKeydown: n[0] ||=
|
|
3833
|
-
onClick:
|
|
3834
|
-
}, null, 44,
|
|
3853
|
+
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3854
|
+
onClick: M(p, ["stop"])
|
|
3855
|
+
}, null, 44, Co)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
|
|
3835
3856
|
key: i.id,
|
|
3836
3857
|
style: L(s.value),
|
|
3837
|
-
"aria-label":
|
|
3858
|
+
"aria-label": j(r).table.cellPlaceholder,
|
|
3838
3859
|
contenteditable: "true",
|
|
3839
|
-
"data-placeholder":
|
|
3860
|
+
"data-placeholder": j(r).table.cellPlaceholder,
|
|
3840
3861
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3841
|
-
onKeydown: n[1] ||=
|
|
3842
|
-
onClick:
|
|
3843
|
-
}, null, 44,
|
|
3862
|
+
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3863
|
+
onClick: M(p, ["stop"])
|
|
3864
|
+
}, null, 44, wo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", To, [V(j(Si), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
|
|
3844
3865
|
}
|
|
3845
|
-
}), [["__scopeId", "data-v-
|
|
3866
|
+
}), [["__scopeId", "data-v-1b130f2b"]]), Do = /* @__PURE__ */ B({
|
|
3846
3867
|
__name: "VideoPlayButton",
|
|
3847
3868
|
props: { hoverEffect: {
|
|
3848
3869
|
type: Boolean,
|
|
3849
3870
|
default: !1
|
|
3850
3871
|
} },
|
|
3851
3872
|
setup(e) {
|
|
3852
|
-
return (t, n) => (f(),
|
|
3873
|
+
return (t, n) => (f(), k("div", { class: F(["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] ||= [I("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-white/90 tpl:shadow-lg" }, [I("svg", {
|
|
3853
3874
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
3854
3875
|
width: "28",
|
|
3855
3876
|
height: "28",
|
|
@@ -3860,7 +3881,7 @@ var Qa = /* @__PURE__ */ B({
|
|
|
3860
3881
|
});
|
|
3861
3882
|
//#endregion
|
|
3862
3883
|
//#region src/utils/videoThumbnail.ts
|
|
3863
|
-
function
|
|
3884
|
+
function Oo(e) {
|
|
3864
3885
|
if (!e) return {
|
|
3865
3886
|
platform: "unknown",
|
|
3866
3887
|
videoId: null,
|
|
@@ -3892,25 +3913,25 @@ function wo(e) {
|
|
|
3892
3913
|
thumbnailUrl: null
|
|
3893
3914
|
};
|
|
3894
3915
|
}
|
|
3895
|
-
function
|
|
3896
|
-
return t ||
|
|
3916
|
+
function ko(e, t) {
|
|
3917
|
+
return t || Oo(e).thumbnailUrl;
|
|
3897
3918
|
}
|
|
3898
3919
|
//#endregion
|
|
3899
3920
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3900
|
-
var
|
|
3921
|
+
var Ao = ["src", "alt"], jo = {
|
|
3901
3922
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3902
3923
|
style: { opacity: "0.7" }
|
|
3903
|
-
},
|
|
3924
|
+
}, Mo = ["href"], No = ["src", "alt"], Po = ["src", "alt"], Fo = {
|
|
3904
3925
|
key: 3,
|
|
3905
3926
|
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)]"
|
|
3906
|
-
},
|
|
3927
|
+
}, Io = /* @__PURE__ */ B({
|
|
3907
3928
|
__name: "VideoBlock",
|
|
3908
3929
|
props: {
|
|
3909
3930
|
block: {},
|
|
3910
3931
|
viewport: {}
|
|
3911
3932
|
},
|
|
3912
3933
|
setup(e) {
|
|
3913
|
-
let t = e, { t: n } = Y(), { syntax: r } =
|
|
3934
|
+
let t = e, { t: n } = Y(), { syntax: r } = Wi(), i = O(() => _t(t.block.url, r) || _t(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : ko(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
|
|
3914
3935
|
let e = t.block.align;
|
|
3915
3936
|
return {
|
|
3916
3937
|
maxWidth: "100%",
|
|
@@ -3919,11 +3940,11 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3919
3940
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3920
3941
|
marginRight: e === "center" ? "auto" : void 0
|
|
3921
3942
|
};
|
|
3922
|
-
}), c =
|
|
3923
|
-
return (t, r) => (f(),
|
|
3943
|
+
}), c = O(() => _t(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
3944
|
+
return (t, r) => (f(), k("div", {
|
|
3924
3945
|
class: "tpl:w-full",
|
|
3925
3946
|
style: L(o.value)
|
|
3926
|
-
}, [i.value && e.block.placeholderUrl ? (f(),
|
|
3947
|
+
}, [i.value && e.block.placeholderUrl ? (f(), k("div", {
|
|
3927
3948
|
key: 0,
|
|
3928
3949
|
class: "tpl:relative tpl:inline-block",
|
|
3929
3950
|
style: L(s.value)
|
|
@@ -3931,28 +3952,28 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3931
3952
|
class: "tpl:w-full tpl:border-0",
|
|
3932
3953
|
src: e.block.placeholderUrl,
|
|
3933
3954
|
alt: e.block.alt
|
|
3934
|
-
}, null, 8,
|
|
3955
|
+
}, null, 8, Ao), V(Do)], 4)) : i.value ? (f(), k("div", {
|
|
3935
3956
|
key: 1,
|
|
3936
3957
|
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)]",
|
|
3937
3958
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3938
|
-
}, [V(
|
|
3959
|
+
}, [V(j(Di), {
|
|
3939
3960
|
size: 36,
|
|
3940
3961
|
"stroke-width": 1.5,
|
|
3941
3962
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3942
3963
|
style: { opacity: "0.5" }
|
|
3943
|
-
}), I("span",
|
|
3964
|
+
}), I("span", jo, D(c.value), 1)], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
|
|
3944
3965
|
key: 0,
|
|
3945
3966
|
href: e.block.url,
|
|
3946
3967
|
target: "_blank",
|
|
3947
3968
|
rel: "noopener noreferrer",
|
|
3948
3969
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
3949
3970
|
style: L(s.value),
|
|
3950
|
-
onClick: r[0] ||=
|
|
3971
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
3951
3972
|
}, [I("img", {
|
|
3952
3973
|
class: "tpl:w-full tpl:border-0",
|
|
3953
3974
|
src: a.value,
|
|
3954
3975
|
alt: e.block.alt
|
|
3955
|
-
}, null, 8,
|
|
3976
|
+
}, null, 8, No), V(Do, { "hover-effect": "" })], 12, Mo)) : (f(), k("div", {
|
|
3956
3977
|
key: 1,
|
|
3957
3978
|
class: "tpl:relative tpl:inline-block",
|
|
3958
3979
|
style: L(s.value)
|
|
@@ -3960,31 +3981,31 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3960
3981
|
class: "tpl:w-full tpl:border-0",
|
|
3961
3982
|
src: a.value,
|
|
3962
3983
|
alt: e.block.alt
|
|
3963
|
-
}, null, 8,
|
|
3984
|
+
}, null, 8, Po), V(Do)], 4))], 64)) : (f(), k("div", Fo, [V(j(Di), {
|
|
3964
3985
|
size: 40,
|
|
3965
3986
|
"stroke-width": 1.5,
|
|
3966
3987
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3967
|
-
}), I("span", null,
|
|
3968
|
-
}
|
|
3969
|
-
}),
|
|
3970
|
-
section:
|
|
3971
|
-
title:
|
|
3972
|
-
paragraph:
|
|
3973
|
-
image:
|
|
3974
|
-
button:
|
|
3975
|
-
divider:
|
|
3976
|
-
video:
|
|
3977
|
-
social:
|
|
3978
|
-
menu:
|
|
3979
|
-
table:
|
|
3980
|
-
spacer:
|
|
3981
|
-
html:
|
|
3982
|
-
countdown:
|
|
3988
|
+
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
3989
|
+
}
|
|
3990
|
+
}), Lo = {
|
|
3991
|
+
section: oo,
|
|
3992
|
+
title: no,
|
|
3993
|
+
paragraph: za,
|
|
3994
|
+
image: Ea,
|
|
3995
|
+
button: Mr,
|
|
3996
|
+
divider: la,
|
|
3997
|
+
video: Io,
|
|
3998
|
+
social: _o,
|
|
3999
|
+
menu: Aa,
|
|
4000
|
+
table: Eo,
|
|
4001
|
+
spacer: bo,
|
|
4002
|
+
html: ma,
|
|
4003
|
+
countdown: T(() => import("./CountdownBlock-DU9ga9Ki.js").then((e) => e.n))
|
|
3983
4004
|
};
|
|
3984
|
-
function
|
|
4005
|
+
function Ro(e) {
|
|
3985
4006
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
3986
4007
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3987
|
-
let { resolvedTheme: c } =
|
|
4008
|
+
let { resolvedTheme: c } = gr(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = vr({
|
|
3988
4009
|
themeOverrides: u,
|
|
3989
4010
|
resolvedTheme: c,
|
|
3990
4011
|
extraStyles: e.themeExtraStyles
|
|
@@ -4009,13 +4030,13 @@ function Po(e) {
|
|
|
4009
4030
|
g && (_ = H(f.isNavigating, (e) => {
|
|
4010
4031
|
e ? g.pause() : g.resume();
|
|
4011
4032
|
}));
|
|
4012
|
-
let v =
|
|
4033
|
+
let v = hr(t, {
|
|
4013
4034
|
t: a,
|
|
4014
4035
|
format: o
|
|
4015
|
-
}), y =
|
|
4016
|
-
if (
|
|
4036
|
+
}), y = Sr();
|
|
4037
|
+
if (Dr(y, Lo), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, sa);
|
|
4017
4038
|
function b(e) {
|
|
4018
|
-
for (let t of e) y.registerCustom(t,
|
|
4039
|
+
for (let t of e) y.registerCustom(t, sa);
|
|
4019
4040
|
}
|
|
4020
4041
|
let x = Nn();
|
|
4021
4042
|
if (s() && l(x.dispose), e.containerEl) {
|
|
@@ -4026,7 +4047,7 @@ function Po(e) {
|
|
|
4026
4047
|
}, { capture: !0 });
|
|
4027
4048
|
}
|
|
4028
4049
|
function S(r) {
|
|
4029
|
-
x.isActive() &&
|
|
4050
|
+
x.isActive() && kr(r, {
|
|
4030
4051
|
history: f,
|
|
4031
4052
|
selectBlock: (e) => t.selectBlock(e),
|
|
4032
4053
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4037,19 +4058,19 @@ function Po(e) {
|
|
|
4037
4058
|
}
|
|
4038
4059
|
q(document, "keydown", S);
|
|
4039
4060
|
let w = C(null);
|
|
4040
|
-
p(
|
|
4041
|
-
let
|
|
4042
|
-
p(
|
|
4043
|
-
let
|
|
4061
|
+
p(rr, e.editorRoot ?? document), p(ir, w), p(Pn, r), p(Fn, t), p(In, f), p(Ln, m), p(Rn, h), p(zn, i), p(Bn, d), p(Vn, c), p(Hn, n.blockDefaults), p(Un, y), p(Wn, n.customBlocks ?? []), p(Gn, Cr(t.content, y));
|
|
4062
|
+
let ee = ft(n.mergeTags?.syntax);
|
|
4063
|
+
p(Kn, n.mergeTags?.tags ?? []), p(qn, ee), p(Jn, n.mergeTags?.onRequest ?? null), p(Yn, n.mergeTags?.autocomplete !== !1), p(Xn, dr()), p(Zn, n.onRequestMedia ?? null), p(Qn, n.displayConditions?.conditions ?? []), p($n, n.displayConditions?.allowCustom ?? !1), p(er, e.capabilities ?? {}), p(tr, v);
|
|
4064
|
+
let T = fr(n.lint) ? null : pr({
|
|
4044
4065
|
content: t.content,
|
|
4045
4066
|
options: n.lint ?? {},
|
|
4046
4067
|
updateBlock: t.updateBlock,
|
|
4047
4068
|
updateSettings: t.updateSettings,
|
|
4048
4069
|
removeBlock: t.removeBlock
|
|
4049
4070
|
});
|
|
4050
|
-
p(
|
|
4051
|
-
function
|
|
4052
|
-
_?.(),
|
|
4071
|
+
p(nr, T);
|
|
4072
|
+
function E() {
|
|
4073
|
+
_?.(), T?.destroy(), g?.destroy(), f.destroy();
|
|
4053
4074
|
}
|
|
4054
4075
|
return {
|
|
4055
4076
|
t: a,
|
|
@@ -4063,34 +4084,34 @@ function Po(e) {
|
|
|
4063
4084
|
themeOverrides: u,
|
|
4064
4085
|
registry: y,
|
|
4065
4086
|
keyboardReorder: v,
|
|
4066
|
-
templateLint:
|
|
4087
|
+
templateLint: T,
|
|
4067
4088
|
popoverRoot: w,
|
|
4068
4089
|
registerCustomBlocks: b,
|
|
4069
|
-
destroy:
|
|
4090
|
+
destroy: E
|
|
4070
4091
|
};
|
|
4071
4092
|
}
|
|
4072
4093
|
//#endregion
|
|
4073
4094
|
//#region src/composables/usePopoverRoot.ts
|
|
4074
|
-
function
|
|
4075
|
-
return v(
|
|
4095
|
+
function zo() {
|
|
4096
|
+
return v(ir, C(null));
|
|
4076
4097
|
}
|
|
4077
4098
|
//#endregion
|
|
4078
4099
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
4079
|
-
var
|
|
4100
|
+
var Bo = ["data-tpl-theme"], Vo = /* @__PURE__ */ B({
|
|
4080
4101
|
__name: "TplModal",
|
|
4081
4102
|
props: { visible: { type: Boolean } },
|
|
4082
4103
|
emits: ["close", "keydown"],
|
|
4083
4104
|
setup(e, { emit: t }) {
|
|
4084
4105
|
let n = e, r = t, i = C(null);
|
|
4085
|
-
|
|
4086
|
-
let a = v(Vn), s =
|
|
4106
|
+
Bi(i, O(() => n.visible));
|
|
4107
|
+
let a = v(Vn), s = zo();
|
|
4087
4108
|
function c(e) {
|
|
4088
4109
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
4089
4110
|
}
|
|
4090
|
-
return (t, n) =>
|
|
4111
|
+
return (t, n) => j(s) ? (f(), N(te, {
|
|
4091
4112
|
key: 0,
|
|
4092
|
-
to:
|
|
4093
|
-
}, [V(
|
|
4113
|
+
to: j(s)
|
|
4114
|
+
}, [V(ie, {
|
|
4094
4115
|
"enter-active-class": "tpl:transition tpl:duration-150",
|
|
4095
4116
|
"enter-from-class": "tpl:opacity-0",
|
|
4096
4117
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -4098,25 +4119,25 @@ var Io = ["data-tpl-theme"], Lo = /* @__PURE__ */ B({
|
|
|
4098
4119
|
"leave-from-class": "tpl:opacity-100",
|
|
4099
4120
|
"leave-to-class": "tpl:opacity-0"
|
|
4100
4121
|
}, {
|
|
4101
|
-
default: b(() => [e.visible ? (f(),
|
|
4122
|
+
default: b(() => [e.visible ? (f(), k("div", {
|
|
4102
4123
|
key: 0,
|
|
4103
|
-
"data-tpl-theme":
|
|
4124
|
+
"data-tpl-theme": j(a),
|
|
4104
4125
|
class: "tpl tpl:fixed tpl:inset-0 tpl:z-modal tpl:flex tpl:items-center tpl:justify-center",
|
|
4105
4126
|
style: {
|
|
4106
4127
|
"background-color": "var(--tpl-overlay)",
|
|
4107
4128
|
"backdrop-filter": "blur(8px)",
|
|
4108
4129
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
4109
4130
|
},
|
|
4110
|
-
onClick: n[0] ||=
|
|
4131
|
+
onClick: n[0] ||= M((e) => r("close"), ["self"]),
|
|
4111
4132
|
onKeydown: c
|
|
4112
4133
|
}, [I("div", {
|
|
4113
4134
|
ref_key: "dialogRef",
|
|
4114
4135
|
ref: i
|
|
4115
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
4136
|
+
}, [o(t.$slots, "default")], 512)], 40, Bo)) : A("", !0)]),
|
|
4116
4137
|
_: 3
|
|
4117
|
-
})], 8, ["to"])) :
|
|
4138
|
+
})], 8, ["to"])) : A("", !0);
|
|
4118
4139
|
}
|
|
4119
|
-
}),
|
|
4140
|
+
}), Ho = class e {
|
|
4120
4141
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
4121
4142
|
accessToken = null;
|
|
4122
4143
|
expiresAt = null;
|
|
@@ -4217,8 +4238,8 @@ var Io = ["data-tpl-theme"], Lo = /* @__PURE__ */ B({
|
|
|
4217
4238
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4218
4239
|
}
|
|
4219
4240
|
};
|
|
4220
|
-
function
|
|
4221
|
-
return e.mode === "direct" ? new
|
|
4241
|
+
function Uo(e, t) {
|
|
4242
|
+
return e.mode === "direct" ? new Ho({
|
|
4222
4243
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4223
4244
|
baseUrl: e.baseUrl,
|
|
4224
4245
|
requestOptions: {
|
|
@@ -4232,7 +4253,7 @@ function zo(e, t) {
|
|
|
4232
4253
|
}
|
|
4233
4254
|
},
|
|
4234
4255
|
onError: t
|
|
4235
|
-
}) : new
|
|
4256
|
+
}) : new Ho({
|
|
4236
4257
|
url: e.url,
|
|
4237
4258
|
baseUrl: e.baseUrl,
|
|
4238
4259
|
requestOptions: e.requestOptions,
|
|
@@ -4244,16 +4265,16 @@ function zo(e, t) {
|
|
|
4244
4265
|
function Z(e, t) {
|
|
4245
4266
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4246
4267
|
}
|
|
4247
|
-
var
|
|
4268
|
+
var Wo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Wo}/templates/{template}`, Go = `${Q}/ai`, Ko = `${Wo}/media`, qo = `${Ko}/folders`, Jo = `${Wo}/saved-modules`, $ = {
|
|
4248
4269
|
health: "/api/v1/health",
|
|
4249
|
-
"projects.config": `${
|
|
4250
|
-
"broadcasting.auth": `${
|
|
4251
|
-
"templates.store": `${
|
|
4270
|
+
"projects.config": `${Wo}/config`,
|
|
4271
|
+
"broadcasting.auth": `${Wo}/broadcasting/auth`,
|
|
4272
|
+
"templates.store": `${Wo}/templates`,
|
|
4252
4273
|
"templates.show": `${Q}`,
|
|
4253
4274
|
"templates.update": `${Q}`,
|
|
4254
4275
|
"templates.destroy": `${Q}`,
|
|
4255
4276
|
"templates.export": `${Q}/export`,
|
|
4256
|
-
"templates.importFromBeefree": `${
|
|
4277
|
+
"templates.importFromBeefree": `${Wo}/templates/import/from-beefree`,
|
|
4257
4278
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4258
4279
|
"snapshots.index": `${Q}/snapshots`,
|
|
4259
4280
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4264,31 +4285,31 @@ var Bo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Bo}/templates/{te
|
|
|
4264
4285
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4265
4286
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4266
4287
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4267
|
-
"ai.generate": `${
|
|
4268
|
-
"ai.conversationMessages": `${
|
|
4269
|
-
"ai.suggestions": `${
|
|
4270
|
-
"ai.rewriteText": `${
|
|
4271
|
-
"ai.score": `${
|
|
4272
|
-
"ai.fixFinding": `${
|
|
4273
|
-
"ai.generateFromDesign": `${
|
|
4274
|
-
"media.upload": `${
|
|
4275
|
-
"media.browse": `${
|
|
4276
|
-
"media.delete": `${
|
|
4277
|
-
"media.move": `${
|
|
4278
|
-
"media.update": `${
|
|
4279
|
-
"media.replace": `${
|
|
4280
|
-
"media.checkUsage": `${
|
|
4281
|
-
"media.frequentlyUsed": `${
|
|
4282
|
-
"media.importFromUrl": `${
|
|
4283
|
-
"folders.index": `${
|
|
4284
|
-
"folders.store": `${
|
|
4285
|
-
"folders.update": `${
|
|
4286
|
-
"folders.destroy": `${
|
|
4287
|
-
"savedModules.index": `${
|
|
4288
|
-
"savedModules.store": `${
|
|
4289
|
-
"savedModules.update": `${
|
|
4290
|
-
"savedModules.destroy": `${
|
|
4291
|
-
},
|
|
4288
|
+
"ai.generate": `${Go}/generate`,
|
|
4289
|
+
"ai.conversationMessages": `${Go}/conversation-messages`,
|
|
4290
|
+
"ai.suggestions": `${Go}/suggestions`,
|
|
4291
|
+
"ai.rewriteText": `${Go}/rewrite-text`,
|
|
4292
|
+
"ai.score": `${Go}/score`,
|
|
4293
|
+
"ai.fixFinding": `${Go}/fix-finding`,
|
|
4294
|
+
"ai.generateFromDesign": `${Go}/generate-from-design`,
|
|
4295
|
+
"media.upload": `${Ko}/upload`,
|
|
4296
|
+
"media.browse": `${Ko}/browse`,
|
|
4297
|
+
"media.delete": `${Ko}/delete`,
|
|
4298
|
+
"media.move": `${Ko}/move`,
|
|
4299
|
+
"media.update": `${Ko}/{media}`,
|
|
4300
|
+
"media.replace": `${Ko}/{media}/replace`,
|
|
4301
|
+
"media.checkUsage": `${Ko}/check-usage`,
|
|
4302
|
+
"media.frequentlyUsed": `${Ko}/frequently-used`,
|
|
4303
|
+
"media.importFromUrl": `${Ko}/import-from-url`,
|
|
4304
|
+
"folders.index": `${qo}`,
|
|
4305
|
+
"folders.store": `${qo}`,
|
|
4306
|
+
"folders.update": `${qo}/{mediaFolder}`,
|
|
4307
|
+
"folders.destroy": `${qo}/{mediaFolder}`,
|
|
4308
|
+
"savedModules.index": `${Jo}`,
|
|
4309
|
+
"savedModules.store": `${Jo}`,
|
|
4310
|
+
"savedModules.update": `${Jo}/{savedModule}`,
|
|
4311
|
+
"savedModules.destroy": `${Jo}/{savedModule}`
|
|
4312
|
+
}, Yo = class {
|
|
4292
4313
|
authManager;
|
|
4293
4314
|
constructor(e) {
|
|
4294
4315
|
this.authManager = e;
|
|
@@ -4474,14 +4495,14 @@ var Bo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Bo}/templates/{te
|
|
|
4474
4495
|
};
|
|
4475
4496
|
//#endregion
|
|
4476
4497
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4477
|
-
function
|
|
4498
|
+
function Xo(e) {
|
|
4478
4499
|
return {
|
|
4479
4500
|
host: e.host,
|
|
4480
4501
|
port: e.port,
|
|
4481
4502
|
appKey: e.app_key
|
|
4482
4503
|
};
|
|
4483
4504
|
}
|
|
4484
|
-
var
|
|
4505
|
+
var Zo = class {
|
|
4485
4506
|
pusher = null;
|
|
4486
4507
|
authManager;
|
|
4487
4508
|
config;
|
|
@@ -4548,7 +4569,7 @@ var qo = class {
|
|
|
4548
4569
|
};
|
|
4549
4570
|
//#endregion
|
|
4550
4571
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4551
|
-
function
|
|
4572
|
+
function Qo(e, t) {
|
|
4552
4573
|
let { operation: n, data: r } = t;
|
|
4553
4574
|
switch (n) {
|
|
4554
4575
|
case "add_block":
|
|
@@ -4576,8 +4597,11 @@ function Jo(e, t) {
|
|
|
4576
4597
|
}
|
|
4577
4598
|
//#endregion
|
|
4578
4599
|
//#region ../core/src/cloud/editor.ts
|
|
4579
|
-
function
|
|
4580
|
-
|
|
4600
|
+
function $o(e) {
|
|
4601
|
+
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
4602
|
+
}
|
|
4603
|
+
function es(e) {
|
|
4604
|
+
let t = new Yo(e.authManager), n = S({
|
|
4581
4605
|
template: null,
|
|
4582
4606
|
content: Ue(e.defaultFontFamily, e.templateDefaults),
|
|
4583
4607
|
selectedBlockId: null,
|
|
@@ -4588,12 +4612,12 @@ function Yo(e) {
|
|
|
4588
4612
|
isSaving: !1,
|
|
4589
4613
|
isLoading: !1,
|
|
4590
4614
|
uiTheme: "auto"
|
|
4591
|
-
}), r =
|
|
4615
|
+
}), r = O({
|
|
4592
4616
|
get: () => n.content,
|
|
4593
4617
|
set: (e) => {
|
|
4594
4618
|
n.content = e, n.isDirty = !0;
|
|
4595
4619
|
}
|
|
4596
|
-
}), i =
|
|
4620
|
+
}), i = O(() => n.selectedBlockId ? o(n.content.blocks, n.selectedBlockId) : null), a = O(() => {
|
|
4597
4621
|
let e = /* @__PURE__ */ new Set(), t = n.template?.content?.blocks;
|
|
4598
4622
|
if (!t) return e;
|
|
4599
4623
|
for (let n of t) if (e.add(n.id), n.type === "section") for (let t of n.children) for (let n of t) e.add(n.id);
|
|
@@ -4680,12 +4704,14 @@ function Yo(e) {
|
|
|
4680
4704
|
if (!a) return;
|
|
4681
4705
|
let c = a.blocks.findIndex((t) => t.id === e);
|
|
4682
4706
|
if (c === -1) return;
|
|
4683
|
-
let
|
|
4707
|
+
let l;
|
|
4684
4708
|
if (r) {
|
|
4685
4709
|
let e = o(n.content.blocks, r);
|
|
4686
|
-
e
|
|
4687
|
-
|
|
4688
|
-
|
|
4710
|
+
if (!e || e.type !== "section" || i < 0 || i >= $o(e.columns)) return;
|
|
4711
|
+
e.children[i] = e.children[i] || [], l = e.children[i];
|
|
4712
|
+
} else l = n.content.blocks;
|
|
4713
|
+
let [u] = a.blocks.splice(c, 1);
|
|
4714
|
+
l.splice(t, 0, u), n.isDirty = !0;
|
|
4689
4715
|
}
|
|
4690
4716
|
async function b(r) {
|
|
4691
4717
|
n.isLoading = !0;
|
|
@@ -4722,20 +4748,20 @@ function Yo(e) {
|
|
|
4722
4748
|
n.isSaving = !1;
|
|
4723
4749
|
}
|
|
4724
4750
|
}
|
|
4725
|
-
async function
|
|
4751
|
+
async function ee() {
|
|
4726
4752
|
if (n.template?.id) try {
|
|
4727
4753
|
await t.createSnapshot(n.template.id, n.content);
|
|
4728
4754
|
} catch (t) {
|
|
4729
4755
|
throw e.onError?.(t), t;
|
|
4730
4756
|
}
|
|
4731
4757
|
}
|
|
4732
|
-
function
|
|
4758
|
+
function T() {
|
|
4733
4759
|
return n.template?.id !== void 0;
|
|
4734
4760
|
}
|
|
4735
|
-
function
|
|
4761
|
+
function E() {
|
|
4736
4762
|
n.isDirty = !0;
|
|
4737
4763
|
}
|
|
4738
|
-
function
|
|
4764
|
+
function D(e) {
|
|
4739
4765
|
let t = s(n.content.blocks, e);
|
|
4740
4766
|
if (!t) return null;
|
|
4741
4767
|
let r = t.blocks.findIndex((t) => t.id === e);
|
|
@@ -4751,7 +4777,7 @@ function Yo(e) {
|
|
|
4751
4777
|
selectedBlock: i,
|
|
4752
4778
|
savedBlockIds: a,
|
|
4753
4779
|
isBlockLocked: c,
|
|
4754
|
-
findBlockLocation:
|
|
4780
|
+
findBlockLocation: D,
|
|
4755
4781
|
setContent: l,
|
|
4756
4782
|
selectBlock: u,
|
|
4757
4783
|
setViewport: d,
|
|
@@ -4766,18 +4792,18 @@ function Yo(e) {
|
|
|
4766
4792
|
create: b,
|
|
4767
4793
|
load: C,
|
|
4768
4794
|
save: w,
|
|
4769
|
-
createSnapshot:
|
|
4770
|
-
hasTemplate:
|
|
4771
|
-
markDirty:
|
|
4795
|
+
createSnapshot: ee,
|
|
4796
|
+
hasTemplate: T,
|
|
4797
|
+
markDirty: E
|
|
4772
4798
|
};
|
|
4773
4799
|
}
|
|
4774
4800
|
//#endregion
|
|
4775
4801
|
//#region ../core/src/cloud/ai-chat.ts
|
|
4776
|
-
var
|
|
4777
|
-
function
|
|
4778
|
-
return `msg_${Date.now()}_${++
|
|
4802
|
+
var ts = 0;
|
|
4803
|
+
function ns() {
|
|
4804
|
+
return `msg_${Date.now()}_${++ts}`;
|
|
4779
4805
|
}
|
|
4780
|
-
function
|
|
4806
|
+
function rs(e) {
|
|
4781
4807
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C([]), o = C(!1), s = C(!1), c = C(null), l = C(null), u = C(null), d = C(null), f = C(null), p = C(null), m = C(!1), h = C([]), g = C(!1);
|
|
4782
4808
|
function _(e, t) {
|
|
4783
4809
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -4871,14 +4897,14 @@ function Qo(e) {
|
|
|
4871
4897
|
let v = n();
|
|
4872
4898
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
4873
4899
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
4874
|
-
let y =
|
|
4900
|
+
let y = ns();
|
|
4875
4901
|
a.value = [...a.value, {
|
|
4876
4902
|
id: y,
|
|
4877
4903
|
role: "user",
|
|
4878
4904
|
content: e,
|
|
4879
4905
|
timestamp: Date.now()
|
|
4880
4906
|
}];
|
|
4881
|
-
let b =
|
|
4907
|
+
let b = ns();
|
|
4882
4908
|
a.value = [...a.value, {
|
|
4883
4909
|
id: b,
|
|
4884
4910
|
role: "assistant",
|
|
@@ -4969,18 +4995,18 @@ function Qo(e) {
|
|
|
4969
4995
|
}
|
|
4970
4996
|
//#endregion
|
|
4971
4997
|
//#region ../core/src/cloud/ai-config.ts
|
|
4972
|
-
function
|
|
4998
|
+
function is(e) {
|
|
4973
4999
|
function t(t) {
|
|
4974
5000
|
return e === !1 ? !1 : e?.[t] !== !1;
|
|
4975
5001
|
}
|
|
4976
5002
|
return {
|
|
4977
5003
|
isFeatureEnabled: t,
|
|
4978
|
-
hasAnyMenuFeature:
|
|
5004
|
+
hasAnyMenuFeature: O(() => t("chat") || t("scoring") || t("designToTemplate"))
|
|
4979
5005
|
};
|
|
4980
5006
|
}
|
|
4981
5007
|
//#endregion
|
|
4982
5008
|
//#region ../core/src/cloud/template-scoring.ts
|
|
4983
|
-
function
|
|
5009
|
+
function as(e) {
|
|
4984
5010
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
4985
5011
|
async function l(e, o) {
|
|
4986
5012
|
let s = n();
|
|
@@ -5125,7 +5151,7 @@ function es(e) {
|
|
|
5125
5151
|
}
|
|
5126
5152
|
//#endregion
|
|
5127
5153
|
//#region ../core/src/cloud/design-reference.ts
|
|
5128
|
-
function
|
|
5154
|
+
function os(e) {
|
|
5129
5155
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5130
5156
|
async function s(e) {
|
|
5131
5157
|
let s = n();
|
|
@@ -5188,12 +5214,12 @@ function ts(e) {
|
|
|
5188
5214
|
}
|
|
5189
5215
|
//#endregion
|
|
5190
5216
|
//#region ../core/src/cloud/comments.ts
|
|
5191
|
-
function
|
|
5192
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5217
|
+
function ss(e) {
|
|
5218
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new Yo(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
|
|
5193
5219
|
let e = 0;
|
|
5194
5220
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5195
5221
|
return e;
|
|
5196
|
-
}), p =
|
|
5222
|
+
}), p = O(() => c.value.filter((e) => !e.resolved_at).length), m = O(() => {
|
|
5197
5223
|
let e = /* @__PURE__ */ new Map();
|
|
5198
5224
|
for (let t of c.value) t.block_id && e.set(t.block_id, (e.get(t.block_id) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
5199
5225
|
return e;
|
|
@@ -5270,7 +5296,7 @@ function ns(e) {
|
|
|
5270
5296
|
body: t,
|
|
5271
5297
|
...h()
|
|
5272
5298
|
}, g());
|
|
5273
|
-
return
|
|
5299
|
+
return D(e, n), _("updated", n), n;
|
|
5274
5300
|
} catch (e) {
|
|
5275
5301
|
let t = e instanceof Error ? e : Error("Failed to update comment", { cause: e });
|
|
5276
5302
|
return a?.(t), null;
|
|
@@ -5307,7 +5333,7 @@ function ns(e) {
|
|
|
5307
5333
|
u.value = !0;
|
|
5308
5334
|
try {
|
|
5309
5335
|
let n = await s.resolveComment(t, e, h(), g());
|
|
5310
|
-
return
|
|
5336
|
+
return D(e, n), _(n.resolved_at ? "resolved" : "unresolved", n), n;
|
|
5311
5337
|
} catch (e) {
|
|
5312
5338
|
let t = e instanceof Error ? e : Error("Failed to toggle comment resolution", { cause: e });
|
|
5313
5339
|
return a?.(t), null;
|
|
@@ -5315,17 +5341,17 @@ function ns(e) {
|
|
|
5315
5341
|
u.value = !1;
|
|
5316
5342
|
}
|
|
5317
5343
|
}
|
|
5318
|
-
function
|
|
5344
|
+
function ee(e) {
|
|
5319
5345
|
if (e.parent_id) {
|
|
5320
5346
|
let t = v(e.parent_id);
|
|
5321
5347
|
t && (t.replies = [...t.replies ?? [], e]);
|
|
5322
5348
|
} else c.value = [...c.value, e];
|
|
5323
5349
|
_("created", e);
|
|
5324
5350
|
}
|
|
5325
|
-
function
|
|
5326
|
-
|
|
5351
|
+
function T(e) {
|
|
5352
|
+
D(e.id, e), _("updated", e);
|
|
5327
5353
|
}
|
|
5328
|
-
function
|
|
5354
|
+
function E(e, t) {
|
|
5329
5355
|
let n = v(e), r = n ? {
|
|
5330
5356
|
...n,
|
|
5331
5357
|
replies: [...n.replies ?? []]
|
|
@@ -5336,7 +5362,7 @@ function ns(e) {
|
|
|
5336
5362
|
} else c.value = c.value.filter((t) => t.id !== e);
|
|
5337
5363
|
r && _("deleted", r);
|
|
5338
5364
|
}
|
|
5339
|
-
function
|
|
5365
|
+
function D(e, t) {
|
|
5340
5366
|
for (let n = 0; n < c.value.length; n++) {
|
|
5341
5367
|
if (c.value[n].id === e) {
|
|
5342
5368
|
c.value = [
|
|
@@ -5381,24 +5407,24 @@ function ns(e) {
|
|
|
5381
5407
|
editComment: x,
|
|
5382
5408
|
removeComment: S,
|
|
5383
5409
|
toggleResolve: w,
|
|
5384
|
-
applyRemoteCreate:
|
|
5385
|
-
applyRemoteUpdate:
|
|
5386
|
-
applyRemoteDelete:
|
|
5410
|
+
applyRemoteCreate: ee,
|
|
5411
|
+
applyRemoteUpdate: T,
|
|
5412
|
+
applyRemoteDelete: E
|
|
5387
5413
|
};
|
|
5388
5414
|
}
|
|
5389
5415
|
//#endregion
|
|
5390
5416
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5391
|
-
function
|
|
5417
|
+
function cs(e) {
|
|
5392
5418
|
let { comments: t, channel: n } = e;
|
|
5393
5419
|
H(n, (e, n) => {
|
|
5394
5420
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5395
|
-
|
|
5421
|
+
ls(t, e);
|
|
5396
5422
|
});
|
|
5397
5423
|
}), l(() => {
|
|
5398
5424
|
n.value?.unbind("comment-broadcast");
|
|
5399
5425
|
});
|
|
5400
5426
|
}
|
|
5401
|
-
function
|
|
5427
|
+
function ls(e, t) {
|
|
5402
5428
|
switch (t.action) {
|
|
5403
5429
|
case "comment_created":
|
|
5404
5430
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5417,7 +5443,7 @@ function is(e, t) {
|
|
|
5417
5443
|
}
|
|
5418
5444
|
//#endregion
|
|
5419
5445
|
//#region ../core/src/cloud/collaboration.ts
|
|
5420
|
-
var
|
|
5446
|
+
var us = [
|
|
5421
5447
|
"pusher:member_added",
|
|
5422
5448
|
"pusher:member_removed",
|
|
5423
5449
|
"client-block_locked",
|
|
@@ -5425,10 +5451,10 @@ var as = [
|
|
|
5425
5451
|
"client-operation",
|
|
5426
5452
|
"mcp-operation"
|
|
5427
5453
|
];
|
|
5428
|
-
function
|
|
5429
|
-
for (let t of
|
|
5454
|
+
function ds(e) {
|
|
5455
|
+
for (let t of us) e.unbind(t);
|
|
5430
5456
|
}
|
|
5431
|
-
var
|
|
5457
|
+
var fs = [
|
|
5432
5458
|
"#3b82f6",
|
|
5433
5459
|
"#ef4444",
|
|
5434
5460
|
"#10b981",
|
|
@@ -5440,10 +5466,10 @@ var ss = [
|
|
|
5440
5466
|
"#6366f1",
|
|
5441
5467
|
"#14b8a6"
|
|
5442
5468
|
];
|
|
5443
|
-
function
|
|
5444
|
-
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c =
|
|
5469
|
+
function ps(e) {
|
|
5470
|
+
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
|
|
5445
5471
|
function u() {
|
|
5446
|
-
let e =
|
|
5472
|
+
let e = fs[o % fs.length];
|
|
5447
5473
|
return o++, e;
|
|
5448
5474
|
}
|
|
5449
5475
|
function d(e) {
|
|
@@ -5485,7 +5511,7 @@ function cs(e) {
|
|
|
5485
5511
|
function h(e) {
|
|
5486
5512
|
s = !0;
|
|
5487
5513
|
try {
|
|
5488
|
-
|
|
5514
|
+
Qo(n, e);
|
|
5489
5515
|
} finally {
|
|
5490
5516
|
s = !1;
|
|
5491
5517
|
}
|
|
@@ -5505,7 +5531,7 @@ function cs(e) {
|
|
|
5505
5531
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5506
5532
|
s || (t && v(t), e && _(e));
|
|
5507
5533
|
}), H(r, (t, n) => {
|
|
5508
|
-
if (n &&
|
|
5534
|
+
if (n && ds(n), !t) {
|
|
5509
5535
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5510
5536
|
return;
|
|
5511
5537
|
}
|
|
@@ -5537,7 +5563,7 @@ function cs(e) {
|
|
|
5537
5563
|
h(e);
|
|
5538
5564
|
});
|
|
5539
5565
|
}), l(() => {
|
|
5540
|
-
r.value &&
|
|
5566
|
+
r.value && ds(r.value);
|
|
5541
5567
|
}), {
|
|
5542
5568
|
collaborators: i,
|
|
5543
5569
|
lockedBlocks: a,
|
|
@@ -5547,15 +5573,16 @@ function cs(e) {
|
|
|
5547
5573
|
}
|
|
5548
5574
|
//#endregion
|
|
5549
5575
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5550
|
-
function
|
|
5576
|
+
function ms(e, t) {
|
|
5551
5577
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5552
|
-
e.addBlock = (e, r, i) => {
|
|
5553
|
-
n(e, r, i), t._broadcastOperation({
|
|
5578
|
+
e.addBlock = (e, r, i, a) => {
|
|
5579
|
+
n(e, r, i, a), t._broadcastOperation({
|
|
5554
5580
|
operation: "add_block",
|
|
5555
5581
|
data: {
|
|
5556
5582
|
block: e,
|
|
5557
5583
|
section_id: r,
|
|
5558
|
-
column_index: i
|
|
5584
|
+
column_index: i,
|
|
5585
|
+
index: a
|
|
5559
5586
|
},
|
|
5560
5587
|
timestamp: Date.now()
|
|
5561
5588
|
});
|
|
@@ -5601,11 +5628,11 @@ function ls(e, t) {
|
|
|
5601
5628
|
}
|
|
5602
5629
|
//#endregion
|
|
5603
5630
|
//#region ../core/src/cloud/web-socket.ts
|
|
5604
|
-
function
|
|
5631
|
+
function hs(e) {
|
|
5605
5632
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5606
5633
|
async function s(e, s) {
|
|
5607
5634
|
if (a) return;
|
|
5608
|
-
a = new
|
|
5635
|
+
a = new Zo({
|
|
5609
5636
|
authManager: t,
|
|
5610
5637
|
config: s,
|
|
5611
5638
|
onError: n
|
|
@@ -5633,8 +5660,8 @@ function us(e) {
|
|
|
5633
5660
|
}
|
|
5634
5661
|
//#endregion
|
|
5635
5662
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5636
|
-
function
|
|
5637
|
-
let t = new
|
|
5663
|
+
function gs(e) {
|
|
5664
|
+
let t = new Yo(e.authManager), n = C([]), r = C(!1);
|
|
5638
5665
|
async function i(i) {
|
|
5639
5666
|
r.value = !0;
|
|
5640
5667
|
try {
|
|
@@ -5682,8 +5709,8 @@ function ds(e) {
|
|
|
5682
5709
|
}
|
|
5683
5710
|
//#endregion
|
|
5684
5711
|
//#region ../core/src/cloud/snapshots.ts
|
|
5685
|
-
function
|
|
5686
|
-
let t = new
|
|
5712
|
+
function _s(e) {
|
|
5713
|
+
let t = new Yo(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5687
5714
|
async function a() {
|
|
5688
5715
|
r.value = !0;
|
|
5689
5716
|
try {
|
|
@@ -5715,12 +5742,12 @@ function fs(e) {
|
|
|
5715
5742
|
}
|
|
5716
5743
|
//#endregion
|
|
5717
5744
|
//#region ../core/src/cloud/test-email.ts
|
|
5718
|
-
function
|
|
5719
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
5745
|
+
function vs(e) {
|
|
5746
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new Yo(t), l = C(!1), u = C(null), d = C(null);
|
|
5720
5747
|
o && H(o, (e) => {
|
|
5721
5748
|
e && (d.value = t.testEmailConfig);
|
|
5722
5749
|
}, { immediate: !0 });
|
|
5723
|
-
let f =
|
|
5750
|
+
let f = O(() => d.value !== null), p = O(() => d.value?.allowedEmails ?? []);
|
|
5724
5751
|
async function m(e) {
|
|
5725
5752
|
if (!d.value) throw Error("Test email is not enabled for this project");
|
|
5726
5753
|
let t = n();
|
|
@@ -5752,8 +5779,8 @@ function ps(e) {
|
|
|
5752
5779
|
}
|
|
5753
5780
|
//#endregion
|
|
5754
5781
|
//#region ../core/src/cloud/export.ts
|
|
5755
|
-
function
|
|
5756
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
5782
|
+
function ys(e) {
|
|
5783
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new Yo(t);
|
|
5757
5784
|
function a() {
|
|
5758
5785
|
let e = n?.();
|
|
5759
5786
|
return {
|
|
@@ -5779,8 +5806,8 @@ function ms(e) {
|
|
|
5779
5806
|
}
|
|
5780
5807
|
//#endregion
|
|
5781
5808
|
//#region ../core/src/cloud/plan-config.ts
|
|
5782
|
-
function
|
|
5783
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
5809
|
+
function bs(e) {
|
|
5810
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new Yo(t), o = O(() => r.value?.features ?? null);
|
|
5784
5811
|
function s(e) {
|
|
5785
5812
|
return r.value?.features[e] ?? !1;
|
|
5786
5813
|
}
|
|
@@ -5806,11 +5833,11 @@ function hs(e) {
|
|
|
5806
5833
|
}
|
|
5807
5834
|
//#endregion
|
|
5808
5835
|
//#region ../core/src/cloud/health-check.ts
|
|
5809
|
-
var
|
|
5810
|
-
function
|
|
5836
|
+
var xs = 5e3;
|
|
5837
|
+
function Ss(e) {
|
|
5811
5838
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
5812
5839
|
}
|
|
5813
|
-
async function
|
|
5840
|
+
async function Cs(e, t) {
|
|
5814
5841
|
let n = performance.now();
|
|
5815
5842
|
try {
|
|
5816
5843
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -5862,7 +5889,7 @@ async function vs(e, t) {
|
|
|
5862
5889
|
};
|
|
5863
5890
|
}
|
|
5864
5891
|
}
|
|
5865
|
-
async function
|
|
5892
|
+
async function ws(e) {
|
|
5866
5893
|
if (!e?.host || !e?.app_key) return {
|
|
5867
5894
|
ok: !1,
|
|
5868
5895
|
error: "WebSocket configuration not available"
|
|
@@ -5878,7 +5905,7 @@ async function ys(e) {
|
|
|
5878
5905
|
ok: !1,
|
|
5879
5906
|
error: "WebSocket connection timed out"
|
|
5880
5907
|
});
|
|
5881
|
-
},
|
|
5908
|
+
}, xs);
|
|
5882
5909
|
try {
|
|
5883
5910
|
n = new WebSocket(t);
|
|
5884
5911
|
} catch (t) {
|
|
@@ -5898,8 +5925,8 @@ async function ys(e) {
|
|
|
5898
5925
|
};
|
|
5899
5926
|
});
|
|
5900
5927
|
}
|
|
5901
|
-
async function
|
|
5902
|
-
let t = await
|
|
5928
|
+
async function Ts(e = {}) {
|
|
5929
|
+
let t = await Cs(Ss(e), e.authManager), n = await ws(t.wsConfig);
|
|
5903
5930
|
return {
|
|
5904
5931
|
api: t.api,
|
|
5905
5932
|
websocket: n,
|
|
@@ -5909,29 +5936,29 @@ async function bs(e = {}) {
|
|
|
5909
5936
|
}
|
|
5910
5937
|
//#endregion
|
|
5911
5938
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5912
|
-
function
|
|
5939
|
+
function Es(e) {
|
|
5913
5940
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5914
5941
|
H(n, (e, n) => {
|
|
5915
5942
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5916
|
-
|
|
5943
|
+
Qo(t, e), r?.(e);
|
|
5917
5944
|
});
|
|
5918
5945
|
});
|
|
5919
5946
|
}
|
|
5920
5947
|
//#endregion
|
|
5921
5948
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5922
|
-
var
|
|
5949
|
+
var Ds = {
|
|
5923
5950
|
key: 0,
|
|
5924
5951
|
class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
5925
|
-
},
|
|
5952
|
+
}, Os = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, ks = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, As = { class: "tpl:flex tpl:items-center tpl:gap-1" }, js = ["title"], Ms = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, Ns = {
|
|
5926
5953
|
key: 0,
|
|
5927
5954
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5928
|
-
},
|
|
5955
|
+
}, Ps = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Fs = {
|
|
5929
5956
|
key: 1,
|
|
5930
5957
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5931
|
-
},
|
|
5958
|
+
}, Is = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ls = {
|
|
5932
5959
|
key: 2,
|
|
5933
5960
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
5934
|
-
},
|
|
5961
|
+
}, Rs = {
|
|
5935
5962
|
key: 0,
|
|
5936
5963
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
5937
5964
|
style: {
|
|
@@ -5940,10 +5967,10 @@ var Ss = {
|
|
|
5940
5967
|
"max-width": "85%",
|
|
5941
5968
|
"box-shadow": "var(--tpl-shadow)"
|
|
5942
5969
|
}
|
|
5943
|
-
},
|
|
5970
|
+
}, zs = {
|
|
5944
5971
|
key: 1,
|
|
5945
5972
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5946
|
-
},
|
|
5973
|
+
}, Bs = {
|
|
5947
5974
|
key: 1,
|
|
5948
5975
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
5949
5976
|
style: {
|
|
@@ -5952,21 +5979,21 @@ var Ss = {
|
|
|
5952
5979
|
color: "var(--tpl-text)",
|
|
5953
5980
|
"box-shadow": "var(--tpl-shadow)"
|
|
5954
5981
|
}
|
|
5955
|
-
},
|
|
5982
|
+
}, Vs = {
|
|
5956
5983
|
key: 0,
|
|
5957
5984
|
class: "tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs",
|
|
5958
5985
|
style: {
|
|
5959
5986
|
"background-color": "var(--tpl-danger-light)",
|
|
5960
5987
|
color: "var(--tpl-danger)"
|
|
5961
5988
|
}
|
|
5962
|
-
},
|
|
5989
|
+
}, Hs = {
|
|
5963
5990
|
key: 1,
|
|
5964
5991
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
5965
5992
|
style: {
|
|
5966
5993
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
5967
5994
|
"backdrop-filter": "blur(2px)"
|
|
5968
5995
|
}
|
|
5969
|
-
},
|
|
5996
|
+
}, Us = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ws = ["onClick"], Gs = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ks = { 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)]" }, qs = ["placeholder", "disabled"], Js = ["disabled"], Ys = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Xs = /* @__PURE__ */ B({
|
|
5970
5997
|
__name: "AiChatSidebar",
|
|
5971
5998
|
props: {
|
|
5972
5999
|
visible: { type: Boolean },
|
|
@@ -5974,7 +6001,7 @@ var Ss = {
|
|
|
5974
6001
|
},
|
|
5975
6002
|
emits: ["close"],
|
|
5976
6003
|
setup(e, { emit: t }) {
|
|
5977
|
-
let n = e, r = t, i = J(
|
|
6004
|
+
let n = e, r = t, i = J(ur, "AiChatSidebar"), a = J(Fn, "AiChatSidebar"), o = J(ar, "AiChatSidebar"), s = v(Kn, []), l = ha(), u = rs({
|
|
5978
6005
|
authManager: o,
|
|
5979
6006
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
5980
6007
|
onApply: n.onApply,
|
|
@@ -6000,20 +6027,20 @@ var Ss = {
|
|
|
6000
6027
|
(u.messages.value?.length ?? 0) === 0 && a.content.value.blocks.length === 0 && u.loadSuggestions(a.content.value, s);
|
|
6001
6028
|
}
|
|
6002
6029
|
});
|
|
6003
|
-
async function
|
|
6030
|
+
async function ee() {
|
|
6004
6031
|
let e = d.value.trim();
|
|
6005
6032
|
!e || u.isGenerating.value || (d.value = "", u.error.value = null, u.failedPrompt.value = null, w(), await u.sendPrompt(e, a.content.value, s), l.alive && (u.failedPrompt.value && (d.value = u.failedPrompt.value), w()));
|
|
6006
6033
|
}
|
|
6007
|
-
function
|
|
6034
|
+
function T(e) {
|
|
6008
6035
|
return e.replace(/```json[\s\S]*?```/g, "").replace(/```json[\s\S]*/g, "").trim();
|
|
6009
6036
|
}
|
|
6010
|
-
function
|
|
6011
|
-
y(), d.value = e,
|
|
6037
|
+
function E(e) {
|
|
6038
|
+
y(), d.value = e, ee();
|
|
6012
6039
|
}
|
|
6013
|
-
function
|
|
6014
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
6040
|
+
function te(e) {
|
|
6041
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ee());
|
|
6015
6042
|
}
|
|
6016
|
-
return (t, n) => (f(),
|
|
6043
|
+
return (t, n) => (f(), N(ie, {
|
|
6017
6044
|
"enter-active-class": "tpl-ai-slide-enter-active",
|
|
6018
6045
|
"enter-from-class": "tpl:translate-x-full",
|
|
6019
6046
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6021,42 +6048,42 @@ var Ss = {
|
|
|
6021
6048
|
"leave-from-class": "tpl:translate-x-0",
|
|
6022
6049
|
"leave-to-class": "tpl:translate-x-full"
|
|
6023
6050
|
}, {
|
|
6024
|
-
default: b(() => [e.visible ? (f(),
|
|
6025
|
-
I("div",
|
|
6051
|
+
default: b(() => [e.visible ? (f(), k("div", Ds, [
|
|
6052
|
+
I("div", Os, [I("div", ks, [V(j(xi), {
|
|
6026
6053
|
size: 13,
|
|
6027
6054
|
"stroke-width": 2
|
|
6028
|
-
}), I("span", null,
|
|
6055
|
+
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div", As, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6029
6056
|
key: 0,
|
|
6030
6057
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6031
|
-
title:
|
|
6032
|
-
onClick: n[0] ||= (e) =>
|
|
6033
|
-
}, [V(
|
|
6058
|
+
title: j(i).aiChat.clear,
|
|
6059
|
+
onClick: n[0] ||= (e) => j(u).clearChat()
|
|
6060
|
+
}, [V(j(Ci), {
|
|
6034
6061
|
size: 14,
|
|
6035
6062
|
"stroke-width": 2
|
|
6036
|
-
})], 8,
|
|
6063
|
+
})], 8, js)) : A("", !0), I("button", {
|
|
6037
6064
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6038
6065
|
onClick: n[1] ||= (e) => r("close")
|
|
6039
|
-
}, [V(
|
|
6066
|
+
}, [V(j(Oi), {
|
|
6040
6067
|
size: 14,
|
|
6041
6068
|
"stroke-width": 2
|
|
6042
6069
|
})])])]),
|
|
6043
|
-
I("div",
|
|
6070
|
+
I("div", Ms, [
|
|
6044
6071
|
I("div", {
|
|
6045
6072
|
ref_key: "messagesContainer",
|
|
6046
6073
|
ref: p,
|
|
6047
6074
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
6048
|
-
}, [
|
|
6075
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", Ns, [V(j(li), {
|
|
6049
6076
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6050
6077
|
size: 24,
|
|
6051
6078
|
"stroke-width": 2
|
|
6052
|
-
}), I("p",
|
|
6079
|
+
}), I("p", Ps, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", Fs, [V(j(xi), {
|
|
6053
6080
|
size: 32,
|
|
6054
6081
|
"stroke-width": 1.5,
|
|
6055
6082
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6056
|
-
}), I("p",
|
|
6083
|
+
}), I("p", Is, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", Ls, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
|
|
6057
6084
|
key: e.id,
|
|
6058
6085
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6059
|
-
}, [e.role === "user" ? (f(),
|
|
6086
|
+
}, [e.role === "user" ? (f(), k("div", Rs, D(e.content), 1)) : (f(), k("div", zs, [!T(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(Li, { key: 0 })) : (f(), k("div", Bs, D(T(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
|
|
6060
6087
|
key: 2,
|
|
6061
6088
|
class: "tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6062
6089
|
style: {
|
|
@@ -6064,135 +6091,135 @@ var Ss = {
|
|
|
6064
6091
|
color: "var(--tpl-text-muted)",
|
|
6065
6092
|
"background-color": "transparent"
|
|
6066
6093
|
},
|
|
6067
|
-
onClick: n[2] ||= (e) =>
|
|
6068
|
-
}, [
|
|
6094
|
+
onClick: n[2] ||= (e) => j(u).toggleLastRevert()
|
|
6095
|
+
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(mi), {
|
|
6069
6096
|
size: 12,
|
|
6070
6097
|
"stroke-width": 2
|
|
6071
|
-
}), z(" " +
|
|
6098
|
+
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(Ti), {
|
|
6072
6099
|
size: 12,
|
|
6073
6100
|
"stroke-width": 2
|
|
6074
|
-
}), z(" " +
|
|
6075
|
-
|
|
6101
|
+
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
6102
|
+
j(u).error.value ? (f(), k("div", Vs, [V(j(Yr), {
|
|
6076
6103
|
size: 14,
|
|
6077
6104
|
"stroke-width": 2,
|
|
6078
6105
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6079
|
-
}), I("span", null,
|
|
6080
|
-
(
|
|
6106
|
+
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
6107
|
+
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", Hs, [I("div", Us, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
|
|
6081
6108
|
key: t,
|
|
6082
|
-
class:
|
|
6109
|
+
class: F(["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", (j(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"]),
|
|
6083
6110
|
style: {
|
|
6084
6111
|
"border-color": "var(--tpl-border)",
|
|
6085
6112
|
color: "var(--tpl-primary)",
|
|
6086
6113
|
"background-color": "var(--tpl-bg)",
|
|
6087
6114
|
"box-shadow": "var(--tpl-shadow)"
|
|
6088
6115
|
},
|
|
6089
|
-
onClick: (t) =>
|
|
6090
|
-
},
|
|
6116
|
+
onClick: (t) => E(e)
|
|
6117
|
+
}, D(e), 11, Ws))), 128))])])) : A("", !0)
|
|
6091
6118
|
]),
|
|
6092
|
-
I("div",
|
|
6119
|
+
I("div", Gs, [I("div", Ks, [c(I("textarea", {
|
|
6093
6120
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
6094
6121
|
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)]",
|
|
6095
|
-
placeholder:
|
|
6096
|
-
disabled:
|
|
6122
|
+
placeholder: j(i).aiChat.inputPlaceholder,
|
|
6123
|
+
disabled: j(u).isGenerating.value,
|
|
6097
6124
|
rows: "3",
|
|
6098
|
-
onKeydown:
|
|
6099
|
-
}, null, 40,
|
|
6125
|
+
onKeydown: te
|
|
6126
|
+
}, null, 40, qs), [[ae, d.value]]), I("button", {
|
|
6100
6127
|
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)]",
|
|
6101
|
-
disabled: !d.value.trim() ||
|
|
6102
|
-
onClick:
|
|
6103
|
-
}, [V(
|
|
6128
|
+
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
6129
|
+
onClick: ee
|
|
6130
|
+
}, [V(j(_i), {
|
|
6104
6131
|
size: 16,
|
|
6105
6132
|
"stroke-width": 2
|
|
6106
|
-
})], 8,
|
|
6107
|
-
])) :
|
|
6133
|
+
})], 8, Js)]), I("p", Ys, D(j(i).aiMenu.disclaimer), 1)])
|
|
6134
|
+
])) : A("", !0)]),
|
|
6108
6135
|
_: 1
|
|
6109
6136
|
}));
|
|
6110
6137
|
}
|
|
6111
|
-
}),
|
|
6112
|
-
function
|
|
6138
|
+
}), Zs = /* @__PURE__ */ e({ default: () => Qs }), Qs = /* @__PURE__ */ Ni(Xs, [["__scopeId", "data-v-a55e4bff"]]), $s = 6e4, ec = 36e5, tc = 864e5;
|
|
6139
|
+
function nc(e, t, n, r) {
|
|
6113
6140
|
let i = new Date(e).getTime();
|
|
6114
6141
|
if (Number.isNaN(i)) return null;
|
|
6115
6142
|
let a = Date.now() - i;
|
|
6116
6143
|
if (a < -6e4) return null;
|
|
6117
|
-
let o = Math.floor(a /
|
|
6144
|
+
let o = Math.floor(a / $s), s = Math.floor(a / ec), c = Math.floor(a / tc);
|
|
6118
6145
|
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));
|
|
6119
6146
|
}
|
|
6120
6147
|
//#endregion
|
|
6121
6148
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6122
|
-
var
|
|
6149
|
+
var rc = {
|
|
6123
6150
|
key: 0,
|
|
6124
6151
|
class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6125
|
-
},
|
|
6152
|
+
}, ic = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, ac = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, oc = {
|
|
6126
6153
|
key: 0,
|
|
6127
6154
|
class: "tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
|
|
6128
|
-
},
|
|
6155
|
+
}, sc = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, cc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, lc = {
|
|
6129
6156
|
key: 0,
|
|
6130
6157
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6131
|
-
},
|
|
6158
|
+
}, uc = {
|
|
6132
6159
|
key: 1,
|
|
6133
6160
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
6134
|
-
},
|
|
6161
|
+
}, dc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fc = {
|
|
6135
6162
|
key: 2,
|
|
6136
6163
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6137
|
-
},
|
|
6164
|
+
}, pc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, mc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, hc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, gc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, _c = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, vc = {
|
|
6138
6165
|
key: 0,
|
|
6139
6166
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6140
|
-
},
|
|
6167
|
+
}, yc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, bc = ["title", "onClick"], xc = ["title", "onClick"], Sc = ["title", "onClick"], Cc = {
|
|
6141
6168
|
key: 0,
|
|
6142
6169
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6143
|
-
},
|
|
6170
|
+
}, wc = {
|
|
6144
6171
|
key: 0,
|
|
6145
6172
|
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:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
6146
|
-
},
|
|
6173
|
+
}, Tc = ["onClick"], Ec = {
|
|
6147
6174
|
key: 2,
|
|
6148
6175
|
class: "tpl:mt-2"
|
|
6149
|
-
},
|
|
6176
|
+
}, Dc = ["onKeydown"], Oc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, kc = ["disabled", "onClick"], Ac = {
|
|
6150
6177
|
key: 3,
|
|
6151
6178
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6152
|
-
},
|
|
6179
|
+
}, jc = {
|
|
6153
6180
|
key: 4,
|
|
6154
6181
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6155
|
-
},
|
|
6182
|
+
}, Mc = { class: "tpl:flex-1" }, Nc = ["onClick"], Pc = {
|
|
6156
6183
|
key: 5,
|
|
6157
6184
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6158
|
-
},
|
|
6185
|
+
}, Fc = ["title", "onClick"], Ic = ["onClick"], Lc = {
|
|
6159
6186
|
key: 0,
|
|
6160
6187
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6161
|
-
},
|
|
6188
|
+
}, Rc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, zc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Bc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Vc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Hc = {
|
|
6162
6189
|
key: 0,
|
|
6163
6190
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6164
|
-
},
|
|
6191
|
+
}, Uc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Wc = ["title", "onClick"], Gc = ["title", "onClick"], Kc = {
|
|
6165
6192
|
key: 0,
|
|
6166
6193
|
class: "tpl:mt-1.5"
|
|
6167
|
-
},
|
|
6194
|
+
}, qc = ["onKeydown"], Jc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Yc = ["disabled", "onClick"], Xc = {
|
|
6168
6195
|
key: 1,
|
|
6169
6196
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6170
|
-
},
|
|
6197
|
+
}, Zc = {
|
|
6171
6198
|
key: 2,
|
|
6172
6199
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6173
|
-
},
|
|
6200
|
+
}, Qc = { class: "tpl:flex-1" }, $c = ["onClick"], el = {
|
|
6174
6201
|
key: 0,
|
|
6175
6202
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6176
|
-
},
|
|
6203
|
+
}, tl = { class: "tpl:flex tpl:items-end tpl:gap-2" }, nl = ["placeholder", "onKeydown"], rl = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, il = ["disabled", "onClick"], al = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ol = {
|
|
6177
6204
|
key: 0,
|
|
6178
6205
|
class: "tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
6179
|
-
},
|
|
6206
|
+
}, sl = {
|
|
6180
6207
|
key: 1,
|
|
6181
6208
|
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)]"
|
|
6182
|
-
},
|
|
6209
|
+
}, cl = ["placeholder", "disabled"], ll = ["disabled"], ul = /* @__PURE__ */ B({
|
|
6183
6210
|
__name: "CommentsSidebar",
|
|
6184
6211
|
props: { visible: { type: Boolean } },
|
|
6185
6212
|
emits: ["close", "filterBlock"],
|
|
6186
6213
|
setup(e, { expose: t, emit: n }) {
|
|
6187
|
-
let r = e, i = n, { format: a } = Y(), { t: o } =
|
|
6214
|
+
let r = e, i = n, { format: a } = Y(), { t: o } = Ui(), s = J(Fn, "CommentsSidebar"), l = J(ar, "CommentsSidebar"), u = J(sr, "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), ee = C(null), T = O(() => l.userConfig?.id ?? null), E = O(() => {
|
|
6188
6215
|
let e = /* @__PURE__ */ new Set();
|
|
6189
6216
|
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);
|
|
6190
6217
|
return e;
|
|
6191
6218
|
});
|
|
6192
|
-
function
|
|
6193
|
-
return e ? !
|
|
6219
|
+
function te(e) {
|
|
6220
|
+
return e ? !E.value.has(e) : !1;
|
|
6194
6221
|
}
|
|
6195
|
-
let
|
|
6222
|
+
let ne = O(() => d.value !== "block" || !p.value ? !1 : !(s.savedBlockIds?.value.has(p.value) ?? !0)), re = O(() => {
|
|
6196
6223
|
let e = u.comments.value;
|
|
6197
6224
|
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;
|
|
6198
6225
|
});
|
|
@@ -6201,11 +6228,11 @@ var Qs = {
|
|
|
6201
6228
|
}), H(() => s.state.selectedBlockId, (e) => {
|
|
6202
6229
|
d.value === "block" && e && (p.value = e);
|
|
6203
6230
|
});
|
|
6204
|
-
function
|
|
6231
|
+
function M(e, t) {
|
|
6205
6232
|
d.value = e, p.value = e === "block" ? t ?? null : null;
|
|
6206
6233
|
}
|
|
6207
|
-
function
|
|
6208
|
-
|
|
6234
|
+
function P(e) {
|
|
6235
|
+
M("block", e), i("filterBlock", e);
|
|
6209
6236
|
}
|
|
6210
6237
|
function oe(e) {
|
|
6211
6238
|
S.value.has(e) ? S.value.delete(e) : S.value.add(e);
|
|
@@ -6249,10 +6276,10 @@ var Qs = {
|
|
|
6249
6276
|
await u.toggleResolve(e);
|
|
6250
6277
|
}
|
|
6251
6278
|
function _e(e) {
|
|
6252
|
-
return e.author_identifier ===
|
|
6279
|
+
return e.author_identifier === T.value;
|
|
6253
6280
|
}
|
|
6254
6281
|
function ve(e) {
|
|
6255
|
-
return
|
|
6282
|
+
return nc(e, o.snapshotHistory) ?? e;
|
|
6256
6283
|
}
|
|
6257
6284
|
function ye(e) {
|
|
6258
6285
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6265,13 +6292,13 @@ var Qs = {
|
|
|
6265
6292
|
}
|
|
6266
6293
|
function Se() {
|
|
6267
6294
|
m(() => {
|
|
6268
|
-
|
|
6295
|
+
ee.value?.focus();
|
|
6269
6296
|
});
|
|
6270
6297
|
}
|
|
6271
6298
|
return t({
|
|
6272
|
-
filterByBlock:
|
|
6299
|
+
filterByBlock: P,
|
|
6273
6300
|
focusNewComment: Se
|
|
6274
|
-
}), (t, n) => (f(),
|
|
6301
|
+
}), (t, n) => (f(), N(ie, {
|
|
6275
6302
|
"enter-active-class": "tpl-comments-slide-enter-active",
|
|
6276
6303
|
"enter-from-class": "tpl:translate-x-full",
|
|
6277
6304
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6279,267 +6306,267 @@ var Qs = {
|
|
|
6279
6306
|
"leave-from-class": "tpl:translate-x-0",
|
|
6280
6307
|
"leave-to-class": "tpl:translate-x-full"
|
|
6281
6308
|
}, {
|
|
6282
|
-
default: b(() => [e.visible ? (f(),
|
|
6283
|
-
I("div",
|
|
6284
|
-
V(
|
|
6309
|
+
default: b(() => [e.visible ? (f(), k("div", rc, [
|
|
6310
|
+
I("div", ic, [I("div", ac, [
|
|
6311
|
+
V(j(ui), {
|
|
6285
6312
|
size: 13,
|
|
6286
6313
|
"stroke-width": 2
|
|
6287
6314
|
}),
|
|
6288
|
-
I("span", null,
|
|
6289
|
-
|
|
6315
|
+
I("span", null, D(j(o).comments.title), 1),
|
|
6316
|
+
j(u).unresolvedCount.value > 0 ? (f(), k("span", oc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
|
|
6290
6317
|
]), I("button", {
|
|
6291
6318
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6292
6319
|
onClick: n[0] ||= (e) => i("close")
|
|
6293
|
-
}, [V(
|
|
6320
|
+
}, [V(j(Oi), {
|
|
6294
6321
|
size: 14,
|
|
6295
6322
|
"stroke-width": 2
|
|
6296
6323
|
})])]),
|
|
6297
|
-
I("div",
|
|
6324
|
+
I("div", sc, [
|
|
6298
6325
|
I("button", {
|
|
6299
|
-
class:
|
|
6300
|
-
onClick: n[1] ||= (e) =>
|
|
6301
|
-
},
|
|
6326
|
+
class: F(["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" : ""]),
|
|
6327
|
+
onClick: n[1] ||= (e) => M("unresolved")
|
|
6328
|
+
}, D(j(o).comments.filterUnresolved), 3),
|
|
6302
6329
|
I("button", {
|
|
6303
|
-
class:
|
|
6304
|
-
onClick: n[2] ||= (e) =>
|
|
6305
|
-
},
|
|
6306
|
-
|
|
6330
|
+
class: F(["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" : ""]),
|
|
6331
|
+
onClick: n[2] ||= (e) => M("all")
|
|
6332
|
+
}, D(j(o).comments.filterAll), 3),
|
|
6333
|
+
j(s).state.selectedBlockId ? (f(), k("button", {
|
|
6307
6334
|
key: 0,
|
|
6308
|
-
class:
|
|
6309
|
-
onClick: n[3] ||= (e) =>
|
|
6310
|
-
},
|
|
6335
|
+
class: F(["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" : ""]),
|
|
6336
|
+
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
6337
|
+
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
6311
6338
|
]),
|
|
6312
|
-
I("div",
|
|
6339
|
+
I("div", cc, [j(u).isLoading.value ? (f(), k("div", lc, [V(j(li), {
|
|
6313
6340
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6314
6341
|
size: 24,
|
|
6315
6342
|
"stroke-width": 2
|
|
6316
|
-
})])) :
|
|
6343
|
+
})])) : re.value.length === 0 ? (f(), k("div", uc, [V(j(ui), {
|
|
6317
6344
|
size: 32,
|
|
6318
6345
|
"stroke-width": 1.5,
|
|
6319
6346
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6320
|
-
}), I("p",
|
|
6347
|
+
}), I("p", dc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", fc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
|
|
6321
6348
|
key: e.id,
|
|
6322
6349
|
class: "tpl-comment-thread"
|
|
6323
6350
|
}, [
|
|
6324
|
-
I("div",
|
|
6325
|
-
I("div",
|
|
6326
|
-
I("span",
|
|
6327
|
-
I("span",
|
|
6328
|
-
e.updated_at === e.created_at ?
|
|
6329
|
-
]), I("div",
|
|
6351
|
+
I("div", pc, [
|
|
6352
|
+
I("div", mc, [I("div", hc, [
|
|
6353
|
+
I("span", gc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
|
|
6354
|
+
I("span", _c, D(ve(e.created_at)), 1),
|
|
6355
|
+
e.updated_at === e.created_at ? A("", !0) : (f(), k("span", vc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6356
|
+
]), I("div", yc, [
|
|
6330
6357
|
I("button", {
|
|
6331
6358
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6332
|
-
title: e.resolved_at ?
|
|
6359
|
+
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
6333
6360
|
onClick: (t) => ge(e.id)
|
|
6334
|
-
}, [V(
|
|
6361
|
+
}, [V(j(Xr), {
|
|
6335
6362
|
size: 13,
|
|
6336
6363
|
"stroke-width": 2,
|
|
6337
6364
|
class: "tpl-resolve-icon",
|
|
6338
6365
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6339
|
-
}, null, 8, ["style"])], 8,
|
|
6340
|
-
_e(e) ? (f(),
|
|
6366
|
+
}, null, 8, ["style"])], 8, bc),
|
|
6367
|
+
_e(e) ? (f(), k("button", {
|
|
6341
6368
|
key: 0,
|
|
6342
6369
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6343
|
-
title:
|
|
6370
|
+
title: j(o).comments.edit,
|
|
6344
6371
|
onClick: (t) => le(e)
|
|
6345
|
-
}, [V(
|
|
6372
|
+
}, [V(j(fi), {
|
|
6346
6373
|
size: 12,
|
|
6347
6374
|
"stroke-width": 2
|
|
6348
|
-
})], 8,
|
|
6349
|
-
_e(e) ? (f(),
|
|
6375
|
+
})], 8, xc)) : A("", !0),
|
|
6376
|
+
_e(e) ? (f(), k("button", {
|
|
6350
6377
|
key: 1,
|
|
6351
6378
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6352
|
-
title:
|
|
6379
|
+
title: j(o).comments.delete,
|
|
6353
6380
|
onClick: (t) => ue(e.id)
|
|
6354
|
-
}, [V(
|
|
6381
|
+
}, [V(j(Ci), {
|
|
6355
6382
|
size: 12,
|
|
6356
6383
|
"stroke-width": 2
|
|
6357
|
-
})], 8,
|
|
6384
|
+
})], 8, Sc)) : A("", !0)
|
|
6358
6385
|
])]),
|
|
6359
|
-
V(
|
|
6360
|
-
default: b(() => [e.resolved_at ? (f(),
|
|
6386
|
+
V(ie, { name: "tpl-resolve" }, {
|
|
6387
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Cc, [V(j(Wr), {
|
|
6361
6388
|
size: 10,
|
|
6362
6389
|
"stroke-width": 2.5
|
|
6363
|
-
}), I("span", null,
|
|
6390
|
+
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
6364
6391
|
_: 2
|
|
6365
6392
|
}, 1024),
|
|
6366
|
-
e.block_id &&
|
|
6393
|
+
e.block_id && te(e.block_id) ? (f(), k("span", wc, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
|
|
6367
6394
|
key: 1,
|
|
6368
6395
|
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)]",
|
|
6369
|
-
onClick: (t) =>
|
|
6370
|
-
}, " Block ", 8,
|
|
6371
|
-
y.value === e.id ? (f(),
|
|
6396
|
+
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6397
|
+
}, " Block ", 8, Tc)) : A("", !0),
|
|
6398
|
+
y.value === e.id ? (f(), k("div", Ec, [c(I("textarea", {
|
|
6372
6399
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6373
6400
|
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)]",
|
|
6374
6401
|
rows: "3",
|
|
6375
6402
|
onKeydown: (t) => xe(t, e.id)
|
|
6376
|
-
}, null, 40,
|
|
6403
|
+
}, null, 40, Dc), [[ae, x.value]]), I("div", Oc, [I("button", {
|
|
6377
6404
|
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)]",
|
|
6378
|
-
disabled: !x.value.trim() ||
|
|
6405
|
+
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6379
6406
|
onClick: (t) => me(e.id)
|
|
6380
|
-
},
|
|
6407
|
+
}, D(j(o).comments.save), 9, kc), I("button", {
|
|
6381
6408
|
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)]",
|
|
6382
6409
|
onClick: n[5] ||= (e) => B()
|
|
6383
|
-
},
|
|
6384
|
-
w.value === e.id ? (f(),
|
|
6385
|
-
I("span",
|
|
6410
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Ac, D(e.body), 1)),
|
|
6411
|
+
w.value === e.id ? (f(), k("div", jc, [
|
|
6412
|
+
I("span", Mc, D(j(o).comments.deleteConfirm), 1),
|
|
6386
6413
|
I("button", {
|
|
6387
6414
|
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)]",
|
|
6388
6415
|
onClick: (t) => he(e.id)
|
|
6389
|
-
},
|
|
6416
|
+
}, D(j(o).comments.delete), 9, Nc),
|
|
6390
6417
|
I("button", {
|
|
6391
6418
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6392
6419
|
onClick: n[6] ||= (e) => de()
|
|
6393
|
-
},
|
|
6394
|
-
])) :
|
|
6395
|
-
y.value !== e.id && w.value !== e.id ? (f(),
|
|
6420
|
+
}, D(j(o).comments.cancel), 1)
|
|
6421
|
+
])) : A("", !0),
|
|
6422
|
+
y.value !== e.id && w.value !== e.id ? (f(), k("div", Pc, [I("button", {
|
|
6396
6423
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6397
|
-
title:
|
|
6424
|
+
title: j(o).comments.reply,
|
|
6398
6425
|
onClick: (t) => se(e.id)
|
|
6399
|
-
}, [V(
|
|
6426
|
+
}, [V(j(gi), {
|
|
6400
6427
|
size: 13,
|
|
6401
6428
|
"stroke-width": 2,
|
|
6402
6429
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6403
|
-
})], 8,
|
|
6430
|
+
})], 8, Fc), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6404
6431
|
key: 0,
|
|
6405
6432
|
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)]",
|
|
6406
6433
|
onClick: (t) => oe(e.id)
|
|
6407
|
-
}, [S.value.has(e.id) ? (f(),
|
|
6434
|
+
}, [S.value.has(e.id) ? (f(), N(j(Jr), {
|
|
6408
6435
|
key: 0,
|
|
6409
6436
|
size: 11,
|
|
6410
6437
|
"stroke-width": 2
|
|
6411
|
-
})) : (f(),
|
|
6438
|
+
})) : (f(), N(j(Gr), {
|
|
6412
6439
|
key: 1,
|
|
6413
6440
|
size: 11,
|
|
6414
6441
|
"stroke-width": 2
|
|
6415
|
-
})), z(" " +
|
|
6442
|
+
})), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Ic)) : A("", !0)])) : A("", !0)
|
|
6416
6443
|
]),
|
|
6417
|
-
V(
|
|
6418
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(),
|
|
6444
|
+
V(ie, { name: "tpl-replies" }, {
|
|
6445
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", Lc, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
|
|
6419
6446
|
key: t.id,
|
|
6420
|
-
class:
|
|
6447
|
+
class: F(["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" : ""])
|
|
6421
6448
|
}, [
|
|
6422
|
-
I("div",
|
|
6423
|
-
I("span",
|
|
6424
|
-
I("span",
|
|
6425
|
-
t.updated_at === t.created_at ?
|
|
6426
|
-
]), I("div",
|
|
6449
|
+
I("div", Rc, [I("div", zc, [
|
|
6450
|
+
I("span", Bc, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
|
|
6451
|
+
I("span", Vc, D(ve(t.created_at)), 1),
|
|
6452
|
+
t.updated_at === t.created_at ? A("", !0) : (f(), k("span", Hc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6453
|
+
]), I("div", Uc, [_e(t) ? (f(), k("button", {
|
|
6427
6454
|
key: 0,
|
|
6428
6455
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6429
|
-
title:
|
|
6456
|
+
title: j(o).comments.edit,
|
|
6430
6457
|
onClick: (e) => le(t)
|
|
6431
|
-
}, [V(
|
|
6458
|
+
}, [V(j(fi), {
|
|
6432
6459
|
size: 11,
|
|
6433
6460
|
"stroke-width": 2
|
|
6434
|
-
})], 8,
|
|
6461
|
+
})], 8, Wc)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6435
6462
|
key: 1,
|
|
6436
6463
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6437
|
-
title:
|
|
6464
|
+
title: j(o).comments.delete,
|
|
6438
6465
|
onClick: (e) => ue(t.id)
|
|
6439
|
-
}, [V(
|
|
6466
|
+
}, [V(j(Ci), {
|
|
6440
6467
|
size: 11,
|
|
6441
6468
|
"stroke-width": 2
|
|
6442
|
-
})], 8,
|
|
6443
|
-
y.value === t.id ? (f(),
|
|
6469
|
+
})], 8, Gc)) : A("", !0)])]),
|
|
6470
|
+
y.value === t.id ? (f(), k("div", Kc, [c(I("textarea", {
|
|
6444
6471
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6445
6472
|
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)]",
|
|
6446
6473
|
rows: "2",
|
|
6447
6474
|
onKeydown: (e) => xe(e, t.id)
|
|
6448
|
-
}, null, 40,
|
|
6475
|
+
}, null, 40, qc), [[ae, x.value]]), I("div", Jc, [I("button", {
|
|
6449
6476
|
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)]",
|
|
6450
|
-
disabled: !x.value.trim() ||
|
|
6477
|
+
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6451
6478
|
onClick: (e) => me(t.id)
|
|
6452
|
-
},
|
|
6479
|
+
}, D(j(o).comments.save), 9, Yc), I("button", {
|
|
6453
6480
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6454
6481
|
onClick: n[8] ||= (e) => B()
|
|
6455
|
-
},
|
|
6456
|
-
w.value === t.id ? (f(),
|
|
6457
|
-
I("span",
|
|
6482
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Xc, D(t.body), 1)),
|
|
6483
|
+
w.value === t.id ? (f(), k("div", Zc, [
|
|
6484
|
+
I("span", Qc, D(j(o).comments.deleteConfirm), 1),
|
|
6458
6485
|
I("button", {
|
|
6459
6486
|
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)]",
|
|
6460
6487
|
onClick: (e) => he(t.id)
|
|
6461
|
-
},
|
|
6488
|
+
}, D(j(o).comments.delete), 9, $c),
|
|
6462
6489
|
I("button", {
|
|
6463
6490
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6464
6491
|
onClick: n[9] ||= (e) => de()
|
|
6465
|
-
},
|
|
6466
|
-
])) :
|
|
6467
|
-
], 2))), 128))])) :
|
|
6492
|
+
}, D(j(o).comments.cancel), 1)
|
|
6493
|
+
])) : A("", !0)
|
|
6494
|
+
], 2))), 128))])) : A("", !0)]),
|
|
6468
6495
|
_: 2
|
|
6469
6496
|
}, 1024),
|
|
6470
|
-
V(
|
|
6471
|
-
default: b(() => [_.value === e.id ? (f(),
|
|
6497
|
+
V(ie, { name: "tpl-replies" }, {
|
|
6498
|
+
default: b(() => [_.value === e.id ? (f(), k("div", el, [I("div", tl, [c(I("textarea", {
|
|
6472
6499
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6473
6500
|
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)]",
|
|
6474
|
-
placeholder:
|
|
6501
|
+
placeholder: j(o).comments.replyPlaceholder,
|
|
6475
6502
|
rows: "2",
|
|
6476
6503
|
onKeydown: (t) => be(t, e.id)
|
|
6477
|
-
}, null, 40,
|
|
6504
|
+
}, null, 40, nl), [[ae, v.value]]), I("div", rl, [I("button", {
|
|
6478
6505
|
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)]",
|
|
6479
|
-
disabled: !v.value.trim() ||
|
|
6506
|
+
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6480
6507
|
onClick: (t) => pe(e.id)
|
|
6481
|
-
}, [V(
|
|
6508
|
+
}, [V(j(_i), {
|
|
6482
6509
|
size: 14,
|
|
6483
6510
|
"stroke-width": 2
|
|
6484
|
-
})], 8,
|
|
6511
|
+
})], 8, il), I("button", {
|
|
6485
6512
|
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)]",
|
|
6486
6513
|
onClick: n[11] ||= (e) => ce()
|
|
6487
|
-
}, [V(
|
|
6514
|
+
}, [V(j(Oi), {
|
|
6488
6515
|
size: 14,
|
|
6489
6516
|
"stroke-width": 2
|
|
6490
|
-
})])])])])) :
|
|
6517
|
+
})])])])])) : A("", !0)]),
|
|
6491
6518
|
_: 2
|
|
6492
6519
|
}, 1024)
|
|
6493
6520
|
]))), 128))]))]),
|
|
6494
|
-
I("div",
|
|
6521
|
+
I("div", al, [ne.value ? (f(), k("div", ol, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", sl, [c(I("textarea", {
|
|
6495
6522
|
ref_key: "newCommentInput",
|
|
6496
|
-
ref:
|
|
6523
|
+
ref: ee,
|
|
6497
6524
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
6498
6525
|
class: "tpl:max-h-24 tpl:min-h-[48px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-xs tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
6499
|
-
placeholder:
|
|
6500
|
-
disabled:
|
|
6526
|
+
placeholder: j(o).comments.placeholder,
|
|
6527
|
+
disabled: j(u).isSubmitting.value,
|
|
6501
6528
|
rows: "2",
|
|
6502
6529
|
onKeydown: ye
|
|
6503
|
-
}, null, 40,
|
|
6530
|
+
}, null, 40, cl), [[ae, g.value]]), I("button", {
|
|
6504
6531
|
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)]",
|
|
6505
|
-
disabled: !g.value.trim() ||
|
|
6532
|
+
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6506
6533
|
onClick: fe
|
|
6507
|
-
}, [
|
|
6534
|
+
}, [j(u).isSubmitting.value ? (f(), N(j(li), {
|
|
6508
6535
|
key: 0,
|
|
6509
6536
|
class: "tpl-spinner",
|
|
6510
6537
|
size: 16,
|
|
6511
6538
|
"stroke-width": 2
|
|
6512
|
-
})) : (f(),
|
|
6539
|
+
})) : (f(), N(j(_i), {
|
|
6513
6540
|
key: 1,
|
|
6514
6541
|
size: 16,
|
|
6515
6542
|
"stroke-width": 2
|
|
6516
|
-
}))], 8,
|
|
6517
|
-
])) :
|
|
6543
|
+
}))], 8, ll)]))])
|
|
6544
|
+
])) : A("", !0)]),
|
|
6518
6545
|
_: 1
|
|
6519
6546
|
}));
|
|
6520
6547
|
}
|
|
6521
|
-
}),
|
|
6548
|
+
}), dl = /* @__PURE__ */ e({ default: () => fl }), fl = /* @__PURE__ */ Ni(ul, [["__scopeId", "data-v-d204f573"]]), pl = {
|
|
6522
6549
|
key: 0,
|
|
6523
6550
|
class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6524
|
-
},
|
|
6551
|
+
}, ml = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, hl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, gl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, _l = {
|
|
6525
6552
|
key: 0,
|
|
6526
6553
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6527
|
-
},
|
|
6554
|
+
}, vl = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, yl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, bl = {
|
|
6528
6555
|
key: 1,
|
|
6529
6556
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6530
|
-
},
|
|
6557
|
+
}, xl = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Sl = {
|
|
6531
6558
|
key: 0,
|
|
6532
6559
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6533
|
-
},
|
|
6560
|
+
}, Cl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, wl = ["src", "alt"], Tl = {
|
|
6534
6561
|
key: 1,
|
|
6535
6562
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6536
|
-
},
|
|
6563
|
+
}, El = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Dl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Ol = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, kl = ["accept"], Al = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, jl = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ml = ["placeholder"], Nl = {
|
|
6537
6564
|
key: 0,
|
|
6538
6565
|
class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
|
|
6539
|
-
},
|
|
6566
|
+
}, Pl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Fl = { class: "tpl:flex tpl:gap-2" }, Il = {
|
|
6540
6567
|
key: 1,
|
|
6541
6568
|
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)]"
|
|
6542
|
-
},
|
|
6569
|
+
}, Ll = ["disabled"], Rl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, zl = /* @__PURE__ */ B({
|
|
6543
6570
|
__name: "DesignReferenceSidebar",
|
|
6544
6571
|
props: {
|
|
6545
6572
|
visible: { type: Boolean },
|
|
@@ -6547,11 +6574,11 @@ var Qs = {
|
|
|
6547
6574
|
},
|
|
6548
6575
|
emits: ["close", "apply"],
|
|
6549
6576
|
setup(e, { emit: t }) {
|
|
6550
|
-
let n = e, r = t, { t: i } =
|
|
6551
|
-
authManager: J(
|
|
6577
|
+
let n = e, r = t, { t: i } = Ui(), a = J(Fn, "DesignReferenceSidebar"), o = os({
|
|
6578
|
+
authManager: J(ar, "DesignReferenceSidebar"),
|
|
6552
6579
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6553
6580
|
onApply: (e) => r("apply", e)
|
|
6554
|
-
}), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g =
|
|
6581
|
+
}), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = O(() => o.isGenerating.value ? !1 : u.value !== null);
|
|
6555
6582
|
function _(e) {
|
|
6556
6583
|
l.value = e, x();
|
|
6557
6584
|
}
|
|
@@ -6589,12 +6616,12 @@ var Qs = {
|
|
|
6589
6616
|
function w() {
|
|
6590
6617
|
h.value = !1;
|
|
6591
6618
|
}
|
|
6592
|
-
function
|
|
6619
|
+
function ee(e) {
|
|
6593
6620
|
e.preventDefault(), h.value = !1;
|
|
6594
6621
|
let t = e.dataTransfer?.files?.[0];
|
|
6595
6622
|
t && y(t);
|
|
6596
6623
|
}
|
|
6597
|
-
function
|
|
6624
|
+
function T() {
|
|
6598
6625
|
if (!g.value) return;
|
|
6599
6626
|
if (n.hasExistingBlocks && !m.value) {
|
|
6600
6627
|
m.value = !0;
|
|
@@ -6604,14 +6631,14 @@ var Qs = {
|
|
|
6604
6631
|
let e = {};
|
|
6605
6632
|
d.value.trim() && (e.prompt = d.value.trim()), l.value === "image" && u.value ? e.imageUpload = u.value : l.value === "pdf" && u.value && (e.pdfUpload = u.value), o.generate(e);
|
|
6606
6633
|
}
|
|
6607
|
-
function
|
|
6634
|
+
function E() {
|
|
6608
6635
|
m.value = !1;
|
|
6609
6636
|
}
|
|
6610
6637
|
return H(() => n.visible, (e) => {
|
|
6611
6638
|
e || (m.value = !1);
|
|
6612
|
-
}),
|
|
6639
|
+
}), re(() => {
|
|
6613
6640
|
p.value &&= (URL.revokeObjectURL(p.value), null);
|
|
6614
|
-
}), (t, n) => (f(),
|
|
6641
|
+
}), (t, n) => (f(), N(ie, {
|
|
6615
6642
|
"enter-active-class": "tpl-design-slide-enter-active",
|
|
6616
6643
|
"enter-from-class": "tpl:translate-x-full",
|
|
6617
6644
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6619,17 +6646,17 @@ var Qs = {
|
|
|
6619
6646
|
"leave-from-class": "tpl:translate-x-0",
|
|
6620
6647
|
"leave-to-class": "tpl:translate-x-full"
|
|
6621
6648
|
}, {
|
|
6622
|
-
default: b(() => [e.visible ? (f(),
|
|
6649
|
+
default: b(() => [e.visible ? (f(), k("div", pl, [I("div", ml, [I("div", hl, [V(j(oi), {
|
|
6623
6650
|
size: 13,
|
|
6624
6651
|
"stroke-width": 2
|
|
6625
|
-
}), I("span", null,
|
|
6652
|
+
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
6626
6653
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6627
6654
|
onClick: n[0] ||= (e) => r("close")
|
|
6628
|
-
}, [V(
|
|
6655
|
+
}, [V(j(Oi), {
|
|
6629
6656
|
size: 14,
|
|
6630
6657
|
"stroke-width": 2
|
|
6631
|
-
})])]), I("div",
|
|
6632
|
-
I("div",
|
|
6658
|
+
})])]), I("div", gl, [j(o).isGenerating.value ? (f(), k("div", _l, [I("div", vl, [V(Li), I("p", yl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", bl, [
|
|
6659
|
+
I("div", xl, [I("button", {
|
|
6633
6660
|
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",
|
|
6634
6661
|
style: L({
|
|
6635
6662
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6637,10 +6664,10 @@ var Qs = {
|
|
|
6637
6664
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6638
6665
|
}),
|
|
6639
6666
|
onClick: n[1] ||= (e) => _("image")
|
|
6640
|
-
}, [V(
|
|
6667
|
+
}, [V(j(ni), {
|
|
6641
6668
|
size: 12,
|
|
6642
6669
|
"stroke-width": 2
|
|
6643
|
-
}), z(" " +
|
|
6670
|
+
}), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
|
|
6644
6671
|
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",
|
|
6645
6672
|
style: L({
|
|
6646
6673
|
backgroundColor: l.value === "pdf" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6648,26 +6675,26 @@ var Qs = {
|
|
|
6648
6675
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6649
6676
|
}),
|
|
6650
6677
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6651
|
-
}, [V(
|
|
6678
|
+
}, [V(j(ri), {
|
|
6652
6679
|
size: 12,
|
|
6653
6680
|
"stroke-width": 2
|
|
6654
|
-
}), z(" " +
|
|
6655
|
-
I("div", null, [u.value ? (f(),
|
|
6681
|
+
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6682
|
+
I("div", null, [u.value ? (f(), k("div", Sl, [I("div", Cl, [p.value ? (f(), k("img", {
|
|
6656
6683
|
key: 0,
|
|
6657
6684
|
src: p.value,
|
|
6658
6685
|
alt: u.value.name,
|
|
6659
6686
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6660
|
-
}, null, 8,
|
|
6687
|
+
}, null, 8, wl)) : (f(), k("div", Tl, [V(j(ri), {
|
|
6661
6688
|
size: 32,
|
|
6662
6689
|
"stroke-width": 1.5,
|
|
6663
6690
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6664
|
-
}), I("span",
|
|
6691
|
+
}), I("span", El, D(u.value.name), 1)])), I("button", {
|
|
6665
6692
|
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)]",
|
|
6666
6693
|
onClick: x
|
|
6667
|
-
}, [V(
|
|
6694
|
+
}, [V(j(Oi), {
|
|
6668
6695
|
size: 12,
|
|
6669
6696
|
"stroke-width": 2
|
|
6670
|
-
})])])])) : (f(),
|
|
6697
|
+
})])])])) : (f(), k("div", {
|
|
6671
6698
|
key: 1,
|
|
6672
6699
|
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",
|
|
6673
6700
|
style: L({
|
|
@@ -6677,15 +6704,15 @@ var Qs = {
|
|
|
6677
6704
|
onClick: n[3] ||= (e) => s.value?.click(),
|
|
6678
6705
|
onDragover: S,
|
|
6679
6706
|
onDragleave: w,
|
|
6680
|
-
onDrop:
|
|
6707
|
+
onDrop: ee
|
|
6681
6708
|
}, [
|
|
6682
|
-
V(
|
|
6709
|
+
V(j(Ei), {
|
|
6683
6710
|
size: 24,
|
|
6684
6711
|
"stroke-width": 1.5,
|
|
6685
6712
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6686
6713
|
}),
|
|
6687
|
-
I("span",
|
|
6688
|
-
I("span",
|
|
6714
|
+
I("span", Dl, D(j(i).designReference.dropHint), 1),
|
|
6715
|
+
I("span", Ol, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
|
|
6689
6716
|
], 36)), I("input", {
|
|
6690
6717
|
ref_key: "fileInput",
|
|
6691
6718
|
ref: s,
|
|
@@ -6693,60 +6720,60 @@ var Qs = {
|
|
|
6693
6720
|
class: "tpl:hidden",
|
|
6694
6721
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6695
6722
|
onChange: v
|
|
6696
|
-
}, null, 40,
|
|
6697
|
-
I("div",
|
|
6723
|
+
}, null, 40, kl)]),
|
|
6724
|
+
I("div", Al, [I("label", jl, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6698
6725
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6699
|
-
class:
|
|
6700
|
-
placeholder:
|
|
6726
|
+
class: F(["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"]]),
|
|
6727
|
+
placeholder: j(i).designReference.promptPlaceholder,
|
|
6701
6728
|
rows: "3"
|
|
6702
|
-
}, null, 8,
|
|
6703
|
-
m.value ? (f(),
|
|
6729
|
+
}, null, 8, Ml), [[ae, d.value]])]),
|
|
6730
|
+
m.value ? (f(), k("div", Nl, [I("p", Pl, D(j(i).designReference.replaceWarning), 1), I("div", Fl, [I("button", {
|
|
6704
6731
|
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)]",
|
|
6705
6732
|
style: { "background-color": "transparent" },
|
|
6706
|
-
onClick: D
|
|
6707
|
-
}, O(M(i).designReference.replaceCancel), 1), I("button", {
|
|
6708
|
-
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)]",
|
|
6709
6733
|
onClick: E
|
|
6710
|
-
},
|
|
6711
|
-
|
|
6734
|
+
}, D(j(i).designReference.replaceCancel), 1), I("button", {
|
|
6735
|
+
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)]",
|
|
6736
|
+
onClick: T
|
|
6737
|
+
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6738
|
+
j(o).error.value ? (f(), k("div", Il, [V(j(Yr), {
|
|
6712
6739
|
size: 14,
|
|
6713
6740
|
"stroke-width": 2,
|
|
6714
6741
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6715
|
-
}), I("span", null,
|
|
6716
|
-
m.value ?
|
|
6742
|
+
}), I("span", null, D(j(i).designReference.error), 1)])) : A("", !0),
|
|
6743
|
+
m.value ? A("", !0) : (f(), k("button", {
|
|
6717
6744
|
key: 2,
|
|
6718
6745
|
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)]",
|
|
6719
6746
|
disabled: !g.value,
|
|
6720
|
-
onClick:
|
|
6721
|
-
}, [V(
|
|
6747
|
+
onClick: T
|
|
6748
|
+
}, [V(j(oi), {
|
|
6722
6749
|
size: 16,
|
|
6723
6750
|
"stroke-width": 2
|
|
6724
|
-
}), z(" " +
|
|
6725
|
-
I("p",
|
|
6726
|
-
]))])])) :
|
|
6751
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, Ll)),
|
|
6752
|
+
I("p", Rl, D(j(i).aiMenu.disclaimer), 1)
|
|
6753
|
+
]))])])) : A("", !0)]),
|
|
6727
6754
|
_: 1
|
|
6728
6755
|
}));
|
|
6729
6756
|
}
|
|
6730
|
-
}),
|
|
6757
|
+
}), Bl = /* @__PURE__ */ e({ default: () => Vl }), Vl = /* @__PURE__ */ Ni(zl, [["__scopeId", "data-v-bdbf8d0d"]]), Hl = ["disabled", "title"], Ul = ["title"], Wl = {
|
|
6731
6758
|
key: 0,
|
|
6732
6759
|
class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
6733
6760
|
style: {
|
|
6734
6761
|
"backdrop-filter": "blur(8px)",
|
|
6735
6762
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6736
6763
|
}
|
|
6737
|
-
},
|
|
6764
|
+
}, Gl = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, Kl = {
|
|
6738
6765
|
key: 0,
|
|
6739
6766
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6740
|
-
},
|
|
6767
|
+
}, ql = {
|
|
6741
6768
|
key: 1,
|
|
6742
6769
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6743
|
-
},
|
|
6770
|
+
}, Jl = {
|
|
6744
6771
|
key: 2,
|
|
6745
6772
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6746
|
-
},
|
|
6773
|
+
}, Yl = ["disabled", "onClick"], Xl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Zl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ql = {
|
|
6747
6774
|
key: 0,
|
|
6748
6775
|
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)]"
|
|
6749
|
-
},
|
|
6776
|
+
}, $l = ["disabled", "title"], eu = /* @__PURE__ */ B({
|
|
6750
6777
|
__name: "SnapshotHistory",
|
|
6751
6778
|
props: {
|
|
6752
6779
|
snapshots: {},
|
|
@@ -6755,11 +6782,11 @@ var Qs = {
|
|
|
6755
6782
|
},
|
|
6756
6783
|
emits: ["load", "navigate"],
|
|
6757
6784
|
setup(e, { emit: t }) {
|
|
6758
|
-
let n = e, r = t, { format: i } = Y(), { t: a } =
|
|
6785
|
+
let n = e, r = t, { format: i } = Y(), { t: a } = Ui(), o = C(!1), s = C(null), c = C(-1);
|
|
6759
6786
|
H(() => n.snapshots.length, () => {
|
|
6760
6787
|
c.value = -1;
|
|
6761
6788
|
});
|
|
6762
|
-
let l =
|
|
6789
|
+
let l = O(() => c.value > 0 && n.snapshots.length > 0 && !n.isRestoring), u = O(() => c.value < n.snapshots.length - 1 && n.snapshots.length > 0 && !n.isRestoring);
|
|
6763
6790
|
function d() {
|
|
6764
6791
|
l.value && (c.value--, r("navigate", n.snapshots[c.value]));
|
|
6765
6792
|
}
|
|
@@ -6774,7 +6801,7 @@ var Qs = {
|
|
|
6774
6801
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
6775
6802
|
}
|
|
6776
6803
|
function _(e) {
|
|
6777
|
-
let t =
|
|
6804
|
+
let t = nc(e, a.snapshotHistory, i, 7);
|
|
6778
6805
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
6779
6806
|
month: "short",
|
|
6780
6807
|
day: "numeric",
|
|
@@ -6784,7 +6811,7 @@ var Qs = {
|
|
|
6784
6811
|
}
|
|
6785
6812
|
return mn(s, () => {
|
|
6786
6813
|
o.value = !1;
|
|
6787
|
-
}), (t, n) => (f(),
|
|
6814
|
+
}), (t, n) => (f(), k("div", {
|
|
6788
6815
|
ref_key: "dropdownRef",
|
|
6789
6816
|
ref: s,
|
|
6790
6817
|
class: "tpl:relative tpl:flex tpl:items-center tpl:gap-0.5"
|
|
@@ -6792,111 +6819,111 @@ var Qs = {
|
|
|
6792
6819
|
I("button", {
|
|
6793
6820
|
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)]",
|
|
6794
6821
|
disabled: !u.value,
|
|
6795
|
-
title:
|
|
6796
|
-
onClick:
|
|
6797
|
-
}, [V(
|
|
6822
|
+
title: j(a).snapshotHistory.olderSnapshot,
|
|
6823
|
+
onClick: M(p, ["stop"])
|
|
6824
|
+
}, [V(j(Kr), {
|
|
6798
6825
|
size: 14,
|
|
6799
6826
|
"stroke-width": 2
|
|
6800
|
-
})], 8,
|
|
6827
|
+
})], 8, Hl),
|
|
6801
6828
|
I("button", {
|
|
6802
6829
|
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)]",
|
|
6803
|
-
title:
|
|
6804
|
-
onClick:
|
|
6805
|
-
}, [V(
|
|
6830
|
+
title: j(a).snapshotHistory.tooltip,
|
|
6831
|
+
onClick: M(m, ["stop"])
|
|
6832
|
+
}, [V(j(Zr), {
|
|
6806
6833
|
size: 16,
|
|
6807
6834
|
"stroke-width": 1.5
|
|
6808
|
-
}), V(
|
|
6809
|
-
class:
|
|
6835
|
+
}), V(j(Gr), {
|
|
6836
|
+
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6810
6837
|
size: 10,
|
|
6811
6838
|
"stroke-width": 2
|
|
6812
|
-
}, null, 8, ["class"])], 8,
|
|
6813
|
-
V(
|
|
6814
|
-
default: b(() => [o.value ? (f(),
|
|
6839
|
+
}, null, 8, ["class"])], 8, Ul),
|
|
6840
|
+
V(ie, { name: "tpl-dropdown" }, {
|
|
6841
|
+
default: b(() => [o.value ? (f(), k("div", Wl, [I("div", Gl, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", Kl, [V(j(li), {
|
|
6815
6842
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6816
6843
|
size: 20,
|
|
6817
6844
|
"stroke-width": 2
|
|
6818
|
-
})])) : e.snapshots.length === 0 ? (f(),
|
|
6845
|
+
})])) : e.snapshots.length === 0 ? (f(), k("div", ql, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", Jl, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
|
|
6819
6846
|
key: t.id,
|
|
6820
6847
|
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)]",
|
|
6821
6848
|
style: { "background-color": "transparent" },
|
|
6822
6849
|
disabled: e.isRestoring,
|
|
6823
6850
|
onClick: (e) => g(t.id)
|
|
6824
|
-
}, [I("div",
|
|
6851
|
+
}, [I("div", Xl, [I("div", Zl, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", Ql, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, Yl))), 128))]))])) : A("", !0)]),
|
|
6825
6852
|
_: 1
|
|
6826
6853
|
}),
|
|
6827
6854
|
I("button", {
|
|
6828
6855
|
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)]",
|
|
6829
6856
|
disabled: !l.value,
|
|
6830
|
-
title:
|
|
6831
|
-
onClick:
|
|
6832
|
-
}, [V(
|
|
6857
|
+
title: j(a).snapshotHistory.newerSnapshot,
|
|
6858
|
+
onClick: M(d, ["stop"])
|
|
6859
|
+
}, [V(j(qr), {
|
|
6833
6860
|
size: 14,
|
|
6834
6861
|
"stroke-width": 2
|
|
6835
|
-
})], 8,
|
|
6862
|
+
})], 8, $l)
|
|
6836
6863
|
], 512));
|
|
6837
6864
|
}
|
|
6838
|
-
}),
|
|
6865
|
+
}), tu = /* @__PURE__ */ e({ default: () => nu }), nu = eu;
|
|
6839
6866
|
//#endregion
|
|
6840
6867
|
//#region src/cloud/utils/scoringStyles.ts
|
|
6841
|
-
function
|
|
6868
|
+
function ru(e) {
|
|
6842
6869
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
6843
6870
|
}
|
|
6844
|
-
function
|
|
6871
|
+
function iu(e) {
|
|
6845
6872
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
6846
6873
|
}
|
|
6847
|
-
function
|
|
6874
|
+
function au(e) {
|
|
6848
6875
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
6849
6876
|
}
|
|
6850
|
-
function
|
|
6877
|
+
function ou(e) {
|
|
6851
6878
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
6852
6879
|
}
|
|
6853
6880
|
//#endregion
|
|
6854
6881
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6855
|
-
var
|
|
6882
|
+
var su = {
|
|
6856
6883
|
key: 0,
|
|
6857
6884
|
class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6858
|
-
},
|
|
6885
|
+
}, cu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, lu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, uu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, du = ["title"], fu = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, pu = {
|
|
6859
6886
|
key: 0,
|
|
6860
6887
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6861
|
-
},
|
|
6888
|
+
}, mu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, hu = {
|
|
6862
6889
|
key: 1,
|
|
6863
6890
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6864
|
-
},
|
|
6891
|
+
}, gu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, _u = {
|
|
6865
6892
|
key: 2,
|
|
6866
6893
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6867
|
-
},
|
|
6894
|
+
}, vu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, yu = {
|
|
6868
6895
|
key: 0,
|
|
6869
6896
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6870
|
-
},
|
|
6897
|
+
}, bu = {
|
|
6871
6898
|
key: 0,
|
|
6872
6899
|
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)]"
|
|
6873
|
-
},
|
|
6900
|
+
}, xu = ["onClick"], Su = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Cu = {
|
|
6874
6901
|
key: 0,
|
|
6875
6902
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
6876
|
-
},
|
|
6903
|
+
}, wu = {
|
|
6877
6904
|
key: 0,
|
|
6878
6905
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
6879
|
-
},
|
|
6906
|
+
}, Tu = {
|
|
6880
6907
|
key: 0,
|
|
6881
6908
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6882
|
-
},
|
|
6909
|
+
}, Eu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, Du = { class: "tpl:flex-1 tpl:min-w-0" }, Ou = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, ku = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Au = {
|
|
6883
6910
|
key: 0,
|
|
6884
6911
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
6885
|
-
},
|
|
6912
|
+
}, ju = {
|
|
6886
6913
|
key: 1,
|
|
6887
6914
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
6888
|
-
},
|
|
6915
|
+
}, Mu = ["disabled", "onClick"], Nu = {
|
|
6889
6916
|
key: 0,
|
|
6890
6917
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
6891
|
-
},
|
|
6918
|
+
}, Pu = {
|
|
6892
6919
|
key: 3,
|
|
6893
6920
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6894
|
-
},
|
|
6921
|
+
}, Fu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Iu = { 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)]" }, Lu = /* @__PURE__ */ B({
|
|
6895
6922
|
__name: "TemplateScoringPanel",
|
|
6896
6923
|
props: { visible: { type: Boolean } },
|
|
6897
6924
|
emits: ["close"],
|
|
6898
6925
|
setup(e, { emit: t }) {
|
|
6899
|
-
let n = e, r = t, { t: i } =
|
|
6926
|
+
let n = e, r = t, { t: i } = Ui(), a = J(Fn, "TemplateScoringPanel"), o = J(lr, "TemplateScoringPanel"), s = v(Kn, []), c = C({
|
|
6900
6927
|
spam: !0,
|
|
6901
6928
|
readability: !0,
|
|
6902
6929
|
accessibility: !0,
|
|
@@ -6911,10 +6938,10 @@ var nu = {
|
|
|
6911
6938
|
"accessibility",
|
|
6912
6939
|
"bestPractices"
|
|
6913
6940
|
], p = {
|
|
6914
|
-
spam:
|
|
6915
|
-
readability:
|
|
6916
|
-
accessibility:
|
|
6917
|
-
bestPractices:
|
|
6941
|
+
spam: bi,
|
|
6942
|
+
readability: ti,
|
|
6943
|
+
accessibility: xi,
|
|
6944
|
+
bestPractices: ki
|
|
6918
6945
|
};
|
|
6919
6946
|
function m() {
|
|
6920
6947
|
o.score(a.content.value, s);
|
|
@@ -6934,7 +6961,7 @@ var nu = {
|
|
|
6934
6961
|
function _() {
|
|
6935
6962
|
return o.scoringResult.value ? u.reduce((e, t) => e + (o.scoringResult.value?.categories[t]?.findings.length ?? 0), 0) : 0;
|
|
6936
6963
|
}
|
|
6937
|
-
return (t, n) => (f(),
|
|
6964
|
+
return (t, n) => (f(), N(ie, {
|
|
6938
6965
|
"enter-active-class": "tpl-scoring-slide-enter-active",
|
|
6939
6966
|
"enter-from-class": "tpl:translate-x-full",
|
|
6940
6967
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -6942,132 +6969,132 @@ var nu = {
|
|
|
6942
6969
|
"leave-from-class": "tpl:translate-x-0",
|
|
6943
6970
|
"leave-to-class": "tpl:translate-x-full"
|
|
6944
6971
|
}, {
|
|
6945
|
-
default: b(() => [e.visible ? (f(),
|
|
6972
|
+
default: b(() => [e.visible ? (f(), k("div", su, [I("div", cu, [I("div", lu, [V(j(yi), {
|
|
6946
6973
|
size: 13,
|
|
6947
6974
|
"stroke-width": 2
|
|
6948
|
-
}), I("span", null,
|
|
6975
|
+
}), I("span", null, D(j(i).scoring.title), 1)]), I("div", uu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
|
|
6949
6976
|
key: 0,
|
|
6950
6977
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6951
|
-
title:
|
|
6978
|
+
title: j(i).scoring.rescore,
|
|
6952
6979
|
onClick: n[0] ||= (e) => m()
|
|
6953
|
-
}, [V(
|
|
6980
|
+
}, [V(j(hi), {
|
|
6954
6981
|
size: 14,
|
|
6955
6982
|
"stroke-width": 2
|
|
6956
|
-
})], 8,
|
|
6983
|
+
})], 8, du)) : A("", !0), I("button", {
|
|
6957
6984
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6958
6985
|
onClick: n[1] ||= (e) => r("close")
|
|
6959
|
-
}, [V(
|
|
6986
|
+
}, [V(j(Oi), {
|
|
6960
6987
|
size: 14,
|
|
6961
6988
|
"stroke-width": 2
|
|
6962
|
-
})])])]), I("div",
|
|
6963
|
-
V(
|
|
6989
|
+
})])])]), I("div", fu, [j(o).isScoring.value ? (f(), k("div", pu, [I("p", mu, D(j(i).scoring.scoring), 1), V(Li, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", hu, [
|
|
6990
|
+
V(j(Yr), {
|
|
6964
6991
|
size: 32,
|
|
6965
6992
|
"stroke-width": 1.5,
|
|
6966
6993
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
6967
6994
|
}),
|
|
6968
|
-
I("p",
|
|
6995
|
+
I("p", gu, D(j(i).scoring.error), 1),
|
|
6969
6996
|
I("button", {
|
|
6970
6997
|
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)]",
|
|
6971
6998
|
onClick: n[2] ||= (e) => m()
|
|
6972
|
-
}, [V(
|
|
6999
|
+
}, [V(j(hi), {
|
|
6973
7000
|
size: 12,
|
|
6974
7001
|
"stroke-width": 2
|
|
6975
|
-
}), z(" " +
|
|
6976
|
-
])) :
|
|
7002
|
+
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
7003
|
+
])) : j(o).scoringResult.value ? (f(), k("div", _u, [
|
|
6977
7004
|
I("div", {
|
|
6978
7005
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
6979
|
-
style: L({ backgroundColor:
|
|
7006
|
+
style: L({ backgroundColor: j(iu)(j(o).scoringResult.value.score) })
|
|
6980
7007
|
}, [
|
|
6981
7008
|
I("span", {
|
|
6982
7009
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
6983
|
-
style: L({ color:
|
|
6984
|
-
},
|
|
6985
|
-
I("span",
|
|
6986
|
-
_() > 0 ? (f(),
|
|
7010
|
+
style: L({ color: j(ru)(j(o).scoringResult.value.score) })
|
|
7011
|
+
}, D(j(o).scoringResult.value.score), 5),
|
|
7012
|
+
I("span", vu, D(j(i).scoring.overallScore), 1),
|
|
7013
|
+
_() > 0 ? (f(), k("span", yu, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
|
|
6987
7014
|
], 4),
|
|
6988
|
-
|
|
7015
|
+
j(o).fixError.value ? (f(), k("div", bu, [V(j(Yr), {
|
|
6989
7016
|
size: 14,
|
|
6990
7017
|
"stroke-width": 2,
|
|
6991
7018
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6992
|
-
}), I("span", null,
|
|
6993
|
-
(f(),
|
|
7019
|
+
}), I("span", null, D(j(i).scoring.fixError), 1)])) : A("", !0),
|
|
7020
|
+
(f(), k(R, null, h(u, (e) => I("div", {
|
|
6994
7021
|
key: e,
|
|
6995
7022
|
class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
6996
7023
|
}, [I("button", {
|
|
6997
7024
|
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)]",
|
|
6998
7025
|
onClick: (t) => l(e)
|
|
6999
7026
|
}, [
|
|
7000
|
-
(f(),
|
|
7027
|
+
(f(), N(d(p[e]), {
|
|
7001
7028
|
size: 14,
|
|
7002
7029
|
"stroke-width": 2,
|
|
7003
|
-
style: L({ color:
|
|
7030
|
+
style: L({ color: j(ru)(j(o).scoringResult.value.categories[e].score) })
|
|
7004
7031
|
}, null, 8, ["style"])),
|
|
7005
|
-
I("span",
|
|
7032
|
+
I("span", Su, D(j(i).scoring.categories[e]), 1),
|
|
7006
7033
|
I("span", {
|
|
7007
7034
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
7008
7035
|
style: L({
|
|
7009
|
-
color:
|
|
7010
|
-
backgroundColor:
|
|
7036
|
+
color: j(ru)(j(o).scoringResult.value.categories[e].score),
|
|
7037
|
+
backgroundColor: j(iu)(j(o).scoringResult.value.categories[e].score)
|
|
7011
7038
|
})
|
|
7012
|
-
},
|
|
7013
|
-
|
|
7014
|
-
V(
|
|
7039
|
+
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
7040
|
+
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", Cu, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
|
|
7041
|
+
V(j(Gr), {
|
|
7015
7042
|
size: 12,
|
|
7016
7043
|
"stroke-width": 2,
|
|
7017
|
-
class:
|
|
7044
|
+
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
7018
7045
|
}, null, 8, ["class"])
|
|
7019
|
-
], 8,
|
|
7046
|
+
], 8, xu), c.value[e] ? (f(), k("div", wu, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", Tu, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
|
|
7020
7047
|
key: e.id,
|
|
7021
7048
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
7022
|
-
}, [I("div",
|
|
7049
|
+
}, [I("div", Eu, [(f(), N(d(j(e.severity === "high" ? Yr : e.severity === "medium" ? wi : ci)), {
|
|
7023
7050
|
size: 13,
|
|
7024
7051
|
"stroke-width": 2,
|
|
7025
7052
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
7026
|
-
style: L({ color:
|
|
7027
|
-
}, null, 8, ["style"])), I("div",
|
|
7028
|
-
I("div",
|
|
7053
|
+
style: L({ color: j(au)(e.severity) })
|
|
7054
|
+
}, null, 8, ["style"])), I("div", Du, [
|
|
7055
|
+
I("div", Ou, [I("span", {
|
|
7029
7056
|
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",
|
|
7030
7057
|
style: L({
|
|
7031
|
-
color:
|
|
7032
|
-
backgroundColor:
|
|
7058
|
+
color: j(au)(e.severity),
|
|
7059
|
+
backgroundColor: j(ou)(e.severity)
|
|
7033
7060
|
})
|
|
7034
|
-
},
|
|
7035
|
-
e.suggestion ? (f(),
|
|
7036
|
-
e.blockId ? (f(),
|
|
7061
|
+
}, D(j(i).scoring.severity[e.severity]), 5), I("span", ku, D(e.message), 1)]),
|
|
7062
|
+
e.suggestion ? (f(), k("p", Au, D(e.suggestion), 1)) : A("", !0),
|
|
7063
|
+
e.blockId ? (f(), k("div", ju, [I("button", {
|
|
7037
7064
|
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)]",
|
|
7038
7065
|
style: { "background-color": "transparent" },
|
|
7039
|
-
disabled:
|
|
7066
|
+
disabled: j(o).fixingFindingId.value !== null,
|
|
7040
7067
|
onClick: (t) => g(e)
|
|
7041
|
-
}, [
|
|
7068
|
+
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(li), {
|
|
7042
7069
|
key: 0,
|
|
7043
7070
|
class: "tpl-spinner",
|
|
7044
7071
|
size: 11,
|
|
7045
7072
|
"stroke-width": 2
|
|
7046
|
-
})) : (f(),
|
|
7073
|
+
})) : (f(), N(j(xi), {
|
|
7047
7074
|
key: 1,
|
|
7048
7075
|
size: 11,
|
|
7049
7076
|
"stroke-width": 2
|
|
7050
|
-
})), z(" " +
|
|
7051
|
-
])])]))), 128))])) :
|
|
7052
|
-
])) : (f(),
|
|
7077
|
+
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, Mu), j(o).fixError.value ? (f(), k("p", Nu, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
|
|
7078
|
+
])])]))), 128))])) : A("", !0)])), 64))
|
|
7079
|
+
])) : (f(), k("div", Pu, [V(j(yi), {
|
|
7053
7080
|
size: 32,
|
|
7054
7081
|
"stroke-width": 1.5,
|
|
7055
7082
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
7056
|
-
}), I("p",
|
|
7083
|
+
}), I("p", Fu, D(j(i).scoring.emptyState), 1)])), I("p", Iu, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
7057
7084
|
_: 1
|
|
7058
7085
|
}));
|
|
7059
7086
|
}
|
|
7060
|
-
}),
|
|
7087
|
+
}), Ru = /* @__PURE__ */ e({ default: () => zu }), zu = /* @__PURE__ */ Ni(Lu, [["__scopeId", "data-v-3a059e8d"]]), Bu = ["aria-busy"], Vu = {
|
|
7061
7088
|
id: "tpl-test-email-title",
|
|
7062
7089
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
7063
|
-
},
|
|
7090
|
+
}, Hu = { class: "tpl:mb-3" }, Uu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Wu = ["value"], Gu = ["disabled"], Ku = ["value"], qu = {
|
|
7064
7091
|
key: 0,
|
|
7065
7092
|
role: "alert",
|
|
7066
7093
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
7067
|
-
},
|
|
7094
|
+
}, Ju = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Yu = ["disabled"], Xu = ["disabled"], Zu = {
|
|
7068
7095
|
key: 0,
|
|
7069
7096
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
7070
|
-
},
|
|
7097
|
+
}, Qu = { key: 1 }, $u = /* @__PURE__ */ B({
|
|
7071
7098
|
__name: "TestEmailModal",
|
|
7072
7099
|
props: {
|
|
7073
7100
|
visible: { type: Boolean },
|
|
@@ -7077,7 +7104,7 @@ var nu = {
|
|
|
7077
7104
|
},
|
|
7078
7105
|
emits: ["send", "close"],
|
|
7079
7106
|
setup(e, { emit: t }) {
|
|
7080
|
-
let n = e, r = t, { t: i } =
|
|
7107
|
+
let n = e, r = t, { t: i } = Ui(), a = C("");
|
|
7081
7108
|
H(() => n.visible, (e) => {
|
|
7082
7109
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7083
7110
|
});
|
|
@@ -7090,7 +7117,7 @@ var nu = {
|
|
|
7090
7117
|
function l(e) {
|
|
7091
7118
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7092
7119
|
}
|
|
7093
|
-
return (t, n) => (f(),
|
|
7120
|
+
return (t, n) => (f(), N(Vo, {
|
|
7094
7121
|
visible: e.visible,
|
|
7095
7122
|
onClose: s,
|
|
7096
7123
|
onKeydown: l
|
|
@@ -7106,44 +7133,44 @@ var nu = {
|
|
|
7106
7133
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7107
7134
|
}
|
|
7108
7135
|
}, [
|
|
7109
|
-
I("h3",
|
|
7110
|
-
I("div",
|
|
7136
|
+
I("h3", Vu, D(j(i).testEmail.title), 1),
|
|
7137
|
+
I("div", Hu, [I("label", Uu, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
|
|
7111
7138
|
key: 0,
|
|
7112
7139
|
type: "text",
|
|
7113
7140
|
value: a.value,
|
|
7114
7141
|
disabled: "",
|
|
7115
7142
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
7116
|
-
}, null, 8,
|
|
7143
|
+
}, null, 8, Wu)) : c((f(), k("select", {
|
|
7117
7144
|
key: 1,
|
|
7118
7145
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7119
7146
|
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)]",
|
|
7120
7147
|
disabled: e.isSending
|
|
7121
|
-
}, [(f(!0),
|
|
7148
|
+
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
7122
7149
|
key: e,
|
|
7123
7150
|
value: e
|
|
7124
|
-
},
|
|
7125
|
-
e.error ? (f(),
|
|
7126
|
-
I("div",
|
|
7151
|
+
}, D(e), 9, Ku))), 128))], 8, Gu)), [[w, a.value]])]),
|
|
7152
|
+
e.error ? (f(), k("p", qu, D(e.error), 1)) : A("", !0),
|
|
7153
|
+
I("div", Ju, [I("button", {
|
|
7127
7154
|
type: "button",
|
|
7128
|
-
class:
|
|
7155
|
+
class: F(["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 }]),
|
|
7129
7156
|
disabled: e.isSending,
|
|
7130
7157
|
onClick: s
|
|
7131
|
-
},
|
|
7158
|
+
}, D(j(i).testEmail.cancel), 11, Yu), I("button", {
|
|
7132
7159
|
type: "button",
|
|
7133
7160
|
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)]",
|
|
7134
7161
|
disabled: !a.value || e.isSending,
|
|
7135
7162
|
onClick: o
|
|
7136
|
-
}, [e.isSending ? (f(),
|
|
7163
|
+
}, [e.isSending ? (f(), k("span", Zu, [V(j(li), {
|
|
7137
7164
|
class: "tpl:animate-spin",
|
|
7138
7165
|
size: 12,
|
|
7139
7166
|
"stroke-width": 2
|
|
7140
|
-
}), z(" " +
|
|
7141
|
-
], 8,
|
|
7167
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", Qu, D(j(i).testEmail.send), 1))], 8, Xu)])
|
|
7168
|
+
], 8, Bu)]),
|
|
7142
7169
|
_: 1
|
|
7143
7170
|
}, 8, ["visible"]));
|
|
7144
7171
|
}
|
|
7145
|
-
}),
|
|
7172
|
+
}), ed = /* @__PURE__ */ e({ default: () => td }), td = $u;
|
|
7146
7173
|
//#endregion
|
|
7147
|
-
export {
|
|
7174
|
+
export { Wi as $, cr as $t, Ro as A, _e as An, Wr as At, Va as B, de as Bn, Un as Bt, Yo as C, st as Cn, ei as Ct, Uo as D, Ee as Dn, Yr as Dt, Ho as E, ve as En, Zr as Et, so as F, Se as Fn, Y as Ft, ha as G, Wn as Gt, za as H, ue as Hn, ur as Ht, lo as I, Te as In, or as It, sa as J, Fn as Jt, ma as K, Gn as Kt, oo as L, he as Ln, $n as Lt, Eo as M, ge as Mn, Mr as Mt, bo as N, me as Nn, xr as Nt, Vo as O, ye as On, qr as Ot, _o as P, xe as Pn, mr as Pt, Gi as Q, Zn as Qt, no as R, be as Rn, ar as Rt, Xo as S, ct as Sn, ti as St, Z as T, W as Tn, Qr as Tt, Aa as U, sr as Ut, Ba as V, fe as Vn, er as Vt, Ea as W, Rn as Wt, Xi as X, Xn as Xt, Qi as Y, zn as Yt, Ki as Z, qn as Zt, cs as _, lt as _n, ui as _t, dl as a, mn as an, Oi as at, is as b, ht as bn, si as bt, Ts as c, q as cn, Ci as ct, vs as d, tn as dn, yi as dt, lr as en, Hi as et, _s as f, en as fn, vi as ft, ps as g, wt as gn, di as gt, ms as h, Nt as hn, fi as ht, Bl as i, J as in, Mi as it, Io as j, we as jn, X as jt, zo as k, Ce as kn, Gr as kt, bs as l, kn as ln, Si as lt, hs as m, on as mn, hi as mt, Ru as n, Bn as nn, Bi as nt, Zs as o, Sn as on, Ei as ot, gs as p, an as pn, _i as pt, la as q, Qn as qt, tu as r, Vn as rn, Ni as rt, Es as s, Cn as sn, wi as st, ed as t, nr as tn, Ui as tt, ys as u, En as un, xi as ut, ss as v, _t as vn, li as vt, $ as w, ot as wn, $r as wt, es as x, vt as xn, oi as xt, as as y, yt as yn, ci as yt, eo as z, pe as zn, Hn as zt };
|
|
7148
7175
|
|
|
7149
|
-
//# sourceMappingURL=features-
|
|
7176
|
+
//# sourceMappingURL=features-_ar9QbVv.js.map
|