@templatical/editor 0.8.4 → 0.9.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-CnRXeK77.js → AiChatSidebar-BUKj9n02.js} +5 -5
- package/dist/{AiFeatureMenu-BYDDrpj6.js → AiFeatureMenu-Co14YVJt.js} +3 -3
- package/dist/{BlockIssueBadge-DM-vXeD6.js → BlockIssueBadge-DThKKeub.js} +2 -2
- package/dist/{CloudEditor-B9a_K6Cm.js → CloudEditor-CAtw_sFC.js} +218 -217
- package/dist/{CollaboratorBar-HN4whzM-.js → CollaboratorBar-Bc6q0gB9.js} +2 -2
- package/dist/{CommentsSidebar-_llWQ4VT.js → CommentsSidebar-DiH4R4F0.js} +3 -3
- package/dist/{CountdownBlock-I99sC0C5.js → CountdownBlock-BTPefclD.js} +2 -2
- package/dist/{CountdownToolbar-BUhOUiQ9.js → CountdownToolbar-Dvr2icg-.js} +2 -2
- package/dist/{DesignReferenceSidebar-0GwjUn2V.js → DesignReferenceSidebar-BP32MgpS.js} +3 -3
- package/dist/{IssuesPanel-4MKZe8yP.js → IssuesPanel-B1LT91IX.js} +2 -2
- package/dist/{ModuleBrowserModal-DPZBsvqk.js → ModuleBrowserModal-CWegFoOA.js} +77 -85
- package/dist/{ModulePreviewCanvas-CK4j11-e.js → ModulePreviewCanvas-D9WUSSRT.js} +2 -2
- package/dist/{NumberWithSuffix-CxMFy_j3.js → NumberWithSuffix-CxUBW_V2.js} +2 -2
- package/dist/{ParagraphEditor-DBus_iHH.js → ParagraphEditor-DrAz2yot.js} +126 -126
- package/dist/{RichTextEditorContent-B_KCY6T1.js → RichTextEditorContent-gR169m1-.js} +4 -4
- package/dist/{SaveModuleDialog-DORRSbBo.js → SaveModuleDialog-DWidA0c9.js} +6 -6
- package/dist/{SnapshotHistory-DTMVEk03.js → SnapshotHistory-CIo2Jaw-.js} +4 -4
- package/dist/{TemplateScoringPanel-BIwEwFxD.js → TemplateScoringPanel-seBvvn8O.js} +2 -2
- package/dist/{TestEmailModal-DJmYp0Qi.js → TestEmailModal-BuCuWp3N.js} +3 -3
- package/dist/{TitleEditor-70d9AF1V.js → TitleEditor-BmW0uMl7.js} +67 -67
- package/dist/{TplModal-BEfwlvPC.js → TplModal-YFpBaiLj.js} +4 -4
- package/dist/{blockTypeIcons-2DRoPa3K.js → blockTypeIcons-DCkHXPhx.js} +19 -11
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-CcuKnisc.js → AiFeatureMenu-Dayzk2H7.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-CcuKnisc.js.map → AiFeatureMenu-Dayzk2H7.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Sr3is7Wr.js → BlockIssueBadge-D_US2wqo.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-Sr3is7Wr.js.map → BlockIssueBadge-D_US2wqo.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Bi10d2Gq.js → CloudEditor-CyJItWsK.js} +186 -185
- package/dist/cdn/chunks/{CloudEditor-Bi10d2Gq.js.map → CloudEditor-CyJItWsK.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C0zeecvl.js → CollaboratorBar-C4CFs5EJ.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C0zeecvl.js.map → CollaboratorBar-C4CFs5EJ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CpSUUDDs.js → CountdownBlock-D6lCXhZA.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-CpSUUDDs.js.map → CountdownBlock-D6lCXhZA.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BBzdR-00.js → CountdownToolbar-BsGUxoRv.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-BBzdR-00.js.map → CountdownToolbar-BsGUxoRv.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Bthq6qoZ.js → IssuesPanel-DeHTmRDz.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-Bthq6qoZ.js.map → IssuesPanel-DeHTmRDz.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-CFMd6M7E.js → ModuleBrowserModal-Cgjz4xAz.js} +8 -8
- package/dist/cdn/chunks/ModuleBrowserModal-Cgjz4xAz.js.map +1 -0
- package/dist/cdn/chunks/{ModulePreviewCanvas-BkcPcF5C.js → ModulePreviewCanvas-CeS9PsAA.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-BkcPcF5C.js.map → ModulePreviewCanvas-CeS9PsAA.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-C2hH_ZIK.js → NumberWithSuffix-Bp-idLCc.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-C2hH_ZIK.js.map → NumberWithSuffix-Bp-idLCc.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BIWXLPfu.js → ParagraphEditor-fM9aFu8T.js} +116 -116
- package/dist/cdn/chunks/ParagraphEditor-fM9aFu8T.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DU0gc4bi.js → RichTextEditorContent-DwNPE5H5.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-DU0gc4bi.js.map → RichTextEditorContent-DwNPE5H5.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DR9EZlWe.js → SaveModuleDialog-BrtDXzIz.js} +4 -4
- package/dist/cdn/chunks/SaveModuleDialog-BrtDXzIz.js.map +1 -0
- package/dist/cdn/chunks/TitleEditor-D0rSnye0.js +175 -0
- package/dist/cdn/chunks/TitleEditor-D0rSnye0.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-eVGGIdne.js → blockTypeIcons-YOEe5mDE.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-eVGGIdne.js.map → blockTypeIcons-YOEe5mDE.js.map} +1 -1
- package/dist/{de-ED7c5RpG.js → cdn/chunks/de-CATfXDKV.js} +14 -1
- package/dist/cdn/chunks/{de-ED7c5RpG.js.map → de-CATfXDKV.js.map} +1 -1
- package/dist/cdn/chunks/{en-ivilDUn0.js → en-CwCAgYL5.js} +13 -2
- package/dist/cdn/chunks/{en-ivilDUn0.js.map → en-CwCAgYL5.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CvCoOuWB.js → extensions-GYsbQFPr.js} +26 -23
- package/dist/cdn/chunks/extensions-GYsbQFPr.js.map +1 -0
- package/dist/cdn/chunks/{features-CUYy5kZQ.js → features-D-2kVhHY.js} +1264 -1188
- package/dist/cdn/chunks/features-D-2kVhHY.js.map +1 -0
- package/dist/cdn/chunks/{icons-C4zY5-I3.js → icons-fZoyKV_s.js} +2 -2
- package/dist/cdn/chunks/{icons-C4zY5-I3.js.map → icons-fZoyKV_s.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BNt3msId.js → media-library-CO2WOETY.js} +240 -240
- package/dist/cdn/chunks/{media-library-BNt3msId.js.map → media-library-CO2WOETY.js.map} +1 -1
- package/dist/{pt-BR-B5tm2iBl.js → cdn/chunks/pt-BR-D3Mg7AKe.js} +14 -1
- package/dist/cdn/chunks/{pt-BR-B5tm2iBl.js.map → pt-BR-D3Mg7AKe.js.map} +1 -1
- package/dist/cdn/chunks/{quality-BTPRPGB-.js → quality-BxPiS-wv.js} +603 -577
- package/dist/cdn/chunks/{quality-BTPRPGB-.js.map → quality-BxPiS-wv.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-IOmuuZjJ.js → renderer-7z2t_bYQ.js} +142 -108
- package/dist/cdn/chunks/{renderer-IOmuuZjJ.js.map → renderer-7z2t_bYQ.js.map} +1 -1
- package/dist/cdn/chunks/{src-Dp0ZFQ4-.js → src-ftxPuuQh.js} +4 -4
- package/dist/cdn/chunks/{src-Dp0ZFQ4-.js.map → src-ftxPuuQh.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DtgjgsBH.js → styles-o0HIrw9F.js} +877 -622
- package/dist/cdn/chunks/styles-o0HIrw9F.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BErAJEvo.js → tiptap-BBbH3IT9.js} +849 -725
- package/dist/cdn/chunks/tiptap-BBbH3IT9.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +102 -101
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-Dz8Ay2FM.js → cloud-VxYMtfXC.js} +1 -1
- package/dist/{cdn/chunks/de-ED7c5RpG.js → de-CATfXDKV.js} +12 -3
- package/dist/{dist-BygsE-n3.js → dist-BDgf2G-V.js} +453 -314
- package/dist/{dist-BtDBsF3N.js → dist-BxP6TB0l.js} +2 -2
- package/dist/{dist-DWhP3Dp2.js → dist-BzuC8o3y.js} +1209 -1217
- package/dist/{dist-v-O2Subd.js → dist-C0jo8wtG.js} +2 -2
- package/dist/{dist-BTgujVMy.js → dist-C8wMh_gi.js} +2 -2
- package/dist/{dist-Cipw2HFH.js → dist-CIV3Brg-.js} +37 -4
- package/dist/{dist-HO0vjY5Z.js → dist-CNLAS2v2.js} +130 -124
- package/dist/{dist-BS5Oi67L.js → dist-CUpJmrjt.js} +2 -2
- package/dist/dist-D5lmdi1F.js +5 -0
- package/dist/{dist-T-ORzNfM.js → dist-D8C6jIXM.js} +168 -175
- package/dist/dist-DILjuzSv.js +5 -0
- package/dist/{dist-CDtcJMB2.js → dist-DXaxGLsw.js} +33 -33
- package/dist/{dist-DnGTaPRX.js → dist-DYO-w_Jf.js} +2 -2
- package/dist/{dist-CDZCyoRy.js → dist-UK-lbEBc.js} +2 -2
- package/dist/{en-ivilDUn0.js → en-CwCAgYL5.js} +12 -1
- package/dist/{extensions-BmGiz8Oo.js → extensions-Mj2-D8uK.js} +32 -29
- package/dist/{keys-B8K7Z7Ef.js → keys-BiQlvx51.js} +3 -3
- package/dist/{cdn/chunks/pt-BR-B5tm2iBl.js → pt-BR-D3Mg7AKe.js} +12 -3
- package/dist/style.css +1 -1
- package/dist/{styles-DFeOGKa_.js → styles-CJtcKmsx.js} +857 -601
- package/dist/templatical-editor.js +104 -103
- package/dist/{useCloudI18n-DFzVgYhJ.js → useCloudI18n-DKWJg6rJ.js} +1 -1
- package/dist/{useEditorCore-BXz-UXPd.js → useEditorCore-CEkf_VWX.js} +663 -633
- package/dist/{useI18n-CBbStVlD.js → useI18n-Besvmtxy.js} +1 -1
- package/dist/useMergeTag-WNzaCpXR.js +44 -0
- package/dist/{usePopoverRoot-62PlZQQ3.js → usePopoverRoot-CKt956u-.js} +1 -1
- package/package.json +21 -21
- package/dist/cdn/chunks/ModuleBrowserModal-CFMd6M7E.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-BIWXLPfu.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-DR9EZlWe.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-DZcx2N4R.js +0 -175
- package/dist/cdn/chunks/TitleEditor-DZcx2N4R.js.map +0 -1
- package/dist/cdn/chunks/extensions-CvCoOuWB.js.map +0 -1
- package/dist/cdn/chunks/features-CUYy5kZQ.js.map +0 -1
- package/dist/cdn/chunks/styles-DtgjgsBH.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BErAJEvo.js.map +0 -1
- package/dist/dist-BySzGkeC.js +0 -5
- package/dist/dist-D7JUZ2Kd.js +0 -5
- package/dist/useMergeTag-CS2bmWA0.js +0 -34
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as ae, x as oe, y as se, z as ce } from "./vue.runtime.esm-bundler-BDSGA5hA.js";
|
|
2
|
-
import { A as le, S as ue, T as de, _ as fe, a as pe, b as me, c as he, d as ge, f as _e, g as ve, h as ye, j as be, k as xe, l as Se, m as Ce, o as we, p as Te, s as Ee, t as De, u as Oe, v as ke, x as Ae, y as je } from "./dist-
|
|
3
|
-
import {
|
|
4
|
-
import { A as ze, C as Be, D as Ve,
|
|
5
|
-
import { t as
|
|
2
|
+
import { A as le, S as ue, T as de, _ as fe, a as pe, b as me, c as he, d as ge, f as _e, g as ve, h as ye, j as be, k as xe, l as Se, m as Ce, o as we, p as Te, s as Ee, t as De, u as Oe, v as ke, x as Ae, y as je } from "./dist-CIV3Brg-.js";
|
|
3
|
+
import { c as Me, i as Ne, l as Pe, n as Fe, o as Ie, r as Le, u as Re } from "./dist-CNLAS2v2.js";
|
|
4
|
+
import { A as ze, C as Be, D as Ve, O as He, S as Ue, _ as We, a as Ge, b as Ke, d as qe, f as Je, g as Ye, h as Xe, i as Ze, j as Qe, k as $e, m as et, n as tt, o as nt, p as rt, s as it, u as at, v as ot, w as st, x as ct, y as lt } from "./keys-BiQlvx51.js";
|
|
5
|
+
import { t as ut } from "./useI18n-Besvmtxy.js";
|
|
6
6
|
import { t as P } from "./createLucideIcon-XgXOJ05E.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import "./useCloudI18n-
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
7
|
+
import { t as dt } from "./message-circle-D-umK_MU.js";
|
|
8
|
+
import { t as ft } from "./trash-2-BpY5BCLT.js";
|
|
9
|
+
import { t as pt } from "./triangle-alert-MwJBKR2e.js";
|
|
10
|
+
import { t as mt } from "./LoadingTrack-xCOLUR3o.js";
|
|
11
|
+
import { t as ht } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
12
|
+
import "./useCloudI18n-DKWJg6rJ.js";
|
|
13
|
+
import { t as gt } from "./useMergeTag-WNzaCpXR.js";
|
|
14
|
+
import { t as _t } from "./useAliveFlag-BLyG8L4d.js";
|
|
15
15
|
//#region ../core/dist/index.js
|
|
16
|
-
function
|
|
16
|
+
function vt(e) {
|
|
17
17
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function yt(e) {
|
|
20
20
|
let t = o({
|
|
21
21
|
content: e.content ?? Oe(e.defaultFontFamily, e.templateDefaults),
|
|
22
22
|
selectedBlockId: null,
|
|
@@ -106,7 +106,7 @@ function vt(e) {
|
|
|
106
106
|
if (c(n)) return;
|
|
107
107
|
let o = i(t.content.blocks, n);
|
|
108
108
|
if (o && o.type === "section") {
|
|
109
|
-
if (r < 0 || r >=
|
|
109
|
+
if (r < 0 || r >= vt(o.columns)) return;
|
|
110
110
|
o.children[r] = o.children[r] || [];
|
|
111
111
|
let t = o.children[r];
|
|
112
112
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -138,7 +138,7 @@ function vt(e) {
|
|
|
138
138
|
let u;
|
|
139
139
|
if (r) {
|
|
140
140
|
let e = i(t.content.blocks, r);
|
|
141
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
141
|
+
if (!e || e.type !== "section" || a < 0 || a >= vt(e.columns)) return;
|
|
142
142
|
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
143
143
|
} else u = t.content.blocks;
|
|
144
144
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -167,9 +167,9 @@ function vt(e) {
|
|
|
167
167
|
findBlockLocation: l
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
var
|
|
171
|
-
function
|
|
172
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
170
|
+
var bt = 50, xt = 300, St = 1500;
|
|
171
|
+
function Ct(e) {
|
|
172
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = bt } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
|
|
173
173
|
function f() {
|
|
174
174
|
let e = /* @__PURE__ */ new WeakSet();
|
|
175
175
|
return JSON.parse(JSON.stringify(t.value, (t, n) => {
|
|
@@ -194,21 +194,21 @@ function St(e) {
|
|
|
194
194
|
if (l && l.blockId === e) {
|
|
195
195
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
196
196
|
l = null;
|
|
197
|
-
},
|
|
197
|
+
}, xt);
|
|
198
198
|
return;
|
|
199
199
|
}
|
|
200
200
|
g(), p(f()), o.value = [], l = {
|
|
201
201
|
blockId: e,
|
|
202
202
|
timeoutId: setTimeout(() => {
|
|
203
203
|
l = null;
|
|
204
|
-
},
|
|
204
|
+
}, xt)
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
function y() {
|
|
209
209
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
210
210
|
s.value = !1, c = null;
|
|
211
|
-
},
|
|
211
|
+
}, St);
|
|
212
212
|
}
|
|
213
213
|
function b() {
|
|
214
214
|
if (a.value.length === 0) return;
|
|
@@ -240,7 +240,7 @@ function St(e) {
|
|
|
240
240
|
destroy: C
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function wt(e) {
|
|
244
244
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
245
245
|
...e,
|
|
246
246
|
id: ue(),
|
|
@@ -256,7 +256,7 @@ function Ct(e) {
|
|
|
256
256
|
id: ue()
|
|
257
257
|
})));
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function Tt(e) {
|
|
260
260
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
261
261
|
function o(n, r, a) {
|
|
262
262
|
let o = we(n, e.blockDefaults);
|
|
@@ -264,9 +264,9 @@ function wt(e) {
|
|
|
264
264
|
}
|
|
265
265
|
function s(e, n, r) {
|
|
266
266
|
let o = JSON.parse(JSON.stringify(e));
|
|
267
|
-
if (o.id = ue(),
|
|
267
|
+
if (o.id = ue(), wt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
268
268
|
let t = JSON.parse(JSON.stringify(e));
|
|
269
|
-
return t.id = ue(),
|
|
269
|
+
return t.id = ue(), wt(t), t;
|
|
270
270
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
271
271
|
else {
|
|
272
272
|
let i = a?.(e.id) ?? null;
|
|
@@ -287,7 +287,7 @@ function wt(e) {
|
|
|
287
287
|
updateBlockProperty: l
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Et(e) {
|
|
291
291
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
292
292
|
function c() {
|
|
293
293
|
return typeof a == "function" ? a() : a;
|
|
@@ -323,7 +323,7 @@ function Tt(e) {
|
|
|
323
323
|
destroy: h
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Dt(e) {
|
|
327
327
|
let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
|
|
328
328
|
function r(e) {
|
|
329
329
|
return t.has(e);
|
|
@@ -341,7 +341,7 @@ function Et(e) {
|
|
|
341
341
|
hasHiddenBlocks: n
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Ot(e) {
|
|
345
345
|
let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
|
|
346
346
|
async function a() {
|
|
347
347
|
let r = e.definition.value;
|
|
@@ -371,7 +371,7 @@ function Dt(e) {
|
|
|
371
371
|
needsFetch: i
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function kt(e, t) {
|
|
375
375
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
376
376
|
e.addBlock = (r, i, a, o) => {
|
|
377
377
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -387,30 +387,60 @@ function Ot(e, t) {
|
|
|
387
387
|
}
|
|
388
388
|
//#endregion
|
|
389
389
|
//#region src/utils/activeEditorTracker.ts
|
|
390
|
-
var
|
|
391
|
-
function
|
|
392
|
-
let e = ++
|
|
393
|
-
return
|
|
390
|
+
var At = /* @__PURE__ */ new Set(), jt = 0, Mt = 0;
|
|
391
|
+
function Nt() {
|
|
392
|
+
let e = ++Mt;
|
|
393
|
+
return At.add(e), jt === 0 && (jt = e), {
|
|
394
394
|
id: e,
|
|
395
|
-
isActive: () =>
|
|
395
|
+
isActive: () => At.size <= 1 || jt === e,
|
|
396
396
|
claim: () => {
|
|
397
|
-
|
|
397
|
+
jt = e;
|
|
398
398
|
},
|
|
399
399
|
dispose: () => {
|
|
400
|
-
if (
|
|
401
|
-
let e = Array.from(
|
|
402
|
-
|
|
400
|
+
if (At.delete(e), jt === e) {
|
|
401
|
+
let e = Array.from(At);
|
|
402
|
+
jt = e[e.length - 1] ?? 0;
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
407
|
//#endregion
|
|
408
|
+
//#region src/composables/useMergeTagPicker.ts
|
|
409
|
+
function Pt() {
|
|
410
|
+
let e = h(!1), t = h([]), n = null;
|
|
411
|
+
function r(r) {
|
|
412
|
+
if (n) {
|
|
413
|
+
let e = n;
|
|
414
|
+
n = null, e(null);
|
|
415
|
+
}
|
|
416
|
+
return t.value = r, e.value = !0, new Promise((e) => {
|
|
417
|
+
n = e;
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
function i(r) {
|
|
421
|
+
let i = n;
|
|
422
|
+
n = null, e.value = !1, t.value = [], i && i(r);
|
|
423
|
+
}
|
|
424
|
+
return p() && re(() => {
|
|
425
|
+
if (n) {
|
|
426
|
+
let e = n;
|
|
427
|
+
n = null, e(null);
|
|
428
|
+
}
|
|
429
|
+
e.value = !1, t.value = [];
|
|
430
|
+
}), {
|
|
431
|
+
isOpen: e,
|
|
432
|
+
tags: t,
|
|
433
|
+
open: r,
|
|
434
|
+
resolve: i
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
//#endregion
|
|
408
438
|
//#region src/composables/useTemplateLint.ts
|
|
409
|
-
function
|
|
439
|
+
function Ft(e) {
|
|
410
440
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
411
441
|
}
|
|
412
|
-
function
|
|
413
|
-
let t = h([]), n = h(!1), r = h(!1), i = d(null), a =
|
|
442
|
+
function It(e) {
|
|
443
|
+
let t = h([]), n = h(!1), r = h(!1), i = d(null), a = Ft(e.options), o = null, c = !1;
|
|
414
444
|
a || l();
|
|
415
445
|
async function l() {
|
|
416
446
|
try {
|
|
@@ -420,7 +450,7 @@ function Pt(e) {
|
|
|
420
450
|
lintAccessibility: t.lintAccessibility,
|
|
421
451
|
lintStructure: t.lintStructure,
|
|
422
452
|
lintLinks: t.lintLinks
|
|
423
|
-
}, n.value = !0, u(), o =
|
|
453
|
+
}, n.value = !0, u(), o = Re(e.content, u, {
|
|
424
454
|
debounce: e.debounce ?? 500,
|
|
425
455
|
deep: !0
|
|
426
456
|
});
|
|
@@ -461,12 +491,12 @@ function Pt(e) {
|
|
|
461
491
|
}
|
|
462
492
|
//#endregion
|
|
463
493
|
//#region src/utils/blockTypeLabels.ts
|
|
464
|
-
function
|
|
494
|
+
function Lt(e, t) {
|
|
465
495
|
return t.blocks[e] ?? e;
|
|
466
496
|
}
|
|
467
497
|
//#endregion
|
|
468
498
|
//#region src/composables/useKeyboardReorder.ts
|
|
469
|
-
function
|
|
499
|
+
function Rt(e, t) {
|
|
470
500
|
let n = h(null), r = h(""), i = null;
|
|
471
501
|
function a(t) {
|
|
472
502
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -493,7 +523,7 @@ function It(e, t) {
|
|
|
493
523
|
let r = a(n);
|
|
494
524
|
if (!r) return "";
|
|
495
525
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
496
|
-
return i ?
|
|
526
|
+
return i ? Lt(i.type, t.t) : "";
|
|
497
527
|
}
|
|
498
528
|
function s(t, n) {
|
|
499
529
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -562,13 +592,13 @@ function It(e, t) {
|
|
|
562
592
|
}
|
|
563
593
|
//#endregion
|
|
564
594
|
//#region src/composables/useUiTheme.ts
|
|
565
|
-
function
|
|
566
|
-
let t =
|
|
595
|
+
function zt(e) {
|
|
596
|
+
let t = Ne("(prefers-color-scheme: dark)");
|
|
567
597
|
return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
568
598
|
}
|
|
569
599
|
//#endregion
|
|
570
600
|
//#region src/composables/useThemeStyles.ts
|
|
571
|
-
var
|
|
601
|
+
var Bt = {
|
|
572
602
|
bg: "--tpl-bg",
|
|
573
603
|
bgElevated: "--tpl-bg-elevated",
|
|
574
604
|
bgHover: "--tpl-bg-hover",
|
|
@@ -592,10 +622,10 @@ var Rt = {
|
|
|
592
622
|
dangerLight: "--tpl-danger-light",
|
|
593
623
|
canvasBg: "--tpl-canvas-bg"
|
|
594
624
|
};
|
|
595
|
-
function
|
|
625
|
+
function Vt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
596
626
|
return { themeStyles: x(() => {
|
|
597
627
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
598
|
-
if (a) for (let [e, t] of Object.entries(
|
|
628
|
+
if (a) for (let [e, t] of Object.entries(Bt)) {
|
|
599
629
|
let n = a[e];
|
|
600
630
|
n && (r[t] = n);
|
|
601
631
|
}
|
|
@@ -604,27 +634,27 @@ function zt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
604
634
|
}
|
|
605
635
|
//#endregion
|
|
606
636
|
//#region src/utils/logger.ts
|
|
607
|
-
var
|
|
608
|
-
function
|
|
637
|
+
var Ht = "[Templatical]";
|
|
638
|
+
function Ut() {
|
|
609
639
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
610
640
|
}
|
|
611
|
-
var
|
|
641
|
+
var Wt = {
|
|
612
642
|
warn(...e) {
|
|
613
|
-
console.warn(
|
|
643
|
+
console.warn(Ht, ...e);
|
|
614
644
|
},
|
|
615
645
|
error(...e) {
|
|
616
|
-
console.error(
|
|
646
|
+
console.error(Ht, ...e);
|
|
617
647
|
},
|
|
618
648
|
debug(...e) {
|
|
619
|
-
|
|
649
|
+
Ut() || console.debug(Ht, ...e);
|
|
620
650
|
},
|
|
621
651
|
info(...e) {
|
|
622
|
-
|
|
652
|
+
Ut() || console.info(Ht, ...e);
|
|
623
653
|
}
|
|
624
654
|
};
|
|
625
655
|
//#endregion
|
|
626
656
|
//#region src/composables/useBlockRegistry.ts
|
|
627
|
-
function
|
|
657
|
+
function Gt() {
|
|
628
658
|
let e = d(/* @__PURE__ */ new Map());
|
|
629
659
|
function t(t, n) {
|
|
630
660
|
e.value.set(t, n), k(e);
|
|
@@ -676,7 +706,7 @@ function Ut() {
|
|
|
676
706
|
strictFilters: !1
|
|
677
707
|
}).parseAndRender(t.template, e.fieldValues);
|
|
678
708
|
} catch (t) {
|
|
679
|
-
return
|
|
709
|
+
return Wt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
680
710
|
}
|
|
681
711
|
}
|
|
682
712
|
function l(t) {
|
|
@@ -695,7 +725,7 @@ function Ut() {
|
|
|
695
725
|
}
|
|
696
726
|
//#endregion
|
|
697
727
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
698
|
-
var
|
|
728
|
+
var Kt = [
|
|
699
729
|
{
|
|
700
730
|
type: "section",
|
|
701
731
|
label: "Section",
|
|
@@ -762,8 +792,8 @@ var Wt = [
|
|
|
762
792
|
createBlock: he
|
|
763
793
|
}
|
|
764
794
|
];
|
|
765
|
-
function
|
|
766
|
-
for (let n of
|
|
795
|
+
function qt(e, t) {
|
|
796
|
+
for (let n of Kt) {
|
|
767
797
|
let r = t[n.type];
|
|
768
798
|
r && e.registerBuiltIn(n.type, {
|
|
769
799
|
component: r,
|
|
@@ -778,7 +808,7 @@ function Gt(e, t) {
|
|
|
778
808
|
}
|
|
779
809
|
//#endregion
|
|
780
810
|
//#region src/utils/keyboardShortcuts.ts
|
|
781
|
-
function
|
|
811
|
+
function Jt(e) {
|
|
782
812
|
for (let t of e.composedPath()) {
|
|
783
813
|
if (!(t instanceof HTMLElement)) continue;
|
|
784
814
|
if (t.isContentEditable) return !0;
|
|
@@ -787,14 +817,14 @@ function Kt(e) {
|
|
|
787
817
|
}
|
|
788
818
|
return !1;
|
|
789
819
|
}
|
|
790
|
-
function
|
|
820
|
+
function Yt(e, t) {
|
|
791
821
|
let n = e.metaKey || e.ctrlKey;
|
|
792
822
|
if (n && e.key.toLowerCase() === "s") {
|
|
793
823
|
e.preventDefault(), t.onSave?.();
|
|
794
824
|
return;
|
|
795
825
|
}
|
|
796
826
|
if (n && e.key.toLowerCase() === "z") {
|
|
797
|
-
if (
|
|
827
|
+
if (Jt(e)) return;
|
|
798
828
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
799
829
|
return;
|
|
800
830
|
}
|
|
@@ -802,11 +832,11 @@ function qt(e, t) {
|
|
|
802
832
|
t.selectBlock(null);
|
|
803
833
|
return;
|
|
804
834
|
}
|
|
805
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
835
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Jt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
806
836
|
}
|
|
807
837
|
//#endregion
|
|
808
838
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
809
|
-
var
|
|
839
|
+
var Xt = { class: "tpl:text-center" }, Zt = ["href"], Qt = /* @__PURE__ */ y({
|
|
810
840
|
__name: "ButtonBlock",
|
|
811
841
|
props: {
|
|
812
842
|
block: {},
|
|
@@ -827,17 +857,17 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
827
857
|
};
|
|
828
858
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
829
859
|
});
|
|
830
|
-
return (n, i) => (e(), w("div",
|
|
860
|
+
return (n, i) => (e(), w("div", Xt, [C("a", {
|
|
831
861
|
href: t.block.url || "#",
|
|
832
862
|
style: A(r.value),
|
|
833
863
|
class: "tpl:cursor-default",
|
|
834
864
|
onClick: i[0] ||= b(() => {}, ["prevent"])
|
|
835
|
-
}, M(t.block.text), 13,
|
|
865
|
+
}, M(t.block.text), 13, Zt)]));
|
|
836
866
|
}
|
|
837
|
-
}),
|
|
867
|
+
}), $t = P("bookmark", [["path", {
|
|
838
868
|
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",
|
|
839
869
|
key: "oz39mx"
|
|
840
|
-
}]]),
|
|
870
|
+
}]]), en = P("box", [
|
|
841
871
|
["path", {
|
|
842
872
|
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",
|
|
843
873
|
key: "hh9hay"
|
|
@@ -850,13 +880,13 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
850
880
|
d: "M12 22V12",
|
|
851
881
|
key: "d0xqtd"
|
|
852
882
|
}]
|
|
853
|
-
]),
|
|
883
|
+
]), tn = P("code", [["path", {
|
|
854
884
|
d: "m16 18 6-6-6-6",
|
|
855
885
|
key: "eg8j8"
|
|
856
886
|
}], ["path", {
|
|
857
887
|
d: "m8 6-6 6 6 6",
|
|
858
888
|
key: "ppft3o"
|
|
859
|
-
}]]),
|
|
889
|
+
}]]), nn = P("copy", [["rect", {
|
|
860
890
|
width: "14",
|
|
861
891
|
height: "14",
|
|
862
892
|
x: "8",
|
|
@@ -867,7 +897,7 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
867
897
|
}], ["path", {
|
|
868
898
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
869
899
|
key: "zix9uf"
|
|
870
|
-
}]]),
|
|
900
|
+
}]]), rn = P("eye-off", [
|
|
871
901
|
["path", {
|
|
872
902
|
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",
|
|
873
903
|
key: "ct8e1f"
|
|
@@ -884,10 +914,10 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
884
914
|
d: "m2 2 20 20",
|
|
885
915
|
key: "1ooewy"
|
|
886
916
|
}]
|
|
887
|
-
]),
|
|
917
|
+
]), an = P("funnel", [["path", {
|
|
888
918
|
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",
|
|
889
919
|
key: "sc7q7i"
|
|
890
|
-
}]]),
|
|
920
|
+
}]]), on = P("grip-vertical", [
|
|
891
921
|
["circle", {
|
|
892
922
|
cx: "9",
|
|
893
923
|
cy: "12",
|
|
@@ -924,7 +954,7 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
924
954
|
r: "1",
|
|
925
955
|
key: "f4zoj3"
|
|
926
956
|
}]
|
|
927
|
-
]),
|
|
957
|
+
]), sn = P("image", [
|
|
928
958
|
["rect", {
|
|
929
959
|
width: "18",
|
|
930
960
|
height: "18",
|
|
@@ -944,13 +974,13 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
944
974
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
945
975
|
key: "1xmnt7"
|
|
946
976
|
}]
|
|
947
|
-
]),
|
|
977
|
+
]), cn = P("navigation", [["polygon", {
|
|
948
978
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
949
979
|
key: "1ltx0t"
|
|
950
|
-
}]]),
|
|
980
|
+
}]]), ln = P("puzzle", [["path", {
|
|
951
981
|
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",
|
|
952
982
|
key: "w46dr5"
|
|
953
|
-
}]]),
|
|
983
|
+
}]]), un = P("share-2", [
|
|
954
984
|
["circle", {
|
|
955
985
|
cx: "18",
|
|
956
986
|
cy: "5",
|
|
@@ -983,7 +1013,7 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
983
1013
|
y2: "10.49",
|
|
984
1014
|
key: "1n3mei"
|
|
985
1015
|
}]
|
|
986
|
-
]),
|
|
1016
|
+
]), dn = P("table", [
|
|
987
1017
|
["path", {
|
|
988
1018
|
d: "M12 3v18",
|
|
989
1019
|
key: "108xh3"
|
|
@@ -1004,7 +1034,7 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
1004
1034
|
d: "M3 15h18",
|
|
1005
1035
|
key: "5xshup"
|
|
1006
1036
|
}]
|
|
1007
|
-
]),
|
|
1037
|
+
]), fn = P("video", [["path", {
|
|
1008
1038
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1009
1039
|
key: "ftymec"
|
|
1010
1040
|
}], ["rect", {
|
|
@@ -1014,11 +1044,11 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
1014
1044
|
height: "12",
|
|
1015
1045
|
rx: "2",
|
|
1016
1046
|
key: "158x01"
|
|
1017
|
-
}]]),
|
|
1047
|
+
}]]), pn = ["innerHTML"], mn = [
|
|
1018
1048
|
"src",
|
|
1019
1049
|
"width",
|
|
1020
1050
|
"height"
|
|
1021
|
-
],
|
|
1051
|
+
], hn = /* @__PURE__ */ y({
|
|
1022
1052
|
__name: "CustomBlockIcon",
|
|
1023
1053
|
props: {
|
|
1024
1054
|
icon: {},
|
|
@@ -1034,14 +1064,14 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
1034
1064
|
height: `${r.value}px`
|
|
1035
1065
|
}),
|
|
1036
1066
|
innerHTML: t.icon
|
|
1037
|
-
}, null, 12,
|
|
1067
|
+
}, null, 12, pn)) : a.value ? (e(), w("img", {
|
|
1038
1068
|
key: 1,
|
|
1039
1069
|
src: t.icon,
|
|
1040
1070
|
width: r.value,
|
|
1041
1071
|
height: r.value,
|
|
1042
1072
|
class: "tpl:inline-block",
|
|
1043
1073
|
alt: ""
|
|
1044
|
-
}, null, 8,
|
|
1074
|
+
}, null, 8, mn)) : (e(), ne(j(en), {
|
|
1045
1075
|
key: 2,
|
|
1046
1076
|
size: r.value,
|
|
1047
1077
|
"stroke-width": 1.5
|
|
@@ -1050,16 +1080,16 @@ var Jt = { class: "tpl:text-center" }, Yt = ["href"], Xt = /* @__PURE__ */ y({
|
|
|
1050
1080
|
});
|
|
1051
1081
|
//#endregion
|
|
1052
1082
|
//#region src/composables/useEditorRoot.ts
|
|
1053
|
-
function
|
|
1083
|
+
function gn() {
|
|
1054
1084
|
return ae(et, document) ?? document;
|
|
1055
1085
|
}
|
|
1056
1086
|
//#endregion
|
|
1057
1087
|
//#region src/composables/useFocusTrap.ts
|
|
1058
|
-
var
|
|
1059
|
-
function
|
|
1060
|
-
let n =
|
|
1088
|
+
var _n = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1089
|
+
function vn(e, t) {
|
|
1090
|
+
let n = gn(), r = null, i = null, a = null;
|
|
1061
1091
|
function o() {
|
|
1062
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1092
|
+
return e.value ? Array.from(e.value.querySelectorAll(_n)).filter((e) => e.offsetParent !== null) : [];
|
|
1063
1093
|
}
|
|
1064
1094
|
function c(e) {
|
|
1065
1095
|
if (e.key !== "Tab") return;
|
|
@@ -1089,8 +1119,8 @@ function gn(e, t) {
|
|
|
1089
1119
|
}
|
|
1090
1120
|
//#endregion
|
|
1091
1121
|
//#region src/composables/useEmoji.ts
|
|
1092
|
-
function
|
|
1093
|
-
let [e, t] =
|
|
1122
|
+
function yn() {
|
|
1123
|
+
let [e, t] = Pe(!1), n = d([]), r = !1;
|
|
1094
1124
|
re(() => {
|
|
1095
1125
|
r = !0;
|
|
1096
1126
|
}), s(e, async (e) => {
|
|
@@ -1115,7 +1145,7 @@ function _n() {
|
|
|
1115
1145
|
}
|
|
1116
1146
|
//#endregion
|
|
1117
1147
|
//#region src/composables/useDragDrop.ts
|
|
1118
|
-
function
|
|
1148
|
+
function bn(e) {
|
|
1119
1149
|
let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
|
|
1120
1150
|
function o(e) {
|
|
1121
1151
|
r.value = !0, i.value = e;
|
|
@@ -1165,7 +1195,7 @@ function vn(e) {
|
|
|
1165
1195
|
}
|
|
1166
1196
|
//#endregion
|
|
1167
1197
|
//#region src/composables/useFonts.ts
|
|
1168
|
-
var
|
|
1198
|
+
var xn = [
|
|
1169
1199
|
{
|
|
1170
1200
|
value: "Arial",
|
|
1171
1201
|
label: "Arial"
|
|
@@ -1194,7 +1224,7 @@ var yn = [
|
|
|
1194
1224
|
value: "Courier New",
|
|
1195
1225
|
label: "Courier New"
|
|
1196
1226
|
}
|
|
1197
|
-
],
|
|
1227
|
+
], Sn = {
|
|
1198
1228
|
arial: "Arial, sans-serif",
|
|
1199
1229
|
helvetica: "Helvetica, sans-serif",
|
|
1200
1230
|
georgia: "Georgia, serif",
|
|
@@ -1202,14 +1232,14 @@ var yn = [
|
|
|
1202
1232
|
verdana: "Verdana, sans-serif",
|
|
1203
1233
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1204
1234
|
"courier new": "'Courier New', monospace"
|
|
1205
|
-
},
|
|
1206
|
-
function
|
|
1207
|
-
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ??
|
|
1235
|
+
}, Cn = "Arial, sans-serif";
|
|
1236
|
+
function wn(e) {
|
|
1237
|
+
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? Cn);
|
|
1208
1238
|
function a(e) {
|
|
1209
1239
|
n.value = e;
|
|
1210
1240
|
}
|
|
1211
1241
|
let o = x(() => {
|
|
1212
|
-
let e = [...
|
|
1242
|
+
let e = [...xn];
|
|
1213
1243
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1214
1244
|
let r = t.value.map((e) => ({
|
|
1215
1245
|
value: e.name,
|
|
@@ -1222,17 +1252,17 @@ function Sn(e) {
|
|
|
1222
1252
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1223
1253
|
}
|
|
1224
1254
|
function c(e) {
|
|
1225
|
-
return
|
|
1255
|
+
return xn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1226
1256
|
}
|
|
1227
1257
|
function l() {
|
|
1228
1258
|
if (e?.defaultFont) {
|
|
1229
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
1259
|
+
if (!n.value && !c(e.defaultFont)) return Cn;
|
|
1230
1260
|
if (s(e.defaultFont)) {
|
|
1231
1261
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1232
1262
|
if (t) return t.value;
|
|
1233
1263
|
}
|
|
1234
1264
|
}
|
|
1235
|
-
return
|
|
1265
|
+
return Cn;
|
|
1236
1266
|
}
|
|
1237
1267
|
let u = x(() => l());
|
|
1238
1268
|
function d(e) {
|
|
@@ -1242,7 +1272,7 @@ function Sn(e) {
|
|
|
1242
1272
|
let e = n.fallback ?? i.value;
|
|
1243
1273
|
return `'${n.name}', ${e}`;
|
|
1244
1274
|
}
|
|
1245
|
-
return
|
|
1275
|
+
return Sn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1246
1276
|
}
|
|
1247
1277
|
let f = [], m = !1;
|
|
1248
1278
|
async function g() {
|
|
@@ -1258,7 +1288,7 @@ function Sn(e) {
|
|
|
1258
1288
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1259
1289
|
});
|
|
1260
1290
|
} catch (t) {
|
|
1261
|
-
|
|
1291
|
+
Wt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1262
1292
|
}
|
|
1263
1293
|
});
|
|
1264
1294
|
await Promise.allSettled(e), !m && (r.value = !0);
|
|
@@ -1285,9 +1315,9 @@ function Sn(e) {
|
|
|
1285
1315
|
}
|
|
1286
1316
|
//#endregion
|
|
1287
1317
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1288
|
-
function
|
|
1318
|
+
function Tn(e) {
|
|
1289
1319
|
let t = h(!1), n = h(""), r = h(null);
|
|
1290
|
-
|
|
1320
|
+
vn(r, t);
|
|
1291
1321
|
function i() {
|
|
1292
1322
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
1293
1323
|
}
|
|
@@ -1338,8 +1368,8 @@ function Cn(e) {
|
|
|
1338
1368
|
}
|
|
1339
1369
|
//#endregion
|
|
1340
1370
|
//#region src/composables/useRichTextEditor.ts
|
|
1341
|
-
function
|
|
1342
|
-
let t = ae(rt, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } =
|
|
1371
|
+
function En(e) {
|
|
1372
|
+
let t = ae(rt, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = gt(), f = ae($e, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = Tn(g), { start: T, stop: E } = Me(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
|
|
1343
1373
|
async function te() {
|
|
1344
1374
|
O.value = null, D.value = !0;
|
|
1345
1375
|
try {
|
|
@@ -1369,7 +1399,7 @@ function wn(e) {
|
|
|
1369
1399
|
g.value = s, D.value = !1, T();
|
|
1370
1400
|
} catch (t) {
|
|
1371
1401
|
if (k) return;
|
|
1372
|
-
|
|
1402
|
+
Wt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
|
|
1373
1403
|
}
|
|
1374
1404
|
}
|
|
1375
1405
|
function A() {
|
|
@@ -1417,20 +1447,20 @@ function wn(e) {
|
|
|
1417
1447
|
}
|
|
1418
1448
|
//#endregion
|
|
1419
1449
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1420
|
-
var
|
|
1450
|
+
var Dn = { class: "tpl:w-full" }, On = {
|
|
1421
1451
|
key: 0,
|
|
1422
1452
|
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)]"
|
|
1423
|
-
},
|
|
1453
|
+
}, kn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, An = {
|
|
1424
1454
|
key: 1,
|
|
1425
1455
|
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)]"
|
|
1426
|
-
},
|
|
1456
|
+
}, jn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Mn = {
|
|
1427
1457
|
key: 2,
|
|
1428
1458
|
class: "tpl:relative"
|
|
1429
|
-
},
|
|
1459
|
+
}, Nn = ["innerHTML"], Pn = {
|
|
1430
1460
|
key: 0,
|
|
1431
1461
|
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]",
|
|
1432
1462
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1433
|
-
},
|
|
1463
|
+
}, Fn = /* @__PURE__ */ y({
|
|
1434
1464
|
__name: "CustomBlock",
|
|
1435
1465
|
props: {
|
|
1436
1466
|
block: {},
|
|
@@ -1438,7 +1468,7 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1438
1468
|
},
|
|
1439
1469
|
emits: ["fetchData"],
|
|
1440
1470
|
setup(t, { emit: n }) {
|
|
1441
|
-
let r = t, i = n, { t: a } =
|
|
1471
|
+
let r = t, i = n, { t: a } = ut(), o = ae(nt, null), c = h(""), l = h(!1), d = x(() => o?.getDefinition(r.block.customType)), f = x(() => !!d.value), { isFetching: p, fetch: m, needsFetch: g, hasDataSource: v } = Ot({
|
|
1442
1472
|
definition: d,
|
|
1443
1473
|
block: x(() => r.block),
|
|
1444
1474
|
onUpdate: (e, t) => {
|
|
@@ -1459,15 +1489,15 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1459
1489
|
}
|
|
1460
1490
|
}
|
|
1461
1491
|
}
|
|
1462
|
-
let S =
|
|
1492
|
+
let S = Ie(y, 150);
|
|
1463
1493
|
return u(() => {
|
|
1464
1494
|
y();
|
|
1465
1495
|
}), s(() => r.block.fieldValues, () => {
|
|
1466
1496
|
S();
|
|
1467
|
-
}, { deep: !0 }), (t, n) => (e(), w("div",
|
|
1497
|
+
}, { deep: !0 }), (t, n) => (e(), w("div", Dn, [f.value ? l.value ? (e(), w("div", An, [N(j(pt), {
|
|
1468
1498
|
size: 24,
|
|
1469
1499
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1470
|
-
}), C("span",
|
|
1500
|
+
}), C("span", jn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", Mn, [C("div", { innerHTML: c.value }, null, 8, Nn), j(v) && j(g) ? (e(), w("div", Pn, [j(p) ? (e(), ne(mt, {
|
|
1471
1501
|
key: 1,
|
|
1472
1502
|
class: "tpl:w-48"
|
|
1473
1503
|
})) : (e(), w("button", {
|
|
@@ -1475,16 +1505,16 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1475
1505
|
type: "button",
|
|
1476
1506
|
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)]",
|
|
1477
1507
|
onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
|
|
1478
|
-
}, [d.value?.icon ? (e(), ne(
|
|
1508
|
+
}, [d.value?.icon ? (e(), ne(hn, {
|
|
1479
1509
|
key: 0,
|
|
1480
1510
|
icon: d.value.icon,
|
|
1481
1511
|
size: 16
|
|
1482
|
-
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div",
|
|
1512
|
+
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", On, [N(j(ln), {
|
|
1483
1513
|
size: 24,
|
|
1484
1514
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1485
|
-
}), C("span",
|
|
1515
|
+
}), C("span", kn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1486
1516
|
}
|
|
1487
|
-
}),
|
|
1517
|
+
}), In = { class: "tpl:w-full" }, Ln = /* @__PURE__ */ y({
|
|
1488
1518
|
__name: "DividerBlock",
|
|
1489
1519
|
props: {
|
|
1490
1520
|
block: {},
|
|
@@ -1496,37 +1526,37 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1496
1526
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1497
1527
|
margin: n.block.width === "full" ? "0" : "0 auto"
|
|
1498
1528
|
}));
|
|
1499
|
-
return (t, n) => (e(), w("div",
|
|
1529
|
+
return (t, n) => (e(), w("div", In, [C("hr", {
|
|
1500
1530
|
class: "tpl:m-0 tpl:border-none",
|
|
1501
1531
|
style: A(r.value)
|
|
1502
1532
|
}, null, 4)]));
|
|
1503
1533
|
}
|
|
1504
|
-
}),
|
|
1534
|
+
}), Rn = { class: "tpl:w-full" }, zn = { 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)]" }, Bn = {
|
|
1505
1535
|
key: 0,
|
|
1506
1536
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1507
|
-
},
|
|
1537
|
+
}, Vn = {
|
|
1508
1538
|
key: 1,
|
|
1509
1539
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1510
|
-
},
|
|
1540
|
+
}, Hn = /* @__PURE__ */ y({
|
|
1511
1541
|
__name: "HtmlBlock",
|
|
1512
1542
|
props: {
|
|
1513
1543
|
block: {},
|
|
1514
1544
|
viewport: {}
|
|
1515
1545
|
},
|
|
1516
1546
|
setup(t) {
|
|
1517
|
-
let n = t, { t: r } =
|
|
1518
|
-
return (t, n) => (e(), w("div",
|
|
1547
|
+
let n = t, { t: r } = ut(), i = x(() => n.block.content.trim().length > 0);
|
|
1548
|
+
return (t, n) => (e(), w("div", Rn, [C("div", zn, [N(j(tn), {
|
|
1519
1549
|
size: 24,
|
|
1520
1550
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1521
|
-
}), i.value ? (e(), w("span",
|
|
1551
|
+
}), i.value ? (e(), w("span", Bn, M(j(r).html.preview), 1)) : (e(), w("span", Vn, M(j(r).html.empty), 1))])]));
|
|
1522
1552
|
}
|
|
1523
|
-
}),
|
|
1553
|
+
}), Un = ["href"], Wn = ["src", "alt"], Gn = ["src", "alt"], Kn = {
|
|
1524
1554
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1525
1555
|
style: { opacity: "0.7" }
|
|
1526
|
-
},
|
|
1556
|
+
}, qn = ["href"], Jn = ["src", "alt"], Yn = ["src", "alt"], Xn = {
|
|
1527
1557
|
key: 3,
|
|
1528
1558
|
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)]"
|
|
1529
|
-
},
|
|
1559
|
+
}, Zn = ["aria-label"], Qn = { key: 1 }, $n = /* @__PURE__ */ y({
|
|
1530
1560
|
__name: "ImageBlock",
|
|
1531
1561
|
props: {
|
|
1532
1562
|
block: {},
|
|
@@ -1534,7 +1564,7 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1534
1564
|
},
|
|
1535
1565
|
emits: ["update"],
|
|
1536
1566
|
setup(t, { emit: n }) {
|
|
1537
|
-
let r = t, i = n, { t: a } =
|
|
1567
|
+
let r = t, i = n, { t: a } = ut(), { syntax: o } = gt(), s = ae(Ue, null), c = x(() => !!s), l = _t();
|
|
1538
1568
|
async function u() {
|
|
1539
1569
|
let e = await s?.({ accept: ["images"] });
|
|
1540
1570
|
if (l.alive && e) {
|
|
@@ -1567,22 +1597,22 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1567
1597
|
src: t.block.placeholderUrl,
|
|
1568
1598
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1569
1599
|
style: A(f.value)
|
|
1570
|
-
}, null, 12,
|
|
1600
|
+
}, null, 12, Wn)], 8, Un)) : (e(), w("img", {
|
|
1571
1601
|
key: 1,
|
|
1572
1602
|
class: "tpl:border-0",
|
|
1573
1603
|
src: t.block.placeholderUrl,
|
|
1574
1604
|
alt: t.block.alt,
|
|
1575
1605
|
style: A(f.value)
|
|
1576
|
-
}, null, 12,
|
|
1606
|
+
}, null, 12, Gn))], 64)) : t.block.src && p.value ? (e(), w("div", {
|
|
1577
1607
|
key: 1,
|
|
1578
1608
|
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)]",
|
|
1579
1609
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, f.value])
|
|
1580
|
-
}, [N(j(
|
|
1610
|
+
}, [N(j(sn), {
|
|
1581
1611
|
size: 32,
|
|
1582
1612
|
"stroke-width": 1.5,
|
|
1583
1613
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1584
1614
|
style: { opacity: "0.5" }
|
|
1585
|
-
}), C("span",
|
|
1615
|
+
}), C("span", Kn, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1586
1616
|
key: 0,
|
|
1587
1617
|
href: t.block.linkUrl,
|
|
1588
1618
|
target: "_blank",
|
|
@@ -1594,33 +1624,33 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1594
1624
|
src: t.block.src,
|
|
1595
1625
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1596
1626
|
style: A(f.value)
|
|
1597
|
-
}, null, 12,
|
|
1627
|
+
}, null, 12, Jn)], 8, qn)) : (e(), w("img", {
|
|
1598
1628
|
key: 1,
|
|
1599
1629
|
class: "tpl:border-0",
|
|
1600
1630
|
src: t.block.src,
|
|
1601
1631
|
alt: t.block.alt,
|
|
1602
1632
|
style: A(f.value)
|
|
1603
|
-
}, null, 12,
|
|
1633
|
+
}, null, 12, Yn))], 64)) : (e(), w("div", Xn, [c.value ? (e(), w("button", {
|
|
1604
1634
|
key: 0,
|
|
1605
1635
|
"aria-label": j(a).image.browseMedia,
|
|
1606
1636
|
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)]",
|
|
1607
1637
|
onClick: b(u, ["stop"])
|
|
1608
|
-
}, [N(j(
|
|
1638
|
+
}, [N(j(sn), {
|
|
1609
1639
|
size: 14,
|
|
1610
1640
|
"stroke-width": 1.5
|
|
1611
|
-
}), _(" " + M(j(a).image.browseMedia), 1)], 8,
|
|
1641
|
+
}), _(" " + M(j(a).image.browseMedia), 1)], 8, Zn)) : (e(), w("span", Qn, M(j(a).image.clickToAdd), 1))]))], 4));
|
|
1612
1642
|
}
|
|
1613
|
-
}),
|
|
1643
|
+
}), er = { class: "tpl:w-full" }, tr = ["href"], nr = {
|
|
1614
1644
|
key: 1,
|
|
1615
1645
|
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)]"
|
|
1616
|
-
},
|
|
1646
|
+
}, rr = /* @__PURE__ */ y({
|
|
1617
1647
|
__name: "MenuBlock",
|
|
1618
1648
|
props: {
|
|
1619
1649
|
block: {},
|
|
1620
1650
|
viewport: {}
|
|
1621
1651
|
},
|
|
1622
1652
|
setup(t) {
|
|
1623
|
-
let n = t, { t: r } =
|
|
1653
|
+
let n = t, { t: r } = ut(), i = x(() => ({
|
|
1624
1654
|
display: "flex",
|
|
1625
1655
|
flexWrap: "wrap",
|
|
1626
1656
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1632,7 +1662,7 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1632
1662
|
function o(e) {
|
|
1633
1663
|
return e || n.block.linkColor || n.block.color;
|
|
1634
1664
|
}
|
|
1635
|
-
return (n, s) => (e(), w("div",
|
|
1665
|
+
return (n, s) => (e(), w("div", er, [a.value ? (e(), w("div", {
|
|
1636
1666
|
key: 0,
|
|
1637
1667
|
style: A(i.value)
|
|
1638
1668
|
}, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
|
|
@@ -1644,15 +1674,15 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1644
1674
|
textDecoration: n.underline ? "underline" : "none"
|
|
1645
1675
|
}),
|
|
1646
1676
|
onClick: s[0] ||= b(() => {}, ["prevent"])
|
|
1647
|
-
}, M(n.text || "..."), 13,
|
|
1677
|
+
}, M(n.text || "..."), 13, tr), r < t.block.items.length - 1 ? (e(), w("span", {
|
|
1648
1678
|
key: 0,
|
|
1649
1679
|
style: A({
|
|
1650
1680
|
color: t.block.separatorColor,
|
|
1651
1681
|
padding: `0 ${t.block.spacing}px`
|
|
1652
1682
|
})
|
|
1653
|
-
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div",
|
|
1683
|
+
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", nr, [N(j(cn), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
|
|
1654
1684
|
}
|
|
1655
|
-
}),
|
|
1685
|
+
}), ir = new Set([
|
|
1656
1686
|
"http",
|
|
1657
1687
|
"https",
|
|
1658
1688
|
"mailto",
|
|
@@ -1662,7 +1692,7 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1662
1692
|
"sms",
|
|
1663
1693
|
"xmpp",
|
|
1664
1694
|
"cid"
|
|
1665
|
-
]),
|
|
1695
|
+
]), ar = new Set([
|
|
1666
1696
|
"SCRIPT",
|
|
1667
1697
|
"STYLE",
|
|
1668
1698
|
"IFRAME",
|
|
@@ -1672,7 +1702,7 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1672
1702
|
"META",
|
|
1673
1703
|
"BASE",
|
|
1674
1704
|
"FORM"
|
|
1675
|
-
]),
|
|
1705
|
+
]), or = new Set([
|
|
1676
1706
|
"href",
|
|
1677
1707
|
"xlink:href",
|
|
1678
1708
|
"formaction",
|
|
@@ -1681,16 +1711,16 @@ var Tn = { class: "tpl:w-full" }, En = {
|
|
|
1681
1711
|
"background",
|
|
1682
1712
|
"poster"
|
|
1683
1713
|
]);
|
|
1684
|
-
function
|
|
1714
|
+
function sr(e, t) {
|
|
1685
1715
|
let n = e.trim();
|
|
1686
1716
|
if (!n || n.startsWith("#")) return !0;
|
|
1687
1717
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1688
1718
|
if (!r) return !0;
|
|
1689
1719
|
let i = r[1].toLowerCase();
|
|
1690
|
-
return
|
|
1720
|
+
return ir.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1691
1721
|
}
|
|
1692
|
-
function
|
|
1693
|
-
if (
|
|
1722
|
+
function cr(e) {
|
|
1723
|
+
if (ar.has(e.tagName)) {
|
|
1694
1724
|
e.remove();
|
|
1695
1725
|
return;
|
|
1696
1726
|
}
|
|
@@ -1702,29 +1732,29 @@ function or(e) {
|
|
|
1702
1732
|
e.removeAttribute(n);
|
|
1703
1733
|
continue;
|
|
1704
1734
|
}
|
|
1705
|
-
if (
|
|
1706
|
-
|
|
1735
|
+
if (or.has(t)) {
|
|
1736
|
+
sr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1707
1737
|
continue;
|
|
1708
1738
|
}
|
|
1709
1739
|
if (t === "src") {
|
|
1710
|
-
|
|
1740
|
+
sr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1711
1741
|
continue;
|
|
1712
1742
|
}
|
|
1713
1743
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1714
1744
|
}
|
|
1715
1745
|
let n = Array.from(e.children);
|
|
1716
|
-
for (let e of n)
|
|
1746
|
+
for (let e of n) cr(e);
|
|
1717
1747
|
}
|
|
1718
|
-
function
|
|
1748
|
+
function lr(e) {
|
|
1719
1749
|
if (typeof DOMParser > "u") return e;
|
|
1720
1750
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1721
|
-
for (let e of n)
|
|
1751
|
+
for (let e of n) cr(e);
|
|
1722
1752
|
return t.innerHTML;
|
|
1723
1753
|
}
|
|
1724
1754
|
//#endregion
|
|
1725
1755
|
//#region src/composables/useEditableTextBlock.ts
|
|
1726
|
-
function
|
|
1727
|
-
let t = ae(ot, []), { syntax: n } =
|
|
1756
|
+
function ur(e) {
|
|
1757
|
+
let t = ae(ot, []), { syntax: n } = gt(), r = x(() => lr(xe(le(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = Fe(a), c = x(() => ({
|
|
1728
1758
|
top: o.value - 8,
|
|
1729
1759
|
left: s.value
|
|
1730
1760
|
}));
|
|
@@ -1745,14 +1775,14 @@ function cr(e) {
|
|
|
1745
1775
|
}
|
|
1746
1776
|
//#endregion
|
|
1747
1777
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1748
|
-
var
|
|
1778
|
+
var dr = ["innerHTML"], fr = /* @__PURE__ */ y({
|
|
1749
1779
|
__name: "ParagraphBlock",
|
|
1750
1780
|
props: {
|
|
1751
1781
|
block: {},
|
|
1752
1782
|
viewport: {}
|
|
1753
1783
|
},
|
|
1754
1784
|
setup(t) {
|
|
1755
|
-
let n = t, r = se(() => import("./ParagraphEditor-
|
|
1785
|
+
let n = t, r = se(() => import("./ParagraphEditor-DrAz2yot.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = ur(() => n.block.content);
|
|
1756
1786
|
return (n, u) => (e(), w("div", {
|
|
1757
1787
|
ref_key: "blockRef",
|
|
1758
1788
|
ref: a,
|
|
@@ -1771,19 +1801,19 @@ var lr = ["innerHTML"], ur = /* @__PURE__ */ y({
|
|
|
1771
1801
|
key: 1,
|
|
1772
1802
|
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",
|
|
1773
1803
|
innerHTML: j(s)
|
|
1774
|
-
}, null, 8,
|
|
1804
|
+
}, null, 8, dr))], 544));
|
|
1775
1805
|
}
|
|
1776
1806
|
});
|
|
1777
1807
|
//#endregion
|
|
1778
1808
|
//#region src/utils/blockComponentResolver.ts
|
|
1779
|
-
function
|
|
1809
|
+
function pr(e, t, n) {
|
|
1780
1810
|
if (t) {
|
|
1781
1811
|
let n = t.getComponent(e);
|
|
1782
1812
|
if (n) return n;
|
|
1783
1813
|
}
|
|
1784
1814
|
return n[e.type] ?? null;
|
|
1785
1815
|
}
|
|
1786
|
-
function
|
|
1816
|
+
function mr(e) {
|
|
1787
1817
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
1788
1818
|
return {
|
|
1789
1819
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -1793,20 +1823,20 @@ function fr(e) {
|
|
|
1793
1823
|
}
|
|
1794
1824
|
//#endregion
|
|
1795
1825
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1796
|
-
var
|
|
1826
|
+
var hr = ["data-block-id", "data-block-type"], gr = ["aria-label"], _r = [
|
|
1797
1827
|
"aria-label",
|
|
1798
1828
|
"aria-pressed",
|
|
1799
1829
|
"title"
|
|
1800
|
-
],
|
|
1830
|
+
], vr = ["aria-label", "title"], yr = ["aria-label", "title"], br = ["aria-label", "title"], xr = {
|
|
1801
1831
|
key: 1,
|
|
1802
1832
|
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"
|
|
1803
|
-
},
|
|
1833
|
+
}, Sr = { 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)]" }, Cr = {
|
|
1804
1834
|
key: 2,
|
|
1805
1835
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1806
|
-
},
|
|
1836
|
+
}, wr = ["aria-label", "title"], Tr = {
|
|
1807
1837
|
key: 3,
|
|
1808
1838
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1809
|
-
},
|
|
1839
|
+
}, Er = ["aria-label"], Dr = /* @__PURE__ */ ht(/* @__PURE__ */ y({
|
|
1810
1840
|
__name: "BlockWrapper",
|
|
1811
1841
|
props: {
|
|
1812
1842
|
block: {},
|
|
@@ -1816,7 +1846,7 @@ var pr = ["data-block-id", "data-block-type"], mr = ["aria-label"], hr = [
|
|
|
1816
1846
|
},
|
|
1817
1847
|
emits: ["select"],
|
|
1818
1848
|
setup(t, { emit: n }) {
|
|
1819
|
-
let i = se(() => import("./BlockIssueBadge-
|
|
1849
|
+
let i = se(() => import("./BlockIssueBadge-DThKKeub.js")), a = t, o = n, { t: s, format: c } = ut(), u = ae(We, null), d = h(null), f = x(() => u?.liftedBlockId.value === a.block.id), p = x(() => f.value ? c(s.blockActions.dragLifted, { block: a.block.type }) : s.blockActions.drag);
|
|
1820
1850
|
async function m() {
|
|
1821
1851
|
await r(), d.value?.focus();
|
|
1822
1852
|
}
|
|
@@ -1843,8 +1873,8 @@ var pr = ["data-block-id", "data-block-type"], mr = ["aria-label"], hr = [
|
|
|
1843
1873
|
desktop: s.viewport.desktop,
|
|
1844
1874
|
tablet: s.viewport.tablet,
|
|
1845
1875
|
mobile: s.viewport.mobile
|
|
1846
|
-
}[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = ae(
|
|
1847
|
-
let e =
|
|
1876
|
+
}[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = ae(Ze, null), ee = ae(at, null), D = ae(it, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => ({ margin: mr(a.block).margin })), re = x(() => {
|
|
1877
|
+
let e = mr(a.block);
|
|
1848
1878
|
return {
|
|
1849
1879
|
padding: e.padding,
|
|
1850
1880
|
backgroundColor: e.backgroundColor
|
|
@@ -1892,90 +1922,90 @@ var pr = ["data-block-id", "data-block-type"], mr = ["aria-label"], hr = [
|
|
|
1892
1922
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1893
1923
|
title: j(s).blockActions.drag,
|
|
1894
1924
|
onKeydown: g
|
|
1895
|
-
}, [N(j(
|
|
1925
|
+
}, [N(j(on), {
|
|
1896
1926
|
size: 14,
|
|
1897
1927
|
"stroke-width": 1.5
|
|
1898
|
-
})], 40,
|
|
1928
|
+
})], 40, _r),
|
|
1899
1929
|
C("button", {
|
|
1900
1930
|
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",
|
|
1901
1931
|
"aria-label": j(s).blockActions.duplicate,
|
|
1902
1932
|
title: j(s).blockActions.duplicate,
|
|
1903
1933
|
onClick: b(ce, ["stop"])
|
|
1904
|
-
}, [N(j(
|
|
1934
|
+
}, [N(j(nn), {
|
|
1905
1935
|
size: 14,
|
|
1906
1936
|
"stroke-width": 1.5
|
|
1907
|
-
})], 8,
|
|
1937
|
+
})], 8, vr),
|
|
1908
1938
|
k.value ? (e(), w("button", {
|
|
1909
1939
|
key: 0,
|
|
1910
1940
|
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",
|
|
1911
1941
|
"aria-label": j(s).blockActions.saveAsModule,
|
|
1912
1942
|
title: j(s).blockActions.saveAsModule,
|
|
1913
1943
|
onClick: b(le, ["stop"])
|
|
1914
|
-
}, [N(j(
|
|
1944
|
+
}, [N(j($t), {
|
|
1915
1945
|
size: 14,
|
|
1916
1946
|
"stroke-width": 1.5
|
|
1917
|
-
})], 8,
|
|
1947
|
+
})], 8, yr)) : O("", !0),
|
|
1918
1948
|
C("button", {
|
|
1919
1949
|
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",
|
|
1920
1950
|
"aria-label": j(s).blockActions.delete,
|
|
1921
1951
|
title: j(s).blockActions.delete,
|
|
1922
1952
|
onClick: b(oe, ["stop"])
|
|
1923
|
-
}, [N(j(
|
|
1953
|
+
}, [N(j(ft), {
|
|
1924
1954
|
size: 14,
|
|
1925
1955
|
"stroke-width": 1.5
|
|
1926
|
-
})], 8,
|
|
1927
|
-
], 8,
|
|
1928
|
-
y.value ? (e(), w("div",
|
|
1956
|
+
})], 8, br)
|
|
1957
|
+
], 8, gr)) : O("", !0),
|
|
1958
|
+
y.value ? (e(), w("div", xr, [C("span", Sr, [N(j(rn), {
|
|
1929
1959
|
size: 12,
|
|
1930
1960
|
"stroke-width": 1.5
|
|
1931
1961
|
}), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : O("", !0),
|
|
1932
|
-
T.value && !y.value ? (e(), w("div",
|
|
1962
|
+
T.value && !y.value ? (e(), w("div", Cr, [C("button", {
|
|
1933
1963
|
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)]",
|
|
1934
1964
|
"aria-label": j(s).blockActions.conditionToggle,
|
|
1935
1965
|
title: t.block.displayCondition?.label,
|
|
1936
1966
|
onClick: b(ue, ["stop"])
|
|
1937
|
-
}, [N(j(
|
|
1967
|
+
}, [N(j(an), {
|
|
1938
1968
|
size: 12,
|
|
1939
1969
|
"stroke-width": 2
|
|
1940
|
-
})], 8,
|
|
1941
|
-
te.value > 0 && !y.value ? (e(), w("div",
|
|
1970
|
+
})], 8, wr)])) : O("", !0),
|
|
1971
|
+
te.value > 0 && !y.value ? (e(), w("div", Tr, [C("button", {
|
|
1942
1972
|
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)]",
|
|
1943
1973
|
"aria-label": j(c)(j(s).blockActions.comments, { count: String(te.value) }),
|
|
1944
1974
|
onClick: r[0] ||= b((e) => j(D).comments?.openForBlock(t.block.id), ["stop"])
|
|
1945
|
-
}, [N(j(
|
|
1975
|
+
}, [N(j(dt), {
|
|
1946
1976
|
size: 12,
|
|
1947
1977
|
"stroke-width": 2.5
|
|
1948
|
-
}), _(" " + M(te.value), 1)], 8,
|
|
1978
|
+
}), _(" " + M(te.value), 1)], 8, Er)])) : O("", !0),
|
|
1949
1979
|
C("div", {
|
|
1950
1980
|
class: "tpl-block-content",
|
|
1951
1981
|
style: A(re.value)
|
|
1952
1982
|
}, [l(n.$slots, "default", {}, void 0, !0)], 4)
|
|
1953
|
-
], 14,
|
|
1983
|
+
], 14, hr));
|
|
1954
1984
|
}
|
|
1955
1985
|
}), [["__scopeId", "data-v-e77eb94e"]]);
|
|
1956
1986
|
//#endregion
|
|
1957
1987
|
//#region src/utils/unwrapParagraph.ts
|
|
1958
|
-
function
|
|
1988
|
+
function Or(e) {
|
|
1959
1989
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1960
1990
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1961
1991
|
}
|
|
1962
1992
|
//#endregion
|
|
1963
1993
|
//#region src/components/blocks/TitleBlock.vue
|
|
1964
|
-
var
|
|
1994
|
+
var kr = /* @__PURE__ */ y({
|
|
1965
1995
|
__name: "TitleBlock",
|
|
1966
1996
|
props: {
|
|
1967
1997
|
block: {},
|
|
1968
1998
|
viewport: {}
|
|
1969
1999
|
},
|
|
1970
2000
|
setup(t) {
|
|
1971
|
-
let n = t, r = se(() => import("./TitleEditor-
|
|
2001
|
+
let n = t, r = se(() => import("./TitleEditor-BmW0uMl7.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = ur(() => n.block.content), d = x(() => {
|
|
1972
2002
|
let e = {
|
|
1973
2003
|
fontSize: `${De[n.block.level]}px`,
|
|
1974
2004
|
color: n.block.color,
|
|
1975
2005
|
textAlign: n.block.textAlign
|
|
1976
2006
|
};
|
|
1977
2007
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
1978
|
-
}), f = x(() => `h${n.block.level}`), p = x(() =>
|
|
2008
|
+
}), f = x(() => `h${n.block.level}`), p = x(() => Or(c.value));
|
|
1979
2009
|
return (n, c) => (e(), w("div", {
|
|
1980
2010
|
ref_key: "blockRef",
|
|
1981
2011
|
ref: o,
|
|
@@ -1998,83 +2028,83 @@ var Dr = /* @__PURE__ */ y({
|
|
|
1998
2028
|
innerHTML: p.value
|
|
1999
2029
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2000
2030
|
}
|
|
2001
|
-
}),
|
|
2031
|
+
}), Ar = Object.defineProperty, jr = Object.getOwnPropertySymbols, Mr = Object.prototype.hasOwnProperty, Nr = Object.prototype.propertyIsEnumerable, Pr = (e, t, n) => t in e ? Ar(e, t, {
|
|
2002
2032
|
enumerable: !0,
|
|
2003
2033
|
configurable: !0,
|
|
2004
2034
|
writable: !0,
|
|
2005
2035
|
value: n
|
|
2006
|
-
}) : e[t] = n,
|
|
2007
|
-
for (var n in t ||= {})
|
|
2008
|
-
if (
|
|
2036
|
+
}) : e[t] = n, Fr = (e, t) => {
|
|
2037
|
+
for (var n in t ||= {}) Mr.call(t, n) && Pr(e, n, t[n]);
|
|
2038
|
+
if (jr) for (var n of jr(t)) Nr.call(t, n) && Pr(e, n, t[n]);
|
|
2009
2039
|
return e;
|
|
2010
|
-
},
|
|
2040
|
+
}, Ir = (e, t) => {
|
|
2011
2041
|
var n = {};
|
|
2012
|
-
for (var r in e)
|
|
2013
|
-
if (e != null &&
|
|
2042
|
+
for (var r in e) Mr.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2043
|
+
if (e != null && jr) for (var r of jr(e)) t.indexOf(r) < 0 && Nr.call(e, r) && (n[r] = e[r]);
|
|
2014
2044
|
return n;
|
|
2015
|
-
},
|
|
2016
|
-
function
|
|
2017
|
-
console.warn(
|
|
2045
|
+
}, Lr = "[vue-draggable-plus]: ";
|
|
2046
|
+
function Rr(e) {
|
|
2047
|
+
console.warn(Lr + e);
|
|
2018
2048
|
}
|
|
2019
|
-
function
|
|
2020
|
-
console.error(
|
|
2049
|
+
function zr(e) {
|
|
2050
|
+
console.error(Lr + e);
|
|
2021
2051
|
}
|
|
2022
|
-
function
|
|
2052
|
+
function Br(e, t, n) {
|
|
2023
2053
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2024
2054
|
}
|
|
2025
|
-
function
|
|
2055
|
+
function Vr(e) {
|
|
2026
2056
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2027
2057
|
}
|
|
2028
|
-
function
|
|
2029
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2058
|
+
function Hr(e) {
|
|
2059
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Vr(n)] = e[n]), t), {});
|
|
2030
2060
|
}
|
|
2031
|
-
function
|
|
2061
|
+
function Ur(e, t) {
|
|
2032
2062
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2033
2063
|
}
|
|
2034
|
-
function
|
|
2064
|
+
function Wr(e, t, n) {
|
|
2035
2065
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2036
2066
|
}
|
|
2037
|
-
function
|
|
2067
|
+
function Gr(e) {
|
|
2038
2068
|
return e === void 0;
|
|
2039
2069
|
}
|
|
2040
|
-
function
|
|
2070
|
+
function Kr(e) {
|
|
2041
2071
|
return typeof e == "string";
|
|
2042
2072
|
}
|
|
2043
|
-
function
|
|
2073
|
+
function qr(e, t, n) {
|
|
2044
2074
|
let r = e.children[n];
|
|
2045
2075
|
e.insertBefore(t, r);
|
|
2046
2076
|
}
|
|
2047
|
-
function
|
|
2077
|
+
function Jr(e) {
|
|
2048
2078
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2049
2079
|
}
|
|
2050
|
-
function
|
|
2080
|
+
function Yr(e, t = document) {
|
|
2051
2081
|
let n = null;
|
|
2052
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2082
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Rr(`Element not found: ${e}`), n;
|
|
2053
2083
|
}
|
|
2054
|
-
function
|
|
2084
|
+
function Xr(e, t, n = null) {
|
|
2055
2085
|
return function(...r) {
|
|
2056
2086
|
return e.apply(n, r), t.apply(n, r);
|
|
2057
2087
|
};
|
|
2058
2088
|
}
|
|
2059
|
-
function
|
|
2060
|
-
let n =
|
|
2089
|
+
function Zr(e, t) {
|
|
2090
|
+
let n = Fr({}, e);
|
|
2061
2091
|
return Object.keys(t).forEach((r) => {
|
|
2062
|
-
n[r] ? n[r] =
|
|
2092
|
+
n[r] ? n[r] = Xr(e[r], t[r]) : n[r] = t[r];
|
|
2063
2093
|
}), n;
|
|
2064
2094
|
}
|
|
2065
|
-
function
|
|
2095
|
+
function Qr(e) {
|
|
2066
2096
|
return e instanceof HTMLElement;
|
|
2067
2097
|
}
|
|
2068
|
-
function
|
|
2098
|
+
function $r(e, t) {
|
|
2069
2099
|
Object.keys(e).forEach((n) => {
|
|
2070
2100
|
t(n, e[n]);
|
|
2071
2101
|
});
|
|
2072
2102
|
}
|
|
2073
|
-
function
|
|
2103
|
+
function ei(e) {
|
|
2074
2104
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2075
2105
|
}
|
|
2076
|
-
var
|
|
2077
|
-
function
|
|
2106
|
+
var ti = Object.assign;
|
|
2107
|
+
function ni(e, t) {
|
|
2078
2108
|
var n = Object.keys(e);
|
|
2079
2109
|
if (Object.getOwnPropertySymbols) {
|
|
2080
2110
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2084,26 +2114,26 @@ function ei(e, t) {
|
|
|
2084
2114
|
}
|
|
2085
2115
|
return n;
|
|
2086
2116
|
}
|
|
2087
|
-
function
|
|
2117
|
+
function ri(e) {
|
|
2088
2118
|
for (var t = 1; t < arguments.length; t++) {
|
|
2089
2119
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2090
|
-
t % 2 ?
|
|
2091
|
-
|
|
2092
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2120
|
+
t % 2 ? ni(Object(n), !0).forEach(function(t) {
|
|
2121
|
+
ai(e, t, n[t]);
|
|
2122
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ni(Object(n)).forEach(function(t) {
|
|
2093
2123
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2094
2124
|
});
|
|
2095
2125
|
}
|
|
2096
2126
|
return e;
|
|
2097
2127
|
}
|
|
2098
|
-
function
|
|
2128
|
+
function ii(e) {
|
|
2099
2129
|
"@babel/helpers - typeof";
|
|
2100
|
-
return
|
|
2130
|
+
return ii = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2101
2131
|
return typeof e;
|
|
2102
2132
|
} : function(e) {
|
|
2103
2133
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2104
|
-
},
|
|
2134
|
+
}, ii(e);
|
|
2105
2135
|
}
|
|
2106
|
-
function
|
|
2136
|
+
function ai(e, t, n) {
|
|
2107
2137
|
return t in e ? Object.defineProperty(e, t, {
|
|
2108
2138
|
value: n,
|
|
2109
2139
|
enumerable: !0,
|
|
@@ -2111,45 +2141,45 @@ function ri(e, t, n) {
|
|
|
2111
2141
|
writable: !0
|
|
2112
2142
|
}) : e[t] = n, e;
|
|
2113
2143
|
}
|
|
2114
|
-
function
|
|
2115
|
-
return
|
|
2144
|
+
function oi() {
|
|
2145
|
+
return oi = Object.assign || function(e) {
|
|
2116
2146
|
for (var t = 1; t < arguments.length; t++) {
|
|
2117
2147
|
var n = arguments[t];
|
|
2118
2148
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2119
2149
|
}
|
|
2120
2150
|
return e;
|
|
2121
|
-
},
|
|
2151
|
+
}, oi.apply(this, arguments);
|
|
2122
2152
|
}
|
|
2123
|
-
function
|
|
2153
|
+
function si(e, t) {
|
|
2124
2154
|
if (e == null) return {};
|
|
2125
2155
|
var n = {}, r = Object.keys(e), i, a;
|
|
2126
2156
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2127
2157
|
return n;
|
|
2128
2158
|
}
|
|
2129
|
-
function
|
|
2159
|
+
function ci(e, t) {
|
|
2130
2160
|
if (e == null) return {};
|
|
2131
|
-
var n =
|
|
2161
|
+
var n = si(e, t), r, i;
|
|
2132
2162
|
if (Object.getOwnPropertySymbols) {
|
|
2133
2163
|
var a = Object.getOwnPropertySymbols(e);
|
|
2134
2164
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2135
2165
|
}
|
|
2136
2166
|
return n;
|
|
2137
2167
|
}
|
|
2138
|
-
var
|
|
2139
|
-
function
|
|
2168
|
+
var li = "1.15.2";
|
|
2169
|
+
function ui(e) {
|
|
2140
2170
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2141
2171
|
}
|
|
2142
|
-
var
|
|
2172
|
+
var di = ui(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), fi = ui(/Edge/i), pi = ui(/firefox/i), mi = ui(/safari/i) && !ui(/chrome/i) && !ui(/android/i), hi = ui(/iP(ad|od|hone)/i), gi = ui(/chrome/i) && ui(/android/i), _i = {
|
|
2143
2173
|
capture: !1,
|
|
2144
2174
|
passive: !1
|
|
2145
2175
|
};
|
|
2146
2176
|
function F(e, t, n) {
|
|
2147
|
-
e.addEventListener(t, n, !
|
|
2177
|
+
e.addEventListener(t, n, !di && _i);
|
|
2148
2178
|
}
|
|
2149
2179
|
function I(e, t, n) {
|
|
2150
|
-
e.removeEventListener(t, n, !
|
|
2180
|
+
e.removeEventListener(t, n, !di && _i);
|
|
2151
2181
|
}
|
|
2152
|
-
function
|
|
2182
|
+
function vi(e, t) {
|
|
2153
2183
|
if (t) {
|
|
2154
2184
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2155
2185
|
if (e.matches) return e.matches(t);
|
|
@@ -2161,22 +2191,22 @@ function gi(e, t) {
|
|
|
2161
2191
|
return !1;
|
|
2162
2192
|
}
|
|
2163
2193
|
}
|
|
2164
|
-
function
|
|
2194
|
+
function yi(e) {
|
|
2165
2195
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2166
2196
|
}
|
|
2167
|
-
function
|
|
2197
|
+
function bi(e, t, n, r) {
|
|
2168
2198
|
if (e) {
|
|
2169
2199
|
n ||= document;
|
|
2170
2200
|
do {
|
|
2171
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2201
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && vi(e, t) : vi(e, t)) || r && e === n) return e;
|
|
2172
2202
|
if (e === n) break;
|
|
2173
|
-
} while (e =
|
|
2203
|
+
} while (e = yi(e));
|
|
2174
2204
|
}
|
|
2175
2205
|
return null;
|
|
2176
2206
|
}
|
|
2177
|
-
var
|
|
2207
|
+
var xi = /\s+/g;
|
|
2178
2208
|
function L(e, t, n) {
|
|
2179
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2209
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(xi, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(xi, " "));
|
|
2180
2210
|
}
|
|
2181
2211
|
function R(e, t, n) {
|
|
2182
2212
|
var r = e && e.style;
|
|
@@ -2185,7 +2215,7 @@ function R(e, t, n) {
|
|
|
2185
2215
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2186
2216
|
}
|
|
2187
2217
|
}
|
|
2188
|
-
function
|
|
2218
|
+
function Si(e, t) {
|
|
2189
2219
|
var n = "";
|
|
2190
2220
|
if (typeof e == "string") n = e;
|
|
2191
2221
|
else do {
|
|
@@ -2195,7 +2225,7 @@ function bi(e, t) {
|
|
|
2195
2225
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2196
2226
|
return i && new i(n);
|
|
2197
2227
|
}
|
|
2198
|
-
function
|
|
2228
|
+
function Ci(e, t, n) {
|
|
2199
2229
|
if (e) {
|
|
2200
2230
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2201
2231
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2203,13 +2233,13 @@ function xi(e, t, n) {
|
|
|
2203
2233
|
}
|
|
2204
2234
|
return [];
|
|
2205
2235
|
}
|
|
2206
|
-
function
|
|
2236
|
+
function wi() {
|
|
2207
2237
|
return document.scrollingElement || document.documentElement;
|
|
2208
2238
|
}
|
|
2209
2239
|
function z(e, t, n, r, i) {
|
|
2210
2240
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2211
2241
|
var a, o, s, c, l, u, d;
|
|
2212
|
-
if (e !== window && e.parentNode && e !==
|
|
2242
|
+
if (e !== window && e.parentNode && e !== wi() ? (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, !di)) do
|
|
2213
2243
|
if (i && i.getBoundingClientRect && (R(i, "transform") !== "none" || n && R(i, "position") !== "static")) {
|
|
2214
2244
|
var f = i.getBoundingClientRect();
|
|
2215
2245
|
o -= f.top + parseInt(R(i, "border-top-width")), s -= f.left + parseInt(R(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2217,7 +2247,7 @@ function z(e, t, n, r, i) {
|
|
|
2217
2247
|
}
|
|
2218
2248
|
while (i = i.parentNode);
|
|
2219
2249
|
if (r && e !== window) {
|
|
2220
|
-
var p =
|
|
2250
|
+
var p = Si(i || e), m = p && p.a, h = p && p.d;
|
|
2221
2251
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2222
2252
|
}
|
|
2223
2253
|
return {
|
|
@@ -2230,18 +2260,18 @@ function z(e, t, n, r, i) {
|
|
|
2230
2260
|
};
|
|
2231
2261
|
}
|
|
2232
2262
|
}
|
|
2233
|
-
function
|
|
2234
|
-
for (var r =
|
|
2263
|
+
function Ti(e, t, n) {
|
|
2264
|
+
for (var r = Ai(e, !0), i = z(e)[t]; r;) {
|
|
2235
2265
|
var a = z(r)[n], o = void 0;
|
|
2236
2266
|
if (o = i >= a, !o) return r;
|
|
2237
|
-
if (r ===
|
|
2238
|
-
r =
|
|
2267
|
+
if (r === wi()) break;
|
|
2268
|
+
r = Ai(r, !1);
|
|
2239
2269
|
}
|
|
2240
2270
|
return !1;
|
|
2241
2271
|
}
|
|
2242
|
-
function
|
|
2272
|
+
function Ei(e, t, n, r) {
|
|
2243
2273
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2244
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2274
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && bi(o[a], n.draggable, e, !1)) {
|
|
2245
2275
|
if (i === t) return o[a];
|
|
2246
2276
|
i++;
|
|
2247
2277
|
}
|
|
@@ -2249,84 +2279,84 @@ function wi(e, t, n, r) {
|
|
|
2249
2279
|
}
|
|
2250
2280
|
return null;
|
|
2251
2281
|
}
|
|
2252
|
-
function
|
|
2253
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !
|
|
2282
|
+
function Di(e, t) {
|
|
2283
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || R(n, "display") === "none" || t && !vi(n, t));) n = n.previousElementSibling;
|
|
2254
2284
|
return n || null;
|
|
2255
2285
|
}
|
|
2256
2286
|
function B(e, t) {
|
|
2257
2287
|
var n = 0;
|
|
2258
2288
|
if (!e || !e.parentNode) return -1;
|
|
2259
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2289
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || vi(e, t)) && n++;
|
|
2260
2290
|
return n;
|
|
2261
2291
|
}
|
|
2262
|
-
function
|
|
2263
|
-
var t = 0, n = 0, r =
|
|
2292
|
+
function Oi(e) {
|
|
2293
|
+
var t = 0, n = 0, r = wi();
|
|
2264
2294
|
if (e) do {
|
|
2265
|
-
var i =
|
|
2295
|
+
var i = Si(e), a = i.a, o = i.d;
|
|
2266
2296
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2267
2297
|
} while (e !== r && (e = e.parentNode));
|
|
2268
2298
|
return [t, n];
|
|
2269
2299
|
}
|
|
2270
|
-
function
|
|
2300
|
+
function ki(e, t) {
|
|
2271
2301
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2272
2302
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2273
2303
|
}
|
|
2274
2304
|
return -1;
|
|
2275
2305
|
}
|
|
2276
|
-
function
|
|
2277
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2306
|
+
function Ai(e, t) {
|
|
2307
|
+
if (!e || !e.getBoundingClientRect) return wi();
|
|
2278
2308
|
var n = e, r = !1;
|
|
2279
2309
|
do
|
|
2280
2310
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2281
2311
|
var i = R(n);
|
|
2282
2312
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2283
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2313
|
+
if (!n.getBoundingClientRect || n === document.body) return wi();
|
|
2284
2314
|
if (r || t) return n;
|
|
2285
2315
|
r = !0;
|
|
2286
2316
|
}
|
|
2287
2317
|
}
|
|
2288
2318
|
while (n = n.parentNode);
|
|
2289
|
-
return
|
|
2319
|
+
return wi();
|
|
2290
2320
|
}
|
|
2291
|
-
function
|
|
2321
|
+
function ji(e, t) {
|
|
2292
2322
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2293
2323
|
return e;
|
|
2294
2324
|
}
|
|
2295
|
-
function
|
|
2325
|
+
function Mi(e, t) {
|
|
2296
2326
|
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);
|
|
2297
2327
|
}
|
|
2298
|
-
var
|
|
2299
|
-
function
|
|
2328
|
+
var Ni;
|
|
2329
|
+
function Pi(e, t) {
|
|
2300
2330
|
return function() {
|
|
2301
|
-
if (!
|
|
2331
|
+
if (!Ni) {
|
|
2302
2332
|
var n = arguments, r = this;
|
|
2303
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2304
|
-
|
|
2333
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ni = setTimeout(function() {
|
|
2334
|
+
Ni = void 0;
|
|
2305
2335
|
}, t);
|
|
2306
2336
|
}
|
|
2307
2337
|
};
|
|
2308
2338
|
}
|
|
2309
|
-
function
|
|
2310
|
-
clearTimeout(
|
|
2339
|
+
function Fi() {
|
|
2340
|
+
clearTimeout(Ni), Ni = void 0;
|
|
2311
2341
|
}
|
|
2312
|
-
function
|
|
2342
|
+
function Ii(e, t, n) {
|
|
2313
2343
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2314
2344
|
}
|
|
2315
|
-
function
|
|
2345
|
+
function Li(e) {
|
|
2316
2346
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2317
2347
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2318
2348
|
}
|
|
2319
|
-
function
|
|
2349
|
+
function Ri(e, t, n) {
|
|
2320
2350
|
var r = {};
|
|
2321
2351
|
return Array.from(e.children).forEach(function(i) {
|
|
2322
|
-
if (!(!
|
|
2352
|
+
if (!(!bi(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2323
2353
|
var a = z(i);
|
|
2324
2354
|
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);
|
|
2325
2355
|
}
|
|
2326
2356
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2327
2357
|
}
|
|
2328
2358
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2329
|
-
function
|
|
2359
|
+
function zi() {
|
|
2330
2360
|
var e = [], t;
|
|
2331
2361
|
return {
|
|
2332
2362
|
captureAnimationState: function() {
|
|
@@ -2336,9 +2366,9 @@ function Li() {
|
|
|
2336
2366
|
target: t,
|
|
2337
2367
|
rect: z(t)
|
|
2338
2368
|
});
|
|
2339
|
-
var n =
|
|
2369
|
+
var n = ri({}, e[e.length - 1].rect);
|
|
2340
2370
|
if (t.thisAnimationDuration) {
|
|
2341
|
-
var r =
|
|
2371
|
+
var r = Si(t, !0);
|
|
2342
2372
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2343
2373
|
}
|
|
2344
2374
|
t.fromRect = n;
|
|
@@ -2349,7 +2379,7 @@ function Li() {
|
|
|
2349
2379
|
e.push(t);
|
|
2350
2380
|
},
|
|
2351
2381
|
removeAnimationState: function(t) {
|
|
2352
|
-
e.splice(
|
|
2382
|
+
e.splice(ki(e, { target: t }), 1);
|
|
2353
2383
|
},
|
|
2354
2384
|
animateAll: function(n) {
|
|
2355
2385
|
var r = this;
|
|
@@ -2359,8 +2389,8 @@ function Li() {
|
|
|
2359
2389
|
}
|
|
2360
2390
|
var i = !1, a = 0;
|
|
2361
2391
|
e.forEach(function(e) {
|
|
2362
|
-
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2363
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2392
|
+
var t = 0, n = e.target, o = n.fromRect, s = z(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Si(n, !0);
|
|
2393
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Mi(c, s) && !Mi(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Vi(u, c, l, r.options)), Mi(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() {
|
|
2364
2394
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2365
2395
|
}, t), n.thisAnimationDuration = t);
|
|
2366
2396
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2370,26 +2400,26 @@ function Li() {
|
|
|
2370
2400
|
animate: function(e, t, n, r) {
|
|
2371
2401
|
if (r) {
|
|
2372
2402
|
R(e, "transition", ""), R(e, "transform", "");
|
|
2373
|
-
var i =
|
|
2374
|
-
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2403
|
+
var i = Si(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2404
|
+
e.animatingX = !!s, e.animatingY = !!c, R(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Bi(e), R(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), R(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2375
2405
|
R(e, "transition", ""), R(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2376
2406
|
}, r);
|
|
2377
2407
|
}
|
|
2378
2408
|
}
|
|
2379
2409
|
};
|
|
2380
2410
|
}
|
|
2381
|
-
function
|
|
2411
|
+
function Bi(e) {
|
|
2382
2412
|
return e.offsetWidth;
|
|
2383
2413
|
}
|
|
2384
|
-
function
|
|
2414
|
+
function Vi(e, t, n, r) {
|
|
2385
2415
|
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;
|
|
2386
2416
|
}
|
|
2387
|
-
var
|
|
2417
|
+
var Hi = [], Ui = { initializeByDefault: !0 }, Wi = {
|
|
2388
2418
|
mount: function(e) {
|
|
2389
|
-
for (var t in
|
|
2390
|
-
|
|
2419
|
+
for (var t in Ui) Ui.hasOwnProperty(t) && !(t in e) && (e[t] = Ui[t]);
|
|
2420
|
+
Hi.forEach(function(t) {
|
|
2391
2421
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2392
|
-
}),
|
|
2422
|
+
}), Hi.push(e);
|
|
2393
2423
|
},
|
|
2394
2424
|
pluginEvent: function(e, t, n) {
|
|
2395
2425
|
var r = this;
|
|
@@ -2397,16 +2427,16 @@ var Bi = [], Vi = { initializeByDefault: !0 }, Hi = {
|
|
|
2397
2427
|
r.eventCanceled = !0;
|
|
2398
2428
|
};
|
|
2399
2429
|
var i = e + "Global";
|
|
2400
|
-
|
|
2401
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2430
|
+
Hi.forEach(function(r) {
|
|
2431
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ri({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ri({ sortable: t }, n)));
|
|
2402
2432
|
});
|
|
2403
2433
|
},
|
|
2404
2434
|
initializePlugins: function(e, t, n, r) {
|
|
2405
|
-
for (var i in
|
|
2435
|
+
for (var i in Hi.forEach(function(r) {
|
|
2406
2436
|
var i = r.pluginName;
|
|
2407
2437
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2408
2438
|
var a = new r(e, t, e.options);
|
|
2409
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2439
|
+
a.sortable = e, a.options = e.options, e[i] = a, oi(n, a.defaults);
|
|
2410
2440
|
}
|
|
2411
2441
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2412
2442
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2415,56 +2445,56 @@ var Bi = [], Vi = { initializeByDefault: !0 }, Hi = {
|
|
|
2415
2445
|
},
|
|
2416
2446
|
getEventProperties: function(e, t) {
|
|
2417
2447
|
var n = {};
|
|
2418
|
-
return
|
|
2419
|
-
typeof r.eventProperties == "function" &&
|
|
2448
|
+
return Hi.forEach(function(r) {
|
|
2449
|
+
typeof r.eventProperties == "function" && oi(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2420
2450
|
}), n;
|
|
2421
2451
|
},
|
|
2422
2452
|
modifyOption: function(e, t, n) {
|
|
2423
2453
|
var r;
|
|
2424
|
-
return
|
|
2454
|
+
return Hi.forEach(function(i) {
|
|
2425
2455
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2426
2456
|
}), r;
|
|
2427
2457
|
}
|
|
2428
2458
|
};
|
|
2429
|
-
function
|
|
2459
|
+
function Gi(e) {
|
|
2430
2460
|
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;
|
|
2431
2461
|
if (t ||= n && n[V], t) {
|
|
2432
2462
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2433
|
-
window.CustomEvent && !
|
|
2463
|
+
window.CustomEvent && !di && !fi ? h = new CustomEvent(r, {
|
|
2434
2464
|
bubbles: !0,
|
|
2435
2465
|
cancelable: !0
|
|
2436
2466
|
}) : (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;
|
|
2437
|
-
var v =
|
|
2467
|
+
var v = ri(ri({}, m), Wi.getEventProperties(r, t));
|
|
2438
2468
|
for (var y in v) h[y] = v[y];
|
|
2439
2469
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2440
2470
|
}
|
|
2441
2471
|
}
|
|
2442
|
-
var
|
|
2443
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2444
|
-
|
|
2472
|
+
var Ki = ["evt"], H = function(e, t) {
|
|
2473
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ci(n, Ki);
|
|
2474
|
+
Wi.pluginEvent.bind(Q)(e, t, ri({
|
|
2445
2475
|
dragEl: W,
|
|
2446
2476
|
parentEl: G,
|
|
2447
2477
|
ghostEl: K,
|
|
2448
2478
|
rootEl: q,
|
|
2449
|
-
nextEl:
|
|
2450
|
-
lastDownEl:
|
|
2479
|
+
nextEl: qi,
|
|
2480
|
+
lastDownEl: Ji,
|
|
2451
2481
|
cloneEl: J,
|
|
2452
|
-
cloneHidden:
|
|
2453
|
-
dragStarted:
|
|
2482
|
+
cloneHidden: Yi,
|
|
2483
|
+
dragStarted: la,
|
|
2454
2484
|
putSortable: X,
|
|
2455
2485
|
activeSortable: Q.active,
|
|
2456
2486
|
originalEvent: r,
|
|
2457
|
-
oldIndex:
|
|
2458
|
-
oldDraggableIndex:
|
|
2487
|
+
oldIndex: Xi,
|
|
2488
|
+
oldDraggableIndex: Zi,
|
|
2459
2489
|
newIndex: Y,
|
|
2460
|
-
newDraggableIndex:
|
|
2461
|
-
hideGhostForTarget:
|
|
2462
|
-
unhideGhostForTarget:
|
|
2490
|
+
newDraggableIndex: Qi,
|
|
2491
|
+
hideGhostForTarget: Da,
|
|
2492
|
+
unhideGhostForTarget: Oa,
|
|
2463
2493
|
cloneNowHidden: function() {
|
|
2464
|
-
|
|
2494
|
+
Yi = !0;
|
|
2465
2495
|
},
|
|
2466
2496
|
cloneNowShown: function() {
|
|
2467
|
-
|
|
2497
|
+
Yi = !1;
|
|
2468
2498
|
},
|
|
2469
2499
|
dispatchSortableEvent: function(e) {
|
|
2470
2500
|
U({
|
|
@@ -2476,45 +2506,45 @@ var Wi = ["evt"], H = function(e, t) {
|
|
|
2476
2506
|
}, i));
|
|
2477
2507
|
};
|
|
2478
2508
|
function U(e) {
|
|
2479
|
-
|
|
2509
|
+
Gi(ri({
|
|
2480
2510
|
putSortable: X,
|
|
2481
2511
|
cloneEl: J,
|
|
2482
2512
|
targetEl: W,
|
|
2483
2513
|
rootEl: q,
|
|
2484
|
-
oldIndex:
|
|
2485
|
-
oldDraggableIndex:
|
|
2514
|
+
oldIndex: Xi,
|
|
2515
|
+
oldDraggableIndex: Zi,
|
|
2486
2516
|
newIndex: Y,
|
|
2487
|
-
newDraggableIndex:
|
|
2517
|
+
newDraggableIndex: Qi
|
|
2488
2518
|
}, e));
|
|
2489
2519
|
}
|
|
2490
|
-
var W, G, K, q,
|
|
2491
|
-
if (
|
|
2492
|
-
if (
|
|
2520
|
+
var W, G, K, q, qi, Ji, J, Yi, Xi, Y, Zi, Qi, $i, X, ea = !1, ta = !1, na = [], ra, ia, aa, oa, sa, ca, la, ua, da, fa = !1, pa = !1, ma, Z, ha = [], ga = !1, _a = [], va = typeof document < "u", ya = hi, ba = fi || di ? "cssFloat" : "float", xa = va && !gi && !hi && "draggable" in document.createElement("div"), Sa = function() {
|
|
2521
|
+
if (va) {
|
|
2522
|
+
if (di) return !1;
|
|
2493
2523
|
var e = document.createElement("x");
|
|
2494
2524
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2495
2525
|
}
|
|
2496
|
-
}(),
|
|
2497
|
-
var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2526
|
+
}(), Ca = function(e, t) {
|
|
2527
|
+
var n = R(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ei(e, 0, t), a = Ei(e, 1, t), o = i && R(i), s = a && R(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + z(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + z(a).width;
|
|
2498
2528
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2499
2529
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2500
2530
|
if (i && o.float && o.float !== "none") {
|
|
2501
2531
|
var u = o.float === "left" ? "left" : "right";
|
|
2502
2532
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2503
2533
|
}
|
|
2504
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2505
|
-
},
|
|
2534
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ba] === "none" || a && n[ba] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2535
|
+
}, wa = function(e, t, n) {
|
|
2506
2536
|
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;
|
|
2507
2537
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2508
|
-
},
|
|
2538
|
+
}, Ta = function(e, t) {
|
|
2509
2539
|
var n;
|
|
2510
|
-
return
|
|
2540
|
+
return na.some(function(r) {
|
|
2511
2541
|
var i = r[V].options.emptyInsertThreshold;
|
|
2512
|
-
if (!(!i ||
|
|
2542
|
+
if (!(!i || Di(r))) {
|
|
2513
2543
|
var a = z(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2514
2544
|
if (o && s) return n = r;
|
|
2515
2545
|
}
|
|
2516
2546
|
}), n;
|
|
2517
|
-
},
|
|
2547
|
+
}, Ea = function(e) {
|
|
2518
2548
|
function t(e, n) {
|
|
2519
2549
|
return function(r, i, a, o) {
|
|
2520
2550
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2527,31 +2557,31 @@ var W, G, K, q, Gi, Ki, J, qi, Ji, Y, Yi, Xi, Zi, X, Qi = !1, $i = !1, ea = [],
|
|
|
2527
2557
|
};
|
|
2528
2558
|
}
|
|
2529
2559
|
var n = {}, r = e.group;
|
|
2530
|
-
(!r ||
|
|
2531
|
-
},
|
|
2532
|
-
!
|
|
2533
|
-
},
|
|
2534
|
-
!
|
|
2560
|
+
(!r || ii(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;
|
|
2561
|
+
}, Da = function() {
|
|
2562
|
+
!Sa && K && R(K, "display", "none");
|
|
2563
|
+
}, Oa = function() {
|
|
2564
|
+
!Sa && K && R(K, "display", "");
|
|
2535
2565
|
};
|
|
2536
|
-
|
|
2537
|
-
if (
|
|
2566
|
+
va && !gi && document.addEventListener("click", function(e) {
|
|
2567
|
+
if (ta) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), ta = !1, !1;
|
|
2538
2568
|
}, !0);
|
|
2539
|
-
var
|
|
2569
|
+
var ka = function(e) {
|
|
2540
2570
|
if (W) {
|
|
2541
2571
|
e = e.touches ? e.touches[0] : e;
|
|
2542
|
-
var t =
|
|
2572
|
+
var t = Ta(e.clientX, e.clientY);
|
|
2543
2573
|
if (t) {
|
|
2544
2574
|
var n = {};
|
|
2545
2575
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2546
2576
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2547
2577
|
}
|
|
2548
2578
|
}
|
|
2549
|
-
},
|
|
2579
|
+
}, Aa = function(e) {
|
|
2550
2580
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2551
2581
|
};
|
|
2552
2582
|
function Q(e, t) {
|
|
2553
2583
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2554
|
-
this.el = e, this.options = t =
|
|
2584
|
+
this.el = e, this.options = t = oi({}, t), e[V] = this;
|
|
2555
2585
|
var n = {
|
|
2556
2586
|
group: null,
|
|
2557
2587
|
sort: !0,
|
|
@@ -2564,7 +2594,7 @@ function Q(e, t) {
|
|
|
2564
2594
|
invertedSwapThreshold: null,
|
|
2565
2595
|
removeCloneOnHide: !0,
|
|
2566
2596
|
direction: function() {
|
|
2567
|
-
return
|
|
2597
|
+
return Ca(e, this.options);
|
|
2568
2598
|
},
|
|
2569
2599
|
ghostClass: "sortable-ghost",
|
|
2570
2600
|
chosenClass: "sortable-chosen",
|
|
@@ -2591,17 +2621,17 @@ function Q(e, t) {
|
|
|
2591
2621
|
x: 0,
|
|
2592
2622
|
y: 0
|
|
2593
2623
|
},
|
|
2594
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2624
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !mi,
|
|
2595
2625
|
emptyInsertThreshold: 5
|
|
2596
2626
|
};
|
|
2597
|
-
for (var r in
|
|
2598
|
-
for (var i in
|
|
2599
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
2627
|
+
for (var r in Wi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2628
|
+
for (var i in Ea(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2629
|
+
this.nativeDraggable = t.forceFallback ? !1 : xa, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? F(e, "pointerdown", this._onTapStart) : (F(e, "mousedown", this._onTapStart), F(e, "touchstart", this._onTapStart)), this.nativeDraggable && (F(e, "dragover", this), F(e, "dragenter", this)), na.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), oi(this, zi());
|
|
2600
2630
|
}
|
|
2601
2631
|
Q.prototype = {
|
|
2602
2632
|
constructor: Q,
|
|
2603
2633
|
_isOutsideThisEl: function(e) {
|
|
2604
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2634
|
+
!this.el.contains(e) && e !== this.el && (ua = null);
|
|
2605
2635
|
},
|
|
2606
2636
|
_getDirection: function(e, t) {
|
|
2607
2637
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2609,8 +2639,8 @@ Q.prototype = {
|
|
|
2609
2639
|
_onTapStart: function(e) {
|
|
2610
2640
|
if (e.cancelable) {
|
|
2611
2641
|
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;
|
|
2612
|
-
if (
|
|
2613
|
-
if (
|
|
2642
|
+
if (Ba(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && mi && s && s.tagName.toUpperCase() === "SELECT") && (s = bi(s, r.draggable, n, !1), !(s && s.animated) && Ji !== s)) {
|
|
2643
|
+
if (Xi = B(s), Zi = B(s, r.draggable), typeof l == "function") {
|
|
2614
2644
|
if (l.call(this, e, s, this)) {
|
|
2615
2645
|
U({
|
|
2616
2646
|
sortable: t,
|
|
@@ -2623,7 +2653,7 @@ Q.prototype = {
|
|
|
2623
2653
|
return;
|
|
2624
2654
|
}
|
|
2625
2655
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2626
|
-
if (r =
|
|
2656
|
+
if (r = bi(c, r.trim(), n, !1), r) return U({
|
|
2627
2657
|
sortable: t,
|
|
2628
2658
|
rootEl: r,
|
|
2629
2659
|
name: "filter",
|
|
@@ -2635,7 +2665,7 @@ Q.prototype = {
|
|
|
2635
2665
|
i && e.cancelable && e.preventDefault();
|
|
2636
2666
|
return;
|
|
2637
2667
|
}
|
|
2638
|
-
r.handle && !
|
|
2668
|
+
r.handle && !bi(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2639
2669
|
}
|
|
2640
2670
|
}
|
|
2641
2671
|
},
|
|
@@ -2643,23 +2673,23 @@ Q.prototype = {
|
|
|
2643
2673
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2644
2674
|
if (n && !W && n.parentNode === i) {
|
|
2645
2675
|
var c = z(n);
|
|
2646
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2676
|
+
if (q = i, W = n, G = W.parentNode, qi = W.nextSibling, Ji = n, $i = a.group, Q.dragged = W, ra = {
|
|
2647
2677
|
target: W,
|
|
2648
2678
|
clientX: (t || e).clientX,
|
|
2649
2679
|
clientY: (t || e).clientY
|
|
2650
|
-
},
|
|
2680
|
+
}, sa = ra.clientX - c.left, ca = ra.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2651
2681
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2652
2682
|
r._onDrop();
|
|
2653
2683
|
return;
|
|
2654
2684
|
}
|
|
2655
|
-
r._disableDelayedDragEvents(), !
|
|
2685
|
+
r._disableDelayedDragEvents(), !pi && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2656
2686
|
sortable: r,
|
|
2657
2687
|
name: "choose",
|
|
2658
2688
|
originalEvent: e
|
|
2659
2689
|
}), L(W, a.chosenClass, !0);
|
|
2660
2690
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2661
|
-
|
|
2662
|
-
}), F(o, "dragover",
|
|
2691
|
+
Ci(W, e.trim(), Na);
|
|
2692
|
+
}), F(o, "dragover", ka), F(o, "mousemove", ka), F(o, "touchmove", ka), F(o, "mouseup", r._onDrop), F(o, "touchend", r._onDrop), F(o, "touchcancel", r._onDrop), pi && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(fi || di))) {
|
|
2663
2693
|
if (Q.eventCanceled) {
|
|
2664
2694
|
this._onDrop();
|
|
2665
2695
|
return;
|
|
@@ -2673,7 +2703,7 @@ Q.prototype = {
|
|
|
2673
2703
|
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();
|
|
2674
2704
|
},
|
|
2675
2705
|
_disableDelayedDrag: function() {
|
|
2676
|
-
W &&
|
|
2706
|
+
W && Na(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2677
2707
|
},
|
|
2678
2708
|
_disableDelayedDragEvents: function() {
|
|
2679
2709
|
var e = this.el.ownerDocument;
|
|
@@ -2682,14 +2712,14 @@ Q.prototype = {
|
|
|
2682
2712
|
_triggerDragStart: function(e, t) {
|
|
2683
2713
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? F(document, "pointermove", this._onTouchMove) : t ? F(document, "touchmove", this._onTouchMove) : F(document, "mousemove", this._onTouchMove) : (F(W, "dragend", this), F(q, "dragstart", this._onDragStart));
|
|
2684
2714
|
try {
|
|
2685
|
-
document.selection ?
|
|
2715
|
+
document.selection ? Va(function() {
|
|
2686
2716
|
document.selection.empty();
|
|
2687
2717
|
}) : window.getSelection().removeAllRanges();
|
|
2688
2718
|
} catch {}
|
|
2689
2719
|
},
|
|
2690
2720
|
_dragStarted: function(e, t) {
|
|
2691
|
-
if (
|
|
2692
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover",
|
|
2721
|
+
if (ea = !1, q && W) {
|
|
2722
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && F(document, "dragover", Aa);
|
|
2693
2723
|
var n = this.options;
|
|
2694
2724
|
!e && L(W, n.dragClass, !1), L(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2695
2725
|
sortable: this,
|
|
@@ -2699,33 +2729,33 @@ Q.prototype = {
|
|
|
2699
2729
|
} else this._nulling();
|
|
2700
2730
|
},
|
|
2701
2731
|
_emulateDragOver: function() {
|
|
2702
|
-
if (
|
|
2703
|
-
this._lastX =
|
|
2704
|
-
for (var e = document.elementFromPoint(
|
|
2732
|
+
if (ia) {
|
|
2733
|
+
this._lastX = ia.clientX, this._lastY = ia.clientY, Da();
|
|
2734
|
+
for (var e = document.elementFromPoint(ia.clientX, ia.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ia.clientX, ia.clientY), e !== t);) t = e;
|
|
2705
2735
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2706
2736
|
if (t[V]) {
|
|
2707
2737
|
var n = void 0;
|
|
2708
2738
|
if (n = t[V]._onDragOver({
|
|
2709
|
-
clientX:
|
|
2710
|
-
clientY:
|
|
2739
|
+
clientX: ia.clientX,
|
|
2740
|
+
clientY: ia.clientY,
|
|
2711
2741
|
target: e,
|
|
2712
2742
|
rootEl: t
|
|
2713
2743
|
}), n && !this.options.dragoverBubble) break;
|
|
2714
2744
|
}
|
|
2715
2745
|
e = t;
|
|
2716
2746
|
} while (t = t.parentNode);
|
|
2717
|
-
|
|
2747
|
+
Oa();
|
|
2718
2748
|
}
|
|
2719
2749
|
},
|
|
2720
2750
|
_onTouchMove: function(e) {
|
|
2721
|
-
if (
|
|
2722
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2723
|
-
if (!Q.active && !
|
|
2751
|
+
if (ra) {
|
|
2752
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && Si(K, !0), o = K && a && a.a, s = K && a && a.d, c = ya && Z && Oi(Z), l = (i.clientX - ra.clientX + r.x) / (o || 1) + (c ? c[0] - ha[0] : 0) / (o || 1), u = (i.clientY - ra.clientY + r.y) / (s || 1) + (c ? c[1] - ha[1] : 0) / (s || 1);
|
|
2753
|
+
if (!Q.active && !ea) {
|
|
2724
2754
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2725
2755
|
this._onDragStart(e, !0);
|
|
2726
2756
|
}
|
|
2727
2757
|
if (K) {
|
|
2728
|
-
a ? (a.e += l - (
|
|
2758
|
+
a ? (a.e += l - (aa || 0), a.f += u - (oa || 0)) : a = {
|
|
2729
2759
|
a: 1,
|
|
2730
2760
|
b: 0,
|
|
2731
2761
|
c: 0,
|
|
@@ -2734,19 +2764,19 @@ Q.prototype = {
|
|
|
2734
2764
|
f: u
|
|
2735
2765
|
};
|
|
2736
2766
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2737
|
-
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d),
|
|
2767
|
+
R(K, "webkitTransform", d), R(K, "mozTransform", d), R(K, "msTransform", d), R(K, "transform", d), aa = l, oa = u, ia = i;
|
|
2738
2768
|
}
|
|
2739
2769
|
e.cancelable && e.preventDefault();
|
|
2740
2770
|
}
|
|
2741
2771
|
},
|
|
2742
2772
|
_appendGhost: function() {
|
|
2743
2773
|
if (!K) {
|
|
2744
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0,
|
|
2745
|
-
if (
|
|
2774
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = z(W, !0, ya, !0, e), n = this.options;
|
|
2775
|
+
if (ya) {
|
|
2746
2776
|
for (Z = e; R(Z, "position") === "static" && R(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2747
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2777
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = wi()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = wi(), ha = Oi(Z);
|
|
2748
2778
|
}
|
|
2749
|
-
K = W.cloneNode(!0), L(K, n.ghostClass, !1), L(K, n.fallbackClass, !0), L(K, n.dragClass, !0), R(K, "transition", ""), R(K, "transform", ""), R(K, "box-sizing", "border-box"), R(K, "margin", 0), R(K, "top", t.top), R(K, "left", t.left), R(K, "width", t.width), R(K, "height", t.height), R(K, "opacity", "0.8"), R(K, "position",
|
|
2779
|
+
K = W.cloneNode(!0), L(K, n.ghostClass, !1), L(K, n.fallbackClass, !0), L(K, n.dragClass, !0), R(K, "transition", ""), R(K, "transform", ""), R(K, "box-sizing", "border-box"), R(K, "margin", 0), R(K, "top", t.top), R(K, "left", t.left), R(K, "width", t.width), R(K, "height", t.height), R(K, "opacity", "0.8"), R(K, "position", ya ? "absolute" : "fixed"), R(K, "zIndex", "100000"), R(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), R(K, "transform-origin", sa / parseInt(K.style.width) * 100 + "% " + ca / parseInt(K.style.height) * 100 + "%");
|
|
2750
2780
|
}
|
|
2751
2781
|
},
|
|
2752
2782
|
_onDragStart: function(e, t) {
|
|
@@ -2755,18 +2785,18 @@ Q.prototype = {
|
|
|
2755
2785
|
this._onDrop();
|
|
2756
2786
|
return;
|
|
2757
2787
|
}
|
|
2758
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
2788
|
+
H("setupClone", this), Q.eventCanceled || (J = Li(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), L(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Va(function() {
|
|
2759
2789
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
2760
2790
|
sortable: n,
|
|
2761
2791
|
name: "clone"
|
|
2762
2792
|
}));
|
|
2763
|
-
}), !t && L(W, i.dragClass, !0), t ? (
|
|
2793
|
+
}), !t && L(W, i.dragClass, !0), t ? (ta = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (I(document, "mouseup", n._onDrop), I(document, "touchend", n._onDrop), I(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), F(document, "drop", n), R(W, "transform", "translateZ(0)")), ea = !0, n._dragStartId = Va(n._dragStarted.bind(n, t, e)), F(document, "selectstart", n), la = !0, mi && R(document.body, "user-select", "none");
|
|
2764
2794
|
},
|
|
2765
2795
|
_onDragOver: function(e) {
|
|
2766
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2767
|
-
if (
|
|
2796
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = $i === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2797
|
+
if (ga) return;
|
|
2768
2798
|
function h(o, s) {
|
|
2769
|
-
H(o, p,
|
|
2799
|
+
H(o, p, ri({
|
|
2770
2800
|
evt: e,
|
|
2771
2801
|
isOwner: l,
|
|
2772
2802
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2778,7 +2808,7 @@ Q.prototype = {
|
|
|
2778
2808
|
target: n,
|
|
2779
2809
|
completed: _,
|
|
2780
2810
|
onMove: function(n, i) {
|
|
2781
|
-
return
|
|
2811
|
+
return Ma(q, t, W, r, n, z(n), e, i);
|
|
2782
2812
|
},
|
|
2783
2813
|
changed: v
|
|
2784
2814
|
}, s));
|
|
@@ -2789,35 +2819,35 @@ Q.prototype = {
|
|
|
2789
2819
|
function _(r) {
|
|
2790
2820
|
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (L(W, X ? X.options.ghostClass : c.options.ghostClass, !1), L(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() {
|
|
2791
2821
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2792
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
2822
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (ua = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && ka(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2793
2823
|
}
|
|
2794
2824
|
function v() {
|
|
2795
|
-
Y = B(W),
|
|
2825
|
+
Y = B(W), Qi = B(W, o.draggable), U({
|
|
2796
2826
|
sortable: p,
|
|
2797
2827
|
name: "change",
|
|
2798
2828
|
toEl: t,
|
|
2799
2829
|
newIndex: Y,
|
|
2800
|
-
newDraggableIndex:
|
|
2830
|
+
newDraggableIndex: Qi,
|
|
2801
2831
|
originalEvent: e
|
|
2802
2832
|
});
|
|
2803
2833
|
}
|
|
2804
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2834
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = bi(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2805
2835
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2806
|
-
if (
|
|
2836
|
+
if (ta = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = $i.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
2807
2837
|
if (f = this._getDirection(e, n) === "vertical", r = z(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2808
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2809
|
-
var y =
|
|
2810
|
-
if (!y ||
|
|
2838
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (qi ? q.insertBefore(W, qi) : q.appendChild(W)), _(!0);
|
|
2839
|
+
var y = Di(t, o.draggable);
|
|
2840
|
+
if (!y || Ia(e, f, this) && !y.animated) {
|
|
2811
2841
|
if (y === W) return _(!1);
|
|
2812
|
-
if (y && t === e.target && (n = y), n && (i = z(n)),
|
|
2813
|
-
} else if (y &&
|
|
2814
|
-
var b =
|
|
2842
|
+
if (y && t === e.target && (n = y), n && (i = z(n)), Ma(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);
|
|
2843
|
+
} else if (y && Fa(e, f, this)) {
|
|
2844
|
+
var b = Ei(t, 0, o, !0);
|
|
2815
2845
|
if (b === W) return _(!1);
|
|
2816
|
-
if (n = b, i = z(n),
|
|
2846
|
+
if (n = b, i = z(n), Ma(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
2817
2847
|
} else if (n.parentNode === t) {
|
|
2818
2848
|
i = z(n);
|
|
2819
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
2820
|
-
|
|
2849
|
+
var x = 0, S, C = W.parentNode !== t, w = !wa(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ti(n, "top", "top") || Ti(W, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
2850
|
+
ua !== n && (S = i[T], fa = !1, pa = !w && o.invertSwap || C), x = La(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, pa, ua === n);
|
|
2821
2851
|
var D;
|
|
2822
2852
|
if (x !== 0) {
|
|
2823
2853
|
var O = B(W);
|
|
@@ -2826,11 +2856,11 @@ Q.prototype = {
|
|
|
2826
2856
|
while (D && (R(D, "display") === "none" || D === K));
|
|
2827
2857
|
}
|
|
2828
2858
|
if (x === 0 || D === n) return _(!1);
|
|
2829
|
-
|
|
2859
|
+
ua = n, da = x;
|
|
2830
2860
|
var k = n.nextElementSibling, te = !1;
|
|
2831
2861
|
te = x === 1;
|
|
2832
|
-
var A =
|
|
2833
|
-
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1),
|
|
2862
|
+
var A = Ma(q, t, W, r, n, i, e, te);
|
|
2863
|
+
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), ga = !0, setTimeout(Pa, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && Ii(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !pa && (ma = Math.abs(S - z(n)[T])), v(), _(!0);
|
|
2834
2864
|
}
|
|
2835
2865
|
if (t.contains(W)) return _(!1);
|
|
2836
2866
|
}
|
|
@@ -2838,7 +2868,7 @@ Q.prototype = {
|
|
|
2838
2868
|
},
|
|
2839
2869
|
_ignoreWhileAnimating: null,
|
|
2840
2870
|
_offMoveEvents: function() {
|
|
2841
|
-
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover",
|
|
2871
|
+
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover", ka), I(document, "mousemove", ka), I(document, "touchmove", ka);
|
|
2842
2872
|
},
|
|
2843
2873
|
_offUpEvents: function() {
|
|
2844
2874
|
var e = this.el.ownerDocument;
|
|
@@ -2846,18 +2876,18 @@ Q.prototype = {
|
|
|
2846
2876
|
},
|
|
2847
2877
|
_onDrop: function(e) {
|
|
2848
2878
|
var t = this.el, n = this.options;
|
|
2849
|
-
if (Y = B(W),
|
|
2879
|
+
if (Y = B(W), Qi = B(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = B(W), Qi = B(W, n.draggable), Q.eventCanceled) {
|
|
2850
2880
|
this._nulling();
|
|
2851
2881
|
return;
|
|
2852
2882
|
}
|
|
2853
|
-
|
|
2883
|
+
ea = !1, pa = !1, fa = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ha(this.cloneId), Ha(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), mi && R(document.body, "user-select", ""), R(W, "transform", ""), e && (la && (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 && I(W, "dragend", this), Na(W), W.style["will-change"] = "", la && !ea && L(W, X ? X.options.ghostClass : this.options.ghostClass, !1), L(W, this.options.chosenClass, !1), U({
|
|
2854
2884
|
sortable: this,
|
|
2855
2885
|
name: "unchoose",
|
|
2856
2886
|
toEl: G,
|
|
2857
2887
|
newIndex: null,
|
|
2858
2888
|
newDraggableIndex: null,
|
|
2859
2889
|
originalEvent: e
|
|
2860
|
-
}), q === G ? Y !==
|
|
2890
|
+
}), q === G ? Y !== Xi && Y >= 0 && (U({
|
|
2861
2891
|
sortable: this,
|
|
2862
2892
|
name: "update",
|
|
2863
2893
|
toEl: G,
|
|
@@ -2889,7 +2919,7 @@ Q.prototype = {
|
|
|
2889
2919
|
name: "sort",
|
|
2890
2920
|
toEl: G,
|
|
2891
2921
|
originalEvent: e
|
|
2892
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
2922
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Xi, Qi = Zi), U({
|
|
2893
2923
|
sortable: this,
|
|
2894
2924
|
name: "end",
|
|
2895
2925
|
toEl: G,
|
|
@@ -2897,9 +2927,9 @@ Q.prototype = {
|
|
|
2897
2927
|
}), this.save()))), this._nulling();
|
|
2898
2928
|
},
|
|
2899
2929
|
_nulling: function() {
|
|
2900
|
-
H("nulling", this), q = W = G = K =
|
|
2930
|
+
H("nulling", this), q = W = G = K = qi = J = Ji = Yi = ra = ia = la = Y = Qi = Xi = Zi = ua = da = X = $i = Q.dragged = Q.ghost = Q.clone = Q.active = null, _a.forEach(function(e) {
|
|
2901
2931
|
e.checked = !0;
|
|
2902
|
-
}),
|
|
2932
|
+
}), _a.length = aa = oa = 0;
|
|
2903
2933
|
},
|
|
2904
2934
|
handleEvent: function(e) {
|
|
2905
2935
|
switch (e.type) {
|
|
@@ -2909,7 +2939,7 @@ Q.prototype = {
|
|
|
2909
2939
|
break;
|
|
2910
2940
|
case "dragenter":
|
|
2911
2941
|
case "dragover":
|
|
2912
|
-
W && (this._onDragOver(e),
|
|
2942
|
+
W && (this._onDragOver(e), ja(e));
|
|
2913
2943
|
break;
|
|
2914
2944
|
case "selectstart":
|
|
2915
2945
|
e.preventDefault();
|
|
@@ -2917,14 +2947,14 @@ Q.prototype = {
|
|
|
2917
2947
|
}
|
|
2918
2948
|
},
|
|
2919
2949
|
toArray: function() {
|
|
2920
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2950
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], bi(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || za(t));
|
|
2921
2951
|
return e;
|
|
2922
2952
|
},
|
|
2923
2953
|
sort: function(e, t) {
|
|
2924
2954
|
var n = {}, r = this.el;
|
|
2925
2955
|
this.toArray().forEach(function(e, t) {
|
|
2926
2956
|
var i = r.children[t];
|
|
2927
|
-
|
|
2957
|
+
bi(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2928
2958
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2929
2959
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2930
2960
|
}), t && this.animateAll();
|
|
@@ -2934,25 +2964,25 @@ Q.prototype = {
|
|
|
2934
2964
|
e && e.set && e.set(this);
|
|
2935
2965
|
},
|
|
2936
2966
|
closest: function(e, t) {
|
|
2937
|
-
return
|
|
2967
|
+
return bi(e, t || this.options.draggable, this.el, !1);
|
|
2938
2968
|
},
|
|
2939
2969
|
option: function(e, t) {
|
|
2940
2970
|
var n = this.options;
|
|
2941
2971
|
if (t === void 0) return n[e];
|
|
2942
|
-
var r =
|
|
2943
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2972
|
+
var r = Wi.modifyOption(this, e, t);
|
|
2973
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && Ea(n);
|
|
2944
2974
|
},
|
|
2945
2975
|
destroy: function() {
|
|
2946
2976
|
H("destroy", this);
|
|
2947
2977
|
var e = this.el;
|
|
2948
2978
|
e[V] = null, I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart), I(e, "pointerdown", this._onTapStart), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
2949
2979
|
e.removeAttribute("draggable");
|
|
2950
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2980
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), na.splice(na.indexOf(this.el), 1), this.el = e = null;
|
|
2951
2981
|
},
|
|
2952
2982
|
_hideClone: function() {
|
|
2953
|
-
if (!
|
|
2983
|
+
if (!Yi) {
|
|
2954
2984
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
2955
|
-
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J),
|
|
2985
|
+
R(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Yi = !0;
|
|
2956
2986
|
}
|
|
2957
2987
|
},
|
|
2958
2988
|
_showClone: function(e) {
|
|
@@ -2960,99 +2990,99 @@ Q.prototype = {
|
|
|
2960
2990
|
this._hideClone();
|
|
2961
2991
|
return;
|
|
2962
2992
|
}
|
|
2963
|
-
if (
|
|
2993
|
+
if (Yi) {
|
|
2964
2994
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
2965
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
2995
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : qi ? q.insertBefore(J, qi) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), R(J, "display", ""), Yi = !1;
|
|
2966
2996
|
}
|
|
2967
2997
|
}
|
|
2968
2998
|
};
|
|
2969
|
-
function
|
|
2999
|
+
function ja(e) {
|
|
2970
3000
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2971
3001
|
}
|
|
2972
|
-
function
|
|
3002
|
+
function Ma(e, t, n, r, i, a, o, s) {
|
|
2973
3003
|
var c, l = e[V], u = l.options.onMove, d;
|
|
2974
|
-
return window.CustomEvent && !
|
|
3004
|
+
return window.CustomEvent && !di && !fi ? c = new CustomEvent("move", {
|
|
2975
3005
|
bubbles: !0,
|
|
2976
3006
|
cancelable: !0
|
|
2977
3007
|
}) : (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 || z(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
2978
3008
|
}
|
|
2979
|
-
function
|
|
3009
|
+
function Na(e) {
|
|
2980
3010
|
e.draggable = !1;
|
|
2981
3011
|
}
|
|
2982
|
-
function
|
|
2983
|
-
|
|
3012
|
+
function Pa() {
|
|
3013
|
+
ga = !1;
|
|
2984
3014
|
}
|
|
2985
|
-
function
|
|
2986
|
-
var r = z(
|
|
3015
|
+
function Fa(e, t, n) {
|
|
3016
|
+
var r = z(Ei(n.el, 0, n.options, !0)), i = Ri(n.el, n.options, K), a = 10;
|
|
2987
3017
|
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;
|
|
2988
3018
|
}
|
|
2989
|
-
function
|
|
2990
|
-
var r = z(
|
|
3019
|
+
function Ia(e, t, n) {
|
|
3020
|
+
var r = z(Di(n.el, n.options.draggable)), i = Ri(n.el, n.options, K), a = 10;
|
|
2991
3021
|
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;
|
|
2992
3022
|
}
|
|
2993
|
-
function
|
|
3023
|
+
function La(e, t, n, r, i, a, o, s) {
|
|
2994
3024
|
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;
|
|
2995
3025
|
if (!o) {
|
|
2996
|
-
if (s &&
|
|
2997
|
-
if (!
|
|
2998
|
-
else if (
|
|
2999
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3026
|
+
if (s && ma < l * i) {
|
|
3027
|
+
if (!fa && (da === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (fa = !0), fa) f = !0;
|
|
3028
|
+
else if (da === 1 ? c < u + ma : c > d - ma) return -da;
|
|
3029
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Ra(t);
|
|
3000
3030
|
}
|
|
3001
3031
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3002
3032
|
}
|
|
3003
|
-
function
|
|
3033
|
+
function Ra(e) {
|
|
3004
3034
|
return B(W) < B(e) ? 1 : -1;
|
|
3005
3035
|
}
|
|
3006
|
-
function
|
|
3036
|
+
function za(e) {
|
|
3007
3037
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3008
3038
|
return r.toString(36);
|
|
3009
3039
|
}
|
|
3010
|
-
function
|
|
3011
|
-
|
|
3040
|
+
function Ba(e) {
|
|
3041
|
+
_a.length = 0;
|
|
3012
3042
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3013
3043
|
var r = t[n];
|
|
3014
|
-
r.checked &&
|
|
3044
|
+
r.checked && _a.push(r);
|
|
3015
3045
|
}
|
|
3016
3046
|
}
|
|
3017
|
-
function
|
|
3047
|
+
function Va(e) {
|
|
3018
3048
|
return setTimeout(e, 0);
|
|
3019
3049
|
}
|
|
3020
|
-
function
|
|
3050
|
+
function Ha(e) {
|
|
3021
3051
|
return clearTimeout(e);
|
|
3022
3052
|
}
|
|
3023
|
-
|
|
3024
|
-
(Q.active ||
|
|
3053
|
+
va && F(document, "touchmove", function(e) {
|
|
3054
|
+
(Q.active || ea) && e.cancelable && e.preventDefault();
|
|
3025
3055
|
}), Q.utils = {
|
|
3026
3056
|
on: F,
|
|
3027
3057
|
off: I,
|
|
3028
3058
|
css: R,
|
|
3029
|
-
find:
|
|
3059
|
+
find: Ci,
|
|
3030
3060
|
is: function(e, t) {
|
|
3031
|
-
return !!
|
|
3061
|
+
return !!bi(e, t, e, !1);
|
|
3032
3062
|
},
|
|
3033
|
-
extend:
|
|
3034
|
-
throttle:
|
|
3035
|
-
closest:
|
|
3063
|
+
extend: ji,
|
|
3064
|
+
throttle: Pi,
|
|
3065
|
+
closest: bi,
|
|
3036
3066
|
toggleClass: L,
|
|
3037
|
-
clone:
|
|
3067
|
+
clone: Li,
|
|
3038
3068
|
index: B,
|
|
3039
|
-
nextTick:
|
|
3040
|
-
cancelNextTick:
|
|
3041
|
-
detectDirection:
|
|
3042
|
-
getChild:
|
|
3069
|
+
nextTick: Va,
|
|
3070
|
+
cancelNextTick: Ha,
|
|
3071
|
+
detectDirection: Ca,
|
|
3072
|
+
getChild: Ei
|
|
3043
3073
|
}, Q.get = function(e) {
|
|
3044
3074
|
return e[V];
|
|
3045
3075
|
}, Q.mount = function() {
|
|
3046
3076
|
var e = [...arguments];
|
|
3047
3077
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3048
3078
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3049
|
-
e.utils && (Q.utils =
|
|
3079
|
+
e.utils && (Q.utils = ri(ri({}, Q.utils), e.utils)), Wi.mount(e);
|
|
3050
3080
|
});
|
|
3051
3081
|
}, Q.create = function(e, t) {
|
|
3052
3082
|
return new Q(e, t);
|
|
3053
|
-
}, Q.version =
|
|
3054
|
-
var $ = [],
|
|
3055
|
-
function
|
|
3083
|
+
}, Q.version = li;
|
|
3084
|
+
var $ = [], Ua, Wa, Ga = !1, Ka, qa, Ja, Ya;
|
|
3085
|
+
function Xa() {
|
|
3056
3086
|
function e() {
|
|
3057
3087
|
for (var e in this.defaults = {
|
|
3058
3088
|
scroll: !0,
|
|
@@ -3072,63 +3102,63 @@ function Ja() {
|
|
|
3072
3102
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3073
3103
|
},
|
|
3074
3104
|
drop: function() {
|
|
3075
|
-
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3105
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), Qa(), Za(), Fi();
|
|
3076
3106
|
},
|
|
3077
3107
|
nulling: function() {
|
|
3078
|
-
|
|
3108
|
+
Ja = Wa = Ua = Ga = Ya = Ka = qa = null, $.length = 0;
|
|
3079
3109
|
},
|
|
3080
3110
|
_handleFallbackAutoScroll: function(e) {
|
|
3081
3111
|
this._handleAutoScroll(e, !0);
|
|
3082
3112
|
},
|
|
3083
3113
|
_handleAutoScroll: function(e, t) {
|
|
3084
3114
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3085
|
-
if (
|
|
3086
|
-
|
|
3087
|
-
var o =
|
|
3088
|
-
|
|
3089
|
-
var a =
|
|
3090
|
-
a !== o && (o = a,
|
|
3091
|
-
}, 10),
|
|
3115
|
+
if (Ja = e, t || this.options.forceAutoScrollFallback || fi || di || mi) {
|
|
3116
|
+
$a(e, this.options, a, t);
|
|
3117
|
+
var o = Ai(a, !0);
|
|
3118
|
+
Ga && (!Ya || r !== Ka || i !== qa) && (Ya && Qa(), Ya = setInterval(function() {
|
|
3119
|
+
var a = Ai(document.elementFromPoint(r, i), !0);
|
|
3120
|
+
a !== o && (o = a, Za()), $a(e, n.options, a, t);
|
|
3121
|
+
}, 10), Ka = r, qa = i);
|
|
3092
3122
|
} else {
|
|
3093
|
-
if (!this.options.bubbleScroll ||
|
|
3094
|
-
|
|
3123
|
+
if (!this.options.bubbleScroll || Ai(a, !0) === wi()) {
|
|
3124
|
+
Za();
|
|
3095
3125
|
return;
|
|
3096
3126
|
}
|
|
3097
|
-
|
|
3127
|
+
$a(e, this.options, Ai(a, !1), !1);
|
|
3098
3128
|
}
|
|
3099
3129
|
}
|
|
3100
|
-
},
|
|
3130
|
+
}, oi(e, {
|
|
3101
3131
|
pluginName: "scroll",
|
|
3102
3132
|
initializeByDefault: !0
|
|
3103
3133
|
});
|
|
3104
3134
|
}
|
|
3105
|
-
function
|
|
3135
|
+
function Za() {
|
|
3106
3136
|
$.forEach(function(e) {
|
|
3107
3137
|
clearInterval(e.pid);
|
|
3108
3138
|
}), $ = [];
|
|
3109
3139
|
}
|
|
3110
|
-
function
|
|
3111
|
-
clearInterval(
|
|
3140
|
+
function Qa() {
|
|
3141
|
+
clearInterval(Ya);
|
|
3112
3142
|
}
|
|
3113
|
-
var
|
|
3143
|
+
var $a = Pi(function(e, t, n, r) {
|
|
3114
3144
|
if (t.scroll) {
|
|
3115
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3116
|
-
|
|
3117
|
-
var d = 0, f =
|
|
3145
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = wi(), l = !1, u;
|
|
3146
|
+
Wa !== n && (Wa = n, Za(), Ua = t.scroll, u = t.scrollFn, Ua === !0 && (Ua = Ai(n, !0)));
|
|
3147
|
+
var d = 0, f = Ua;
|
|
3118
3148
|
do {
|
|
3119
3149
|
var p = f, m = z(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 = R(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
3120
3150
|
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"));
|
|
3121
3151
|
var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
|
|
3122
3152
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3123
3153
|
($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3124
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3154
|
+
r && this.layer === 0 && Q.active._onTouchMove(Ja);
|
|
3125
3155
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3126
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
3156
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ja, $[this.layer].el) !== "continue" || Ii($[this.layer].el, n, t);
|
|
3127
3157
|
}.bind({ layer: d }), 24))), d++;
|
|
3128
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3129
|
-
|
|
3158
|
+
} while (t.bubbleScroll && f !== c && (f = Ai(f, !1)));
|
|
3159
|
+
Ga = l;
|
|
3130
3160
|
}
|
|
3131
|
-
}, 30),
|
|
3161
|
+
}, 30), eo = function(e) {
|
|
3132
3162
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3133
3163
|
if (t) {
|
|
3134
3164
|
var c = n || i;
|
|
@@ -3140,8 +3170,8 @@ var Za = Mi(function(e, t, n, r) {
|
|
|
3140
3170
|
}));
|
|
3141
3171
|
}
|
|
3142
3172
|
};
|
|
3143
|
-
function
|
|
3144
|
-
|
|
3173
|
+
function to() {}
|
|
3174
|
+
to.prototype = {
|
|
3145
3175
|
startIndex: null,
|
|
3146
3176
|
dragStart: function(e) {
|
|
3147
3177
|
var t = e.oldDraggableIndex;
|
|
@@ -3150,72 +3180,72 @@ $a.prototype = {
|
|
|
3150
3180
|
onSpill: function(e) {
|
|
3151
3181
|
var t = e.dragEl, n = e.putSortable;
|
|
3152
3182
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3153
|
-
var r =
|
|
3183
|
+
var r = Ei(this.sortable.el, this.startIndex, this.options);
|
|
3154
3184
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3155
3185
|
},
|
|
3156
|
-
drop:
|
|
3157
|
-
},
|
|
3158
|
-
function
|
|
3159
|
-
|
|
3186
|
+
drop: eo
|
|
3187
|
+
}, oi(to, { pluginName: "revertOnSpill" });
|
|
3188
|
+
function no() {}
|
|
3189
|
+
no.prototype = {
|
|
3160
3190
|
onSpill: function(e) {
|
|
3161
3191
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3162
3192
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3163
3193
|
},
|
|
3164
|
-
drop:
|
|
3165
|
-
},
|
|
3166
|
-
function
|
|
3194
|
+
drop: eo
|
|
3195
|
+
}, oi(no, { pluginName: "removeOnSpill" }), Q.mount(new Xa()), Q.mount(no, to);
|
|
3196
|
+
function ro(e) {
|
|
3167
3197
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3168
3198
|
}
|
|
3169
|
-
function
|
|
3199
|
+
function io(e) {
|
|
3170
3200
|
oe() && ee(e);
|
|
3171
3201
|
}
|
|
3172
|
-
function
|
|
3202
|
+
function ao(e) {
|
|
3173
3203
|
oe() ? u(e) : r(e);
|
|
3174
3204
|
}
|
|
3175
|
-
var
|
|
3176
|
-
function
|
|
3177
|
-
|
|
3205
|
+
var oo = null, so = null;
|
|
3206
|
+
function co(e = null, t = null) {
|
|
3207
|
+
oo = e, so = t;
|
|
3178
3208
|
}
|
|
3179
|
-
function
|
|
3209
|
+
function lo() {
|
|
3180
3210
|
return {
|
|
3181
|
-
data:
|
|
3182
|
-
clonedData:
|
|
3211
|
+
data: oo,
|
|
3212
|
+
clonedData: so
|
|
3183
3213
|
};
|
|
3184
3214
|
}
|
|
3185
|
-
var
|
|
3186
|
-
function
|
|
3215
|
+
var uo = Symbol("cloneElement");
|
|
3216
|
+
function fo(...e) {
|
|
3187
3217
|
let t = oe()?.proxy, n = null, i = e[0], [, o, c] = e;
|
|
3188
3218
|
Array.isArray(j(o)) || (c = o, o = null);
|
|
3189
|
-
let l = null, { immediate: u = !0, clone: d =
|
|
3219
|
+
let l = null, { immediate: u = !0, clone: d = ro, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
|
|
3190
3220
|
function h(e) {
|
|
3191
3221
|
let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
|
|
3192
3222
|
n = f && !p ? a.slice(0, -1) : a;
|
|
3193
3223
|
let s = j(j(o)?.[r]), c = d(s);
|
|
3194
|
-
|
|
3224
|
+
co(s, c), i[uo] = c;
|
|
3195
3225
|
}
|
|
3196
3226
|
function g(e) {
|
|
3197
|
-
let t = e.item[
|
|
3198
|
-
if (!
|
|
3199
|
-
if (
|
|
3227
|
+
let t = e.item[uo];
|
|
3228
|
+
if (!Gr(t)) {
|
|
3229
|
+
if (Jr(e.item), a(o)) {
|
|
3200
3230
|
let n = [...j(o)];
|
|
3201
|
-
o.value =
|
|
3231
|
+
o.value = Wr(n, e.newDraggableIndex, t);
|
|
3202
3232
|
return;
|
|
3203
3233
|
}
|
|
3204
|
-
|
|
3234
|
+
Wr(j(o), e.newDraggableIndex, t);
|
|
3205
3235
|
}
|
|
3206
3236
|
}
|
|
3207
3237
|
function _(e) {
|
|
3208
3238
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
|
|
3209
|
-
if (
|
|
3210
|
-
|
|
3239
|
+
if (qr(t, n, r), s === "clone") {
|
|
3240
|
+
Jr(c);
|
|
3211
3241
|
return;
|
|
3212
3242
|
}
|
|
3213
3243
|
if (a(o)) {
|
|
3214
3244
|
let e = [...j(o)];
|
|
3215
|
-
o.value =
|
|
3245
|
+
o.value = Ur(e, i);
|
|
3216
3246
|
return;
|
|
3217
3247
|
}
|
|
3218
|
-
|
|
3248
|
+
Ur(j(o), i);
|
|
3219
3249
|
}
|
|
3220
3250
|
function v(e) {
|
|
3221
3251
|
if (m) {
|
|
@@ -3223,12 +3253,12 @@ function lo(...e) {
|
|
|
3223
3253
|
return;
|
|
3224
3254
|
}
|
|
3225
3255
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
|
|
3226
|
-
if (
|
|
3256
|
+
if (Jr(n), qr(t, n, r), a(o)) {
|
|
3227
3257
|
let e = [...j(o)];
|
|
3228
|
-
o.value =
|
|
3258
|
+
o.value = Br(e, i, s);
|
|
3229
3259
|
return;
|
|
3230
3260
|
}
|
|
3231
|
-
|
|
3261
|
+
Br(j(o), i, s);
|
|
3232
3262
|
}
|
|
3233
3263
|
function y(e) {
|
|
3234
3264
|
let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
|
|
@@ -3247,7 +3277,7 @@ function lo(...e) {
|
|
|
3247
3277
|
n = null;
|
|
3248
3278
|
}
|
|
3249
3279
|
r(() => {
|
|
3250
|
-
if (
|
|
3280
|
+
if (co(), s) throw s;
|
|
3251
3281
|
});
|
|
3252
3282
|
}
|
|
3253
3283
|
let b = {
|
|
@@ -3259,19 +3289,19 @@ function lo(...e) {
|
|
|
3259
3289
|
};
|
|
3260
3290
|
function x(e) {
|
|
3261
3291
|
let n = j(i);
|
|
3262
|
-
return e ||=
|
|
3292
|
+
return e ||= Kr(n) ? Yr(n, t?.$el) : n, e && !Qr(e) && (e = e.$el), e || zr("Root element not found"), e;
|
|
3263
3293
|
}
|
|
3264
3294
|
function S() {
|
|
3265
|
-
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3266
|
-
return
|
|
3267
|
-
|
|
3268
|
-
}),
|
|
3295
|
+
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = Ir(e, ["immediate", "clone"]);
|
|
3296
|
+
return $r(r, (e, t) => {
|
|
3297
|
+
ei(e) && (r[e] = (e, ...n) => (ti(e, lo()), t(e, ...n)));
|
|
3298
|
+
}), Zr(o === null ? {} : b, r);
|
|
3269
3299
|
}
|
|
3270
3300
|
let C = (e) => {
|
|
3271
3301
|
e = x(e), l && w.destroy(), l = new Q(e, S());
|
|
3272
3302
|
};
|
|
3273
3303
|
s(() => c, () => {
|
|
3274
|
-
l &&
|
|
3304
|
+
l && $r(S(), (e, t) => {
|
|
3275
3305
|
l?.option(e, t);
|
|
3276
3306
|
});
|
|
3277
3307
|
}, { deep: !0 });
|
|
@@ -3284,15 +3314,15 @@ function lo(...e) {
|
|
|
3284
3314
|
toArray: () => l?.toArray(),
|
|
3285
3315
|
closest: (...e) => l?.closest(...e)
|
|
3286
3316
|
};
|
|
3287
|
-
return
|
|
3317
|
+
return ao(() => {
|
|
3288
3318
|
u && C();
|
|
3289
|
-
}),
|
|
3319
|
+
}), io(w.destroy), Fr({
|
|
3290
3320
|
start: C,
|
|
3291
3321
|
pause: () => w?.option("disabled", !0),
|
|
3292
3322
|
resume: () => w?.option("disabled", !1)
|
|
3293
3323
|
}, w);
|
|
3294
3324
|
}
|
|
3295
|
-
var
|
|
3325
|
+
var po = [
|
|
3296
3326
|
"update",
|
|
3297
3327
|
"start",
|
|
3298
3328
|
"add",
|
|
@@ -3305,7 +3335,7 @@ var uo = [
|
|
|
3305
3335
|
"clone",
|
|
3306
3336
|
"move",
|
|
3307
3337
|
"change"
|
|
3308
|
-
],
|
|
3338
|
+
], mo = y({
|
|
3309
3339
|
name: "VueDraggable",
|
|
3310
3340
|
model: {
|
|
3311
3341
|
prop: "modelValue",
|
|
@@ -3355,37 +3385,37 @@ var uo = [
|
|
|
3355
3385
|
"tag",
|
|
3356
3386
|
"target",
|
|
3357
3387
|
"customUpdate",
|
|
3358
|
-
...
|
|
3388
|
+
...po.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3359
3389
|
],
|
|
3360
|
-
emits: ["update:modelValue", ...
|
|
3390
|
+
emits: ["update:modelValue", ...po],
|
|
3361
3391
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3362
|
-
let a =
|
|
3392
|
+
let a = po.reduce((e, t) => {
|
|
3363
3393
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3364
3394
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3365
3395
|
}, {}), s = x(() => {
|
|
3366
|
-
let t = S(e), { modelValue: n } = t, r =
|
|
3396
|
+
let t = S(e), { modelValue: n } = t, r = Ir(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3367
3397
|
let r = j(n);
|
|
3368
3398
|
return r !== void 0 && (e[t] = r), e;
|
|
3369
3399
|
}, {});
|
|
3370
|
-
return
|
|
3400
|
+
return Fr(Fr({}, a), Hr(Fr(Fr({}, i), o)));
|
|
3371
3401
|
}), c = x({
|
|
3372
3402
|
get: () => e.modelValue,
|
|
3373
3403
|
set: (e) => n("update:modelValue", e)
|
|
3374
|
-
}), l = h(), u = o(
|
|
3404
|
+
}), l = h(), u = o(fo(e.target || l, c, s));
|
|
3375
3405
|
return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
3376
3406
|
}
|
|
3377
|
-
}),
|
|
3407
|
+
}), ho = {
|
|
3378
3408
|
mounted: "mounted",
|
|
3379
3409
|
unmounted: "unmounted"
|
|
3380
3410
|
};
|
|
3381
|
-
|
|
3411
|
+
ho.mounted, ho.unmounted;
|
|
3382
3412
|
//#endregion
|
|
3383
3413
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3384
|
-
var
|
|
3414
|
+
var go = { class: "tpl:w-full" }, _o = { class: "tpl:flex tpl:gap-0" }, vo = {
|
|
3385
3415
|
key: 0,
|
|
3386
3416
|
"data-testid": "section-drop-hint",
|
|
3387
3417
|
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)]"
|
|
3388
|
-
},
|
|
3418
|
+
}, yo = /* @__PURE__ */ y({
|
|
3389
3419
|
__name: "SectionBlock",
|
|
3390
3420
|
props: {
|
|
3391
3421
|
block: {},
|
|
@@ -3393,13 +3423,13 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3393
3423
|
},
|
|
3394
3424
|
setup(n) {
|
|
3395
3425
|
let r = {
|
|
3396
|
-
title:
|
|
3397
|
-
paragraph:
|
|
3398
|
-
image:
|
|
3399
|
-
button:
|
|
3400
|
-
divider:
|
|
3401
|
-
custom:
|
|
3402
|
-
}, a = n, { t: o } =
|
|
3426
|
+
title: kr,
|
|
3427
|
+
paragraph: fr,
|
|
3428
|
+
image: $n,
|
|
3429
|
+
button: Qt,
|
|
3430
|
+
divider: Ln,
|
|
3431
|
+
custom: Fn
|
|
3432
|
+
}, a = n, { t: o } = ut(), s = Qe(rt, "SectionBlock"), l = ae(at, null), u = ae(nt, null), d = x(() => {
|
|
3403
3433
|
switch (a.block.columns) {
|
|
3404
3434
|
case "2": return ["50%", "50%"];
|
|
3405
3435
|
case "3": return [
|
|
@@ -3425,7 +3455,7 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3425
3455
|
r[e] = n, s.updateBlock(a.block.id, { children: r });
|
|
3426
3456
|
}
|
|
3427
3457
|
function h(e) {
|
|
3428
|
-
return
|
|
3458
|
+
return pr(e, u, r);
|
|
3429
3459
|
}
|
|
3430
3460
|
function g(e, t) {
|
|
3431
3461
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3433,11 +3463,11 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3433
3463
|
dataSourceFetched: t.dataSourceFetched
|
|
3434
3464
|
});
|
|
3435
3465
|
}
|
|
3436
|
-
return (r, a) => (e(), w("div",
|
|
3466
|
+
return (r, a) => (e(), w("div", go, [C("div", _o, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
|
|
3437
3467
|
key: a,
|
|
3438
3468
|
class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3439
3469
|
style: A({ width: d.value[a] })
|
|
3440
|
-
}, [N(j(
|
|
3470
|
+
}, [N(j(mo), {
|
|
3441
3471
|
"model-value": p(a),
|
|
3442
3472
|
group: {
|
|
3443
3473
|
name: "blocks",
|
|
@@ -3455,7 +3485,7 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3455
3485
|
class: "tpl:min-h-[60px]",
|
|
3456
3486
|
"onUpdate:modelValue": (e) => m(a, e)
|
|
3457
3487
|
}, {
|
|
3458
|
-
default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(
|
|
3488
|
+
default: ce(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(Dr, {
|
|
3459
3489
|
block: r,
|
|
3460
3490
|
"is-selected": j(s).state.selectedBlockId === r.id,
|
|
3461
3491
|
viewport: n.viewport,
|
|
@@ -3482,9 +3512,9 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3482
3512
|
"model-value",
|
|
3483
3513
|
"group",
|
|
3484
3514
|
"onUpdate:modelValue"
|
|
3485
|
-
]), p(a).length === 0 ? (e(), w("div",
|
|
3515
|
+
]), p(a).length === 0 ? (e(), w("div", vo, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
|
|
3486
3516
|
}
|
|
3487
|
-
}),
|
|
3517
|
+
}), bo = {
|
|
3488
3518
|
facebook: {
|
|
3489
3519
|
name: "Facebook",
|
|
3490
3520
|
color: "#1877F2",
|
|
@@ -3565,11 +3595,11 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3565
3595
|
color: "#1769FF",
|
|
3566
3596
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
3567
3597
|
}
|
|
3568
|
-
},
|
|
3598
|
+
}, xo = {
|
|
3569
3599
|
small: 24,
|
|
3570
3600
|
medium: 32,
|
|
3571
3601
|
large: 48
|
|
3572
|
-
},
|
|
3602
|
+
}, So = [
|
|
3573
3603
|
"facebook",
|
|
3574
3604
|
"twitter",
|
|
3575
3605
|
"instagram",
|
|
@@ -3586,11 +3616,11 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3586
3616
|
"github",
|
|
3587
3617
|
"dribbble",
|
|
3588
3618
|
"behance"
|
|
3589
|
-
],
|
|
3619
|
+
], Co = [
|
|
3590
3620
|
"width",
|
|
3591
3621
|
"height",
|
|
3592
3622
|
"fill"
|
|
3593
|
-
],
|
|
3623
|
+
], wo = ["d"], To = /* @__PURE__ */ y({
|
|
3594
3624
|
__name: "SocialIconSvg",
|
|
3595
3625
|
props: {
|
|
3596
3626
|
platform: {},
|
|
@@ -3598,7 +3628,7 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3598
3628
|
iconSize: {}
|
|
3599
3629
|
},
|
|
3600
3630
|
setup(t) {
|
|
3601
|
-
let n = t, r = x(() =>
|
|
3631
|
+
let n = t, r = x(() => bo[n.platform]), i = x(() => xo[n.iconSize]), a = x(() => {
|
|
3602
3632
|
let e = {
|
|
3603
3633
|
display: "inline-flex",
|
|
3604
3634
|
alignItems: "center",
|
|
@@ -3642,25 +3672,25 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3642
3672
|
viewBox: "0 0 24 24",
|
|
3643
3673
|
fill: s.value,
|
|
3644
3674
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3645
|
-
}, [C("path", { d: r.value.path }, null, 8,
|
|
3675
|
+
}, [C("path", { d: r.value.path }, null, 8, wo)], 8, Co))], 4));
|
|
3646
3676
|
}
|
|
3647
|
-
}),
|
|
3677
|
+
}), Eo = { class: "tpl:w-full" }, Do = ["href"], Oo = {
|
|
3648
3678
|
key: 1,
|
|
3649
3679
|
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)]"
|
|
3650
|
-
},
|
|
3680
|
+
}, ko = /* @__PURE__ */ y({
|
|
3651
3681
|
__name: "SocialIconsBlock",
|
|
3652
3682
|
props: {
|
|
3653
3683
|
block: {},
|
|
3654
3684
|
viewport: {}
|
|
3655
3685
|
},
|
|
3656
3686
|
setup(t) {
|
|
3657
|
-
let n = t, { t: r } =
|
|
3687
|
+
let n = t, { t: r } = ut(), i = x(() => ({
|
|
3658
3688
|
display: "flex",
|
|
3659
3689
|
flexWrap: "wrap",
|
|
3660
3690
|
gap: `${n.block.spacing}px`,
|
|
3661
3691
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3662
3692
|
})), a = x(() => n.block.icons.length > 0);
|
|
3663
|
-
return (n, o) => (e(), w("div",
|
|
3693
|
+
return (n, o) => (e(), w("div", Eo, [a.value ? (e(), w("div", {
|
|
3664
3694
|
key: 0,
|
|
3665
3695
|
style: A(i.value)
|
|
3666
3696
|
}, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
|
|
@@ -3668,7 +3698,7 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3668
3698
|
href: n.url || "#",
|
|
3669
3699
|
class: "tpl:cursor-default",
|
|
3670
3700
|
onClick: o[0] ||= b(() => {}, ["prevent"])
|
|
3671
|
-
}, [N(
|
|
3701
|
+
}, [N(To, {
|
|
3672
3702
|
platform: n.platform,
|
|
3673
3703
|
"icon-style": t.block.iconStyle,
|
|
3674
3704
|
"icon-size": t.block.iconSize
|
|
@@ -3676,44 +3706,44 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3676
3706
|
"platform",
|
|
3677
3707
|
"icon-style",
|
|
3678
3708
|
"icon-size"
|
|
3679
|
-
])], 8,
|
|
3709
|
+
])], 8, Do))), 128))], 4)) : (e(), w("div", Oo, [N(j(un), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
|
|
3680
3710
|
}
|
|
3681
|
-
}),
|
|
3711
|
+
}), Ao = { class: "tpl:w-full" }, jo = {
|
|
3682
3712
|
key: 0,
|
|
3683
3713
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3684
3714
|
style: {
|
|
3685
3715
|
"background-color": "var(--tpl-bg-hover)",
|
|
3686
3716
|
color: "var(--tpl-text-dim)"
|
|
3687
3717
|
}
|
|
3688
|
-
},
|
|
3718
|
+
}, Mo = /* @__PURE__ */ y({
|
|
3689
3719
|
__name: "SpacerBlock",
|
|
3690
3720
|
props: {
|
|
3691
3721
|
block: {},
|
|
3692
3722
|
viewport: {}
|
|
3693
3723
|
},
|
|
3694
3724
|
setup(t) {
|
|
3695
|
-
let n = t, r =
|
|
3725
|
+
let n = t, r = Qe(rt, "SpacerBlock"), i = x(() => ({
|
|
3696
3726
|
height: `${n.block.height}px`,
|
|
3697
3727
|
minHeight: `${n.block.height}px`,
|
|
3698
3728
|
...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3699
3729
|
}));
|
|
3700
|
-
return (n, a) => (e(), w("div",
|
|
3730
|
+
return (n, a) => (e(), w("div", Ao, [C("div", {
|
|
3701
3731
|
style: A(i.value),
|
|
3702
3732
|
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
|
|
3703
|
-
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span",
|
|
3733
|
+
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span", jo, M(t.block.height) + "px ", 1))], 6)]));
|
|
3704
3734
|
}
|
|
3705
|
-
}),
|
|
3735
|
+
}), No = { class: "tpl:w-full" }, Po = { key: 0 }, Fo = [
|
|
3706
3736
|
"aria-label",
|
|
3707
3737
|
"data-placeholder",
|
|
3708
3738
|
"onBlur"
|
|
3709
|
-
],
|
|
3739
|
+
], Io = [
|
|
3710
3740
|
"aria-label",
|
|
3711
3741
|
"data-placeholder",
|
|
3712
3742
|
"onBlur"
|
|
3713
|
-
],
|
|
3743
|
+
], Lo = {
|
|
3714
3744
|
key: 1,
|
|
3715
3745
|
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)]"
|
|
3716
|
-
},
|
|
3746
|
+
}, Ro = /* @__PURE__ */ ht(/* @__PURE__ */ y({
|
|
3717
3747
|
__name: "TableBlock",
|
|
3718
3748
|
props: {
|
|
3719
3749
|
block: {},
|
|
@@ -3727,7 +3757,7 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3727
3757
|
updated(e, t) {
|
|
3728
3758
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3729
3759
|
}
|
|
3730
|
-
}, i = n, { t: a } =
|
|
3760
|
+
}, i = n, { t: a } = ut(), o = Qe(rt, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
|
|
3731
3761
|
width: "100%",
|
|
3732
3762
|
borderCollapse: "collapse",
|
|
3733
3763
|
fontSize: `${i.block.fontSize}px`,
|
|
@@ -3756,11 +3786,11 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3756
3786
|
} : n);
|
|
3757
3787
|
o.updateBlock(i.block.id, { rows: a });
|
|
3758
3788
|
}
|
|
3759
|
-
return (n, i) => (e(), w("div",
|
|
3789
|
+
return (n, i) => (e(), w("div", No, [s.value ? (e(), w("table", {
|
|
3760
3790
|
key: 0,
|
|
3761
3791
|
style: A(l.value),
|
|
3762
3792
|
class: "tpl-table-editable"
|
|
3763
|
-
}, [f.value ? (e(), w("thead",
|
|
3793
|
+
}, [f.value ? (e(), w("thead", Po, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
|
|
3764
3794
|
key: n.id,
|
|
3765
3795
|
style: A(d.value),
|
|
3766
3796
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3769,7 +3799,7 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3769
3799
|
onBlur: (e) => h(f.value.id, n.id, e),
|
|
3770
3800
|
onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3771
3801
|
onClick: b(m, ["stop"])
|
|
3772
|
-
}, null, 44,
|
|
3802
|
+
}, null, 44, Fo)), [[r, n.content]])), 128))])])) : O("", !0), C("tbody", null, [(e(!0), w(D, null, c(p.value, (n) => (e(), w("tr", { key: n.id }, [(e(!0), w(D, null, c(n.cells, (o) => t((e(), w("td", {
|
|
3773
3803
|
key: o.id,
|
|
3774
3804
|
style: A(u.value),
|
|
3775
3805
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3778,9 +3808,9 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3778
3808
|
onBlur: (e) => h(n.id, o.id, e),
|
|
3779
3809
|
onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3780
3810
|
onClick: b(m, ["stop"])
|
|
3781
|
-
}, null, 44,
|
|
3811
|
+
}, null, 44, Io)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", Lo, [N(j(dn), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
|
|
3782
3812
|
}
|
|
3783
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3813
|
+
}), [["__scopeId", "data-v-4f49860b"]]), zo = /* @__PURE__ */ y({
|
|
3784
3814
|
__name: "VideoPlayButton",
|
|
3785
3815
|
props: { hoverEffect: {
|
|
3786
3816
|
type: Boolean,
|
|
@@ -3798,7 +3828,7 @@ var mo = { class: "tpl:w-full" }, ho = { class: "tpl:flex tpl:gap-0" }, go = {
|
|
|
3798
3828
|
});
|
|
3799
3829
|
//#endregion
|
|
3800
3830
|
//#region src/utils/videoThumbnail.ts
|
|
3801
|
-
function
|
|
3831
|
+
function Bo(e) {
|
|
3802
3832
|
if (!e) return {
|
|
3803
3833
|
platform: "unknown",
|
|
3804
3834
|
videoId: null,
|
|
@@ -3830,25 +3860,25 @@ function Ro(e) {
|
|
|
3830
3860
|
thumbnailUrl: null
|
|
3831
3861
|
};
|
|
3832
3862
|
}
|
|
3833
|
-
function
|
|
3834
|
-
return t ||
|
|
3863
|
+
function Vo(e, t) {
|
|
3864
|
+
return t || Bo(e).thumbnailUrl;
|
|
3835
3865
|
}
|
|
3836
3866
|
//#endregion
|
|
3837
3867
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3838
|
-
var
|
|
3868
|
+
var Ho = ["src", "alt"], Uo = {
|
|
3839
3869
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3840
3870
|
style: { opacity: "0.7" }
|
|
3841
|
-
},
|
|
3871
|
+
}, Wo = ["href"], Go = ["src", "alt"], Ko = ["src", "alt"], qo = {
|
|
3842
3872
|
key: 3,
|
|
3843
3873
|
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)]"
|
|
3844
|
-
},
|
|
3874
|
+
}, Jo = /* @__PURE__ */ y({
|
|
3845
3875
|
__name: "VideoBlock",
|
|
3846
3876
|
props: {
|
|
3847
3877
|
block: {},
|
|
3848
3878
|
viewport: {}
|
|
3849
3879
|
},
|
|
3850
3880
|
setup(t) {
|
|
3851
|
-
let n = t, { t: r } =
|
|
3881
|
+
let n = t, { t: r } = ut(), { syntax: i } = gt(), a = x(() => pe(n.block.url, i) || pe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : Vo(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => {
|
|
3852
3882
|
let e = n.block.align;
|
|
3853
3883
|
return {
|
|
3854
3884
|
maxWidth: "100%",
|
|
@@ -3869,16 +3899,16 @@ var Bo = ["src", "alt"], Vo = {
|
|
|
3869
3899
|
class: "tpl:w-full tpl:border-0",
|
|
3870
3900
|
src: t.block.placeholderUrl,
|
|
3871
3901
|
alt: t.block.alt
|
|
3872
|
-
}, null, 8,
|
|
3902
|
+
}, null, 8, Ho), N(zo)], 4)) : a.value ? (e(), w("div", {
|
|
3873
3903
|
key: 1,
|
|
3874
3904
|
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)]",
|
|
3875
3905
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
3876
|
-
}, [N(j(
|
|
3906
|
+
}, [N(j(fn), {
|
|
3877
3907
|
size: 36,
|
|
3878
3908
|
"stroke-width": 1.5,
|
|
3879
3909
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3880
3910
|
style: { opacity: "0.5" }
|
|
3881
|
-
}), C("span",
|
|
3911
|
+
}), C("span", Uo, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
|
|
3882
3912
|
key: 0,
|
|
3883
3913
|
href: t.block.url,
|
|
3884
3914
|
target: "_blank",
|
|
@@ -3890,7 +3920,7 @@ var Bo = ["src", "alt"], Vo = {
|
|
|
3890
3920
|
class: "tpl:w-full tpl:border-0",
|
|
3891
3921
|
src: o.value,
|
|
3892
3922
|
alt: t.block.alt
|
|
3893
|
-
}, null, 8,
|
|
3923
|
+
}, null, 8, Go), N(zo, { "hover-effect": "" })], 12, Wo)) : (e(), w("div", {
|
|
3894
3924
|
key: 1,
|
|
3895
3925
|
class: "tpl:relative tpl:inline-block",
|
|
3896
3926
|
style: A(c.value)
|
|
@@ -3898,48 +3928,48 @@ var Bo = ["src", "alt"], Vo = {
|
|
|
3898
3928
|
class: "tpl:w-full tpl:border-0",
|
|
3899
3929
|
src: o.value,
|
|
3900
3930
|
alt: t.block.alt
|
|
3901
|
-
}, null, 8,
|
|
3931
|
+
}, null, 8, Ko), N(zo)], 4))], 64)) : (e(), w("div", qo, [N(j(fn), {
|
|
3902
3932
|
size: 40,
|
|
3903
3933
|
"stroke-width": 1.5,
|
|
3904
3934
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3905
3935
|
}), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
|
|
3906
3936
|
}
|
|
3907
|
-
}),
|
|
3908
|
-
section:
|
|
3909
|
-
title:
|
|
3910
|
-
paragraph:
|
|
3911
|
-
image:
|
|
3912
|
-
button:
|
|
3913
|
-
divider:
|
|
3914
|
-
video:
|
|
3915
|
-
social:
|
|
3916
|
-
menu:
|
|
3917
|
-
table:
|
|
3918
|
-
spacer:
|
|
3919
|
-
html:
|
|
3920
|
-
countdown: se(() => import("./CountdownBlock-
|
|
3937
|
+
}), Yo = {
|
|
3938
|
+
section: yo,
|
|
3939
|
+
title: kr,
|
|
3940
|
+
paragraph: fr,
|
|
3941
|
+
image: $n,
|
|
3942
|
+
button: Qt,
|
|
3943
|
+
divider: Ln,
|
|
3944
|
+
video: Jo,
|
|
3945
|
+
social: ko,
|
|
3946
|
+
menu: rr,
|
|
3947
|
+
table: Ro,
|
|
3948
|
+
spacer: Mo,
|
|
3949
|
+
html: Hn,
|
|
3950
|
+
countdown: se(() => import("./CountdownBlock-BTPefclD.js").then((e) => e.n))
|
|
3921
3951
|
};
|
|
3922
|
-
function
|
|
3923
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3952
|
+
function Xo(e) {
|
|
3953
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = ut(r);
|
|
3924
3954
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3925
|
-
let { resolvedTheme: c } =
|
|
3955
|
+
let { resolvedTheme: c } = zt(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = Vt({
|
|
3926
3956
|
themeOverrides: l,
|
|
3927
3957
|
resolvedTheme: c,
|
|
3928
3958
|
extraStyles: e.themeExtraStyles
|
|
3929
|
-
}), d =
|
|
3959
|
+
}), d = Ct({
|
|
3930
3960
|
content: t.content,
|
|
3931
3961
|
setContent: (e, n) => t.setContent(e, n),
|
|
3932
3962
|
...e.historyOptions
|
|
3933
3963
|
});
|
|
3934
|
-
|
|
3935
|
-
let f =
|
|
3964
|
+
kt(t, d);
|
|
3965
|
+
let f = Tt({
|
|
3936
3966
|
addBlock: t.addBlock,
|
|
3937
3967
|
removeBlock: t.removeBlock,
|
|
3938
3968
|
updateBlock: t.updateBlock,
|
|
3939
3969
|
selectBlock: t.selectBlock,
|
|
3940
3970
|
findBlockLocation: t.findBlockLocation,
|
|
3941
3971
|
blockDefaults: n.blockDefaults
|
|
3942
|
-
}), m =
|
|
3972
|
+
}), m = Dt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Et({
|
|
3943
3973
|
content: t.content,
|
|
3944
3974
|
isDirty: () => t.state.isDirty,
|
|
3945
3975
|
...e.autoSaveOptions
|
|
@@ -3947,15 +3977,15 @@ function Jo(e) {
|
|
|
3947
3977
|
g && (_ = s(d.isNavigating, (e) => {
|
|
3948
3978
|
e ? g.pause() : g.resume();
|
|
3949
3979
|
}));
|
|
3950
|
-
let v =
|
|
3980
|
+
let v = Rt(t, {
|
|
3951
3981
|
t: a,
|
|
3952
3982
|
format: o
|
|
3953
|
-
}), y =
|
|
3954
|
-
if (
|
|
3983
|
+
}), y = Gt();
|
|
3984
|
+
if (qt(y, Yo), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Fn);
|
|
3955
3985
|
function b(e) {
|
|
3956
|
-
for (let t of e) y.registerCustom(t,
|
|
3986
|
+
for (let t of e) y.registerCustom(t, Fn);
|
|
3957
3987
|
}
|
|
3958
|
-
let S =
|
|
3988
|
+
let S = Nt();
|
|
3959
3989
|
if (p() && re(S.dispose), e.containerEl) {
|
|
3960
3990
|
let t = e.containerEl;
|
|
3961
3991
|
Le(document, "pointerdown", (e) => {
|
|
@@ -3964,7 +3994,7 @@ function Jo(e) {
|
|
|
3964
3994
|
}, { capture: !0 });
|
|
3965
3995
|
}
|
|
3966
3996
|
function C(r) {
|
|
3967
|
-
S.isActive() &&
|
|
3997
|
+
S.isActive() && Yt(r, {
|
|
3968
3998
|
history: d,
|
|
3969
3999
|
selectBlock: (e) => t.selectBlock(e),
|
|
3970
4000
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3975,17 +4005,17 @@ function Jo(e) {
|
|
|
3975
4005
|
}
|
|
3976
4006
|
Le(document, "keydown", C);
|
|
3977
4007
|
let w = h(null);
|
|
3978
|
-
E(et, e.editorRoot ?? document), E(
|
|
4008
|
+
E(et, e.editorRoot ?? document), E(st, w), E($e, r), E(rt, t), E(Ye, d), E(Ze, f), E(at, m), E(Xe, i), E(He, u), E(ze, c), E(Ge, n.blockDefaults), E(nt, y), E(qe, n.customBlocks ?? []);
|
|
3979
4009
|
let T = be(n.mergeTags?.syntax);
|
|
3980
|
-
E(ot, n.mergeTags?.tags ?? []), E(
|
|
3981
|
-
let ee =
|
|
4010
|
+
E(ot, n.mergeTags?.tags ?? []), E(ct, T), E(Be, n.mergeTags?.onRequest ?? null), E(lt, n.mergeTags?.autocomplete !== !1), E(Ke, Pt()), E(Ue, n.onRequestMedia ?? null), E(Je, n.displayConditions?.conditions ?? []), E(tt, n.displayConditions?.allowCustom ?? !1), E(it, e.capabilities ?? {}), E(We, v);
|
|
4011
|
+
let ee = Ft(n.lint) ? null : It({
|
|
3982
4012
|
content: t.content,
|
|
3983
4013
|
options: n.lint ?? {},
|
|
3984
4014
|
updateBlock: t.updateBlock,
|
|
3985
4015
|
updateSettings: t.updateSettings,
|
|
3986
4016
|
removeBlock: t.removeBlock
|
|
3987
4017
|
});
|
|
3988
|
-
E(
|
|
4018
|
+
E(Ve, ee);
|
|
3989
4019
|
function D() {
|
|
3990
4020
|
_?.(), ee?.destroy(), g?.destroy(), d.destroy();
|
|
3991
4021
|
}
|
|
@@ -4008,4 +4038,4 @@ function Jo(e) {
|
|
|
4008
4038
|
};
|
|
4009
4039
|
}
|
|
4010
4040
|
//#endregion
|
|
4011
|
-
export {
|
|
4041
|
+
export { rn as A, yn as C, un as D, dn as E, Lt as F, Ot as I, yt as L, tn as M, Qt as N, cn as O, Wt as P, bn as S, hn as T, Hn as _, ko as a, En as b, yo as c, Dr as d, mr as f, $n as g, rr as h, Mo as i, nn as j, sn as k, mo as l, fr as m, Jo as n, bo as o, pr as p, Ro as r, So as s, Xo as t, kr as u, Ln as v, vn as w, wn as x, Fn as y };
|