@templatical/editor 0.5.1 → 0.6.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/AccessibilityPanel-CvQGLdu6.js +108 -0
- package/dist/{AiChatSidebar-Cg206ewI.js → AiChatSidebar-Br9dhkIB.js} +17 -16
- package/dist/{AiFeatureMenu-D7Od4cI2.js → AiFeatureMenu-Ceewb3uB.js} +13 -13
- package/dist/BlockA11yBadge-CXDLqkcJ.js +34 -0
- package/dist/{CloudEditor-DG8fWnXI.js → CloudEditor-D_flODpm.js} +306 -217
- package/dist/{CollaboratorBar-BdXfCYAr.js → CollaboratorBar-BcSxXVY-.js} +4 -4
- package/dist/{CommentsSidebar-BAma2apG.js → CommentsSidebar-DceMRyIS.js} +26 -25
- package/dist/{CountdownBlock-Ce3RFNpM.js → CountdownBlock-BNSj1jvJ.js} +2 -2
- package/dist/{CountdownToolbar-Bo3Jaiky.js → CountdownToolbar-ClJr2GzL.js} +3 -3
- package/dist/{DesignReferenceSidebar-B8DDnLHQ.js → DesignReferenceSidebar-50qFipmW.js} +30 -29
- package/dist/{LoadingTrack-DhxulLPM.js → LoadingTrack-B0CWFHXQ.js} +1 -1
- package/dist/{ModuleBrowserModal-DpMInJoP.js → ModuleBrowserModal-BnSdG4DE.js} +10 -10
- package/dist/{ModulePreviewCanvas-MjIGlxVI.js → ModulePreviewCanvas-B78PuZdk.js} +2 -2
- package/dist/{NumberWithSuffix-BysfchFp.js → NumberWithSuffix-DkXUez9t.js} +3 -3
- package/dist/{ParagraphEditor-B5qZL5c2.js → ParagraphEditor-CPBYk2m3.js} +39 -38
- package/dist/{RichTextEditorContent-jxPxfbfZ.js → RichTextEditorContent-DYkIauIk.js} +4 -4
- package/dist/{SaveModuleDialog-BGFYMJby.js → SaveModuleDialog-Df__VToK.js} +7 -7
- package/dist/{SnapshotHistory-4aWE_-GM.js → SnapshotHistory-QBTbVrEK.js} +9 -9
- package/dist/{TemplateScoringPanel-BmAHdgLF.js → TemplateScoringPanel-4GTNHej5.js} +29 -27
- package/dist/{TestEmailModal-p-iH28wl.js → TestEmailModal-DaDMACHY.js} +4 -4
- package/dist/{TitleEditor-BHxJ6Oxd.js → TitleEditor-PHShl4tS.js} +10 -10
- package/dist/{TplModal-BiUCSfou.js → TplModal-DzlNkBYQ.js} +2 -2
- package/dist/_plugin-vue_export-helper-B0hnzhyu.js +8 -0
- package/dist/accessibility-e8JYu_zd.js +27 -0
- package/dist/{blockTypeIcons-8GJD96Tw.js → blockTypeIcons-D0wkSpP9.js} +2 -2
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/AccessibilityPanel-fjNLcnxu.js +97 -0
- package/dist/cdn/chunks/AccessibilityPanel-fjNLcnxu.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-DSXAYiMk.js → AiFeatureMenu-DSamZ3ve.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-DSXAYiMk.js.map → AiFeatureMenu-DSamZ3ve.js.map} +1 -1
- package/dist/cdn/chunks/BlockA11yBadge-D73PKVS8.js +33 -0
- package/dist/cdn/chunks/BlockA11yBadge-D73PKVS8.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-CRYF-bR3.js → CloudEditor-BGfliRFn.js} +253 -166
- package/dist/cdn/chunks/CloudEditor-BGfliRFn.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CTFgLtUt.js → CollaboratorBar-BRvF0m5t.js} +6 -6
- package/dist/cdn/chunks/{CollaboratorBar-CTFgLtUt.js.map → CollaboratorBar-BRvF0m5t.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-BKg-e3Uo.js → CountdownBlock-IIZk8uja.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-BKg-e3Uo.js.map → CountdownBlock-IIZk8uja.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CPAOXOwI.js → CountdownToolbar-mXM3YITU.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-CPAOXOwI.js.map → CountdownToolbar-mXM3YITU.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-B70ZM4KG.js → ModuleBrowserModal-BgIdqEyV.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-B70ZM4KG.js.map → ModuleBrowserModal-BgIdqEyV.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-VHhQwuFP.js → ModulePreviewCanvas-BOFLwREg.js} +18 -18
- package/dist/cdn/chunks/{ModulePreviewCanvas-VHhQwuFP.js.map → ModulePreviewCanvas-BOFLwREg.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-DnqYqSKs.js → NumberWithSuffix-Cxe5sPC2.js} +4 -4
- package/dist/cdn/chunks/{NumberWithSuffix-DnqYqSKs.js.map → NumberWithSuffix-Cxe5sPC2.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-oVEaeerJ.js → ParagraphEditor-7Wycs4gM.js} +53 -53
- package/dist/cdn/chunks/{ParagraphEditor-oVEaeerJ.js.map → ParagraphEditor-7Wycs4gM.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CmOwLOeY.js → RichTextEditorContent-DVw5mwEA.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-CmOwLOeY.js.map → RichTextEditorContent-DVw5mwEA.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B6kNizps.js → SaveModuleDialog-Cz1xEjJG.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-B6kNizps.js.map → SaveModuleDialog-Cz1xEjJG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CvZe3neh.js → TitleEditor-DTF4hRB6.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-CvZe3neh.js.map → TitleEditor-DTF4hRB6.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-C5tZU4ot.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-Bs9B-yft.js.map → blockTypeIcons-C5tZU4ot.js.map} +1 -1
- package/dist/cdn/chunks/{de-CGu9U1iv.js → de-Ce-LbJ2J.js} +1 -1
- package/dist/cdn/chunks/{de-CGu9U1iv.js.map → de-Ce-LbJ2J.js.map} +1 -1
- package/dist/{de-DwLWZn6p.js → cdn/chunks/de-D8CnZxV9.js} +21 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +1 -0
- package/dist/{de-CbSb23fl.js → cdn/chunks/de-RQrZR56a.js} +8 -0
- package/dist/cdn/chunks/{de-Db6I9YdS.js.map → de-RQrZR56a.js.map} +1 -1
- package/dist/cdn/chunks/{emojiData-Vv_m5TSB.js → emojiData-EMFlj6FJ.js} +1 -1
- package/dist/cdn/chunks/{emojiData-Vv_m5TSB.js.map → emojiData-EMFlj6FJ.js.map} +1 -1
- package/dist/{en-BrlGVpmd.js → cdn/chunks/en-8FHaQv4V.js} +21 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +1 -0
- package/dist/{en-2fvenFu0.js → cdn/chunks/en-Bl1ecfRF.js} +8 -0
- package/dist/cdn/chunks/{en-BbqBJ2Q3.js.map → en-Bl1ecfRF.js.map} +1 -1
- package/dist/cdn/chunks/{en-C3WMCISl.js → en-DiCWK5fG.js} +1 -1
- package/dist/cdn/chunks/{en-C3WMCISl.js.map → en-DiCWK5fG.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-D13MqxlW.js → extensions-BrVEX2vQ.js} +37 -34
- package/dist/cdn/chunks/{extensions-D13MqxlW.js.map → extensions-BrVEX2vQ.js.map} +1 -1
- package/dist/cdn/chunks/{features-BnG-dhzy.js → features-BdkV7kQP.js} +816 -756
- package/dist/cdn/chunks/features-BdkV7kQP.js.map +1 -0
- package/dist/cdn/chunks/{icons-B_185qj_.js → icons-oRXtYgc3.js} +99 -52
- package/dist/cdn/chunks/icons-oRXtYgc3.js.map +1 -0
- package/dist/cdn/chunks/{media-library-DxpFw4Tt.js → media-library-C7uyFrMO.js} +217 -217
- package/dist/cdn/chunks/{media-library-DxpFw4Tt.js.map → media-library-C7uyFrMO.js.map} +1 -1
- package/dist/cdn/chunks/quality-C5gsx_Tw.js +1456 -0
- package/dist/cdn/chunks/quality-C5gsx_Tw.js.map +1 -0
- package/dist/cdn/chunks/{readableTextColor-Cd_cgWO_.js → readableTextColor-DhoK4XiZ.js} +1 -1
- package/dist/cdn/chunks/{readableTextColor-Cd_cgWO_.js.map → readableTextColor-DhoK4XiZ.js.map} +1 -1
- package/dist/cdn/chunks/{dist-MGrg9tLo.js → renderer-DM2gdPmx.js} +178 -126
- package/dist/cdn/chunks/renderer-DM2gdPmx.js.map +1 -0
- package/dist/cdn/chunks/{src-Cw7KAyui.js → src-BAAwLL7q.js} +11 -11
- package/dist/cdn/chunks/{src-Cw7KAyui.js.map → src-BAAwLL7q.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DYDpAUsJ.js → styles-iDn0uW8_.js} +576 -484
- package/dist/cdn/chunks/styles-iDn0uW8_.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CPAwPMop.js → tiptap-ClLEM7Xz.js} +2 -2
- package/dist/cdn/chunks/{tiptap-CPAwPMop.js.map → tiptap-ClLEM7Xz.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +87 -86
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Om8IxvJb.js → check-Da05j8yl.js} +1 -1
- package/dist/{chevron-down-SG7QNtDl.js → chevron-down-R2uY34iD.js} +1 -1
- package/dist/{circle-alert-De74azaX.js → circle-alert-DZuGWPX-.js} +1 -1
- package/dist/{clock-Dr7rX_PG.js → clock-CRp2sIub.js} +1 -1
- package/dist/{cloud-B1NAFg44.js → cloud-WfWdqZVK.js} +1 -1
- package/dist/{_plugin-vue_export-helper-GRmvIR5A.js → createLucideIcon-C3pa2siy.js} +2 -6
- package/dist/{cdn/chunks/de-BSWt7lYu.js → de-Brqvgr43.js} +19 -3
- package/dist/{cdn/chunks/de-Db6I9YdS.js → de-DCaaCE5s.js} +6 -2
- package/dist/{dist-CuyhAnuE.js → dist-B1IR0bpH.js} +65 -53
- package/dist/{dist-QoJxR1uP.js → dist-BFawx6IS.js} +1 -1
- package/dist/{dist-H7npgW0s.js → dist-BaQIYPsn.js} +1 -1
- package/dist/{dist-C4m7p7Wb.js → dist-Cp0zXPAD.js} +1 -1
- package/dist/{dist--8ZUsIQD.js → dist-D6uC2xhi.js} +1 -1
- package/dist/{dist-BMMiVjHs.js → dist-D90y8dvT.js} +3 -3
- package/dist/{dist--e2w6FN-.js → dist-DDJIWTRY.js} +1 -1
- package/dist/{dist-e0ylhlSV.js → dist-DJmnUmW9.js} +2 -1
- package/dist/{dist-BOSn1353.js → dist-DjviJBCi.js} +1 -1
- package/dist/{dist-BsiDC2rP.js → dist-KoBJjK1G.js} +1 -1
- package/dist/{dist-BNZS_qhu.js → dist-aRzjfSRN.js} +1 -1
- package/dist/{dist-3AzSJz2x.js → dist-us-RpCWN.js} +1 -1
- package/dist/{dist-DPsMHsAW.js → dist-wzMIGj-D.js} +1 -1
- package/dist/{cdn/chunks/en-BbqBJ2Q3.js → en-DXCyK4-X.js} +6 -2
- package/dist/{cdn/chunks/en-9-vIGlc7.js → en-WDVp87TE.js} +19 -3
- package/dist/{extensions-Cmf6XVn9.js → extensions-CUcl9Ok4.js} +26 -23
- package/dist/{image-up-10kxuulB.js → image-up-MBZKKg9p.js} +1 -1
- package/dist/index.d.ts +25 -8
- package/dist/info-CJEC7piy.js +19 -0
- package/dist/{keys-BeW4IrXP.js → keys-ciNfSSGj.js} +3 -3
- package/dist/{loader-circle-IS16T05j.js → loader-circle-DsY5Yg33.js} +1 -1
- package/dist/{message-circle-3R472hDc.js → message-circle-yElBbR2C.js} +1 -1
- package/dist/{refresh-cw-CpmOfpPK.js → refresh-cw-CE_AGtn8.js} +3 -18
- package/dist/{scan-line-J_fzG2Wo.js → scan-line-D0vcUekt.js} +1 -1
- package/dist/{send-DRkFf4hP.js → send-DH4oDQqC.js} +1 -1
- package/dist/{shield-check-DtXk7JKN.js → shield-check-CfJgs2Hd.js} +1 -1
- package/dist/{sparkles-CD7TiNiC.js → sparkles-CvRXGqFs.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-C-FrkTA9.js → styles-B58wYIn4.js} +589 -476
- package/dist/templatical-editor.js +90 -89
- package/dist/{text-align-start-B8M9hruh.js → text-align-start-BT9VUDxK.js} +1 -1
- package/dist/{trash-2-cEVwp-r_.js → trash-2-DbP2Y6t2.js} +1 -1
- package/dist/{triangle-alert-8CkexIzx.js → triangle-alert-aOXceTSe.js} +1 -1
- package/dist/{useCloudI18n-D0Fi0hBU.js → useCloudI18n-BuIwR6OE.js} +1 -1
- package/dist/{useEditorCore-D0uZbPKG.js → useEditorCore-Dz-qbVXX.js} +1709 -1661
- package/dist/{useI18n-Jp3X6Q0t.js → useI18n-lb2DHDiu.js} +1 -1
- package/dist/{useMergeTag-CEE4CG-D.js → useMergeTag-CBwKnnNB.js} +3 -3
- package/dist/{x-BNc1bVzp.js → x-u2oVmjN_.js} +1 -1
- package/package.json +10 -5
- package/dist/cdn/chunks/CloudEditor-CRYF-bR3.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-Bs9B-yft.js +0 -22
- package/dist/cdn/chunks/de-BSWt7lYu.js.map +0 -1
- package/dist/cdn/chunks/dist-MGrg9tLo.js.map +0 -1
- package/dist/cdn/chunks/en-9-vIGlc7.js.map +0 -1
- package/dist/cdn/chunks/features-BnG-dhzy.js.map +0 -1
- package/dist/cdn/chunks/icons-B_185qj_.js.map +0 -1
- package/dist/cdn/chunks/styles-DYDpAUsJ.js.map +0 -1
- /package/dist/{dist-CmrXHeJS.js → dist-iLBdeBDR.js} +0 -0
- /package/dist/{emojiData-DcYt1YZ3.js → emojiData-PQyVa4bU.js} +0 -0
- /package/dist/{formatRelativeTime-MungD2xr.js → formatRelativeTime-WvH3Au71.js} +0 -0
- /package/dist/{liquid.browser-BohVA1YU.js → liquid.browser-CdMv1BTn.js} +0 -0
- /package/dist/{readableTextColor-Uc7ntzXo.js → readableTextColor-CY3SiRnt.js} +0 -0
- /package/dist/{styleConstants-Beu6EmBc.js → styleConstants-fWzlIIwN.js} +0 -0
|
@@ -129,7 +129,8 @@ var je = {
|
|
|
129
129
|
}, We = {
|
|
130
130
|
width: 600,
|
|
131
131
|
backgroundColor: "#ffffff",
|
|
132
|
-
fontFamily: "Arial"
|
|
132
|
+
fontFamily: "Arial",
|
|
133
|
+
locale: "en"
|
|
133
134
|
};
|
|
134
135
|
function Ge(e) {
|
|
135
136
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
@@ -790,7 +791,8 @@ function qt(e, t) {
|
|
|
790
791
|
}
|
|
791
792
|
return n;
|
|
792
793
|
}
|
|
793
|
-
|
|
794
|
+
var Jt = (e) => e();
|
|
795
|
+
function Yt(e, t = {}) {
|
|
794
796
|
let n, r, i = W, a = (e) => {
|
|
795
797
|
clearTimeout(e), i(), i = W;
|
|
796
798
|
}, o;
|
|
@@ -805,7 +807,7 @@ function Jt(e, t = {}) {
|
|
|
805
807
|
});
|
|
806
808
|
};
|
|
807
809
|
}
|
|
808
|
-
function
|
|
810
|
+
function Xt(e) {
|
|
809
811
|
let t;
|
|
810
812
|
function n() {
|
|
811
813
|
return t ||= e(), t;
|
|
@@ -815,22 +817,26 @@ function Yt(e) {
|
|
|
815
817
|
t = void 0, e && await e;
|
|
816
818
|
}, n;
|
|
817
819
|
}
|
|
818
|
-
function
|
|
820
|
+
function Zt(e) {
|
|
819
821
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
820
822
|
}
|
|
821
|
-
function
|
|
823
|
+
function Qt(e) {
|
|
822
824
|
return Array.isArray(e) ? e : [e];
|
|
823
825
|
}
|
|
824
|
-
function
|
|
826
|
+
function $t(e) {
|
|
825
827
|
return e || a();
|
|
826
828
|
}
|
|
827
|
-
function
|
|
828
|
-
return qt(
|
|
829
|
+
function en(e, t = 200, n = {}) {
|
|
830
|
+
return qt(Yt(t, n), e);
|
|
831
|
+
}
|
|
832
|
+
function tn(e, t, n = {}) {
|
|
833
|
+
let { eventFilter: r = Jt, ...a } = n;
|
|
834
|
+
return i(e, qt(r, t), a);
|
|
829
835
|
}
|
|
830
|
-
function
|
|
831
|
-
|
|
836
|
+
function nn(e, t = !0, n) {
|
|
837
|
+
$t(n) ? ne(e, n) : t ? e() : re(e);
|
|
832
838
|
}
|
|
833
|
-
function
|
|
839
|
+
function rn(e, t = 1e3, n = {}) {
|
|
834
840
|
let { immediate: r = !0, immediateCallback: a = !1 } = n, o = null, s = R(!1);
|
|
835
841
|
function c() {
|
|
836
842
|
o &&= (clearInterval(o), null);
|
|
@@ -850,7 +856,7 @@ function tn(e, t = 1e3, n = {}) {
|
|
|
850
856
|
resume: d
|
|
851
857
|
};
|
|
852
858
|
}
|
|
853
|
-
function
|
|
859
|
+
function an(e, t, n = {}) {
|
|
854
860
|
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = R(!1), o;
|
|
855
861
|
function s() {
|
|
856
862
|
o &&= (clearTimeout(o), void 0);
|
|
@@ -869,7 +875,7 @@ function nn(e, t, n = {}) {
|
|
|
869
875
|
stop: c
|
|
870
876
|
};
|
|
871
877
|
}
|
|
872
|
-
function
|
|
878
|
+
function on(e = !1, t = {}) {
|
|
873
879
|
let { truthyValue: n = !0, falsyValue: r = !1 } = t, i = u(e), a = R(e);
|
|
874
880
|
function o(e) {
|
|
875
881
|
if (arguments.length) return a.value = e, a.value;
|
|
@@ -880,7 +886,14 @@ function rn(e = !1, t = {}) {
|
|
|
880
886
|
}
|
|
881
887
|
return i ? o : [a, o];
|
|
882
888
|
}
|
|
883
|
-
function
|
|
889
|
+
function sn(e, t, n = {}) {
|
|
890
|
+
let { debounce: r = 0, maxWait: i = void 0, ...a } = n;
|
|
891
|
+
return tn(e, t, {
|
|
892
|
+
...a,
|
|
893
|
+
eventFilter: Yt(r, { maxWait: i })
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
function cn(e, t, n) {
|
|
884
897
|
return i(e, t, {
|
|
885
898
|
...n,
|
|
886
899
|
immediate: !0
|
|
@@ -888,20 +901,20 @@ function an(e, t, n) {
|
|
|
888
901
|
}
|
|
889
902
|
//#endregion
|
|
890
903
|
//#region ../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
891
|
-
var
|
|
904
|
+
var ln = Bt ? window : void 0, un = Bt ? window.document : void 0, dn = Bt ? window.navigator : void 0;
|
|
892
905
|
function G(e) {
|
|
893
906
|
let t = I(e);
|
|
894
907
|
return t?.$el ?? t;
|
|
895
908
|
}
|
|
896
909
|
function K(...e) {
|
|
897
910
|
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = F(() => {
|
|
898
|
-
let t =
|
|
911
|
+
let t = Qt(I(e[0])).filter((e) => e != null);
|
|
899
912
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
900
913
|
});
|
|
901
|
-
return
|
|
902
|
-
n.value?.map((e) => G(e)) ?? [
|
|
903
|
-
|
|
904
|
-
|
|
914
|
+
return cn(() => [
|
|
915
|
+
n.value?.map((e) => G(e)) ?? [ln].filter((e) => e != null),
|
|
916
|
+
Qt(I(n.value ? e[1] : e[0])),
|
|
917
|
+
Qt(w(n.value ? e[2] : e[1])),
|
|
905
918
|
I(n.value ? e[3] : e[2])
|
|
906
919
|
], ([e, n, r, i], a, o) => {
|
|
907
920
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
@@ -911,16 +924,16 @@ function K(...e) {
|
|
|
911
924
|
});
|
|
912
925
|
}, { flush: "post" });
|
|
913
926
|
}
|
|
914
|
-
var
|
|
915
|
-
function
|
|
916
|
-
let { window: r =
|
|
927
|
+
var fn = !1;
|
|
928
|
+
function pn(e, t, n = {}) {
|
|
929
|
+
let { window: r = ln, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
|
|
917
930
|
if (!r) return s ? {
|
|
918
931
|
stop: W,
|
|
919
932
|
cancel: W,
|
|
920
933
|
trigger: W
|
|
921
934
|
} : W;
|
|
922
|
-
if (Gt && !
|
|
923
|
-
|
|
935
|
+
if (Gt && !fn) {
|
|
936
|
+
fn = !0;
|
|
924
937
|
let e = { passive: !0 };
|
|
925
938
|
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", W, e)), r.document.documentElement.addEventListener("click", W, e);
|
|
926
939
|
}
|
|
@@ -978,21 +991,21 @@ function un(e, t, n = {}) {
|
|
|
978
991
|
}
|
|
979
992
|
} : h;
|
|
980
993
|
}
|
|
981
|
-
function
|
|
994
|
+
function mn() {
|
|
982
995
|
let e = R(!1), t = a();
|
|
983
996
|
return t && ne(() => {
|
|
984
997
|
e.value = !0;
|
|
985
998
|
}, t), e;
|
|
986
999
|
}
|
|
987
1000
|
/* @__NO_SIDE_EFFECTS__ */
|
|
988
|
-
function
|
|
989
|
-
return
|
|
1001
|
+
function hn(e) {
|
|
1002
|
+
return mn(), F(() => !!e());
|
|
990
1003
|
}
|
|
991
|
-
function
|
|
992
|
-
let { window: r =
|
|
1004
|
+
function gn(e, t, n = {}) {
|
|
1005
|
+
let { window: r = ln, ...a } = n, o, s = /* @__PURE__ */ hn(() => r && "MutationObserver" in r), c = () => {
|
|
993
1006
|
o &&= (o.disconnect(), void 0);
|
|
994
1007
|
}, l = i(F(() => {
|
|
995
|
-
let t =
|
|
1008
|
+
let t = Qt(I(e)).map(G).filter(Vt);
|
|
996
1009
|
return new Set(t);
|
|
997
1010
|
}), (e) => {
|
|
998
1011
|
c(), s.value && e.size && (o = new MutationObserver(t), e.forEach((e) => o.observe(e, a)));
|
|
@@ -1008,19 +1021,19 @@ function pn(e, t, n = {}) {
|
|
|
1008
1021
|
takeRecords: u
|
|
1009
1022
|
};
|
|
1010
1023
|
}
|
|
1011
|
-
var
|
|
1024
|
+
var _n = Symbol("vueuse-ssr-width");
|
|
1012
1025
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1013
|
-
function
|
|
1014
|
-
let e = _() ? zt(
|
|
1026
|
+
function vn() {
|
|
1027
|
+
let e = _() ? zt(_n, null) : null;
|
|
1015
1028
|
return typeof e == "number" ? e : void 0;
|
|
1016
1029
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let { window: n =
|
|
1030
|
+
function yn(e, t = {}) {
|
|
1031
|
+
let { window: n = ln, ssrWidth: r = /* @__PURE__ */ vn() } = t, i = /* @__PURE__ */ hn(() => n && "matchMedia" in n && typeof n.matchMedia == "function"), a = R(typeof r == "number"), o = R(), s = R(!1);
|
|
1019
1032
|
return y(() => {
|
|
1020
1033
|
if (a.value) {
|
|
1021
1034
|
a.value = !i.value, s.value = I(e).split(",").some((e) => {
|
|
1022
1035
|
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = !!(n || i);
|
|
1023
|
-
return n && a && (a = r >=
|
|
1036
|
+
return n && a && (a = r >= Zt(n[1])), i && a && (a = r <= Zt(i[1])), t ? !a : a;
|
|
1024
1037
|
});
|
|
1025
1038
|
return;
|
|
1026
1039
|
}
|
|
@@ -1029,12 +1042,12 @@ function gn(e, t = {}) {
|
|
|
1029
1042
|
s.value = e.matches;
|
|
1030
1043
|
}, { passive: !0 }), F(() => s.value);
|
|
1031
1044
|
}
|
|
1032
|
-
function
|
|
1033
|
-
let { controls: n = !1, navigator: r =
|
|
1045
|
+
function bn(e, t = {}) {
|
|
1046
|
+
let { controls: n = !1, navigator: r = dn } = t, i = /* @__PURE__ */ hn(() => r && "permissions" in r), a = R(), o = typeof e == "string" ? { name: e } : e, s = R(), c = () => {
|
|
1034
1047
|
s.value = a.value?.state ?? "prompt";
|
|
1035
1048
|
};
|
|
1036
1049
|
K(a, "change", c, { passive: !0 });
|
|
1037
|
-
let l =
|
|
1050
|
+
let l = Xt(async () => {
|
|
1038
1051
|
if (i.value) {
|
|
1039
1052
|
if (!a.value) try {
|
|
1040
1053
|
a.value = await r.permissions.query(o);
|
|
@@ -1052,8 +1065,8 @@ function _n(e, t = {}) {
|
|
|
1052
1065
|
query: l
|
|
1053
1066
|
} : s;
|
|
1054
1067
|
}
|
|
1055
|
-
function
|
|
1056
|
-
let { navigator: t =
|
|
1068
|
+
function xn(e = {}) {
|
|
1069
|
+
let { navigator: t = dn, read: n = !1, source: r, copiedDuring: i = 1500, legacy: a = !1 } = e, o = /* @__PURE__ */ hn(() => t && "clipboard" in t), s = bn("clipboard-read"), c = bn("clipboard-write"), l = F(() => o.value || a), u = R(""), d = R(!1), f = an(() => d.value = !1, i, { immediate: !1 });
|
|
1057
1070
|
async function p() {
|
|
1058
1071
|
let e = !(o.value && v(s.value));
|
|
1059
1072
|
if (!e) try {
|
|
@@ -1093,7 +1106,7 @@ function vn(e = {}) {
|
|
|
1093
1106
|
copy: h
|
|
1094
1107
|
};
|
|
1095
1108
|
}
|
|
1096
|
-
function
|
|
1109
|
+
function Sn(e, t = {}) {
|
|
1097
1110
|
let n = R(!1), r = R(null), i = 0, a = !0;
|
|
1098
1111
|
if (Bt) {
|
|
1099
1112
|
let o = typeof t == "function" ? { onDrop: t } : t, s = o.multiple ?? !0, c = o.preventDefaultForUnhandled ?? !1, l = (e) => {
|
|
@@ -1138,8 +1151,8 @@ function yn(e, t = {}) {
|
|
|
1138
1151
|
isOverDropZone: n
|
|
1139
1152
|
};
|
|
1140
1153
|
}
|
|
1141
|
-
function
|
|
1142
|
-
let { window: r =
|
|
1154
|
+
function Cn(e, t, n = {}) {
|
|
1155
|
+
let { window: r = ln, ...a } = n, o, s = /* @__PURE__ */ hn(() => r && "ResizeObserver" in r), c = () => {
|
|
1143
1156
|
o &&= (o.disconnect(), void 0);
|
|
1144
1157
|
}, l = i(F(() => {
|
|
1145
1158
|
let t = I(e);
|
|
@@ -1160,7 +1173,7 @@ function bn(e, t, n = {}) {
|
|
|
1160
1173
|
stop: u
|
|
1161
1174
|
};
|
|
1162
1175
|
}
|
|
1163
|
-
function
|
|
1176
|
+
function wn(e, t = {}) {
|
|
1164
1177
|
let { reset: n = !0, windowResize: r = !0, windowScroll: a = !0, immediate: o = !0, updateTiming: s = "sync" } = t, c = R(0), l = R(0), u = R(0), d = R(0), f = R(0), p = R(0), m = R(0), h = R(0);
|
|
1165
1178
|
function g() {
|
|
1166
1179
|
let t = G(e);
|
|
@@ -1174,10 +1187,10 @@ function xn(e, t = {}) {
|
|
|
1174
1187
|
function _() {
|
|
1175
1188
|
s === "sync" ? g() : s === "next-frame" && requestAnimationFrame(() => g());
|
|
1176
1189
|
}
|
|
1177
|
-
return
|
|
1190
|
+
return Cn(e, _), i(() => G(e), (e) => !e && _()), gn(e, _, { attributeFilter: ["style", "class"] }), a && K("scroll", _, {
|
|
1178
1191
|
capture: !0,
|
|
1179
1192
|
passive: !0
|
|
1180
|
-
}), r && K("resize", _, { passive: !0 }),
|
|
1193
|
+
}), r && K("resize", _, { passive: !0 }), nn(() => {
|
|
1181
1194
|
o && _();
|
|
1182
1195
|
}), {
|
|
1183
1196
|
height: c,
|
|
@@ -1191,8 +1204,8 @@ function xn(e, t = {}) {
|
|
|
1191
1204
|
update: _
|
|
1192
1205
|
};
|
|
1193
1206
|
}
|
|
1194
|
-
function
|
|
1195
|
-
let { root: r, rootMargin: a, threshold: o = 0, window: s =
|
|
1207
|
+
function Tn(e, t, n = {}) {
|
|
1208
|
+
let { root: r, rootMargin: a, threshold: o = 0, window: s = ln, immediate: c = !0 } = n, l = /* @__PURE__ */ hn(() => s && "IntersectionObserver" in s), u = F(() => Qt(I(e)).map(G).filter(Vt)), d = W, f = R(c), p = l.value ? i(() => [
|
|
1196
1209
|
u.value,
|
|
1197
1210
|
G(r),
|
|
1198
1211
|
I(a),
|
|
@@ -1225,21 +1238,21 @@ function Sn(e, t, n = {}) {
|
|
|
1225
1238
|
stop: m
|
|
1226
1239
|
};
|
|
1227
1240
|
}
|
|
1228
|
-
var
|
|
1241
|
+
var En = {
|
|
1229
1242
|
multiple: !0,
|
|
1230
1243
|
accept: "*",
|
|
1231
1244
|
reset: !1,
|
|
1232
1245
|
directory: !1
|
|
1233
1246
|
};
|
|
1234
|
-
function
|
|
1247
|
+
function Dn(e) {
|
|
1235
1248
|
if (!e) return null;
|
|
1236
1249
|
if (e instanceof FileList) return e;
|
|
1237
1250
|
let t = new DataTransfer();
|
|
1238
1251
|
for (let n of e) t.items.add(n);
|
|
1239
1252
|
return t.files;
|
|
1240
1253
|
}
|
|
1241
|
-
function
|
|
1242
|
-
let { document: t =
|
|
1254
|
+
function On(e = {}) {
|
|
1255
|
+
let { document: t = un } = e, r = n(Dn(e.initialFiles)), { on: i, trigger: a } = Lt(), { on: o, trigger: s } = Lt(), c = F(() => {
|
|
1243
1256
|
let n = G(e.input) ?? (t ? t.createElement("input") : void 0);
|
|
1244
1257
|
return n && (n.type = "file", n.onchange = (e) => {
|
|
1245
1258
|
r.value = e.target.files, a(r.value);
|
|
@@ -1260,7 +1273,7 @@ function Tn(e = {}) {
|
|
|
1260
1273
|
let n = c.value;
|
|
1261
1274
|
if (!n) return;
|
|
1262
1275
|
let r = {
|
|
1263
|
-
...
|
|
1276
|
+
...En,
|
|
1264
1277
|
...e,
|
|
1265
1278
|
...t
|
|
1266
1279
|
};
|
|
@@ -1273,16 +1286,54 @@ function Tn(e = {}) {
|
|
|
1273
1286
|
}
|
|
1274
1287
|
//#endregion
|
|
1275
1288
|
//#region src/keys.ts
|
|
1276
|
-
var
|
|
1277
|
-
function
|
|
1289
|
+
var kn = Symbol("translations"), q = Symbol("editor"), An = Symbol("history"), jn = Symbol("blockActions"), Mn = Symbol("conditionPreview"), Nn = Symbol("fontsManager"), Pn = Symbol("themeStyles"), Fn = Symbol("tplUiTheme"), In = Symbol("blockDefaults"), Ln = Symbol("blockRegistry"), Rn = Symbol("customBlockDefinitions"), zn = Symbol("mergeTags"), Bn = Symbol("mergeTagSyntax"), Vn = Symbol("onRequestMergeTag"), Hn = Symbol("mergeTagAutocomplete"), Un = Symbol("onRequestMedia"), Wn = Symbol("displayConditions"), Gn = Symbol("allowCustomConditions"), Kn = Symbol("capabilities"), qn = Symbol("keyboardReorder"), Jn = Symbol("accessibilityLint"), Yn = Symbol("authManager"), Xn = Symbol("aiConfig"), Zn = Symbol("comments"), Qn = Symbol("savedModulesHeadless"), $n = Symbol("scoring"), er = Symbol("cloudTranslations");
|
|
1290
|
+
function J(e, t) {
|
|
1278
1291
|
let n = o(e, null);
|
|
1279
1292
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
1280
1293
|
return n;
|
|
1281
1294
|
}
|
|
1282
1295
|
//#endregion
|
|
1296
|
+
//#region src/composables/useAccessibilityLint.ts
|
|
1297
|
+
function tr(e) {
|
|
1298
|
+
let t = n([]), r = n(!1), a = n(!1), o = R(null), s = e.options.disabled === !0, c = null;
|
|
1299
|
+
s || l();
|
|
1300
|
+
async function l() {
|
|
1301
|
+
try {
|
|
1302
|
+
o.value = (await import("./quality-C5gsx_Tw.js").then((e) => e.t)).lintAccessibility, r.value = !0, u(), c = sn(e.content, u, {
|
|
1303
|
+
debounce: e.debounce ?? 500,
|
|
1304
|
+
deep: !0
|
|
1305
|
+
});
|
|
1306
|
+
} catch {
|
|
1307
|
+
a.value = !0;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
function u() {
|
|
1311
|
+
o.value && (t.value = o.value(e.content.value, e.options));
|
|
1312
|
+
}
|
|
1313
|
+
let d = i(() => e.options, () => {
|
|
1314
|
+
o.value && u();
|
|
1315
|
+
}, { deep: !0 });
|
|
1316
|
+
function f(t) {
|
|
1317
|
+
t.fix && t.fix.apply({
|
|
1318
|
+
updateBlock: e.updateBlock,
|
|
1319
|
+
updateSettings: e.updateSettings
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
function p() {
|
|
1323
|
+
c?.(), d();
|
|
1324
|
+
}
|
|
1325
|
+
return {
|
|
1326
|
+
issues: t,
|
|
1327
|
+
ready: r,
|
|
1328
|
+
unavailable: a,
|
|
1329
|
+
applyFix: f,
|
|
1330
|
+
destroy: p
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
//#endregion
|
|
1283
1334
|
//#region src/composables/useI18n.ts
|
|
1284
|
-
function
|
|
1285
|
-
let t = e ?? o(
|
|
1335
|
+
function Y(e) {
|
|
1336
|
+
let t = e ?? o(kn, null);
|
|
1286
1337
|
if (!t) throw Error("useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.");
|
|
1287
1338
|
let n = u(t) ? t.value : t;
|
|
1288
1339
|
function r(e, t) {
|
|
@@ -1295,12 +1346,12 @@ function J(e) {
|
|
|
1295
1346
|
}
|
|
1296
1347
|
//#endregion
|
|
1297
1348
|
//#region src/utils/blockTypeLabels.ts
|
|
1298
|
-
function
|
|
1349
|
+
function nr(e, t) {
|
|
1299
1350
|
return t.blocks[e] ?? e;
|
|
1300
1351
|
}
|
|
1301
1352
|
//#endregion
|
|
1302
1353
|
//#region src/composables/useKeyboardReorder.ts
|
|
1303
|
-
function
|
|
1354
|
+
function rr(e, t) {
|
|
1304
1355
|
let r = n(null), i = n(""), a = null;
|
|
1305
1356
|
function o(t) {
|
|
1306
1357
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1327,7 +1378,7 @@ function $n(e, t) {
|
|
|
1327
1378
|
let r = o(n);
|
|
1328
1379
|
if (!r) return "";
|
|
1329
1380
|
let i = (r.sectionId ? c(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1330
|
-
return i ?
|
|
1381
|
+
return i ? nr(i.type, t.t) : "";
|
|
1331
1382
|
}
|
|
1332
1383
|
function c(t, n) {
|
|
1333
1384
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1396,13 +1447,13 @@ function $n(e, t) {
|
|
|
1396
1447
|
}
|
|
1397
1448
|
//#endregion
|
|
1398
1449
|
//#region src/composables/useUiTheme.ts
|
|
1399
|
-
function
|
|
1400
|
-
let t =
|
|
1450
|
+
function ir(e) {
|
|
1451
|
+
let t = yn("(prefers-color-scheme: dark)");
|
|
1401
1452
|
return { resolvedTheme: F(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1402
1453
|
}
|
|
1403
1454
|
//#endregion
|
|
1404
1455
|
//#region src/composables/useThemeStyles.ts
|
|
1405
|
-
var
|
|
1456
|
+
var ar = {
|
|
1406
1457
|
bg: "--tpl-bg",
|
|
1407
1458
|
bgElevated: "--tpl-bg-elevated",
|
|
1408
1459
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1426,10 +1477,10 @@ var tr = {
|
|
|
1426
1477
|
dangerLight: "--tpl-danger-light",
|
|
1427
1478
|
canvasBg: "--tpl-canvas-bg"
|
|
1428
1479
|
};
|
|
1429
|
-
function
|
|
1480
|
+
function or({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1430
1481
|
return { themeStyles: F(() => {
|
|
1431
1482
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1432
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1483
|
+
if (a) for (let [e, t] of Object.entries(ar)) {
|
|
1433
1484
|
let n = a[e];
|
|
1434
1485
|
n && (r[t] = n);
|
|
1435
1486
|
}
|
|
@@ -1438,27 +1489,27 @@ function nr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1438
1489
|
}
|
|
1439
1490
|
//#endregion
|
|
1440
1491
|
//#region src/utils/logger.ts
|
|
1441
|
-
var
|
|
1442
|
-
function
|
|
1492
|
+
var sr = "[Templatical]";
|
|
1493
|
+
function cr() {
|
|
1443
1494
|
return typeof process < "u" && !0;
|
|
1444
1495
|
}
|
|
1445
|
-
var
|
|
1496
|
+
var lr = {
|
|
1446
1497
|
warn(...e) {
|
|
1447
|
-
console.warn(
|
|
1498
|
+
console.warn(sr, ...e);
|
|
1448
1499
|
},
|
|
1449
1500
|
error(...e) {
|
|
1450
|
-
console.error(
|
|
1501
|
+
console.error(sr, ...e);
|
|
1451
1502
|
},
|
|
1452
1503
|
debug(...e) {
|
|
1453
|
-
|
|
1504
|
+
cr() || console.debug(sr, ...e);
|
|
1454
1505
|
},
|
|
1455
1506
|
info(...e) {
|
|
1456
|
-
|
|
1507
|
+
cr() || console.info(sr, ...e);
|
|
1457
1508
|
}
|
|
1458
1509
|
};
|
|
1459
1510
|
//#endregion
|
|
1460
1511
|
//#region src/composables/useBlockRegistry.ts
|
|
1461
|
-
function
|
|
1512
|
+
function ur() {
|
|
1462
1513
|
let e = R(/* @__PURE__ */ new Map());
|
|
1463
1514
|
function t(t, n) {
|
|
1464
1515
|
e.value.set(t, n), te(e);
|
|
@@ -1510,7 +1561,7 @@ function or() {
|
|
|
1510
1561
|
strictFilters: !1
|
|
1511
1562
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1512
1563
|
} catch (t) {
|
|
1513
|
-
return
|
|
1564
|
+
return lr.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
1514
1565
|
}
|
|
1515
1566
|
}
|
|
1516
1567
|
function l(t) {
|
|
@@ -1529,7 +1580,7 @@ function or() {
|
|
|
1529
1580
|
}
|
|
1530
1581
|
//#endregion
|
|
1531
1582
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1532
|
-
var
|
|
1583
|
+
var dr = [
|
|
1533
1584
|
{
|
|
1534
1585
|
type: "section",
|
|
1535
1586
|
label: "Section",
|
|
@@ -1596,8 +1647,8 @@ var sr = [
|
|
|
1596
1647
|
createBlock: ct
|
|
1597
1648
|
}
|
|
1598
1649
|
];
|
|
1599
|
-
function
|
|
1600
|
-
for (let n of
|
|
1650
|
+
function fr(e, t) {
|
|
1651
|
+
for (let n of dr) {
|
|
1601
1652
|
let r = t[n.type];
|
|
1602
1653
|
r && e.registerBuiltIn(n.type, {
|
|
1603
1654
|
component: r,
|
|
@@ -1612,18 +1663,18 @@ function cr(e, t) {
|
|
|
1612
1663
|
}
|
|
1613
1664
|
//#endregion
|
|
1614
1665
|
//#region src/utils/keyboardShortcuts.ts
|
|
1615
|
-
function
|
|
1666
|
+
function pr(e) {
|
|
1616
1667
|
let t = e.target;
|
|
1617
1668
|
return t.isContentEditable || t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT";
|
|
1618
1669
|
}
|
|
1619
|
-
function
|
|
1670
|
+
function mr(e, t) {
|
|
1620
1671
|
let n = e.metaKey || e.ctrlKey;
|
|
1621
1672
|
if (n && e.key.toLowerCase() === "s") {
|
|
1622
1673
|
e.preventDefault(), t.onSave?.();
|
|
1623
1674
|
return;
|
|
1624
1675
|
}
|
|
1625
1676
|
if (n && e.key.toLowerCase() === "z") {
|
|
1626
|
-
if (
|
|
1677
|
+
if (pr(e)) return;
|
|
1627
1678
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1628
1679
|
return;
|
|
1629
1680
|
}
|
|
@@ -1631,11 +1682,11 @@ function ur(e, t) {
|
|
|
1631
1682
|
t.selectBlock(null);
|
|
1632
1683
|
return;
|
|
1633
1684
|
}
|
|
1634
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1685
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !pr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1635
1686
|
}
|
|
1636
1687
|
//#endregion
|
|
1637
1688
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1638
|
-
var
|
|
1689
|
+
var hr = { class: "tpl:text-center" }, gr = ["href"], _r = /* @__PURE__ */ g({
|
|
1639
1690
|
__name: "ButtonBlock",
|
|
1640
1691
|
props: {
|
|
1641
1692
|
block: {},
|
|
@@ -1656,17 +1707,17 @@ var dr = { class: "tpl:text-center" }, fr = ["href"], pr = /* @__PURE__ */ g({
|
|
|
1656
1707
|
};
|
|
1657
1708
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1658
1709
|
});
|
|
1659
|
-
return (t, r) => (f(), C("div",
|
|
1710
|
+
return (t, r) => (f(), C("div", hr, [P("a", {
|
|
1660
1711
|
href: e.block.url || "#",
|
|
1661
1712
|
style: D(n.value),
|
|
1662
1713
|
class: "tpl:cursor-default",
|
|
1663
1714
|
onClick: r[0] ||= z(() => {}, ["prevent"])
|
|
1664
|
-
}, N(e.block.text), 13,
|
|
1715
|
+
}, N(e.block.text), 13, gr)]));
|
|
1665
1716
|
}
|
|
1666
|
-
}),
|
|
1667
|
-
let t =
|
|
1717
|
+
}), vr = (e) => e === "", yr = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), br = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), xr = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Sr = (e) => {
|
|
1718
|
+
let t = xr(e);
|
|
1668
1719
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1669
|
-
},
|
|
1720
|
+
}, Cr = {
|
|
1670
1721
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1671
1722
|
width: 24,
|
|
1672
1723
|
height: 24,
|
|
@@ -1676,35 +1727,35 @@ var dr = { class: "tpl:text-center" }, fr = ["href"], pr = /* @__PURE__ */ g({
|
|
|
1676
1727
|
"stroke-width": 2,
|
|
1677
1728
|
"stroke-linecap": "round",
|
|
1678
1729
|
"stroke-linejoin": "round"
|
|
1679
|
-
},
|
|
1680
|
-
function
|
|
1681
|
-
return o(
|
|
1730
|
+
}, wr = Symbol("lucide-icons");
|
|
1731
|
+
function Tr() {
|
|
1732
|
+
return o(wr, {});
|
|
1682
1733
|
}
|
|
1683
1734
|
//#endregion
|
|
1684
1735
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.14.0_vue@3.5.33_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
1685
|
-
var
|
|
1686
|
-
let { size: u, color: d, strokeWidth: f = 2, absoluteStrokeWidth: p = !1, class: m = "" } =
|
|
1687
|
-
let e =
|
|
1688
|
-
return e ? Number(t) * 24 / Number(o ?? u ??
|
|
1736
|
+
var Er = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o, color: s, ...c }, { slots: l }) => {
|
|
1737
|
+
let { size: u, color: d, strokeWidth: f = 2, absoluteStrokeWidth: p = !1, class: m = "" } = Tr(), h = F(() => {
|
|
1738
|
+
let e = vr(n) || vr(r) || n === !0 || r === !0 || p === !0, t = i || a || f || Cr["stroke-width"];
|
|
1739
|
+
return e ? Number(t) * 24 / Number(o ?? u ?? Cr.width) : t;
|
|
1689
1740
|
});
|
|
1690
1741
|
return fe("svg", {
|
|
1691
|
-
...
|
|
1742
|
+
...Cr,
|
|
1692
1743
|
...c,
|
|
1693
|
-
width: o ?? u ??
|
|
1694
|
-
height: o ?? u ??
|
|
1695
|
-
stroke: s ?? d ??
|
|
1744
|
+
width: o ?? u ?? Cr.width,
|
|
1745
|
+
height: o ?? u ?? Cr.height,
|
|
1746
|
+
stroke: s ?? d ?? Cr.stroke,
|
|
1696
1747
|
"stroke-width": h.value,
|
|
1697
|
-
class:
|
|
1748
|
+
class: yr("lucide", m, ...e ? [`lucide-${br(Sr(e))}-icon`, `lucide-${br(e)}`] : ["lucide-icon"])
|
|
1698
1749
|
}, [...t.map((e) => fe(...e)), ...l.default ? [l.default()] : []]);
|
|
1699
|
-
},
|
|
1750
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => fe(Er, {
|
|
1700
1751
|
...i,
|
|
1701
1752
|
...n,
|
|
1702
1753
|
iconNode: t,
|
|
1703
1754
|
name: e
|
|
1704
|
-
}, r),
|
|
1755
|
+
}, r), Dr = X("bookmark", [["path", {
|
|
1705
1756
|
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",
|
|
1706
1757
|
key: "oz39mx"
|
|
1707
|
-
}]]),
|
|
1758
|
+
}]]), Or = X("box", [
|
|
1708
1759
|
["path", {
|
|
1709
1760
|
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",
|
|
1710
1761
|
key: "hh9hay"
|
|
@@ -1717,22 +1768,22 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1717
1768
|
d: "M12 22V12",
|
|
1718
1769
|
key: "d0xqtd"
|
|
1719
1770
|
}]
|
|
1720
|
-
]),
|
|
1771
|
+
]), kr = X("check", [["path", {
|
|
1721
1772
|
d: "M20 6 9 17l-5-5",
|
|
1722
1773
|
key: "1gmf2c"
|
|
1723
|
-
}]]),
|
|
1774
|
+
}]]), Ar = X("chevron-down", [["path", {
|
|
1724
1775
|
d: "m6 9 6 6 6-6",
|
|
1725
1776
|
key: "qrunsl"
|
|
1726
|
-
}]]),
|
|
1777
|
+
}]]), jr = X("chevron-left", [["path", {
|
|
1727
1778
|
d: "m15 18-6-6 6-6",
|
|
1728
1779
|
key: "1wnfg3"
|
|
1729
|
-
}]]),
|
|
1780
|
+
}]]), Mr = X("chevron-right", [["path", {
|
|
1730
1781
|
d: "m9 18 6-6-6-6",
|
|
1731
1782
|
key: "mthhwq"
|
|
1732
|
-
}]]),
|
|
1783
|
+
}]]), Nr = X("chevron-up", [["path", {
|
|
1733
1784
|
d: "m18 15-6-6-6 6",
|
|
1734
1785
|
key: "153udz"
|
|
1735
|
-
}]]),
|
|
1786
|
+
}]]), Pr = X("circle-alert", [
|
|
1736
1787
|
["circle", {
|
|
1737
1788
|
cx: "12",
|
|
1738
1789
|
cy: "12",
|
|
@@ -1753,7 +1804,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1753
1804
|
y2: "16",
|
|
1754
1805
|
key: "4dfq90"
|
|
1755
1806
|
}]
|
|
1756
|
-
]),
|
|
1807
|
+
]), Fr = X("circle-check", [["circle", {
|
|
1757
1808
|
cx: "12",
|
|
1758
1809
|
cy: "12",
|
|
1759
1810
|
r: "10",
|
|
@@ -1761,7 +1812,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1761
1812
|
}], ["path", {
|
|
1762
1813
|
d: "m9 12 2 2 4-4",
|
|
1763
1814
|
key: "dzmm74"
|
|
1764
|
-
}]]),
|
|
1815
|
+
}]]), Ir = X("clock", [["circle", {
|
|
1765
1816
|
cx: "12",
|
|
1766
1817
|
cy: "12",
|
|
1767
1818
|
r: "10",
|
|
@@ -1769,13 +1820,13 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1769
1820
|
}], ["path", {
|
|
1770
1821
|
d: "M12 6v6l4 2",
|
|
1771
1822
|
key: "mmk7yg"
|
|
1772
|
-
}]]),
|
|
1823
|
+
}]]), Lr = X("code", [["path", {
|
|
1773
1824
|
d: "m16 18 6-6-6-6",
|
|
1774
1825
|
key: "eg8j8"
|
|
1775
1826
|
}], ["path", {
|
|
1776
1827
|
d: "m8 6-6 6 6 6",
|
|
1777
1828
|
key: "ppft3o"
|
|
1778
|
-
}]]),
|
|
1829
|
+
}]]), Rr = X("copy", [["rect", {
|
|
1779
1830
|
width: "14",
|
|
1780
1831
|
height: "14",
|
|
1781
1832
|
x: "8",
|
|
@@ -1786,7 +1837,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1786
1837
|
}], ["path", {
|
|
1787
1838
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1788
1839
|
key: "zix9uf"
|
|
1789
|
-
}]]),
|
|
1840
|
+
}]]), zr = X("eye-off", [
|
|
1790
1841
|
["path", {
|
|
1791
1842
|
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",
|
|
1792
1843
|
key: "ct8e1f"
|
|
@@ -1803,7 +1854,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1803
1854
|
d: "m2 2 20 20",
|
|
1804
1855
|
key: "1ooewy"
|
|
1805
1856
|
}]
|
|
1806
|
-
]),
|
|
1857
|
+
]), Br = X("eye", [["path", {
|
|
1807
1858
|
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",
|
|
1808
1859
|
key: "1nclc0"
|
|
1809
1860
|
}], ["circle", {
|
|
@@ -1811,7 +1862,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1811
1862
|
cy: "12",
|
|
1812
1863
|
r: "3",
|
|
1813
1864
|
key: "1v7zrd"
|
|
1814
|
-
}]]),
|
|
1865
|
+
}]]), Vr = X("file-image", [
|
|
1815
1866
|
["path", {
|
|
1816
1867
|
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",
|
|
1817
1868
|
key: "1oefj6"
|
|
@@ -1830,7 +1881,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1830
1881
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
1831
1882
|
key: "wt3hpn"
|
|
1832
1883
|
}]
|
|
1833
|
-
]),
|
|
1884
|
+
]), Hr = X("file-text", [
|
|
1834
1885
|
["path", {
|
|
1835
1886
|
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",
|
|
1836
1887
|
key: "1oefj6"
|
|
@@ -1851,10 +1902,10 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1851
1902
|
d: "M16 17H8",
|
|
1852
1903
|
key: "z1uh3a"
|
|
1853
1904
|
}]
|
|
1854
|
-
]),
|
|
1905
|
+
]), Ur = X("funnel", [["path", {
|
|
1855
1906
|
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",
|
|
1856
1907
|
key: "sc7q7i"
|
|
1857
|
-
}]]),
|
|
1908
|
+
}]]), Wr = X("grip-vertical", [
|
|
1858
1909
|
["circle", {
|
|
1859
1910
|
cx: "9",
|
|
1860
1911
|
cy: "12",
|
|
@@ -1891,7 +1942,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1891
1942
|
r: "1",
|
|
1892
1943
|
key: "f4zoj3"
|
|
1893
1944
|
}]
|
|
1894
|
-
]),
|
|
1945
|
+
]), Gr = X("image-up", [
|
|
1895
1946
|
["path", {
|
|
1896
1947
|
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",
|
|
1897
1948
|
key: "9csbqa"
|
|
@@ -1910,7 +1961,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1910
1961
|
r: "2",
|
|
1911
1962
|
key: "af1f0g"
|
|
1912
1963
|
}]
|
|
1913
|
-
]),
|
|
1964
|
+
]), Kr = X("image", [
|
|
1914
1965
|
["rect", {
|
|
1915
1966
|
width: "18",
|
|
1916
1967
|
height: "18",
|
|
@@ -1930,7 +1981,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1930
1981
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1931
1982
|
key: "1xmnt7"
|
|
1932
1983
|
}]
|
|
1933
|
-
]),
|
|
1984
|
+
]), qr = X("info", [
|
|
1934
1985
|
["circle", {
|
|
1935
1986
|
cx: "12",
|
|
1936
1987
|
cy: "12",
|
|
@@ -1945,31 +1996,31 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1945
1996
|
d: "M12 8h.01",
|
|
1946
1997
|
key: "e9boi3"
|
|
1947
1998
|
}]
|
|
1948
|
-
]),
|
|
1999
|
+
]), Jr = X("loader-circle", [["path", {
|
|
1949
2000
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
1950
2001
|
key: "13zald"
|
|
1951
|
-
}]]),
|
|
2002
|
+
}]]), Yr = X("message-circle", [["path", {
|
|
1952
2003
|
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",
|
|
1953
2004
|
key: "1sd12s"
|
|
1954
|
-
}]]),
|
|
2005
|
+
}]]), Xr = X("navigation", [["polygon", {
|
|
1955
2006
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1956
2007
|
key: "1ltx0t"
|
|
1957
|
-
}]]),
|
|
2008
|
+
}]]), Zr = X("pencil", [["path", {
|
|
1958
2009
|
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",
|
|
1959
2010
|
key: "1a8usu"
|
|
1960
2011
|
}], ["path", {
|
|
1961
2012
|
d: "m15 5 4 4",
|
|
1962
2013
|
key: "1mk7zo"
|
|
1963
|
-
}]]),
|
|
2014
|
+
}]]), Qr = X("puzzle", [["path", {
|
|
1964
2015
|
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",
|
|
1965
2016
|
key: "w46dr5"
|
|
1966
|
-
}]]),
|
|
2017
|
+
}]]), $r = X("redo-2", [["path", {
|
|
1967
2018
|
d: "m15 14 5-5-5-5",
|
|
1968
2019
|
key: "12vg1m"
|
|
1969
2020
|
}], ["path", {
|
|
1970
2021
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
1971
2022
|
key: "6uklza"
|
|
1972
|
-
}]]),
|
|
2023
|
+
}]]), ei = X("refresh-cw", [
|
|
1973
2024
|
["path", {
|
|
1974
2025
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
1975
2026
|
key: "v9h5vc"
|
|
@@ -1986,19 +2037,19 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1986
2037
|
d: "M8 16H3v5",
|
|
1987
2038
|
key: "1cv678"
|
|
1988
2039
|
}]
|
|
1989
|
-
]),
|
|
2040
|
+
]), ti = X("reply", [["path", {
|
|
1990
2041
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
1991
2042
|
key: "5vmcpk"
|
|
1992
2043
|
}], ["path", {
|
|
1993
2044
|
d: "m9 17-5-5 5-5",
|
|
1994
2045
|
key: "nvlc11"
|
|
1995
|
-
}]]),
|
|
2046
|
+
}]]), ni = X("send", [["path", {
|
|
1996
2047
|
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",
|
|
1997
2048
|
key: "1ffxy3"
|
|
1998
2049
|
}], ["path", {
|
|
1999
2050
|
d: "m21.854 2.147-10.94 10.939",
|
|
2000
2051
|
key: "12cjpa"
|
|
2001
|
-
}]]),
|
|
2052
|
+
}]]), ri = X("share-2", [
|
|
2002
2053
|
["circle", {
|
|
2003
2054
|
cx: "18",
|
|
2004
2055
|
cy: "5",
|
|
@@ -2031,13 +2082,13 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2031
2082
|
y2: "10.49",
|
|
2032
2083
|
key: "1n3mei"
|
|
2033
2084
|
}]
|
|
2034
|
-
]),
|
|
2085
|
+
]), ii = X("shield-check", [["path", {
|
|
2035
2086
|
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",
|
|
2036
2087
|
key: "oel41y"
|
|
2037
2088
|
}], ["path", {
|
|
2038
2089
|
d: "m9 12 2 2 4-4",
|
|
2039
2090
|
key: "dzmm74"
|
|
2040
|
-
}]]),
|
|
2091
|
+
}]]), ai = X("shield-x", [
|
|
2041
2092
|
["path", {
|
|
2042
2093
|
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",
|
|
2043
2094
|
key: "oel41y"
|
|
@@ -2050,7 +2101,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2050
2101
|
d: "m9.5 9.5 5 5",
|
|
2051
2102
|
key: "18nt4w"
|
|
2052
2103
|
}]
|
|
2053
|
-
]),
|
|
2104
|
+
]), oi = X("sparkles", [
|
|
2054
2105
|
["path", {
|
|
2055
2106
|
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",
|
|
2056
2107
|
key: "1s2grr"
|
|
@@ -2069,7 +2120,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2069
2120
|
r: "2",
|
|
2070
2121
|
key: "6kqj1y"
|
|
2071
2122
|
}]
|
|
2072
|
-
]),
|
|
2123
|
+
]), si = X("table", [
|
|
2073
2124
|
["path", {
|
|
2074
2125
|
d: "M12 3v18",
|
|
2075
2126
|
key: "108xh3"
|
|
@@ -2090,7 +2141,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2090
2141
|
d: "M3 15h18",
|
|
2091
2142
|
key: "5xshup"
|
|
2092
2143
|
}]
|
|
2093
|
-
]),
|
|
2144
|
+
]), ci = X("trash-2", [
|
|
2094
2145
|
["path", {
|
|
2095
2146
|
d: "M10 11v6",
|
|
2096
2147
|
key: "nco0om"
|
|
@@ -2111,7 +2162,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2111
2162
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2112
2163
|
key: "e791ji"
|
|
2113
2164
|
}]
|
|
2114
|
-
]),
|
|
2165
|
+
]), li = X("triangle-alert", [
|
|
2115
2166
|
["path", {
|
|
2116
2167
|
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",
|
|
2117
2168
|
key: "wmoenq"
|
|
@@ -2124,13 +2175,13 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2124
2175
|
d: "M12 17h.01",
|
|
2125
2176
|
key: "p32p05"
|
|
2126
2177
|
}]
|
|
2127
|
-
]),
|
|
2178
|
+
]), ui = X("undo-2", [["path", {
|
|
2128
2179
|
d: "M9 14 4 9l5-5",
|
|
2129
2180
|
key: "102s5s"
|
|
2130
2181
|
}], ["path", {
|
|
2131
2182
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2132
2183
|
key: "f3b9sd"
|
|
2133
|
-
}]]),
|
|
2184
|
+
}]]), di = X("upload", [
|
|
2134
2185
|
["path", {
|
|
2135
2186
|
d: "M12 3v12",
|
|
2136
2187
|
key: "1x0j5s"
|
|
@@ -2143,7 +2194,7 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2143
2194
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2144
2195
|
key: "ih7n3h"
|
|
2145
2196
|
}]
|
|
2146
|
-
]),
|
|
2197
|
+
]), fi = X("video", [["path", {
|
|
2147
2198
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2148
2199
|
key: "ftymec"
|
|
2149
2200
|
}], ["rect", {
|
|
@@ -2153,20 +2204,20 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2153
2204
|
height: "12",
|
|
2154
2205
|
rx: "2",
|
|
2155
2206
|
key: "158x01"
|
|
2156
|
-
}]]),
|
|
2207
|
+
}]]), pi = X("x", [["path", {
|
|
2157
2208
|
d: "M18 6 6 18",
|
|
2158
2209
|
key: "1bl5f8"
|
|
2159
2210
|
}], ["path", {
|
|
2160
2211
|
d: "m6 6 12 12",
|
|
2161
2212
|
key: "d8bk6v"
|
|
2162
|
-
}]]),
|
|
2213
|
+
}]]), mi = X("zap", [["path", {
|
|
2163
2214
|
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",
|
|
2164
2215
|
key: "1xq2db"
|
|
2165
|
-
}]]),
|
|
2216
|
+
}]]), hi = ["innerHTML"], gi = [
|
|
2166
2217
|
"src",
|
|
2167
2218
|
"width",
|
|
2168
2219
|
"height"
|
|
2169
|
-
],
|
|
2220
|
+
], _i = /* @__PURE__ */ g({
|
|
2170
2221
|
__name: "CustomBlockIcon",
|
|
2171
2222
|
props: {
|
|
2172
2223
|
icon: {},
|
|
@@ -2182,32 +2233,32 @@ var Sr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2182
2233
|
height: `${n.value}px`
|
|
2183
2234
|
}),
|
|
2184
2235
|
innerHTML: e.icon
|
|
2185
|
-
}, null, 12,
|
|
2236
|
+
}, null, 12, hi)) : i.value ? (f(), C("img", {
|
|
2186
2237
|
key: 1,
|
|
2187
2238
|
src: e.icon,
|
|
2188
2239
|
width: n.value,
|
|
2189
2240
|
height: n.value,
|
|
2190
2241
|
class: "tpl:inline-block",
|
|
2191
2242
|
alt: ""
|
|
2192
|
-
}, null, 8,
|
|
2243
|
+
}, null, 8, gi)) : (f(), M(w(Or), {
|
|
2193
2244
|
key: 2,
|
|
2194
2245
|
size: n.value,
|
|
2195
2246
|
"stroke-width": 1.5
|
|
2196
2247
|
}, null, 8, ["size"]));
|
|
2197
2248
|
}
|
|
2198
|
-
}),
|
|
2249
|
+
}), vi = (e, t) => {
|
|
2199
2250
|
let n = e.__vccOpts || e;
|
|
2200
2251
|
for (let [e, r] of t) n[e] = r;
|
|
2201
2252
|
return n;
|
|
2202
|
-
},
|
|
2203
|
-
function
|
|
2204
|
-
return f(), C("div",
|
|
2253
|
+
}, yi = {}, bi = { class: "tpl-loading-track" };
|
|
2254
|
+
function xi(e, t) {
|
|
2255
|
+
return f(), C("div", bi);
|
|
2205
2256
|
}
|
|
2206
|
-
var
|
|
2207
|
-
function
|
|
2257
|
+
var Si = /* @__PURE__ */ vi(yi, [["render", xi], ["__scopeId", "data-v-1ed538ec"]]), Ci = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2258
|
+
function wi(e, t) {
|
|
2208
2259
|
let n = null, r = null, a = null;
|
|
2209
2260
|
function o() {
|
|
2210
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2261
|
+
return e.value ? Array.from(e.value.querySelectorAll(Ci)).filter((e) => e.offsetParent !== null) : [];
|
|
2211
2262
|
}
|
|
2212
2263
|
function s(e) {
|
|
2213
2264
|
if (e.key !== "Tab") return;
|
|
@@ -2236,18 +2287,18 @@ function bi(e, t) {
|
|
|
2236
2287
|
}
|
|
2237
2288
|
//#endregion
|
|
2238
2289
|
//#region src/composables/useCloudI18n.ts
|
|
2239
|
-
function
|
|
2290
|
+
function Ti(e, t) {
|
|
2240
2291
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2241
2292
|
}
|
|
2242
|
-
function
|
|
2243
|
-
let t = e ?? o(
|
|
2293
|
+
function Ei(e) {
|
|
2294
|
+
let t = e ?? o(er, null);
|
|
2244
2295
|
return {
|
|
2245
2296
|
t: t ? u(t) ? t.value : t : null,
|
|
2246
|
-
format:
|
|
2297
|
+
format: Ti
|
|
2247
2298
|
};
|
|
2248
2299
|
}
|
|
2249
|
-
function
|
|
2250
|
-
let { t, format: n } =
|
|
2300
|
+
function Di(e) {
|
|
2301
|
+
let { t, format: n } = Ei(e);
|
|
2251
2302
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2252
2303
|
return {
|
|
2253
2304
|
t,
|
|
@@ -2256,8 +2307,8 @@ function Ci(e) {
|
|
|
2256
2307
|
}
|
|
2257
2308
|
//#endregion
|
|
2258
2309
|
//#region src/composables/useMergeTag.ts
|
|
2259
|
-
function
|
|
2260
|
-
let e = o(
|
|
2310
|
+
function Oi() {
|
|
2311
|
+
let e = o(zn, []), t = o(Bn, pt.liquid), r = o(Vn, null), i = o(Hn, !0), a = n(!1);
|
|
2261
2312
|
function s(e) {
|
|
2262
2313
|
return vt(e, t);
|
|
2263
2314
|
}
|
|
@@ -2286,13 +2337,13 @@ function wi() {
|
|
|
2286
2337
|
}
|
|
2287
2338
|
//#endregion
|
|
2288
2339
|
//#region src/composables/useEmoji.ts
|
|
2289
|
-
function
|
|
2290
|
-
let [e, t] =
|
|
2340
|
+
function ki() {
|
|
2341
|
+
let [e, t] = on(!1), n = R([]), r = !1;
|
|
2291
2342
|
x(() => {
|
|
2292
2343
|
r = !0;
|
|
2293
2344
|
}), i(e, async (e) => {
|
|
2294
2345
|
if (e && n.value.length === 0) {
|
|
2295
|
-
let { emojiCategories: e } = await import("./emojiData-
|
|
2346
|
+
let { emojiCategories: e } = await import("./emojiData-EMFlj6FJ.js");
|
|
2296
2347
|
if (r) return;
|
|
2297
2348
|
n.value = e;
|
|
2298
2349
|
}
|
|
@@ -2312,7 +2363,7 @@ function Ti() {
|
|
|
2312
2363
|
}
|
|
2313
2364
|
//#endregion
|
|
2314
2365
|
//#region src/composables/useDragDrop.ts
|
|
2315
|
-
function
|
|
2366
|
+
function Ai(e) {
|
|
2316
2367
|
let { onBlockMove: t, onBlockAdd: r } = e, i = n(!1), a = n(null), o = n(null);
|
|
2317
2368
|
function s(e) {
|
|
2318
2369
|
i.value = !0, a.value = e;
|
|
@@ -2362,7 +2413,7 @@ function Ei(e) {
|
|
|
2362
2413
|
}
|
|
2363
2414
|
//#endregion
|
|
2364
2415
|
//#region src/composables/useFonts.ts
|
|
2365
|
-
var
|
|
2416
|
+
var ji = [
|
|
2366
2417
|
{
|
|
2367
2418
|
value: "Arial",
|
|
2368
2419
|
label: "Arial"
|
|
@@ -2391,7 +2442,7 @@ var Di = [
|
|
|
2391
2442
|
value: "Courier New",
|
|
2392
2443
|
label: "Courier New"
|
|
2393
2444
|
}
|
|
2394
|
-
],
|
|
2445
|
+
], Mi = {
|
|
2395
2446
|
arial: "Arial, sans-serif",
|
|
2396
2447
|
helvetica: "Helvetica, sans-serif",
|
|
2397
2448
|
georgia: "Georgia, serif",
|
|
@@ -2399,14 +2450,14 @@ var Di = [
|
|
|
2399
2450
|
verdana: "Verdana, sans-serif",
|
|
2400
2451
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2401
2452
|
"courier new": "'Courier New', monospace"
|
|
2402
|
-
},
|
|
2403
|
-
function
|
|
2404
|
-
let t = n(e?.customFonts ?? []), r = n(!0), i = n(!1), a = F(() => e?.defaultFallback ??
|
|
2453
|
+
}, Ni = "Arial, sans-serif";
|
|
2454
|
+
function Pi(e) {
|
|
2455
|
+
let t = n(e?.customFonts ?? []), r = n(!0), i = n(!1), a = F(() => e?.defaultFallback ?? Ni);
|
|
2405
2456
|
function o(e) {
|
|
2406
2457
|
r.value = e;
|
|
2407
2458
|
}
|
|
2408
2459
|
let s = F(() => {
|
|
2409
|
-
let e = [...
|
|
2460
|
+
let e = [...ji];
|
|
2410
2461
|
if (!r.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2411
2462
|
let n = t.value.map((e) => ({
|
|
2412
2463
|
value: e.name,
|
|
@@ -2419,23 +2470,23 @@ function Ai(e) {
|
|
|
2419
2470
|
return s.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2420
2471
|
}
|
|
2421
2472
|
function l(e) {
|
|
2422
|
-
return
|
|
2473
|
+
return ji.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2423
2474
|
}
|
|
2424
2475
|
function u() {
|
|
2425
2476
|
if (e?.defaultFont) {
|
|
2426
|
-
if (!r.value && !l(e.defaultFont)) return
|
|
2477
|
+
if (!r.value && !l(e.defaultFont)) return Ni;
|
|
2427
2478
|
if (c(e.defaultFont)) {
|
|
2428
2479
|
let t = s.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2429
2480
|
if (t) return t.value;
|
|
2430
2481
|
}
|
|
2431
2482
|
}
|
|
2432
|
-
return
|
|
2483
|
+
return Ni;
|
|
2433
2484
|
}
|
|
2434
2485
|
let f = F(() => u());
|
|
2435
2486
|
function p(e) {
|
|
2436
2487
|
if (!e) return a.value;
|
|
2437
2488
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2438
|
-
return n ? `'${n.name}', ${n.fallback ?? a.value}` :
|
|
2489
|
+
return n ? `'${n.name}', ${n.fallback ?? a.value}` : Mi[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
|
|
2439
2490
|
}
|
|
2440
2491
|
let m = [];
|
|
2441
2492
|
async function h() {
|
|
@@ -2451,7 +2502,7 @@ function Ai(e) {
|
|
|
2451
2502
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2452
2503
|
});
|
|
2453
2504
|
} catch (t) {
|
|
2454
|
-
|
|
2505
|
+
lr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2455
2506
|
}
|
|
2456
2507
|
});
|
|
2457
2508
|
await Promise.allSettled(e), i.value = !0;
|
|
@@ -2476,9 +2527,9 @@ function Ai(e) {
|
|
|
2476
2527
|
}
|
|
2477
2528
|
//#endregion
|
|
2478
2529
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2479
|
-
function
|
|
2530
|
+
function Fi(e) {
|
|
2480
2531
|
let t = n(!1), r = n(""), i = n(null);
|
|
2481
|
-
|
|
2532
|
+
wi(i, t);
|
|
2482
2533
|
function a() {
|
|
2483
2534
|
r.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
2484
2535
|
}
|
|
@@ -2514,8 +2565,8 @@ function ji(e) {
|
|
|
2514
2565
|
}
|
|
2515
2566
|
//#endregion
|
|
2516
2567
|
//#region src/composables/useRichTextEditor.ts
|
|
2517
|
-
function
|
|
2518
|
-
let t = o(
|
|
2568
|
+
function Ii(e) {
|
|
2569
|
+
let t = o(q, null), { mergeTags: a, canRequestMergeTag: s, isRequesting: c, requestMergeTag: l, syntax: d, autocomplete: f } = Oi(), p = o(kn, null), m = (u(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = ht(d), g = R(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = Fi(g), { start: T, stop: E } = an(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), D = R(null), O = n(!0), k = n(null), A = !1;
|
|
2519
2570
|
async function j() {
|
|
2520
2571
|
k.value = null, O.value = !0;
|
|
2521
2572
|
try {
|
|
@@ -2545,7 +2596,7 @@ function Mi(e) {
|
|
|
2545
2596
|
g.value = s, O.value = !1, T();
|
|
2546
2597
|
} catch (t) {
|
|
2547
2598
|
if (A) return;
|
|
2548
|
-
|
|
2599
|
+
lr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), k.value = t instanceof Error ? t.message : "Failed to load editor", O.value = !1;
|
|
2549
2600
|
}
|
|
2550
2601
|
}
|
|
2551
2602
|
function M() {
|
|
@@ -2593,20 +2644,20 @@ function Mi(e) {
|
|
|
2593
2644
|
}
|
|
2594
2645
|
//#endregion
|
|
2595
2646
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2596
|
-
var
|
|
2647
|
+
var Li = { class: "tpl:w-full" }, Ri = {
|
|
2597
2648
|
key: 0,
|
|
2598
2649
|
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)]"
|
|
2599
|
-
},
|
|
2650
|
+
}, zi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Bi = {
|
|
2600
2651
|
key: 1,
|
|
2601
2652
|
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)]"
|
|
2602
|
-
},
|
|
2653
|
+
}, Vi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Hi = {
|
|
2603
2654
|
key: 2,
|
|
2604
2655
|
class: "tpl:relative"
|
|
2605
|
-
},
|
|
2656
|
+
}, Ui = ["innerHTML"], Wi = {
|
|
2606
2657
|
key: 0,
|
|
2607
2658
|
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]",
|
|
2608
2659
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2609
|
-
},
|
|
2660
|
+
}, Gi = /* @__PURE__ */ g({
|
|
2610
2661
|
__name: "CustomBlock",
|
|
2611
2662
|
props: {
|
|
2612
2663
|
block: {},
|
|
@@ -2614,7 +2665,7 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2614
2665
|
},
|
|
2615
2666
|
emits: ["fetchData"],
|
|
2616
2667
|
setup(e, { emit: t }) {
|
|
2617
|
-
let r = e, a = t, { t: s } =
|
|
2668
|
+
let r = e, a = t, { t: s } = Y(), c = o(Ln, null), l = n(""), u = n(!1), d = F(() => c?.getDefinition(r.block.customType)), p = F(() => !!d.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: _ } = Pt({
|
|
2618
2669
|
definition: d,
|
|
2619
2670
|
block: F(() => r.block),
|
|
2620
2671
|
onUpdate: (e, t) => {
|
|
@@ -2635,15 +2686,15 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2635
2686
|
}
|
|
2636
2687
|
}
|
|
2637
2688
|
}
|
|
2638
|
-
let y =
|
|
2689
|
+
let y = en(v, 150);
|
|
2639
2690
|
return ne(() => {
|
|
2640
2691
|
v();
|
|
2641
2692
|
}), i(() => r.block.fieldValues, () => {
|
|
2642
2693
|
y();
|
|
2643
|
-
}, { deep: !0 }), (e, t) => (f(), C("div",
|
|
2694
|
+
}, { deep: !0 }), (e, t) => (f(), C("div", Li, [p.value ? u.value ? (f(), C("div", Bi, [T(w(li), {
|
|
2644
2695
|
size: 24,
|
|
2645
2696
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2646
|
-
}), P("span",
|
|
2697
|
+
}), P("span", Vi, N(w(s).customBlocks.renderError), 1)])) : (f(), C("div", Hi, [P("div", { innerHTML: l.value }, null, 8, Ui), w(_) && w(g) ? (f(), C("div", Wi, [w(m) ? (f(), M(Si, {
|
|
2647
2698
|
key: 1,
|
|
2648
2699
|
class: "tpl:w-48"
|
|
2649
2700
|
})) : (f(), C("button", {
|
|
@@ -2651,16 +2702,16 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2651
2702
|
type: "button",
|
|
2652
2703
|
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)]",
|
|
2653
2704
|
onClick: t[0] ||= z((...e) => w(h) && w(h)(...e), ["stop"])
|
|
2654
|
-
}, [d.value?.icon ? (f(), M(
|
|
2705
|
+
}, [d.value?.icon ? (f(), M(_i, {
|
|
2655
2706
|
key: 0,
|
|
2656
2707
|
icon: d.value.icon,
|
|
2657
2708
|
size: 16
|
|
2658
|
-
}, null, 8, ["icon"])) : j("", !0), B(" " + N(d.value?.dataSource?.label || w(s).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (f(), C("div",
|
|
2709
|
+
}, null, 8, ["icon"])) : j("", !0), B(" " + N(d.value?.dataSource?.label || w(s).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (f(), C("div", Ri, [T(w(Qr), {
|
|
2659
2710
|
size: 24,
|
|
2660
2711
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2661
|
-
}), P("span",
|
|
2712
|
+
}), P("span", zi, N(w(s).customBlocks.definitionNotFound), 1)]))]));
|
|
2662
2713
|
}
|
|
2663
|
-
}),
|
|
2714
|
+
}), Ki = { class: "tpl:w-full" }, qi = /* @__PURE__ */ g({
|
|
2664
2715
|
__name: "DividerBlock",
|
|
2665
2716
|
props: {
|
|
2666
2717
|
block: {},
|
|
@@ -2672,37 +2723,37 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2672
2723
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2673
2724
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2674
2725
|
}));
|
|
2675
|
-
return (e, t) => (f(), C("div",
|
|
2726
|
+
return (e, t) => (f(), C("div", Ki, [P("hr", {
|
|
2676
2727
|
class: "tpl:m-0 tpl:border-none",
|
|
2677
2728
|
style: D(n.value)
|
|
2678
2729
|
}, null, 4)]));
|
|
2679
2730
|
}
|
|
2680
|
-
}),
|
|
2731
|
+
}), Ji = { class: "tpl:w-full" }, Yi = { 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)]" }, Xi = {
|
|
2681
2732
|
key: 0,
|
|
2682
2733
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2683
|
-
},
|
|
2734
|
+
}, Zi = {
|
|
2684
2735
|
key: 1,
|
|
2685
2736
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2686
|
-
},
|
|
2737
|
+
}, Qi = /* @__PURE__ */ g({
|
|
2687
2738
|
__name: "HtmlBlock",
|
|
2688
2739
|
props: {
|
|
2689
2740
|
block: {},
|
|
2690
2741
|
viewport: {}
|
|
2691
2742
|
},
|
|
2692
2743
|
setup(e) {
|
|
2693
|
-
let t = e, { t: n } =
|
|
2694
|
-
return (e, t) => (f(), C("div",
|
|
2744
|
+
let t = e, { t: n } = Y(), r = F(() => t.block.content.trim().length > 0);
|
|
2745
|
+
return (e, t) => (f(), C("div", Ji, [P("div", Yi, [T(w(Lr), {
|
|
2695
2746
|
size: 24,
|
|
2696
2747
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2697
|
-
}), r.value ? (f(), C("span",
|
|
2748
|
+
}), r.value ? (f(), C("span", Xi, N(w(n).html.preview), 1)) : (f(), C("span", Zi, N(w(n).html.empty), 1))])]));
|
|
2698
2749
|
}
|
|
2699
|
-
}),
|
|
2750
|
+
}), $i = ["href"], ea = ["src", "alt"], ta = ["src", "alt"], na = {
|
|
2700
2751
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2701
2752
|
style: { opacity: "0.7" }
|
|
2702
|
-
},
|
|
2753
|
+
}, ra = ["href"], ia = ["src", "alt"], aa = ["src", "alt"], oa = {
|
|
2703
2754
|
key: 3,
|
|
2704
2755
|
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)]"
|
|
2705
|
-
},
|
|
2756
|
+
}, sa = ["aria-label"], ca = { key: 1 }, la = /* @__PURE__ */ g({
|
|
2706
2757
|
__name: "ImageBlock",
|
|
2707
2758
|
props: {
|
|
2708
2759
|
block: {},
|
|
@@ -2710,7 +2761,7 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2710
2761
|
},
|
|
2711
2762
|
emits: ["update"],
|
|
2712
2763
|
setup(e, { emit: t }) {
|
|
2713
|
-
let n = e, r = t, { t: i } =
|
|
2764
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = Oi(), s = o(Un, null), c = F(() => !!s);
|
|
2714
2765
|
async function l() {
|
|
2715
2766
|
let e = await s?.({ accept: ["images"] });
|
|
2716
2767
|
if (e) {
|
|
@@ -2740,22 +2791,22 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2740
2791
|
src: e.block.placeholderUrl,
|
|
2741
2792
|
alt: e.block.alt || w(i).image.altTextPlaceholder,
|
|
2742
2793
|
style: D(d.value)
|
|
2743
|
-
}, null, 12,
|
|
2794
|
+
}, null, 12, ea)], 8, $i)) : (f(), C("img", {
|
|
2744
2795
|
key: 1,
|
|
2745
2796
|
class: "tpl:border-0",
|
|
2746
2797
|
src: e.block.placeholderUrl,
|
|
2747
2798
|
alt: e.block.alt,
|
|
2748
2799
|
style: D(d.value)
|
|
2749
|
-
}, null, 12,
|
|
2800
|
+
}, null, 12, ta))], 64)) : e.block.src && p.value ? (f(), C("div", {
|
|
2750
2801
|
key: 1,
|
|
2751
2802
|
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)]",
|
|
2752
2803
|
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
2753
|
-
}, [T(w(
|
|
2804
|
+
}, [T(w(Kr), {
|
|
2754
2805
|
size: 32,
|
|
2755
2806
|
"stroke-width": 1.5,
|
|
2756
2807
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2757
2808
|
style: { opacity: "0.5" }
|
|
2758
|
-
}), P("span",
|
|
2809
|
+
}), P("span", na, N(e.block.src), 1)], 4)) : e.block.src ? (f(), C(O, { key: 2 }, [e.block.linkUrl ? (f(), C("a", {
|
|
2759
2810
|
key: 0,
|
|
2760
2811
|
href: e.block.linkUrl,
|
|
2761
2812
|
target: "_blank",
|
|
@@ -2767,33 +2818,33 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2767
2818
|
src: e.block.src,
|
|
2768
2819
|
alt: e.block.alt || w(i).image.altTextPlaceholder,
|
|
2769
2820
|
style: D(d.value)
|
|
2770
|
-
}, null, 12,
|
|
2821
|
+
}, null, 12, ia)], 8, ra)) : (f(), C("img", {
|
|
2771
2822
|
key: 1,
|
|
2772
2823
|
class: "tpl:border-0",
|
|
2773
2824
|
src: e.block.src,
|
|
2774
2825
|
alt: e.block.alt,
|
|
2775
2826
|
style: D(d.value)
|
|
2776
|
-
}, null, 12,
|
|
2827
|
+
}, null, 12, aa))], 64)) : (f(), C("div", oa, [c.value ? (f(), C("button", {
|
|
2777
2828
|
key: 0,
|
|
2778
2829
|
"aria-label": w(i).image.browseMedia,
|
|
2779
2830
|
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)]",
|
|
2780
2831
|
onClick: z(l, ["stop"])
|
|
2781
|
-
}, [T(w(
|
|
2832
|
+
}, [T(w(Kr), {
|
|
2782
2833
|
size: 14,
|
|
2783
2834
|
"stroke-width": 1.5
|
|
2784
|
-
}), B(" " + N(w(i).image.browseMedia), 1)], 8,
|
|
2835
|
+
}), B(" " + N(w(i).image.browseMedia), 1)], 8, sa)) : (f(), C("span", ca, N(w(i).image.clickToAdd), 1))]))], 4));
|
|
2785
2836
|
}
|
|
2786
|
-
}),
|
|
2837
|
+
}), ua = { class: "tpl:w-full" }, da = ["href"], fa = {
|
|
2787
2838
|
key: 1,
|
|
2788
2839
|
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)]"
|
|
2789
|
-
},
|
|
2840
|
+
}, pa = /* @__PURE__ */ g({
|
|
2790
2841
|
__name: "MenuBlock",
|
|
2791
2842
|
props: {
|
|
2792
2843
|
block: {},
|
|
2793
2844
|
viewport: {}
|
|
2794
2845
|
},
|
|
2795
2846
|
setup(e) {
|
|
2796
|
-
let t = e, { t: n } =
|
|
2847
|
+
let t = e, { t: n } = Y(), r = F(() => ({
|
|
2797
2848
|
display: "flex",
|
|
2798
2849
|
flexWrap: "wrap",
|
|
2799
2850
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2805,7 +2856,7 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2805
2856
|
function a(e) {
|
|
2806
2857
|
return e || t.block.linkColor || t.block.color;
|
|
2807
2858
|
}
|
|
2808
|
-
return (t, o) => (f(), C("div",
|
|
2859
|
+
return (t, o) => (f(), C("div", ua, [i.value ? (f(), C("div", {
|
|
2809
2860
|
key: 0,
|
|
2810
2861
|
style: D(r.value)
|
|
2811
2862
|
}, [(f(!0), C(O, null, s(e.block.items, (t, n) => (f(), C(O, { key: t.id }, [P("a", {
|
|
@@ -2817,19 +2868,19 @@ var Ni = { class: "tpl:w-full" }, Pi = {
|
|
|
2817
2868
|
textDecoration: t.underline ? "underline" : "none"
|
|
2818
2869
|
}),
|
|
2819
2870
|
onClick: o[0] ||= z(() => {}, ["prevent"])
|
|
2820
|
-
}, N(t.text || "..."), 13,
|
|
2871
|
+
}, N(t.text || "..."), 13, da), n < e.block.items.length - 1 ? (f(), C("span", {
|
|
2821
2872
|
key: 0,
|
|
2822
2873
|
style: D({
|
|
2823
2874
|
color: e.block.separatorColor,
|
|
2824
2875
|
padding: `0 ${e.block.spacing}px`
|
|
2825
2876
|
})
|
|
2826
|
-
}, N(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), C("div",
|
|
2877
|
+
}, N(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), C("div", fa, [T(w(Xr), { size: 16 }), P("span", null, N(w(n).menu.addLinks), 1)]))]));
|
|
2827
2878
|
}
|
|
2828
2879
|
});
|
|
2829
2880
|
//#endregion
|
|
2830
2881
|
//#region src/composables/useEditableTextBlock.ts
|
|
2831
|
-
function
|
|
2832
|
-
let t = o(
|
|
2882
|
+
function ma(e) {
|
|
2883
|
+
let t = o(zn, []), { syntax: r } = Oi(), i = F(() => wt(bt(e(), t), r)), a = n(!1), s = n(null), { top: c, left: l } = wn(s), u = F(() => ({
|
|
2833
2884
|
top: c.value - 8,
|
|
2834
2885
|
left: l.value
|
|
2835
2886
|
}));
|
|
@@ -2850,14 +2901,14 @@ function ua(e) {
|
|
|
2850
2901
|
}
|
|
2851
2902
|
//#endregion
|
|
2852
2903
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2853
|
-
var
|
|
2904
|
+
var ha = ["innerHTML"], ga = /* @__PURE__ */ g({
|
|
2854
2905
|
__name: "ParagraphBlock",
|
|
2855
2906
|
props: {
|
|
2856
2907
|
block: {},
|
|
2857
2908
|
viewport: {}
|
|
2858
2909
|
},
|
|
2859
2910
|
setup(e) {
|
|
2860
|
-
let t = e, n = pe(() => import("./ParagraphEditor-
|
|
2911
|
+
let t = e, n = pe(() => import("./ParagraphEditor-7Wycs4gM.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ma(() => t.block.content);
|
|
2861
2912
|
return (t, l) => (f(), C("div", {
|
|
2862
2913
|
ref_key: "blockRef",
|
|
2863
2914
|
ref: i,
|
|
@@ -2876,19 +2927,19 @@ var da = ["innerHTML"], fa = /* @__PURE__ */ g({
|
|
|
2876
2927
|
key: 1,
|
|
2877
2928
|
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",
|
|
2878
2929
|
innerHTML: w(o)
|
|
2879
|
-
}, null, 8,
|
|
2930
|
+
}, null, 8, ha))], 544));
|
|
2880
2931
|
}
|
|
2881
2932
|
});
|
|
2882
2933
|
//#endregion
|
|
2883
2934
|
//#region src/utils/blockComponentResolver.ts
|
|
2884
|
-
function
|
|
2935
|
+
function _a(e, t, n) {
|
|
2885
2936
|
if (t) {
|
|
2886
2937
|
let n = t.getComponent(e);
|
|
2887
2938
|
if (n) return n;
|
|
2888
2939
|
}
|
|
2889
2940
|
return n[e.type] ?? null;
|
|
2890
2941
|
}
|
|
2891
|
-
function
|
|
2942
|
+
function va(e) {
|
|
2892
2943
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
2893
2944
|
return {
|
|
2894
2945
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -2898,20 +2949,20 @@ function ma(e) {
|
|
|
2898
2949
|
}
|
|
2899
2950
|
//#endregion
|
|
2900
2951
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2901
|
-
var
|
|
2952
|
+
var ya = ["data-block-id", "data-block-type"], ba = ["aria-label"], xa = [
|
|
2902
2953
|
"aria-label",
|
|
2903
2954
|
"aria-pressed",
|
|
2904
2955
|
"title"
|
|
2905
|
-
],
|
|
2956
|
+
], Sa = ["aria-label", "title"], Ca = ["aria-label", "title"], wa = ["aria-label", "title"], Ta = {
|
|
2906
2957
|
key: 1,
|
|
2907
2958
|
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"
|
|
2908
|
-
},
|
|
2959
|
+
}, Ea = { 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)]" }, Da = {
|
|
2909
2960
|
key: 2,
|
|
2910
2961
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2911
|
-
},
|
|
2962
|
+
}, Oa = ["aria-label", "title"], ka = {
|
|
2912
2963
|
key: 3,
|
|
2913
2964
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2914
|
-
},
|
|
2965
|
+
}, Aa = ["aria-label"], ja = /* @__PURE__ */ vi(/* @__PURE__ */ g({
|
|
2915
2966
|
__name: "BlockWrapper",
|
|
2916
2967
|
props: {
|
|
2917
2968
|
block: {},
|
|
@@ -2921,141 +2972,142 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
2921
2972
|
},
|
|
2922
2973
|
emits: ["select"],
|
|
2923
2974
|
setup(e, { emit: t }) {
|
|
2924
|
-
let r =
|
|
2925
|
-
async function
|
|
2926
|
-
await re(),
|
|
2975
|
+
let r = pe(() => import("./BlockA11yBadge-D73PKVS8.js")), i = e, a = t, { t: s, format: c } = Y(), u = o(qn, null), d = n(null), p = F(() => u?.liftedBlockId.value === i.block.id), m = F(() => p.value ? c(s.blockActions.dragLifted, { block: i.block.type }) : s.blockActions.drag);
|
|
2976
|
+
async function h() {
|
|
2977
|
+
await re(), d.value?.focus();
|
|
2927
2978
|
}
|
|
2928
|
-
function
|
|
2929
|
-
if (
|
|
2979
|
+
function g(e) {
|
|
2980
|
+
if (u) {
|
|
2930
2981
|
if (e.key === " " || e.key === "Enter") {
|
|
2931
|
-
e.preventDefault(), e.stopPropagation(),
|
|
2982
|
+
e.preventDefault(), e.stopPropagation(), p.value ? u.drop(i.block.id) : u.lift(i.block.id);
|
|
2932
2983
|
return;
|
|
2933
2984
|
}
|
|
2934
|
-
if (
|
|
2985
|
+
if (p.value) {
|
|
2935
2986
|
if (e.key === "Escape") {
|
|
2936
|
-
e.preventDefault(), e.stopPropagation(),
|
|
2987
|
+
e.preventDefault(), e.stopPropagation(), u.cancel(), h();
|
|
2937
2988
|
return;
|
|
2938
2989
|
}
|
|
2939
2990
|
if (e.key === "ArrowUp") {
|
|
2940
|
-
e.preventDefault(), e.stopPropagation(),
|
|
2991
|
+
e.preventDefault(), e.stopPropagation(), u.moveUp(i.block.id), h();
|
|
2941
2992
|
return;
|
|
2942
2993
|
}
|
|
2943
|
-
e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(),
|
|
2994
|
+
e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), u.moveDown(i.block.id), h());
|
|
2944
2995
|
}
|
|
2945
2996
|
}
|
|
2946
2997
|
}
|
|
2947
|
-
let
|
|
2948
|
-
desktop:
|
|
2949
|
-
tablet:
|
|
2950
|
-
mobile:
|
|
2951
|
-
}[
|
|
2952
|
-
function
|
|
2953
|
-
|
|
2954
|
-
}
|
|
2955
|
-
function A() {
|
|
2956
|
-
y?.deleteBlock(r.block.id);
|
|
2998
|
+
let _ = F(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), v = F(() => i.viewport ? {
|
|
2999
|
+
desktop: s.viewport.desktop,
|
|
3000
|
+
tablet: s.viewport.tablet,
|
|
3001
|
+
mobile: s.viewport.mobile
|
|
3002
|
+
}[i.viewport] ?? i.viewport : ""), y = F(() => !!i.block.displayCondition), b = o(jn, null), x = o(Mn, null), S = o(Kn, {}), E = F(() => !!S.savedModules), O = F(() => S.comments?.getBlockCount(i.block.id) ?? 0), k = F(() => va(i.block));
|
|
3003
|
+
function A(e) {
|
|
3004
|
+
i.previewMode || (e.stopPropagation(), a("select"));
|
|
2957
3005
|
}
|
|
2958
3006
|
function M() {
|
|
2959
|
-
|
|
3007
|
+
b?.deleteBlock(i.block.id);
|
|
2960
3008
|
}
|
|
2961
3009
|
function ee() {
|
|
2962
|
-
|
|
3010
|
+
b?.duplicateBlock(i.block);
|
|
2963
3011
|
}
|
|
2964
3012
|
function te() {
|
|
2965
|
-
|
|
3013
|
+
S.savedModules?.openSaveDialog(i.block.id);
|
|
3014
|
+
}
|
|
3015
|
+
function ne() {
|
|
3016
|
+
x?.toggleBlock(i.block.id);
|
|
2966
3017
|
}
|
|
2967
3018
|
return (t, n) => (f(), C("div", {
|
|
2968
3019
|
class: L(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
2969
3020
|
"tpl-block--selected": e.isSelected,
|
|
2970
3021
|
"tpl-block--idle": !e.isSelected,
|
|
2971
|
-
"tpl-block--lifted":
|
|
3022
|
+
"tpl-block--lifted": p.value
|
|
2972
3023
|
}]),
|
|
2973
|
-
style: D(
|
|
3024
|
+
style: D(k.value),
|
|
2974
3025
|
"data-block-id": e.block.id,
|
|
2975
3026
|
"data-block-type": e.block.type,
|
|
2976
3027
|
draggable: "false",
|
|
2977
|
-
onClick:
|
|
3028
|
+
onClick: A
|
|
2978
3029
|
}, [
|
|
3030
|
+
T(w(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2979
3031
|
e.isSelected ? (f(), C("div", {
|
|
2980
3032
|
key: 0,
|
|
2981
3033
|
role: "toolbar",
|
|
2982
|
-
"aria-label": w(
|
|
3034
|
+
"aria-label": w(s).blockActions.drag,
|
|
2983
3035
|
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)]"
|
|
2984
3036
|
}, [
|
|
2985
3037
|
P("button", {
|
|
2986
3038
|
ref_key: "dragButtonRef",
|
|
2987
|
-
ref:
|
|
3039
|
+
ref: d,
|
|
2988
3040
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150 tpl:active:cursor-grabbing",
|
|
2989
|
-
"aria-label":
|
|
2990
|
-
"aria-pressed":
|
|
3041
|
+
"aria-label": m.value,
|
|
3042
|
+
"aria-pressed": p.value,
|
|
2991
3043
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2992
|
-
title: w(
|
|
2993
|
-
onKeydown:
|
|
2994
|
-
}, [T(w(
|
|
3044
|
+
title: w(s).blockActions.drag,
|
|
3045
|
+
onKeydown: g
|
|
3046
|
+
}, [T(w(Wr), {
|
|
2995
3047
|
size: 14,
|
|
2996
3048
|
"stroke-width": 1.5
|
|
2997
|
-
})], 40,
|
|
3049
|
+
})], 40, xa),
|
|
2998
3050
|
P("button", {
|
|
2999
3051
|
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",
|
|
3000
|
-
"aria-label": w(
|
|
3001
|
-
title: w(
|
|
3002
|
-
onClick: z(
|
|
3003
|
-
}, [T(w(
|
|
3052
|
+
"aria-label": w(s).blockActions.duplicate,
|
|
3053
|
+
title: w(s).blockActions.duplicate,
|
|
3054
|
+
onClick: z(ee, ["stop"])
|
|
3055
|
+
}, [T(w(Rr), {
|
|
3004
3056
|
size: 14,
|
|
3005
3057
|
"stroke-width": 1.5
|
|
3006
|
-
})], 8,
|
|
3007
|
-
|
|
3058
|
+
})], 8, Sa),
|
|
3059
|
+
E.value ? (f(), C("button", {
|
|
3008
3060
|
key: 0,
|
|
3009
3061
|
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",
|
|
3010
|
-
"aria-label": w(
|
|
3011
|
-
title: w(
|
|
3012
|
-
onClick: z(
|
|
3013
|
-
}, [T(w(
|
|
3062
|
+
"aria-label": w(s).blockActions.saveAsModule,
|
|
3063
|
+
title: w(s).blockActions.saveAsModule,
|
|
3064
|
+
onClick: z(te, ["stop"])
|
|
3065
|
+
}, [T(w(Dr), {
|
|
3014
3066
|
size: 14,
|
|
3015
3067
|
"stroke-width": 1.5
|
|
3016
|
-
})], 8,
|
|
3068
|
+
})], 8, Ca)) : j("", !0),
|
|
3017
3069
|
P("button", {
|
|
3018
3070
|
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",
|
|
3019
|
-
"aria-label": w(
|
|
3020
|
-
title: w(
|
|
3021
|
-
onClick: z(
|
|
3022
|
-
}, [T(w(
|
|
3071
|
+
"aria-label": w(s).blockActions.delete,
|
|
3072
|
+
title: w(s).blockActions.delete,
|
|
3073
|
+
onClick: z(M, ["stop"])
|
|
3074
|
+
}, [T(w(ci), {
|
|
3023
3075
|
size: 14,
|
|
3024
3076
|
"stroke-width": 1.5
|
|
3025
|
-
})], 8,
|
|
3026
|
-
], 8,
|
|
3027
|
-
|
|
3077
|
+
})], 8, wa)
|
|
3078
|
+
], 8, ba)) : j("", !0),
|
|
3079
|
+
_.value ? (f(), C("div", Ta, [P("span", Ea, [T(w(zr), {
|
|
3028
3080
|
size: 12,
|
|
3029
3081
|
"stroke-width": 1.5
|
|
3030
|
-
}), B(" " + N(w(
|
|
3031
|
-
|
|
3082
|
+
}), B(" " + N(w(c)(w(s).blockActions.hiddenOnViewport, { viewport: v.value })), 1)])])) : j("", !0),
|
|
3083
|
+
y.value && !_.value ? (f(), C("div", Da, [P("button", {
|
|
3032
3084
|
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)]",
|
|
3033
|
-
"aria-label": w(
|
|
3085
|
+
"aria-label": w(s).blockActions.conditionToggle,
|
|
3034
3086
|
title: e.block.displayCondition?.label,
|
|
3035
|
-
onClick: z(
|
|
3036
|
-
}, [T(w(
|
|
3087
|
+
onClick: z(ne, ["stop"])
|
|
3088
|
+
}, [T(w(Ur), {
|
|
3037
3089
|
size: 12,
|
|
3038
3090
|
"stroke-width": 2
|
|
3039
|
-
})], 8,
|
|
3040
|
-
|
|
3091
|
+
})], 8, Oa)])) : j("", !0),
|
|
3092
|
+
O.value > 0 && !_.value ? (f(), C("div", ka, [P("button", {
|
|
3041
3093
|
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)]",
|
|
3042
|
-
"aria-label": w(
|
|
3043
|
-
onClick: n[0] ||= z((t) => w(
|
|
3044
|
-
}, [T(w(
|
|
3094
|
+
"aria-label": w(c)(w(s).blockActions.comments, { count: String(O.value) }),
|
|
3095
|
+
onClick: n[0] ||= z((t) => w(S).comments?.openForBlock(e.block.id), ["stop"])
|
|
3096
|
+
}, [T(w(Yr), {
|
|
3045
3097
|
size: 12,
|
|
3046
3098
|
"stroke-width": 2.5
|
|
3047
|
-
}), B(" " + N(
|
|
3099
|
+
}), B(" " + N(O.value), 1)], 8, Aa)])) : j("", !0),
|
|
3048
3100
|
l(t.$slots, "default", {}, void 0, !0)
|
|
3049
|
-
], 14,
|
|
3101
|
+
], 14, ya));
|
|
3050
3102
|
}
|
|
3051
|
-
}), [["__scopeId", "data-v-
|
|
3103
|
+
}), [["__scopeId", "data-v-850614e7"]]), Ma = ["innerHTML"], Na = /* @__PURE__ */ g({
|
|
3052
3104
|
__name: "TitleBlock",
|
|
3053
3105
|
props: {
|
|
3054
3106
|
block: {},
|
|
3055
3107
|
viewport: {}
|
|
3056
3108
|
},
|
|
3057
3109
|
setup(e) {
|
|
3058
|
-
let t = e, n = pe(() => import("./TitleEditor-
|
|
3110
|
+
let t = e, n = pe(() => import("./TitleEditor-DTF4hRB6.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ma(() => t.block.content), l = F(() => {
|
|
3059
3111
|
let e = {
|
|
3060
3112
|
fontSize: `${_e[t.block.level]}px`,
|
|
3061
3113
|
color: t.block.color,
|
|
@@ -3082,13 +3134,13 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3082
3134
|
key: 1,
|
|
3083
3135
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
|
|
3084
3136
|
innerHTML: w(o)
|
|
3085
|
-
}, null, 8,
|
|
3137
|
+
}, null, 8, Ma))], 36));
|
|
3086
3138
|
}
|
|
3087
|
-
}),
|
|
3139
|
+
}), Pa = /* @__PURE__ */ e(de(), 1), Fa = { class: "tpl:w-full" }, Ia = { class: "tpl:flex tpl:gap-0" }, La = {
|
|
3088
3140
|
key: 0,
|
|
3089
3141
|
"data-testid": "section-drop-hint",
|
|
3090
3142
|
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)]"
|
|
3091
|
-
},
|
|
3143
|
+
}, Ra = /* @__PURE__ */ g({
|
|
3092
3144
|
__name: "SectionBlock",
|
|
3093
3145
|
props: {
|
|
3094
3146
|
block: {},
|
|
@@ -3096,13 +3148,13 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3096
3148
|
},
|
|
3097
3149
|
setup(e) {
|
|
3098
3150
|
let t = {
|
|
3099
|
-
title:
|
|
3100
|
-
paragraph:
|
|
3101
|
-
image:
|
|
3102
|
-
button:
|
|
3103
|
-
divider:
|
|
3104
|
-
custom:
|
|
3105
|
-
}, n = e, { t: r } =
|
|
3151
|
+
title: Na,
|
|
3152
|
+
paragraph: ga,
|
|
3153
|
+
image: la,
|
|
3154
|
+
button: _r,
|
|
3155
|
+
divider: qi,
|
|
3156
|
+
custom: Gi
|
|
3157
|
+
}, n = e, { t: r } = Y(), i = J(q, "SectionBlock"), a = o(Mn, null), l = o(Ln, null), u = F(() => {
|
|
3106
3158
|
switch (n.block.columns) {
|
|
3107
3159
|
case "2": return ["50%", "50%"];
|
|
3108
3160
|
case "3": return [
|
|
@@ -3128,7 +3180,7 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3128
3180
|
r[e] = t, i.updateBlock(n.block.id, { children: r });
|
|
3129
3181
|
}
|
|
3130
3182
|
function g(e) {
|
|
3131
|
-
return
|
|
3183
|
+
return _a(e, l, t);
|
|
3132
3184
|
}
|
|
3133
3185
|
function _(e, t) {
|
|
3134
3186
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3136,11 +3188,11 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3136
3188
|
dataSourceFetched: t.dataSourceFetched
|
|
3137
3189
|
});
|
|
3138
3190
|
}
|
|
3139
|
-
return (t, n) => (f(), C("div",
|
|
3191
|
+
return (t, n) => (f(), C("div", Fa, [P("div", Ia, [(f(!0), C(O, null, s(d.value, (t, n) => (f(), C("div", {
|
|
3140
3192
|
key: n,
|
|
3141
3193
|
class: L(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3142
3194
|
style: D({ width: u.value[n] })
|
|
3143
|
-
}, [T(w(
|
|
3195
|
+
}, [T(w(Pa.default), {
|
|
3144
3196
|
"model-value": p(n),
|
|
3145
3197
|
group: {
|
|
3146
3198
|
name: "blocks",
|
|
@@ -3154,7 +3206,7 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3154
3206
|
class: "tpl:min-h-[60px]",
|
|
3155
3207
|
"onUpdate:modelValue": (e) => m(n, e)
|
|
3156
3208
|
}, {
|
|
3157
|
-
item: c(({ element: t }) => [v(P("div", null, [T(
|
|
3209
|
+
item: c(({ element: t }) => [v(P("div", null, [T(ja, {
|
|
3158
3210
|
block: t,
|
|
3159
3211
|
"is-selected": w(i).state.selectedBlockId === t.id,
|
|
3160
3212
|
viewport: e.viewport,
|
|
@@ -3181,9 +3233,9 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3181
3233
|
"model-value",
|
|
3182
3234
|
"group",
|
|
3183
3235
|
"onUpdate:modelValue"
|
|
3184
|
-
]), p(n).length === 0 ? (f(), C("div",
|
|
3236
|
+
]), p(n).length === 0 ? (f(), C("div", La, [P("span", null, N(w(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))])]));
|
|
3185
3237
|
}
|
|
3186
|
-
}),
|
|
3238
|
+
}), za = {
|
|
3187
3239
|
facebook: {
|
|
3188
3240
|
name: "Facebook",
|
|
3189
3241
|
color: "#1877F2",
|
|
@@ -3264,11 +3316,11 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3264
3316
|
color: "#1769FF",
|
|
3265
3317
|
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"
|
|
3266
3318
|
}
|
|
3267
|
-
},
|
|
3319
|
+
}, Ba = {
|
|
3268
3320
|
small: 24,
|
|
3269
3321
|
medium: 32,
|
|
3270
3322
|
large: 48
|
|
3271
|
-
},
|
|
3323
|
+
}, Va = [
|
|
3272
3324
|
"facebook",
|
|
3273
3325
|
"twitter",
|
|
3274
3326
|
"instagram",
|
|
@@ -3285,11 +3337,11 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3285
3337
|
"github",
|
|
3286
3338
|
"dribbble",
|
|
3287
3339
|
"behance"
|
|
3288
|
-
],
|
|
3340
|
+
], Ha = [
|
|
3289
3341
|
"width",
|
|
3290
3342
|
"height",
|
|
3291
3343
|
"fill"
|
|
3292
|
-
],
|
|
3344
|
+
], Ua = ["d"], Wa = /* @__PURE__ */ g({
|
|
3293
3345
|
__name: "SocialIconSvg",
|
|
3294
3346
|
props: {
|
|
3295
3347
|
platform: {},
|
|
@@ -3297,7 +3349,7 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3297
3349
|
iconSize: {}
|
|
3298
3350
|
},
|
|
3299
3351
|
setup(e) {
|
|
3300
|
-
let t = e, n = F(() =>
|
|
3352
|
+
let t = e, n = F(() => za[t.platform]), r = F(() => Ba[t.iconSize]), i = F(() => {
|
|
3301
3353
|
let e = {
|
|
3302
3354
|
display: "inline-flex",
|
|
3303
3355
|
alignItems: "center",
|
|
@@ -3341,25 +3393,25 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3341
3393
|
viewBox: "0 0 24 24",
|
|
3342
3394
|
fill: o.value,
|
|
3343
3395
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3344
|
-
}, [P("path", { d: n.value.path }, null, 8,
|
|
3396
|
+
}, [P("path", { d: n.value.path }, null, 8, Ua)], 8, Ha))], 4));
|
|
3345
3397
|
}
|
|
3346
|
-
}),
|
|
3398
|
+
}), Ga = { class: "tpl:w-full" }, Ka = ["href"], qa = {
|
|
3347
3399
|
key: 1,
|
|
3348
3400
|
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)]"
|
|
3349
|
-
},
|
|
3401
|
+
}, Ja = /* @__PURE__ */ g({
|
|
3350
3402
|
__name: "SocialIconsBlock",
|
|
3351
3403
|
props: {
|
|
3352
3404
|
block: {},
|
|
3353
3405
|
viewport: {}
|
|
3354
3406
|
},
|
|
3355
3407
|
setup(e) {
|
|
3356
|
-
let t = e, { t: n } =
|
|
3408
|
+
let t = e, { t: n } = Y(), r = F(() => ({
|
|
3357
3409
|
display: "flex",
|
|
3358
3410
|
flexWrap: "wrap",
|
|
3359
3411
|
gap: `${t.block.spacing}px`,
|
|
3360
3412
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3361
3413
|
})), i = F(() => t.block.icons.length > 0);
|
|
3362
|
-
return (t, a) => (f(), C("div",
|
|
3414
|
+
return (t, a) => (f(), C("div", Ga, [i.value ? (f(), C("div", {
|
|
3363
3415
|
key: 0,
|
|
3364
3416
|
style: D(r.value)
|
|
3365
3417
|
}, [(f(!0), C(O, null, s(e.block.icons, (t) => (f(), C("a", {
|
|
@@ -3367,7 +3419,7 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3367
3419
|
href: t.url || "#",
|
|
3368
3420
|
class: "tpl:cursor-default",
|
|
3369
3421
|
onClick: a[0] ||= z(() => {}, ["prevent"])
|
|
3370
|
-
}, [T(
|
|
3422
|
+
}, [T(Wa, {
|
|
3371
3423
|
platform: t.platform,
|
|
3372
3424
|
"icon-style": e.block.iconStyle,
|
|
3373
3425
|
"icon-size": e.block.iconSize
|
|
@@ -3375,53 +3427,53 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3375
3427
|
"platform",
|
|
3376
3428
|
"icon-style",
|
|
3377
3429
|
"icon-size"
|
|
3378
|
-
])], 8,
|
|
3430
|
+
])], 8, Ka))), 128))], 4)) : (f(), C("div", qa, [T(w(ri), { size: 16 }), P("span", null, N(w(n).social.addIcons), 1)]))]));
|
|
3379
3431
|
}
|
|
3380
|
-
}),
|
|
3432
|
+
}), Ya = { class: "tpl:w-full" }, Xa = {
|
|
3381
3433
|
key: 0,
|
|
3382
3434
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3383
3435
|
style: {
|
|
3384
3436
|
"background-color": "var(--tpl-bg-hover)",
|
|
3385
3437
|
color: "var(--tpl-text-dim)"
|
|
3386
3438
|
}
|
|
3387
|
-
},
|
|
3439
|
+
}, Za = /* @__PURE__ */ g({
|
|
3388
3440
|
__name: "SpacerBlock",
|
|
3389
3441
|
props: {
|
|
3390
3442
|
block: {},
|
|
3391
3443
|
viewport: {}
|
|
3392
3444
|
},
|
|
3393
3445
|
setup(e) {
|
|
3394
|
-
let t = e, n = q
|
|
3446
|
+
let t = e, n = J(q, "SpacerBlock"), r = F(() => ({
|
|
3395
3447
|
height: `${t.block.height}px`,
|
|
3396
3448
|
minHeight: `${t.block.height}px`,
|
|
3397
3449
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3398
3450
|
}));
|
|
3399
|
-
return (t, i) => (f(), C("div",
|
|
3451
|
+
return (t, i) => (f(), C("div", Ya, [P("div", {
|
|
3400
3452
|
style: D(r.value),
|
|
3401
3453
|
class: L(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !w(n).state.previewMode }])
|
|
3402
|
-
}, [w(n).state.previewMode ? j("", !0) : (f(), C("span",
|
|
3454
|
+
}, [w(n).state.previewMode ? j("", !0) : (f(), C("span", Xa, N(e.block.height) + "px ", 1))], 6)]));
|
|
3403
3455
|
}
|
|
3404
|
-
}),
|
|
3456
|
+
}), Qa = { class: "tpl:w-full" }, $a = { key: 0 }, eo = [
|
|
3405
3457
|
"aria-label",
|
|
3406
3458
|
"data-placeholder",
|
|
3407
3459
|
"onBlur",
|
|
3408
3460
|
"textContent"
|
|
3409
|
-
],
|
|
3461
|
+
], to = [
|
|
3410
3462
|
"aria-label",
|
|
3411
3463
|
"data-placeholder",
|
|
3412
3464
|
"onBlur",
|
|
3413
3465
|
"textContent"
|
|
3414
|
-
],
|
|
3466
|
+
], no = {
|
|
3415
3467
|
key: 1,
|
|
3416
3468
|
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)]"
|
|
3417
|
-
},
|
|
3469
|
+
}, ro = /* @__PURE__ */ vi(/* @__PURE__ */ g({
|
|
3418
3470
|
__name: "TableBlock",
|
|
3419
3471
|
props: {
|
|
3420
3472
|
block: {},
|
|
3421
3473
|
viewport: {}
|
|
3422
3474
|
},
|
|
3423
3475
|
setup(e) {
|
|
3424
|
-
let t = e, { t: n } =
|
|
3476
|
+
let t = e, { t: n } = Y(), r = J(q, "TableBlock"), i = F(() => t.block.rows.length > 0), a = F(() => ({
|
|
3425
3477
|
width: "100%",
|
|
3426
3478
|
borderCollapse: "collapse",
|
|
3427
3479
|
fontSize: `${t.block.fontSize}px`,
|
|
@@ -3450,11 +3502,11 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3450
3502
|
} : t);
|
|
3451
3503
|
r.updateBlock(t.block.id, { rows: o });
|
|
3452
3504
|
}
|
|
3453
|
-
return (e, t) => (f(), C("div",
|
|
3505
|
+
return (e, t) => (f(), C("div", Qa, [i.value ? (f(), C("table", {
|
|
3454
3506
|
key: 0,
|
|
3455
3507
|
style: D(a.value),
|
|
3456
3508
|
class: "tpl-table-editable"
|
|
3457
|
-
}, [l.value ? (f(), C("thead",
|
|
3509
|
+
}, [l.value ? (f(), C("thead", $a, [P("tr", null, [(f(!0), C(O, null, s(l.value.cells, (e) => (f(), C("th", {
|
|
3458
3510
|
key: e.id,
|
|
3459
3511
|
style: D(c.value),
|
|
3460
3512
|
"aria-label": w(n).table.cellPlaceholder,
|
|
@@ -3464,7 +3516,7 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3464
3516
|
onKeydown: t[0] ||= ie(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3465
3517
|
onClick: z(d, ["stop"]),
|
|
3466
3518
|
textContent: N(e.content)
|
|
3467
|
-
}, null, 44,
|
|
3519
|
+
}, null, 44, eo))), 128))])])) : j("", !0), P("tbody", null, [(f(!0), C(O, null, s(u.value, (e) => (f(), C("tr", { key: e.id }, [(f(!0), C(O, null, s(e.cells, (r) => (f(), C("td", {
|
|
3468
3520
|
key: r.id,
|
|
3469
3521
|
style: D(o.value),
|
|
3470
3522
|
"aria-label": w(n).table.cellPlaceholder,
|
|
@@ -3474,9 +3526,9 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3474
3526
|
onKeydown: t[1] ||= ie(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3475
3527
|
onClick: z(d, ["stop"]),
|
|
3476
3528
|
textContent: N(r.content)
|
|
3477
|
-
}, null, 44,
|
|
3529
|
+
}, null, 44, to))), 128))]))), 128))])], 4)) : (f(), C("div", no, [T(w(si), { size: 16 }), P("span", null, N(w(n).table.empty), 1)]))]));
|
|
3478
3530
|
}
|
|
3479
|
-
}), [["__scopeId", "data-v-dfc60174"]]),
|
|
3531
|
+
}), [["__scopeId", "data-v-dfc60174"]]), io = /* @__PURE__ */ g({
|
|
3480
3532
|
__name: "VideoPlayButton",
|
|
3481
3533
|
props: { hoverEffect: {
|
|
3482
3534
|
type: Boolean,
|
|
@@ -3494,7 +3546,7 @@ var ha = ["data-block-id", "data-block-type"], ga = ["aria-label"], _a = [
|
|
|
3494
3546
|
});
|
|
3495
3547
|
//#endregion
|
|
3496
3548
|
//#region src/utils/videoThumbnail.ts
|
|
3497
|
-
function
|
|
3549
|
+
function ao(e) {
|
|
3498
3550
|
if (!e) return {
|
|
3499
3551
|
platform: "unknown",
|
|
3500
3552
|
videoId: null,
|
|
@@ -3526,25 +3578,25 @@ function to(e) {
|
|
|
3526
3578
|
thumbnailUrl: null
|
|
3527
3579
|
};
|
|
3528
3580
|
}
|
|
3529
|
-
function
|
|
3530
|
-
return t ||
|
|
3581
|
+
function oo(e, t) {
|
|
3582
|
+
return t || ao(e).thumbnailUrl;
|
|
3531
3583
|
}
|
|
3532
3584
|
//#endregion
|
|
3533
3585
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3534
|
-
var
|
|
3586
|
+
var so = ["src", "alt"], co = {
|
|
3535
3587
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3536
3588
|
style: { opacity: "0.7" }
|
|
3537
|
-
},
|
|
3589
|
+
}, lo = ["href"], uo = ["src", "alt"], fo = ["src", "alt"], po = {
|
|
3538
3590
|
key: 3,
|
|
3539
3591
|
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)]"
|
|
3540
|
-
},
|
|
3592
|
+
}, mo = /* @__PURE__ */ g({
|
|
3541
3593
|
__name: "VideoBlock",
|
|
3542
3594
|
props: {
|
|
3543
3595
|
block: {},
|
|
3544
3596
|
viewport: {}
|
|
3545
3597
|
},
|
|
3546
3598
|
setup(e) {
|
|
3547
|
-
let t = e, { t: n } =
|
|
3599
|
+
let t = e, { t: n } = Y(), { syntax: r } = Oi(), i = F(() => xt(t.block.url, r) || xt(t.block.thumbnailUrl, r)), a = F(() => i.value ? null : oo(t.block.url, t.block.thumbnailUrl)), o = F(() => ({ textAlign: t.block.align })), s = F(() => ({
|
|
3548
3600
|
maxWidth: "100%",
|
|
3549
3601
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
3550
3602
|
display: "block",
|
|
@@ -3562,16 +3614,16 @@ var ro = ["src", "alt"], io = {
|
|
|
3562
3614
|
class: "tpl:w-full tpl:border-0",
|
|
3563
3615
|
src: e.block.placeholderUrl,
|
|
3564
3616
|
alt: e.block.alt
|
|
3565
|
-
}, null, 8,
|
|
3617
|
+
}, null, 8, so), T(io)], 4)) : i.value ? (f(), C("div", {
|
|
3566
3618
|
key: 1,
|
|
3567
3619
|
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)]",
|
|
3568
3620
|
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3569
|
-
}, [T(w(
|
|
3621
|
+
}, [T(w(fi), {
|
|
3570
3622
|
size: 36,
|
|
3571
3623
|
"stroke-width": 1.5,
|
|
3572
3624
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3573
3625
|
style: { opacity: "0.5" }
|
|
3574
|
-
}), P("span",
|
|
3626
|
+
}), P("span", co, N(c.value), 1)], 4)) : a.value ? (f(), C(O, { key: 2 }, [e.block.url ? (f(), C("a", {
|
|
3575
3627
|
key: 0,
|
|
3576
3628
|
href: e.block.url,
|
|
3577
3629
|
target: "_blank",
|
|
@@ -3583,7 +3635,7 @@ var ro = ["src", "alt"], io = {
|
|
|
3583
3635
|
class: "tpl:w-full tpl:border-0",
|
|
3584
3636
|
src: a.value,
|
|
3585
3637
|
alt: e.block.alt
|
|
3586
|
-
}, null, 8,
|
|
3638
|
+
}, null, 8, uo), T(io, { "hover-effect": "" })], 12, lo)) : (f(), C("div", {
|
|
3587
3639
|
key: 1,
|
|
3588
3640
|
class: "tpl:relative tpl:inline-block",
|
|
3589
3641
|
style: D(s.value)
|
|
@@ -3591,31 +3643,31 @@ var ro = ["src", "alt"], io = {
|
|
|
3591
3643
|
class: "tpl:w-full tpl:border-0",
|
|
3592
3644
|
src: a.value,
|
|
3593
3645
|
alt: e.block.alt
|
|
3594
|
-
}, null, 8,
|
|
3646
|
+
}, null, 8, fo), T(io)], 4))], 64)) : (f(), C("div", po, [T(w(fi), {
|
|
3595
3647
|
size: 40,
|
|
3596
3648
|
"stroke-width": 1.5,
|
|
3597
3649
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3598
3650
|
}), P("span", null, N(w(n).video.addVideo), 1)]))], 4));
|
|
3599
3651
|
}
|
|
3600
|
-
}),
|
|
3601
|
-
section:
|
|
3602
|
-
title:
|
|
3603
|
-
paragraph:
|
|
3604
|
-
image:
|
|
3605
|
-
button:
|
|
3606
|
-
divider:
|
|
3607
|
-
video:
|
|
3608
|
-
social:
|
|
3609
|
-
menu:
|
|
3610
|
-
table:
|
|
3611
|
-
spacer:
|
|
3612
|
-
html:
|
|
3613
|
-
countdown: pe(() => import("./CountdownBlock-
|
|
3652
|
+
}), ho = {
|
|
3653
|
+
section: Ra,
|
|
3654
|
+
title: Na,
|
|
3655
|
+
paragraph: ga,
|
|
3656
|
+
image: la,
|
|
3657
|
+
button: _r,
|
|
3658
|
+
divider: qi,
|
|
3659
|
+
video: mo,
|
|
3660
|
+
social: Ja,
|
|
3661
|
+
menu: pa,
|
|
3662
|
+
table: ro,
|
|
3663
|
+
spacer: Za,
|
|
3664
|
+
html: Qi,
|
|
3665
|
+
countdown: pe(() => import("./CountdownBlock-IIZk8uja.js").then((e) => e.n))
|
|
3614
3666
|
};
|
|
3615
|
-
function
|
|
3616
|
-
let { editor: t, config: r, translations: a, fontsManager: o } = e, { t: s, format: c } =
|
|
3667
|
+
function go(e) {
|
|
3668
|
+
let { editor: t, config: r, translations: a, fontsManager: o } = e, { t: s, format: c } = Y(a);
|
|
3617
3669
|
t.setUiTheme(r.uiTheme ?? "auto");
|
|
3618
|
-
let { resolvedTheme: l } =
|
|
3670
|
+
let { resolvedTheme: l } = ir(F(() => t.state.uiTheme)), u = n(r.theme ?? {}), { themeStyles: d } = or({
|
|
3619
3671
|
themeOverrides: u,
|
|
3620
3672
|
resolvedTheme: l,
|
|
3621
3673
|
extraStyles: e.themeExtraStyles
|
|
@@ -3639,16 +3691,16 @@ function fo(e) {
|
|
|
3639
3691
|
g && (_ = i(f.isNavigating, (e) => {
|
|
3640
3692
|
e ? g.pause() : g.resume();
|
|
3641
3693
|
}));
|
|
3642
|
-
let v =
|
|
3694
|
+
let v = rr(t, {
|
|
3643
3695
|
t: s,
|
|
3644
3696
|
format: c
|
|
3645
|
-
}), y =
|
|
3646
|
-
if (
|
|
3697
|
+
}), y = ur();
|
|
3698
|
+
if (fr(y, ho), r.customBlocks?.length) for (let e of r.customBlocks) y.registerCustom(e, Gi);
|
|
3647
3699
|
function b(e) {
|
|
3648
|
-
for (let t of e) y.registerCustom(t,
|
|
3700
|
+
for (let t of e) y.registerCustom(t, Gi);
|
|
3649
3701
|
}
|
|
3650
3702
|
function x(n) {
|
|
3651
|
-
|
|
3703
|
+
mr(n, {
|
|
3652
3704
|
history: f,
|
|
3653
3705
|
selectBlock: (e) => t.selectBlock(e),
|
|
3654
3706
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3657,11 +3709,18 @@ function fo(e) {
|
|
|
3657
3709
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
3658
3710
|
});
|
|
3659
3711
|
}
|
|
3660
|
-
K(document, "keydown", x), p(
|
|
3712
|
+
K(document, "keydown", x), p(kn, a), p(q, t), p(An, f), p(jn, m), p(Mn, h), p(Nn, o), p(Pn, d), p(Fn, l), p(In, r.blockDefaults), p(Ln, y), p(Rn, r.customBlocks ?? []);
|
|
3661
3713
|
let S = gt(r.mergeTags?.syntax);
|
|
3662
|
-
p(
|
|
3663
|
-
|
|
3664
|
-
|
|
3714
|
+
p(zn, r.mergeTags?.tags ?? []), p(Bn, S), p(Vn, r.mergeTags?.onRequest ?? null), p(Hn, r.mergeTags?.autocomplete !== !1), p(Un, r.onRequestMedia ?? null), p(Wn, r.displayConditions?.conditions ?? []), p(Gn, r.displayConditions?.allowCustom ?? !1), p(Kn, e.capabilities ?? {}), p(qn, v);
|
|
3715
|
+
let C = r.accessibility?.disabled === !0 ? null : tr({
|
|
3716
|
+
content: t.content,
|
|
3717
|
+
options: r.accessibility ?? {},
|
|
3718
|
+
updateBlock: t.updateBlock,
|
|
3719
|
+
updateSettings: t.updateSettings
|
|
3720
|
+
});
|
|
3721
|
+
p(Jn, C);
|
|
3722
|
+
function w() {
|
|
3723
|
+
_?.(), C?.destroy(), g?.destroy(), f.destroy();
|
|
3665
3724
|
}
|
|
3666
3725
|
return {
|
|
3667
3726
|
t: s,
|
|
@@ -3675,13 +3734,14 @@ function fo(e) {
|
|
|
3675
3734
|
themeOverrides: u,
|
|
3676
3735
|
registry: y,
|
|
3677
3736
|
keyboardReorder: v,
|
|
3737
|
+
accessibilityLint: C,
|
|
3678
3738
|
registerCustomBlocks: b,
|
|
3679
|
-
destroy:
|
|
3739
|
+
destroy: w
|
|
3680
3740
|
};
|
|
3681
3741
|
}
|
|
3682
3742
|
//#endregion
|
|
3683
3743
|
//#region ../core/src/cloud/auth.ts
|
|
3684
|
-
var
|
|
3744
|
+
var _o = class e {
|
|
3685
3745
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
3686
3746
|
accessToken = null;
|
|
3687
3747
|
expiresAt = null;
|
|
@@ -3782,8 +3842,8 @@ var po = class e {
|
|
|
3782
3842
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
3783
3843
|
}
|
|
3784
3844
|
};
|
|
3785
|
-
function
|
|
3786
|
-
return e.mode === "direct" ? new
|
|
3845
|
+
function vo(e, t) {
|
|
3846
|
+
return e.mode === "direct" ? new _o({
|
|
3787
3847
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
3788
3848
|
baseUrl: e.baseUrl,
|
|
3789
3849
|
requestOptions: {
|
|
@@ -3797,7 +3857,7 @@ function mo(e, t) {
|
|
|
3797
3857
|
}
|
|
3798
3858
|
},
|
|
3799
3859
|
onError: t
|
|
3800
|
-
}) : new
|
|
3860
|
+
}) : new _o({
|
|
3801
3861
|
url: e.url,
|
|
3802
3862
|
baseUrl: e.baseUrl,
|
|
3803
3863
|
requestOptions: e.requestOptions,
|
|
@@ -3806,54 +3866,54 @@ function mo(e, t) {
|
|
|
3806
3866
|
}
|
|
3807
3867
|
//#endregion
|
|
3808
3868
|
//#region ../core/src/cloud/url-builder.ts
|
|
3809
|
-
function
|
|
3869
|
+
function Z(e, t) {
|
|
3810
3870
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
3811
3871
|
}
|
|
3812
|
-
var
|
|
3872
|
+
var yo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${yo}/templates/{template}`, bo = `${Q}/ai`, xo = `${yo}/media`, So = `${xo}/folders`, Co = `${yo}/saved-modules`, $ = {
|
|
3813
3873
|
health: "/api/v1/health",
|
|
3814
|
-
"projects.config": `${
|
|
3815
|
-
"broadcasting.auth": `${
|
|
3816
|
-
"templates.store": `${
|
|
3817
|
-
"templates.show": `${
|
|
3818
|
-
"templates.update": `${
|
|
3819
|
-
"templates.destroy": `${
|
|
3820
|
-
"templates.export": `${
|
|
3821
|
-
"templates.importFromBeefree": `${
|
|
3822
|
-
"templates.sendTestEmail": `${
|
|
3823
|
-
"snapshots.index": `${
|
|
3824
|
-
"snapshots.store": `${
|
|
3825
|
-
"snapshots.show": `${
|
|
3826
|
-
"snapshots.restore": `${
|
|
3827
|
-
"comments.index": `${
|
|
3828
|
-
"comments.store": `${
|
|
3829
|
-
"comments.update": `${
|
|
3830
|
-
"comments.destroy": `${
|
|
3831
|
-
"comments.resolve": `${
|
|
3832
|
-
"ai.generate": `${
|
|
3833
|
-
"ai.conversationMessages": `${
|
|
3834
|
-
"ai.suggestions": `${
|
|
3835
|
-
"ai.rewriteText": `${
|
|
3836
|
-
"ai.score": `${
|
|
3837
|
-
"ai.fixFinding": `${
|
|
3838
|
-
"ai.generateFromDesign": `${
|
|
3839
|
-
"media.upload": `${
|
|
3840
|
-
"media.browse": `${
|
|
3841
|
-
"media.delete": `${
|
|
3842
|
-
"media.move": `${
|
|
3843
|
-
"media.update": `${
|
|
3844
|
-
"media.replace": `${
|
|
3845
|
-
"media.checkUsage": `${
|
|
3846
|
-
"media.frequentlyUsed": `${
|
|
3847
|
-
"media.importFromUrl": `${
|
|
3848
|
-
"folders.index": `${
|
|
3849
|
-
"folders.store": `${
|
|
3850
|
-
"folders.update": `${
|
|
3851
|
-
"folders.destroy": `${
|
|
3852
|
-
"savedModules.index": `${
|
|
3853
|
-
"savedModules.store": `${
|
|
3854
|
-
"savedModules.update": `${
|
|
3855
|
-
"savedModules.destroy": `${
|
|
3856
|
-
},
|
|
3874
|
+
"projects.config": `${yo}/config`,
|
|
3875
|
+
"broadcasting.auth": `${yo}/broadcasting/auth`,
|
|
3876
|
+
"templates.store": `${yo}/templates`,
|
|
3877
|
+
"templates.show": `${Q}`,
|
|
3878
|
+
"templates.update": `${Q}`,
|
|
3879
|
+
"templates.destroy": `${Q}`,
|
|
3880
|
+
"templates.export": `${Q}/export`,
|
|
3881
|
+
"templates.importFromBeefree": `${yo}/templates/import/from-beefree`,
|
|
3882
|
+
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
3883
|
+
"snapshots.index": `${Q}/snapshots`,
|
|
3884
|
+
"snapshots.store": `${Q}/snapshots`,
|
|
3885
|
+
"snapshots.show": `${Q}/snapshots/{snapshot}`,
|
|
3886
|
+
"snapshots.restore": `${Q}/snapshots/{snapshot}/restore`,
|
|
3887
|
+
"comments.index": `${Q}/comments`,
|
|
3888
|
+
"comments.store": `${Q}/comments`,
|
|
3889
|
+
"comments.update": `${Q}/comments/{comment}`,
|
|
3890
|
+
"comments.destroy": `${Q}/comments/{comment}`,
|
|
3891
|
+
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
3892
|
+
"ai.generate": `${bo}/generate`,
|
|
3893
|
+
"ai.conversationMessages": `${bo}/conversation-messages`,
|
|
3894
|
+
"ai.suggestions": `${bo}/suggestions`,
|
|
3895
|
+
"ai.rewriteText": `${bo}/rewrite-text`,
|
|
3896
|
+
"ai.score": `${bo}/score`,
|
|
3897
|
+
"ai.fixFinding": `${bo}/fix-finding`,
|
|
3898
|
+
"ai.generateFromDesign": `${bo}/generate-from-design`,
|
|
3899
|
+
"media.upload": `${xo}/upload`,
|
|
3900
|
+
"media.browse": `${xo}/browse`,
|
|
3901
|
+
"media.delete": `${xo}/delete`,
|
|
3902
|
+
"media.move": `${xo}/move`,
|
|
3903
|
+
"media.update": `${xo}/{media}`,
|
|
3904
|
+
"media.replace": `${xo}/{media}/replace`,
|
|
3905
|
+
"media.checkUsage": `${xo}/check-usage`,
|
|
3906
|
+
"media.frequentlyUsed": `${xo}/frequently-used`,
|
|
3907
|
+
"media.importFromUrl": `${xo}/import-from-url`,
|
|
3908
|
+
"folders.index": `${So}`,
|
|
3909
|
+
"folders.store": `${So}`,
|
|
3910
|
+
"folders.update": `${So}/{mediaFolder}`,
|
|
3911
|
+
"folders.destroy": `${So}/{mediaFolder}`,
|
|
3912
|
+
"savedModules.index": `${Co}`,
|
|
3913
|
+
"savedModules.store": `${Co}`,
|
|
3914
|
+
"savedModules.update": `${Co}/{savedModule}`,
|
|
3915
|
+
"savedModules.destroy": `${Co}/{savedModule}`
|
|
3916
|
+
}, wo = class {
|
|
3857
3917
|
constructor(e) {
|
|
3858
3918
|
this.authManager = e;
|
|
3859
3919
|
}
|
|
@@ -3892,19 +3952,19 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
3892
3952
|
return e.message;
|
|
3893
3953
|
}
|
|
3894
3954
|
async createTemplate(e) {
|
|
3895
|
-
return this.request(
|
|
3955
|
+
return this.request(Z($["templates.store"], this.baseParams), {
|
|
3896
3956
|
method: "POST",
|
|
3897
3957
|
body: JSON.stringify({ content: e })
|
|
3898
3958
|
});
|
|
3899
3959
|
}
|
|
3900
3960
|
async getTemplate(e) {
|
|
3901
|
-
return this.request(
|
|
3961
|
+
return this.request(Z($["templates.show"], {
|
|
3902
3962
|
...this.baseParams,
|
|
3903
3963
|
template: e
|
|
3904
3964
|
}));
|
|
3905
3965
|
}
|
|
3906
3966
|
async updateTemplate(e, t) {
|
|
3907
|
-
return this.request(
|
|
3967
|
+
return this.request(Z($["templates.update"], {
|
|
3908
3968
|
...this.baseParams,
|
|
3909
3969
|
template: e
|
|
3910
3970
|
}), {
|
|
@@ -3913,7 +3973,7 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
3913
3973
|
});
|
|
3914
3974
|
}
|
|
3915
3975
|
async createSnapshot(e, t) {
|
|
3916
|
-
return this.request(
|
|
3976
|
+
return this.request(Z($["snapshots.store"], {
|
|
3917
3977
|
...this.baseParams,
|
|
3918
3978
|
template: e
|
|
3919
3979
|
}), {
|
|
@@ -3922,19 +3982,19 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
3922
3982
|
});
|
|
3923
3983
|
}
|
|
3924
3984
|
async deleteTemplate(e) {
|
|
3925
|
-
return this.request(
|
|
3985
|
+
return this.request(Z($["templates.destroy"], {
|
|
3926
3986
|
...this.baseParams,
|
|
3927
3987
|
template: e
|
|
3928
3988
|
}), { method: "DELETE" });
|
|
3929
3989
|
}
|
|
3930
3990
|
async getSnapshots(e) {
|
|
3931
|
-
return this.request(
|
|
3991
|
+
return this.request(Z($["snapshots.index"], {
|
|
3932
3992
|
...this.baseParams,
|
|
3933
3993
|
template: e
|
|
3934
3994
|
}));
|
|
3935
3995
|
}
|
|
3936
3996
|
async restoreSnapshot(e, t) {
|
|
3937
|
-
return this.request(
|
|
3997
|
+
return this.request(Z($["snapshots.restore"], {
|
|
3938
3998
|
...this.baseParams,
|
|
3939
3999
|
template: e,
|
|
3940
4000
|
snapshot: t
|
|
@@ -3945,7 +4005,7 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
3945
4005
|
custom_fonts: t.customFonts,
|
|
3946
4006
|
default_fallback: t.defaultFallback
|
|
3947
4007
|
}) : void 0;
|
|
3948
|
-
return this.request(
|
|
4008
|
+
return this.request(Z($["templates.export"], {
|
|
3949
4009
|
...this.baseParams,
|
|
3950
4010
|
template: e
|
|
3951
4011
|
}), {
|
|
@@ -3954,7 +4014,7 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
3954
4014
|
});
|
|
3955
4015
|
}
|
|
3956
4016
|
async sendTestEmail(e, t) {
|
|
3957
|
-
await this.request(
|
|
4017
|
+
await this.request(Z($["templates.sendTestEmail"], {
|
|
3958
4018
|
...this.baseParams,
|
|
3959
4019
|
template: e
|
|
3960
4020
|
}), {
|
|
@@ -3963,11 +4023,11 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
3963
4023
|
});
|
|
3964
4024
|
}
|
|
3965
4025
|
commentsUrl(e, t) {
|
|
3966
|
-
return t ?
|
|
4026
|
+
return t ? Z($["comments.update"], {
|
|
3967
4027
|
...this.baseParams,
|
|
3968
4028
|
template: e,
|
|
3969
4029
|
comment: t
|
|
3970
|
-
}) :
|
|
4030
|
+
}) : Z($["comments.index"], {
|
|
3971
4031
|
...this.baseParams,
|
|
3972
4032
|
template: e
|
|
3973
4033
|
});
|
|
@@ -3997,7 +4057,7 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
3997
4057
|
});
|
|
3998
4058
|
}
|
|
3999
4059
|
async resolveComment(e, t, n, r) {
|
|
4000
|
-
return this.request(
|
|
4060
|
+
return this.request(Z($["comments.resolve"], {
|
|
4001
4061
|
...this.baseParams,
|
|
4002
4062
|
template: e,
|
|
4003
4063
|
comment: t
|
|
@@ -4008,20 +4068,20 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
4008
4068
|
});
|
|
4009
4069
|
}
|
|
4010
4070
|
async fetchConfig() {
|
|
4011
|
-
return this.request(
|
|
4071
|
+
return this.request(Z($["projects.config"], this.baseParams));
|
|
4012
4072
|
}
|
|
4013
4073
|
async listModules(e) {
|
|
4014
|
-
let t =
|
|
4074
|
+
let t = Z($["savedModules.index"], this.baseParams), n = e ? `?search=${encodeURIComponent(e)}` : "";
|
|
4015
4075
|
return this.request(`${t}${n}`);
|
|
4016
4076
|
}
|
|
4017
4077
|
async createModule(e) {
|
|
4018
|
-
return this.request(
|
|
4078
|
+
return this.request(Z($["savedModules.store"], this.baseParams), {
|
|
4019
4079
|
method: "POST",
|
|
4020
4080
|
body: JSON.stringify(e)
|
|
4021
4081
|
});
|
|
4022
4082
|
}
|
|
4023
4083
|
async updateModule(e, t) {
|
|
4024
|
-
return this.request(
|
|
4084
|
+
return this.request(Z($["savedModules.update"], {
|
|
4025
4085
|
...this.baseParams,
|
|
4026
4086
|
savedModule: e
|
|
4027
4087
|
}), {
|
|
@@ -4030,7 +4090,7 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
4030
4090
|
});
|
|
4031
4091
|
}
|
|
4032
4092
|
async deleteModule(e) {
|
|
4033
|
-
return this.request(
|
|
4093
|
+
return this.request(Z($["savedModules.destroy"], {
|
|
4034
4094
|
...this.baseParams,
|
|
4035
4095
|
savedModule: e
|
|
4036
4096
|
}), { method: "DELETE" });
|
|
@@ -4038,14 +4098,14 @@ var ho = "/api/v1/projects/{project}/tenants/{tenant}", Z = `${ho}/templates/{te
|
|
|
4038
4098
|
};
|
|
4039
4099
|
//#endregion
|
|
4040
4100
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4041
|
-
function
|
|
4101
|
+
function To(e) {
|
|
4042
4102
|
return {
|
|
4043
4103
|
host: e.host,
|
|
4044
4104
|
port: e.port,
|
|
4045
4105
|
appKey: e.app_key
|
|
4046
4106
|
};
|
|
4047
4107
|
}
|
|
4048
|
-
var
|
|
4108
|
+
var Eo = class {
|
|
4049
4109
|
pusher = null;
|
|
4050
4110
|
authManager;
|
|
4051
4111
|
config;
|
|
@@ -4061,7 +4121,7 @@ var xo = class {
|
|
|
4061
4121
|
} catch {
|
|
4062
4122
|
throw Error("Cloud features require the optional peer dependency 'pusher-js'. Install it with: npm install pusher-js");
|
|
4063
4123
|
}
|
|
4064
|
-
let { host: n, port: r, appKey: i } = this.config, a = this.authManager.resolveUrl(
|
|
4124
|
+
let { host: n, port: r, appKey: i } = this.config, a = this.authManager.resolveUrl(Z($["broadcasting.auth"], {
|
|
4065
4125
|
project: this.authManager.projectId,
|
|
4066
4126
|
tenant: this.authManager.tenantSlug
|
|
4067
4127
|
}));
|
|
@@ -4112,7 +4172,7 @@ var xo = class {
|
|
|
4112
4172
|
};
|
|
4113
4173
|
//#endregion
|
|
4114
4174
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4115
|
-
function
|
|
4175
|
+
function Do(e, t) {
|
|
4116
4176
|
let { operation: n, data: r } = t;
|
|
4117
4177
|
switch (n) {
|
|
4118
4178
|
case "add_block":
|
|
@@ -4140,8 +4200,8 @@ function So(e, t) {
|
|
|
4140
4200
|
}
|
|
4141
4201
|
//#endregion
|
|
4142
4202
|
//#region ../core/src/cloud/editor.ts
|
|
4143
|
-
function
|
|
4144
|
-
let t = new
|
|
4203
|
+
function Oo(e) {
|
|
4204
|
+
let t = new wo(e.authManager), n = S({
|
|
4145
4205
|
template: null,
|
|
4146
4206
|
content: qe(e.defaultFontFamily, e.templateDefaults),
|
|
4147
4207
|
selectedBlockId: null,
|
|
@@ -4326,11 +4386,11 @@ function Co(e) {
|
|
|
4326
4386
|
}
|
|
4327
4387
|
//#endregion
|
|
4328
4388
|
//#region ../core/src/cloud/ai-chat.ts
|
|
4329
|
-
var
|
|
4330
|
-
function
|
|
4331
|
-
return `msg_${Date.now()}_${++
|
|
4389
|
+
var ko = 0;
|
|
4390
|
+
function Ao() {
|
|
4391
|
+
return `msg_${Date.now()}_${++ko}`;
|
|
4332
4392
|
}
|
|
4333
|
-
function
|
|
4393
|
+
function jo(e) {
|
|
4334
4394
|
let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n([]), s = n(!1), c = n(!1), l = n(null), u = n(null), d = n(null), f = n(null), p = n(null), m = n(null), h = n(!1), g = n([]), _ = n(!1);
|
|
4335
4395
|
function v(e, t) {
|
|
4336
4396
|
let n = o.value.findIndex((t) => t.id === e);
|
|
@@ -4350,7 +4410,7 @@ function Eo(e) {
|
|
|
4350
4410
|
if (e) {
|
|
4351
4411
|
c.value = !0;
|
|
4352
4412
|
try {
|
|
4353
|
-
let n =
|
|
4413
|
+
let n = Z($["ai.conversationMessages"], {
|
|
4354
4414
|
project: t.projectId,
|
|
4355
4415
|
tenant: t.tenantSlug,
|
|
4356
4416
|
template: e
|
|
@@ -4376,7 +4436,7 @@ function Eo(e) {
|
|
|
4376
4436
|
if (i) {
|
|
4377
4437
|
_.value = !0;
|
|
4378
4438
|
try {
|
|
4379
|
-
let r =
|
|
4439
|
+
let r = Z($["ai.suggestions"], {
|
|
4380
4440
|
project: t.projectId,
|
|
4381
4441
|
tenant: t.tenantSlug,
|
|
4382
4442
|
template: i
|
|
@@ -4424,14 +4484,14 @@ function Eo(e) {
|
|
|
4424
4484
|
let _ = r();
|
|
4425
4485
|
if (!_) throw Error("Template must be saved before using AI generation");
|
|
4426
4486
|
s.value = !0, l.value = null, u.value = null, g.value = [];
|
|
4427
|
-
let y =
|
|
4487
|
+
let y = Ao();
|
|
4428
4488
|
o.value = [...o.value, {
|
|
4429
4489
|
id: y,
|
|
4430
4490
|
role: "user",
|
|
4431
4491
|
content: e,
|
|
4432
4492
|
timestamp: Date.now()
|
|
4433
4493
|
}];
|
|
4434
|
-
let b =
|
|
4494
|
+
let b = Ao();
|
|
4435
4495
|
o.value = [...o.value, {
|
|
4436
4496
|
id: b,
|
|
4437
4497
|
role: "assistant",
|
|
@@ -4439,7 +4499,7 @@ function Eo(e) {
|
|
|
4439
4499
|
timestamp: Date.now()
|
|
4440
4500
|
}];
|
|
4441
4501
|
try {
|
|
4442
|
-
let r =
|
|
4502
|
+
let r = Z($["ai.generate"], {
|
|
4443
4503
|
project: t.projectId,
|
|
4444
4504
|
tenant: t.tenantSlug,
|
|
4445
4505
|
template: _
|
|
@@ -4518,7 +4578,7 @@ function Eo(e) {
|
|
|
4518
4578
|
}
|
|
4519
4579
|
//#endregion
|
|
4520
4580
|
//#region ../core/src/cloud/ai-config.ts
|
|
4521
|
-
function
|
|
4581
|
+
function Mo(e) {
|
|
4522
4582
|
function t(t) {
|
|
4523
4583
|
return e === !1 ? !1 : e?.[t] !== !1;
|
|
4524
4584
|
}
|
|
@@ -4529,14 +4589,14 @@ function Do(e) {
|
|
|
4529
4589
|
}
|
|
4530
4590
|
//#endregion
|
|
4531
4591
|
//#region ../core/src/cloud/template-scoring.ts
|
|
4532
|
-
function
|
|
4592
|
+
function No(e) {
|
|
4533
4593
|
let { authManager: t, getTemplateId: r } = e, i = n(!1), a = n(null), o = n(null), s = n(null), c = n(""), l = n(null);
|
|
4534
4594
|
async function u(e, n) {
|
|
4535
4595
|
let s = r();
|
|
4536
4596
|
if (!s) return null;
|
|
4537
4597
|
i.value = !0, o.value = null, a.value = null;
|
|
4538
4598
|
try {
|
|
4539
|
-
let r =
|
|
4599
|
+
let r = Z($["ai.score"], {
|
|
4540
4600
|
project: t.projectId,
|
|
4541
4601
|
tenant: t.tenantSlug,
|
|
4542
4602
|
template: s
|
|
@@ -4593,7 +4653,7 @@ function Oo(e) {
|
|
|
4593
4653
|
if (!a) return null;
|
|
4594
4654
|
s.value = n.id, c.value = "", l.value = null;
|
|
4595
4655
|
try {
|
|
4596
|
-
let r =
|
|
4656
|
+
let r = Z($["ai.fixFinding"], {
|
|
4597
4657
|
project: t.projectId,
|
|
4598
4658
|
tenant: t.tenantSlug,
|
|
4599
4659
|
template: a
|
|
@@ -4674,7 +4734,7 @@ function Oo(e) {
|
|
|
4674
4734
|
}
|
|
4675
4735
|
//#endregion
|
|
4676
4736
|
//#region ../core/src/cloud/design-reference.ts
|
|
4677
|
-
function
|
|
4737
|
+
function Po(e) {
|
|
4678
4738
|
let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n(!1), s = n(null);
|
|
4679
4739
|
async function c(e) {
|
|
4680
4740
|
let n = r();
|
|
@@ -4683,7 +4743,7 @@ function ko(e) {
|
|
|
4683
4743
|
try {
|
|
4684
4744
|
let r = new FormData();
|
|
4685
4745
|
e.prompt && r.append("prompt", e.prompt), e.imageUpload && r.append("image_upload", e.imageUpload), e.pdfUpload && r.append("pdf_upload", e.pdfUpload);
|
|
4686
|
-
let a =
|
|
4746
|
+
let a = Z($["ai.generateFromDesign"], {
|
|
4687
4747
|
project: t.projectId,
|
|
4688
4748
|
tenant: t.tenantSlug,
|
|
4689
4749
|
template: n
|
|
@@ -4737,8 +4797,8 @@ function ko(e) {
|
|
|
4737
4797
|
}
|
|
4738
4798
|
//#endregion
|
|
4739
4799
|
//#region ../core/src/cloud/comments.ts
|
|
4740
|
-
function
|
|
4741
|
-
let { authManager: t, getTemplateId: r, getSocketId: i, onComment: a, onError: o, hasCommentingFeature: s } = e, c = new
|
|
4800
|
+
function Fo(e) {
|
|
4801
|
+
let { authManager: t, getTemplateId: r, getSocketId: i, onComment: a, onError: o, hasCommentingFeature: s } = e, c = new wo(t), l = n([]), u = n(!1), d = n(!1), f = F(() => (s?.() ?? !1) && t.userConfig !== null), p = F(() => {
|
|
4742
4802
|
let e = 0;
|
|
4743
4803
|
for (let t of l.value) e += 1 + (t.replies?.length ?? 0);
|
|
4744
4804
|
return e;
|
|
@@ -4937,15 +4997,15 @@ function Ao(e) {
|
|
|
4937
4997
|
}
|
|
4938
4998
|
//#endregion
|
|
4939
4999
|
//#region ../core/src/cloud/comment-listener.ts
|
|
4940
|
-
function
|
|
5000
|
+
function Io(e) {
|
|
4941
5001
|
let { comments: t, channel: n } = e;
|
|
4942
5002
|
i(n, (e, n) => {
|
|
4943
5003
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
4944
|
-
|
|
5004
|
+
Lo(t, e);
|
|
4945
5005
|
});
|
|
4946
5006
|
});
|
|
4947
5007
|
}
|
|
4948
|
-
function
|
|
5008
|
+
function Lo(e, t) {
|
|
4949
5009
|
switch (t.action) {
|
|
4950
5010
|
case "comment_created":
|
|
4951
5011
|
e.applyRemoteCreate(t.comment);
|
|
@@ -4964,7 +5024,7 @@ function Mo(e, t) {
|
|
|
4964
5024
|
}
|
|
4965
5025
|
//#endregion
|
|
4966
5026
|
//#region ../core/src/cloud/collaboration.ts
|
|
4967
|
-
var
|
|
5027
|
+
var Ro = [
|
|
4968
5028
|
"#3b82f6",
|
|
4969
5029
|
"#ef4444",
|
|
4970
5030
|
"#10b981",
|
|
@@ -4976,10 +5036,10 @@ var No = [
|
|
|
4976
5036
|
"#6366f1",
|
|
4977
5037
|
"#14b8a6"
|
|
4978
5038
|
];
|
|
4979
|
-
function
|
|
5039
|
+
function zo(e) {
|
|
4980
5040
|
let { authManager: t, editor: r, channel: a } = e, o = n([]), s = n(/* @__PURE__ */ new Map()), c = 0, l = !1, u = F(() => t.userConfig?.id ?? "");
|
|
4981
5041
|
function d() {
|
|
4982
|
-
let e =
|
|
5042
|
+
let e = Ro[c % Ro.length];
|
|
4983
5043
|
return c++, e;
|
|
4984
5044
|
}
|
|
4985
5045
|
function f(e) {
|
|
@@ -5021,7 +5081,7 @@ function Po(e) {
|
|
|
5021
5081
|
function g(e) {
|
|
5022
5082
|
l = !0;
|
|
5023
5083
|
try {
|
|
5024
|
-
|
|
5084
|
+
Do(r, e);
|
|
5025
5085
|
} finally {
|
|
5026
5086
|
l = !1;
|
|
5027
5087
|
}
|
|
@@ -5081,7 +5141,7 @@ function Po(e) {
|
|
|
5081
5141
|
}
|
|
5082
5142
|
//#endregion
|
|
5083
5143
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5084
|
-
function
|
|
5144
|
+
function Bo(e, t) {
|
|
5085
5145
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5086
5146
|
e.addBlock = (e, r, i) => {
|
|
5087
5147
|
n(e, r, i), t._broadcastOperation({
|
|
@@ -5135,11 +5195,11 @@ function Fo(e, t) {
|
|
|
5135
5195
|
}
|
|
5136
5196
|
//#endregion
|
|
5137
5197
|
//#region ../core/src/cloud/web-socket.ts
|
|
5138
|
-
function
|
|
5198
|
+
function Vo(e) {
|
|
5139
5199
|
let { authManager: t, onError: r } = e, i = n(null), a = n(!1), o = null, s = null;
|
|
5140
5200
|
async function c(e, n) {
|
|
5141
5201
|
if (o) return;
|
|
5142
|
-
o = new
|
|
5202
|
+
o = new Eo({
|
|
5143
5203
|
authManager: t,
|
|
5144
5204
|
config: n,
|
|
5145
5205
|
onError: r
|
|
@@ -5167,8 +5227,8 @@ function Io(e) {
|
|
|
5167
5227
|
}
|
|
5168
5228
|
//#endregion
|
|
5169
5229
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5170
|
-
function
|
|
5171
|
-
let t = new
|
|
5230
|
+
function Ho(e) {
|
|
5231
|
+
let t = new wo(e.authManager), r = n([]), i = n(!1);
|
|
5172
5232
|
async function a(n) {
|
|
5173
5233
|
i.value = !0;
|
|
5174
5234
|
try {
|
|
@@ -5216,8 +5276,8 @@ function Lo(e) {
|
|
|
5216
5276
|
}
|
|
5217
5277
|
//#endregion
|
|
5218
5278
|
//#region ../core/src/cloud/snapshots.ts
|
|
5219
|
-
function
|
|
5220
|
-
let t = new
|
|
5279
|
+
function Uo(e) {
|
|
5280
|
+
let t = new wo(e.authManager), r = n([]), i = n(!1), a = n(!1);
|
|
5221
5281
|
async function o() {
|
|
5222
5282
|
i.value = !0;
|
|
5223
5283
|
try {
|
|
@@ -5249,8 +5309,8 @@ function Ro(e) {
|
|
|
5249
5309
|
}
|
|
5250
5310
|
//#endregion
|
|
5251
5311
|
//#region ../core/src/cloud/test-email.ts
|
|
5252
|
-
function
|
|
5253
|
-
let { authManager: t, getTemplateId: r, save: a, exportHtml: o, onError: s, isAuthReady: c, onBeforeTestEmail: l } = e, u = new
|
|
5312
|
+
function Wo(e) {
|
|
5313
|
+
let { authManager: t, getTemplateId: r, save: a, exportHtml: o, onError: s, isAuthReady: c, onBeforeTestEmail: l } = e, u = new wo(t), d = n(!1), f = n(null), p = n(null);
|
|
5254
5314
|
c && i(c, (e) => {
|
|
5255
5315
|
e && (p.value = t.testEmailConfig);
|
|
5256
5316
|
}, { immediate: !0 });
|
|
@@ -5286,8 +5346,8 @@ function zo(e) {
|
|
|
5286
5346
|
}
|
|
5287
5347
|
//#endregion
|
|
5288
5348
|
//#region ../core/src/cloud/export.ts
|
|
5289
|
-
function
|
|
5290
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
5349
|
+
function Go(e) {
|
|
5350
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new wo(t);
|
|
5291
5351
|
function a() {
|
|
5292
5352
|
let e = n?.();
|
|
5293
5353
|
return {
|
|
@@ -5313,8 +5373,8 @@ function Bo(e) {
|
|
|
5313
5373
|
}
|
|
5314
5374
|
//#endregion
|
|
5315
5375
|
//#region ../core/src/cloud/plan-config.ts
|
|
5316
|
-
function
|
|
5317
|
-
let { authManager: t, onError: r } = e, i = n(null), a = n(!1), o = new
|
|
5376
|
+
function Ko(e) {
|
|
5377
|
+
let { authManager: t, onError: r } = e, i = n(null), a = n(!1), o = new wo(t), s = F(() => i.value?.features ?? null);
|
|
5318
5378
|
function c(e) {
|
|
5319
5379
|
return i.value?.features[e] ?? !1;
|
|
5320
5380
|
}
|
|
@@ -5340,11 +5400,11 @@ function Vo(e) {
|
|
|
5340
5400
|
}
|
|
5341
5401
|
//#endregion
|
|
5342
5402
|
//#region ../core/src/cloud/health-check.ts
|
|
5343
|
-
var
|
|
5344
|
-
function
|
|
5403
|
+
var qo = 5e3;
|
|
5404
|
+
function Jo(e) {
|
|
5345
5405
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
5346
5406
|
}
|
|
5347
|
-
async function
|
|
5407
|
+
async function Yo(e, t) {
|
|
5348
5408
|
let n = performance.now();
|
|
5349
5409
|
try {
|
|
5350
5410
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -5396,7 +5456,7 @@ async function Wo(e, t) {
|
|
|
5396
5456
|
};
|
|
5397
5457
|
}
|
|
5398
5458
|
}
|
|
5399
|
-
async function
|
|
5459
|
+
async function Xo(e) {
|
|
5400
5460
|
if (!e?.host || !e?.app_key) return {
|
|
5401
5461
|
ok: !1,
|
|
5402
5462
|
error: "WebSocket configuration not available"
|
|
@@ -5412,7 +5472,7 @@ async function Go(e) {
|
|
|
5412
5472
|
ok: !1,
|
|
5413
5473
|
error: "WebSocket connection timed out"
|
|
5414
5474
|
});
|
|
5415
|
-
},
|
|
5475
|
+
}, qo), r = new WebSocket(t);
|
|
5416
5476
|
r.onopen = () => {
|
|
5417
5477
|
clearTimeout(n), r.close(), e({ ok: !0 });
|
|
5418
5478
|
}, r.onerror = () => {
|
|
@@ -5423,8 +5483,8 @@ async function Go(e) {
|
|
|
5423
5483
|
};
|
|
5424
5484
|
});
|
|
5425
5485
|
}
|
|
5426
|
-
async function
|
|
5427
|
-
let t = await
|
|
5486
|
+
async function Zo(e = {}) {
|
|
5487
|
+
let t = await Yo(Jo(e), e.authManager), n = await Xo(t.wsConfig);
|
|
5428
5488
|
return {
|
|
5429
5489
|
api: t.api,
|
|
5430
5490
|
websocket: n,
|
|
@@ -5434,17 +5494,17 @@ async function Ko(e = {}) {
|
|
|
5434
5494
|
}
|
|
5435
5495
|
//#endregion
|
|
5436
5496
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5437
|
-
function
|
|
5497
|
+
function Qo(e) {
|
|
5438
5498
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5439
5499
|
i(n, (e, n) => {
|
|
5440
5500
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5441
|
-
|
|
5501
|
+
Do(t, e), r?.(e);
|
|
5442
5502
|
});
|
|
5443
5503
|
});
|
|
5444
5504
|
}
|
|
5445
5505
|
//#endregion
|
|
5446
5506
|
//#region src/composables/useAliveFlag.ts
|
|
5447
|
-
function
|
|
5507
|
+
function $o() {
|
|
5448
5508
|
let e = { alive: !0 };
|
|
5449
5509
|
return r(() => {
|
|
5450
5510
|
e.alive = !1;
|
|
@@ -5452,19 +5512,19 @@ function Jo() {
|
|
|
5452
5512
|
}
|
|
5453
5513
|
//#endregion
|
|
5454
5514
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5455
|
-
var
|
|
5515
|
+
var es = {
|
|
5456
5516
|
key: 0,
|
|
5457
5517
|
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)]"
|
|
5458
|
-
},
|
|
5518
|
+
}, ts = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, ns = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, rs = { class: "tpl:flex tpl:items-center tpl:gap-1" }, is = ["title"], as = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, os = {
|
|
5459
5519
|
key: 0,
|
|
5460
5520
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5461
|
-
},
|
|
5521
|
+
}, ss = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, cs = {
|
|
5462
5522
|
key: 1,
|
|
5463
5523
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5464
|
-
},
|
|
5524
|
+
}, ls = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, us = {
|
|
5465
5525
|
key: 2,
|
|
5466
5526
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
5467
|
-
},
|
|
5527
|
+
}, ds = {
|
|
5468
5528
|
key: 0,
|
|
5469
5529
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
5470
5530
|
style: {
|
|
@@ -5473,10 +5533,10 @@ var Yo = {
|
|
|
5473
5533
|
"max-width": "85%",
|
|
5474
5534
|
"box-shadow": "var(--tpl-shadow)"
|
|
5475
5535
|
}
|
|
5476
|
-
},
|
|
5536
|
+
}, fs = {
|
|
5477
5537
|
key: 1,
|
|
5478
5538
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5479
|
-
},
|
|
5539
|
+
}, ps = {
|
|
5480
5540
|
key: 1,
|
|
5481
5541
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
5482
5542
|
style: {
|
|
@@ -5485,21 +5545,21 @@ var Yo = {
|
|
|
5485
5545
|
color: "var(--tpl-text)",
|
|
5486
5546
|
"box-shadow": "var(--tpl-shadow)"
|
|
5487
5547
|
}
|
|
5488
|
-
},
|
|
5548
|
+
}, ms = {
|
|
5489
5549
|
key: 0,
|
|
5490
5550
|
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",
|
|
5491
5551
|
style: {
|
|
5492
5552
|
"background-color": "var(--tpl-danger-light)",
|
|
5493
5553
|
color: "var(--tpl-danger)"
|
|
5494
5554
|
}
|
|
5495
|
-
},
|
|
5555
|
+
}, hs = {
|
|
5496
5556
|
key: 1,
|
|
5497
5557
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
5498
5558
|
style: {
|
|
5499
5559
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
5500
5560
|
"backdrop-filter": "blur(2px)"
|
|
5501
5561
|
}
|
|
5502
|
-
},
|
|
5562
|
+
}, gs = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, _s = ["onClick"], vs = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ys = { 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)]" }, bs = ["placeholder", "disabled"], xs = ["disabled"], Ss = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Cs = /* @__PURE__ */ g({
|
|
5503
5563
|
__name: "AiChatSidebar",
|
|
5504
5564
|
props: {
|
|
5505
5565
|
visible: { type: Boolean },
|
|
@@ -5507,14 +5567,14 @@ var Yo = {
|
|
|
5507
5567
|
},
|
|
5508
5568
|
emits: ["close"],
|
|
5509
5569
|
setup(e, { emit: t }) {
|
|
5510
|
-
let r = e, a = t, l =
|
|
5570
|
+
let r = e, a = t, l = J(er, "AiChatSidebar"), u = J(q, "AiChatSidebar"), d = J(Yn, "AiChatSidebar"), p = o(zn, []), m = $o(), h = jo({
|
|
5511
5571
|
authManager: d,
|
|
5512
5572
|
getTemplateId: () => u.state.template?.id ?? null,
|
|
5513
5573
|
onApply: r.onApply,
|
|
5514
5574
|
onError: void 0
|
|
5515
|
-
}), g = n(""), _ = n(null), y = n(!1), b = n(0), { pause: x, resume: S } =
|
|
5575
|
+
}), g = n(""), _ = n(null), y = n(!1), b = n(0), { pause: x, resume: S } = rn(() => {
|
|
5516
5576
|
b.value < (h.suggestions.value?.length ?? 0) ? b.value++ : x();
|
|
5517
|
-
}, 150, { immediate: !1 }), { start: E } =
|
|
5577
|
+
}, 150, { immediate: !1 }), { start: E } = an(() => S(), 100, { immediate: !1 });
|
|
5518
5578
|
i(() => h.suggestions.value?.length ?? 0, (e) => {
|
|
5519
5579
|
if (x(), e === 0) {
|
|
5520
5580
|
b.value = 0;
|
|
@@ -5554,42 +5614,42 @@ var Yo = {
|
|
|
5554
5614
|
"leave-from-class": "tpl:translate-x-0",
|
|
5555
5615
|
"leave-to-class": "tpl:translate-x-full"
|
|
5556
5616
|
}, {
|
|
5557
|
-
default: c(() => [e.visible ? (f(), C("div",
|
|
5558
|
-
P("div",
|
|
5617
|
+
default: c(() => [e.visible ? (f(), C("div", es, [
|
|
5618
|
+
P("div", ts, [P("div", ns, [T(w(oi), {
|
|
5559
5619
|
size: 13,
|
|
5560
5620
|
"stroke-width": 2
|
|
5561
|
-
}), P("span", null, N(w(l).aiChat.title), 1)]), P("div",
|
|
5621
|
+
}), P("span", null, N(w(l).aiChat.title), 1)]), P("div", rs, [(w(h).messages.value?.length ?? 0) > 0 ? (f(), C("button", {
|
|
5562
5622
|
key: 0,
|
|
5563
5623
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5564
5624
|
title: w(l).aiChat.clear,
|
|
5565
5625
|
onClick: n[0] ||= (e) => w(h).clearChat()
|
|
5566
|
-
}, [T(w(
|
|
5626
|
+
}, [T(w(ci), {
|
|
5567
5627
|
size: 14,
|
|
5568
5628
|
"stroke-width": 2
|
|
5569
|
-
})], 8,
|
|
5629
|
+
})], 8, is)) : j("", !0), P("button", {
|
|
5570
5630
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5571
5631
|
onClick: n[1] ||= (e) => a("close")
|
|
5572
|
-
}, [T(w(
|
|
5632
|
+
}, [T(w(pi), {
|
|
5573
5633
|
size: 14,
|
|
5574
5634
|
"stroke-width": 2
|
|
5575
5635
|
})])])]),
|
|
5576
|
-
P("div",
|
|
5636
|
+
P("div", as, [
|
|
5577
5637
|
P("div", {
|
|
5578
5638
|
ref_key: "messagesContainer",
|
|
5579
5639
|
ref: _,
|
|
5580
5640
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
5581
|
-
}, [w(h).isLoadingHistory.value ? (f(), C("div",
|
|
5641
|
+
}, [w(h).isLoadingHistory.value ? (f(), C("div", os, [T(w(Jr), {
|
|
5582
5642
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
5583
5643
|
size: 24,
|
|
5584
5644
|
"stroke-width": 2
|
|
5585
|
-
}), P("p",
|
|
5645
|
+
}), P("p", ss, N(w(l).aiChat.loadingHistory), 1)])) : (w(h).messages.value?.length ?? 0) === 0 ? (f(), C("div", cs, [T(w(oi), {
|
|
5586
5646
|
size: 32,
|
|
5587
5647
|
"stroke-width": 1.5,
|
|
5588
5648
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
5589
|
-
}), P("p",
|
|
5649
|
+
}), P("p", ls, N(w(l).aiChat.placeholder), 1)])) : (f(), C("div", us, [(f(!0), C(O, null, s(w(h).messages.value, (e, t) => (f(), C("div", {
|
|
5590
5650
|
key: e.id,
|
|
5591
5651
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5592
|
-
}, [e.role === "user" ? (f(), C("div",
|
|
5652
|
+
}, [e.role === "user" ? (f(), C("div", ds, N(e.content), 1)) : (f(), C("div", fs, [!A(e.content) && w(h).isGenerating.value && t === (w(h).messages.value?.length ?? 0) - 1 ? (f(), M(Si, { key: 0 })) : (f(), C("div", ps, N(A(e.content) || w(l).aiChat.applied), 1)), e.id === w(h).lastApplyMessageId.value && !w(h).isGenerating.value ? (f(), C("button", {
|
|
5593
5653
|
key: 2,
|
|
5594
5654
|
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",
|
|
5595
5655
|
style: {
|
|
@@ -5598,19 +5658,19 @@ var Yo = {
|
|
|
5598
5658
|
"background-color": "transparent"
|
|
5599
5659
|
},
|
|
5600
5660
|
onClick: n[2] ||= (e) => w(h).toggleLastRevert()
|
|
5601
|
-
}, [w(h).isLastChangeReverted.value ? (f(), C(O, { key: 0 }, [T(w(
|
|
5661
|
+
}, [w(h).isLastChangeReverted.value ? (f(), C(O, { key: 0 }, [T(w($r), {
|
|
5602
5662
|
size: 12,
|
|
5603
5663
|
"stroke-width": 2
|
|
5604
|
-
}), B(" " + N(w(l).aiChat.reapply), 1)], 64)) : (f(), C(O, { key: 1 }, [T(w(
|
|
5664
|
+
}), B(" " + N(w(l).aiChat.reapply), 1)], 64)) : (f(), C(O, { key: 1 }, [T(w(ui), {
|
|
5605
5665
|
size: 12,
|
|
5606
5666
|
"stroke-width": 2
|
|
5607
5667
|
}), B(" " + N(w(l).aiChat.revert), 1)], 64))])) : j("", !0)]))]))), 128))]))], 512),
|
|
5608
|
-
w(h).error.value ? (f(), C("div",
|
|
5668
|
+
w(h).error.value ? (f(), C("div", ms, [T(w(Pr), {
|
|
5609
5669
|
size: 14,
|
|
5610
5670
|
"stroke-width": 2,
|
|
5611
5671
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
5612
5672
|
}), P("span", null, N(w(h).error.value === "ai_apply_failed" ? w(l).aiChat.applyFailed : w(l).aiChat.error), 1)])) : j("", !0),
|
|
5613
|
-
(w(h).suggestions.value?.length ?? 0) > 0 ? (f(), C("div",
|
|
5673
|
+
(w(h).suggestions.value?.length ?? 0) > 0 ? (f(), C("div", hs, [P("div", gs, [(f(!0), C(O, null, s(w(h).suggestions.value ?? [], (e, t) => (f(), C("button", {
|
|
5614
5674
|
key: t,
|
|
5615
5675
|
class: L(["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", (w(h).suggestions.value?.length ?? 0) - 1 - t < b.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
5616
5676
|
style: {
|
|
@@ -5620,102 +5680,102 @@ var Yo = {
|
|
|
5620
5680
|
"box-shadow": "var(--tpl-shadow)"
|
|
5621
5681
|
},
|
|
5622
5682
|
onClick: (t) => ee(e)
|
|
5623
|
-
}, N(e), 11,
|
|
5683
|
+
}, N(e), 11, _s))), 128))])])) : j("", !0)
|
|
5624
5684
|
]),
|
|
5625
|
-
P("div",
|
|
5685
|
+
P("div", vs, [P("div", ys, [v(P("textarea", {
|
|
5626
5686
|
"onUpdate:modelValue": n[3] ||= (e) => g.value = e,
|
|
5627
5687
|
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)]",
|
|
5628
5688
|
placeholder: w(l).aiChat.inputPlaceholder,
|
|
5629
5689
|
disabled: w(h).isGenerating.value,
|
|
5630
5690
|
rows: "3",
|
|
5631
5691
|
onKeydown: te
|
|
5632
|
-
}, null, 40,
|
|
5692
|
+
}, null, 40, bs), [[ue, g.value]]), P("button", {
|
|
5633
5693
|
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)]",
|
|
5634
5694
|
disabled: !g.value.trim() || w(h).isGenerating.value,
|
|
5635
5695
|
onClick: k
|
|
5636
|
-
}, [T(w(
|
|
5696
|
+
}, [T(w(ni), {
|
|
5637
5697
|
size: 16,
|
|
5638
5698
|
"stroke-width": 2
|
|
5639
|
-
})], 8,
|
|
5699
|
+
})], 8, xs)]), P("p", Ss, N(w(l).aiMenu.disclaimer), 1)])
|
|
5640
5700
|
])) : j("", !0)]),
|
|
5641
5701
|
_: 1
|
|
5642
5702
|
}));
|
|
5643
5703
|
}
|
|
5644
|
-
}),
|
|
5645
|
-
function
|
|
5704
|
+
}), ws = /* @__PURE__ */ t({ default: () => Ts }), Ts = /* @__PURE__ */ vi(Cs, [["__scopeId", "data-v-a55e4bff"]]), Es = 6e4, Ds = 36e5, Os = 864e5;
|
|
5705
|
+
function ks(e, t, n, r) {
|
|
5646
5706
|
let i = new Date(e).getTime();
|
|
5647
5707
|
if (Number.isNaN(i)) return null;
|
|
5648
|
-
let a = Date.now() - i, o = Math.floor(a /
|
|
5708
|
+
let a = Date.now() - i, o = Math.floor(a / Es), s = Math.floor(a / Ds), c = Math.floor(a / Os);
|
|
5649
5709
|
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));
|
|
5650
5710
|
}
|
|
5651
5711
|
//#endregion
|
|
5652
5712
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5653
|
-
var
|
|
5713
|
+
var As = {
|
|
5654
5714
|
key: 0,
|
|
5655
5715
|
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)]"
|
|
5656
|
-
},
|
|
5716
|
+
}, js = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Ms = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ns = {
|
|
5657
5717
|
key: 0,
|
|
5658
5718
|
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)]"
|
|
5659
|
-
},
|
|
5719
|
+
}, Ps = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Fs = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Is = {
|
|
5660
5720
|
key: 0,
|
|
5661
5721
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
5662
|
-
},
|
|
5722
|
+
}, Ls = {
|
|
5663
5723
|
key: 1,
|
|
5664
5724
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
5665
|
-
},
|
|
5725
|
+
}, Rs = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, zs = {
|
|
5666
5726
|
key: 2,
|
|
5667
5727
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
5668
|
-
},
|
|
5728
|
+
}, Bs = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Vs = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Hs = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Us = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ws = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Gs = {
|
|
5669
5729
|
key: 0,
|
|
5670
5730
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
5671
|
-
},
|
|
5731
|
+
}, Ks = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, qs = ["title", "onClick"], Js = ["title", "onClick"], Ys = ["title", "onClick"], Xs = {
|
|
5672
5732
|
key: 0,
|
|
5673
5733
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
5674
|
-
},
|
|
5734
|
+
}, Zs = {
|
|
5675
5735
|
key: 0,
|
|
5676
5736
|
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)]"
|
|
5677
|
-
},
|
|
5737
|
+
}, Qs = ["onClick"], $s = {
|
|
5678
5738
|
key: 2,
|
|
5679
5739
|
class: "tpl:mt-2"
|
|
5680
|
-
},
|
|
5740
|
+
}, ec = ["onKeydown"], tc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, nc = ["disabled", "onClick"], rc = {
|
|
5681
5741
|
key: 3,
|
|
5682
5742
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
5683
|
-
},
|
|
5743
|
+
}, ic = {
|
|
5684
5744
|
key: 4,
|
|
5685
5745
|
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)]"
|
|
5686
|
-
},
|
|
5746
|
+
}, ac = { class: "tpl:flex-1" }, oc = ["onClick"], sc = {
|
|
5687
5747
|
key: 5,
|
|
5688
5748
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
5689
|
-
},
|
|
5749
|
+
}, cc = ["title", "onClick"], lc = ["onClick"], uc = {
|
|
5690
5750
|
key: 0,
|
|
5691
5751
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
5692
|
-
},
|
|
5752
|
+
}, dc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, fc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, pc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, mc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, hc = {
|
|
5693
5753
|
key: 0,
|
|
5694
5754
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
5695
|
-
},
|
|
5755
|
+
}, gc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, _c = ["title", "onClick"], vc = ["title", "onClick"], yc = {
|
|
5696
5756
|
key: 0,
|
|
5697
5757
|
class: "tpl:mt-1.5"
|
|
5698
|
-
},
|
|
5758
|
+
}, bc = ["onKeydown"], xc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Sc = ["disabled", "onClick"], Cc = {
|
|
5699
5759
|
key: 1,
|
|
5700
5760
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
5701
|
-
},
|
|
5761
|
+
}, wc = {
|
|
5702
5762
|
key: 2,
|
|
5703
5763
|
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)]"
|
|
5704
|
-
},
|
|
5764
|
+
}, Tc = { class: "tpl:flex-1" }, Ec = ["onClick"], Dc = {
|
|
5705
5765
|
key: 0,
|
|
5706
5766
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
5707
|
-
},
|
|
5767
|
+
}, Oc = { class: "tpl:flex tpl:items-end tpl:gap-2" }, kc = ["placeholder", "onKeydown"], Ac = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, jc = ["disabled", "onClick"], Mc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Nc = {
|
|
5708
5768
|
key: 0,
|
|
5709
5769
|
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)]"
|
|
5710
|
-
},
|
|
5770
|
+
}, Pc = {
|
|
5711
5771
|
key: 1,
|
|
5712
5772
|
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)]"
|
|
5713
|
-
},
|
|
5773
|
+
}, Fc = ["placeholder", "disabled"], Ic = ["disabled"], Lc = /* @__PURE__ */ g({
|
|
5714
5774
|
__name: "CommentsSidebar",
|
|
5715
5775
|
props: { visible: { type: Boolean } },
|
|
5716
5776
|
emits: ["close", "filterBlock"],
|
|
5717
5777
|
setup(e, { expose: t, emit: r }) {
|
|
5718
|
-
let a = e, o = r, { format: l } =
|
|
5778
|
+
let a = e, o = r, { format: l } = Y(), { t: u } = Di(), d = J(q, "CommentsSidebar"), p = J(Yn, "CommentsSidebar"), m = J(Zn, "CommentsSidebar"), h = n("unresolved"), g = n(null), _ = n(""), y = n(null), b = n(""), x = n(null), S = n(""), E = n(/* @__PURE__ */ new Set()), k = n(null), A = n(null), ee = F(() => p.userConfig?.id ?? null), te = F(() => {
|
|
5719
5779
|
let e = /* @__PURE__ */ new Set();
|
|
5720
5780
|
for (let t of d.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);
|
|
5721
5781
|
return e;
|
|
@@ -5783,7 +5843,7 @@ var Ts = {
|
|
|
5783
5843
|
return e.author_identifier === ee.value;
|
|
5784
5844
|
}
|
|
5785
5845
|
function be(e) {
|
|
5786
|
-
return
|
|
5846
|
+
return ks(e, u.snapshotHistory) ?? e;
|
|
5787
5847
|
}
|
|
5788
5848
|
function xe(e) {
|
|
5789
5849
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), me());
|
|
@@ -5810,22 +5870,22 @@ var Ts = {
|
|
|
5810
5870
|
"leave-from-class": "tpl:translate-x-0",
|
|
5811
5871
|
"leave-to-class": "tpl:translate-x-full"
|
|
5812
5872
|
}, {
|
|
5813
|
-
default: c(() => [e.visible ? (f(), C("div",
|
|
5814
|
-
P("div",
|
|
5815
|
-
T(w(
|
|
5873
|
+
default: c(() => [e.visible ? (f(), C("div", As, [
|
|
5874
|
+
P("div", js, [P("div", Ms, [
|
|
5875
|
+
T(w(Yr), {
|
|
5816
5876
|
size: 13,
|
|
5817
5877
|
"stroke-width": 2
|
|
5818
5878
|
}),
|
|
5819
5879
|
P("span", null, N(w(u).comments.title), 1),
|
|
5820
|
-
w(m).unresolvedCount.value > 0 ? (f(), C("span",
|
|
5880
|
+
w(m).unresolvedCount.value > 0 ? (f(), C("span", Ns, N(w(m).unresolvedCount.value), 1)) : j("", !0)
|
|
5821
5881
|
]), P("button", {
|
|
5822
5882
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5823
5883
|
onClick: n[0] ||= (e) => o("close")
|
|
5824
|
-
}, [T(w(
|
|
5884
|
+
}, [T(w(pi), {
|
|
5825
5885
|
size: 14,
|
|
5826
5886
|
"stroke-width": 2
|
|
5827
5887
|
})])]),
|
|
5828
|
-
P("div",
|
|
5888
|
+
P("div", Ps, [
|
|
5829
5889
|
P("button", {
|
|
5830
5890
|
class: L(["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", h.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
|
|
5831
5891
|
onClick: n[1] ||= (e) => se("unresolved")
|
|
@@ -5840,156 +5900,156 @@ var Ts = {
|
|
|
5840
5900
|
onClick: n[3] ||= (e) => se("block", w(d).state.selectedBlockId ?? void 0)
|
|
5841
5901
|
}, N(w(u).comments.filterBlock), 3)) : j("", !0)
|
|
5842
5902
|
]),
|
|
5843
|
-
P("div",
|
|
5903
|
+
P("div", Fs, [w(m).isLoading.value ? (f(), C("div", Is, [T(w(Jr), {
|
|
5844
5904
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
5845
5905
|
size: 24,
|
|
5846
5906
|
"stroke-width": 2
|
|
5847
|
-
})])) : oe.value.length === 0 ? (f(), C("div",
|
|
5907
|
+
})])) : oe.value.length === 0 ? (f(), C("div", Ls, [T(w(Yr), {
|
|
5848
5908
|
size: 32,
|
|
5849
5909
|
"stroke-width": 1.5,
|
|
5850
5910
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
5851
|
-
}), P("p",
|
|
5911
|
+
}), P("p", Rs, N(h.value === "all" ? w(u).comments.noCommentsHint : w(u).comments.noComments), 1)])) : (f(), C("div", zs, [(f(!0), C(O, null, s(oe.value, (e) => (f(), C("div", {
|
|
5852
5912
|
key: e.id,
|
|
5853
5913
|
class: "tpl-comment-thread"
|
|
5854
5914
|
}, [
|
|
5855
|
-
P("div",
|
|
5856
|
-
P("div",
|
|
5857
|
-
P("span",
|
|
5858
|
-
P("span",
|
|
5859
|
-
e.updated_at === e.created_at ? j("", !0) : (f(), C("span",
|
|
5860
|
-
]), P("div",
|
|
5915
|
+
P("div", Bs, [
|
|
5916
|
+
P("div", Vs, [P("div", Hs, [
|
|
5917
|
+
P("span", Us, N(ye(e) ? w(u).comments.ownedByYou : e.author_name), 1),
|
|
5918
|
+
P("span", Ws, N(be(e.created_at)), 1),
|
|
5919
|
+
e.updated_at === e.created_at ? j("", !0) : (f(), C("span", Gs, " (" + N(w(u).comments.edited) + ") ", 1))
|
|
5920
|
+
]), P("div", Ks, [
|
|
5861
5921
|
P("button", {
|
|
5862
5922
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5863
5923
|
title: e.resolved_at ? w(u).comments.unresolve : w(u).comments.resolve,
|
|
5864
5924
|
onClick: (t) => ve(e.id)
|
|
5865
|
-
}, [T(w(
|
|
5925
|
+
}, [T(w(Fr), {
|
|
5866
5926
|
size: 13,
|
|
5867
5927
|
"stroke-width": 2,
|
|
5868
5928
|
class: "tpl-resolve-icon",
|
|
5869
5929
|
style: D({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
5870
|
-
}, null, 8, ["style"])], 8,
|
|
5930
|
+
}, null, 8, ["style"])], 8, qs),
|
|
5871
5931
|
ye(e) ? (f(), C("button", {
|
|
5872
5932
|
key: 0,
|
|
5873
5933
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5874
5934
|
title: w(u).comments.edit,
|
|
5875
5935
|
onClick: (t) => R(e)
|
|
5876
|
-
}, [T(w(
|
|
5936
|
+
}, [T(w(Zr), {
|
|
5877
5937
|
size: 12,
|
|
5878
5938
|
"stroke-width": 2
|
|
5879
|
-
})], 8,
|
|
5939
|
+
})], 8, Js)) : j("", !0),
|
|
5880
5940
|
ye(e) ? (f(), C("button", {
|
|
5881
5941
|
key: 1,
|
|
5882
5942
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5883
5943
|
title: w(u).comments.delete,
|
|
5884
5944
|
onClick: (t) => fe(e.id)
|
|
5885
|
-
}, [T(w(
|
|
5945
|
+
}, [T(w(ci), {
|
|
5886
5946
|
size: 12,
|
|
5887
5947
|
"stroke-width": 2
|
|
5888
|
-
})], 8,
|
|
5948
|
+
})], 8, Ys)) : j("", !0)
|
|
5889
5949
|
])]),
|
|
5890
5950
|
T(ae, { name: "tpl-resolve" }, {
|
|
5891
|
-
default: c(() => [e.resolved_at ? (f(), C("div",
|
|
5951
|
+
default: c(() => [e.resolved_at ? (f(), C("div", Xs, [T(w(kr), {
|
|
5892
5952
|
size: 10,
|
|
5893
5953
|
"stroke-width": 2.5
|
|
5894
5954
|
}), P("span", null, N(w(l)(w(u).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : j("", !0)]),
|
|
5895
5955
|
_: 2
|
|
5896
5956
|
}, 1024),
|
|
5897
|
-
e.block_id && ne(e.block_id) ? (f(), C("span",
|
|
5957
|
+
e.block_id && ne(e.block_id) ? (f(), C("span", Zs, N(w(u).comments.missingBlock), 1)) : e.block_id ? (f(), C("button", {
|
|
5898
5958
|
key: 1,
|
|
5899
5959
|
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)]",
|
|
5900
5960
|
onClick: (t) => w(d).selectBlock(e.block_id ?? "")
|
|
5901
|
-
}, " Block ", 8,
|
|
5902
|
-
x.value === e.id ? (f(), C("div",
|
|
5961
|
+
}, " Block ", 8, Qs)) : j("", !0),
|
|
5962
|
+
x.value === e.id ? (f(), C("div", $s, [v(P("textarea", {
|
|
5903
5963
|
"onUpdate:modelValue": n[4] ||= (e) => S.value = e,
|
|
5904
5964
|
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)]",
|
|
5905
5965
|
rows: "3",
|
|
5906
5966
|
onKeydown: (t) => Ce(t, e.id)
|
|
5907
|
-
}, null, 40,
|
|
5967
|
+
}, null, 40, ec), [[ue, S.value]]), P("div", tc, [P("button", {
|
|
5908
5968
|
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)]",
|
|
5909
5969
|
disabled: !S.value.trim() || w(m).isSubmitting.value,
|
|
5910
5970
|
onClick: (t) => ge(e.id)
|
|
5911
|
-
}, N(w(u).comments.save), 9,
|
|
5971
|
+
}, N(w(u).comments.save), 9, nc), P("button", {
|
|
5912
5972
|
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)]",
|
|
5913
5973
|
onClick: n[5] ||= (e) => z()
|
|
5914
|
-
}, N(w(u).comments.cancel), 1)])])) : (f(), C("p",
|
|
5915
|
-
k.value === e.id ? (f(), C("div",
|
|
5916
|
-
P("span",
|
|
5974
|
+
}, N(w(u).comments.cancel), 1)])])) : (f(), C("p", rc, N(e.body), 1)),
|
|
5975
|
+
k.value === e.id ? (f(), C("div", ic, [
|
|
5976
|
+
P("span", ac, N(w(u).comments.deleteConfirm), 1),
|
|
5917
5977
|
P("button", {
|
|
5918
5978
|
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)]",
|
|
5919
5979
|
onClick: (t) => _e(e.id)
|
|
5920
|
-
}, N(w(u).comments.delete), 9,
|
|
5980
|
+
}, N(w(u).comments.delete), 9, oc),
|
|
5921
5981
|
P("button", {
|
|
5922
5982
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
5923
5983
|
onClick: n[6] ||= (e) => pe()
|
|
5924
5984
|
}, N(w(u).comments.cancel), 1)
|
|
5925
5985
|
])) : j("", !0),
|
|
5926
|
-
x.value !== e.id && k.value !== e.id ? (f(), C("div",
|
|
5986
|
+
x.value !== e.id && k.value !== e.id ? (f(), C("div", sc, [P("button", {
|
|
5927
5987
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5928
5988
|
title: w(u).comments.reply,
|
|
5929
5989
|
onClick: (t) => I(e.id)
|
|
5930
|
-
}, [T(w(
|
|
5990
|
+
}, [T(w(ti), {
|
|
5931
5991
|
size: 13,
|
|
5932
5992
|
"stroke-width": 2,
|
|
5933
5993
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
5934
|
-
})], 8,
|
|
5994
|
+
})], 8, cc), (e.replies?.length ?? 0) > 0 ? (f(), C("button", {
|
|
5935
5995
|
key: 0,
|
|
5936
5996
|
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)]",
|
|
5937
5997
|
onClick: (t) => le(e.id)
|
|
5938
|
-
}, [E.value.has(e.id) ? (f(), M(w(
|
|
5998
|
+
}, [E.value.has(e.id) ? (f(), M(w(Nr), {
|
|
5939
5999
|
key: 0,
|
|
5940
6000
|
size: 11,
|
|
5941
6001
|
"stroke-width": 2
|
|
5942
|
-
})) : (f(), M(w(
|
|
6002
|
+
})) : (f(), M(w(Ar), {
|
|
5943
6003
|
key: 1,
|
|
5944
6004
|
size: 11,
|
|
5945
6005
|
"stroke-width": 2
|
|
5946
|
-
})), B(" " + N((e.replies?.length ?? 0) === 1 ? w(l)(w(u).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : w(l)(w(u).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8,
|
|
6006
|
+
})), B(" " + N((e.replies?.length ?? 0) === 1 ? w(l)(w(u).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : w(l)(w(u).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, lc)) : j("", !0)])) : j("", !0)
|
|
5947
6007
|
]),
|
|
5948
6008
|
T(ae, { name: "tpl-replies" }, {
|
|
5949
|
-
default: c(() => [E.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), C("div",
|
|
6009
|
+
default: c(() => [E.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), C("div", uc, [(f(!0), C(O, null, s(e.replies, (t, r) => (f(), C("div", {
|
|
5950
6010
|
key: t.id,
|
|
5951
6011
|
class: L(["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" : ""])
|
|
5952
6012
|
}, [
|
|
5953
|
-
P("div",
|
|
5954
|
-
P("span",
|
|
5955
|
-
P("span",
|
|
5956
|
-
t.updated_at === t.created_at ? j("", !0) : (f(), C("span",
|
|
5957
|
-
]), P("div",
|
|
6013
|
+
P("div", dc, [P("div", fc, [
|
|
6014
|
+
P("span", pc, N(ye(t) ? w(u).comments.ownedByYou : t.author_name), 1),
|
|
6015
|
+
P("span", mc, N(be(t.created_at)), 1),
|
|
6016
|
+
t.updated_at === t.created_at ? j("", !0) : (f(), C("span", hc, " (" + N(w(u).comments.edited) + ") ", 1))
|
|
6017
|
+
]), P("div", gc, [ye(t) ? (f(), C("button", {
|
|
5958
6018
|
key: 0,
|
|
5959
6019
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5960
6020
|
title: w(u).comments.edit,
|
|
5961
6021
|
onClick: (e) => R(t)
|
|
5962
|
-
}, [T(w(
|
|
6022
|
+
}, [T(w(Zr), {
|
|
5963
6023
|
size: 11,
|
|
5964
6024
|
"stroke-width": 2
|
|
5965
|
-
})], 8,
|
|
6025
|
+
})], 8, _c)) : j("", !0), ye(t) ? (f(), C("button", {
|
|
5966
6026
|
key: 1,
|
|
5967
6027
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
5968
6028
|
title: w(u).comments.delete,
|
|
5969
6029
|
onClick: (e) => fe(t.id)
|
|
5970
|
-
}, [T(w(
|
|
6030
|
+
}, [T(w(ci), {
|
|
5971
6031
|
size: 11,
|
|
5972
6032
|
"stroke-width": 2
|
|
5973
|
-
})], 8,
|
|
5974
|
-
x.value === t.id ? (f(), C("div",
|
|
6033
|
+
})], 8, vc)) : j("", !0)])]),
|
|
6034
|
+
x.value === t.id ? (f(), C("div", yc, [v(P("textarea", {
|
|
5975
6035
|
"onUpdate:modelValue": n[7] ||= (e) => S.value = e,
|
|
5976
6036
|
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)]",
|
|
5977
6037
|
rows: "2",
|
|
5978
6038
|
onKeydown: (e) => Ce(e, t.id)
|
|
5979
|
-
}, null, 40,
|
|
6039
|
+
}, null, 40, bc), [[ue, S.value]]), P("div", xc, [P("button", {
|
|
5980
6040
|
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)]",
|
|
5981
6041
|
disabled: !S.value.trim() || w(m).isSubmitting.value,
|
|
5982
6042
|
onClick: (e) => ge(t.id)
|
|
5983
|
-
}, N(w(u).comments.save), 9,
|
|
6043
|
+
}, N(w(u).comments.save), 9, Sc), P("button", {
|
|
5984
6044
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
5985
6045
|
onClick: n[8] ||= (e) => z()
|
|
5986
|
-
}, N(w(u).comments.cancel), 1)])])) : (f(), C("p",
|
|
5987
|
-
k.value === t.id ? (f(), C("div",
|
|
5988
|
-
P("span",
|
|
6046
|
+
}, N(w(u).comments.cancel), 1)])])) : (f(), C("p", Cc, N(t.body), 1)),
|
|
6047
|
+
k.value === t.id ? (f(), C("div", wc, [
|
|
6048
|
+
P("span", Tc, N(w(u).comments.deleteConfirm), 1),
|
|
5989
6049
|
P("button", {
|
|
5990
6050
|
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)]",
|
|
5991
6051
|
onClick: (e) => _e(t.id)
|
|
5992
|
-
}, N(w(u).comments.delete), 9,
|
|
6052
|
+
}, N(w(u).comments.delete), 9, Ec),
|
|
5993
6053
|
P("button", {
|
|
5994
6054
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
5995
6055
|
onClick: n[9] ||= (e) => pe()
|
|
@@ -5999,30 +6059,30 @@ var Ts = {
|
|
|
5999
6059
|
_: 2
|
|
6000
6060
|
}, 1024),
|
|
6001
6061
|
T(ae, { name: "tpl-replies" }, {
|
|
6002
|
-
default: c(() => [y.value === e.id ? (f(), C("div",
|
|
6062
|
+
default: c(() => [y.value === e.id ? (f(), C("div", Dc, [P("div", Oc, [v(P("textarea", {
|
|
6003
6063
|
"onUpdate:modelValue": n[10] ||= (e) => b.value = e,
|
|
6004
6064
|
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)]",
|
|
6005
6065
|
placeholder: w(u).comments.replyPlaceholder,
|
|
6006
6066
|
rows: "2",
|
|
6007
6067
|
onKeydown: (t) => Se(t, e.id)
|
|
6008
|
-
}, null, 40,
|
|
6068
|
+
}, null, 40, kc), [[ue, b.value]]), P("div", Ac, [P("button", {
|
|
6009
6069
|
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)]",
|
|
6010
6070
|
disabled: !b.value.trim() || w(m).isSubmitting.value,
|
|
6011
6071
|
onClick: (t) => he(e.id)
|
|
6012
|
-
}, [T(w(
|
|
6072
|
+
}, [T(w(ni), {
|
|
6013
6073
|
size: 14,
|
|
6014
6074
|
"stroke-width": 2
|
|
6015
|
-
})], 8,
|
|
6075
|
+
})], 8, jc), P("button", {
|
|
6016
6076
|
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)]",
|
|
6017
6077
|
onClick: n[11] ||= (e) => de()
|
|
6018
|
-
}, [T(w(
|
|
6078
|
+
}, [T(w(pi), {
|
|
6019
6079
|
size: 14,
|
|
6020
6080
|
"stroke-width": 2
|
|
6021
6081
|
})])])])])) : j("", !0)]),
|
|
6022
6082
|
_: 2
|
|
6023
6083
|
}, 1024)
|
|
6024
6084
|
]))), 128))]))]),
|
|
6025
|
-
P("div",
|
|
6085
|
+
P("div", Mc, [ie.value ? (f(), C("div", Nc, N(w(u).comments.saveTemplateFirst), 1)) : (f(), C("div", Pc, [v(P("textarea", {
|
|
6026
6086
|
ref_key: "newCommentInput",
|
|
6027
6087
|
ref: A,
|
|
6028
6088
|
"onUpdate:modelValue": n[12] ||= (e) => _.value = e,
|
|
@@ -6031,46 +6091,46 @@ var Ts = {
|
|
|
6031
6091
|
disabled: w(m).isSubmitting.value,
|
|
6032
6092
|
rows: "2",
|
|
6033
6093
|
onKeydown: xe
|
|
6034
|
-
}, null, 40,
|
|
6094
|
+
}, null, 40, Fc), [[ue, _.value]]), P("button", {
|
|
6035
6095
|
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)]",
|
|
6036
6096
|
disabled: !_.value.trim() || w(m).isSubmitting.value,
|
|
6037
6097
|
onClick: me
|
|
6038
|
-
}, [w(m).isSubmitting.value ? (f(), M(w(
|
|
6098
|
+
}, [w(m).isSubmitting.value ? (f(), M(w(Jr), {
|
|
6039
6099
|
key: 0,
|
|
6040
6100
|
class: "tpl-spinner",
|
|
6041
6101
|
size: 16,
|
|
6042
6102
|
"stroke-width": 2
|
|
6043
|
-
})) : (f(), M(w(
|
|
6103
|
+
})) : (f(), M(w(ni), {
|
|
6044
6104
|
key: 1,
|
|
6045
6105
|
size: 16,
|
|
6046
6106
|
"stroke-width": 2
|
|
6047
|
-
}))], 8,
|
|
6107
|
+
}))], 8, Ic)]))])
|
|
6048
6108
|
])) : j("", !0)]),
|
|
6049
6109
|
_: 1
|
|
6050
6110
|
}));
|
|
6051
6111
|
}
|
|
6052
|
-
}),
|
|
6112
|
+
}), Rc = /* @__PURE__ */ t({ default: () => zc }), zc = /* @__PURE__ */ vi(Lc, [["__scopeId", "data-v-d204f573"]]), Bc = {
|
|
6053
6113
|
key: 0,
|
|
6054
6114
|
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)]"
|
|
6055
|
-
},
|
|
6115
|
+
}, Vc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Hc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Uc = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Wc = {
|
|
6056
6116
|
key: 0,
|
|
6057
6117
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6058
|
-
},
|
|
6118
|
+
}, Gc = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Kc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, qc = {
|
|
6059
6119
|
key: 1,
|
|
6060
6120
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6061
|
-
},
|
|
6121
|
+
}, Jc = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Yc = {
|
|
6062
6122
|
key: 0,
|
|
6063
6123
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6064
|
-
},
|
|
6124
|
+
}, Xc = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Zc = ["src", "alt"], Qc = {
|
|
6065
6125
|
key: 1,
|
|
6066
6126
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6067
|
-
},
|
|
6127
|
+
}, $c = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, el = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, tl = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, nl = ["accept"], rl = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, il = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, al = ["placeholder"], ol = {
|
|
6068
6128
|
key: 0,
|
|
6069
6129
|
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)]"
|
|
6070
|
-
},
|
|
6130
|
+
}, sl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, cl = { class: "tpl:flex tpl:gap-2" }, ll = {
|
|
6071
6131
|
key: 1,
|
|
6072
6132
|
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)]"
|
|
6073
|
-
},
|
|
6133
|
+
}, ul = ["disabled"], dl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, fl = /* @__PURE__ */ g({
|
|
6074
6134
|
__name: "DesignReferenceSidebar",
|
|
6075
6135
|
props: {
|
|
6076
6136
|
visible: { type: Boolean },
|
|
@@ -6078,8 +6138,8 @@ var Ts = {
|
|
|
6078
6138
|
},
|
|
6079
6139
|
emits: ["close", "apply"],
|
|
6080
6140
|
setup(e, { emit: t }) {
|
|
6081
|
-
let r = e, a = t, { t: o } =
|
|
6082
|
-
authManager:
|
|
6141
|
+
let r = e, a = t, { t: o } = Di(), s = J(q, "DesignReferenceSidebar"), l = Po({
|
|
6142
|
+
authManager: J(Yn, "DesignReferenceSidebar"),
|
|
6083
6143
|
getTemplateId: () => s.state.template?.id ?? null,
|
|
6084
6144
|
onApply: (e) => a("apply", e)
|
|
6085
6145
|
}), u = n(null), d = n("image"), p = n(null), m = n(""), h = n(null), g = n(!1), _ = n(!1), y = F(() => l.isGenerating.value ? !1 : p.value !== null);
|
|
@@ -6148,17 +6208,17 @@ var Ts = {
|
|
|
6148
6208
|
"leave-from-class": "tpl:translate-x-0",
|
|
6149
6209
|
"leave-to-class": "tpl:translate-x-full"
|
|
6150
6210
|
}, {
|
|
6151
|
-
default: c(() => [e.visible ? (f(), C("div",
|
|
6211
|
+
default: c(() => [e.visible ? (f(), C("div", Bc, [P("div", Vc, [P("div", Hc, [T(w(Gr), {
|
|
6152
6212
|
size: 13,
|
|
6153
6213
|
"stroke-width": 2
|
|
6154
6214
|
}), P("span", null, N(w(o).designReference.title), 1)]), P("button", {
|
|
6155
6215
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6156
6216
|
onClick: n[0] ||= (e) => a("close")
|
|
6157
|
-
}, [T(w(
|
|
6217
|
+
}, [T(w(pi), {
|
|
6158
6218
|
size: 14,
|
|
6159
6219
|
"stroke-width": 2
|
|
6160
|
-
})])]), P("div",
|
|
6161
|
-
P("div",
|
|
6220
|
+
})])]), P("div", Uc, [w(l).isGenerating.value ? (f(), C("div", Wc, [P("div", Gc, [T(Si), P("p", Kc, N(w(o).designReference.generating), 1)])])) : (f(), C("div", qc, [
|
|
6221
|
+
P("div", Jc, [P("button", {
|
|
6162
6222
|
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",
|
|
6163
6223
|
style: D({
|
|
6164
6224
|
backgroundColor: d.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6166,7 +6226,7 @@ var Ts = {
|
|
|
6166
6226
|
boxShadow: d.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6167
6227
|
}),
|
|
6168
6228
|
onClick: n[1] ||= (e) => b("image")
|
|
6169
|
-
}, [T(w(
|
|
6229
|
+
}, [T(w(Vr), {
|
|
6170
6230
|
size: 12,
|
|
6171
6231
|
"stroke-width": 2
|
|
6172
6232
|
}), B(" " + N(w(o).designReference.uploadImage), 1)], 4), P("button", {
|
|
@@ -6177,23 +6237,23 @@ var Ts = {
|
|
|
6177
6237
|
boxShadow: d.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6178
6238
|
}),
|
|
6179
6239
|
onClick: n[2] ||= (e) => b("pdf")
|
|
6180
|
-
}, [T(w(
|
|
6240
|
+
}, [T(w(Hr), {
|
|
6181
6241
|
size: 12,
|
|
6182
6242
|
"stroke-width": 2
|
|
6183
6243
|
}), B(" " + N(w(o).designReference.uploadPdf), 1)], 4)]),
|
|
6184
|
-
P("div", null, [p.value ? (f(), C("div",
|
|
6244
|
+
P("div", null, [p.value ? (f(), C("div", Yc, [P("div", Xc, [h.value ? (f(), C("img", {
|
|
6185
6245
|
key: 0,
|
|
6186
6246
|
src: h.value,
|
|
6187
6247
|
alt: p.value.name,
|
|
6188
6248
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6189
|
-
}, null, 8,
|
|
6249
|
+
}, null, 8, Zc)) : (f(), C("div", Qc, [T(w(Hr), {
|
|
6190
6250
|
size: 32,
|
|
6191
6251
|
"stroke-width": 1.5,
|
|
6192
6252
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6193
|
-
}), P("span",
|
|
6253
|
+
}), P("span", $c, N(p.value.name), 1)])), P("button", {
|
|
6194
6254
|
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)]",
|
|
6195
6255
|
onClick: E
|
|
6196
|
-
}, [T(w(
|
|
6256
|
+
}, [T(w(pi), {
|
|
6197
6257
|
size: 12,
|
|
6198
6258
|
"stroke-width": 2
|
|
6199
6259
|
})])])])) : (f(), C("div", {
|
|
@@ -6208,13 +6268,13 @@ var Ts = {
|
|
|
6208
6268
|
onDragleave: k,
|
|
6209
6269
|
onDrop: A
|
|
6210
6270
|
}, [
|
|
6211
|
-
T(w(
|
|
6271
|
+
T(w(di), {
|
|
6212
6272
|
size: 24,
|
|
6213
6273
|
"stroke-width": 1.5,
|
|
6214
6274
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6215
6275
|
}),
|
|
6216
|
-
P("span",
|
|
6217
|
-
P("span",
|
|
6276
|
+
P("span", el, N(w(o).designReference.dropHint), 1),
|
|
6277
|
+
P("span", tl, N(d.value === "image" ? w(o).designReference.acceptedImages : w(o).designReference.acceptedPdf), 1)
|
|
6218
6278
|
], 36)), P("input", {
|
|
6219
6279
|
ref_key: "fileInput",
|
|
6220
6280
|
ref: u,
|
|
@@ -6222,14 +6282,14 @@ var Ts = {
|
|
|
6222
6282
|
class: "tpl:hidden",
|
|
6223
6283
|
accept: d.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6224
6284
|
onChange: x
|
|
6225
|
-
}, null, 40,
|
|
6226
|
-
P("div",
|
|
6285
|
+
}, null, 40, nl)]),
|
|
6286
|
+
P("div", rl, [P("label", il, N(w(o).designReference.promptLabel), 1), v(P("textarea", {
|
|
6227
6287
|
"onUpdate:modelValue": n[4] ||= (e) => m.value = e,
|
|
6228
6288
|
class: L(["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"]]),
|
|
6229
6289
|
placeholder: w(o).designReference.promptPlaceholder,
|
|
6230
6290
|
rows: "3"
|
|
6231
|
-
}, null, 8,
|
|
6232
|
-
g.value ? (f(), C("div",
|
|
6291
|
+
}, null, 8, al), [[ue, m.value]])]),
|
|
6292
|
+
g.value ? (f(), C("div", ol, [P("p", sl, N(w(o).designReference.replaceWarning), 1), P("div", cl, [P("button", {
|
|
6233
6293
|
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)]",
|
|
6234
6294
|
style: { "background-color": "transparent" },
|
|
6235
6295
|
onClick: te
|
|
@@ -6237,7 +6297,7 @@ var Ts = {
|
|
|
6237
6297
|
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)]",
|
|
6238
6298
|
onClick: ee
|
|
6239
6299
|
}, N(w(o).designReference.replaceConfirm), 1)])])) : j("", !0),
|
|
6240
|
-
w(l).error.value ? (f(), C("div",
|
|
6300
|
+
w(l).error.value ? (f(), C("div", ll, [T(w(Pr), {
|
|
6241
6301
|
size: 14,
|
|
6242
6302
|
"stroke-width": 2,
|
|
6243
6303
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6247,23 +6307,23 @@ var Ts = {
|
|
|
6247
6307
|
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)]",
|
|
6248
6308
|
disabled: !y.value,
|
|
6249
6309
|
onClick: ee
|
|
6250
|
-
}, [T(w(
|
|
6310
|
+
}, [T(w(Gr), {
|
|
6251
6311
|
size: 16,
|
|
6252
6312
|
"stroke-width": 2
|
|
6253
|
-
}), B(" " + N(w(o).designReference.generate), 1)], 8,
|
|
6254
|
-
P("p",
|
|
6313
|
+
}), B(" " + N(w(o).designReference.generate), 1)], 8, ul)),
|
|
6314
|
+
P("p", dl, N(w(o).aiMenu.disclaimer), 1)
|
|
6255
6315
|
]))])])) : j("", !0)]),
|
|
6256
6316
|
_: 1
|
|
6257
6317
|
}));
|
|
6258
6318
|
}
|
|
6259
|
-
}),
|
|
6319
|
+
}), pl = /* @__PURE__ */ t({ default: () => ml }), ml = /* @__PURE__ */ vi(fl, [["__scopeId", "data-v-7e3f1324"]]), hl = ["data-tpl-theme"], gl = /* @__PURE__ */ g({
|
|
6260
6320
|
__name: "TplModal",
|
|
6261
6321
|
props: { visible: { type: Boolean } },
|
|
6262
6322
|
emits: ["close", "keydown"],
|
|
6263
6323
|
setup(e, { emit: t }) {
|
|
6264
6324
|
let r = e, i = t, a = n(null);
|
|
6265
|
-
|
|
6266
|
-
let s = o(
|
|
6325
|
+
wi(a, F(() => r.visible));
|
|
6326
|
+
let s = o(Fn);
|
|
6267
6327
|
function u(e) {
|
|
6268
6328
|
e.key === "Escape" && i("close"), i("keydown", e);
|
|
6269
6329
|
}
|
|
@@ -6289,30 +6349,30 @@ var Ts = {
|
|
|
6289
6349
|
}, [P("div", {
|
|
6290
6350
|
ref_key: "dialogRef",
|
|
6291
6351
|
ref: a
|
|
6292
|
-
}, [l(t.$slots, "default")], 512)], 40,
|
|
6352
|
+
}, [l(t.$slots, "default")], 512)], 40, hl)) : j("", !0)]),
|
|
6293
6353
|
_: 3
|
|
6294
6354
|
})]));
|
|
6295
6355
|
}
|
|
6296
|
-
}),
|
|
6356
|
+
}), _l = ["disabled", "title"], vl = ["title"], yl = {
|
|
6297
6357
|
key: 0,
|
|
6298
6358
|
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)]",
|
|
6299
6359
|
style: {
|
|
6300
6360
|
"backdrop-filter": "blur(8px)",
|
|
6301
6361
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6302
6362
|
}
|
|
6303
|
-
},
|
|
6363
|
+
}, bl = { 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)]" }, xl = {
|
|
6304
6364
|
key: 0,
|
|
6305
6365
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6306
|
-
},
|
|
6366
|
+
}, Sl = {
|
|
6307
6367
|
key: 1,
|
|
6308
6368
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6309
|
-
},
|
|
6369
|
+
}, Cl = {
|
|
6310
6370
|
key: 2,
|
|
6311
6371
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6312
|
-
},
|
|
6372
|
+
}, wl = ["disabled", "onClick"], Tl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, El = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Dl = {
|
|
6313
6373
|
key: 0,
|
|
6314
6374
|
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)]"
|
|
6315
|
-
},
|
|
6375
|
+
}, Ol = ["disabled", "title"], kl = /* @__PURE__ */ g({
|
|
6316
6376
|
__name: "SnapshotHistory",
|
|
6317
6377
|
props: {
|
|
6318
6378
|
snapshots: {},
|
|
@@ -6321,7 +6381,7 @@ var Ts = {
|
|
|
6321
6381
|
},
|
|
6322
6382
|
emits: ["load", "navigate"],
|
|
6323
6383
|
setup(e, { emit: t }) {
|
|
6324
|
-
let r = e, a = t, { format: o } =
|
|
6384
|
+
let r = e, a = t, { format: o } = Y(), { t: l } = Di(), u = n(!1), d = n(null), p = n(-1);
|
|
6325
6385
|
i(() => r.snapshots.length, () => {
|
|
6326
6386
|
p.value = -1;
|
|
6327
6387
|
});
|
|
@@ -6340,7 +6400,7 @@ var Ts = {
|
|
|
6340
6400
|
t !== -1 && (p.value = t, a("navigate", r.snapshots[t])), u.value = !1;
|
|
6341
6401
|
}
|
|
6342
6402
|
function b(e) {
|
|
6343
|
-
let t =
|
|
6403
|
+
let t = ks(e, l.snapshotHistory, o, 7);
|
|
6344
6404
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
6345
6405
|
month: "short",
|
|
6346
6406
|
day: "numeric",
|
|
@@ -6348,7 +6408,7 @@ var Ts = {
|
|
|
6348
6408
|
minute: "2-digit"
|
|
6349
6409
|
}) : t;
|
|
6350
6410
|
}
|
|
6351
|
-
return
|
|
6411
|
+
return pn(d, () => {
|
|
6352
6412
|
u.value = !1;
|
|
6353
6413
|
}), (t, n) => (f(), C("div", {
|
|
6354
6414
|
ref_key: "dropdownRef",
|
|
@@ -6360,34 +6420,34 @@ var Ts = {
|
|
|
6360
6420
|
disabled: !h.value,
|
|
6361
6421
|
title: w(l).snapshotHistory.olderSnapshot,
|
|
6362
6422
|
onClick: z(_, ["stop"])
|
|
6363
|
-
}, [T(w(
|
|
6423
|
+
}, [T(w(jr), {
|
|
6364
6424
|
size: 14,
|
|
6365
6425
|
"stroke-width": 2
|
|
6366
|
-
})], 8,
|
|
6426
|
+
})], 8, _l),
|
|
6367
6427
|
P("button", {
|
|
6368
6428
|
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)]",
|
|
6369
6429
|
title: w(l).snapshotHistory.tooltip,
|
|
6370
6430
|
onClick: z(v, ["stop"])
|
|
6371
|
-
}, [T(w(
|
|
6431
|
+
}, [T(w(Ir), {
|
|
6372
6432
|
size: 16,
|
|
6373
6433
|
"stroke-width": 1.5
|
|
6374
|
-
}), T(w(
|
|
6434
|
+
}), T(w(Ar), {
|
|
6375
6435
|
class: L(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": u.value }]),
|
|
6376
6436
|
size: 10,
|
|
6377
6437
|
"stroke-width": 2
|
|
6378
|
-
}, null, 8, ["class"])], 8,
|
|
6438
|
+
}, null, 8, ["class"])], 8, vl),
|
|
6379
6439
|
T(ae, { name: "tpl-dropdown" }, {
|
|
6380
|
-
default: c(() => [u.value ? (f(), C("div",
|
|
6440
|
+
default: c(() => [u.value ? (f(), C("div", yl, [P("div", bl, N(w(l).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), C("div", xl, [T(w(Jr), {
|
|
6381
6441
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6382
6442
|
size: 20,
|
|
6383
6443
|
"stroke-width": 2
|
|
6384
|
-
})])) : e.snapshots.length === 0 ? (f(), C("div",
|
|
6444
|
+
})])) : e.snapshots.length === 0 ? (f(), C("div", Sl, N(w(l).snapshotHistory.noSnapshots), 1)) : (f(), C("div", Cl, [(f(!0), C(O, null, s(e.snapshots, (t) => (f(), C("button", {
|
|
6385
6445
|
key: t.id,
|
|
6386
6446
|
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)]",
|
|
6387
6447
|
style: { "background-color": "transparent" },
|
|
6388
6448
|
disabled: e.isRestoring,
|
|
6389
6449
|
onClick: (e) => y(t.id)
|
|
6390
|
-
}, [P("div",
|
|
6450
|
+
}, [P("div", Tl, [P("div", El, [P("span", null, N(b(t.created_at)), 1), t.is_autosave ? (f(), C("span", Dl, N(w(l).snapshotHistory.auto), 1)) : j("", !0)])])], 8, wl))), 128))]))])) : j("", !0)]),
|
|
6391
6451
|
_: 1
|
|
6392
6452
|
}),
|
|
6393
6453
|
P("button", {
|
|
@@ -6395,74 +6455,74 @@ var Ts = {
|
|
|
6395
6455
|
disabled: !m.value,
|
|
6396
6456
|
title: w(l).snapshotHistory.newerSnapshot,
|
|
6397
6457
|
onClick: z(g, ["stop"])
|
|
6398
|
-
}, [T(w(
|
|
6458
|
+
}, [T(w(Mr), {
|
|
6399
6459
|
size: 14,
|
|
6400
6460
|
"stroke-width": 2
|
|
6401
|
-
})], 8,
|
|
6461
|
+
})], 8, Ol)
|
|
6402
6462
|
], 512));
|
|
6403
6463
|
}
|
|
6404
|
-
}),
|
|
6464
|
+
}), Al = /* @__PURE__ */ t({ default: () => jl }), jl = kl;
|
|
6405
6465
|
//#endregion
|
|
6406
6466
|
//#region src/cloud/utils/scoringStyles.ts
|
|
6407
|
-
function
|
|
6467
|
+
function Ml(e) {
|
|
6408
6468
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
6409
6469
|
}
|
|
6410
|
-
function
|
|
6470
|
+
function Nl(e) {
|
|
6411
6471
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
6412
6472
|
}
|
|
6413
|
-
function
|
|
6473
|
+
function Pl(e) {
|
|
6414
6474
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
6415
6475
|
}
|
|
6416
|
-
function
|
|
6476
|
+
function Fl(e) {
|
|
6417
6477
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
6418
6478
|
}
|
|
6419
6479
|
//#endregion
|
|
6420
6480
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6421
|
-
var
|
|
6481
|
+
var Il = {
|
|
6422
6482
|
key: 0,
|
|
6423
6483
|
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)]"
|
|
6424
|
-
},
|
|
6484
|
+
}, Ll = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Rl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, zl = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Bl = ["title"], Vl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Hl = {
|
|
6425
6485
|
key: 0,
|
|
6426
6486
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6427
|
-
},
|
|
6487
|
+
}, Ul = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Wl = {
|
|
6428
6488
|
key: 1,
|
|
6429
6489
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6430
|
-
},
|
|
6490
|
+
}, Gl = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Kl = {
|
|
6431
6491
|
key: 2,
|
|
6432
6492
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6433
|
-
},
|
|
6493
|
+
}, ql = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Jl = {
|
|
6434
6494
|
key: 0,
|
|
6435
6495
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6436
|
-
},
|
|
6496
|
+
}, Yl = {
|
|
6437
6497
|
key: 0,
|
|
6438
6498
|
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)]"
|
|
6439
|
-
},
|
|
6499
|
+
}, Xl = ["onClick"], Zl = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ql = {
|
|
6440
6500
|
key: 0,
|
|
6441
6501
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
6442
|
-
},
|
|
6502
|
+
}, $l = {
|
|
6443
6503
|
key: 0,
|
|
6444
6504
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
6445
|
-
},
|
|
6505
|
+
}, eu = {
|
|
6446
6506
|
key: 0,
|
|
6447
6507
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6448
|
-
},
|
|
6508
|
+
}, tu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, nu = { class: "tpl:flex-1 tpl:min-w-0" }, ru = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, iu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, au = {
|
|
6449
6509
|
key: 0,
|
|
6450
6510
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
6451
|
-
},
|
|
6511
|
+
}, ou = {
|
|
6452
6512
|
key: 1,
|
|
6453
6513
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
6454
|
-
},
|
|
6514
|
+
}, su = ["disabled", "onClick"], cu = {
|
|
6455
6515
|
key: 0,
|
|
6456
6516
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
6457
|
-
},
|
|
6517
|
+
}, lu = {
|
|
6458
6518
|
key: 3,
|
|
6459
6519
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6460
|
-
},
|
|
6520
|
+
}, uu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, du = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, fu = /* @__PURE__ */ g({
|
|
6461
6521
|
__name: "TemplateScoringPanel",
|
|
6462
6522
|
props: { visible: { type: Boolean } },
|
|
6463
6523
|
emits: ["close"],
|
|
6464
6524
|
setup(e, { emit: t }) {
|
|
6465
|
-
let r = e, a = t, { t: l } =
|
|
6525
|
+
let r = e, a = t, { t: l } = Di(), u = J(q, "TemplateScoringPanel"), d = J($n, "TemplateScoringPanel"), p = o(zn, []), m = n({
|
|
6466
6526
|
spam: !0,
|
|
6467
6527
|
readability: !0,
|
|
6468
6528
|
accessibility: !0,
|
|
@@ -6477,10 +6537,10 @@ var jl = {
|
|
|
6477
6537
|
"accessibility",
|
|
6478
6538
|
"bestPractices"
|
|
6479
6539
|
], v = {
|
|
6480
|
-
spam:
|
|
6481
|
-
readability:
|
|
6482
|
-
accessibility:
|
|
6483
|
-
bestPractices:
|
|
6540
|
+
spam: ai,
|
|
6541
|
+
readability: Br,
|
|
6542
|
+
accessibility: oi,
|
|
6543
|
+
bestPractices: mi
|
|
6484
6544
|
};
|
|
6485
6545
|
function y() {
|
|
6486
6546
|
d.score(u.content.value, p);
|
|
@@ -6508,50 +6568,50 @@ var jl = {
|
|
|
6508
6568
|
"leave-from-class": "tpl:translate-x-0",
|
|
6509
6569
|
"leave-to-class": "tpl:translate-x-full"
|
|
6510
6570
|
}, {
|
|
6511
|
-
default: c(() => [e.visible ? (f(), C("div",
|
|
6571
|
+
default: c(() => [e.visible ? (f(), C("div", Il, [P("div", Ll, [P("div", Rl, [T(w(ii), {
|
|
6512
6572
|
size: 13,
|
|
6513
6573
|
"stroke-width": 2
|
|
6514
|
-
}), P("span", null, N(w(l).scoring.title), 1)]), P("div",
|
|
6574
|
+
}), P("span", null, N(w(l).scoring.title), 1)]), P("div", zl, [w(d).scoringResult.value && !w(d).isScoring.value ? (f(), C("button", {
|
|
6515
6575
|
key: 0,
|
|
6516
6576
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6517
6577
|
title: w(l).scoring.rescore,
|
|
6518
6578
|
onClick: n[0] ||= (e) => y()
|
|
6519
|
-
}, [T(w(
|
|
6579
|
+
}, [T(w(ei), {
|
|
6520
6580
|
size: 14,
|
|
6521
6581
|
"stroke-width": 2
|
|
6522
|
-
})], 8,
|
|
6582
|
+
})], 8, Bl)) : j("", !0), P("button", {
|
|
6523
6583
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6524
6584
|
onClick: n[1] ||= (e) => a("close")
|
|
6525
|
-
}, [T(w(
|
|
6585
|
+
}, [T(w(pi), {
|
|
6526
6586
|
size: 14,
|
|
6527
6587
|
"stroke-width": 2
|
|
6528
|
-
})])])]), P("div",
|
|
6529
|
-
T(w(
|
|
6588
|
+
})])])]), P("div", Vl, [w(d).isScoring.value ? (f(), C("div", Hl, [P("p", Ul, N(w(l).scoring.scoring), 1), T(Si, { class: "tpl:w-3/4" })])) : w(d).error.value && !w(d).scoringResult.value ? (f(), C("div", Wl, [
|
|
6589
|
+
T(w(Pr), {
|
|
6530
6590
|
size: 32,
|
|
6531
6591
|
"stroke-width": 1.5,
|
|
6532
6592
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
6533
6593
|
}),
|
|
6534
|
-
P("p",
|
|
6594
|
+
P("p", Gl, N(w(l).scoring.error), 1),
|
|
6535
6595
|
P("button", {
|
|
6536
6596
|
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)]",
|
|
6537
6597
|
onClick: n[2] ||= (e) => y()
|
|
6538
|
-
}, [T(w(
|
|
6598
|
+
}, [T(w(ei), {
|
|
6539
6599
|
size: 12,
|
|
6540
6600
|
"stroke-width": 2
|
|
6541
6601
|
}), B(" " + N(w(l).scoring.rescore), 1)])
|
|
6542
|
-
])) : w(d).scoringResult.value ? (f(), C("div",
|
|
6602
|
+
])) : w(d).scoringResult.value ? (f(), C("div", Kl, [
|
|
6543
6603
|
P("div", {
|
|
6544
6604
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
6545
|
-
style: D({ backgroundColor: w(
|
|
6605
|
+
style: D({ backgroundColor: w(Nl)(w(d).scoringResult.value.score) })
|
|
6546
6606
|
}, [
|
|
6547
6607
|
P("span", {
|
|
6548
6608
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
6549
|
-
style: D({ color: w(
|
|
6609
|
+
style: D({ color: w(Ml)(w(d).scoringResult.value.score) })
|
|
6550
6610
|
}, N(w(d).scoringResult.value.score), 5),
|
|
6551
|
-
P("span",
|
|
6552
|
-
x() > 0 ? (f(), C("span",
|
|
6611
|
+
P("span", ql, N(w(l).scoring.overallScore), 1),
|
|
6612
|
+
x() > 0 ? (f(), C("span", Jl, N(x()) + " " + N(w(l).scoring.findings), 1)) : j("", !0)
|
|
6553
6613
|
], 4),
|
|
6554
|
-
w(d).fixError.value ? (f(), C("div",
|
|
6614
|
+
w(d).fixError.value ? (f(), C("div", Yl, [T(w(Pr), {
|
|
6555
6615
|
size: 14,
|
|
6556
6616
|
"stroke-width": 2,
|
|
6557
6617
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6566,74 +6626,74 @@ var jl = {
|
|
|
6566
6626
|
(f(), M(h(v[e]), {
|
|
6567
6627
|
size: 14,
|
|
6568
6628
|
"stroke-width": 2,
|
|
6569
|
-
style: D({ color: w(
|
|
6629
|
+
style: D({ color: w(Ml)(w(d).scoringResult.value.categories[e].score) })
|
|
6570
6630
|
}, null, 8, ["style"])),
|
|
6571
|
-
P("span",
|
|
6631
|
+
P("span", Zl, N(w(l).scoring.categories[e]), 1),
|
|
6572
6632
|
P("span", {
|
|
6573
6633
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
6574
6634
|
style: D({
|
|
6575
|
-
color: w(
|
|
6576
|
-
backgroundColor: w(
|
|
6635
|
+
color: w(Ml)(w(d).scoringResult.value.categories[e].score),
|
|
6636
|
+
backgroundColor: w(Nl)(w(d).scoringResult.value.categories[e].score)
|
|
6577
6637
|
})
|
|
6578
6638
|
}, N(w(d).scoringResult.value.categories[e].score), 5),
|
|
6579
|
-
w(d).scoringResult.value.categories[e].findings.length > 0 ? (f(), C("span",
|
|
6580
|
-
T(w(
|
|
6639
|
+
w(d).scoringResult.value.categories[e].findings.length > 0 ? (f(), C("span", Ql, N(w(d).scoringResult.value.categories[e].findings.length), 1)) : j("", !0),
|
|
6640
|
+
T(w(Ar), {
|
|
6581
6641
|
size: 12,
|
|
6582
6642
|
"stroke-width": 2,
|
|
6583
6643
|
class: L(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", m.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
6584
6644
|
}, null, 8, ["class"])
|
|
6585
|
-
], 8,
|
|
6645
|
+
], 8, Xl), m.value[e] ? (f(), C("div", $l, [w(d).scoringResult.value.categories[e].findings.length === 0 ? (f(), C("div", eu, N(w(l).scoring.noFindings), 1)) : j("", !0), (f(!0), C(O, null, s(w(d).scoringResult.value.categories[e].findings, (e) => (f(), C("div", {
|
|
6586
6646
|
key: e.id,
|
|
6587
6647
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
6588
|
-
}, [P("div",
|
|
6648
|
+
}, [P("div", tu, [(f(), M(h(w(e.severity === "high" ? Pr : e.severity === "medium" ? li : qr)), {
|
|
6589
6649
|
size: 13,
|
|
6590
6650
|
"stroke-width": 2,
|
|
6591
6651
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
6592
|
-
style: D({ color: w(
|
|
6593
|
-
}, null, 8, ["style"])), P("div",
|
|
6594
|
-
P("div",
|
|
6652
|
+
style: D({ color: w(Pl)(e.severity) })
|
|
6653
|
+
}, null, 8, ["style"])), P("div", nu, [
|
|
6654
|
+
P("div", ru, [P("span", {
|
|
6595
6655
|
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",
|
|
6596
6656
|
style: D({
|
|
6597
|
-
color: w(
|
|
6598
|
-
backgroundColor: w(
|
|
6657
|
+
color: w(Pl)(e.severity),
|
|
6658
|
+
backgroundColor: w(Fl)(e.severity)
|
|
6599
6659
|
})
|
|
6600
|
-
}, N(w(l).scoring.severity[e.severity]), 5), P("span",
|
|
6601
|
-
e.suggestion ? (f(), C("p",
|
|
6602
|
-
e.blockId ? (f(), C("div",
|
|
6660
|
+
}, N(w(l).scoring.severity[e.severity]), 5), P("span", iu, N(e.message), 1)]),
|
|
6661
|
+
e.suggestion ? (f(), C("p", au, N(e.suggestion), 1)) : j("", !0),
|
|
6662
|
+
e.blockId ? (f(), C("div", ou, [P("button", {
|
|
6603
6663
|
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)]",
|
|
6604
6664
|
style: { "background-color": "transparent" },
|
|
6605
6665
|
disabled: w(d).fixingFindingId.value !== null,
|
|
6606
6666
|
onClick: (t) => b(e)
|
|
6607
|
-
}, [w(d).fixingFindingId.value === e.id ? (f(), M(w(
|
|
6667
|
+
}, [w(d).fixingFindingId.value === e.id ? (f(), M(w(Jr), {
|
|
6608
6668
|
key: 0,
|
|
6609
6669
|
class: "tpl-spinner",
|
|
6610
6670
|
size: 11,
|
|
6611
6671
|
"stroke-width": 2
|
|
6612
|
-
})) : (f(), M(w(
|
|
6672
|
+
})) : (f(), M(w(oi), {
|
|
6613
6673
|
key: 1,
|
|
6614
6674
|
size: 11,
|
|
6615
6675
|
"stroke-width": 2
|
|
6616
|
-
})), B(" " + N(w(d).fixingFindingId.value === e.id ? w(l).scoring.fixing : w(l).scoring.fix), 1)], 8,
|
|
6676
|
+
})), B(" " + N(w(d).fixingFindingId.value === e.id ? w(l).scoring.fixing : w(l).scoring.fix), 1)], 8, su), w(d).fixError.value ? (f(), C("p", cu, N(w(d).fixError.value), 1)) : j("", !0)])) : j("", !0)
|
|
6617
6677
|
])])]))), 128))])) : j("", !0)])), 64))
|
|
6618
|
-
])) : (f(), C("div",
|
|
6678
|
+
])) : (f(), C("div", lu, [T(w(ii), {
|
|
6619
6679
|
size: 32,
|
|
6620
6680
|
"stroke-width": 1.5,
|
|
6621
6681
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6622
|
-
}), P("p",
|
|
6682
|
+
}), P("p", uu, N(w(l).scoring.emptyState), 1)])), P("p", du, N(w(l).aiMenu.disclaimer), 1)])])) : j("", !0)]),
|
|
6623
6683
|
_: 1
|
|
6624
6684
|
}));
|
|
6625
6685
|
}
|
|
6626
|
-
}),
|
|
6686
|
+
}), pu = /* @__PURE__ */ t({ default: () => mu }), mu = /* @__PURE__ */ vi(fu, [["__scopeId", "data-v-3a059e8d"]]), hu = ["aria-busy"], gu = {
|
|
6627
6687
|
id: "tpl-test-email-title",
|
|
6628
6688
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
6629
|
-
},
|
|
6689
|
+
}, _u = { class: "tpl:mb-3" }, vu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, yu = ["value"], bu = ["disabled"], xu = ["value"], Su = {
|
|
6630
6690
|
key: 0,
|
|
6631
6691
|
role: "alert",
|
|
6632
6692
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
6633
|
-
},
|
|
6693
|
+
}, Cu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, wu = ["disabled"], Tu = ["disabled"], Eu = {
|
|
6634
6694
|
key: 0,
|
|
6635
6695
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
6636
|
-
},
|
|
6696
|
+
}, Du = { key: 1 }, Ou = /* @__PURE__ */ g({
|
|
6637
6697
|
__name: "TestEmailModal",
|
|
6638
6698
|
props: {
|
|
6639
6699
|
visible: { type: Boolean },
|
|
@@ -6643,7 +6703,7 @@ var jl = {
|
|
|
6643
6703
|
},
|
|
6644
6704
|
emits: ["send", "close"],
|
|
6645
6705
|
setup(e, { emit: t }) {
|
|
6646
|
-
let r = e, a = t, { t: o } =
|
|
6706
|
+
let r = e, a = t, { t: o } = Di(), l = n("");
|
|
6647
6707
|
i(() => r.visible, (e) => {
|
|
6648
6708
|
e && (l.value = r.allowedEmails[0] ?? "");
|
|
6649
6709
|
});
|
|
@@ -6656,7 +6716,7 @@ var jl = {
|
|
|
6656
6716
|
function p(e) {
|
|
6657
6717
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), u()), e.key === "Escape" && d();
|
|
6658
6718
|
}
|
|
6659
|
-
return (t, n) => (f(), M(
|
|
6719
|
+
return (t, n) => (f(), M(gl, {
|
|
6660
6720
|
visible: e.visible,
|
|
6661
6721
|
onClose: d,
|
|
6662
6722
|
onKeydown: p
|
|
@@ -6672,14 +6732,14 @@ var jl = {
|
|
|
6672
6732
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
6673
6733
|
}
|
|
6674
6734
|
}, [
|
|
6675
|
-
P("h3",
|
|
6676
|
-
P("div",
|
|
6735
|
+
P("h3", gu, N(w(o).testEmail.title), 1),
|
|
6736
|
+
P("div", _u, [P("label", vu, N(w(o).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), C("input", {
|
|
6677
6737
|
key: 0,
|
|
6678
6738
|
type: "text",
|
|
6679
6739
|
value: l.value,
|
|
6680
6740
|
disabled: "",
|
|
6681
6741
|
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)]"
|
|
6682
|
-
}, null, 8,
|
|
6742
|
+
}, null, 8, yu)) : v((f(), C("select", {
|
|
6683
6743
|
key: 1,
|
|
6684
6744
|
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
6685
6745
|
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)]",
|
|
@@ -6687,29 +6747,29 @@ var jl = {
|
|
|
6687
6747
|
}, [(f(!0), C(O, null, s(e.allowedEmails, (e) => (f(), C("option", {
|
|
6688
6748
|
key: e,
|
|
6689
6749
|
value: e
|
|
6690
|
-
}, N(e), 9,
|
|
6691
|
-
e.error ? (f(), C("p",
|
|
6692
|
-
P("div",
|
|
6750
|
+
}, N(e), 9, xu))), 128))], 8, bu)), [[se, l.value]])]),
|
|
6751
|
+
e.error ? (f(), C("p", Su, N(e.error), 1)) : j("", !0),
|
|
6752
|
+
P("div", Cu, [P("button", {
|
|
6693
6753
|
type: "button",
|
|
6694
6754
|
class: L(["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 }]),
|
|
6695
6755
|
disabled: e.isSending,
|
|
6696
6756
|
onClick: d
|
|
6697
|
-
}, N(w(o).testEmail.cancel), 11,
|
|
6757
|
+
}, N(w(o).testEmail.cancel), 11, wu), P("button", {
|
|
6698
6758
|
type: "button",
|
|
6699
6759
|
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)]",
|
|
6700
6760
|
disabled: !l.value || e.isSending,
|
|
6701
6761
|
onClick: u
|
|
6702
|
-
}, [e.isSending ? (f(), C("span",
|
|
6762
|
+
}, [e.isSending ? (f(), C("span", Eu, [T(w(Jr), {
|
|
6703
6763
|
class: "tpl:animate-spin",
|
|
6704
6764
|
size: 12,
|
|
6705
6765
|
"stroke-width": 2
|
|
6706
|
-
}), B(" " + N(w(o).testEmail.sending), 1)])) : (f(), C("span",
|
|
6707
|
-
], 8,
|
|
6766
|
+
}), B(" " + N(w(o).testEmail.sending), 1)])) : (f(), C("span", Du, N(w(o).testEmail.send), 1))], 8, Tu)])
|
|
6767
|
+
], 8, hu)]),
|
|
6708
6768
|
_: 1
|
|
6709
6769
|
}, 8, ["visible"]));
|
|
6710
6770
|
}
|
|
6711
|
-
}),
|
|
6771
|
+
}), ku = /* @__PURE__ */ t({ default: () => Au }), Au = Ou;
|
|
6712
6772
|
//#endregion
|
|
6713
|
-
export {
|
|
6773
|
+
export { Di as $, Fn as $t, mo as A, Ee as An, _r as At, _a as B, Kn as Bt, To as C, Ce as Cn, Lr as Ct, _o as D, be as Dn, Ar as Dt, Z as E, Oe as En, Mr as Et, Va as F, he as Fn, Xn as Ft, qi as G, Wn as Gt, pa as H, Zn as Ht, Ra as I, ge as In, Gn as It, Pi as J, Bn as Jt, Gi as K, q as Kt, Na as L, me as Ln, Yn as Lt, Za as M, ye as Mn, nr as Mt, Ja as N, we as Nn, Y as Nt, vo as O, ve as On, kr as Ot, za as P, _e as Pn, Jn as Pt, Ei as Q, Pn as Qt, ja as R, In as Rt, Oo as S, Ae as Sn, Rr as St, $ as T, xe as Tn, Pr as Tt, la as U, Mn as Ut, ga as V, er as Vt, Qi as W, Rn as Wt, ki as X, Qn as Xt, Ai as Y, Un as Yt, Oi as Z, $n as Zt, zo as _, ft as _n, qr as _t, pl as a, On as an, li as at, No as b, H as bn, Br as bt, Qo as c, rn as cn, oi as ct, Go as d, Et as dn, ni as dt, J as en, wi as et, Wo as f, pt as fn, ei as ft, Bo as g, St as gn, Jr as gt, Vo as h, yt as hn, Yr as ht, gl as i, K as in, di as it, ro as j, ke as jn, lr as jt, go as k, Te as kn, X as kt, Zo as l, an as ln, ii as lt, Ho as m, Ct as mn, Xr as mt, pu as n, xn as nn, _i as nt, Rc as o, Tn as on, ci as ot, Uo as p, xt as pn, Zr as pt, Ii as q, Nn as qt, Al as r, Sn as rn, pi as rt, ws as s, en as sn, si as st, ku as t, pn as tn, vi as tt, Ko as u, Pt as un, ri as ut, Io as v, dt as vn, Kr as vt, wo as w, De as wn, Ir as wt, Mo as x, Se as xn, zr as xt, Fo as y, ut as yn, Gr as yt, va as z, Ln as zt };
|
|
6714
6774
|
|
|
6715
|
-
//# sourceMappingURL=features-
|
|
6775
|
+
//# sourceMappingURL=features-BdkV7kQP.js.map
|