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