@templatical/editor 0.16.4 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CYAbVB2G.js → AiChatSidebar-LxCHMdcj.js} +1 -1
- package/dist/{AiFeatureMenu-BPCkrHAS.js → AiFeatureMenu-zwSmx9ZW.js} +3 -3
- package/dist/{BlockIssueBadge-BLytBabN.js → BlockIssueBadge-BQ1yB1me.js} +2 -2
- package/dist/{CloudEditor-v8ARYaFW.js → CloudEditor-5ahgKRX8.js} +11 -10
- package/dist/{CollaboratorBar-BQzKZ2zo.js → CollaboratorBar-6PtX-1AS.js} +2 -2
- package/dist/{ColorPicker-Cab6U2sH.js → ColorPicker-DfzDyNKe.js} +57 -58
- package/dist/{CommentsSidebar-C_XLBbo3.js → CommentsSidebar-Cl93TN96.js} +3 -3
- package/dist/{CountdownBlock-173fiO5Z.js → CountdownBlock-DbXfzwae.js} +1 -1
- package/dist/{CountdownToolbar-q3umZ7TZ.js → CountdownToolbar-BqaMWRyB.js} +3 -3
- package/dist/{DesignReferenceSidebar-Bh9uAZ4B.js → DesignReferenceSidebar-jVrdS8wW.js} +2 -2
- package/dist/{IssuesPanel-DltSuU6H.js → IssuesPanel-Bq3yXg6M.js} +2 -2
- package/dist/{MergeTagSuggestion-DrT3LiZ4.js → MergeTagSuggestion-jIpT_jmz.js} +7 -5
- package/dist/{ModuleBrowserModal-CzzChPmN.js → ModuleBrowserModal-B5IH3-1I.js} +7 -7
- package/dist/{ModulePreviewCanvas-C0Q2n3FL.js → ModulePreviewCanvas-CYOLWoZ9.js} +2 -2
- package/dist/{NumberWithSuffix-Bhm2ByHs.js → NumberWithSuffix-9FG7mNnn.js} +1 -1
- package/dist/{ParagraphEditor-BhsBi8p8.js → ParagraphEditor-duWYA6Vv.js} +38 -39
- package/dist/{RichTextEditorContent-ef0fdj6e.js → RichTextEditorContent-DCzmVeyb.js} +13 -13
- package/dist/{SaveModuleDialog-BNN3dcxD.js → SaveModuleDialog-BPUly5h3.js} +6 -6
- package/dist/{SnapshotHistory-tWvgMCe6.js → SnapshotHistory-CmwU3nlN.js} +4 -4
- package/dist/{TemplateScoringPanel-ZhObHWeb.js → TemplateScoringPanel-CMrfa9Rd.js} +3 -3
- package/dist/{TestEmailModal-EdwEcsrD.js → TestEmailModal-zfomMz9i.js} +3 -3
- package/dist/{TitleEditor-DdvRepBq.js → TitleEditor-v0gtezZE.js} +18 -18
- package/dist/{TplModal-Niu4Y96-.js → TplModal-eGFG7k-y.js} +4 -4
- package/dist/{blockTypeIcons-DHcYPMB8.js → blockTypeIcons-Dd0w4T0I.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-AoUwsqor.js → AiFeatureMenu-CtXsam7G.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-AoUwsqor.js.map → AiFeatureMenu-CtXsam7G.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DZU3CfEN.js → BlockIssueBadge-DR7cpDfQ.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-DZU3CfEN.js.map → BlockIssueBadge-DR7cpDfQ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BrZLF_m1.js → CloudEditor-YC5y3AwC.js} +131 -130
- package/dist/cdn/chunks/CloudEditor-YC5y3AwC.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BAC56ez6.js → CollaboratorBar-BOD2j8Kl.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BAC56ez6.js.map → CollaboratorBar-BOD2j8Kl.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DLEoT419.js → ColorPicker-CPMWLHpa.js} +144 -144
- package/dist/cdn/chunks/ColorPicker-CPMWLHpa.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BOF9aTXF.js → CountdownBlock-BmGqb7Zi.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-BOF9aTXF.js.map → CountdownBlock-BmGqb7Zi.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C9bQ5k4E.js → CountdownToolbar-BBwsdGbV.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C9bQ5k4E.js.map → CountdownToolbar-BBwsdGbV.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CHwYahKK.js → IssuesPanel-G0z-j3JS.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-CHwYahKK.js.map → IssuesPanel-G0z-j3JS.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-jesxS7An.js → MergeTagSuggestion-rpZ6Ol-i.js} +8 -6
- package/dist/cdn/chunks/MergeTagSuggestion-rpZ6Ol-i.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-iSXXpAUk.js → ModuleBrowserModal-DiLTY0ec.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-iSXXpAUk.js.map → ModuleBrowserModal-DiLTY0ec.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DIy0MZj2.js → ModulePreviewCanvas-CdV5mEQ6.js} +32 -32
- package/dist/cdn/chunks/{ModulePreviewCanvas-DIy0MZj2.js.map → ModulePreviewCanvas-CdV5mEQ6.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-vPdOG2lO.js → NumberWithSuffix-lqQlf0Uk.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-vPdOG2lO.js.map → NumberWithSuffix-lqQlf0Uk.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D7znI_X1.js → ParagraphEditor-BYoZfURd.js} +75 -75
- package/dist/cdn/chunks/ParagraphEditor-BYoZfURd.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DVwGHbO6.js → RichTextEditorContent-BnPRnXxy.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-DVwGHbO6.js.map → RichTextEditorContent-BnPRnXxy.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D2_qPtE9.js → SaveModuleDialog-C9hUeWyG.js} +20 -20
- package/dist/cdn/chunks/{SaveModuleDialog-D2_qPtE9.js.map → SaveModuleDialog-C9hUeWyG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CKjZ6Cgp.js → TitleEditor-wFvnU3Jr.js} +9 -9
- package/dist/cdn/chunks/TitleEditor-wFvnU3Jr.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-BKecgdgr.js → blockTypeIcons-DNMvDz5B.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-BKecgdgr.js.map → blockTypeIcons-DNMvDz5B.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +2 -2
- package/dist/cdn/chunks/ca-CSl--oWR.js.map +1 -0
- package/dist/cdn/chunks/{de-q9lTCMre.js → de-ZaffrKDP.js} +2 -2
- package/dist/cdn/chunks/de-ZaffrKDP.js.map +1 -0
- package/dist/cdn/chunks/{en-CR4LItrX.js → en-CHuXeJDt.js} +2 -2
- package/dist/cdn/chunks/en-CHuXeJDt.js.map +1 -0
- package/dist/cdn/chunks/{es-CEt-lrGd.js → es-CaC8VQjO.js} +2 -2
- package/dist/cdn/chunks/es-CaC8VQjO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-OZTN_skA.js → extensions-DxcxIlwT.js} +29 -29
- package/dist/cdn/chunks/{extensions-OZTN_skA.js.map → extensions-DxcxIlwT.js.map} +1 -1
- package/dist/cdn/chunks/{features-Bo7H8WNI.js → features-B3qgDBHf.js} +727 -677
- package/dist/cdn/chunks/features-B3qgDBHf.js.map +1 -0
- package/dist/cdn/chunks/{icons-BrNSrnyT.js → icons-kiMqh99T.js} +2 -2
- package/dist/cdn/chunks/{icons-BrNSrnyT.js.map → icons-kiMqh99T.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Cec5DMR3.js → media-library-C5ogiZ4f.js} +451 -451
- package/dist/cdn/chunks/{media-library-Cec5DMR3.js.map → media-library-C5ogiZ4f.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DvBHY0AA.js → pt-BR-C74zfEWH.js} +2 -2
- package/dist/cdn/chunks/pt-BR-C74zfEWH.js.map +1 -0
- package/dist/cdn/chunks/{quality-Dd2iYgRf.js → quality-BftAn_AJ.js} +512 -512
- package/dist/cdn/chunks/{quality-Dd2iYgRf.js.map → quality-BftAn_AJ.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Br-qXdnQ.js → renderer-Cdlo4MVX.js} +16 -16
- package/dist/cdn/chunks/{renderer-Br-qXdnQ.js.map → renderer-Cdlo4MVX.js.map} +1 -1
- package/dist/cdn/chunks/{src-BH8PABpF.js → src-GBA8oUL2.js} +6 -6
- package/dist/cdn/chunks/{src-BH8PABpF.js.map → src-GBA8oUL2.js.map} +1 -1
- package/dist/cdn/chunks/{styles-nqo5BynI.js → styles-B6rdq9JB.js} +219 -219
- package/dist/cdn/chunks/styles-B6rdq9JB.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +53 -52
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{de-q9lTCMre.js → de-ZaffrKDP.js} +1 -1
- package/dist/{en-CR4LItrX.js → en-CHuXeJDt.js} +1 -1
- package/dist/{es-CEt-lrGd.js → es-CaC8VQjO.js} +1 -1
- package/dist/{extensions-B2poxDIo.js → extensions-B4lu0KkE.js} +3 -3
- package/dist/index.d.ts +56 -0
- package/dist/keys-WVNarXg8.js +10 -0
- package/dist/{pt-BR-DvBHY0AA.js → pt-BR-C74zfEWH.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DN4J7w-C.js → styles-mBSbDYeX.js} +98 -98
- package/dist/templatical-editor.js +11 -10
- package/dist/{useCloudI18n-WbfVWq5k.js → useCloudI18n-CIKI0hCd.js} +1 -1
- package/dist/{useEditorCore-DBq2689h.js → useEditorCore-CaaHPKjm.js} +715 -684
- package/dist/{useI18n-eR1yVW0v.js → useI18n-0EU_JVe7.js} +1 -1
- package/dist/{useMergeTag-C3GfSktg.js → useMergeTag-C7v6MVah.js} +2 -2
- package/dist/usePopoverPosition-BDqqnMeo.js +281 -0
- package/package.json +7 -7
- package/dist/cdn/chunks/CloudEditor-BrZLF_m1.js.map +0 -1
- package/dist/cdn/chunks/ColorPicker-DLEoT419.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-jesxS7An.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-D7znI_X1.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CKjZ6Cgp.js.map +0 -1
- package/dist/cdn/chunks/ca-DI1ViqMa.js.map +0 -1
- package/dist/cdn/chunks/de-q9lTCMre.js.map +0 -1
- package/dist/cdn/chunks/en-CR4LItrX.js.map +0 -1
- package/dist/cdn/chunks/es-CEt-lrGd.js.map +0 -1
- package/dist/cdn/chunks/features-Bo7H8WNI.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DvBHY0AA.js.map +0 -1
- package/dist/cdn/chunks/styles-nqo5BynI.js.map +0 -1
- package/dist/color-DhoxCSMv.js +0 -259
- package/dist/keys-BbDgCU6K.js +0 -10
- package/dist/usePopoverRoot-C1j0D7cc.js +0 -8
|
@@ -2,25 +2,25 @@ import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as
|
|
|
2
2
|
import { c as P, o as se, s as ce } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
3
|
import { A as le, C as ue, D as de, M as fe, N as pe, O as me, P as he, S as ge, T as _e, _ as ve, b as ye, c as be, d as xe, f as Se, g as Ce, h as we, j as Te, k as Ee, l as De, m as Oe, n as ke, o as Ae, p as je, r as Me, s as Ne, t as Pe, u as Fe, v as Ie, w as Le, x as Re, y as ze } from "./dist-DoRIUsfz.js";
|
|
4
4
|
import { f as Be, g as Ve, h as He, m as Ue } from "./dist-DYv_Pttj.js";
|
|
5
|
-
import { a as We,
|
|
6
|
-
import { A as
|
|
7
|
-
import { t as
|
|
5
|
+
import { a as We, c as Ge, o as Ke, r as qe, s as Je, t as Ye } from "./usePopoverPosition-BDqqnMeo.js";
|
|
6
|
+
import { A as Xe, C as Ze, D as Qe, E as $e, F as et, I as tt, L as nt, O as rt, P as it, R as at, S as ot, T as st, _ as ct, a as lt, b as ut, d as dt, f as ft, g as pt, h as mt, i as ht, j as gt, k as _t, m as vt, n as yt, o as bt, p as xt, s as St, u as Ct, v as wt, w as Tt, x as Et, y as Dt } from "./keys-WVNarXg8.js";
|
|
7
|
+
import { t as Ot } from "./useI18n-0EU_JVe7.js";
|
|
8
8
|
import { t as F } from "./createLucideIcon-FSF4peHQ.js";
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import "./useCloudI18n-
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
9
|
+
import { t as kt } from "./loader-circle-BT38qSm3.js";
|
|
10
|
+
import { t as At } from "./message-circle-BAHcL9S-.js";
|
|
11
|
+
import { t as jt } from "./trash-2-CRBDolnR.js";
|
|
12
|
+
import { t as Mt } from "./triangle-alert-B2g0ALvq.js";
|
|
13
|
+
import { t as Nt } from "./upload-BKg6hDRW.js";
|
|
14
|
+
import { t as Pt } from "./LoadingTrack-KIcREPlS.js";
|
|
15
|
+
import { t as Ft } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
|
+
import "./useCloudI18n-CIKI0hCd.js";
|
|
17
|
+
import { t as It } from "./useMergeTag-C7v6MVah.js";
|
|
18
|
+
import { t as Lt } from "./useAliveFlag-C43EhZFY.js";
|
|
19
19
|
//#region ../core/dist/index.js
|
|
20
|
-
function
|
|
20
|
+
function Rt(e) {
|
|
21
21
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function zt(e) {
|
|
24
24
|
let t = ee({
|
|
25
25
|
content: e.content ?? xe(e.defaultFontFamily, e.templateDefaults),
|
|
26
26
|
selectedBlockId: null,
|
|
@@ -111,7 +111,7 @@ function Lt(e) {
|
|
|
111
111
|
if (c(n)) return;
|
|
112
112
|
let o = a(t.content.blocks, n);
|
|
113
113
|
if (o && o.type === "section") {
|
|
114
|
-
if (r < 0 || r >=
|
|
114
|
+
if (r < 0 || r >= Rt(o.columns)) return;
|
|
115
115
|
o.children[r] = o.children[r] || [];
|
|
116
116
|
let t = o.children[r];
|
|
117
117
|
i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
|
|
@@ -144,7 +144,7 @@ function Lt(e) {
|
|
|
144
144
|
let u;
|
|
145
145
|
if (r) {
|
|
146
146
|
let e = a(t.content.blocks, r);
|
|
147
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
147
|
+
if (!e || e.type !== "section" || i < 0 || i >= Rt(e.columns)) return;
|
|
148
148
|
e.children[i] = e.children[i] || [], u = e.children[i];
|
|
149
149
|
} else u = t.content.blocks;
|
|
150
150
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -173,9 +173,9 @@ function Lt(e) {
|
|
|
173
173
|
findBlockLocation: u
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
function
|
|
178
|
-
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a =
|
|
176
|
+
var Bt = 50, Vt = 300, Ht = 1500;
|
|
177
|
+
function Ut(e) {
|
|
178
|
+
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = Bt } = e, o = _([]), s = _([]), c = _(!1), l = null, u = null, d = n(() => o.value.length > 0), f = n(() => s.value.length > 0);
|
|
179
179
|
function p() {
|
|
180
180
|
return he(t.value);
|
|
181
181
|
}
|
|
@@ -193,21 +193,21 @@ function Vt(e) {
|
|
|
193
193
|
if (u && u.blockId === e) {
|
|
194
194
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
195
195
|
u = null;
|
|
196
|
-
},
|
|
196
|
+
}, Vt);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
199
|
h(), m(p()), s.value = [], u = {
|
|
200
200
|
blockId: e,
|
|
201
201
|
timeoutId: setTimeout(() => {
|
|
202
202
|
u = null;
|
|
203
|
-
},
|
|
203
|
+
}, Vt)
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
function y() {
|
|
208
208
|
c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
209
209
|
c.value = !1, l = null;
|
|
210
|
-
},
|
|
210
|
+
}, Ht);
|
|
211
211
|
}
|
|
212
212
|
function b() {
|
|
213
213
|
if (o.value.length === 0) return;
|
|
@@ -239,7 +239,7 @@ function Vt(e) {
|
|
|
239
239
|
destroy: C
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Wt(e) {
|
|
243
243
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
244
244
|
...e,
|
|
245
245
|
id: ue(),
|
|
@@ -255,7 +255,7 @@ function Ht(e) {
|
|
|
255
255
|
id: ue()
|
|
256
256
|
})));
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Gt(e) {
|
|
259
259
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
260
260
|
function o(n, r, a) {
|
|
261
261
|
let o = Ne(n, e.blockDefaults);
|
|
@@ -263,9 +263,9 @@ function Ut(e) {
|
|
|
263
263
|
}
|
|
264
264
|
function s(e, n, r) {
|
|
265
265
|
let o = JSON.parse(JSON.stringify(e));
|
|
266
|
-
if (o.id = ue(),
|
|
266
|
+
if (o.id = ue(), Wt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
267
267
|
let t = JSON.parse(JSON.stringify(e));
|
|
268
|
-
return t.id = ue(),
|
|
268
|
+
return t.id = ue(), Wt(t), t;
|
|
269
269
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
270
270
|
else {
|
|
271
271
|
let i = a?.(e.id) ?? null;
|
|
@@ -286,7 +286,7 @@ function Ut(e) {
|
|
|
286
286
|
updateBlockProperty: l
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Kt(e) {
|
|
290
290
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
291
291
|
function c() {
|
|
292
292
|
return typeof a == "function" ? a() : a;
|
|
@@ -322,7 +322,7 @@ function Wt(e) {
|
|
|
322
322
|
destroy: h
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function qt(e) {
|
|
326
326
|
let t = ee(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
|
|
327
327
|
function i(e) {
|
|
328
328
|
return t.has(e);
|
|
@@ -340,7 +340,7 @@ function Gt(e) {
|
|
|
340
340
|
hasHiddenBlocks: r
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Jt(e) {
|
|
344
344
|
let t = _(!1), r = _(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
|
|
345
345
|
async function o() {
|
|
346
346
|
let n = e.definition.value;
|
|
@@ -370,7 +370,7 @@ function Kt(e) {
|
|
|
370
370
|
needsFetch: a
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Yt(e, t) {
|
|
374
374
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
375
375
|
e.addBlock = (r, i, a, o) => {
|
|
376
376
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -386,26 +386,26 @@ function qt(e, t) {
|
|
|
386
386
|
}
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/utils/activeEditorTracker.ts
|
|
389
|
-
var
|
|
390
|
-
function
|
|
391
|
-
let e = ++
|
|
392
|
-
return
|
|
389
|
+
var Xt = /* @__PURE__ */ new Set(), Zt = 0, Qt = 0;
|
|
390
|
+
function $t() {
|
|
391
|
+
let e = ++Qt;
|
|
392
|
+
return Xt.add(e), Zt === 0 && (Zt = e), {
|
|
393
393
|
id: e,
|
|
394
|
-
isActive: () =>
|
|
394
|
+
isActive: () => Xt.size <= 1 || Zt === e,
|
|
395
395
|
claim: () => {
|
|
396
|
-
|
|
396
|
+
Zt = e;
|
|
397
397
|
},
|
|
398
398
|
dispose: () => {
|
|
399
|
-
if (
|
|
400
|
-
let e = Array.from(
|
|
401
|
-
|
|
399
|
+
if (Xt.delete(e), Zt === e) {
|
|
400
|
+
let e = Array.from(Xt);
|
|
401
|
+
Zt = e[e.length - 1] ?? 0;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
406
|
//#endregion
|
|
407
407
|
//#region src/composables/useMergeTagPicker.ts
|
|
408
|
-
function
|
|
408
|
+
function en() {
|
|
409
409
|
let e = _(!1), t = _([]), n = null;
|
|
410
410
|
function r(r) {
|
|
411
411
|
if (n) {
|
|
@@ -435,7 +435,7 @@ function Qt() {
|
|
|
435
435
|
}
|
|
436
436
|
//#endregion
|
|
437
437
|
//#region src/composables/useLogicTagPicker.ts
|
|
438
|
-
function
|
|
438
|
+
function tn() {
|
|
439
439
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
440
440
|
function i(i, a) {
|
|
441
441
|
if (r) {
|
|
@@ -466,11 +466,11 @@ function $t() {
|
|
|
466
466
|
}
|
|
467
467
|
//#endregion
|
|
468
468
|
//#region src/composables/useTemplateLint.ts
|
|
469
|
-
function
|
|
469
|
+
function nn(e) {
|
|
470
470
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
let t = _([]), n = _(!1), r = _(!1), i = v(null), a =
|
|
472
|
+
function rn(e) {
|
|
473
|
+
let t = _([]), n = _(!1), r = _(!1), i = v(null), a = nn(e.options), o = null, s = !1;
|
|
474
474
|
a || l();
|
|
475
475
|
async function l() {
|
|
476
476
|
try {
|
|
@@ -511,12 +511,12 @@ function tn(e) {
|
|
|
511
511
|
}
|
|
512
512
|
//#endregion
|
|
513
513
|
//#region src/utils/blockTypeLabels.ts
|
|
514
|
-
function
|
|
514
|
+
function an(e, t) {
|
|
515
515
|
return t.blocks[e] ?? e;
|
|
516
516
|
}
|
|
517
517
|
//#endregion
|
|
518
518
|
//#region src/composables/useKeyboardReorder.ts
|
|
519
|
-
function
|
|
519
|
+
function on(e, t) {
|
|
520
520
|
let n = _(null), r = _(""), i = null;
|
|
521
521
|
function a(t) {
|
|
522
522
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -543,7 +543,7 @@ function rn(e, t) {
|
|
|
543
543
|
let r = a(n);
|
|
544
544
|
if (!r) return "";
|
|
545
545
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
546
|
-
return i ?
|
|
546
|
+
return i ? an(i.type, t.t) : "";
|
|
547
547
|
}
|
|
548
548
|
function s(t, n) {
|
|
549
549
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -612,13 +612,13 @@ function rn(e, t) {
|
|
|
612
612
|
}
|
|
613
613
|
//#endregion
|
|
614
614
|
//#region src/composables/useUiTheme.ts
|
|
615
|
-
function
|
|
616
|
-
let t =
|
|
615
|
+
function sn(e) {
|
|
616
|
+
let t = Ge("(prefers-color-scheme: dark)");
|
|
617
617
|
return { resolvedTheme: j(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
618
618
|
}
|
|
619
619
|
//#endregion
|
|
620
620
|
//#region src/composables/useThemeStyles.ts
|
|
621
|
-
var
|
|
621
|
+
var cn = {
|
|
622
622
|
bg: "--tpl-bg",
|
|
623
623
|
bgElevated: "--tpl-bg-elevated",
|
|
624
624
|
bgHover: "--tpl-bg-hover",
|
|
@@ -642,10 +642,10 @@ var on = {
|
|
|
642
642
|
dangerLight: "--tpl-danger-light",
|
|
643
643
|
canvasBg: "--tpl-canvas-bg"
|
|
644
644
|
};
|
|
645
|
-
function
|
|
645
|
+
function ln({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
646
646
|
return { themeStyles: j(() => {
|
|
647
647
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
648
|
-
if (a) for (let [e, t] of Object.entries(
|
|
648
|
+
if (a) for (let [e, t] of Object.entries(cn)) {
|
|
649
649
|
let n = a[e];
|
|
650
650
|
n && (r[t] = n);
|
|
651
651
|
}
|
|
@@ -654,27 +654,27 @@ function sn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
654
654
|
}
|
|
655
655
|
//#endregion
|
|
656
656
|
//#region src/utils/logger.ts
|
|
657
|
-
var
|
|
658
|
-
function
|
|
657
|
+
var un = "[Templatical]";
|
|
658
|
+
function dn() {
|
|
659
659
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
660
660
|
}
|
|
661
|
-
var
|
|
661
|
+
var fn = {
|
|
662
662
|
warn(...e) {
|
|
663
|
-
console.warn(
|
|
663
|
+
console.warn(un, ...e);
|
|
664
664
|
},
|
|
665
665
|
error(...e) {
|
|
666
|
-
console.error(
|
|
666
|
+
console.error(un, ...e);
|
|
667
667
|
},
|
|
668
668
|
debug(...e) {
|
|
669
|
-
|
|
669
|
+
dn() || console.debug(un, ...e);
|
|
670
670
|
},
|
|
671
671
|
info(...e) {
|
|
672
|
-
|
|
672
|
+
dn() || console.info(un, ...e);
|
|
673
673
|
}
|
|
674
674
|
};
|
|
675
675
|
//#endregion
|
|
676
676
|
//#region src/composables/useBlockRegistry.ts
|
|
677
|
-
function
|
|
677
|
+
function pn() {
|
|
678
678
|
let e = v(/* @__PURE__ */ new Map());
|
|
679
679
|
function t(t, n) {
|
|
680
680
|
e.value.set(t, n), ne(e);
|
|
@@ -714,7 +714,7 @@ function dn() {
|
|
|
714
714
|
strictFilters: !1
|
|
715
715
|
}).parseAndRender(t.template, e.fieldValues);
|
|
716
716
|
} catch (t) {
|
|
717
|
-
return
|
|
717
|
+
return fn.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
function c(t) {
|
|
@@ -732,9 +732,9 @@ function dn() {
|
|
|
732
732
|
}
|
|
733
733
|
//#endregion
|
|
734
734
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
735
|
-
function
|
|
735
|
+
function mn(e, t) {
|
|
736
736
|
return j(() => {
|
|
737
|
-
let n =
|
|
737
|
+
let n = hn(e.value.blocks);
|
|
738
738
|
if (n.size === 0) return [];
|
|
739
739
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
740
740
|
for (let e of n) {
|
|
@@ -746,11 +746,11 @@ function fn(e, t) {
|
|
|
746
746
|
return i;
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function hn(e) {
|
|
750
750
|
let t = /* @__PURE__ */ new Set();
|
|
751
|
-
return
|
|
751
|
+
return gn(e, t), t;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function gn(e, t) {
|
|
754
754
|
for (let n of e) {
|
|
755
755
|
if (me(n)) {
|
|
756
756
|
t.add(n.customType);
|
|
@@ -759,13 +759,13 @@ function mn(e, t) {
|
|
|
759
759
|
if (n.type === "section") {
|
|
760
760
|
let e = n.children;
|
|
761
761
|
if (!e) continue;
|
|
762
|
-
for (let n of e)
|
|
762
|
+
for (let n of e) gn(n, t);
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
766
|
//#endregion
|
|
767
767
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
768
|
-
var
|
|
768
|
+
var _n = [
|
|
769
769
|
{
|
|
770
770
|
type: "section",
|
|
771
771
|
createBlock: ve
|
|
@@ -819,8 +819,8 @@ var hn = [
|
|
|
819
819
|
createBlock: De
|
|
820
820
|
}
|
|
821
821
|
];
|
|
822
|
-
function
|
|
823
|
-
for (let n of
|
|
822
|
+
function vn(e, t) {
|
|
823
|
+
for (let n of _n) {
|
|
824
824
|
let r = t[n.type];
|
|
825
825
|
r && e.registerBuiltIn(n.type, {
|
|
826
826
|
component: r,
|
|
@@ -829,8 +829,13 @@ function gn(e, t) {
|
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
//#endregion
|
|
832
|
+
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
833
|
+
function yn(e) {
|
|
834
|
+
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
835
|
+
}
|
|
836
|
+
//#endregion
|
|
832
837
|
//#region src/utils/keyboardShortcuts.ts
|
|
833
|
-
function
|
|
838
|
+
function bn(e) {
|
|
834
839
|
for (let t of e.composedPath()) {
|
|
835
840
|
if (!(t instanceof HTMLElement)) continue;
|
|
836
841
|
if (t.isContentEditable) return !0;
|
|
@@ -839,14 +844,14 @@ function _n(e) {
|
|
|
839
844
|
}
|
|
840
845
|
return !1;
|
|
841
846
|
}
|
|
842
|
-
function
|
|
847
|
+
function xn(e, t) {
|
|
843
848
|
let n = e.metaKey || e.ctrlKey;
|
|
844
849
|
if (n && e.key.toLowerCase() === "s") {
|
|
845
850
|
e.preventDefault(), t.onSave?.();
|
|
846
851
|
return;
|
|
847
852
|
}
|
|
848
853
|
if (n && e.key.toLowerCase() === "z") {
|
|
849
|
-
if (
|
|
854
|
+
if (bn(e)) return;
|
|
850
855
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
851
856
|
return;
|
|
852
857
|
}
|
|
@@ -854,11 +859,11 @@ function vn(e, t) {
|
|
|
854
859
|
t.selectBlock(null);
|
|
855
860
|
return;
|
|
856
861
|
}
|
|
857
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
862
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !bn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
858
863
|
}
|
|
859
864
|
//#endregion
|
|
860
865
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
861
|
-
function
|
|
866
|
+
function Sn(e, t, n) {
|
|
862
867
|
if (!e) return [];
|
|
863
868
|
let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
|
|
864
869
|
for (; (o = r.exec(e)) !== null;) {
|
|
@@ -885,20 +890,20 @@ function yn(e, t, n) {
|
|
|
885
890
|
}
|
|
886
891
|
//#endregion
|
|
887
892
|
//#region src/components/MergeTagPreviewText.vue
|
|
888
|
-
var
|
|
893
|
+
var Cn = y({
|
|
889
894
|
name: "MergeTagPreviewText",
|
|
890
895
|
props: { text: {
|
|
891
896
|
type: String,
|
|
892
897
|
required: !0
|
|
893
898
|
} },
|
|
894
899
|
setup(e) {
|
|
895
|
-
let t = N(
|
|
900
|
+
let t = N(Ze, []), n = N($e, Me.liquid), r = j(() => Sn(e.text, t, n));
|
|
896
901
|
return () => r.value.map((e, t) => e.type === "tag" ? ae("span", {
|
|
897
902
|
key: t,
|
|
898
903
|
class: "tpl-merge-tag-label"
|
|
899
904
|
}, e.value) : e.value);
|
|
900
905
|
}
|
|
901
|
-
}),
|
|
906
|
+
}), wn = { class: "tpl:text-center" }, Tn = ["href"], En = /* @__PURE__ */ y({
|
|
902
907
|
__name: "ButtonBlock",
|
|
903
908
|
props: {
|
|
904
909
|
block: {},
|
|
@@ -919,17 +924,17 @@ var bn = y({
|
|
|
919
924
|
};
|
|
920
925
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
921
926
|
});
|
|
922
|
-
return (t, r) => (f(), x("div",
|
|
927
|
+
return (t, r) => (f(), x("div", wn, [b("a", {
|
|
923
928
|
href: e.block.url || "#",
|
|
924
929
|
style: i(n.value),
|
|
925
930
|
class: "tpl:cursor-default",
|
|
926
931
|
onClick: r[0] ||= P(() => {}, ["prevent"])
|
|
927
|
-
}, [w(
|
|
932
|
+
}, [w(Cn, { text: e.block.text }, null, 8, ["text"])], 12, Tn)]));
|
|
928
933
|
}
|
|
929
|
-
}),
|
|
934
|
+
}), Dn = F("bookmark", [["path", {
|
|
930
935
|
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",
|
|
931
936
|
key: "oz39mx"
|
|
932
|
-
}]]),
|
|
937
|
+
}]]), On = F("box", [
|
|
933
938
|
["path", {
|
|
934
939
|
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",
|
|
935
940
|
key: "hh9hay"
|
|
@@ -942,13 +947,13 @@ var bn = y({
|
|
|
942
947
|
d: "M12 22V12",
|
|
943
948
|
key: "d0xqtd"
|
|
944
949
|
}]
|
|
945
|
-
]),
|
|
950
|
+
]), kn = F("code", [["path", {
|
|
946
951
|
d: "m16 18 6-6-6-6",
|
|
947
952
|
key: "eg8j8"
|
|
948
953
|
}], ["path", {
|
|
949
954
|
d: "m8 6-6 6 6 6",
|
|
950
955
|
key: "ppft3o"
|
|
951
|
-
}]]),
|
|
956
|
+
}]]), An = F("copy", [["rect", {
|
|
952
957
|
width: "14",
|
|
953
958
|
height: "14",
|
|
954
959
|
x: "8",
|
|
@@ -959,7 +964,7 @@ var bn = y({
|
|
|
959
964
|
}], ["path", {
|
|
960
965
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
961
966
|
key: "zix9uf"
|
|
962
|
-
}]]),
|
|
967
|
+
}]]), jn = F("eye-off", [
|
|
963
968
|
["path", {
|
|
964
969
|
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",
|
|
965
970
|
key: "ct8e1f"
|
|
@@ -976,10 +981,10 @@ var bn = y({
|
|
|
976
981
|
d: "m2 2 20 20",
|
|
977
982
|
key: "1ooewy"
|
|
978
983
|
}]
|
|
979
|
-
]),
|
|
984
|
+
]), Mn = F("funnel", [["path", {
|
|
980
985
|
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",
|
|
981
986
|
key: "sc7q7i"
|
|
982
|
-
}]]),
|
|
987
|
+
}]]), Nn = F("grip-vertical", [
|
|
983
988
|
["circle", {
|
|
984
989
|
cx: "9",
|
|
985
990
|
cy: "12",
|
|
@@ -1016,7 +1021,7 @@ var bn = y({
|
|
|
1016
1021
|
r: "1",
|
|
1017
1022
|
key: "f4zoj3"
|
|
1018
1023
|
}]
|
|
1019
|
-
]),
|
|
1024
|
+
]), Pn = F("image", [
|
|
1020
1025
|
["rect", {
|
|
1021
1026
|
width: "18",
|
|
1022
1027
|
height: "18",
|
|
@@ -1036,13 +1041,13 @@ var bn = y({
|
|
|
1036
1041
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1037
1042
|
key: "1xmnt7"
|
|
1038
1043
|
}]
|
|
1039
|
-
]),
|
|
1044
|
+
]), Fn = F("navigation", [["polygon", {
|
|
1040
1045
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1041
1046
|
key: "1ltx0t"
|
|
1042
|
-
}]]),
|
|
1047
|
+
}]]), In = F("puzzle", [["path", {
|
|
1043
1048
|
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",
|
|
1044
1049
|
key: "w46dr5"
|
|
1045
|
-
}]]),
|
|
1050
|
+
}]]), Ln = F("share-2", [
|
|
1046
1051
|
["circle", {
|
|
1047
1052
|
cx: "18",
|
|
1048
1053
|
cy: "5",
|
|
@@ -1075,7 +1080,7 @@ var bn = y({
|
|
|
1075
1080
|
y2: "10.49",
|
|
1076
1081
|
key: "1n3mei"
|
|
1077
1082
|
}]
|
|
1078
|
-
]),
|
|
1083
|
+
]), Rn = F("table", [
|
|
1079
1084
|
["path", {
|
|
1080
1085
|
d: "M12 3v18",
|
|
1081
1086
|
key: "108xh3"
|
|
@@ -1096,7 +1101,7 @@ var bn = y({
|
|
|
1096
1101
|
d: "M3 15h18",
|
|
1097
1102
|
key: "5xshup"
|
|
1098
1103
|
}]
|
|
1099
|
-
]),
|
|
1104
|
+
]), zn = F("video", [["path", {
|
|
1100
1105
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1101
1106
|
key: "ftymec"
|
|
1102
1107
|
}], ["rect", {
|
|
@@ -1106,11 +1111,11 @@ var bn = y({
|
|
|
1106
1111
|
height: "12",
|
|
1107
1112
|
rx: "2",
|
|
1108
1113
|
key: "158x01"
|
|
1109
|
-
}]]),
|
|
1114
|
+
}]]), Bn = ["innerHTML"], Vn = [
|
|
1110
1115
|
"src",
|
|
1111
1116
|
"width",
|
|
1112
1117
|
"height"
|
|
1113
|
-
],
|
|
1118
|
+
], Hn = /* @__PURE__ */ y({
|
|
1114
1119
|
__name: "CustomBlockIcon",
|
|
1115
1120
|
props: {
|
|
1116
1121
|
icon: {},
|
|
@@ -1126,14 +1131,14 @@ var bn = y({
|
|
|
1126
1131
|
height: `${n.value}px`
|
|
1127
1132
|
}),
|
|
1128
1133
|
innerHTML: e.icon
|
|
1129
|
-
}, null, 12,
|
|
1134
|
+
}, null, 12, Bn)) : a.value ? (f(), x("img", {
|
|
1130
1135
|
key: 1,
|
|
1131
1136
|
src: e.icon,
|
|
1132
1137
|
width: n.value,
|
|
1133
1138
|
height: n.value,
|
|
1134
1139
|
class: "tpl:inline-block",
|
|
1135
1140
|
alt: ""
|
|
1136
|
-
}, null, 8,
|
|
1141
|
+
}, null, 8, Vn)) : (f(), D(k(On), {
|
|
1137
1142
|
key: 2,
|
|
1138
1143
|
size: n.value,
|
|
1139
1144
|
"stroke-width": 1.5
|
|
@@ -1142,16 +1147,16 @@ var bn = y({
|
|
|
1142
1147
|
});
|
|
1143
1148
|
//#endregion
|
|
1144
1149
|
//#region src/composables/useEditorRoot.ts
|
|
1145
|
-
function
|
|
1146
|
-
return N(
|
|
1150
|
+
function Un() {
|
|
1151
|
+
return N(mt, document) ?? document;
|
|
1147
1152
|
}
|
|
1148
1153
|
//#endregion
|
|
1149
1154
|
//#region src/composables/useFocusTrap.ts
|
|
1150
|
-
var
|
|
1151
|
-
function
|
|
1152
|
-
let n =
|
|
1155
|
+
var Wn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1156
|
+
function Gn(e, t) {
|
|
1157
|
+
let n = Un(), r = null, i = null, a = null;
|
|
1153
1158
|
function o() {
|
|
1154
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1159
|
+
return e.value ? Array.from(e.value.querySelectorAll(Wn)).filter((e) => e.offsetParent !== null) : [];
|
|
1155
1160
|
}
|
|
1156
1161
|
function s(e) {
|
|
1157
1162
|
if (e.key !== "Tab") return;
|
|
@@ -1166,7 +1171,7 @@ function Hn(e, t) {
|
|
|
1166
1171
|
a = null;
|
|
1167
1172
|
let t = o();
|
|
1168
1173
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1169
|
-
}), i =
|
|
1174
|
+
}), i = Je(e, "keydown", s);
|
|
1170
1175
|
}
|
|
1171
1176
|
function d(e = {}) {
|
|
1172
1177
|
let t = e.restoreFocus !== !1;
|
|
@@ -1181,7 +1186,7 @@ function Hn(e, t) {
|
|
|
1181
1186
|
}
|
|
1182
1187
|
//#endregion
|
|
1183
1188
|
//#region src/composables/useEmoji.ts
|
|
1184
|
-
function
|
|
1189
|
+
function Kn() {
|
|
1185
1190
|
let [e, t] = He(!1), n = v([]), r = !1;
|
|
1186
1191
|
u(() => {
|
|
1187
1192
|
r = !0;
|
|
@@ -1207,7 +1212,7 @@ function Un() {
|
|
|
1207
1212
|
}
|
|
1208
1213
|
//#endregion
|
|
1209
1214
|
//#region src/composables/useDragDrop.ts
|
|
1210
|
-
function
|
|
1215
|
+
function qn(e) {
|
|
1211
1216
|
let { onBlockMove: t, onBlockAdd: n } = e, r = _(!1), i = _(null), a = _(null);
|
|
1212
1217
|
function o(e) {
|
|
1213
1218
|
r.value = !0, i.value = e;
|
|
@@ -1257,7 +1262,7 @@ function Wn(e) {
|
|
|
1257
1262
|
}
|
|
1258
1263
|
//#endregion
|
|
1259
1264
|
//#region src/composables/useFonts.ts
|
|
1260
|
-
var
|
|
1265
|
+
var Jn = [
|
|
1261
1266
|
{
|
|
1262
1267
|
value: "Arial",
|
|
1263
1268
|
label: "Arial"
|
|
@@ -1286,7 +1291,7 @@ var Gn = [
|
|
|
1286
1291
|
value: "Courier New",
|
|
1287
1292
|
label: "Courier New"
|
|
1288
1293
|
}
|
|
1289
|
-
],
|
|
1294
|
+
], Yn = {
|
|
1290
1295
|
arial: "Arial, sans-serif",
|
|
1291
1296
|
helvetica: "Helvetica, sans-serif",
|
|
1292
1297
|
georgia: "Georgia, serif",
|
|
@@ -1294,14 +1299,14 @@ var Gn = [
|
|
|
1294
1299
|
verdana: "Verdana, sans-serif",
|
|
1295
1300
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1296
1301
|
"courier new": "'Courier New', monospace"
|
|
1297
|
-
},
|
|
1298
|
-
function
|
|
1299
|
-
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = j(() => e?.defaultFallback ??
|
|
1302
|
+
}, Xn = "Arial, sans-serif";
|
|
1303
|
+
function Zn(e) {
|
|
1304
|
+
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = j(() => e?.defaultFallback ?? Xn);
|
|
1300
1305
|
function a(e) {
|
|
1301
1306
|
n.value = e;
|
|
1302
1307
|
}
|
|
1303
1308
|
let o = j(() => {
|
|
1304
|
-
let e = [...
|
|
1309
|
+
let e = [...Jn];
|
|
1305
1310
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1306
1311
|
let r = t.value.map((e) => ({
|
|
1307
1312
|
value: e.name,
|
|
@@ -1314,17 +1319,17 @@ function Jn(e) {
|
|
|
1314
1319
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1315
1320
|
}
|
|
1316
1321
|
function l(e) {
|
|
1317
|
-
return
|
|
1322
|
+
return Jn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1318
1323
|
}
|
|
1319
1324
|
function d() {
|
|
1320
1325
|
if (e?.defaultFont) {
|
|
1321
|
-
if (!n.value && !l(e.defaultFont)) return
|
|
1326
|
+
if (!n.value && !l(e.defaultFont)) return Xn;
|
|
1322
1327
|
if (c(e.defaultFont)) {
|
|
1323
1328
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1324
1329
|
if (t) return t.value;
|
|
1325
1330
|
}
|
|
1326
1331
|
}
|
|
1327
|
-
return
|
|
1332
|
+
return Xn;
|
|
1328
1333
|
}
|
|
1329
1334
|
let f = j(() => d());
|
|
1330
1335
|
function p(e) {
|
|
@@ -1334,7 +1339,7 @@ function Jn(e) {
|
|
|
1334
1339
|
let e = n.fallback ?? i.value;
|
|
1335
1340
|
return `'${n.name}', ${e}`;
|
|
1336
1341
|
}
|
|
1337
|
-
return
|
|
1342
|
+
return Yn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1338
1343
|
}
|
|
1339
1344
|
let m = [], h = !1;
|
|
1340
1345
|
async function g() {
|
|
@@ -1350,7 +1355,7 @@ function Jn(e) {
|
|
|
1350
1355
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1351
1356
|
});
|
|
1352
1357
|
} catch (t) {
|
|
1353
|
-
|
|
1358
|
+
fn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1354
1359
|
}
|
|
1355
1360
|
});
|
|
1356
1361
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -1377,8 +1382,8 @@ function Jn(e) {
|
|
|
1377
1382
|
}
|
|
1378
1383
|
//#endregion
|
|
1379
1384
|
//#region src/composables/useLogicTag.ts
|
|
1380
|
-
function
|
|
1381
|
-
let e = N(
|
|
1385
|
+
function Qn() {
|
|
1386
|
+
let e = N(Et, []), t = N(ut, []), n = N($e, Me.liquid), r = N(Qe, null), i = N(ot, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
1382
1387
|
async function c() {
|
|
1383
1388
|
if (r) {
|
|
1384
1389
|
a.value = !0;
|
|
@@ -1409,7 +1414,7 @@ function Yn() {
|
|
|
1409
1414
|
}
|
|
1410
1415
|
//#endregion
|
|
1411
1416
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1412
|
-
function
|
|
1417
|
+
function $n(e, t, n) {
|
|
1413
1418
|
return Ee(e, n) ? {
|
|
1414
1419
|
type: "logicMergeTagNode",
|
|
1415
1420
|
attrs: {
|
|
@@ -1426,15 +1431,15 @@ function Xn(e, t, n) {
|
|
|
1426
1431
|
}
|
|
1427
1432
|
//#endregion
|
|
1428
1433
|
//#region src/utils/insertLogicTag.ts
|
|
1429
|
-
function
|
|
1434
|
+
function er(e) {
|
|
1430
1435
|
return "before" in e && "after" in e;
|
|
1431
1436
|
}
|
|
1432
|
-
function
|
|
1433
|
-
if (!
|
|
1434
|
-
e.chain().focus().insertContent(
|
|
1437
|
+
function tr(e, t, n) {
|
|
1438
|
+
if (!er(t)) {
|
|
1439
|
+
e.chain().focus().insertContent($n(t.value, t.label, n)).run();
|
|
1435
1440
|
return;
|
|
1436
1441
|
}
|
|
1437
|
-
let r =
|
|
1442
|
+
let r = $n(t.before, t.label, n), i = $n(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1438
1443
|
if (a !== o) {
|
|
1439
1444
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1440
1445
|
return;
|
|
@@ -1443,20 +1448,20 @@ function Qn(e, t, n) {
|
|
|
1443
1448
|
}
|
|
1444
1449
|
//#endregion
|
|
1445
1450
|
//#region src/utils/linkColorExtension.ts
|
|
1446
|
-
function
|
|
1451
|
+
function nr(e) {
|
|
1447
1452
|
if (!e) return null;
|
|
1448
1453
|
let t = e.trim();
|
|
1449
1454
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
1450
1455
|
}
|
|
1451
|
-
function
|
|
1456
|
+
function rr(e) {
|
|
1452
1457
|
return e.extend({ addAttributes() {
|
|
1453
1458
|
return {
|
|
1454
1459
|
...this.parent?.(),
|
|
1455
1460
|
color: {
|
|
1456
1461
|
default: null,
|
|
1457
|
-
parseHTML: (e) =>
|
|
1462
|
+
parseHTML: (e) => nr(qe(e.style.color)),
|
|
1458
1463
|
renderHTML: (e) => {
|
|
1459
|
-
let t =
|
|
1464
|
+
let t = nr(e.color);
|
|
1460
1465
|
return t ? { style: `color: ${t}` } : {};
|
|
1461
1466
|
}
|
|
1462
1467
|
}
|
|
@@ -1465,9 +1470,9 @@ function er(e) {
|
|
|
1465
1470
|
}
|
|
1466
1471
|
//#endregion
|
|
1467
1472
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1468
|
-
function
|
|
1473
|
+
function ir(e) {
|
|
1469
1474
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
1470
|
-
|
|
1475
|
+
Gn(i, t);
|
|
1471
1476
|
function a() {
|
|
1472
1477
|
let i = e.value?.getAttributes("link") ?? {};
|
|
1473
1478
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -1476,7 +1481,7 @@ function tr(e) {
|
|
|
1476
1481
|
if (n.value) {
|
|
1477
1482
|
let t = c(n.value);
|
|
1478
1483
|
if (t !== null) {
|
|
1479
|
-
let n =
|
|
1484
|
+
let n = nr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1480
1485
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
1481
1486
|
}
|
|
1482
1487
|
}
|
|
@@ -1523,8 +1528,8 @@ function tr(e) {
|
|
|
1523
1528
|
}
|
|
1524
1529
|
//#endregion
|
|
1525
1530
|
//#region src/composables/useRichTextEditor.ts
|
|
1526
|
-
function
|
|
1527
|
-
let t = N(
|
|
1531
|
+
function ar(e) {
|
|
1532
|
+
let t = N(vt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = It(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = Qn(), f = N(tt, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = ir(y), { start: k, stop: ee } = Ue(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), A = v(null), te = _(!0), j = _(null), ne = !1;
|
|
1528
1533
|
async function M() {
|
|
1529
1534
|
j.value = null, te.value = !0;
|
|
1530
1535
|
try {
|
|
@@ -1554,7 +1559,7 @@ function nr(e) {
|
|
|
1554
1559
|
y.value = l, te.value = !1, k();
|
|
1555
1560
|
} catch (t) {
|
|
1556
1561
|
if (ne) return;
|
|
1557
|
-
|
|
1562
|
+
fn.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), j.value = t instanceof Error ? t.message : "Failed to load editor", te.value = !1;
|
|
1558
1563
|
}
|
|
1559
1564
|
}
|
|
1560
1565
|
function re() {
|
|
@@ -1572,7 +1577,7 @@ function nr(e) {
|
|
|
1572
1577
|
let a = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1573
1578
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || a || e.onDone();
|
|
1574
1579
|
}
|
|
1575
|
-
|
|
1580
|
+
Je(document, "mousedown", ae), h(() => {
|
|
1576
1581
|
ne = !0, ie(), ee(), y.value?.destroy();
|
|
1577
1582
|
});
|
|
1578
1583
|
async function oe() {
|
|
@@ -1584,7 +1589,7 @@ function nr(e) {
|
|
|
1584
1589
|
}
|
|
1585
1590
|
async function P() {
|
|
1586
1591
|
let e = await d();
|
|
1587
|
-
ne || (e && y.value ?
|
|
1592
|
+
ne || (e && y.value ? tr(y.value, e, o) : y.value?.commands.focus());
|
|
1588
1593
|
}
|
|
1589
1594
|
return {
|
|
1590
1595
|
editor: y,
|
|
@@ -1613,9 +1618,9 @@ function nr(e) {
|
|
|
1613
1618
|
}
|
|
1614
1619
|
//#endregion
|
|
1615
1620
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1616
|
-
var
|
|
1617
|
-
function
|
|
1618
|
-
let t =
|
|
1621
|
+
var or = "(max-width: 767px)";
|
|
1622
|
+
function sr(e) {
|
|
1623
|
+
let t = Ge(or);
|
|
1619
1624
|
return {
|
|
1620
1625
|
isSmallScreen: t,
|
|
1621
1626
|
showNotice: j(() => (S(e) ?? !0) && t.value)
|
|
@@ -1623,20 +1628,20 @@ function ir(e) {
|
|
|
1623
1628
|
}
|
|
1624
1629
|
//#endregion
|
|
1625
1630
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1626
|
-
var
|
|
1631
|
+
var cr = { class: "tpl:w-full" }, lr = {
|
|
1627
1632
|
key: 0,
|
|
1628
1633
|
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)]"
|
|
1629
|
-
},
|
|
1634
|
+
}, ur = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, dr = {
|
|
1630
1635
|
key: 1,
|
|
1631
1636
|
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)]"
|
|
1632
|
-
},
|
|
1637
|
+
}, fr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, pr = {
|
|
1633
1638
|
key: 2,
|
|
1634
1639
|
class: "tpl:relative"
|
|
1635
|
-
},
|
|
1640
|
+
}, mr = ["innerHTML"], hr = {
|
|
1636
1641
|
key: 0,
|
|
1637
1642
|
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]",
|
|
1638
1643
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1639
|
-
},
|
|
1644
|
+
}, gr = /* @__PURE__ */ y({
|
|
1640
1645
|
__name: "CustomBlock",
|
|
1641
1646
|
props: {
|
|
1642
1647
|
block: {},
|
|
@@ -1644,7 +1649,7 @@ var ar = { class: "tpl:w-full" }, or = {
|
|
|
1644
1649
|
},
|
|
1645
1650
|
emits: ["fetchData"],
|
|
1646
1651
|
setup(e, { emit: t }) {
|
|
1647
|
-
let n = e, r = t, { t: i } =
|
|
1652
|
+
let n = e, r = t, { t: i } = Ot(), o = N(bt, null), s = _(""), l = _(!1), u = j(() => o?.getDefinition(n.block.customType)), d = j(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = Jt({
|
|
1648
1653
|
definition: u,
|
|
1649
1654
|
block: j(() => n.block),
|
|
1650
1655
|
onUpdate: (e, t) => {
|
|
@@ -1670,10 +1675,10 @@ var ar = { class: "tpl:w-full" }, or = {
|
|
|
1670
1675
|
y();
|
|
1671
1676
|
}), c(() => n.block.fieldValues, () => {
|
|
1672
1677
|
S();
|
|
1673
|
-
}, { deep: !0 }), (e, t) => (f(), x("div",
|
|
1678
|
+
}, { deep: !0 }), (e, t) => (f(), x("div", cr, [d.value ? l.value ? (f(), x("div", dr, [w(k(Mt), {
|
|
1674
1679
|
size: 24,
|
|
1675
1680
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1676
|
-
}), b("span",
|
|
1681
|
+
}), b("span", fr, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", pr, [b("div", { innerHTML: s.value }, null, 8, mr), k(v) && k(g) ? (f(), x("div", hr, [k(m) ? (f(), D(Pt, {
|
|
1677
1682
|
key: 1,
|
|
1678
1683
|
class: "tpl:w-48"
|
|
1679
1684
|
})) : (f(), x("button", {
|
|
@@ -1681,16 +1686,16 @@ var ar = { class: "tpl:w-full" }, or = {
|
|
|
1681
1686
|
type: "button",
|
|
1682
1687
|
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)]",
|
|
1683
1688
|
onClick: t[0] ||= P((...e) => k(h) && k(h)(...e), ["stop"])
|
|
1684
|
-
}, [u.value?.icon ? (f(), D(
|
|
1689
|
+
}, [u.value?.icon ? (f(), D(Hn, {
|
|
1685
1690
|
key: 0,
|
|
1686
1691
|
icon: u.value.icon,
|
|
1687
1692
|
size: 16
|
|
1688
|
-
}, null, 8, ["icon"])) : M("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : M("", !0)])) : (f(), x("div",
|
|
1693
|
+
}, null, 8, ["icon"])) : M("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : M("", !0)])) : (f(), x("div", lr, [w(k(In), {
|
|
1689
1694
|
size: 24,
|
|
1690
1695
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1691
|
-
}), b("span",
|
|
1696
|
+
}), b("span", ur, p(k(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1692
1697
|
}
|
|
1693
|
-
}),
|
|
1698
|
+
}), _r = { class: "tpl:w-full" }, vr = /* @__PURE__ */ y({
|
|
1694
1699
|
__name: "DividerBlock",
|
|
1695
1700
|
props: {
|
|
1696
1701
|
block: {},
|
|
@@ -1702,37 +1707,63 @@ var ar = { class: "tpl:w-full" }, or = {
|
|
|
1702
1707
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1703
1708
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1704
1709
|
}));
|
|
1705
|
-
return (e, t) => (f(), x("div",
|
|
1710
|
+
return (e, t) => (f(), x("div", _r, [b("hr", {
|
|
1706
1711
|
class: "tpl:m-0 tpl:border-none",
|
|
1707
1712
|
style: i(n.value)
|
|
1708
1713
|
}, null, 4)]));
|
|
1709
1714
|
}
|
|
1710
|
-
}),
|
|
1715
|
+
}), yr = { class: "tpl:w-full" }, br = ["srcdoc", "title"], xr = {
|
|
1716
|
+
key: 1,
|
|
1717
|
+
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)]"
|
|
1718
|
+
}, Sr = {
|
|
1711
1719
|
key: 0,
|
|
1712
1720
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1713
|
-
},
|
|
1721
|
+
}, Cr = {
|
|
1714
1722
|
key: 1,
|
|
1715
1723
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1716
|
-
},
|
|
1724
|
+
}, wr = /* @__PURE__ */ y({
|
|
1717
1725
|
__name: "HtmlBlock",
|
|
1718
1726
|
props: {
|
|
1719
1727
|
block: {},
|
|
1720
1728
|
viewport: {}
|
|
1721
1729
|
},
|
|
1722
1730
|
setup(e) {
|
|
1723
|
-
let t = e, { t: n } =
|
|
1724
|
-
|
|
1731
|
+
let t = e, { t: n } = Ot(), r = N(wt, !1), a = j(() => t.block.content.trim().length > 0), o = j(() => r && a.value), s = _(null), l = _(60), u = null;
|
|
1732
|
+
function d() {
|
|
1733
|
+
let e = s.value?.contentDocument;
|
|
1734
|
+
e && (l.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
1735
|
+
}
|
|
1736
|
+
function m() {
|
|
1737
|
+
u?.disconnect(), u = null, d();
|
|
1738
|
+
let e = s.value?.contentDocument?.documentElement;
|
|
1739
|
+
e && typeof ResizeObserver < "u" && (u = new ResizeObserver(() => d()), u.observe(e));
|
|
1740
|
+
}
|
|
1741
|
+
return c(o, (e) => {
|
|
1742
|
+
e || (u?.disconnect(), u = null);
|
|
1743
|
+
}), h(() => {
|
|
1744
|
+
u?.disconnect(), u = null;
|
|
1745
|
+
}), (t, r) => (f(), x("div", yr, [o.value ? (f(), x("iframe", {
|
|
1746
|
+
key: 0,
|
|
1747
|
+
ref_key: "iframeRef",
|
|
1748
|
+
ref: s,
|
|
1749
|
+
srcdoc: e.block.content,
|
|
1750
|
+
sandbox: "allow-same-origin",
|
|
1751
|
+
title: k(n).html.preview,
|
|
1752
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1753
|
+
style: i({ height: `${l.value}px` }),
|
|
1754
|
+
onLoad: m
|
|
1755
|
+
}, null, 44, br)) : (f(), x("div", xr, [w(k(kn), {
|
|
1725
1756
|
size: 24,
|
|
1726
1757
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1727
|
-
}),
|
|
1758
|
+
}), a.value ? (f(), x("span", Sr, p(k(n).html.preview), 1)) : (f(), x("span", Cr, p(k(n).html.empty), 1))]))]));
|
|
1728
1759
|
}
|
|
1729
|
-
}),
|
|
1730
|
-
function
|
|
1731
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } =
|
|
1760
|
+
}), Tr = "image/";
|
|
1761
|
+
function Er(e) {
|
|
1762
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = We(t, {
|
|
1732
1763
|
preventDefaultForUnhandled: !0,
|
|
1733
1764
|
onDrop: (e) => {
|
|
1734
1765
|
if (!i()) return;
|
|
1735
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
1766
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Tr));
|
|
1736
1767
|
t.length > 0 && n([t[0]]);
|
|
1737
1768
|
}
|
|
1738
1769
|
});
|
|
@@ -1740,17 +1771,17 @@ function Sr(e) {
|
|
|
1740
1771
|
}
|
|
1741
1772
|
//#endregion
|
|
1742
1773
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1743
|
-
var
|
|
1774
|
+
var Dr = {
|
|
1744
1775
|
key: 0,
|
|
1745
1776
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1746
1777
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1747
|
-
},
|
|
1778
|
+
}, Or = ["href"], kr = ["src", "alt"], Ar = ["src", "alt"], jr = {
|
|
1748
1779
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1749
1780
|
style: { opacity: "0.7" }
|
|
1750
|
-
},
|
|
1781
|
+
}, Mr = ["href"], Nr = ["src", "alt"], Pr = ["src", "alt"], Fr = {
|
|
1751
1782
|
key: 4,
|
|
1752
1783
|
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)]"
|
|
1753
|
-
},
|
|
1784
|
+
}, Ir = ["aria-label"], Lr = { key: 1 }, Rr = /* @__PURE__ */ y({
|
|
1754
1785
|
__name: "ImageBlock",
|
|
1755
1786
|
props: {
|
|
1756
1787
|
block: {},
|
|
@@ -1758,7 +1789,7 @@ var Cr = {
|
|
|
1758
1789
|
},
|
|
1759
1790
|
emits: ["update"],
|
|
1760
1791
|
setup(e, { emit: t }) {
|
|
1761
|
-
let n = e, r = t, { t: a } =
|
|
1792
|
+
let n = e, r = t, { t: a } = Ot(), { syntax: o } = It(), s = N(rt, null), c = j(() => !!s), l = Lt();
|
|
1762
1793
|
async function u() {
|
|
1763
1794
|
let e = await s?.({ accept: ["images"] });
|
|
1764
1795
|
if (l.alive && e) {
|
|
@@ -1785,7 +1816,7 @@ var Cr = {
|
|
|
1785
1816
|
}
|
|
1786
1817
|
}
|
|
1787
1818
|
}
|
|
1788
|
-
let { isOver: v } =
|
|
1819
|
+
let { isOver: v } = Er({
|
|
1789
1820
|
target: d,
|
|
1790
1821
|
enabled: h,
|
|
1791
1822
|
onFiles: g
|
|
@@ -1805,11 +1836,11 @@ var Cr = {
|
|
|
1805
1836
|
"data-testid": "image-drop-zone",
|
|
1806
1837
|
class: "tpl:relative tpl:w-full",
|
|
1807
1838
|
style: i(y.value)
|
|
1808
|
-
}, [h.value && (k(v) || m.value) ? (f(), x("div",
|
|
1839
|
+
}, [h.value && (k(v) || m.value) ? (f(), x("div", Dr, [m.value ? (f(), x(A, { key: 0 }, [w(k(kt), {
|
|
1809
1840
|
class: "tpl-spinner",
|
|
1810
1841
|
size: 20,
|
|
1811
1842
|
"stroke-width": 2
|
|
1812
|
-
}), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(A, { key: 1 }, [w(k(
|
|
1843
|
+
}), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(A, { key: 1 }, [w(k(Nt), {
|
|
1813
1844
|
size: 20,
|
|
1814
1845
|
"stroke-width": 1.5
|
|
1815
1846
|
}), O(" " + p(k(a).image.dropToUpload), 1)], 64))])) : M("", !0), e.block.src && C.value && e.block.placeholderUrl ? (f(), x(A, { key: 1 }, [e.block.linkUrl ? (f(), x("a", {
|
|
@@ -1824,22 +1855,22 @@ var Cr = {
|
|
|
1824
1855
|
src: e.block.placeholderUrl,
|
|
1825
1856
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1826
1857
|
style: i(S.value)
|
|
1827
|
-
}, null, 12,
|
|
1858
|
+
}, null, 12, kr)], 8, Or)) : (f(), x("img", {
|
|
1828
1859
|
key: 1,
|
|
1829
1860
|
class: "tpl:border-0",
|
|
1830
1861
|
src: e.block.placeholderUrl,
|
|
1831
1862
|
alt: e.block.alt,
|
|
1832
1863
|
style: i(S.value)
|
|
1833
|
-
}, null, 12,
|
|
1864
|
+
}, null, 12, Ar))], 64)) : e.block.src && C.value ? (f(), x("div", {
|
|
1834
1865
|
key: 2,
|
|
1835
1866
|
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)]",
|
|
1836
1867
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
|
|
1837
|
-
}, [w(k(
|
|
1868
|
+
}, [w(k(Pn), {
|
|
1838
1869
|
size: 32,
|
|
1839
1870
|
"stroke-width": 1.5,
|
|
1840
1871
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1841
1872
|
style: { opacity: "0.5" }
|
|
1842
|
-
}), b("span",
|
|
1873
|
+
}), b("span", jr, [w(Cn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(A, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
|
|
1843
1874
|
key: 0,
|
|
1844
1875
|
href: e.block.linkUrl,
|
|
1845
1876
|
target: "_blank",
|
|
@@ -1851,33 +1882,33 @@ var Cr = {
|
|
|
1851
1882
|
src: e.block.src,
|
|
1852
1883
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1853
1884
|
style: i(S.value)
|
|
1854
|
-
}, null, 12,
|
|
1885
|
+
}, null, 12, Nr)], 8, Mr)) : (f(), x("img", {
|
|
1855
1886
|
key: 1,
|
|
1856
1887
|
class: "tpl:border-0",
|
|
1857
1888
|
src: e.block.src,
|
|
1858
1889
|
alt: e.block.alt,
|
|
1859
1890
|
style: i(S.value)
|
|
1860
|
-
}, null, 12,
|
|
1891
|
+
}, null, 12, Pr))], 64)) : (f(), x("div", Fr, [c.value ? (f(), x("button", {
|
|
1861
1892
|
key: 0,
|
|
1862
1893
|
"aria-label": k(a).image.browseMedia,
|
|
1863
1894
|
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)]",
|
|
1864
1895
|
onClick: P(u, ["stop"])
|
|
1865
|
-
}, [w(k(
|
|
1896
|
+
}, [w(k(Pn), {
|
|
1866
1897
|
size: 14,
|
|
1867
1898
|
"stroke-width": 1.5
|
|
1868
|
-
}), O(" " + p(k(a).image.browseMedia), 1)], 8,
|
|
1899
|
+
}), O(" " + p(k(a).image.browseMedia), 1)], 8, Ir)) : (f(), x("span", Lr, p(k(a).image.clickToAdd), 1))]))], 4));
|
|
1869
1900
|
}
|
|
1870
|
-
}),
|
|
1901
|
+
}), zr = { class: "tpl:w-full" }, Br = ["href"], Vr = {
|
|
1871
1902
|
key: 1,
|
|
1872
1903
|
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)]"
|
|
1873
|
-
},
|
|
1904
|
+
}, Hr = /* @__PURE__ */ y({
|
|
1874
1905
|
__name: "MenuBlock",
|
|
1875
1906
|
props: {
|
|
1876
1907
|
block: {},
|
|
1877
1908
|
viewport: {}
|
|
1878
1909
|
},
|
|
1879
1910
|
setup(e) {
|
|
1880
|
-
let n = e, { t: r } =
|
|
1911
|
+
let n = e, { t: r } = Ot(), a = j(() => ({
|
|
1881
1912
|
display: "flex",
|
|
1882
1913
|
flexWrap: "wrap",
|
|
1883
1914
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1889,7 +1920,7 @@ var Cr = {
|
|
|
1889
1920
|
function s(e) {
|
|
1890
1921
|
return e || n.block.linkColor || n.block.color;
|
|
1891
1922
|
}
|
|
1892
|
-
return (n, c) => (f(), x("div",
|
|
1923
|
+
return (n, c) => (f(), x("div", zr, [o.value ? (f(), x("div", {
|
|
1893
1924
|
key: 0,
|
|
1894
1925
|
style: i(a.value)
|
|
1895
1926
|
}, [(f(!0), x(A, null, t(e.block.items, (t, n) => (f(), x(A, { key: t.id }, [b("a", {
|
|
@@ -1901,15 +1932,15 @@ var Cr = {
|
|
|
1901
1932
|
textDecoration: t.underline ? "underline" : "none"
|
|
1902
1933
|
}),
|
|
1903
1934
|
onClick: c[0] ||= P(() => {}, ["prevent"])
|
|
1904
|
-
}, [w(
|
|
1935
|
+
}, [w(Cn, { text: t.text || "..." }, null, 8, ["text"])], 12, Br), n < e.block.items.length - 1 ? (f(), x("span", {
|
|
1905
1936
|
key: 0,
|
|
1906
1937
|
style: i({
|
|
1907
1938
|
color: e.block.separatorColor,
|
|
1908
1939
|
padding: `0 ${e.block.spacing}px`
|
|
1909
1940
|
})
|
|
1910
|
-
}, p(e.block.separator), 5)) : M("", !0)], 64))), 128))], 4)) : (f(), x("div",
|
|
1941
|
+
}, p(e.block.separator), 5)) : M("", !0)], 64))), 128))], 4)) : (f(), x("div", Vr, [w(k(Fn), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
|
|
1911
1942
|
}
|
|
1912
|
-
}),
|
|
1943
|
+
}), Ur = /* @__PURE__ */ new Set([
|
|
1913
1944
|
"http",
|
|
1914
1945
|
"https",
|
|
1915
1946
|
"mailto",
|
|
@@ -1919,7 +1950,7 @@ var Cr = {
|
|
|
1919
1950
|
"sms",
|
|
1920
1951
|
"xmpp",
|
|
1921
1952
|
"cid"
|
|
1922
|
-
]),
|
|
1953
|
+
]), Wr = /* @__PURE__ */ new Set([
|
|
1923
1954
|
"SCRIPT",
|
|
1924
1955
|
"STYLE",
|
|
1925
1956
|
"IFRAME",
|
|
@@ -1929,7 +1960,7 @@ var Cr = {
|
|
|
1929
1960
|
"META",
|
|
1930
1961
|
"BASE",
|
|
1931
1962
|
"FORM"
|
|
1932
|
-
]),
|
|
1963
|
+
]), Gr = /* @__PURE__ */ new Set([
|
|
1933
1964
|
"href",
|
|
1934
1965
|
"xlink:href",
|
|
1935
1966
|
"formaction",
|
|
@@ -1938,16 +1969,16 @@ var Cr = {
|
|
|
1938
1969
|
"background",
|
|
1939
1970
|
"poster"
|
|
1940
1971
|
]);
|
|
1941
|
-
function
|
|
1972
|
+
function Kr(e, t) {
|
|
1942
1973
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1943
1974
|
if (!n || n.startsWith("#")) return !0;
|
|
1944
1975
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1945
1976
|
if (!r) return !0;
|
|
1946
1977
|
let i = r[1].toLowerCase();
|
|
1947
|
-
return
|
|
1978
|
+
return Ur.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1948
1979
|
}
|
|
1949
|
-
function
|
|
1950
|
-
if (
|
|
1980
|
+
function qr(e) {
|
|
1981
|
+
if (Wr.has(e.tagName)) {
|
|
1951
1982
|
e.remove();
|
|
1952
1983
|
return;
|
|
1953
1984
|
}
|
|
@@ -1959,57 +1990,57 @@ function Ur(e) {
|
|
|
1959
1990
|
e.removeAttribute(n);
|
|
1960
1991
|
continue;
|
|
1961
1992
|
}
|
|
1962
|
-
if (
|
|
1963
|
-
|
|
1993
|
+
if (Gr.has(t)) {
|
|
1994
|
+
Kr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1964
1995
|
continue;
|
|
1965
1996
|
}
|
|
1966
1997
|
if (t === "src") {
|
|
1967
|
-
|
|
1998
|
+
Kr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1968
1999
|
continue;
|
|
1969
2000
|
}
|
|
1970
2001
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1971
2002
|
}
|
|
1972
2003
|
let n = Array.from(e.children);
|
|
1973
|
-
for (let e of n)
|
|
2004
|
+
for (let e of n) qr(e);
|
|
1974
2005
|
}
|
|
1975
|
-
function
|
|
2006
|
+
function Jr(e) {
|
|
1976
2007
|
if (typeof DOMParser > "u") return e;
|
|
1977
2008
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1978
|
-
for (let e of n)
|
|
2009
|
+
for (let e of n) qr(e);
|
|
1979
2010
|
return t.innerHTML;
|
|
1980
2011
|
}
|
|
1981
2012
|
//#endregion
|
|
1982
2013
|
//#region src/composables/useEditableTextBlock.ts
|
|
1983
|
-
function
|
|
1984
|
-
let t = N(
|
|
2014
|
+
function Yr(e) {
|
|
2015
|
+
let t = N(Ze, []), { syntax: n } = It(), r = j(() => Jr(Te(fe(e(), t), n))), i = _(!1), a = _(null), { top: o, left: s } = Ke(a), { toLocal: c } = Ye(), l = j(() => c({
|
|
1985
2016
|
top: o.value - 8,
|
|
1986
2017
|
left: s.value
|
|
1987
2018
|
}));
|
|
1988
|
-
function
|
|
2019
|
+
function u() {
|
|
1989
2020
|
i.value = !0;
|
|
1990
2021
|
}
|
|
1991
|
-
function
|
|
2022
|
+
function d() {
|
|
1992
2023
|
i.value = !1;
|
|
1993
2024
|
}
|
|
1994
2025
|
return {
|
|
1995
2026
|
isEditing: i,
|
|
1996
2027
|
blockRef: a,
|
|
1997
|
-
toolbarPosition:
|
|
2028
|
+
toolbarPosition: l,
|
|
1998
2029
|
resolvedContent: r,
|
|
1999
|
-
handleDoubleClick:
|
|
2000
|
-
handleEditorDone:
|
|
2030
|
+
handleDoubleClick: u,
|
|
2031
|
+
handleEditorDone: d
|
|
2001
2032
|
};
|
|
2002
2033
|
}
|
|
2003
2034
|
//#endregion
|
|
2004
2035
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2005
|
-
var
|
|
2036
|
+
var Xr = ["innerHTML"], Zr = /* @__PURE__ */ y({
|
|
2006
2037
|
__name: "ParagraphBlock",
|
|
2007
2038
|
props: {
|
|
2008
2039
|
block: {},
|
|
2009
2040
|
viewport: {}
|
|
2010
2041
|
},
|
|
2011
2042
|
setup(e) {
|
|
2012
|
-
let t = e, n = C(() => import("./ParagraphEditor-
|
|
2043
|
+
let t = e, n = C(() => import("./ParagraphEditor-duWYA6Vv.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Yr(() => t.block.content);
|
|
2013
2044
|
return (t, l) => (f(), x("div", {
|
|
2014
2045
|
ref_key: "blockRef",
|
|
2015
2046
|
ref: i,
|
|
@@ -2028,46 +2059,46 @@ var Kr = ["innerHTML"], qr = /* @__PURE__ */ y({
|
|
|
2028
2059
|
key: 1,
|
|
2029
2060
|
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",
|
|
2030
2061
|
innerHTML: k(o)
|
|
2031
|
-
}, null, 8,
|
|
2062
|
+
}, null, 8, Xr))], 544));
|
|
2032
2063
|
}
|
|
2033
2064
|
});
|
|
2034
2065
|
//#endregion
|
|
2035
2066
|
//#region src/utils/blockComponentResolver.ts
|
|
2036
|
-
function
|
|
2067
|
+
function Qr(e, t, n) {
|
|
2037
2068
|
if (t) {
|
|
2038
2069
|
let n = t.getComponent(e);
|
|
2039
2070
|
if (n) return n;
|
|
2040
2071
|
}
|
|
2041
2072
|
return n[e.type] ?? null;
|
|
2042
2073
|
}
|
|
2043
|
-
function
|
|
2074
|
+
function $r(e) {
|
|
2044
2075
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2045
2076
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2046
2077
|
backgroundColor: n || "transparent"
|
|
2047
2078
|
};
|
|
2048
2079
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2049
2080
|
}
|
|
2050
|
-
function
|
|
2081
|
+
function ei(e) {
|
|
2051
2082
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2052
2083
|
let t = e.wrapper, n = {};
|
|
2053
2084
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
2054
2085
|
}
|
|
2055
2086
|
//#endregion
|
|
2056
2087
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2057
|
-
var
|
|
2088
|
+
var ti = ["data-block-id", "data-block-type"], ni = ["aria-label"], ri = [
|
|
2058
2089
|
"aria-label",
|
|
2059
2090
|
"aria-pressed",
|
|
2060
2091
|
"title"
|
|
2061
|
-
],
|
|
2092
|
+
], ii = ["aria-label", "title"], ai = ["aria-label", "title"], oi = ["aria-label", "title"], si = {
|
|
2062
2093
|
key: 1,
|
|
2063
2094
|
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"
|
|
2064
|
-
},
|
|
2095
|
+
}, ci = { 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)]" }, li = {
|
|
2065
2096
|
key: 2,
|
|
2066
2097
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2067
|
-
},
|
|
2098
|
+
}, ui = ["aria-label", "title"], di = {
|
|
2068
2099
|
key: 3,
|
|
2069
2100
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2070
|
-
},
|
|
2101
|
+
}, fi = ["aria-label"], pi = /*#__PURE__*/ Ft(/* @__PURE__ */ y({
|
|
2071
2102
|
__name: "BlockWrapper",
|
|
2072
2103
|
props: {
|
|
2073
2104
|
block: {},
|
|
@@ -2077,7 +2108,7 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2077
2108
|
},
|
|
2078
2109
|
emits: ["select"],
|
|
2079
2110
|
setup(e, { emit: t }) {
|
|
2080
|
-
let n = C(() => import("./BlockIssueBadge-
|
|
2111
|
+
let n = C(() => import("./BlockIssueBadge-BQ1yB1me.js")), r = e, a = t, { t: s, format: c } = Ot(), l = N(Dt, null), u = _(null), d = j(() => l?.liftedBlockId.value === r.block.id), m = j(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
|
|
2081
2112
|
async function h() {
|
|
2082
2113
|
await ie(), u.value?.focus();
|
|
2083
2114
|
}
|
|
@@ -2103,13 +2134,13 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2103
2134
|
let v = j(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), y = j(() => r.previewMode === !0 && v.value), S = j(() => r.viewport ? {
|
|
2104
2135
|
desktop: s.viewport.desktop,
|
|
2105
2136
|
mobile: s.viewport.mobile
|
|
2106
|
-
}[r.viewport] ?? r.viewport : ""), E = j(() => !!r.block.displayCondition), D = N(
|
|
2107
|
-
let e =
|
|
2137
|
+
}[r.viewport] ?? r.viewport : ""), E = j(() => !!r.block.displayCondition), D = N(ht, null), ee = N(Ct, null), A = N(St, {}), te = j(() => !!A.savedModules), ne = j(() => A.comments?.getBlockCount(r.block.id) ?? 0), re = j(() => {
|
|
2138
|
+
let e = $r(r.block), t = {
|
|
2108
2139
|
padding: e.padding,
|
|
2109
2140
|
backgroundColor: e.backgroundColor
|
|
2110
2141
|
};
|
|
2111
2142
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2112
|
-
}), ae = j(() =>
|
|
2143
|
+
}), ae = j(() => ei(r.block));
|
|
2113
2144
|
function oe(e) {
|
|
2114
2145
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2115
2146
|
}
|
|
@@ -2152,60 +2183,60 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2152
2183
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2153
2184
|
title: k(s).blockActions.drag,
|
|
2154
2185
|
onKeydown: g
|
|
2155
|
-
}, [w(k(
|
|
2186
|
+
}, [w(k(Nn), {
|
|
2156
2187
|
size: 14,
|
|
2157
2188
|
"stroke-width": 1.5
|
|
2158
|
-
})], 40,
|
|
2189
|
+
})], 40, ri),
|
|
2159
2190
|
b("button", {
|
|
2160
2191
|
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",
|
|
2161
2192
|
"aria-label": k(s).blockActions.duplicate,
|
|
2162
2193
|
title: k(s).blockActions.duplicate,
|
|
2163
2194
|
onClick: P(ce, ["stop"])
|
|
2164
|
-
}, [w(k(
|
|
2195
|
+
}, [w(k(An), {
|
|
2165
2196
|
size: 14,
|
|
2166
2197
|
"stroke-width": 1.5
|
|
2167
|
-
})], 8,
|
|
2198
|
+
})], 8, ii),
|
|
2168
2199
|
te.value ? (f(), x("button", {
|
|
2169
2200
|
key: 0,
|
|
2170
2201
|
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",
|
|
2171
2202
|
"aria-label": k(s).blockActions.saveAsModule,
|
|
2172
2203
|
title: k(s).blockActions.saveAsModule,
|
|
2173
2204
|
onClick: P(le, ["stop"])
|
|
2174
|
-
}, [w(k(
|
|
2205
|
+
}, [w(k(Dn), {
|
|
2175
2206
|
size: 14,
|
|
2176
2207
|
"stroke-width": 1.5
|
|
2177
|
-
})], 8,
|
|
2208
|
+
})], 8, ai)) : M("", !0),
|
|
2178
2209
|
b("button", {
|
|
2179
2210
|
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",
|
|
2180
2211
|
"aria-label": k(s).blockActions.delete,
|
|
2181
2212
|
title: k(s).blockActions.delete,
|
|
2182
2213
|
onClick: P(se, ["stop"])
|
|
2183
|
-
}, [w(k(
|
|
2214
|
+
}, [w(k(jt), {
|
|
2184
2215
|
size: 14,
|
|
2185
2216
|
"stroke-width": 1.5
|
|
2186
|
-
})], 8,
|
|
2187
|
-
], 8,
|
|
2188
|
-
v.value ? (f(), x("div",
|
|
2217
|
+
})], 8, oi)
|
|
2218
|
+
], 8, ni)) : M("", !0),
|
|
2219
|
+
v.value ? (f(), x("div", si, [b("span", ci, [w(k(jn), {
|
|
2189
2220
|
size: 12,
|
|
2190
2221
|
"stroke-width": 1.5
|
|
2191
2222
|
}), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : M("", !0),
|
|
2192
|
-
E.value && !v.value ? (f(), x("div",
|
|
2223
|
+
E.value && !v.value ? (f(), x("div", li, [b("button", {
|
|
2193
2224
|
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)]",
|
|
2194
2225
|
"aria-label": k(s).blockActions.conditionToggle,
|
|
2195
2226
|
title: e.block.displayCondition?.label,
|
|
2196
2227
|
onClick: P(ue, ["stop"])
|
|
2197
|
-
}, [w(k(
|
|
2228
|
+
}, [w(k(Mn), {
|
|
2198
2229
|
size: 12,
|
|
2199
2230
|
"stroke-width": 2
|
|
2200
|
-
})], 8,
|
|
2201
|
-
ne.value > 0 && !v.value ? (f(), x("div",
|
|
2231
|
+
})], 8, ui)])) : M("", !0),
|
|
2232
|
+
ne.value > 0 && !v.value ? (f(), x("div", di, [b("button", {
|
|
2202
2233
|
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)]",
|
|
2203
2234
|
"aria-label": k(c)(k(s).blockActions.comments, { count: String(ne.value) }),
|
|
2204
2235
|
onClick: r[0] ||= P((t) => k(A).comments?.openForBlock(e.block.id), ["stop"])
|
|
2205
|
-
}, [w(k(
|
|
2236
|
+
}, [w(k(At), {
|
|
2206
2237
|
size: 12,
|
|
2207
2238
|
"stroke-width": 2.5
|
|
2208
|
-
}), O(" " + p(ne.value), 1)], 8,
|
|
2239
|
+
}), O(" " + p(ne.value), 1)], 8, fi)])) : M("", !0),
|
|
2209
2240
|
ae.value ? (f(), x("div", {
|
|
2210
2241
|
key: 4,
|
|
2211
2242
|
class: "tpl-section-wrapper",
|
|
@@ -2218,31 +2249,31 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2218
2249
|
class: "tpl-block-content",
|
|
2219
2250
|
style: i(re.value)
|
|
2220
2251
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2221
|
-
], 10,
|
|
2252
|
+
], 10, ti));
|
|
2222
2253
|
}
|
|
2223
2254
|
}), [["__scopeId", "data-v-7d9e7893"]]);
|
|
2224
2255
|
//#endregion
|
|
2225
2256
|
//#region src/utils/unwrapParagraph.ts
|
|
2226
|
-
function
|
|
2257
|
+
function mi(e) {
|
|
2227
2258
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2228
2259
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2229
2260
|
}
|
|
2230
2261
|
//#endregion
|
|
2231
2262
|
//#region src/components/blocks/TitleBlock.vue
|
|
2232
|
-
var
|
|
2263
|
+
var hi = /* @__PURE__ */ y({
|
|
2233
2264
|
__name: "TitleBlock",
|
|
2234
2265
|
props: {
|
|
2235
2266
|
block: {},
|
|
2236
2267
|
viewport: {}
|
|
2237
2268
|
},
|
|
2238
2269
|
setup(e) {
|
|
2239
|
-
let t = e, n = C(() => import("./TitleEditor-
|
|
2270
|
+
let t = e, n = C(() => import("./TitleEditor-v0gtezZE.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Yr(() => t.block.content), u = j(() => {
|
|
2240
2271
|
let e = {
|
|
2241
2272
|
fontSize: `${Pe[t.block.level]}px`,
|
|
2242
2273
|
textAlign: t.block.textAlign
|
|
2243
2274
|
};
|
|
2244
2275
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2245
|
-
}), p = j(() => `h${t.block.level}`), m = j(() =>
|
|
2276
|
+
}), p = j(() => `h${t.block.level}`), m = j(() => mi(s.value));
|
|
2246
2277
|
return (t, s) => (f(), x("div", {
|
|
2247
2278
|
ref_key: "blockRef",
|
|
2248
2279
|
ref: a,
|
|
@@ -2268,88 +2299,88 @@ var di = /* @__PURE__ */ y({
|
|
|
2268
2299
|
});
|
|
2269
2300
|
//#endregion
|
|
2270
2301
|
//#region src/utils/sectionColumnDrop.ts
|
|
2271
|
-
function
|
|
2302
|
+
function gi(e) {
|
|
2272
2303
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2273
2304
|
}
|
|
2274
2305
|
//#endregion
|
|
2275
2306
|
//#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2276
|
-
var
|
|
2307
|
+
var _i = Object.defineProperty, vi = Object.getOwnPropertySymbols, yi = Object.prototype.hasOwnProperty, bi = Object.prototype.propertyIsEnumerable, xi = (e, t, n) => t in e ? _i(e, t, {
|
|
2277
2308
|
enumerable: !0,
|
|
2278
2309
|
configurable: !0,
|
|
2279
2310
|
writable: !0,
|
|
2280
2311
|
value: n
|
|
2281
|
-
}) : e[t] = n,
|
|
2282
|
-
for (var n in t ||= {})
|
|
2283
|
-
if (
|
|
2312
|
+
}) : e[t] = n, Si = (e, t) => {
|
|
2313
|
+
for (var n in t ||= {}) yi.call(t, n) && xi(e, n, t[n]);
|
|
2314
|
+
if (vi) for (var n of vi(t)) bi.call(t, n) && xi(e, n, t[n]);
|
|
2284
2315
|
return e;
|
|
2285
|
-
},
|
|
2316
|
+
}, Ci = (e, t) => {
|
|
2286
2317
|
var n = {};
|
|
2287
|
-
for (var r in e)
|
|
2288
|
-
if (e != null &&
|
|
2318
|
+
for (var r in e) yi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2319
|
+
if (e != null && vi) for (var r of vi(e)) t.indexOf(r) < 0 && bi.call(e, r) && (n[r] = e[r]);
|
|
2289
2320
|
return n;
|
|
2290
|
-
},
|
|
2291
|
-
function
|
|
2292
|
-
console.warn(
|
|
2321
|
+
}, wi = "[vue-draggable-plus]: ";
|
|
2322
|
+
function Ti(e) {
|
|
2323
|
+
console.warn(wi + e);
|
|
2293
2324
|
}
|
|
2294
|
-
function
|
|
2295
|
-
console.error(
|
|
2325
|
+
function Ei(e) {
|
|
2326
|
+
console.error(wi + e);
|
|
2296
2327
|
}
|
|
2297
|
-
function
|
|
2328
|
+
function Di(e, t, n) {
|
|
2298
2329
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2299
2330
|
}
|
|
2300
|
-
function
|
|
2331
|
+
function Oi(e) {
|
|
2301
2332
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2302
2333
|
}
|
|
2303
|
-
function
|
|
2304
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2334
|
+
function ki(e) {
|
|
2335
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Oi(n)] = e[n]), t), {});
|
|
2305
2336
|
}
|
|
2306
|
-
function
|
|
2337
|
+
function Ai(e, t) {
|
|
2307
2338
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2308
2339
|
}
|
|
2309
|
-
function
|
|
2340
|
+
function ji(e, t, n) {
|
|
2310
2341
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2311
2342
|
}
|
|
2312
|
-
function
|
|
2343
|
+
function Mi(e) {
|
|
2313
2344
|
return e === void 0;
|
|
2314
2345
|
}
|
|
2315
|
-
function
|
|
2346
|
+
function Ni(e) {
|
|
2316
2347
|
return typeof e == "string";
|
|
2317
2348
|
}
|
|
2318
|
-
function
|
|
2349
|
+
function Pi(e, t, n) {
|
|
2319
2350
|
let r = e.children[n];
|
|
2320
2351
|
e.insertBefore(t, r);
|
|
2321
2352
|
}
|
|
2322
|
-
function
|
|
2353
|
+
function Fi(e) {
|
|
2323
2354
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2324
2355
|
}
|
|
2325
|
-
function
|
|
2356
|
+
function Ii(e, t = document) {
|
|
2326
2357
|
let n = null;
|
|
2327
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2358
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Ti(`Element not found: ${e}`), n;
|
|
2328
2359
|
}
|
|
2329
|
-
function
|
|
2360
|
+
function Li(e, t, n = null) {
|
|
2330
2361
|
return function(...r) {
|
|
2331
2362
|
return e.apply(n, r), t.apply(n, r);
|
|
2332
2363
|
};
|
|
2333
2364
|
}
|
|
2334
|
-
function
|
|
2335
|
-
let n =
|
|
2365
|
+
function Ri(e, t) {
|
|
2366
|
+
let n = Si({}, e);
|
|
2336
2367
|
return Object.keys(t).forEach((r) => {
|
|
2337
|
-
n[r] ? n[r] =
|
|
2368
|
+
n[r] ? n[r] = Li(e[r], t[r]) : n[r] = t[r];
|
|
2338
2369
|
}), n;
|
|
2339
2370
|
}
|
|
2340
|
-
function
|
|
2371
|
+
function zi(e) {
|
|
2341
2372
|
return e instanceof HTMLElement;
|
|
2342
2373
|
}
|
|
2343
|
-
function
|
|
2374
|
+
function Bi(e, t) {
|
|
2344
2375
|
Object.keys(e).forEach((n) => {
|
|
2345
2376
|
t(n, e[n]);
|
|
2346
2377
|
});
|
|
2347
2378
|
}
|
|
2348
|
-
function
|
|
2379
|
+
function Vi(e) {
|
|
2349
2380
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2350
2381
|
}
|
|
2351
|
-
var
|
|
2352
|
-
function
|
|
2382
|
+
var Hi = Object.assign;
|
|
2383
|
+
function Ui(e, t) {
|
|
2353
2384
|
var n = Object.keys(e);
|
|
2354
2385
|
if (Object.getOwnPropertySymbols) {
|
|
2355
2386
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2359,26 +2390,26 @@ function zi(e, t) {
|
|
|
2359
2390
|
}
|
|
2360
2391
|
return n;
|
|
2361
2392
|
}
|
|
2362
|
-
function
|
|
2393
|
+
function Wi(e) {
|
|
2363
2394
|
for (var t = 1; t < arguments.length; t++) {
|
|
2364
2395
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2365
|
-
t % 2 ?
|
|
2366
|
-
|
|
2367
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2396
|
+
t % 2 ? Ui(Object(n), !0).forEach(function(t) {
|
|
2397
|
+
Ki(e, t, n[t]);
|
|
2398
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ui(Object(n)).forEach(function(t) {
|
|
2368
2399
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2369
2400
|
});
|
|
2370
2401
|
}
|
|
2371
2402
|
return e;
|
|
2372
2403
|
}
|
|
2373
|
-
function
|
|
2404
|
+
function Gi(e) {
|
|
2374
2405
|
"@babel/helpers - typeof";
|
|
2375
|
-
return
|
|
2406
|
+
return Gi = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2376
2407
|
return typeof e;
|
|
2377
2408
|
} : function(e) {
|
|
2378
2409
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2379
|
-
},
|
|
2410
|
+
}, Gi(e);
|
|
2380
2411
|
}
|
|
2381
|
-
function
|
|
2412
|
+
function Ki(e, t, n) {
|
|
2382
2413
|
return t in e ? Object.defineProperty(e, t, {
|
|
2383
2414
|
value: n,
|
|
2384
2415
|
enumerable: !0,
|
|
@@ -2386,45 +2417,45 @@ function Hi(e, t, n) {
|
|
|
2386
2417
|
writable: !0
|
|
2387
2418
|
}) : e[t] = n, e;
|
|
2388
2419
|
}
|
|
2389
|
-
function
|
|
2390
|
-
return
|
|
2420
|
+
function qi() {
|
|
2421
|
+
return qi = Object.assign || function(e) {
|
|
2391
2422
|
for (var t = 1; t < arguments.length; t++) {
|
|
2392
2423
|
var n = arguments[t];
|
|
2393
2424
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2394
2425
|
}
|
|
2395
2426
|
return e;
|
|
2396
|
-
},
|
|
2427
|
+
}, qi.apply(this, arguments);
|
|
2397
2428
|
}
|
|
2398
|
-
function
|
|
2429
|
+
function Ji(e, t) {
|
|
2399
2430
|
if (e == null) return {};
|
|
2400
2431
|
var n = {}, r = Object.keys(e), i, a;
|
|
2401
2432
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2402
2433
|
return n;
|
|
2403
2434
|
}
|
|
2404
|
-
function
|
|
2435
|
+
function Yi(e, t) {
|
|
2405
2436
|
if (e == null) return {};
|
|
2406
|
-
var n =
|
|
2437
|
+
var n = Ji(e, t), r, i;
|
|
2407
2438
|
if (Object.getOwnPropertySymbols) {
|
|
2408
2439
|
var a = Object.getOwnPropertySymbols(e);
|
|
2409
2440
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2410
2441
|
}
|
|
2411
2442
|
return n;
|
|
2412
2443
|
}
|
|
2413
|
-
var
|
|
2414
|
-
function
|
|
2444
|
+
var Xi = "1.15.2";
|
|
2445
|
+
function Zi(e) {
|
|
2415
2446
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2416
2447
|
}
|
|
2417
|
-
var
|
|
2448
|
+
var Qi = Zi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), $i = Zi(/Edge/i), ea = Zi(/firefox/i), ta = Zi(/safari/i) && !Zi(/chrome/i) && !Zi(/android/i), na = Zi(/iP(ad|od|hone)/i), ra = Zi(/chrome/i) && Zi(/android/i), ia = {
|
|
2418
2449
|
capture: !1,
|
|
2419
2450
|
passive: !1
|
|
2420
2451
|
};
|
|
2421
2452
|
function I(e, t, n) {
|
|
2422
|
-
e.addEventListener(t, n, !
|
|
2453
|
+
e.addEventListener(t, n, !Qi && ia);
|
|
2423
2454
|
}
|
|
2424
2455
|
function L(e, t, n) {
|
|
2425
|
-
e.removeEventListener(t, n, !
|
|
2456
|
+
e.removeEventListener(t, n, !Qi && ia);
|
|
2426
2457
|
}
|
|
2427
|
-
function
|
|
2458
|
+
function aa(e, t) {
|
|
2428
2459
|
if (t) {
|
|
2429
2460
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2430
2461
|
if (e.matches) return e.matches(t);
|
|
@@ -2436,22 +2467,22 @@ function ta(e, t) {
|
|
|
2436
2467
|
return !1;
|
|
2437
2468
|
}
|
|
2438
2469
|
}
|
|
2439
|
-
function
|
|
2470
|
+
function oa(e) {
|
|
2440
2471
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2441
2472
|
}
|
|
2442
|
-
function
|
|
2473
|
+
function sa(e, t, n, r) {
|
|
2443
2474
|
if (e) {
|
|
2444
2475
|
n ||= document;
|
|
2445
2476
|
do {
|
|
2446
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2477
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && aa(e, t) : aa(e, t)) || r && e === n) return e;
|
|
2447
2478
|
if (e === n) break;
|
|
2448
|
-
} while (e =
|
|
2479
|
+
} while (e = oa(e));
|
|
2449
2480
|
}
|
|
2450
2481
|
return null;
|
|
2451
2482
|
}
|
|
2452
|
-
var
|
|
2483
|
+
var ca = /\s+/g;
|
|
2453
2484
|
function R(e, t, n) {
|
|
2454
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2485
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ca, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ca, " "));
|
|
2455
2486
|
}
|
|
2456
2487
|
function z(e, t, n) {
|
|
2457
2488
|
var r = e && e.style;
|
|
@@ -2460,7 +2491,7 @@ function z(e, t, n) {
|
|
|
2460
2491
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2461
2492
|
}
|
|
2462
2493
|
}
|
|
2463
|
-
function
|
|
2494
|
+
function la(e, t) {
|
|
2464
2495
|
var n = "";
|
|
2465
2496
|
if (typeof e == "string") n = e;
|
|
2466
2497
|
else do {
|
|
@@ -2470,7 +2501,7 @@ function aa(e, t) {
|
|
|
2470
2501
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2471
2502
|
return i && new i(n);
|
|
2472
2503
|
}
|
|
2473
|
-
function
|
|
2504
|
+
function ua(e, t, n) {
|
|
2474
2505
|
if (e) {
|
|
2475
2506
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2476
2507
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2478,13 +2509,13 @@ function oa(e, t, n) {
|
|
|
2478
2509
|
}
|
|
2479
2510
|
return [];
|
|
2480
2511
|
}
|
|
2481
|
-
function
|
|
2512
|
+
function da() {
|
|
2482
2513
|
return document.scrollingElement || document.documentElement;
|
|
2483
2514
|
}
|
|
2484
2515
|
function B(e, t, n, r, i) {
|
|
2485
2516
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2486
2517
|
var a, o, s, c, l, u, d;
|
|
2487
|
-
if (e !== window && e.parentNode && e !==
|
|
2518
|
+
if (e !== window && e.parentNode && e !== da() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Qi)) do
|
|
2488
2519
|
if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
|
|
2489
2520
|
var f = i.getBoundingClientRect();
|
|
2490
2521
|
o -= f.top + parseInt(z(i, "border-top-width")), s -= f.left + parseInt(z(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2492,7 +2523,7 @@ function B(e, t, n, r, i) {
|
|
|
2492
2523
|
}
|
|
2493
2524
|
while (i = i.parentNode);
|
|
2494
2525
|
if (r && e !== window) {
|
|
2495
|
-
var p =
|
|
2526
|
+
var p = la(i || e), m = p && p.a, h = p && p.d;
|
|
2496
2527
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2497
2528
|
}
|
|
2498
2529
|
return {
|
|
@@ -2505,18 +2536,18 @@ function B(e, t, n, r, i) {
|
|
|
2505
2536
|
};
|
|
2506
2537
|
}
|
|
2507
2538
|
}
|
|
2508
|
-
function
|
|
2509
|
-
for (var r =
|
|
2539
|
+
function fa(e, t, n) {
|
|
2540
|
+
for (var r = va(e, !0), i = B(e)[t]; r;) {
|
|
2510
2541
|
var a = B(r)[n], o = void 0;
|
|
2511
2542
|
if (o = i >= a, !o) return r;
|
|
2512
|
-
if (r ===
|
|
2513
|
-
r =
|
|
2543
|
+
if (r === da()) break;
|
|
2544
|
+
r = va(r, !1);
|
|
2514
2545
|
}
|
|
2515
2546
|
return !1;
|
|
2516
2547
|
}
|
|
2517
|
-
function
|
|
2548
|
+
function pa(e, t, n, r) {
|
|
2518
2549
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2519
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2550
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && sa(o[a], n.draggable, e, !1)) {
|
|
2520
2551
|
if (i === t) return o[a];
|
|
2521
2552
|
i++;
|
|
2522
2553
|
}
|
|
@@ -2524,84 +2555,84 @@ function la(e, t, n, r) {
|
|
|
2524
2555
|
}
|
|
2525
2556
|
return null;
|
|
2526
2557
|
}
|
|
2527
|
-
function
|
|
2528
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !
|
|
2558
|
+
function ma(e, t) {
|
|
2559
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !aa(n, t));) n = n.previousElementSibling;
|
|
2529
2560
|
return n || null;
|
|
2530
2561
|
}
|
|
2531
|
-
function
|
|
2562
|
+
function ha(e, t) {
|
|
2532
2563
|
var n = 0;
|
|
2533
2564
|
if (!e || !e.parentNode) return -1;
|
|
2534
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2565
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || aa(e, t)) && n++;
|
|
2535
2566
|
return n;
|
|
2536
2567
|
}
|
|
2537
|
-
function
|
|
2538
|
-
var t = 0, n = 0, r =
|
|
2568
|
+
function ga(e) {
|
|
2569
|
+
var t = 0, n = 0, r = da();
|
|
2539
2570
|
if (e) do {
|
|
2540
|
-
var i =
|
|
2571
|
+
var i = la(e), a = i.a, o = i.d;
|
|
2541
2572
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2542
2573
|
} while (e !== r && (e = e.parentNode));
|
|
2543
2574
|
return [t, n];
|
|
2544
2575
|
}
|
|
2545
|
-
function
|
|
2576
|
+
function _a(e, t) {
|
|
2546
2577
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2547
2578
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2548
2579
|
}
|
|
2549
2580
|
return -1;
|
|
2550
2581
|
}
|
|
2551
|
-
function
|
|
2552
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2582
|
+
function va(e, t) {
|
|
2583
|
+
if (!e || !e.getBoundingClientRect) return da();
|
|
2553
2584
|
var n = e, r = !1;
|
|
2554
2585
|
do
|
|
2555
2586
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2556
2587
|
var i = z(n);
|
|
2557
2588
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2558
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2589
|
+
if (!n.getBoundingClientRect || n === document.body) return da();
|
|
2559
2590
|
if (r || t) return n;
|
|
2560
2591
|
r = !0;
|
|
2561
2592
|
}
|
|
2562
2593
|
}
|
|
2563
2594
|
while (n = n.parentNode);
|
|
2564
|
-
return
|
|
2595
|
+
return da();
|
|
2565
2596
|
}
|
|
2566
|
-
function
|
|
2597
|
+
function ya(e, t) {
|
|
2567
2598
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2568
2599
|
return e;
|
|
2569
2600
|
}
|
|
2570
|
-
function
|
|
2601
|
+
function ba(e, t) {
|
|
2571
2602
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
2572
2603
|
}
|
|
2573
|
-
var
|
|
2574
|
-
function
|
|
2604
|
+
var xa;
|
|
2605
|
+
function Sa(e, t) {
|
|
2575
2606
|
return function() {
|
|
2576
|
-
if (!
|
|
2607
|
+
if (!xa) {
|
|
2577
2608
|
var n = arguments, r = this;
|
|
2578
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2579
|
-
|
|
2609
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), xa = setTimeout(function() {
|
|
2610
|
+
xa = void 0;
|
|
2580
2611
|
}, t);
|
|
2581
2612
|
}
|
|
2582
2613
|
};
|
|
2583
2614
|
}
|
|
2584
|
-
function
|
|
2585
|
-
clearTimeout(
|
|
2615
|
+
function Ca() {
|
|
2616
|
+
clearTimeout(xa), xa = void 0;
|
|
2586
2617
|
}
|
|
2587
|
-
function
|
|
2618
|
+
function wa(e, t, n) {
|
|
2588
2619
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2589
2620
|
}
|
|
2590
|
-
function
|
|
2621
|
+
function Ta(e) {
|
|
2591
2622
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2592
2623
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2593
2624
|
}
|
|
2594
|
-
function
|
|
2625
|
+
function Ea(e, t, n) {
|
|
2595
2626
|
var r = {};
|
|
2596
2627
|
return Array.from(e.children).forEach(function(i) {
|
|
2597
|
-
if (!(!
|
|
2628
|
+
if (!(!sa(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2598
2629
|
var a = B(i);
|
|
2599
2630
|
r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
|
|
2600
2631
|
}
|
|
2601
2632
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2602
2633
|
}
|
|
2603
2634
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2604
|
-
function
|
|
2635
|
+
function Da() {
|
|
2605
2636
|
var e = [], t;
|
|
2606
2637
|
return {
|
|
2607
2638
|
captureAnimationState: function() {
|
|
@@ -2611,9 +2642,9 @@ function Ca() {
|
|
|
2611
2642
|
target: t,
|
|
2612
2643
|
rect: B(t)
|
|
2613
2644
|
});
|
|
2614
|
-
var n =
|
|
2645
|
+
var n = Wi({}, e[e.length - 1].rect);
|
|
2615
2646
|
if (t.thisAnimationDuration) {
|
|
2616
|
-
var r =
|
|
2647
|
+
var r = la(t, !0);
|
|
2617
2648
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2618
2649
|
}
|
|
2619
2650
|
t.fromRect = n;
|
|
@@ -2624,7 +2655,7 @@ function Ca() {
|
|
|
2624
2655
|
e.push(t);
|
|
2625
2656
|
},
|
|
2626
2657
|
removeAnimationState: function(t) {
|
|
2627
|
-
e.splice(
|
|
2658
|
+
e.splice(_a(e, { target: t }), 1);
|
|
2628
2659
|
},
|
|
2629
2660
|
animateAll: function(n) {
|
|
2630
2661
|
var r = this;
|
|
@@ -2634,8 +2665,8 @@ function Ca() {
|
|
|
2634
2665
|
}
|
|
2635
2666
|
var i = !1, a = 0;
|
|
2636
2667
|
e.forEach(function(e) {
|
|
2637
|
-
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2638
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2668
|
+
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = la(n, !0);
|
|
2669
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ba(c, s) && !ba(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = ka(u, c, l, r.options)), ba(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
2639
2670
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2640
2671
|
}, t), n.thisAnimationDuration = t);
|
|
2641
2672
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2645,26 +2676,26 @@ function Ca() {
|
|
|
2645
2676
|
animate: function(e, t, n, r) {
|
|
2646
2677
|
if (r) {
|
|
2647
2678
|
z(e, "transition", ""), z(e, "transform", "");
|
|
2648
|
-
var i =
|
|
2649
|
-
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2679
|
+
var i = la(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2680
|
+
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Oa(e), z(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), z(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2650
2681
|
z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2651
2682
|
}, r);
|
|
2652
2683
|
}
|
|
2653
2684
|
}
|
|
2654
2685
|
};
|
|
2655
2686
|
}
|
|
2656
|
-
function
|
|
2687
|
+
function Oa(e) {
|
|
2657
2688
|
return e.offsetWidth;
|
|
2658
2689
|
}
|
|
2659
|
-
function
|
|
2690
|
+
function ka(e, t, n, r) {
|
|
2660
2691
|
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
2661
2692
|
}
|
|
2662
|
-
var
|
|
2693
|
+
var Aa = [], ja = { initializeByDefault: !0 }, Ma = {
|
|
2663
2694
|
mount: function(e) {
|
|
2664
|
-
for (var t in
|
|
2665
|
-
|
|
2695
|
+
for (var t in ja) ja.hasOwnProperty(t) && !(t in e) && (e[t] = ja[t]);
|
|
2696
|
+
Aa.forEach(function(t) {
|
|
2666
2697
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2667
|
-
}),
|
|
2698
|
+
}), Aa.push(e);
|
|
2668
2699
|
},
|
|
2669
2700
|
pluginEvent: function(e, t, n) {
|
|
2670
2701
|
var r = this;
|
|
@@ -2672,16 +2703,16 @@ var Ea = [], Da = { initializeByDefault: !0 }, Oa = {
|
|
|
2672
2703
|
r.eventCanceled = !0;
|
|
2673
2704
|
};
|
|
2674
2705
|
var i = e + "Global";
|
|
2675
|
-
|
|
2676
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2706
|
+
Aa.forEach(function(r) {
|
|
2707
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Wi({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Wi({ sortable: t }, n)));
|
|
2677
2708
|
});
|
|
2678
2709
|
},
|
|
2679
2710
|
initializePlugins: function(e, t, n, r) {
|
|
2680
|
-
for (var i in
|
|
2711
|
+
for (var i in Aa.forEach(function(r) {
|
|
2681
2712
|
var i = r.pluginName;
|
|
2682
2713
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2683
2714
|
var a = new r(e, t, e.options);
|
|
2684
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2715
|
+
a.sortable = e, a.options = e.options, e[i] = a, qi(n, a.defaults);
|
|
2685
2716
|
}
|
|
2686
2717
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2687
2718
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2690,56 +2721,56 @@ var Ea = [], Da = { initializeByDefault: !0 }, Oa = {
|
|
|
2690
2721
|
},
|
|
2691
2722
|
getEventProperties: function(e, t) {
|
|
2692
2723
|
var n = {};
|
|
2693
|
-
return
|
|
2694
|
-
typeof r.eventProperties == "function" &&
|
|
2724
|
+
return Aa.forEach(function(r) {
|
|
2725
|
+
typeof r.eventProperties == "function" && qi(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2695
2726
|
}), n;
|
|
2696
2727
|
},
|
|
2697
2728
|
modifyOption: function(e, t, n) {
|
|
2698
2729
|
var r;
|
|
2699
|
-
return
|
|
2730
|
+
return Aa.forEach(function(i) {
|
|
2700
2731
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2701
2732
|
}), r;
|
|
2702
2733
|
}
|
|
2703
2734
|
};
|
|
2704
|
-
function
|
|
2735
|
+
function Na(e) {
|
|
2705
2736
|
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
2706
2737
|
if (t ||= n && n[V], t) {
|
|
2707
2738
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2708
|
-
window.CustomEvent && !
|
|
2739
|
+
window.CustomEvent && !Qi && !$i ? h = new CustomEvent(r, {
|
|
2709
2740
|
bubbles: !0,
|
|
2710
2741
|
cancelable: !0
|
|
2711
2742
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
2712
|
-
var v =
|
|
2743
|
+
var v = Wi(Wi({}, m), Ma.getEventProperties(r, t));
|
|
2713
2744
|
for (var y in v) h[y] = v[y];
|
|
2714
2745
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2715
2746
|
}
|
|
2716
2747
|
}
|
|
2717
|
-
var
|
|
2718
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2719
|
-
|
|
2748
|
+
var Pa = ["evt"], H = function(e, t) {
|
|
2749
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Yi(n, Pa);
|
|
2750
|
+
Ma.pluginEvent.bind(Q)(e, t, Wi({
|
|
2720
2751
|
dragEl: W,
|
|
2721
2752
|
parentEl: G,
|
|
2722
2753
|
ghostEl: K,
|
|
2723
2754
|
rootEl: q,
|
|
2724
|
-
nextEl:
|
|
2725
|
-
lastDownEl:
|
|
2755
|
+
nextEl: Fa,
|
|
2756
|
+
lastDownEl: Ia,
|
|
2726
2757
|
cloneEl: J,
|
|
2727
|
-
cloneHidden:
|
|
2728
|
-
dragStarted:
|
|
2758
|
+
cloneHidden: La,
|
|
2759
|
+
dragStarted: Za,
|
|
2729
2760
|
putSortable: X,
|
|
2730
2761
|
activeSortable: Q.active,
|
|
2731
2762
|
originalEvent: r,
|
|
2732
|
-
oldIndex:
|
|
2733
|
-
oldDraggableIndex:
|
|
2763
|
+
oldIndex: Ra,
|
|
2764
|
+
oldDraggableIndex: za,
|
|
2734
2765
|
newIndex: Y,
|
|
2735
|
-
newDraggableIndex:
|
|
2736
|
-
hideGhostForTarget:
|
|
2737
|
-
unhideGhostForTarget:
|
|
2766
|
+
newDraggableIndex: Ba,
|
|
2767
|
+
hideGhostForTarget: go,
|
|
2768
|
+
unhideGhostForTarget: _o,
|
|
2738
2769
|
cloneNowHidden: function() {
|
|
2739
|
-
|
|
2770
|
+
La = !0;
|
|
2740
2771
|
},
|
|
2741
2772
|
cloneNowShown: function() {
|
|
2742
|
-
|
|
2773
|
+
La = !1;
|
|
2743
2774
|
},
|
|
2744
2775
|
dispatchSortableEvent: function(e) {
|
|
2745
2776
|
U({
|
|
@@ -2751,45 +2782,45 @@ var Aa = ["evt"], H = function(e, t) {
|
|
|
2751
2782
|
}, i));
|
|
2752
2783
|
};
|
|
2753
2784
|
function U(e) {
|
|
2754
|
-
|
|
2785
|
+
Na(Wi({
|
|
2755
2786
|
putSortable: X,
|
|
2756
2787
|
cloneEl: J,
|
|
2757
2788
|
targetEl: W,
|
|
2758
2789
|
rootEl: q,
|
|
2759
|
-
oldIndex:
|
|
2760
|
-
oldDraggableIndex:
|
|
2790
|
+
oldIndex: Ra,
|
|
2791
|
+
oldDraggableIndex: za,
|
|
2761
2792
|
newIndex: Y,
|
|
2762
|
-
newDraggableIndex:
|
|
2793
|
+
newDraggableIndex: Ba
|
|
2763
2794
|
}, e));
|
|
2764
2795
|
}
|
|
2765
|
-
var W, G, K, q,
|
|
2766
|
-
if (
|
|
2767
|
-
if (
|
|
2796
|
+
var W, G, K, q, Fa, Ia, J, La, Ra, Y, za, Ba, Va, X, Ha = !1, Ua = !1, Wa = [], Ga, Ka, qa, Ja, Ya, Xa, Za, Qa, $a, eo = !1, to = !1, no, Z, ro = [], io = !1, ao = [], oo = typeof document < "u", so = na, co = $i || Qi ? "cssFloat" : "float", lo = oo && !ra && !na && "draggable" in document.createElement("div"), uo = function() {
|
|
2797
|
+
if (oo) {
|
|
2798
|
+
if (Qi) return !1;
|
|
2768
2799
|
var e = document.createElement("x");
|
|
2769
2800
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2770
2801
|
}
|
|
2771
|
-
}(),
|
|
2772
|
-
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2802
|
+
}(), fo = function(e, t) {
|
|
2803
|
+
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = pa(e, 0, t), a = pa(e, 1, t), o = i && z(i), s = a && z(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + B(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + B(a).width;
|
|
2773
2804
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2774
2805
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2775
2806
|
if (i && o.float && o.float !== "none") {
|
|
2776
2807
|
var u = o.float === "left" ? "left" : "right";
|
|
2777
2808
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2778
2809
|
}
|
|
2779
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2780
|
-
},
|
|
2810
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[co] === "none" || a && n[co] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2811
|
+
}, po = function(e, t, n) {
|
|
2781
2812
|
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
2782
2813
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2783
|
-
},
|
|
2814
|
+
}, mo = function(e, t) {
|
|
2784
2815
|
var n;
|
|
2785
|
-
return
|
|
2816
|
+
return Wa.some(function(r) {
|
|
2786
2817
|
var i = r[V].options.emptyInsertThreshold;
|
|
2787
|
-
if (!(!i ||
|
|
2818
|
+
if (!(!i || ma(r))) {
|
|
2788
2819
|
var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2789
2820
|
if (o && s) return n = r;
|
|
2790
2821
|
}
|
|
2791
2822
|
}), n;
|
|
2792
|
-
},
|
|
2823
|
+
}, ho = function(e) {
|
|
2793
2824
|
function t(e, n) {
|
|
2794
2825
|
return function(r, i, a, o) {
|
|
2795
2826
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2802,31 +2833,31 @@ var W, G, K, q, ja, Ma, J, Na, Pa, Y, Fa, Ia, La, X, Ra = !1, za = !1, Ba = [],
|
|
|
2802
2833
|
};
|
|
2803
2834
|
}
|
|
2804
2835
|
var n = {}, r = e.group;
|
|
2805
|
-
(!r ||
|
|
2806
|
-
},
|
|
2807
|
-
!
|
|
2808
|
-
},
|
|
2809
|
-
!
|
|
2836
|
+
(!r || Gi(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
2837
|
+
}, go = function() {
|
|
2838
|
+
!uo && K && z(K, "display", "none");
|
|
2839
|
+
}, _o = function() {
|
|
2840
|
+
!uo && K && z(K, "display", "");
|
|
2810
2841
|
};
|
|
2811
|
-
|
|
2812
|
-
if (
|
|
2842
|
+
oo && !ra && document.addEventListener("click", function(e) {
|
|
2843
|
+
if (Ua) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ua = !1, !1;
|
|
2813
2844
|
}, !0);
|
|
2814
|
-
var
|
|
2845
|
+
var vo = function(e) {
|
|
2815
2846
|
if (W) {
|
|
2816
2847
|
e = e.touches ? e.touches[0] : e;
|
|
2817
|
-
var t =
|
|
2848
|
+
var t = mo(e.clientX, e.clientY);
|
|
2818
2849
|
if (t) {
|
|
2819
2850
|
var n = {};
|
|
2820
2851
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2821
2852
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2822
2853
|
}
|
|
2823
2854
|
}
|
|
2824
|
-
},
|
|
2855
|
+
}, yo = function(e) {
|
|
2825
2856
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2826
2857
|
};
|
|
2827
2858
|
function Q(e, t) {
|
|
2828
2859
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2829
|
-
this.el = e, this.options = t =
|
|
2860
|
+
this.el = e, this.options = t = qi({}, t), e[V] = this;
|
|
2830
2861
|
var n = {
|
|
2831
2862
|
group: null,
|
|
2832
2863
|
sort: !0,
|
|
@@ -2839,7 +2870,7 @@ function Q(e, t) {
|
|
|
2839
2870
|
invertedSwapThreshold: null,
|
|
2840
2871
|
removeCloneOnHide: !0,
|
|
2841
2872
|
direction: function() {
|
|
2842
|
-
return
|
|
2873
|
+
return fo(e, this.options);
|
|
2843
2874
|
},
|
|
2844
2875
|
ghostClass: "sortable-ghost",
|
|
2845
2876
|
chosenClass: "sortable-chosen",
|
|
@@ -2866,17 +2897,17 @@ function Q(e, t) {
|
|
|
2866
2897
|
x: 0,
|
|
2867
2898
|
y: 0
|
|
2868
2899
|
},
|
|
2869
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2900
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ta,
|
|
2870
2901
|
emptyInsertThreshold: 5
|
|
2871
2902
|
};
|
|
2872
|
-
for (var r in
|
|
2873
|
-
for (var i in
|
|
2874
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
2903
|
+
for (var r in Ma.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2904
|
+
for (var i in ho(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2905
|
+
this.nativeDraggable = !t.forceFallback && lo, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? I(e, "pointerdown", this._onTapStart) : (I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart)), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), Wa.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), qi(this, Da());
|
|
2875
2906
|
}
|
|
2876
2907
|
Q.prototype = {
|
|
2877
2908
|
constructor: Q,
|
|
2878
2909
|
_isOutsideThisEl: function(e) {
|
|
2879
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2910
|
+
!this.el.contains(e) && e !== this.el && (Qa = null);
|
|
2880
2911
|
},
|
|
2881
2912
|
_getDirection: function(e, t) {
|
|
2882
2913
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2884,8 +2915,8 @@ Q.prototype = {
|
|
|
2884
2915
|
_onTapStart: function(e) {
|
|
2885
2916
|
if (e.cancelable) {
|
|
2886
2917
|
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
2887
|
-
if (
|
|
2888
|
-
if (
|
|
2918
|
+
if (ko(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ta && s && s.tagName.toUpperCase() === "SELECT") && (s = sa(s, r.draggable, n, !1), !(s && s.animated) && Ia !== s)) {
|
|
2919
|
+
if (Ra = ha(s), za = ha(s, r.draggable), typeof l == "function") {
|
|
2889
2920
|
if (l.call(this, e, s, this)) {
|
|
2890
2921
|
U({
|
|
2891
2922
|
sortable: t,
|
|
@@ -2898,7 +2929,7 @@ Q.prototype = {
|
|
|
2898
2929
|
return;
|
|
2899
2930
|
}
|
|
2900
2931
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2901
|
-
if (r =
|
|
2932
|
+
if (r = sa(c, r.trim(), n, !1), r) return U({
|
|
2902
2933
|
sortable: t,
|
|
2903
2934
|
rootEl: r,
|
|
2904
2935
|
name: "filter",
|
|
@@ -2910,7 +2941,7 @@ Q.prototype = {
|
|
|
2910
2941
|
i && e.cancelable && e.preventDefault();
|
|
2911
2942
|
return;
|
|
2912
2943
|
}
|
|
2913
|
-
r.handle && !
|
|
2944
|
+
r.handle && !sa(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2914
2945
|
}
|
|
2915
2946
|
}
|
|
2916
2947
|
},
|
|
@@ -2918,23 +2949,23 @@ Q.prototype = {
|
|
|
2918
2949
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2919
2950
|
if (n && !W && n.parentNode === i) {
|
|
2920
2951
|
var c = B(n);
|
|
2921
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2952
|
+
if (q = i, W = n, G = W.parentNode, Fa = W.nextSibling, Ia = n, Va = a.group, Q.dragged = W, Ga = {
|
|
2922
2953
|
target: W,
|
|
2923
2954
|
clientX: (t || e).clientX,
|
|
2924
2955
|
clientY: (t || e).clientY
|
|
2925
|
-
},
|
|
2956
|
+
}, Ya = Ga.clientX - c.left, Xa = Ga.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2926
2957
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2927
2958
|
r._onDrop();
|
|
2928
2959
|
return;
|
|
2929
2960
|
}
|
|
2930
|
-
r._disableDelayedDragEvents(), !
|
|
2961
|
+
r._disableDelayedDragEvents(), !ea && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2931
2962
|
sortable: r,
|
|
2932
2963
|
name: "choose",
|
|
2933
2964
|
originalEvent: e
|
|
2934
2965
|
}), R(W, a.chosenClass, !0);
|
|
2935
2966
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2936
|
-
|
|
2937
|
-
}), I(o, "dragover",
|
|
2967
|
+
ua(W, e.trim(), So);
|
|
2968
|
+
}), I(o, "dragover", vo), I(o, "mousemove", vo), I(o, "touchmove", vo), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), ea && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !($i || Qi))) {
|
|
2938
2969
|
if (Q.eventCanceled) {
|
|
2939
2970
|
this._onDrop();
|
|
2940
2971
|
return;
|
|
@@ -2948,7 +2979,7 @@ Q.prototype = {
|
|
|
2948
2979
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
2949
2980
|
},
|
|
2950
2981
|
_disableDelayedDrag: function() {
|
|
2951
|
-
W &&
|
|
2982
|
+
W && So(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2952
2983
|
},
|
|
2953
2984
|
_disableDelayedDragEvents: function() {
|
|
2954
2985
|
var e = this.el.ownerDocument;
|
|
@@ -2957,14 +2988,14 @@ Q.prototype = {
|
|
|
2957
2988
|
_triggerDragStart: function(e, t) {
|
|
2958
2989
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : t ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(W, "dragend", this), I(q, "dragstart", this._onDragStart));
|
|
2959
2990
|
try {
|
|
2960
|
-
document.selection ?
|
|
2991
|
+
document.selection ? Ao(function() {
|
|
2961
2992
|
document.selection.empty();
|
|
2962
2993
|
}) : window.getSelection().removeAllRanges();
|
|
2963
2994
|
} catch {}
|
|
2964
2995
|
},
|
|
2965
2996
|
_dragStarted: function(e, t) {
|
|
2966
|
-
if (
|
|
2967
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover",
|
|
2997
|
+
if (Ha = !1, q && W) {
|
|
2998
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", yo);
|
|
2968
2999
|
var n = this.options;
|
|
2969
3000
|
!e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2970
3001
|
sortable: this,
|
|
@@ -2974,33 +3005,33 @@ Q.prototype = {
|
|
|
2974
3005
|
} else this._nulling();
|
|
2975
3006
|
},
|
|
2976
3007
|
_emulateDragOver: function() {
|
|
2977
|
-
if (
|
|
2978
|
-
this._lastX =
|
|
2979
|
-
for (var e = document.elementFromPoint(
|
|
3008
|
+
if (Ka) {
|
|
3009
|
+
this._lastX = Ka.clientX, this._lastY = Ka.clientY, go();
|
|
3010
|
+
for (var e = document.elementFromPoint(Ka.clientX, Ka.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Ka.clientX, Ka.clientY), e !== t);) t = e;
|
|
2980
3011
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2981
3012
|
if (t[V]) {
|
|
2982
3013
|
var n = void 0;
|
|
2983
3014
|
if (n = t[V]._onDragOver({
|
|
2984
|
-
clientX:
|
|
2985
|
-
clientY:
|
|
3015
|
+
clientX: Ka.clientX,
|
|
3016
|
+
clientY: Ka.clientY,
|
|
2986
3017
|
target: e,
|
|
2987
3018
|
rootEl: t
|
|
2988
3019
|
}), n && !this.options.dragoverBubble) break;
|
|
2989
3020
|
}
|
|
2990
3021
|
e = t;
|
|
2991
3022
|
} while (t = t.parentNode);
|
|
2992
|
-
|
|
3023
|
+
_o();
|
|
2993
3024
|
}
|
|
2994
3025
|
},
|
|
2995
3026
|
_onTouchMove: function(e) {
|
|
2996
|
-
if (
|
|
2997
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2998
|
-
if (!Q.active && !
|
|
3027
|
+
if (Ga) {
|
|
3028
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && la(K, !0), o = K && a && a.a, s = K && a && a.d, c = so && Z && ga(Z), l = (i.clientX - Ga.clientX + r.x) / (o || 1) + (c ? c[0] - ro[0] : 0) / (o || 1), u = (i.clientY - Ga.clientY + r.y) / (s || 1) + (c ? c[1] - ro[1] : 0) / (s || 1);
|
|
3029
|
+
if (!Q.active && !Ha) {
|
|
2999
3030
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3000
3031
|
this._onDragStart(e, !0);
|
|
3001
3032
|
}
|
|
3002
3033
|
if (K) {
|
|
3003
|
-
a ? (a.e += l - (
|
|
3034
|
+
a ? (a.e += l - (qa || 0), a.f += u - (Ja || 0)) : a = {
|
|
3004
3035
|
a: 1,
|
|
3005
3036
|
b: 0,
|
|
3006
3037
|
c: 0,
|
|
@@ -3009,19 +3040,19 @@ Q.prototype = {
|
|
|
3009
3040
|
f: u
|
|
3010
3041
|
};
|
|
3011
3042
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3012
|
-
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d),
|
|
3043
|
+
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), qa = l, Ja = u, Ka = i;
|
|
3013
3044
|
}
|
|
3014
3045
|
e.cancelable && e.preventDefault();
|
|
3015
3046
|
}
|
|
3016
3047
|
},
|
|
3017
3048
|
_appendGhost: function() {
|
|
3018
3049
|
if (!K) {
|
|
3019
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0,
|
|
3020
|
-
if (
|
|
3050
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, so, !0, e), n = this.options;
|
|
3051
|
+
if (so) {
|
|
3021
3052
|
for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3022
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3053
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = da()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = da(), ro = ga(Z);
|
|
3023
3054
|
}
|
|
3024
|
-
K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position",
|
|
3055
|
+
K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position", so ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", Ya / parseInt(K.style.width) * 100 + "% " + Xa / parseInt(K.style.height) * 100 + "%");
|
|
3025
3056
|
}
|
|
3026
3057
|
},
|
|
3027
3058
|
_onDragStart: function(e, t) {
|
|
@@ -3030,18 +3061,18 @@ Q.prototype = {
|
|
|
3030
3061
|
this._onDrop();
|
|
3031
3062
|
return;
|
|
3032
3063
|
}
|
|
3033
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
3064
|
+
H("setupClone", this), Q.eventCanceled || (J = Ta(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ao(function() {
|
|
3034
3065
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
3035
3066
|
sortable: n,
|
|
3036
3067
|
name: "clone"
|
|
3037
3068
|
}));
|
|
3038
|
-
}), !t && R(W, i.dragClass, !0), t ? (
|
|
3069
|
+
}), !t && R(W, i.dragClass, !0), t ? (Ua = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (L(document, "mouseup", n._onDrop), L(document, "touchend", n._onDrop), L(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), I(document, "drop", n), z(W, "transform", "translateZ(0)")), Ha = !0, n._dragStartId = Ao(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), Za = !0, ta && z(document.body, "user-select", "none");
|
|
3039
3070
|
},
|
|
3040
3071
|
_onDragOver: function(e) {
|
|
3041
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3042
|
-
if (
|
|
3072
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Va === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3073
|
+
if (io) return;
|
|
3043
3074
|
function h(o, s) {
|
|
3044
|
-
H(o, p,
|
|
3075
|
+
H(o, p, Wi({
|
|
3045
3076
|
evt: e,
|
|
3046
3077
|
isOwner: l,
|
|
3047
3078
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3053,7 +3084,7 @@ Q.prototype = {
|
|
|
3053
3084
|
target: n,
|
|
3054
3085
|
completed: _,
|
|
3055
3086
|
onMove: function(n, i) {
|
|
3056
|
-
return
|
|
3087
|
+
return xo(q, t, W, r, n, B(n), e, i);
|
|
3057
3088
|
},
|
|
3058
3089
|
changed: v
|
|
3059
3090
|
}, s));
|
|
@@ -3064,48 +3095,48 @@ Q.prototype = {
|
|
|
3064
3095
|
function _(r) {
|
|
3065
3096
|
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (R(W, X ? X.options.ghostClass : c.options.ghostClass, !1), R(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3066
3097
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3067
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
3098
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Qa = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && vo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3068
3099
|
}
|
|
3069
3100
|
function v() {
|
|
3070
|
-
Y =
|
|
3101
|
+
Y = ha(W), Ba = ha(W, o.draggable), U({
|
|
3071
3102
|
sortable: p,
|
|
3072
3103
|
name: "change",
|
|
3073
3104
|
toEl: t,
|
|
3074
3105
|
newIndex: Y,
|
|
3075
|
-
newDraggableIndex:
|
|
3106
|
+
newDraggableIndex: Ba,
|
|
3076
3107
|
originalEvent: e
|
|
3077
3108
|
});
|
|
3078
3109
|
}
|
|
3079
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3110
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = sa(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3080
3111
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3081
|
-
if (
|
|
3112
|
+
if (Ua = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Va.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
3082
3113
|
if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3083
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3084
|
-
var y =
|
|
3085
|
-
if (!y ||
|
|
3114
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Fa ? q.insertBefore(W, Fa) : q.appendChild(W)), _(!0);
|
|
3115
|
+
var y = ma(t, o.draggable);
|
|
3116
|
+
if (!y || To(e, f, this) && !y.animated) {
|
|
3086
3117
|
if (y === W) return _(!1);
|
|
3087
|
-
if (y && t === e.target && (n = y), n && (i = B(n)),
|
|
3088
|
-
} else if (y &&
|
|
3089
|
-
var b =
|
|
3118
|
+
if (y && t === e.target && (n = y), n && (i = B(n)), xo(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
|
|
3119
|
+
} else if (y && wo(e, f, this)) {
|
|
3120
|
+
var b = pa(t, 0, o, !0);
|
|
3090
3121
|
if (b === W) return _(!1);
|
|
3091
|
-
if (n = b, i = B(n),
|
|
3122
|
+
if (n = b, i = B(n), xo(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
3092
3123
|
} else if (n.parentNode === t) {
|
|
3093
3124
|
i = B(n);
|
|
3094
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
3095
|
-
|
|
3125
|
+
var x = 0, S, C = W.parentNode !== t, w = !po(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = fa(n, "top", "top") || fa(W, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3126
|
+
Qa !== n && (S = i[T], eo = !1, to = !w && o.invertSwap || C), x = Eo(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, to, Qa === n);
|
|
3096
3127
|
var O;
|
|
3097
3128
|
if (x !== 0) {
|
|
3098
|
-
var k =
|
|
3129
|
+
var k = ha(W);
|
|
3099
3130
|
do
|
|
3100
3131
|
k -= x, O = G.children[k];
|
|
3101
3132
|
while (O && (z(O, "display") === "none" || O === K));
|
|
3102
3133
|
}
|
|
3103
3134
|
if (x === 0 || O === n) return _(!1);
|
|
3104
|
-
|
|
3135
|
+
Qa = n, $a = x;
|
|
3105
3136
|
var ee = n.nextElementSibling, A = !1;
|
|
3106
3137
|
A = x === 1;
|
|
3107
|
-
var te =
|
|
3108
|
-
if (te !== !1) return (te === 1 || te === -1) && (A = te === 1),
|
|
3138
|
+
var te = xo(q, t, W, r, n, i, e, A);
|
|
3139
|
+
if (te !== !1) return (te === 1 || te === -1) && (A = te === 1), io = !0, setTimeout(Co, 30), g(), A && !ee ? t.appendChild(W) : n.parentNode.insertBefore(W, A ? ee : n), E && wa(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !to && (no = Math.abs(S - B(n)[T])), v(), _(!0);
|
|
3109
3140
|
}
|
|
3110
3141
|
if (t.contains(W)) return _(!1);
|
|
3111
3142
|
}
|
|
@@ -3113,7 +3144,7 @@ Q.prototype = {
|
|
|
3113
3144
|
},
|
|
3114
3145
|
_ignoreWhileAnimating: null,
|
|
3115
3146
|
_offMoveEvents: function() {
|
|
3116
|
-
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover",
|
|
3147
|
+
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", vo), L(document, "mousemove", vo), L(document, "touchmove", vo);
|
|
3117
3148
|
},
|
|
3118
3149
|
_offUpEvents: function() {
|
|
3119
3150
|
var e = this.el.ownerDocument;
|
|
@@ -3121,18 +3152,18 @@ Q.prototype = {
|
|
|
3121
3152
|
},
|
|
3122
3153
|
_onDrop: function(e) {
|
|
3123
3154
|
var t = this.el, n = this.options;
|
|
3124
|
-
if (Y =
|
|
3155
|
+
if (Y = ha(W), Ba = ha(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = ha(W), Ba = ha(W, n.draggable), Q.eventCanceled) {
|
|
3125
3156
|
this._nulling();
|
|
3126
3157
|
return;
|
|
3127
3158
|
}
|
|
3128
|
-
|
|
3159
|
+
Ha = !1, to = !1, eo = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), jo(this.cloneId), jo(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ta && z(document.body, "user-select", ""), z(W, "transform", ""), e && (Za && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && L(W, "dragend", this), So(W), W.style["will-change"] = "", Za && !Ha && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
|
|
3129
3160
|
sortable: this,
|
|
3130
3161
|
name: "unchoose",
|
|
3131
3162
|
toEl: G,
|
|
3132
3163
|
newIndex: null,
|
|
3133
3164
|
newDraggableIndex: null,
|
|
3134
3165
|
originalEvent: e
|
|
3135
|
-
}), q === G ? Y !==
|
|
3166
|
+
}), q === G ? Y !== Ra && Y >= 0 && (U({
|
|
3136
3167
|
sortable: this,
|
|
3137
3168
|
name: "update",
|
|
3138
3169
|
toEl: G,
|
|
@@ -3164,7 +3195,7 @@ Q.prototype = {
|
|
|
3164
3195
|
name: "sort",
|
|
3165
3196
|
toEl: G,
|
|
3166
3197
|
originalEvent: e
|
|
3167
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
3198
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Ra, Ba = za), U({
|
|
3168
3199
|
sortable: this,
|
|
3169
3200
|
name: "end",
|
|
3170
3201
|
toEl: G,
|
|
@@ -3172,9 +3203,9 @@ Q.prototype = {
|
|
|
3172
3203
|
}), this.save()))), this._nulling();
|
|
3173
3204
|
},
|
|
3174
3205
|
_nulling: function() {
|
|
3175
|
-
H("nulling", this), q = W = G = K =
|
|
3206
|
+
H("nulling", this), q = W = G = K = Fa = J = Ia = La = Ga = Ka = Za = Y = Ba = Ra = za = Qa = $a = X = Va = Q.dragged = Q.ghost = Q.clone = Q.active = null, ao.forEach(function(e) {
|
|
3176
3207
|
e.checked = !0;
|
|
3177
|
-
}),
|
|
3208
|
+
}), ao.length = qa = Ja = 0;
|
|
3178
3209
|
},
|
|
3179
3210
|
handleEvent: function(e) {
|
|
3180
3211
|
switch (e.type) {
|
|
@@ -3184,7 +3215,7 @@ Q.prototype = {
|
|
|
3184
3215
|
break;
|
|
3185
3216
|
case "dragenter":
|
|
3186
3217
|
case "dragover":
|
|
3187
|
-
W && (this._onDragOver(e),
|
|
3218
|
+
W && (this._onDragOver(e), bo(e));
|
|
3188
3219
|
break;
|
|
3189
3220
|
case "selectstart":
|
|
3190
3221
|
e.preventDefault();
|
|
@@ -3192,14 +3223,14 @@ Q.prototype = {
|
|
|
3192
3223
|
}
|
|
3193
3224
|
},
|
|
3194
3225
|
toArray: function() {
|
|
3195
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3226
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], sa(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Oo(t));
|
|
3196
3227
|
return e;
|
|
3197
3228
|
},
|
|
3198
3229
|
sort: function(e, t) {
|
|
3199
3230
|
var n = {}, r = this.el;
|
|
3200
3231
|
this.toArray().forEach(function(e, t) {
|
|
3201
3232
|
var i = r.children[t];
|
|
3202
|
-
|
|
3233
|
+
sa(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3203
3234
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3204
3235
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3205
3236
|
}), t && this.animateAll();
|
|
@@ -3209,25 +3240,25 @@ Q.prototype = {
|
|
|
3209
3240
|
e && e.set && e.set(this);
|
|
3210
3241
|
},
|
|
3211
3242
|
closest: function(e, t) {
|
|
3212
|
-
return
|
|
3243
|
+
return sa(e, t || this.options.draggable, this.el, !1);
|
|
3213
3244
|
},
|
|
3214
3245
|
option: function(e, t) {
|
|
3215
3246
|
var n = this.options;
|
|
3216
3247
|
if (t === void 0) return n[e];
|
|
3217
|
-
var r =
|
|
3218
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
3248
|
+
var r = Ma.modifyOption(this, e, t);
|
|
3249
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && ho(n);
|
|
3219
3250
|
},
|
|
3220
3251
|
destroy: function() {
|
|
3221
3252
|
H("destroy", this);
|
|
3222
3253
|
var e = this.el;
|
|
3223
3254
|
e[V] = null, L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart), L(e, "pointerdown", this._onTapStart), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3224
3255
|
e.removeAttribute("draggable");
|
|
3225
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3256
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Wa.splice(Wa.indexOf(this.el), 1), this.el = e = null;
|
|
3226
3257
|
},
|
|
3227
3258
|
_hideClone: function() {
|
|
3228
|
-
if (!
|
|
3259
|
+
if (!La) {
|
|
3229
3260
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3230
|
-
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J),
|
|
3261
|
+
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), La = !0;
|
|
3231
3262
|
}
|
|
3232
3263
|
},
|
|
3233
3264
|
_showClone: function(e) {
|
|
@@ -3235,99 +3266,99 @@ Q.prototype = {
|
|
|
3235
3266
|
this._hideClone();
|
|
3236
3267
|
return;
|
|
3237
3268
|
}
|
|
3238
|
-
if (
|
|
3269
|
+
if (La) {
|
|
3239
3270
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
3240
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
3271
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Fa ? q.insertBefore(J, Fa) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), La = !1;
|
|
3241
3272
|
}
|
|
3242
3273
|
}
|
|
3243
3274
|
};
|
|
3244
|
-
function
|
|
3275
|
+
function bo(e) {
|
|
3245
3276
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3246
3277
|
}
|
|
3247
|
-
function
|
|
3278
|
+
function xo(e, t, n, r, i, a, o, s) {
|
|
3248
3279
|
var c, l = e[V], u = l.options.onMove, d;
|
|
3249
|
-
return window.CustomEvent && !
|
|
3280
|
+
return window.CustomEvent && !Qi && !$i ? c = new CustomEvent("move", {
|
|
3250
3281
|
bubbles: !0,
|
|
3251
3282
|
cancelable: !0
|
|
3252
3283
|
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || B(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3253
3284
|
}
|
|
3254
|
-
function
|
|
3285
|
+
function So(e) {
|
|
3255
3286
|
e.draggable = !1;
|
|
3256
3287
|
}
|
|
3257
|
-
function
|
|
3258
|
-
|
|
3288
|
+
function Co() {
|
|
3289
|
+
io = !1;
|
|
3259
3290
|
}
|
|
3260
|
-
function
|
|
3261
|
-
var r = B(
|
|
3291
|
+
function wo(e, t, n) {
|
|
3292
|
+
var r = B(pa(n.el, 0, n.options, !0)), i = Ea(n.el, n.options, K), a = 10;
|
|
3262
3293
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
3263
3294
|
}
|
|
3264
|
-
function
|
|
3265
|
-
var r = B(
|
|
3295
|
+
function To(e, t, n) {
|
|
3296
|
+
var r = B(ma(n.el, n.options.draggable)), i = Ea(n.el, n.options, K), a = 10;
|
|
3266
3297
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
3267
3298
|
}
|
|
3268
|
-
function
|
|
3299
|
+
function Eo(e, t, n, r, i, a, o, s) {
|
|
3269
3300
|
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
3270
3301
|
if (!o) {
|
|
3271
|
-
if (s &&
|
|
3272
|
-
if (!
|
|
3273
|
-
else if (
|
|
3274
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3302
|
+
if (s && no < l * i) {
|
|
3303
|
+
if (!eo && ($a === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (eo = !0), eo) f = !0;
|
|
3304
|
+
else if ($a === 1 ? c < u + no : c > d - no) return -$a;
|
|
3305
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Do(t);
|
|
3275
3306
|
}
|
|
3276
3307
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3277
3308
|
}
|
|
3278
|
-
function
|
|
3279
|
-
return
|
|
3309
|
+
function Do(e) {
|
|
3310
|
+
return ha(W) < ha(e) ? 1 : -1;
|
|
3280
3311
|
}
|
|
3281
|
-
function
|
|
3312
|
+
function Oo(e) {
|
|
3282
3313
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3283
3314
|
return r.toString(36);
|
|
3284
3315
|
}
|
|
3285
|
-
function
|
|
3286
|
-
|
|
3316
|
+
function ko(e) {
|
|
3317
|
+
ao.length = 0;
|
|
3287
3318
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3288
3319
|
var r = t[n];
|
|
3289
|
-
r.checked &&
|
|
3320
|
+
r.checked && ao.push(r);
|
|
3290
3321
|
}
|
|
3291
3322
|
}
|
|
3292
|
-
function
|
|
3323
|
+
function Ao(e) {
|
|
3293
3324
|
return setTimeout(e, 0);
|
|
3294
3325
|
}
|
|
3295
|
-
function
|
|
3326
|
+
function jo(e) {
|
|
3296
3327
|
return clearTimeout(e);
|
|
3297
3328
|
}
|
|
3298
|
-
|
|
3299
|
-
(Q.active ||
|
|
3329
|
+
oo && I(document, "touchmove", function(e) {
|
|
3330
|
+
(Q.active || Ha) && e.cancelable && e.preventDefault();
|
|
3300
3331
|
}), Q.utils = {
|
|
3301
3332
|
on: I,
|
|
3302
3333
|
off: L,
|
|
3303
3334
|
css: z,
|
|
3304
|
-
find:
|
|
3335
|
+
find: ua,
|
|
3305
3336
|
is: function(e, t) {
|
|
3306
|
-
return !!
|
|
3337
|
+
return !!sa(e, t, e, !1);
|
|
3307
3338
|
},
|
|
3308
|
-
extend:
|
|
3309
|
-
throttle:
|
|
3310
|
-
closest:
|
|
3339
|
+
extend: ya,
|
|
3340
|
+
throttle: Sa,
|
|
3341
|
+
closest: sa,
|
|
3311
3342
|
toggleClass: R,
|
|
3312
|
-
clone:
|
|
3313
|
-
index:
|
|
3314
|
-
nextTick:
|
|
3315
|
-
cancelNextTick:
|
|
3316
|
-
detectDirection:
|
|
3317
|
-
getChild:
|
|
3343
|
+
clone: Ta,
|
|
3344
|
+
index: ha,
|
|
3345
|
+
nextTick: Ao,
|
|
3346
|
+
cancelNextTick: jo,
|
|
3347
|
+
detectDirection: fo,
|
|
3348
|
+
getChild: pa
|
|
3318
3349
|
}, Q.get = function(e) {
|
|
3319
3350
|
return e[V];
|
|
3320
3351
|
}, Q.mount = function() {
|
|
3321
3352
|
var e = [...arguments];
|
|
3322
3353
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3323
3354
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3324
|
-
e.utils && (Q.utils =
|
|
3355
|
+
e.utils && (Q.utils = Wi(Wi({}, Q.utils), e.utils)), Ma.mount(e);
|
|
3325
3356
|
});
|
|
3326
3357
|
}, Q.create = function(e, t) {
|
|
3327
3358
|
return new Q(e, t);
|
|
3328
|
-
}, Q.version =
|
|
3329
|
-
var $ = [],
|
|
3330
|
-
function
|
|
3359
|
+
}, Q.version = Xi;
|
|
3360
|
+
var $ = [], Mo, No, Po = !1, Fo, Io, Lo, Ro;
|
|
3361
|
+
function zo() {
|
|
3331
3362
|
function e() {
|
|
3332
3363
|
for (var e in this.defaults = {
|
|
3333
3364
|
scroll: !0,
|
|
@@ -3347,63 +3378,63 @@ function Fo() {
|
|
|
3347
3378
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3348
3379
|
},
|
|
3349
3380
|
drop: function() {
|
|
3350
|
-
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3381
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Vo(), Bo(), Ca();
|
|
3351
3382
|
},
|
|
3352
3383
|
nulling: function() {
|
|
3353
|
-
|
|
3384
|
+
Lo = No = Mo = Po = Ro = Fo = Io = null, $.length = 0;
|
|
3354
3385
|
},
|
|
3355
3386
|
_handleFallbackAutoScroll: function(e) {
|
|
3356
3387
|
this._handleAutoScroll(e, !0);
|
|
3357
3388
|
},
|
|
3358
3389
|
_handleAutoScroll: function(e, t) {
|
|
3359
3390
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3360
|
-
if (
|
|
3361
|
-
|
|
3362
|
-
var o =
|
|
3363
|
-
|
|
3364
|
-
var a =
|
|
3365
|
-
a !== o && (o = a,
|
|
3366
|
-
}, 10),
|
|
3391
|
+
if (Lo = e, t || this.options.forceAutoScrollFallback || $i || Qi || ta) {
|
|
3392
|
+
Ho(e, this.options, a, t);
|
|
3393
|
+
var o = va(a, !0);
|
|
3394
|
+
Po && (!Ro || r !== Fo || i !== Io) && (Ro && Vo(), Ro = setInterval(function() {
|
|
3395
|
+
var a = va(document.elementFromPoint(r, i), !0);
|
|
3396
|
+
a !== o && (o = a, Bo()), Ho(e, n.options, a, t);
|
|
3397
|
+
}, 10), Fo = r, Io = i);
|
|
3367
3398
|
} else {
|
|
3368
|
-
if (!this.options.bubbleScroll ||
|
|
3369
|
-
|
|
3399
|
+
if (!this.options.bubbleScroll || va(a, !0) === da()) {
|
|
3400
|
+
Bo();
|
|
3370
3401
|
return;
|
|
3371
3402
|
}
|
|
3372
|
-
|
|
3403
|
+
Ho(e, this.options, va(a, !1), !1);
|
|
3373
3404
|
}
|
|
3374
3405
|
}
|
|
3375
|
-
},
|
|
3406
|
+
}, qi(e, {
|
|
3376
3407
|
pluginName: "scroll",
|
|
3377
3408
|
initializeByDefault: !0
|
|
3378
3409
|
});
|
|
3379
3410
|
}
|
|
3380
|
-
function
|
|
3411
|
+
function Bo() {
|
|
3381
3412
|
$.forEach(function(e) {
|
|
3382
3413
|
clearInterval(e.pid);
|
|
3383
3414
|
}), $ = [];
|
|
3384
3415
|
}
|
|
3385
|
-
function
|
|
3386
|
-
clearInterval(
|
|
3416
|
+
function Vo() {
|
|
3417
|
+
clearInterval(Ro);
|
|
3387
3418
|
}
|
|
3388
|
-
var
|
|
3419
|
+
var Ho = Sa(function(e, t, n, r) {
|
|
3389
3420
|
if (t.scroll) {
|
|
3390
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3391
|
-
|
|
3392
|
-
var d = 0, f =
|
|
3421
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = da(), l = !1, u;
|
|
3422
|
+
No !== n && (No = n, Bo(), Mo = t.scroll, u = t.scrollFn, Mo === !0 && (Mo = va(n, !0)));
|
|
3423
|
+
var d = 0, f = Mo;
|
|
3393
3424
|
do {
|
|
3394
3425
|
var p = f, m = B(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = z(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3395
3426
|
p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
|
|
3396
3427
|
var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
|
|
3397
3428
|
if (!$[d]) for (var ee = 0; ee <= d; ee++) $[ee] || ($[ee] = {});
|
|
3398
3429
|
($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3399
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3430
|
+
r && this.layer === 0 && Q.active._onTouchMove(Lo);
|
|
3400
3431
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3401
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
3432
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Lo, $[this.layer].el) !== "continue" || wa($[this.layer].el, n, t);
|
|
3402
3433
|
}.bind({ layer: d }), 24))), d++;
|
|
3403
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3404
|
-
|
|
3434
|
+
} while (t.bubbleScroll && f !== c && (f = va(f, !1)));
|
|
3435
|
+
Po = l;
|
|
3405
3436
|
}
|
|
3406
|
-
}, 30),
|
|
3437
|
+
}, 30), Uo = function(e) {
|
|
3407
3438
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3408
3439
|
if (t) {
|
|
3409
3440
|
var c = n || i;
|
|
@@ -3415,8 +3446,8 @@ var Ro = va(function(e, t, n, r) {
|
|
|
3415
3446
|
}));
|
|
3416
3447
|
}
|
|
3417
3448
|
};
|
|
3418
|
-
function
|
|
3419
|
-
|
|
3449
|
+
function Wo() {}
|
|
3450
|
+
Wo.prototype = {
|
|
3420
3451
|
startIndex: null,
|
|
3421
3452
|
dragStart: function(e) {
|
|
3422
3453
|
var t = e.oldDraggableIndex;
|
|
@@ -3425,72 +3456,72 @@ Bo.prototype = {
|
|
|
3425
3456
|
onSpill: function(e) {
|
|
3426
3457
|
var t = e.dragEl, n = e.putSortable;
|
|
3427
3458
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3428
|
-
var r =
|
|
3459
|
+
var r = pa(this.sortable.el, this.startIndex, this.options);
|
|
3429
3460
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3430
3461
|
},
|
|
3431
|
-
drop:
|
|
3432
|
-
},
|
|
3433
|
-
function
|
|
3434
|
-
|
|
3462
|
+
drop: Uo
|
|
3463
|
+
}, qi(Wo, { pluginName: "revertOnSpill" });
|
|
3464
|
+
function Go() {}
|
|
3465
|
+
Go.prototype = {
|
|
3435
3466
|
onSpill: function(e) {
|
|
3436
3467
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3437
3468
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3438
3469
|
},
|
|
3439
|
-
drop:
|
|
3440
|
-
},
|
|
3441
|
-
function
|
|
3470
|
+
drop: Uo
|
|
3471
|
+
}, qi(Go, { pluginName: "removeOnSpill" }), Q.mount(new zo()), Q.mount(Go, Wo);
|
|
3472
|
+
function Ko(e) {
|
|
3442
3473
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3443
3474
|
}
|
|
3444
|
-
function
|
|
3475
|
+
function qo(e) {
|
|
3445
3476
|
re() && r(e);
|
|
3446
3477
|
}
|
|
3447
|
-
function
|
|
3478
|
+
function Jo(e) {
|
|
3448
3479
|
re() ? a(e) : ie(e);
|
|
3449
3480
|
}
|
|
3450
|
-
var
|
|
3451
|
-
function
|
|
3452
|
-
|
|
3481
|
+
var Yo = null, Xo = null;
|
|
3482
|
+
function Zo(e = null, t = null) {
|
|
3483
|
+
Yo = e, Xo = t;
|
|
3453
3484
|
}
|
|
3454
|
-
function
|
|
3485
|
+
function Qo() {
|
|
3455
3486
|
return {
|
|
3456
|
-
data:
|
|
3457
|
-
clonedData:
|
|
3487
|
+
data: Yo,
|
|
3488
|
+
clonedData: Xo
|
|
3458
3489
|
};
|
|
3459
3490
|
}
|
|
3460
|
-
var
|
|
3461
|
-
function
|
|
3491
|
+
var $o = Symbol("cloneElement");
|
|
3492
|
+
function es(...e) {
|
|
3462
3493
|
let t = re()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3463
3494
|
Array.isArray(k(i)) || (a = i, i = null);
|
|
3464
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3495
|
+
let o = null, { immediate: s = !0, clone: l = Ko, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
|
|
3465
3496
|
function p(e) {
|
|
3466
3497
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3467
3498
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3468
3499
|
let s = k(k(i)?.[r]), c = l(s);
|
|
3469
|
-
|
|
3500
|
+
Zo(s, c), a[$o] = c;
|
|
3470
3501
|
}
|
|
3471
3502
|
function m(e) {
|
|
3472
|
-
let t = e.item[
|
|
3473
|
-
if (!
|
|
3474
|
-
if (
|
|
3503
|
+
let t = e.item[$o];
|
|
3504
|
+
if (!Mi(t)) {
|
|
3505
|
+
if (Fi(e.item), g(i)) {
|
|
3475
3506
|
let n = [...k(i)];
|
|
3476
|
-
i.value =
|
|
3507
|
+
i.value = ji(n, e.newDraggableIndex, t);
|
|
3477
3508
|
return;
|
|
3478
3509
|
}
|
|
3479
|
-
|
|
3510
|
+
ji(k(i), e.newDraggableIndex, t);
|
|
3480
3511
|
}
|
|
3481
3512
|
}
|
|
3482
3513
|
function h(e) {
|
|
3483
3514
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3484
|
-
if (
|
|
3485
|
-
|
|
3515
|
+
if (Pi(t, n, r), o === "clone") {
|
|
3516
|
+
Fi(s);
|
|
3486
3517
|
return;
|
|
3487
3518
|
}
|
|
3488
3519
|
if (g(i)) {
|
|
3489
3520
|
let e = [...k(i)];
|
|
3490
|
-
i.value =
|
|
3521
|
+
i.value = Ai(e, a);
|
|
3491
3522
|
return;
|
|
3492
3523
|
}
|
|
3493
|
-
|
|
3524
|
+
Ai(k(i), a);
|
|
3494
3525
|
}
|
|
3495
3526
|
function _(e) {
|
|
3496
3527
|
if (f) {
|
|
@@ -3498,12 +3529,12 @@ function Xo(...e) {
|
|
|
3498
3529
|
return;
|
|
3499
3530
|
}
|
|
3500
3531
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3501
|
-
if (
|
|
3532
|
+
if (Fi(n), Pi(t, n, r), g(i)) {
|
|
3502
3533
|
let e = [...k(i)];
|
|
3503
|
-
i.value =
|
|
3534
|
+
i.value = Di(e, a, o);
|
|
3504
3535
|
return;
|
|
3505
3536
|
}
|
|
3506
|
-
|
|
3537
|
+
Di(k(i), a, o);
|
|
3507
3538
|
}
|
|
3508
3539
|
function v(e) {
|
|
3509
3540
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3522,7 +3553,7 @@ function Xo(...e) {
|
|
|
3522
3553
|
n = null;
|
|
3523
3554
|
}
|
|
3524
3555
|
ie(() => {
|
|
3525
|
-
if (
|
|
3556
|
+
if (Zo(), o) throw o;
|
|
3526
3557
|
});
|
|
3527
3558
|
}
|
|
3528
3559
|
let y = {
|
|
@@ -3534,19 +3565,19 @@ function Xo(...e) {
|
|
|
3534
3565
|
};
|
|
3535
3566
|
function b(e) {
|
|
3536
3567
|
let n = k(r);
|
|
3537
|
-
return e ||=
|
|
3568
|
+
return e ||= Ni(n) ? Ii(n, t?.$el) : n, e && !zi(e) && (e = e.$el), e || Ei("Root element not found"), e;
|
|
3538
3569
|
}
|
|
3539
3570
|
function x() {
|
|
3540
|
-
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3541
|
-
return
|
|
3542
|
-
|
|
3543
|
-
}),
|
|
3571
|
+
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = Ci(e, ["immediate", "clone"]);
|
|
3572
|
+
return Bi(r, (e, t) => {
|
|
3573
|
+
Vi(e) && (r[e] = (e, ...n) => (Hi(e, Qo()), t(e, ...n)));
|
|
3574
|
+
}), Ri(i === null ? {} : y, r);
|
|
3544
3575
|
}
|
|
3545
3576
|
let S = (e) => {
|
|
3546
3577
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3547
3578
|
};
|
|
3548
3579
|
c(() => a, () => {
|
|
3549
|
-
o &&
|
|
3580
|
+
o && Bi(x(), (e, t) => {
|
|
3550
3581
|
o?.option(e, t);
|
|
3551
3582
|
});
|
|
3552
3583
|
}, { deep: !0 });
|
|
@@ -3559,15 +3590,15 @@ function Xo(...e) {
|
|
|
3559
3590
|
toArray: () => o?.toArray(),
|
|
3560
3591
|
closest: (...e) => o?.closest(...e)
|
|
3561
3592
|
};
|
|
3562
|
-
return
|
|
3593
|
+
return Jo(() => {
|
|
3563
3594
|
s && S();
|
|
3564
|
-
}),
|
|
3595
|
+
}), qo(C.destroy), Si({
|
|
3565
3596
|
start: S,
|
|
3566
3597
|
pause: () => C?.option("disabled", !0),
|
|
3567
3598
|
resume: () => C?.option("disabled", !1)
|
|
3568
3599
|
}, C);
|
|
3569
3600
|
}
|
|
3570
|
-
var
|
|
3601
|
+
var ts = [
|
|
3571
3602
|
"update",
|
|
3572
3603
|
"start",
|
|
3573
3604
|
"add",
|
|
@@ -3580,7 +3611,7 @@ var Zo = [
|
|
|
3580
3611
|
"clone",
|
|
3581
3612
|
"move",
|
|
3582
3613
|
"change"
|
|
3583
|
-
],
|
|
3614
|
+
], ns = y({
|
|
3584
3615
|
name: "VueDraggable",
|
|
3585
3616
|
model: {
|
|
3586
3617
|
prop: "modelValue",
|
|
@@ -3630,37 +3661,37 @@ var Zo = [
|
|
|
3630
3661
|
"tag",
|
|
3631
3662
|
"target",
|
|
3632
3663
|
"customUpdate",
|
|
3633
|
-
...
|
|
3664
|
+
...ts.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3634
3665
|
],
|
|
3635
|
-
emits: ["update:modelValue", ...
|
|
3666
|
+
emits: ["update:modelValue", ...ts],
|
|
3636
3667
|
setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
|
|
3637
|
-
let o =
|
|
3668
|
+
let o = ts.reduce((e, t) => {
|
|
3638
3669
|
let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3639
3670
|
return e[n] = (...e) => r(t, ...e), e;
|
|
3640
3671
|
}, {}), s = j(() => {
|
|
3641
|
-
let n = e(t), { modelValue: r } = n, i =
|
|
3672
|
+
let n = e(t), { modelValue: r } = n, i = Ci(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
|
|
3642
3673
|
let r = k(n);
|
|
3643
3674
|
return r !== void 0 && (e[t] = r), e;
|
|
3644
3675
|
}, {});
|
|
3645
|
-
return
|
|
3676
|
+
return Si(Si({}, o), ki(Si(Si({}, a), s)));
|
|
3646
3677
|
}), c = j({
|
|
3647
3678
|
get: () => t.modelValue,
|
|
3648
3679
|
set: (e) => r("update:modelValue", e)
|
|
3649
|
-
}), l = _(), u = ee(
|
|
3680
|
+
}), l = _(), u = ee(es(t.target || l, c, s));
|
|
3650
3681
|
return i(u), () => ae(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
|
|
3651
3682
|
}
|
|
3652
|
-
}),
|
|
3683
|
+
}), rs = {
|
|
3653
3684
|
mounted: "mounted",
|
|
3654
3685
|
unmounted: "unmounted"
|
|
3655
3686
|
};
|
|
3656
|
-
|
|
3687
|
+
rs.mounted, rs.unmounted;
|
|
3657
3688
|
//#endregion
|
|
3658
3689
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3659
|
-
var
|
|
3690
|
+
var is = { class: "tpl:w-full" }, as = {
|
|
3660
3691
|
key: 0,
|
|
3661
3692
|
"data-testid": "section-drop-hint",
|
|
3662
3693
|
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)]"
|
|
3663
|
-
},
|
|
3694
|
+
}, os = /* @__PURE__ */ y({
|
|
3664
3695
|
__name: "SectionBlock",
|
|
3665
3696
|
props: {
|
|
3666
3697
|
block: {},
|
|
@@ -3668,13 +3699,13 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3668
3699
|
},
|
|
3669
3700
|
setup(e) {
|
|
3670
3701
|
let n = {
|
|
3671
|
-
title:
|
|
3672
|
-
paragraph:
|
|
3673
|
-
image:
|
|
3674
|
-
button:
|
|
3675
|
-
divider:
|
|
3676
|
-
custom:
|
|
3677
|
-
}, r = e, { t: a } =
|
|
3702
|
+
title: hi,
|
|
3703
|
+
paragraph: Zr,
|
|
3704
|
+
image: Rr,
|
|
3705
|
+
button: En,
|
|
3706
|
+
divider: vr,
|
|
3707
|
+
custom: gr
|
|
3708
|
+
}, r = e, { t: a } = Ot(), s = at(vt, "SectionBlock"), c = N(Ct, null), l = N(bt, null), u = j(() => {
|
|
3678
3709
|
switch (r.block.columns) {
|
|
3679
3710
|
case "2": return ["50%", "50%"];
|
|
3680
3711
|
case "3": return [
|
|
@@ -3700,7 +3731,7 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3700
3731
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
3701
3732
|
}
|
|
3702
3733
|
function y(e) {
|
|
3703
|
-
return
|
|
3734
|
+
return Qr(e, l, n);
|
|
3704
3735
|
}
|
|
3705
3736
|
function S(e, t) {
|
|
3706
3737
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3708,16 +3739,16 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3708
3739
|
dataSourceFetched: t.dataSourceFetched
|
|
3709
3740
|
});
|
|
3710
3741
|
}
|
|
3711
|
-
return (n, r) => (f(), x("div",
|
|
3742
|
+
return (n, r) => (f(), x("div", is, [b("div", { class: o(["tpl:flex tpl:gap-0", { "tpl:flex-col": g.value }]) }, [(f(!0), x(A, null, t(h.value, (n, r) => (f(), x("div", {
|
|
3712
3743
|
key: r,
|
|
3713
3744
|
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", _(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3714
3745
|
style: i({ width: g.value ? "100%" : u.value[r] })
|
|
3715
|
-
}, [w(k(
|
|
3746
|
+
}, [w(k(ns), {
|
|
3716
3747
|
"model-value": _(r),
|
|
3717
3748
|
group: {
|
|
3718
3749
|
name: "blocks",
|
|
3719
3750
|
pull: !0,
|
|
3720
|
-
put: (e, t, n) => k(
|
|
3751
|
+
put: (e, t, n) => k(gi)(n)
|
|
3721
3752
|
},
|
|
3722
3753
|
animation: 150,
|
|
3723
3754
|
"ghost-class": "tpl-ghost",
|
|
@@ -3730,7 +3761,7 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3730
3761
|
class: "tpl:min-h-[60px]",
|
|
3731
3762
|
"onUpdate:modelValue": (e) => v(r, e)
|
|
3732
3763
|
}, {
|
|
3733
|
-
default: m(() => [(f(!0), x(A, null, t(_(r), (t) => oe((f(), x("div", { key: t.id }, [w(
|
|
3764
|
+
default: m(() => [(f(!0), x(A, null, t(_(r), (t) => oe((f(), x("div", { key: t.id }, [w(pi, {
|
|
3734
3765
|
block: t,
|
|
3735
3766
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
3736
3767
|
viewport: e.viewport,
|
|
@@ -3761,13 +3792,13 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3761
3792
|
"model-value",
|
|
3762
3793
|
"group",
|
|
3763
3794
|
"onUpdate:modelValue"
|
|
3764
|
-
]), _(r).length === 0 ? (f(), x("div",
|
|
3795
|
+
]), _(r).length === 0 ? (f(), x("div", as, [b("span", null, p(k(a).section.dropHere), 1)])) : M("", !0)], 6))), 128))], 2)]));
|
|
3765
3796
|
}
|
|
3766
|
-
}),
|
|
3797
|
+
}), ss = ke, cs = {
|
|
3767
3798
|
small: 24,
|
|
3768
3799
|
medium: 32,
|
|
3769
3800
|
large: 48
|
|
3770
|
-
},
|
|
3801
|
+
}, ls = [
|
|
3771
3802
|
"facebook",
|
|
3772
3803
|
"twitter",
|
|
3773
3804
|
"instagram",
|
|
@@ -3785,11 +3816,11 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3785
3816
|
"github",
|
|
3786
3817
|
"dribbble",
|
|
3787
3818
|
"behance"
|
|
3788
|
-
],
|
|
3819
|
+
], us = [
|
|
3789
3820
|
"width",
|
|
3790
3821
|
"height",
|
|
3791
3822
|
"fill"
|
|
3792
|
-
],
|
|
3823
|
+
], ds = ["d"], fs = /* @__PURE__ */ y({
|
|
3793
3824
|
__name: "SocialIconSvg",
|
|
3794
3825
|
props: {
|
|
3795
3826
|
platform: {},
|
|
@@ -3797,7 +3828,7 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3797
3828
|
iconSize: {}
|
|
3798
3829
|
},
|
|
3799
3830
|
setup(e) {
|
|
3800
|
-
let t = e, n = j(() =>
|
|
3831
|
+
let t = e, n = j(() => ss[t.platform]), r = j(() => cs[t.iconSize]), a = j(() => {
|
|
3801
3832
|
let e = {
|
|
3802
3833
|
display: "inline-flex",
|
|
3803
3834
|
alignItems: "center",
|
|
@@ -3841,25 +3872,25 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3841
3872
|
viewBox: "0 0 24 24",
|
|
3842
3873
|
fill: s.value,
|
|
3843
3874
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3844
|
-
}, [b("path", { d: n.value.path }, null, 8,
|
|
3875
|
+
}, [b("path", { d: n.value.path }, null, 8, ds)], 8, us))], 4));
|
|
3845
3876
|
}
|
|
3846
|
-
}),
|
|
3877
|
+
}), ps = { class: "tpl:w-full" }, ms = ["href"], hs = {
|
|
3847
3878
|
key: 1,
|
|
3848
3879
|
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)]"
|
|
3849
|
-
},
|
|
3880
|
+
}, gs = /* @__PURE__ */ y({
|
|
3850
3881
|
__name: "SocialIconsBlock",
|
|
3851
3882
|
props: {
|
|
3852
3883
|
block: {},
|
|
3853
3884
|
viewport: {}
|
|
3854
3885
|
},
|
|
3855
3886
|
setup(e) {
|
|
3856
|
-
let n = e, { t: r } =
|
|
3887
|
+
let n = e, { t: r } = Ot(), a = j(() => ({
|
|
3857
3888
|
display: "flex",
|
|
3858
3889
|
flexWrap: "wrap",
|
|
3859
3890
|
gap: `${n.block.spacing}px`,
|
|
3860
3891
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3861
3892
|
})), o = j(() => n.block.icons.length > 0);
|
|
3862
|
-
return (n, s) => (f(), x("div",
|
|
3893
|
+
return (n, s) => (f(), x("div", ps, [o.value ? (f(), x("div", {
|
|
3863
3894
|
key: 0,
|
|
3864
3895
|
style: i(a.value)
|
|
3865
3896
|
}, [(f(!0), x(A, null, t(e.block.icons, (t) => (f(), x("a", {
|
|
@@ -3867,7 +3898,7 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3867
3898
|
href: t.url || "#",
|
|
3868
3899
|
class: "tpl:cursor-default",
|
|
3869
3900
|
onClick: s[0] ||= P(() => {}, ["prevent"])
|
|
3870
|
-
}, [w(
|
|
3901
|
+
}, [w(fs, {
|
|
3871
3902
|
platform: t.platform,
|
|
3872
3903
|
"icon-style": e.block.iconStyle,
|
|
3873
3904
|
"icon-size": e.block.iconSize
|
|
@@ -3875,44 +3906,44 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3875
3906
|
"platform",
|
|
3876
3907
|
"icon-style",
|
|
3877
3908
|
"icon-size"
|
|
3878
|
-
])], 8,
|
|
3909
|
+
])], 8, ms))), 128))], 4)) : (f(), x("div", hs, [w(k(Ln), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
3879
3910
|
}
|
|
3880
|
-
}),
|
|
3911
|
+
}), _s = { class: "tpl:w-full" }, vs = {
|
|
3881
3912
|
key: 0,
|
|
3882
3913
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3883
3914
|
style: {
|
|
3884
3915
|
"background-color": "var(--tpl-bg-hover)",
|
|
3885
3916
|
color: "var(--tpl-text-dim)"
|
|
3886
3917
|
}
|
|
3887
|
-
},
|
|
3918
|
+
}, ys = /* @__PURE__ */ y({
|
|
3888
3919
|
__name: "SpacerBlock",
|
|
3889
3920
|
props: {
|
|
3890
3921
|
block: {},
|
|
3891
3922
|
viewport: {}
|
|
3892
3923
|
},
|
|
3893
3924
|
setup(e) {
|
|
3894
|
-
let t = e, n =
|
|
3925
|
+
let t = e, n = at(vt, "SpacerBlock"), r = j(() => ({
|
|
3895
3926
|
height: `${t.block.height}px`,
|
|
3896
3927
|
minHeight: `${t.block.height}px`,
|
|
3897
3928
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3898
3929
|
}));
|
|
3899
|
-
return (t, a) => (f(), x("div",
|
|
3930
|
+
return (t, a) => (f(), x("div", _s, [b("div", {
|
|
3900
3931
|
style: i(r.value),
|
|
3901
3932
|
class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
|
|
3902
|
-
}, [k(n).state.previewMode ? M("", !0) : (f(), x("span",
|
|
3933
|
+
}, [k(n).state.previewMode ? M("", !0) : (f(), x("span", vs, p(e.block.height) + "px ", 1))], 6)]));
|
|
3903
3934
|
}
|
|
3904
|
-
}),
|
|
3935
|
+
}), bs = { class: "tpl:w-full" }, xs = { key: 0 }, Ss = [
|
|
3905
3936
|
"aria-label",
|
|
3906
3937
|
"data-placeholder",
|
|
3907
3938
|
"onBlur"
|
|
3908
|
-
],
|
|
3939
|
+
], Cs = [
|
|
3909
3940
|
"aria-label",
|
|
3910
3941
|
"data-placeholder",
|
|
3911
3942
|
"onBlur"
|
|
3912
|
-
],
|
|
3943
|
+
], ws = {
|
|
3913
3944
|
key: 1,
|
|
3914
3945
|
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)]"
|
|
3915
|
-
},
|
|
3946
|
+
}, Ts = /*#__PURE__*/ Ft(/* @__PURE__ */ y({
|
|
3916
3947
|
__name: "TableBlock",
|
|
3917
3948
|
props: {
|
|
3918
3949
|
block: {},
|
|
@@ -3926,7 +3957,7 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3926
3957
|
updated(e, t) {
|
|
3927
3958
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3928
3959
|
}
|
|
3929
|
-
}, r = e, { t: a } =
|
|
3960
|
+
}, r = e, { t: a } = Ot(), o = at(vt, "TableBlock"), s = j(() => r.block.rows.length > 0), c = j(() => {
|
|
3930
3961
|
let e = {
|
|
3931
3962
|
width: "100%",
|
|
3932
3963
|
borderCollapse: "collapse",
|
|
@@ -3957,11 +3988,11 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3957
3988
|
} : n);
|
|
3958
3989
|
o.updateBlock(r.block.id, { rows: a });
|
|
3959
3990
|
}
|
|
3960
|
-
return (e, r) => (f(), x("div",
|
|
3991
|
+
return (e, r) => (f(), x("div", bs, [s.value ? (f(), x("table", {
|
|
3961
3992
|
key: 0,
|
|
3962
3993
|
style: i(c.value),
|
|
3963
3994
|
class: "tpl-table-editable"
|
|
3964
|
-
}, [d.value ? (f(), x("thead",
|
|
3995
|
+
}, [d.value ? (f(), x("thead", xs, [b("tr", null, [(f(!0), x(A, null, t(d.value.cells, (e) => oe((f(), x("th", {
|
|
3965
3996
|
key: e.id,
|
|
3966
3997
|
style: i(u.value),
|
|
3967
3998
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -3970,7 +4001,7 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3970
4001
|
onBlur: (t) => g(d.value.id, e.id, t),
|
|
3971
4002
|
onKeydown: r[0] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3972
4003
|
onClick: P(h, ["stop"])
|
|
3973
|
-
}, null, 44,
|
|
4004
|
+
}, null, 44, Ss)), [[n, e.content]])), 128))])])) : M("", !0), b("tbody", null, [(f(!0), x(A, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(A, null, t(e.cells, (t) => oe((f(), x("td", {
|
|
3974
4005
|
key: t.id,
|
|
3975
4006
|
style: i(l.value),
|
|
3976
4007
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -3979,9 +4010,9 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3979
4010
|
onBlur: (n) => g(e.id, t.id, n),
|
|
3980
4011
|
onKeydown: r[1] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3981
4012
|
onClick: P(h, ["stop"])
|
|
3982
|
-
}, null, 44,
|
|
4013
|
+
}, null, 44, Cs)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", ws, [w(k(Rn), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
|
|
3983
4014
|
}
|
|
3984
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4015
|
+
}), [["__scopeId", "data-v-963ac422"]]), Es = /* @__PURE__ */ y({
|
|
3985
4016
|
__name: "VideoPlayButton",
|
|
3986
4017
|
props: { hoverEffect: {
|
|
3987
4018
|
type: Boolean,
|
|
@@ -3999,7 +4030,7 @@ var es = { class: "tpl:w-full" }, ts = {
|
|
|
3999
4030
|
});
|
|
4000
4031
|
//#endregion
|
|
4001
4032
|
//#region src/utils/videoThumbnail.ts
|
|
4002
|
-
function
|
|
4033
|
+
function Ds(e) {
|
|
4003
4034
|
if (!e) return {
|
|
4004
4035
|
platform: "unknown",
|
|
4005
4036
|
videoId: null,
|
|
@@ -4031,25 +4062,25 @@ function Cs(e) {
|
|
|
4031
4062
|
thumbnailUrl: null
|
|
4032
4063
|
};
|
|
4033
4064
|
}
|
|
4034
|
-
function
|
|
4035
|
-
return t ||
|
|
4065
|
+
function Os(e, t) {
|
|
4066
|
+
return t || Ds(e).thumbnailUrl;
|
|
4036
4067
|
}
|
|
4037
4068
|
//#endregion
|
|
4038
4069
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4039
|
-
var
|
|
4070
|
+
var ks = ["src", "alt"], As = {
|
|
4040
4071
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4041
4072
|
style: { opacity: "0.7" }
|
|
4042
|
-
},
|
|
4073
|
+
}, js = ["href"], Ms = ["src", "alt"], Ns = ["src", "alt"], Ps = {
|
|
4043
4074
|
key: 3,
|
|
4044
4075
|
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)]"
|
|
4045
|
-
},
|
|
4076
|
+
}, Fs = /* @__PURE__ */ y({
|
|
4046
4077
|
__name: "VideoBlock",
|
|
4047
4078
|
props: {
|
|
4048
4079
|
block: {},
|
|
4049
4080
|
viewport: {}
|
|
4050
4081
|
},
|
|
4051
4082
|
setup(e) {
|
|
4052
|
-
let t = e, { t: n } =
|
|
4083
|
+
let t = e, { t: n } = Ot(), { syntax: r } = It(), a = j(() => Ae(t.block.url, r) || Ae(t.block.thumbnailUrl, r)), o = j(() => a.value ? null : Os(t.block.url, t.block.thumbnailUrl)), s = j(() => ({ textAlign: t.block.align })), c = j(() => {
|
|
4053
4084
|
let e = t.block.align;
|
|
4054
4085
|
return {
|
|
4055
4086
|
maxWidth: "100%",
|
|
@@ -4070,16 +4101,16 @@ var Ts = ["src", "alt"], Es = {
|
|
|
4070
4101
|
class: "tpl:w-full tpl:border-0",
|
|
4071
4102
|
src: e.block.placeholderUrl,
|
|
4072
4103
|
alt: e.block.alt
|
|
4073
|
-
}, null, 8,
|
|
4104
|
+
}, null, 8, ks), w(Es)], 4)) : a.value ? (f(), x("div", {
|
|
4074
4105
|
key: 1,
|
|
4075
4106
|
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)]",
|
|
4076
4107
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
4077
|
-
}, [w(k(
|
|
4108
|
+
}, [w(k(zn), {
|
|
4078
4109
|
size: 36,
|
|
4079
4110
|
"stroke-width": 1.5,
|
|
4080
4111
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4081
4112
|
style: { opacity: "0.5" }
|
|
4082
|
-
}), b("span",
|
|
4113
|
+
}), b("span", As, [w(Cn, { text: l.value }, null, 8, ["text"])])], 4)) : o.value ? (f(), x(A, { key: 2 }, [e.block.url ? (f(), x("a", {
|
|
4083
4114
|
key: 0,
|
|
4084
4115
|
href: e.block.url,
|
|
4085
4116
|
target: "_blank",
|
|
@@ -4091,7 +4122,7 @@ var Ts = ["src", "alt"], Es = {
|
|
|
4091
4122
|
class: "tpl:w-full tpl:border-0",
|
|
4092
4123
|
src: o.value,
|
|
4093
4124
|
alt: e.block.alt
|
|
4094
|
-
}, null, 8,
|
|
4125
|
+
}, null, 8, Ms), w(Es, { "hover-effect": "" })], 12, js)) : (f(), x("div", {
|
|
4095
4126
|
key: 1,
|
|
4096
4127
|
class: "tpl:relative tpl:inline-block",
|
|
4097
4128
|
style: i(c.value)
|
|
@@ -4099,48 +4130,48 @@ var Ts = ["src", "alt"], Es = {
|
|
|
4099
4130
|
class: "tpl:w-full tpl:border-0",
|
|
4100
4131
|
src: o.value,
|
|
4101
4132
|
alt: e.block.alt
|
|
4102
|
-
}, null, 8,
|
|
4133
|
+
}, null, 8, Ns), w(Es)], 4))], 64)) : (f(), x("div", Ps, [w(k(zn), {
|
|
4103
4134
|
size: 40,
|
|
4104
4135
|
"stroke-width": 1.5,
|
|
4105
4136
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4106
4137
|
}), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
|
|
4107
4138
|
}
|
|
4108
|
-
}),
|
|
4109
|
-
section:
|
|
4110
|
-
title:
|
|
4111
|
-
paragraph:
|
|
4112
|
-
image:
|
|
4113
|
-
button:
|
|
4114
|
-
divider:
|
|
4115
|
-
video:
|
|
4116
|
-
social:
|
|
4117
|
-
menu:
|
|
4118
|
-
table:
|
|
4119
|
-
spacer:
|
|
4120
|
-
html:
|
|
4121
|
-
countdown: C(() => import("./CountdownBlock-
|
|
4139
|
+
}), Is = {
|
|
4140
|
+
section: os,
|
|
4141
|
+
title: hi,
|
|
4142
|
+
paragraph: Zr,
|
|
4143
|
+
image: Rr,
|
|
4144
|
+
button: En,
|
|
4145
|
+
divider: vr,
|
|
4146
|
+
video: Fs,
|
|
4147
|
+
social: gs,
|
|
4148
|
+
menu: Hr,
|
|
4149
|
+
table: Ts,
|
|
4150
|
+
spacer: ys,
|
|
4151
|
+
html: wr,
|
|
4152
|
+
countdown: C(() => import("./CountdownBlock-DbXfzwae.js").then((e) => e.n))
|
|
4122
4153
|
};
|
|
4123
|
-
function
|
|
4124
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
4154
|
+
function Ls(e) {
|
|
4155
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Ot(r);
|
|
4125
4156
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4126
|
-
let { resolvedTheme: l } =
|
|
4157
|
+
let { resolvedTheme: l } = sn(j(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = ln({
|
|
4127
4158
|
themeOverrides: d,
|
|
4128
4159
|
resolvedTheme: l,
|
|
4129
4160
|
extraStyles: e.themeExtraStyles
|
|
4130
|
-
}), p =
|
|
4161
|
+
}), p = Ut({
|
|
4131
4162
|
content: t.content,
|
|
4132
4163
|
setContent: (e, n) => t.setContent(e, n),
|
|
4133
4164
|
...e.historyOptions
|
|
4134
4165
|
});
|
|
4135
|
-
|
|
4136
|
-
let m =
|
|
4166
|
+
Yt(t, p);
|
|
4167
|
+
let m = Gt({
|
|
4137
4168
|
addBlock: t.addBlock,
|
|
4138
4169
|
removeBlock: t.removeBlock,
|
|
4139
4170
|
updateBlock: t.updateBlock,
|
|
4140
4171
|
selectBlock: t.selectBlock,
|
|
4141
4172
|
findBlockLocation: t.findBlockLocation,
|
|
4142
4173
|
blockDefaults: n.blockDefaults
|
|
4143
|
-
}), h =
|
|
4174
|
+
}), h = qt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Kt({
|
|
4144
4175
|
content: t.content,
|
|
4145
4176
|
isDirty: () => t.state.isDirty,
|
|
4146
4177
|
...e.autoSaveOptions
|
|
@@ -4148,24 +4179,24 @@ function Ns(e) {
|
|
|
4148
4179
|
g && (v = c(p.isNavigating, (e) => {
|
|
4149
4180
|
e ? g.pause() : g.resume();
|
|
4150
4181
|
}));
|
|
4151
|
-
let y =
|
|
4182
|
+
let y = on(t, {
|
|
4152
4183
|
t: a,
|
|
4153
4184
|
format: o
|
|
4154
|
-
}), b =
|
|
4155
|
-
if (
|
|
4185
|
+
}), b = pn();
|
|
4186
|
+
if (vn(b, Is), n.customBlocks?.length) for (let e of n.customBlocks) b.registerCustom(e, gr);
|
|
4156
4187
|
function x(e) {
|
|
4157
|
-
for (let t of e) b.registerCustom(t,
|
|
4188
|
+
for (let t of e) b.registerCustom(t, gr);
|
|
4158
4189
|
}
|
|
4159
|
-
let S =
|
|
4190
|
+
let S = $t();
|
|
4160
4191
|
if (s() && u(S.dispose), e.containerEl) {
|
|
4161
4192
|
let t = e.containerEl;
|
|
4162
|
-
|
|
4193
|
+
Je(document, "pointerdown", (e) => {
|
|
4163
4194
|
let n = t.value;
|
|
4164
4195
|
n && (e.composedPath?.() ?? []).includes(n) && S.claim();
|
|
4165
4196
|
}, { capture: !0 });
|
|
4166
4197
|
}
|
|
4167
4198
|
function C(r) {
|
|
4168
|
-
S.isActive() &&
|
|
4199
|
+
S.isActive() && xn(r, {
|
|
4169
4200
|
history: p,
|
|
4170
4201
|
selectBlock: (e) => t.selectBlock(e),
|
|
4171
4202
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4174,19 +4205,19 @@ function Ns(e) {
|
|
|
4174
4205
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
4175
4206
|
});
|
|
4176
4207
|
}
|
|
4177
|
-
|
|
4208
|
+
Je(document, "keydown", C);
|
|
4178
4209
|
let w = _(null);
|
|
4179
|
-
E(
|
|
4210
|
+
E(mt, e.editorRoot ?? document), E(gt, w), E(tt, r), E(vt, t), E(ct, p), E(ht, m), E(Ct, h), E(pt, i), E(et, f), E(nt, l), E(lt, n.blockDefaults), E(bt, b), E(dt, n.customBlocks ?? []), E(Xe, n.paletteBlocks), E(wt, yn(n.htmlBlockPreview)), E(ft, mn(t.content, b));
|
|
4180
4211
|
let T = pe(n.mergeTags?.syntax);
|
|
4181
|
-
E(
|
|
4182
|
-
let D =
|
|
4212
|
+
E(Ze, n.mergeTags?.tags ?? []), E($e, T), E(_t, n.mergeTags?.onRequest ?? null), E(Tt, n.mergeTags?.autocomplete !== !1), E(st, en()), E(Et, n.logicTags?.tags ?? []), E(ut, n.logicTags?.pairs ?? []), E(Qe, n.logicTags?.onRequest ?? null), E(ot, tn()), E(rt, n.onRequestMedia ?? null), E(xt, n.displayConditions?.conditions ?? []), E(yt, n.displayConditions?.allowCustom ?? !1), E(St, e.capabilities ?? {}), E(Dt, y);
|
|
4213
|
+
let D = nn(n.lint) ? null : rn({
|
|
4183
4214
|
content: t.content,
|
|
4184
4215
|
options: n.lint ?? {},
|
|
4185
4216
|
updateBlock: t.updateBlock,
|
|
4186
4217
|
updateSettings: t.updateSettings,
|
|
4187
4218
|
removeBlock: t.removeBlock
|
|
4188
4219
|
});
|
|
4189
|
-
E(
|
|
4220
|
+
E(it, D);
|
|
4190
4221
|
function O() {
|
|
4191
4222
|
v?.(), D?.destroy(), g?.destroy(), p.destroy();
|
|
4192
4223
|
}
|
|
@@ -4209,4 +4240,4 @@ function Ns(e) {
|
|
|
4209
4240
|
};
|
|
4210
4241
|
}
|
|
4211
4242
|
//#endregion
|
|
4212
|
-
export {
|
|
4243
|
+
export { Ln as A, zt as B, Qn as C, Gn as D, Kn as E, kn as F, En as I, fn as L, Pn as M, jn as N, Hn as O, An as P, an as R, rr as S, qn as T, wr as _, gs as a, sr as b, ns as c, $r as d, Qr as f, Er as g, Rr as h, ys as i, Fn as j, Rn as k, hi as l, Hr as m, Fs as n, ls as o, Zr as p, Ts as r, os as s, Ls as t, pi as u, vr as v, Zn as w, ar as x, gr as y, Jt as z };
|