@templatical/editor 0.16.3 → 0.16.5
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-EaPCeDXr.js → AiChatSidebar-CYAbVB2G.js} +7 -7
- package/dist/{AiFeatureMenu-CcGRd1xE.js → AiFeatureMenu-B1oEJebq.js} +4 -4
- package/dist/{BlockIssueBadge-CZYgn-qg.js → BlockIssueBadge-BLytBabN.js} +2 -2
- package/dist/{CloudEditor-CUIWUMp5.js → CloudEditor-D6KNL6VU.js} +15 -15
- package/dist/{CollaboratorBar-DmxqeBYZ.js → CollaboratorBar-C_EhXQ5R.js} +2 -2
- package/dist/{ColorPicker-Gs4BMVog.js → ColorPicker-CppJgX_T.js} +58 -59
- package/dist/{CommentsSidebar-DDKiFsSq.js → CommentsSidebar-C_XLBbo3.js} +8 -8
- package/dist/{CountdownToolbar-92w1YySJ.js → CountdownToolbar-D5GaA_lt.js} +53 -67
- package/dist/{DesignReferenceSidebar-D6TfC176.js → DesignReferenceSidebar-Bh9uAZ4B.js} +5 -5
- package/dist/{IssuesPanel-CQQipLQP.js → IssuesPanel-DltSuU6H.js} +5 -5
- package/dist/{MergeTagSuggestion-DrT3LiZ4.js → MergeTagSuggestion-jIpT_jmz.js} +7 -5
- package/dist/{ModuleBrowserModal-DsehjLvh.js → ModuleBrowserModal-CXy8Bbv9.js} +6 -6
- package/dist/{ModulePreviewCanvas-BBfuS8VW.js → ModulePreviewCanvas-CJC9kyZN.js} +1 -1
- package/dist/{NumberWithSuffix-BxSRfI8b.js → NumberWithSuffix-DNi-v4l1.js} +1 -1
- package/dist/{ParagraphEditor-vgvQxicC.js → ParagraphEditor-nk5Vvr7M.js} +57 -58
- package/dist/{RichTextEditorContent-Dza2oPvh.js → RichTextEditorContent-DBaCrvH0.js} +13 -13
- package/dist/{SaveModuleDialog-DNWGCHlS.js → SaveModuleDialog-CYu5PhBz.js} +24 -23
- package/dist/{SnapshotHistory-BLmnNLg1.js → SnapshotHistory-B38ImqMO.js} +6 -6
- package/dist/{TemplateScoringPanel-C8VOC6gn.js → TemplateScoringPanel-ZhObHWeb.js} +10 -10
- package/dist/{TestEmailModal-D6v1hgY2.js → TestEmailModal-DbstIzEf.js} +3 -3
- package/dist/{TitleEditor-DPdzOQpq.js → TitleEditor-CmfkOHJT.js} +18 -18
- package/dist/ToggleSwitch-DUNuUPsZ.js +37 -0
- package/dist/{TplModal-DObT0uxf.js → TplModal-BXnx3sLr.js} +4 -4
- package/dist/{blockTypeIcons-B9f5fH_5.js → blockTypeIcons-BVIEw0XJ.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-B3eR47lE.js → ca-DI1ViqMa.js} +2 -1
- package/dist/cdn/chunks/{AiFeatureMenu-CyUCHd9I.js → AiFeatureMenu-CuIg4yrB.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-CyUCHd9I.js.map → AiFeatureMenu-CuIg4yrB.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BAa_dI-c.js → BlockIssueBadge-BHEl_Hs7.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-BAa_dI-c.js.map → BlockIssueBadge-BHEl_Hs7.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-ClfgLU48.js → CloudEditor-1Ms0w691.js} +130 -130
- package/dist/cdn/chunks/{CloudEditor-ClfgLU48.js.map → CloudEditor-1Ms0w691.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DCc5SL0P.js → CollaboratorBar-C0a5P64z.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-DCc5SL0P.js.map → CollaboratorBar-C0a5P64z.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-Pi-1fR8c.js → ColorPicker-bsMmT-_B.js} +144 -144
- package/dist/cdn/chunks/ColorPicker-bsMmT-_B.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Bj7aoBUU.js → CountdownBlock-8053oz4k.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-Bj7aoBUU.js.map → CountdownBlock-8053oz4k.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-DQ_zrorh.js +198 -0
- package/dist/cdn/chunks/CountdownToolbar-DQ_zrorh.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-BXLVRo-c.js → IssuesPanel-CwQ376nf.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-BXLVRo-c.js.map → IssuesPanel-CwQ376nf.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-jesxS7An.js → MergeTagSuggestion-rpZ6Ol-i.js} +8 -6
- package/dist/cdn/chunks/MergeTagSuggestion-rpZ6Ol-i.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-C7BkJvzf.js → ModuleBrowserModal-DUegB2Jk.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-C7BkJvzf.js.map → ModuleBrowserModal-DUegB2Jk.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-BJn-ZHlC.js → ModulePreviewCanvas-f4h8r9Lh.js} +32 -32
- package/dist/cdn/chunks/{ModulePreviewCanvas-BJn-ZHlC.js.map → ModulePreviewCanvas-f4h8r9Lh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CkOxH3F7.js → NumberWithSuffix-Bu_nHJuD.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-CkOxH3F7.js.map → NumberWithSuffix-Bu_nHJuD.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-4cMKKC-V.js → ParagraphEditor-IpZsg8qo.js} +75 -75
- package/dist/cdn/chunks/ParagraphEditor-IpZsg8qo.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-7RZe4tbj.js → RichTextEditorContent-DDnqZ9cB.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-7RZe4tbj.js.map → RichTextEditorContent-DDnqZ9cB.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-mr9A4j6G.js → SaveModuleDialog-CVA5HPCi.js} +31 -30
- package/dist/cdn/chunks/SaveModuleDialog-CVA5HPCi.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-Cqw2jvuc.js → TitleEditor-DU8wm0Rh.js} +9 -9
- package/dist/cdn/chunks/TitleEditor-DU8wm0Rh.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +39 -0
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-B_xRBxSU.js → blockTypeIcons-Dm5Oosjp.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-B_xRBxSU.js.map → blockTypeIcons-Dm5Oosjp.js.map} +1 -1
- package/dist/cdn/chunks/{ca-B3eR47lE.js → ca-DI1ViqMa.js} +3 -2
- package/dist/cdn/chunks/ca-DI1ViqMa.js.map +1 -0
- package/dist/cdn/chunks/{de-Cy8FB-Ii.js → de-q9lTCMre.js} +3 -2
- package/dist/cdn/chunks/de-q9lTCMre.js.map +1 -0
- package/dist/cdn/chunks/{en-Bu-zS_5o.js → en-CR4LItrX.js} +3 -2
- package/dist/cdn/chunks/en-CR4LItrX.js.map +1 -0
- package/dist/cdn/chunks/{es-CD3ZD6hK.js → es-CEt-lrGd.js} +3 -2
- package/dist/cdn/chunks/es-CEt-lrGd.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Btyx_IMf.js → extensions-BGUoo2a5.js} +29 -29
- package/dist/cdn/chunks/{extensions-Btyx_IMf.js.map → extensions-BGUoo2a5.js.map} +1 -1
- package/dist/cdn/chunks/{features-Dwb5aTLg.js → features-BSpDuFFR.js} +145 -126
- package/dist/cdn/chunks/features-BSpDuFFR.js.map +1 -0
- package/dist/cdn/chunks/{icons-Dhqh5lYQ.js → icons-k3XVoRvc.js} +26 -26
- package/dist/cdn/chunks/{icons-Dhqh5lYQ.js.map → icons-k3XVoRvc.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-DRodsf2D.js → media-library-iDq3otm6.js} +451 -451
- package/dist/cdn/chunks/{media-library-DRodsf2D.js.map → media-library-iDq3otm6.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CgICL-CQ.js → pt-BR-DvBHY0AA.js} +3 -2
- package/dist/cdn/chunks/pt-BR-DvBHY0AA.js.map +1 -0
- package/dist/cdn/chunks/{quality-A_V2Iqu_.js → quality-Bb7vN32U.js} +512 -512
- package/dist/cdn/chunks/{quality-A_V2Iqu_.js.map → quality-Bb7vN32U.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BM_-zceB.js → renderer-cOvtk8HM.js} +20 -17
- package/dist/cdn/chunks/{renderer-BM_-zceB.js.map → renderer-cOvtk8HM.js.map} +1 -1
- package/dist/cdn/chunks/{src-DSomxPI-.js → src-Ddp969zE.js} +6 -6
- package/dist/cdn/chunks/{src-DSomxPI-.js.map → src-Ddp969zE.js.map} +1 -1
- package/dist/cdn/chunks/{styles--UXn88wH.js → styles-CW_gRVVR.js} +893 -891
- package/dist/cdn/chunks/styles-CW_gRVVR.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +51 -51
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-D1zYtCPK.js → check-Cg6Mc2pP.js} +1 -1
- package/dist/{chevron-down-ByXpufZD.js → chevron-down-dClfxKrJ.js} +1 -1
- package/dist/{circle-alert-CjcAORUw.js → circle-alert-Bhzm-fNA.js} +1 -1
- package/dist/{clock-5lWLadUn.js → clock-m7TwQw4b.js} +1 -1
- package/dist/{createLucideIcon-Bh9xOmlW.js → createLucideIcon-FSF4peHQ.js} +2 -2
- package/dist/{de-Cy8FB-Ii.js → de-q9lTCMre.js} +2 -1
- package/dist/{en-Bu-zS_5o.js → en-CR4LItrX.js} +2 -1
- package/dist/{es-CD3ZD6hK.js → es-CEt-lrGd.js} +2 -1
- package/dist/{extensions-B2poxDIo.js → extensions-Cjd-VAII.js} +1 -1
- package/dist/{image-up-Bj_nes3f.js → image-up-CDEgJqwA.js} +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/{info-BhSQCxBV.js → info-BNP8yGsK.js} +1 -1
- package/dist/{list-checks-CgxyUg7i.js → list-checks-jepi4iYr.js} +1 -1
- package/dist/{loader-circle-DFU0HPAa.js → loader-circle-BT38qSm3.js} +1 -1
- package/dist/{message-circle-BEBsCHnk.js → message-circle-BAHcL9S-.js} +1 -1
- package/dist/{pt-BR-CgICL-CQ.js → pt-BR-DvBHY0AA.js} +2 -1
- package/dist/{refresh-cw--lvWGy0_.js → refresh-cw-as5Bmg4X.js} +1 -1
- package/dist/{scan-line-QgyDIgn_.js → scan-line-IAMjPtRw.js} +1 -1
- package/dist/{send-BMyisUim.js → send-DvMay6bt.js} +1 -1
- package/dist/{shield-check-C49M20le.js → shield-check-YYDhGroE.js} +1 -1
- package/dist/{sparkles-DV7Dman6.js → sparkles-CCwQMMMZ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-CPt6RYEc.js → styles-DJfTblY7.js} +764 -762
- package/dist/templatical-editor.js +9 -9
- package/dist/{text-align-start-BMU70uAm.js → text-align-start-BwsA6QzC.js} +11 -11
- package/dist/{trash-2-B6M659Ey.js → trash-2-CRBDolnR.js} +1 -1
- package/dist/{triangle-alert-D1lzx6ds.js → triangle-alert-B2g0ALvq.js} +1 -1
- package/dist/{upload-3A1oZtOR.js → upload-BKg6hDRW.js} +1 -1
- package/dist/{useEditorCore-CSfeEwCj.js → useEditorCore-DnOG2a_b.js} +656 -656
- package/dist/usePopoverPosition-B3Byo68F.js +281 -0
- package/dist/{x-CG_NV3nP.js → x-Ctg_250T.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/ColorPicker-Pi-1fR8c.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-B1oniVq1.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-B1oniVq1.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-jesxS7An.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-4cMKKC-V.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-mr9A4j6G.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-Cqw2jvuc.js.map +0 -1
- package/dist/cdn/chunks/ca-B3eR47lE.js.map +0 -1
- package/dist/cdn/chunks/de-Cy8FB-Ii.js.map +0 -1
- package/dist/cdn/chunks/en-Bu-zS_5o.js.map +0 -1
- package/dist/cdn/chunks/es-CD3ZD6hK.js.map +0 -1
- package/dist/cdn/chunks/features-Dwb5aTLg.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CgICL-CQ.js.map +0 -1
- package/dist/cdn/chunks/styles--UXn88wH.js.map +0 -1
- package/dist/color-DhoxCSMv.js +0 -259
- package/dist/usePopoverRoot-C1j0D7cc.js +0 -8
|
@@ -2,25 +2,25 @@ import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as
|
|
|
2
2
|
import { c as P, o as se, s as ce } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
3
|
import { A as le, C as ue, D as de, M as fe, N as pe, O as me, P as he, S as ge, T as _e, _ as ve, b as ye, c as be, d as xe, f as Se, g as Ce, h as we, j as Te, k as Ee, l as De, m as Oe, n as ke, o as Ae, p as je, r as Me, s as Ne, t as Pe, u as Fe, v as Ie, w as Le, x as Re, y as ze } from "./dist-DoRIUsfz.js";
|
|
4
4
|
import { f as Be, g as Ve, h as He, m as Ue } from "./dist-DYv_Pttj.js";
|
|
5
|
-
import { a as We,
|
|
6
|
-
import { A as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as F } from "./createLucideIcon-
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
5
|
+
import { a as We, c as Ge, o as Ke, r as qe, s as Je, t as Ye } from "./usePopoverPosition-B3Byo68F.js";
|
|
6
|
+
import { A as Xe, C as Ze, D as Qe, E as $e, F as et, I as tt, L as nt, N as rt, O as it, P as at, S as ot, T as st, _ as ct, a as lt, b as ut, d as dt, f as ft, g as pt, h as mt, i as ht, k as gt, m as _t, n as vt, o as yt, p as bt, s as xt, u as St, v as Ct, w as wt, x as Tt, y as Et } from "./keys-BbDgCU6K.js";
|
|
7
|
+
import { t as Dt } from "./useI18n-eR1yVW0v.js";
|
|
8
|
+
import { t as F } from "./createLucideIcon-FSF4peHQ.js";
|
|
9
|
+
import { t as Ot } from "./loader-circle-BT38qSm3.js";
|
|
10
|
+
import { t as kt } from "./message-circle-BAHcL9S-.js";
|
|
11
|
+
import { t as At } from "./trash-2-CRBDolnR.js";
|
|
12
|
+
import { t as jt } from "./triangle-alert-B2g0ALvq.js";
|
|
13
|
+
import { t as Mt } from "./upload-BKg6hDRW.js";
|
|
14
|
+
import { t as Nt } from "./LoadingTrack-KIcREPlS.js";
|
|
15
|
+
import { t as Pt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
16
|
import "./useCloudI18n-WbfVWq5k.js";
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
17
|
+
import { t as Ft } from "./useMergeTag-C3GfSktg.js";
|
|
18
|
+
import { t as It } from "./useAliveFlag-C43EhZFY.js";
|
|
19
19
|
//#region ../core/dist/index.js
|
|
20
|
-
function
|
|
20
|
+
function Lt(e) {
|
|
21
21
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Rt(e) {
|
|
24
24
|
let t = ee({
|
|
25
25
|
content: e.content ?? xe(e.defaultFontFamily, e.templateDefaults),
|
|
26
26
|
selectedBlockId: null,
|
|
@@ -111,7 +111,7 @@ function Lt(e) {
|
|
|
111
111
|
if (c(n)) return;
|
|
112
112
|
let o = a(t.content.blocks, n);
|
|
113
113
|
if (o && o.type === "section") {
|
|
114
|
-
if (r < 0 || r >=
|
|
114
|
+
if (r < 0 || r >= Lt(o.columns)) return;
|
|
115
115
|
o.children[r] = o.children[r] || [];
|
|
116
116
|
let t = o.children[r];
|
|
117
117
|
i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
|
|
@@ -144,7 +144,7 @@ function Lt(e) {
|
|
|
144
144
|
let u;
|
|
145
145
|
if (r) {
|
|
146
146
|
let e = a(t.content.blocks, r);
|
|
147
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
147
|
+
if (!e || e.type !== "section" || i < 0 || i >= Lt(e.columns)) return;
|
|
148
148
|
e.children[i] = e.children[i] || [], u = e.children[i];
|
|
149
149
|
} else u = t.content.blocks;
|
|
150
150
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -173,9 +173,9 @@ function Lt(e) {
|
|
|
173
173
|
findBlockLocation: u
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
function
|
|
178
|
-
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a =
|
|
176
|
+
var zt = 50, Bt = 300, Vt = 1500;
|
|
177
|
+
function Ht(e) {
|
|
178
|
+
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = zt } = e, o = _([]), s = _([]), c = _(!1), l = null, u = null, d = n(() => o.value.length > 0), f = n(() => s.value.length > 0);
|
|
179
179
|
function p() {
|
|
180
180
|
return he(t.value);
|
|
181
181
|
}
|
|
@@ -193,21 +193,21 @@ function Vt(e) {
|
|
|
193
193
|
if (u && u.blockId === e) {
|
|
194
194
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
195
195
|
u = null;
|
|
196
|
-
},
|
|
196
|
+
}, Bt);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
199
|
h(), m(p()), s.value = [], u = {
|
|
200
200
|
blockId: e,
|
|
201
201
|
timeoutId: setTimeout(() => {
|
|
202
202
|
u = null;
|
|
203
|
-
},
|
|
203
|
+
}, Bt)
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
function y() {
|
|
208
208
|
c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
209
209
|
c.value = !1, l = null;
|
|
210
|
-
},
|
|
210
|
+
}, Vt);
|
|
211
211
|
}
|
|
212
212
|
function b() {
|
|
213
213
|
if (o.value.length === 0) return;
|
|
@@ -239,7 +239,7 @@ function Vt(e) {
|
|
|
239
239
|
destroy: C
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Ut(e) {
|
|
243
243
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
244
244
|
...e,
|
|
245
245
|
id: ue(),
|
|
@@ -255,7 +255,7 @@ function Ht(e) {
|
|
|
255
255
|
id: ue()
|
|
256
256
|
})));
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Wt(e) {
|
|
259
259
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
260
260
|
function o(n, r, a) {
|
|
261
261
|
let o = Ne(n, e.blockDefaults);
|
|
@@ -263,9 +263,9 @@ function Ut(e) {
|
|
|
263
263
|
}
|
|
264
264
|
function s(e, n, r) {
|
|
265
265
|
let o = JSON.parse(JSON.stringify(e));
|
|
266
|
-
if (o.id = ue(),
|
|
266
|
+
if (o.id = ue(), Ut(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
267
267
|
let t = JSON.parse(JSON.stringify(e));
|
|
268
|
-
return t.id = ue(),
|
|
268
|
+
return t.id = ue(), Ut(t), t;
|
|
269
269
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
270
270
|
else {
|
|
271
271
|
let i = a?.(e.id) ?? null;
|
|
@@ -286,7 +286,7 @@ function Ut(e) {
|
|
|
286
286
|
updateBlockProperty: l
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Gt(e) {
|
|
290
290
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
291
291
|
function c() {
|
|
292
292
|
return typeof a == "function" ? a() : a;
|
|
@@ -322,7 +322,7 @@ function Wt(e) {
|
|
|
322
322
|
destroy: h
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Kt(e) {
|
|
326
326
|
let t = ee(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
|
|
327
327
|
function i(e) {
|
|
328
328
|
return t.has(e);
|
|
@@ -340,7 +340,7 @@ function Gt(e) {
|
|
|
340
340
|
hasHiddenBlocks: r
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function qt(e) {
|
|
344
344
|
let t = _(!1), r = _(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
|
|
345
345
|
async function o() {
|
|
346
346
|
let n = e.definition.value;
|
|
@@ -370,7 +370,7 @@ function Kt(e) {
|
|
|
370
370
|
needsFetch: a
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Jt(e, t) {
|
|
374
374
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
375
375
|
e.addBlock = (r, i, a, o) => {
|
|
376
376
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -386,26 +386,26 @@ function qt(e, t) {
|
|
|
386
386
|
}
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/utils/activeEditorTracker.ts
|
|
389
|
-
var
|
|
390
|
-
function
|
|
391
|
-
let e = ++
|
|
392
|
-
return
|
|
389
|
+
var Yt = /* @__PURE__ */ new Set(), Xt = 0, Zt = 0;
|
|
390
|
+
function Qt() {
|
|
391
|
+
let e = ++Zt;
|
|
392
|
+
return Yt.add(e), Xt === 0 && (Xt = e), {
|
|
393
393
|
id: e,
|
|
394
|
-
isActive: () =>
|
|
394
|
+
isActive: () => Yt.size <= 1 || Xt === e,
|
|
395
395
|
claim: () => {
|
|
396
|
-
|
|
396
|
+
Xt = e;
|
|
397
397
|
},
|
|
398
398
|
dispose: () => {
|
|
399
|
-
if (
|
|
400
|
-
let e = Array.from(
|
|
401
|
-
|
|
399
|
+
if (Yt.delete(e), Xt === e) {
|
|
400
|
+
let e = Array.from(Yt);
|
|
401
|
+
Xt = e[e.length - 1] ?? 0;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
406
|
//#endregion
|
|
407
407
|
//#region src/composables/useMergeTagPicker.ts
|
|
408
|
-
function
|
|
408
|
+
function $t() {
|
|
409
409
|
let e = _(!1), t = _([]), n = null;
|
|
410
410
|
function r(r) {
|
|
411
411
|
if (n) {
|
|
@@ -435,7 +435,7 @@ function Qt() {
|
|
|
435
435
|
}
|
|
436
436
|
//#endregion
|
|
437
437
|
//#region src/composables/useLogicTagPicker.ts
|
|
438
|
-
function
|
|
438
|
+
function en() {
|
|
439
439
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
440
440
|
function i(i, a) {
|
|
441
441
|
if (r) {
|
|
@@ -466,11 +466,11 @@ function $t() {
|
|
|
466
466
|
}
|
|
467
467
|
//#endregion
|
|
468
468
|
//#region src/composables/useTemplateLint.ts
|
|
469
|
-
function
|
|
469
|
+
function tn(e) {
|
|
470
470
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
let t = _([]), n = _(!1), r = _(!1), i = v(null), a =
|
|
472
|
+
function nn(e) {
|
|
473
|
+
let t = _([]), n = _(!1), r = _(!1), i = v(null), a = tn(e.options), o = null, s = !1;
|
|
474
474
|
a || l();
|
|
475
475
|
async function l() {
|
|
476
476
|
try {
|
|
@@ -511,12 +511,12 @@ function tn(e) {
|
|
|
511
511
|
}
|
|
512
512
|
//#endregion
|
|
513
513
|
//#region src/utils/blockTypeLabels.ts
|
|
514
|
-
function
|
|
514
|
+
function rn(e, t) {
|
|
515
515
|
return t.blocks[e] ?? e;
|
|
516
516
|
}
|
|
517
517
|
//#endregion
|
|
518
518
|
//#region src/composables/useKeyboardReorder.ts
|
|
519
|
-
function
|
|
519
|
+
function an(e, t) {
|
|
520
520
|
let n = _(null), r = _(""), i = null;
|
|
521
521
|
function a(t) {
|
|
522
522
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -543,7 +543,7 @@ function rn(e, t) {
|
|
|
543
543
|
let r = a(n);
|
|
544
544
|
if (!r) return "";
|
|
545
545
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
546
|
-
return i ?
|
|
546
|
+
return i ? rn(i.type, t.t) : "";
|
|
547
547
|
}
|
|
548
548
|
function s(t, n) {
|
|
549
549
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -612,13 +612,13 @@ function rn(e, t) {
|
|
|
612
612
|
}
|
|
613
613
|
//#endregion
|
|
614
614
|
//#region src/composables/useUiTheme.ts
|
|
615
|
-
function
|
|
616
|
-
let t =
|
|
615
|
+
function on(e) {
|
|
616
|
+
let t = Ge("(prefers-color-scheme: dark)");
|
|
617
617
|
return { resolvedTheme: j(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
618
618
|
}
|
|
619
619
|
//#endregion
|
|
620
620
|
//#region src/composables/useThemeStyles.ts
|
|
621
|
-
var
|
|
621
|
+
var sn = {
|
|
622
622
|
bg: "--tpl-bg",
|
|
623
623
|
bgElevated: "--tpl-bg-elevated",
|
|
624
624
|
bgHover: "--tpl-bg-hover",
|
|
@@ -642,10 +642,10 @@ var on = {
|
|
|
642
642
|
dangerLight: "--tpl-danger-light",
|
|
643
643
|
canvasBg: "--tpl-canvas-bg"
|
|
644
644
|
};
|
|
645
|
-
function
|
|
645
|
+
function cn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
646
646
|
return { themeStyles: j(() => {
|
|
647
647
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
648
|
-
if (a) for (let [e, t] of Object.entries(
|
|
648
|
+
if (a) for (let [e, t] of Object.entries(sn)) {
|
|
649
649
|
let n = a[e];
|
|
650
650
|
n && (r[t] = n);
|
|
651
651
|
}
|
|
@@ -654,27 +654,27 @@ function sn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
654
654
|
}
|
|
655
655
|
//#endregion
|
|
656
656
|
//#region src/utils/logger.ts
|
|
657
|
-
var
|
|
658
|
-
function
|
|
657
|
+
var ln = "[Templatical]";
|
|
658
|
+
function un() {
|
|
659
659
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
660
660
|
}
|
|
661
|
-
var
|
|
661
|
+
var dn = {
|
|
662
662
|
warn(...e) {
|
|
663
|
-
console.warn(
|
|
663
|
+
console.warn(ln, ...e);
|
|
664
664
|
},
|
|
665
665
|
error(...e) {
|
|
666
|
-
console.error(
|
|
666
|
+
console.error(ln, ...e);
|
|
667
667
|
},
|
|
668
668
|
debug(...e) {
|
|
669
|
-
|
|
669
|
+
un() || console.debug(ln, ...e);
|
|
670
670
|
},
|
|
671
671
|
info(...e) {
|
|
672
|
-
|
|
672
|
+
un() || console.info(ln, ...e);
|
|
673
673
|
}
|
|
674
674
|
};
|
|
675
675
|
//#endregion
|
|
676
676
|
//#region src/composables/useBlockRegistry.ts
|
|
677
|
-
function
|
|
677
|
+
function fn() {
|
|
678
678
|
let e = v(/* @__PURE__ */ new Map());
|
|
679
679
|
function t(t, n) {
|
|
680
680
|
e.value.set(t, n), ne(e);
|
|
@@ -714,7 +714,7 @@ function dn() {
|
|
|
714
714
|
strictFilters: !1
|
|
715
715
|
}).parseAndRender(t.template, e.fieldValues);
|
|
716
716
|
} catch (t) {
|
|
717
|
-
return
|
|
717
|
+
return dn.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
function c(t) {
|
|
@@ -732,9 +732,9 @@ function dn() {
|
|
|
732
732
|
}
|
|
733
733
|
//#endregion
|
|
734
734
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
735
|
-
function
|
|
735
|
+
function pn(e, t) {
|
|
736
736
|
return j(() => {
|
|
737
|
-
let n =
|
|
737
|
+
let n = mn(e.value.blocks);
|
|
738
738
|
if (n.size === 0) return [];
|
|
739
739
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
740
740
|
for (let e of n) {
|
|
@@ -746,11 +746,11 @@ function fn(e, t) {
|
|
|
746
746
|
return i;
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function mn(e) {
|
|
750
750
|
let t = /* @__PURE__ */ new Set();
|
|
751
|
-
return
|
|
751
|
+
return hn(e, t), t;
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function hn(e, t) {
|
|
754
754
|
for (let n of e) {
|
|
755
755
|
if (me(n)) {
|
|
756
756
|
t.add(n.customType);
|
|
@@ -759,13 +759,13 @@ function mn(e, t) {
|
|
|
759
759
|
if (n.type === "section") {
|
|
760
760
|
let e = n.children;
|
|
761
761
|
if (!e) continue;
|
|
762
|
-
for (let n of e)
|
|
762
|
+
for (let n of e) hn(n, t);
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
766
|
//#endregion
|
|
767
767
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
768
|
-
var
|
|
768
|
+
var gn = [
|
|
769
769
|
{
|
|
770
770
|
type: "section",
|
|
771
771
|
createBlock: ve
|
|
@@ -819,8 +819,8 @@ var hn = [
|
|
|
819
819
|
createBlock: De
|
|
820
820
|
}
|
|
821
821
|
];
|
|
822
|
-
function
|
|
823
|
-
for (let n of
|
|
822
|
+
function _n(e, t) {
|
|
823
|
+
for (let n of gn) {
|
|
824
824
|
let r = t[n.type];
|
|
825
825
|
r && e.registerBuiltIn(n.type, {
|
|
826
826
|
component: r,
|
|
@@ -830,7 +830,7 @@ function gn(e, t) {
|
|
|
830
830
|
}
|
|
831
831
|
//#endregion
|
|
832
832
|
//#region src/utils/keyboardShortcuts.ts
|
|
833
|
-
function
|
|
833
|
+
function vn(e) {
|
|
834
834
|
for (let t of e.composedPath()) {
|
|
835
835
|
if (!(t instanceof HTMLElement)) continue;
|
|
836
836
|
if (t.isContentEditable) return !0;
|
|
@@ -839,14 +839,14 @@ function _n(e) {
|
|
|
839
839
|
}
|
|
840
840
|
return !1;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function yn(e, t) {
|
|
843
843
|
let n = e.metaKey || e.ctrlKey;
|
|
844
844
|
if (n && e.key.toLowerCase() === "s") {
|
|
845
845
|
e.preventDefault(), t.onSave?.();
|
|
846
846
|
return;
|
|
847
847
|
}
|
|
848
848
|
if (n && e.key.toLowerCase() === "z") {
|
|
849
|
-
if (
|
|
849
|
+
if (vn(e)) return;
|
|
850
850
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
851
851
|
return;
|
|
852
852
|
}
|
|
@@ -854,11 +854,11 @@ function vn(e, t) {
|
|
|
854
854
|
t.selectBlock(null);
|
|
855
855
|
return;
|
|
856
856
|
}
|
|
857
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
857
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !vn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
858
858
|
}
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
861
|
-
function
|
|
861
|
+
function bn(e, t, n) {
|
|
862
862
|
if (!e) return [];
|
|
863
863
|
let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
|
|
864
864
|
for (; (o = r.exec(e)) !== null;) {
|
|
@@ -885,20 +885,20 @@ function yn(e, t, n) {
|
|
|
885
885
|
}
|
|
886
886
|
//#endregion
|
|
887
887
|
//#region src/components/MergeTagPreviewText.vue
|
|
888
|
-
var
|
|
888
|
+
var xn = y({
|
|
889
889
|
name: "MergeTagPreviewText",
|
|
890
890
|
props: { text: {
|
|
891
891
|
type: String,
|
|
892
892
|
required: !0
|
|
893
893
|
} },
|
|
894
894
|
setup(e) {
|
|
895
|
-
let t = N(
|
|
895
|
+
let t = N(ot, []), n = N(st, Me.liquid), r = j(() => bn(e.text, t, n));
|
|
896
896
|
return () => r.value.map((e, t) => e.type === "tag" ? ae("span", {
|
|
897
897
|
key: t,
|
|
898
898
|
class: "tpl-merge-tag-label"
|
|
899
899
|
}, e.value) : e.value);
|
|
900
900
|
}
|
|
901
|
-
}),
|
|
901
|
+
}), Sn = { class: "tpl:text-center" }, Cn = ["href"], wn = /* @__PURE__ */ y({
|
|
902
902
|
__name: "ButtonBlock",
|
|
903
903
|
props: {
|
|
904
904
|
block: {},
|
|
@@ -919,17 +919,17 @@ var bn = y({
|
|
|
919
919
|
};
|
|
920
920
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
921
921
|
});
|
|
922
|
-
return (t, r) => (f(), x("div",
|
|
922
|
+
return (t, r) => (f(), x("div", Sn, [b("a", {
|
|
923
923
|
href: e.block.url || "#",
|
|
924
924
|
style: i(n.value),
|
|
925
925
|
class: "tpl:cursor-default",
|
|
926
926
|
onClick: r[0] ||= P(() => {}, ["prevent"])
|
|
927
|
-
}, [w(
|
|
927
|
+
}, [w(xn, { text: e.block.text }, null, 8, ["text"])], 12, Cn)]));
|
|
928
928
|
}
|
|
929
|
-
}),
|
|
929
|
+
}), Tn = F("bookmark", [["path", {
|
|
930
930
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
931
931
|
key: "oz39mx"
|
|
932
|
-
}]]),
|
|
932
|
+
}]]), En = F("box", [
|
|
933
933
|
["path", {
|
|
934
934
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
935
935
|
key: "hh9hay"
|
|
@@ -942,13 +942,13 @@ var bn = y({
|
|
|
942
942
|
d: "M12 22V12",
|
|
943
943
|
key: "d0xqtd"
|
|
944
944
|
}]
|
|
945
|
-
]),
|
|
945
|
+
]), Dn = F("code", [["path", {
|
|
946
946
|
d: "m16 18 6-6-6-6",
|
|
947
947
|
key: "eg8j8"
|
|
948
948
|
}], ["path", {
|
|
949
949
|
d: "m8 6-6 6 6 6",
|
|
950
950
|
key: "ppft3o"
|
|
951
|
-
}]]),
|
|
951
|
+
}]]), On = F("copy", [["rect", {
|
|
952
952
|
width: "14",
|
|
953
953
|
height: "14",
|
|
954
954
|
x: "8",
|
|
@@ -959,7 +959,7 @@ var bn = y({
|
|
|
959
959
|
}], ["path", {
|
|
960
960
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
961
961
|
key: "zix9uf"
|
|
962
|
-
}]]),
|
|
962
|
+
}]]), kn = F("eye-off", [
|
|
963
963
|
["path", {
|
|
964
964
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
965
965
|
key: "ct8e1f"
|
|
@@ -976,10 +976,10 @@ var bn = y({
|
|
|
976
976
|
d: "m2 2 20 20",
|
|
977
977
|
key: "1ooewy"
|
|
978
978
|
}]
|
|
979
|
-
]),
|
|
979
|
+
]), An = F("funnel", [["path", {
|
|
980
980
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
981
981
|
key: "sc7q7i"
|
|
982
|
-
}]]),
|
|
982
|
+
}]]), jn = F("grip-vertical", [
|
|
983
983
|
["circle", {
|
|
984
984
|
cx: "9",
|
|
985
985
|
cy: "12",
|
|
@@ -1016,7 +1016,7 @@ var bn = y({
|
|
|
1016
1016
|
r: "1",
|
|
1017
1017
|
key: "f4zoj3"
|
|
1018
1018
|
}]
|
|
1019
|
-
]),
|
|
1019
|
+
]), Mn = F("image", [
|
|
1020
1020
|
["rect", {
|
|
1021
1021
|
width: "18",
|
|
1022
1022
|
height: "18",
|
|
@@ -1036,13 +1036,13 @@ var bn = y({
|
|
|
1036
1036
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1037
1037
|
key: "1xmnt7"
|
|
1038
1038
|
}]
|
|
1039
|
-
]),
|
|
1039
|
+
]), Nn = F("navigation", [["polygon", {
|
|
1040
1040
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1041
1041
|
key: "1ltx0t"
|
|
1042
|
-
}]]),
|
|
1042
|
+
}]]), Pn = F("puzzle", [["path", {
|
|
1043
1043
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
1044
1044
|
key: "w46dr5"
|
|
1045
|
-
}]]),
|
|
1045
|
+
}]]), Fn = F("share-2", [
|
|
1046
1046
|
["circle", {
|
|
1047
1047
|
cx: "18",
|
|
1048
1048
|
cy: "5",
|
|
@@ -1075,7 +1075,7 @@ var bn = y({
|
|
|
1075
1075
|
y2: "10.49",
|
|
1076
1076
|
key: "1n3mei"
|
|
1077
1077
|
}]
|
|
1078
|
-
]),
|
|
1078
|
+
]), In = F("table", [
|
|
1079
1079
|
["path", {
|
|
1080
1080
|
d: "M12 3v18",
|
|
1081
1081
|
key: "108xh3"
|
|
@@ -1096,7 +1096,7 @@ var bn = y({
|
|
|
1096
1096
|
d: "M3 15h18",
|
|
1097
1097
|
key: "5xshup"
|
|
1098
1098
|
}]
|
|
1099
|
-
]),
|
|
1099
|
+
]), Ln = F("video", [["path", {
|
|
1100
1100
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1101
1101
|
key: "ftymec"
|
|
1102
1102
|
}], ["rect", {
|
|
@@ -1106,11 +1106,11 @@ var bn = y({
|
|
|
1106
1106
|
height: "12",
|
|
1107
1107
|
rx: "2",
|
|
1108
1108
|
key: "158x01"
|
|
1109
|
-
}]]),
|
|
1109
|
+
}]]), Rn = ["innerHTML"], zn = [
|
|
1110
1110
|
"src",
|
|
1111
1111
|
"width",
|
|
1112
1112
|
"height"
|
|
1113
|
-
],
|
|
1113
|
+
], Bn = /* @__PURE__ */ y({
|
|
1114
1114
|
__name: "CustomBlockIcon",
|
|
1115
1115
|
props: {
|
|
1116
1116
|
icon: {},
|
|
@@ -1126,14 +1126,14 @@ var bn = y({
|
|
|
1126
1126
|
height: `${n.value}px`
|
|
1127
1127
|
}),
|
|
1128
1128
|
innerHTML: e.icon
|
|
1129
|
-
}, null, 12,
|
|
1129
|
+
}, null, 12, Rn)) : a.value ? (f(), x("img", {
|
|
1130
1130
|
key: 1,
|
|
1131
1131
|
src: e.icon,
|
|
1132
1132
|
width: n.value,
|
|
1133
1133
|
height: n.value,
|
|
1134
1134
|
class: "tpl:inline-block",
|
|
1135
1135
|
alt: ""
|
|
1136
|
-
}, null, 8,
|
|
1136
|
+
}, null, 8, zn)) : (f(), D(k(En), {
|
|
1137
1137
|
key: 2,
|
|
1138
1138
|
size: n.value,
|
|
1139
1139
|
"stroke-width": 1.5
|
|
@@ -1142,16 +1142,16 @@ var bn = y({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
//#endregion
|
|
1144
1144
|
//#region src/composables/useEditorRoot.ts
|
|
1145
|
-
function
|
|
1146
|
-
return N(
|
|
1145
|
+
function Vn() {
|
|
1146
|
+
return N(mt, document) ?? document;
|
|
1147
1147
|
}
|
|
1148
1148
|
//#endregion
|
|
1149
1149
|
//#region src/composables/useFocusTrap.ts
|
|
1150
|
-
var
|
|
1151
|
-
function
|
|
1152
|
-
let n =
|
|
1150
|
+
var Hn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1151
|
+
function Un(e, t) {
|
|
1152
|
+
let n = Vn(), r = null, i = null, a = null;
|
|
1153
1153
|
function o() {
|
|
1154
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1154
|
+
return e.value ? Array.from(e.value.querySelectorAll(Hn)).filter((e) => e.offsetParent !== null) : [];
|
|
1155
1155
|
}
|
|
1156
1156
|
function s(e) {
|
|
1157
1157
|
if (e.key !== "Tab") return;
|
|
@@ -1166,7 +1166,7 @@ function Hn(e, t) {
|
|
|
1166
1166
|
a = null;
|
|
1167
1167
|
let t = o();
|
|
1168
1168
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1169
|
-
}), i =
|
|
1169
|
+
}), i = Je(e, "keydown", s);
|
|
1170
1170
|
}
|
|
1171
1171
|
function d(e = {}) {
|
|
1172
1172
|
let t = e.restoreFocus !== !1;
|
|
@@ -1181,7 +1181,7 @@ function Hn(e, t) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
//#endregion
|
|
1183
1183
|
//#region src/composables/useEmoji.ts
|
|
1184
|
-
function
|
|
1184
|
+
function Wn() {
|
|
1185
1185
|
let [e, t] = He(!1), n = v([]), r = !1;
|
|
1186
1186
|
u(() => {
|
|
1187
1187
|
r = !0;
|
|
@@ -1207,7 +1207,7 @@ function Un() {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
//#endregion
|
|
1209
1209
|
//#region src/composables/useDragDrop.ts
|
|
1210
|
-
function
|
|
1210
|
+
function Gn(e) {
|
|
1211
1211
|
let { onBlockMove: t, onBlockAdd: n } = e, r = _(!1), i = _(null), a = _(null);
|
|
1212
1212
|
function o(e) {
|
|
1213
1213
|
r.value = !0, i.value = e;
|
|
@@ -1257,7 +1257,7 @@ function Wn(e) {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
//#endregion
|
|
1259
1259
|
//#region src/composables/useFonts.ts
|
|
1260
|
-
var
|
|
1260
|
+
var Kn = [
|
|
1261
1261
|
{
|
|
1262
1262
|
value: "Arial",
|
|
1263
1263
|
label: "Arial"
|
|
@@ -1286,7 +1286,7 @@ var Gn = [
|
|
|
1286
1286
|
value: "Courier New",
|
|
1287
1287
|
label: "Courier New"
|
|
1288
1288
|
}
|
|
1289
|
-
],
|
|
1289
|
+
], qn = {
|
|
1290
1290
|
arial: "Arial, sans-serif",
|
|
1291
1291
|
helvetica: "Helvetica, sans-serif",
|
|
1292
1292
|
georgia: "Georgia, serif",
|
|
@@ -1294,14 +1294,14 @@ var Gn = [
|
|
|
1294
1294
|
verdana: "Verdana, sans-serif",
|
|
1295
1295
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1296
1296
|
"courier new": "'Courier New', monospace"
|
|
1297
|
-
},
|
|
1298
|
-
function
|
|
1299
|
-
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = j(() => e?.defaultFallback ??
|
|
1297
|
+
}, Jn = "Arial, sans-serif";
|
|
1298
|
+
function Yn(e) {
|
|
1299
|
+
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = j(() => e?.defaultFallback ?? Jn);
|
|
1300
1300
|
function a(e) {
|
|
1301
1301
|
n.value = e;
|
|
1302
1302
|
}
|
|
1303
1303
|
let o = j(() => {
|
|
1304
|
-
let e = [...
|
|
1304
|
+
let e = [...Kn];
|
|
1305
1305
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1306
1306
|
let r = t.value.map((e) => ({
|
|
1307
1307
|
value: e.name,
|
|
@@ -1314,17 +1314,17 @@ function Jn(e) {
|
|
|
1314
1314
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1315
1315
|
}
|
|
1316
1316
|
function l(e) {
|
|
1317
|
-
return
|
|
1317
|
+
return Kn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1318
1318
|
}
|
|
1319
1319
|
function d() {
|
|
1320
1320
|
if (e?.defaultFont) {
|
|
1321
|
-
if (!n.value && !l(e.defaultFont)) return
|
|
1321
|
+
if (!n.value && !l(e.defaultFont)) return Jn;
|
|
1322
1322
|
if (c(e.defaultFont)) {
|
|
1323
1323
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1324
1324
|
if (t) return t.value;
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
|
-
return
|
|
1327
|
+
return Jn;
|
|
1328
1328
|
}
|
|
1329
1329
|
let f = j(() => d());
|
|
1330
1330
|
function p(e) {
|
|
@@ -1334,7 +1334,7 @@ function Jn(e) {
|
|
|
1334
1334
|
let e = n.fallback ?? i.value;
|
|
1335
1335
|
return `'${n.name}', ${e}`;
|
|
1336
1336
|
}
|
|
1337
|
-
return
|
|
1337
|
+
return qn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1338
1338
|
}
|
|
1339
1339
|
let m = [], h = !1;
|
|
1340
1340
|
async function g() {
|
|
@@ -1350,7 +1350,7 @@ function Jn(e) {
|
|
|
1350
1350
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1351
1351
|
});
|
|
1352
1352
|
} catch (t) {
|
|
1353
|
-
|
|
1353
|
+
dn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1354
1354
|
}
|
|
1355
1355
|
});
|
|
1356
1356
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -1377,8 +1377,8 @@ function Jn(e) {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
//#endregion
|
|
1379
1379
|
//#region src/composables/useLogicTag.ts
|
|
1380
|
-
function
|
|
1381
|
-
let e = N(
|
|
1380
|
+
function Xn() {
|
|
1381
|
+
let e = N(ut, []), t = N(Et, []), n = N(st, Me.liquid), r = N($e, null), i = N(Tt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
1382
1382
|
async function c() {
|
|
1383
1383
|
if (r) {
|
|
1384
1384
|
a.value = !0;
|
|
@@ -1409,7 +1409,7 @@ function Yn() {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
//#endregion
|
|
1411
1411
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1412
|
-
function
|
|
1412
|
+
function Zn(e, t, n) {
|
|
1413
1413
|
return Ee(e, n) ? {
|
|
1414
1414
|
type: "logicMergeTagNode",
|
|
1415
1415
|
attrs: {
|
|
@@ -1426,15 +1426,15 @@ function Xn(e, t, n) {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
//#endregion
|
|
1428
1428
|
//#region src/utils/insertLogicTag.ts
|
|
1429
|
-
function
|
|
1429
|
+
function Qn(e) {
|
|
1430
1430
|
return "before" in e && "after" in e;
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1433
|
-
if (!
|
|
1434
|
-
e.chain().focus().insertContent(
|
|
1432
|
+
function $n(e, t, n) {
|
|
1433
|
+
if (!Qn(t)) {
|
|
1434
|
+
e.chain().focus().insertContent(Zn(t.value, t.label, n)).run();
|
|
1435
1435
|
return;
|
|
1436
1436
|
}
|
|
1437
|
-
let r =
|
|
1437
|
+
let r = Zn(t.before, t.label, n), i = Zn(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1438
1438
|
if (a !== o) {
|
|
1439
1439
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1440
1440
|
return;
|
|
@@ -1443,20 +1443,20 @@ function Qn(e, t, n) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
//#endregion
|
|
1445
1445
|
//#region src/utils/linkColorExtension.ts
|
|
1446
|
-
function
|
|
1446
|
+
function er(e) {
|
|
1447
1447
|
if (!e) return null;
|
|
1448
1448
|
let t = e.trim();
|
|
1449
1449
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function tr(e) {
|
|
1452
1452
|
return e.extend({ addAttributes() {
|
|
1453
1453
|
return {
|
|
1454
1454
|
...this.parent?.(),
|
|
1455
1455
|
color: {
|
|
1456
1456
|
default: null,
|
|
1457
|
-
parseHTML: (e) =>
|
|
1457
|
+
parseHTML: (e) => er(qe(e.style.color)),
|
|
1458
1458
|
renderHTML: (e) => {
|
|
1459
|
-
let t =
|
|
1459
|
+
let t = er(e.color);
|
|
1460
1460
|
return t ? { style: `color: ${t}` } : {};
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
@@ -1465,9 +1465,9 @@ function er(e) {
|
|
|
1465
1465
|
}
|
|
1466
1466
|
//#endregion
|
|
1467
1467
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1468
|
-
function
|
|
1468
|
+
function nr(e) {
|
|
1469
1469
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
1470
|
-
|
|
1470
|
+
Un(i, t);
|
|
1471
1471
|
function a() {
|
|
1472
1472
|
let i = e.value?.getAttributes("link") ?? {};
|
|
1473
1473
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -1476,7 +1476,7 @@ function tr(e) {
|
|
|
1476
1476
|
if (n.value) {
|
|
1477
1477
|
let t = c(n.value);
|
|
1478
1478
|
if (t !== null) {
|
|
1479
|
-
let n =
|
|
1479
|
+
let n = er(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1480
1480
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
@@ -1523,8 +1523,8 @@ function tr(e) {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
//#endregion
|
|
1525
1525
|
//#region src/composables/useRichTextEditor.ts
|
|
1526
|
-
function
|
|
1527
|
-
let t = N(
|
|
1526
|
+
function rr(e) {
|
|
1527
|
+
let t = N(_t, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Ft(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = Xn(), f = N(et, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = de(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = nr(y), { start: k, stop: ee } = Ue(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), A = v(null), te = _(!0), j = _(null), ne = !1;
|
|
1528
1528
|
async function M() {
|
|
1529
1529
|
j.value = null, te.value = !0;
|
|
1530
1530
|
try {
|
|
@@ -1554,7 +1554,7 @@ function nr(e) {
|
|
|
1554
1554
|
y.value = l, te.value = !1, k();
|
|
1555
1555
|
} catch (t) {
|
|
1556
1556
|
if (ne) return;
|
|
1557
|
-
|
|
1557
|
+
dn.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), j.value = t instanceof Error ? t.message : "Failed to load editor", te.value = !1;
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
1560
|
function re() {
|
|
@@ -1572,7 +1572,7 @@ function nr(e) {
|
|
|
1572
1572
|
let a = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1573
1573
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || a || e.onDone();
|
|
1574
1574
|
}
|
|
1575
|
-
|
|
1575
|
+
Je(document, "mousedown", ae), h(() => {
|
|
1576
1576
|
ne = !0, ie(), ee(), y.value?.destroy();
|
|
1577
1577
|
});
|
|
1578
1578
|
async function oe() {
|
|
@@ -1584,7 +1584,7 @@ function nr(e) {
|
|
|
1584
1584
|
}
|
|
1585
1585
|
async function P() {
|
|
1586
1586
|
let e = await d();
|
|
1587
|
-
ne || (e && y.value ?
|
|
1587
|
+
ne || (e && y.value ? $n(y.value, e, o) : y.value?.commands.focus());
|
|
1588
1588
|
}
|
|
1589
1589
|
return {
|
|
1590
1590
|
editor: y,
|
|
@@ -1613,9 +1613,9 @@ function nr(e) {
|
|
|
1613
1613
|
}
|
|
1614
1614
|
//#endregion
|
|
1615
1615
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1616
|
-
var
|
|
1617
|
-
function
|
|
1618
|
-
let t =
|
|
1616
|
+
var ir = "(max-width: 767px)";
|
|
1617
|
+
function ar(e) {
|
|
1618
|
+
let t = Ge(ir);
|
|
1619
1619
|
return {
|
|
1620
1620
|
isSmallScreen: t,
|
|
1621
1621
|
showNotice: j(() => (S(e) ?? !0) && t.value)
|
|
@@ -1623,20 +1623,20 @@ function ir(e) {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
//#endregion
|
|
1625
1625
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1626
|
-
var
|
|
1626
|
+
var or = { class: "tpl:w-full" }, sr = {
|
|
1627
1627
|
key: 0,
|
|
1628
1628
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1629
|
-
},
|
|
1629
|
+
}, cr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, lr = {
|
|
1630
1630
|
key: 1,
|
|
1631
1631
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1632
|
-
},
|
|
1632
|
+
}, ur = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, dr = {
|
|
1633
1633
|
key: 2,
|
|
1634
1634
|
class: "tpl:relative"
|
|
1635
|
-
},
|
|
1635
|
+
}, fr = ["innerHTML"], pr = {
|
|
1636
1636
|
key: 0,
|
|
1637
1637
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1638
1638
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1639
|
-
},
|
|
1639
|
+
}, mr = /* @__PURE__ */ y({
|
|
1640
1640
|
__name: "CustomBlock",
|
|
1641
1641
|
props: {
|
|
1642
1642
|
block: {},
|
|
@@ -1644,7 +1644,7 @@ var ar = { class: "tpl:w-full" }, or = {
|
|
|
1644
1644
|
},
|
|
1645
1645
|
emits: ["fetchData"],
|
|
1646
1646
|
setup(e, { emit: t }) {
|
|
1647
|
-
let n = e, r = t, { t: i } =
|
|
1647
|
+
let n = e, r = t, { t: i } = Dt(), o = N(yt, null), s = _(""), l = _(!1), u = j(() => o?.getDefinition(n.block.customType)), d = j(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = qt({
|
|
1648
1648
|
definition: u,
|
|
1649
1649
|
block: j(() => n.block),
|
|
1650
1650
|
onUpdate: (e, t) => {
|
|
@@ -1670,10 +1670,10 @@ var ar = { class: "tpl:w-full" }, or = {
|
|
|
1670
1670
|
y();
|
|
1671
1671
|
}), c(() => n.block.fieldValues, () => {
|
|
1672
1672
|
S();
|
|
1673
|
-
}, { deep: !0 }), (e, t) => (f(), x("div",
|
|
1673
|
+
}, { deep: !0 }), (e, t) => (f(), x("div", or, [d.value ? l.value ? (f(), x("div", lr, [w(k(jt), {
|
|
1674
1674
|
size: 24,
|
|
1675
1675
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1676
|
-
}), b("span",
|
|
1676
|
+
}), b("span", ur, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", dr, [b("div", { innerHTML: s.value }, null, 8, fr), k(v) && k(g) ? (f(), x("div", pr, [k(m) ? (f(), D(Nt, {
|
|
1677
1677
|
key: 1,
|
|
1678
1678
|
class: "tpl:w-48"
|
|
1679
1679
|
})) : (f(), x("button", {
|
|
@@ -1681,16 +1681,16 @@ var ar = { class: "tpl:w-full" }, or = {
|
|
|
1681
1681
|
type: "button",
|
|
1682
1682
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1683
1683
|
onClick: t[0] ||= P((...e) => k(h) && k(h)(...e), ["stop"])
|
|
1684
|
-
}, [u.value?.icon ? (f(), D(
|
|
1684
|
+
}, [u.value?.icon ? (f(), D(Bn, {
|
|
1685
1685
|
key: 0,
|
|
1686
1686
|
icon: u.value.icon,
|
|
1687
1687
|
size: 16
|
|
1688
|
-
}, null, 8, ["icon"])) : M("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : M("", !0)])) : (f(), x("div",
|
|
1688
|
+
}, null, 8, ["icon"])) : M("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : M("", !0)])) : (f(), x("div", sr, [w(k(Pn), {
|
|
1689
1689
|
size: 24,
|
|
1690
1690
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1691
|
-
}), b("span",
|
|
1691
|
+
}), b("span", cr, p(k(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1692
1692
|
}
|
|
1693
|
-
}),
|
|
1693
|
+
}), hr = { class: "tpl:w-full" }, gr = /* @__PURE__ */ y({
|
|
1694
1694
|
__name: "DividerBlock",
|
|
1695
1695
|
props: {
|
|
1696
1696
|
block: {},
|
|
@@ -1702,37 +1702,37 @@ var ar = { class: "tpl:w-full" }, or = {
|
|
|
1702
1702
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1703
1703
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1704
1704
|
}));
|
|
1705
|
-
return (e, t) => (f(), x("div",
|
|
1705
|
+
return (e, t) => (f(), x("div", hr, [b("hr", {
|
|
1706
1706
|
class: "tpl:m-0 tpl:border-none",
|
|
1707
1707
|
style: i(n.value)
|
|
1708
1708
|
}, null, 4)]));
|
|
1709
1709
|
}
|
|
1710
|
-
}),
|
|
1710
|
+
}), _r = { class: "tpl:w-full" }, vr = { 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)]" }, yr = {
|
|
1711
1711
|
key: 0,
|
|
1712
1712
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1713
|
-
},
|
|
1713
|
+
}, br = {
|
|
1714
1714
|
key: 1,
|
|
1715
1715
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1716
|
-
},
|
|
1716
|
+
}, xr = /* @__PURE__ */ y({
|
|
1717
1717
|
__name: "HtmlBlock",
|
|
1718
1718
|
props: {
|
|
1719
1719
|
block: {},
|
|
1720
1720
|
viewport: {}
|
|
1721
1721
|
},
|
|
1722
1722
|
setup(e) {
|
|
1723
|
-
let t = e, { t: n } =
|
|
1724
|
-
return (e, t) => (f(), x("div",
|
|
1723
|
+
let t = e, { t: n } = Dt(), r = j(() => t.block.content.trim().length > 0);
|
|
1724
|
+
return (e, t) => (f(), x("div", _r, [b("div", vr, [w(k(Dn), {
|
|
1725
1725
|
size: 24,
|
|
1726
1726
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1727
|
-
}), r.value ? (f(), x("span",
|
|
1727
|
+
}), r.value ? (f(), x("span", yr, p(k(n).html.preview), 1)) : (f(), x("span", br, p(k(n).html.empty), 1))])]));
|
|
1728
1728
|
}
|
|
1729
|
-
}),
|
|
1730
|
-
function
|
|
1731
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } =
|
|
1729
|
+
}), Sr = "image/";
|
|
1730
|
+
function Cr(e) {
|
|
1731
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = We(t, {
|
|
1732
1732
|
preventDefaultForUnhandled: !0,
|
|
1733
1733
|
onDrop: (e) => {
|
|
1734
1734
|
if (!i()) return;
|
|
1735
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
1735
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Sr));
|
|
1736
1736
|
t.length > 0 && n([t[0]]);
|
|
1737
1737
|
}
|
|
1738
1738
|
});
|
|
@@ -1740,17 +1740,17 @@ function Sr(e) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
//#endregion
|
|
1742
1742
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1743
|
-
var
|
|
1743
|
+
var wr = {
|
|
1744
1744
|
key: 0,
|
|
1745
1745
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1746
1746
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1747
|
-
},
|
|
1747
|
+
}, Tr = ["href"], Er = ["src", "alt"], Dr = ["src", "alt"], Or = {
|
|
1748
1748
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1749
1749
|
style: { opacity: "0.7" }
|
|
1750
|
-
},
|
|
1750
|
+
}, kr = ["href"], Ar = ["src", "alt"], jr = ["src", "alt"], Mr = {
|
|
1751
1751
|
key: 4,
|
|
1752
1752
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1753
|
-
},
|
|
1753
|
+
}, Nr = ["aria-label"], Pr = { key: 1 }, Fr = /* @__PURE__ */ y({
|
|
1754
1754
|
__name: "ImageBlock",
|
|
1755
1755
|
props: {
|
|
1756
1756
|
block: {},
|
|
@@ -1758,7 +1758,7 @@ var Cr = {
|
|
|
1758
1758
|
},
|
|
1759
1759
|
emits: ["update"],
|
|
1760
1760
|
setup(e, { emit: t }) {
|
|
1761
|
-
let n = e, r = t, { t: a } =
|
|
1761
|
+
let n = e, r = t, { t: a } = Dt(), { syntax: o } = Ft(), s = N(Qe, null), c = j(() => !!s), l = It();
|
|
1762
1762
|
async function u() {
|
|
1763
1763
|
let e = await s?.({ accept: ["images"] });
|
|
1764
1764
|
if (l.alive && e) {
|
|
@@ -1785,7 +1785,7 @@ var Cr = {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
|
-
let { isOver: v } =
|
|
1788
|
+
let { isOver: v } = Cr({
|
|
1789
1789
|
target: d,
|
|
1790
1790
|
enabled: h,
|
|
1791
1791
|
onFiles: g
|
|
@@ -1805,11 +1805,11 @@ var Cr = {
|
|
|
1805
1805
|
"data-testid": "image-drop-zone",
|
|
1806
1806
|
class: "tpl:relative tpl:w-full",
|
|
1807
1807
|
style: i(y.value)
|
|
1808
|
-
}, [h.value && (k(v) || m.value) ? (f(), x("div",
|
|
1808
|
+
}, [h.value && (k(v) || m.value) ? (f(), x("div", wr, [m.value ? (f(), x(A, { key: 0 }, [w(k(Ot), {
|
|
1809
1809
|
class: "tpl-spinner",
|
|
1810
1810
|
size: 20,
|
|
1811
1811
|
"stroke-width": 2
|
|
1812
|
-
}), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(A, { key: 1 }, [w(k(
|
|
1812
|
+
}), O(" " + p(k(a).image.uploading), 1)], 64)) : (f(), x(A, { key: 1 }, [w(k(Mt), {
|
|
1813
1813
|
size: 20,
|
|
1814
1814
|
"stroke-width": 1.5
|
|
1815
1815
|
}), O(" " + p(k(a).image.dropToUpload), 1)], 64))])) : M("", !0), e.block.src && C.value && e.block.placeholderUrl ? (f(), x(A, { key: 1 }, [e.block.linkUrl ? (f(), x("a", {
|
|
@@ -1824,22 +1824,22 @@ var Cr = {
|
|
|
1824
1824
|
src: e.block.placeholderUrl,
|
|
1825
1825
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1826
1826
|
style: i(S.value)
|
|
1827
|
-
}, null, 12,
|
|
1827
|
+
}, null, 12, Er)], 8, Tr)) : (f(), x("img", {
|
|
1828
1828
|
key: 1,
|
|
1829
1829
|
class: "tpl:border-0",
|
|
1830
1830
|
src: e.block.placeholderUrl,
|
|
1831
1831
|
alt: e.block.alt,
|
|
1832
1832
|
style: i(S.value)
|
|
1833
|
-
}, null, 12,
|
|
1833
|
+
}, null, 12, Dr))], 64)) : e.block.src && C.value ? (f(), x("div", {
|
|
1834
1834
|
key: 2,
|
|
1835
1835
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1836
1836
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
|
|
1837
|
-
}, [w(k(
|
|
1837
|
+
}, [w(k(Mn), {
|
|
1838
1838
|
size: 32,
|
|
1839
1839
|
"stroke-width": 1.5,
|
|
1840
1840
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1841
1841
|
style: { opacity: "0.5" }
|
|
1842
|
-
}), b("span",
|
|
1842
|
+
}), b("span", Or, [w(xn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(A, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
|
|
1843
1843
|
key: 0,
|
|
1844
1844
|
href: e.block.linkUrl,
|
|
1845
1845
|
target: "_blank",
|
|
@@ -1851,33 +1851,33 @@ var Cr = {
|
|
|
1851
1851
|
src: e.block.src,
|
|
1852
1852
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1853
1853
|
style: i(S.value)
|
|
1854
|
-
}, null, 12,
|
|
1854
|
+
}, null, 12, Ar)], 8, kr)) : (f(), x("img", {
|
|
1855
1855
|
key: 1,
|
|
1856
1856
|
class: "tpl:border-0",
|
|
1857
1857
|
src: e.block.src,
|
|
1858
1858
|
alt: e.block.alt,
|
|
1859
1859
|
style: i(S.value)
|
|
1860
|
-
}, null, 12,
|
|
1860
|
+
}, null, 12, jr))], 64)) : (f(), x("div", Mr, [c.value ? (f(), x("button", {
|
|
1861
1861
|
key: 0,
|
|
1862
1862
|
"aria-label": k(a).image.browseMedia,
|
|
1863
1863
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1864
1864
|
onClick: P(u, ["stop"])
|
|
1865
|
-
}, [w(k(
|
|
1865
|
+
}, [w(k(Mn), {
|
|
1866
1866
|
size: 14,
|
|
1867
1867
|
"stroke-width": 1.5
|
|
1868
|
-
}), O(" " + p(k(a).image.browseMedia), 1)], 8,
|
|
1868
|
+
}), O(" " + p(k(a).image.browseMedia), 1)], 8, Nr)) : (f(), x("span", Pr, p(k(a).image.clickToAdd), 1))]))], 4));
|
|
1869
1869
|
}
|
|
1870
|
-
}),
|
|
1870
|
+
}), Ir = { class: "tpl:w-full" }, Lr = ["href"], Rr = {
|
|
1871
1871
|
key: 1,
|
|
1872
1872
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
1873
|
-
},
|
|
1873
|
+
}, zr = /* @__PURE__ */ y({
|
|
1874
1874
|
__name: "MenuBlock",
|
|
1875
1875
|
props: {
|
|
1876
1876
|
block: {},
|
|
1877
1877
|
viewport: {}
|
|
1878
1878
|
},
|
|
1879
1879
|
setup(e) {
|
|
1880
|
-
let n = e, { t: r } =
|
|
1880
|
+
let n = e, { t: r } = Dt(), a = j(() => ({
|
|
1881
1881
|
display: "flex",
|
|
1882
1882
|
flexWrap: "wrap",
|
|
1883
1883
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1889,7 +1889,7 @@ var Cr = {
|
|
|
1889
1889
|
function s(e) {
|
|
1890
1890
|
return e || n.block.linkColor || n.block.color;
|
|
1891
1891
|
}
|
|
1892
|
-
return (n, c) => (f(), x("div",
|
|
1892
|
+
return (n, c) => (f(), x("div", Ir, [o.value ? (f(), x("div", {
|
|
1893
1893
|
key: 0,
|
|
1894
1894
|
style: i(a.value)
|
|
1895
1895
|
}, [(f(!0), x(A, null, t(e.block.items, (t, n) => (f(), x(A, { key: t.id }, [b("a", {
|
|
@@ -1901,15 +1901,15 @@ var Cr = {
|
|
|
1901
1901
|
textDecoration: t.underline ? "underline" : "none"
|
|
1902
1902
|
}),
|
|
1903
1903
|
onClick: c[0] ||= P(() => {}, ["prevent"])
|
|
1904
|
-
}, [w(
|
|
1904
|
+
}, [w(xn, { text: t.text || "..." }, null, 8, ["text"])], 12, Lr), n < e.block.items.length - 1 ? (f(), x("span", {
|
|
1905
1905
|
key: 0,
|
|
1906
1906
|
style: i({
|
|
1907
1907
|
color: e.block.separatorColor,
|
|
1908
1908
|
padding: `0 ${e.block.spacing}px`
|
|
1909
1909
|
})
|
|
1910
|
-
}, p(e.block.separator), 5)) : M("", !0)], 64))), 128))], 4)) : (f(), x("div",
|
|
1910
|
+
}, p(e.block.separator), 5)) : M("", !0)], 64))), 128))], 4)) : (f(), x("div", Rr, [w(k(Nn), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
|
|
1911
1911
|
}
|
|
1912
|
-
}),
|
|
1912
|
+
}), Br = /* @__PURE__ */ new Set([
|
|
1913
1913
|
"http",
|
|
1914
1914
|
"https",
|
|
1915
1915
|
"mailto",
|
|
@@ -1919,7 +1919,7 @@ var Cr = {
|
|
|
1919
1919
|
"sms",
|
|
1920
1920
|
"xmpp",
|
|
1921
1921
|
"cid"
|
|
1922
|
-
]),
|
|
1922
|
+
]), Vr = /* @__PURE__ */ new Set([
|
|
1923
1923
|
"SCRIPT",
|
|
1924
1924
|
"STYLE",
|
|
1925
1925
|
"IFRAME",
|
|
@@ -1929,7 +1929,7 @@ var Cr = {
|
|
|
1929
1929
|
"META",
|
|
1930
1930
|
"BASE",
|
|
1931
1931
|
"FORM"
|
|
1932
|
-
]),
|
|
1932
|
+
]), Hr = /* @__PURE__ */ new Set([
|
|
1933
1933
|
"href",
|
|
1934
1934
|
"xlink:href",
|
|
1935
1935
|
"formaction",
|
|
@@ -1938,16 +1938,16 @@ var Cr = {
|
|
|
1938
1938
|
"background",
|
|
1939
1939
|
"poster"
|
|
1940
1940
|
]);
|
|
1941
|
-
function
|
|
1941
|
+
function Ur(e, t) {
|
|
1942
1942
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1943
1943
|
if (!n || n.startsWith("#")) return !0;
|
|
1944
1944
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1945
1945
|
if (!r) return !0;
|
|
1946
1946
|
let i = r[1].toLowerCase();
|
|
1947
|
-
return
|
|
1947
|
+
return Br.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1950
|
-
if (
|
|
1949
|
+
function Wr(e) {
|
|
1950
|
+
if (Vr.has(e.tagName)) {
|
|
1951
1951
|
e.remove();
|
|
1952
1952
|
return;
|
|
1953
1953
|
}
|
|
@@ -1959,57 +1959,57 @@ function Ur(e) {
|
|
|
1959
1959
|
e.removeAttribute(n);
|
|
1960
1960
|
continue;
|
|
1961
1961
|
}
|
|
1962
|
-
if (
|
|
1963
|
-
|
|
1962
|
+
if (Hr.has(t)) {
|
|
1963
|
+
Ur(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1964
1964
|
continue;
|
|
1965
1965
|
}
|
|
1966
1966
|
if (t === "src") {
|
|
1967
|
-
|
|
1967
|
+
Ur(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1968
1968
|
continue;
|
|
1969
1969
|
}
|
|
1970
1970
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1971
1971
|
}
|
|
1972
1972
|
let n = Array.from(e.children);
|
|
1973
|
-
for (let e of n)
|
|
1973
|
+
for (let e of n) Wr(e);
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1975
|
+
function Gr(e) {
|
|
1976
1976
|
if (typeof DOMParser > "u") return e;
|
|
1977
1977
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1978
|
-
for (let e of n)
|
|
1978
|
+
for (let e of n) Wr(e);
|
|
1979
1979
|
return t.innerHTML;
|
|
1980
1980
|
}
|
|
1981
1981
|
//#endregion
|
|
1982
1982
|
//#region src/composables/useEditableTextBlock.ts
|
|
1983
|
-
function
|
|
1984
|
-
let t = N(
|
|
1983
|
+
function Kr(e) {
|
|
1984
|
+
let t = N(ot, []), { syntax: n } = Ft(), r = j(() => Gr(Te(fe(e(), t), n))), i = _(!1), a = _(null), { top: o, left: s } = Ke(a), { toLocal: c } = Ye(), l = j(() => c({
|
|
1985
1985
|
top: o.value - 8,
|
|
1986
1986
|
left: s.value
|
|
1987
1987
|
}));
|
|
1988
|
-
function
|
|
1988
|
+
function u() {
|
|
1989
1989
|
i.value = !0;
|
|
1990
1990
|
}
|
|
1991
|
-
function
|
|
1991
|
+
function d() {
|
|
1992
1992
|
i.value = !1;
|
|
1993
1993
|
}
|
|
1994
1994
|
return {
|
|
1995
1995
|
isEditing: i,
|
|
1996
1996
|
blockRef: a,
|
|
1997
|
-
toolbarPosition:
|
|
1997
|
+
toolbarPosition: l,
|
|
1998
1998
|
resolvedContent: r,
|
|
1999
|
-
handleDoubleClick:
|
|
2000
|
-
handleEditorDone:
|
|
1999
|
+
handleDoubleClick: u,
|
|
2000
|
+
handleEditorDone: d
|
|
2001
2001
|
};
|
|
2002
2002
|
}
|
|
2003
2003
|
//#endregion
|
|
2004
2004
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2005
|
-
var
|
|
2005
|
+
var qr = ["innerHTML"], Jr = /* @__PURE__ */ y({
|
|
2006
2006
|
__name: "ParagraphBlock",
|
|
2007
2007
|
props: {
|
|
2008
2008
|
block: {},
|
|
2009
2009
|
viewport: {}
|
|
2010
2010
|
},
|
|
2011
2011
|
setup(e) {
|
|
2012
|
-
let t = e, n = C(() => import("./ParagraphEditor-
|
|
2012
|
+
let t = e, n = C(() => import("./ParagraphEditor-nk5Vvr7M.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Kr(() => t.block.content);
|
|
2013
2013
|
return (t, l) => (f(), x("div", {
|
|
2014
2014
|
ref_key: "blockRef",
|
|
2015
2015
|
ref: i,
|
|
@@ -2028,46 +2028,46 @@ var Kr = ["innerHTML"], qr = /* @__PURE__ */ y({
|
|
|
2028
2028
|
key: 1,
|
|
2029
2029
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
2030
2030
|
innerHTML: k(o)
|
|
2031
|
-
}, null, 8,
|
|
2031
|
+
}, null, 8, qr))], 544));
|
|
2032
2032
|
}
|
|
2033
2033
|
});
|
|
2034
2034
|
//#endregion
|
|
2035
2035
|
//#region src/utils/blockComponentResolver.ts
|
|
2036
|
-
function
|
|
2036
|
+
function Yr(e, t, n) {
|
|
2037
2037
|
if (t) {
|
|
2038
2038
|
let n = t.getComponent(e);
|
|
2039
2039
|
if (n) return n;
|
|
2040
2040
|
}
|
|
2041
2041
|
return n[e.type] ?? null;
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function Xr(e) {
|
|
2044
2044
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2045
2045
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2046
2046
|
backgroundColor: n || "transparent"
|
|
2047
2047
|
};
|
|
2048
2048
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2049
2049
|
}
|
|
2050
|
-
function
|
|
2050
|
+
function Zr(e) {
|
|
2051
2051
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2052
2052
|
let t = e.wrapper, n = {};
|
|
2053
2053
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
2054
2054
|
}
|
|
2055
2055
|
//#endregion
|
|
2056
2056
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2057
|
-
var
|
|
2057
|
+
var Qr = ["data-block-id", "data-block-type"], $r = ["aria-label"], ei = [
|
|
2058
2058
|
"aria-label",
|
|
2059
2059
|
"aria-pressed",
|
|
2060
2060
|
"title"
|
|
2061
|
-
],
|
|
2061
|
+
], ti = ["aria-label", "title"], ni = ["aria-label", "title"], ri = ["aria-label", "title"], ii = {
|
|
2062
2062
|
key: 1,
|
|
2063
2063
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2064
|
-
},
|
|
2064
|
+
}, ai = { 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)]" }, oi = {
|
|
2065
2065
|
key: 2,
|
|
2066
2066
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2067
|
-
},
|
|
2067
|
+
}, si = ["aria-label", "title"], ci = {
|
|
2068
2068
|
key: 3,
|
|
2069
2069
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2070
|
-
},
|
|
2070
|
+
}, li = ["aria-label"], ui = /*#__PURE__*/ Pt(/* @__PURE__ */ y({
|
|
2071
2071
|
__name: "BlockWrapper",
|
|
2072
2072
|
props: {
|
|
2073
2073
|
block: {},
|
|
@@ -2077,7 +2077,7 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2077
2077
|
},
|
|
2078
2078
|
emits: ["select"],
|
|
2079
2079
|
setup(e, { emit: t }) {
|
|
2080
|
-
let n = C(() => import("./BlockIssueBadge-
|
|
2080
|
+
let n = C(() => import("./BlockIssueBadge-BLytBabN.js")), r = e, a = t, { t: s, format: c } = Dt(), l = N(Ct, null), u = _(null), d = j(() => l?.liftedBlockId.value === r.block.id), m = j(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
|
|
2081
2081
|
async function h() {
|
|
2082
2082
|
await ie(), u.value?.focus();
|
|
2083
2083
|
}
|
|
@@ -2103,13 +2103,13 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2103
2103
|
let v = j(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), y = j(() => r.previewMode === !0 && v.value), S = j(() => r.viewport ? {
|
|
2104
2104
|
desktop: s.viewport.desktop,
|
|
2105
2105
|
mobile: s.viewport.mobile
|
|
2106
|
-
}[r.viewport] ?? r.viewport : ""), E = j(() => !!r.block.displayCondition), D = N(
|
|
2107
|
-
let e =
|
|
2106
|
+
}[r.viewport] ?? r.viewport : ""), E = j(() => !!r.block.displayCondition), D = N(ht, null), ee = N(St, null), A = N(xt, {}), te = j(() => !!A.savedModules), ne = j(() => A.comments?.getBlockCount(r.block.id) ?? 0), re = j(() => {
|
|
2107
|
+
let e = Xr(r.block), t = {
|
|
2108
2108
|
padding: e.padding,
|
|
2109
2109
|
backgroundColor: e.backgroundColor
|
|
2110
2110
|
};
|
|
2111
2111
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2112
|
-
}), ae = j(() =>
|
|
2112
|
+
}), ae = j(() => Zr(r.block));
|
|
2113
2113
|
function oe(e) {
|
|
2114
2114
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2115
2115
|
}
|
|
@@ -2152,60 +2152,60 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2152
2152
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2153
2153
|
title: k(s).blockActions.drag,
|
|
2154
2154
|
onKeydown: g
|
|
2155
|
-
}, [w(k(
|
|
2155
|
+
}, [w(k(jn), {
|
|
2156
2156
|
size: 14,
|
|
2157
2157
|
"stroke-width": 1.5
|
|
2158
|
-
})], 40,
|
|
2158
|
+
})], 40, ei),
|
|
2159
2159
|
b("button", {
|
|
2160
2160
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
2161
2161
|
"aria-label": k(s).blockActions.duplicate,
|
|
2162
2162
|
title: k(s).blockActions.duplicate,
|
|
2163
2163
|
onClick: P(ce, ["stop"])
|
|
2164
|
-
}, [w(k(
|
|
2164
|
+
}, [w(k(On), {
|
|
2165
2165
|
size: 14,
|
|
2166
2166
|
"stroke-width": 1.5
|
|
2167
|
-
})], 8,
|
|
2167
|
+
})], 8, ti),
|
|
2168
2168
|
te.value ? (f(), x("button", {
|
|
2169
2169
|
key: 0,
|
|
2170
2170
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
2171
2171
|
"aria-label": k(s).blockActions.saveAsModule,
|
|
2172
2172
|
title: k(s).blockActions.saveAsModule,
|
|
2173
2173
|
onClick: P(le, ["stop"])
|
|
2174
|
-
}, [w(k(
|
|
2174
|
+
}, [w(k(Tn), {
|
|
2175
2175
|
size: 14,
|
|
2176
2176
|
"stroke-width": 1.5
|
|
2177
|
-
})], 8,
|
|
2177
|
+
})], 8, ni)) : M("", !0),
|
|
2178
2178
|
b("button", {
|
|
2179
2179
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
2180
2180
|
"aria-label": k(s).blockActions.delete,
|
|
2181
2181
|
title: k(s).blockActions.delete,
|
|
2182
2182
|
onClick: P(se, ["stop"])
|
|
2183
|
-
}, [w(k(
|
|
2183
|
+
}, [w(k(At), {
|
|
2184
2184
|
size: 14,
|
|
2185
2185
|
"stroke-width": 1.5
|
|
2186
|
-
})], 8,
|
|
2187
|
-
], 8,
|
|
2188
|
-
v.value ? (f(), x("div",
|
|
2186
|
+
})], 8, ri)
|
|
2187
|
+
], 8, $r)) : M("", !0),
|
|
2188
|
+
v.value ? (f(), x("div", ii, [b("span", ai, [w(k(kn), {
|
|
2189
2189
|
size: 12,
|
|
2190
2190
|
"stroke-width": 1.5
|
|
2191
2191
|
}), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : M("", !0),
|
|
2192
|
-
E.value && !v.value ? (f(), x("div",
|
|
2192
|
+
E.value && !v.value ? (f(), x("div", oi, [b("button", {
|
|
2193
2193
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2194
2194
|
"aria-label": k(s).blockActions.conditionToggle,
|
|
2195
2195
|
title: e.block.displayCondition?.label,
|
|
2196
2196
|
onClick: P(ue, ["stop"])
|
|
2197
|
-
}, [w(k(
|
|
2197
|
+
}, [w(k(An), {
|
|
2198
2198
|
size: 12,
|
|
2199
2199
|
"stroke-width": 2
|
|
2200
|
-
})], 8,
|
|
2201
|
-
ne.value > 0 && !v.value ? (f(), x("div",
|
|
2200
|
+
})], 8, si)])) : M("", !0),
|
|
2201
|
+
ne.value > 0 && !v.value ? (f(), x("div", ci, [b("button", {
|
|
2202
2202
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2203
2203
|
"aria-label": k(c)(k(s).blockActions.comments, { count: String(ne.value) }),
|
|
2204
2204
|
onClick: r[0] ||= P((t) => k(A).comments?.openForBlock(e.block.id), ["stop"])
|
|
2205
|
-
}, [w(k(
|
|
2205
|
+
}, [w(k(kt), {
|
|
2206
2206
|
size: 12,
|
|
2207
2207
|
"stroke-width": 2.5
|
|
2208
|
-
}), O(" " + p(ne.value), 1)], 8,
|
|
2208
|
+
}), O(" " + p(ne.value), 1)], 8, li)])) : M("", !0),
|
|
2209
2209
|
ae.value ? (f(), x("div", {
|
|
2210
2210
|
key: 4,
|
|
2211
2211
|
class: "tpl-section-wrapper",
|
|
@@ -2218,31 +2218,31 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2218
2218
|
class: "tpl-block-content",
|
|
2219
2219
|
style: i(re.value)
|
|
2220
2220
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2221
|
-
], 10,
|
|
2221
|
+
], 10, Qr));
|
|
2222
2222
|
}
|
|
2223
2223
|
}), [["__scopeId", "data-v-7d9e7893"]]);
|
|
2224
2224
|
//#endregion
|
|
2225
2225
|
//#region src/utils/unwrapParagraph.ts
|
|
2226
|
-
function
|
|
2226
|
+
function di(e) {
|
|
2227
2227
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2228
2228
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2229
2229
|
}
|
|
2230
2230
|
//#endregion
|
|
2231
2231
|
//#region src/components/blocks/TitleBlock.vue
|
|
2232
|
-
var
|
|
2232
|
+
var fi = /* @__PURE__ */ y({
|
|
2233
2233
|
__name: "TitleBlock",
|
|
2234
2234
|
props: {
|
|
2235
2235
|
block: {},
|
|
2236
2236
|
viewport: {}
|
|
2237
2237
|
},
|
|
2238
2238
|
setup(e) {
|
|
2239
|
-
let t = e, n = C(() => import("./TitleEditor-
|
|
2239
|
+
let t = e, n = C(() => import("./TitleEditor-CmfkOHJT.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Kr(() => t.block.content), u = j(() => {
|
|
2240
2240
|
let e = {
|
|
2241
2241
|
fontSize: `${Pe[t.block.level]}px`,
|
|
2242
2242
|
textAlign: t.block.textAlign
|
|
2243
2243
|
};
|
|
2244
2244
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2245
|
-
}), p = j(() => `h${t.block.level}`), m = j(() =>
|
|
2245
|
+
}), p = j(() => `h${t.block.level}`), m = j(() => di(s.value));
|
|
2246
2246
|
return (t, s) => (f(), x("div", {
|
|
2247
2247
|
ref_key: "blockRef",
|
|
2248
2248
|
ref: a,
|
|
@@ -2268,88 +2268,88 @@ var di = /* @__PURE__ */ y({
|
|
|
2268
2268
|
});
|
|
2269
2269
|
//#endregion
|
|
2270
2270
|
//#region src/utils/sectionColumnDrop.ts
|
|
2271
|
-
function
|
|
2271
|
+
function pi(e) {
|
|
2272
2272
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2273
2273
|
}
|
|
2274
2274
|
//#endregion
|
|
2275
2275
|
//#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2276
|
-
var
|
|
2276
|
+
var mi = Object.defineProperty, hi = Object.getOwnPropertySymbols, gi = Object.prototype.hasOwnProperty, _i = Object.prototype.propertyIsEnumerable, vi = (e, t, n) => t in e ? mi(e, t, {
|
|
2277
2277
|
enumerable: !0,
|
|
2278
2278
|
configurable: !0,
|
|
2279
2279
|
writable: !0,
|
|
2280
2280
|
value: n
|
|
2281
|
-
}) : e[t] = n,
|
|
2282
|
-
for (var n in t ||= {})
|
|
2283
|
-
if (
|
|
2281
|
+
}) : e[t] = n, yi = (e, t) => {
|
|
2282
|
+
for (var n in t ||= {}) gi.call(t, n) && vi(e, n, t[n]);
|
|
2283
|
+
if (hi) for (var n of hi(t)) _i.call(t, n) && vi(e, n, t[n]);
|
|
2284
2284
|
return e;
|
|
2285
|
-
},
|
|
2285
|
+
}, bi = (e, t) => {
|
|
2286
2286
|
var n = {};
|
|
2287
|
-
for (var r in e)
|
|
2288
|
-
if (e != null &&
|
|
2287
|
+
for (var r in e) gi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2288
|
+
if (e != null && hi) for (var r of hi(e)) t.indexOf(r) < 0 && _i.call(e, r) && (n[r] = e[r]);
|
|
2289
2289
|
return n;
|
|
2290
|
-
},
|
|
2291
|
-
function xi(e) {
|
|
2292
|
-
console.warn(bi + e);
|
|
2293
|
-
}
|
|
2290
|
+
}, xi = "[vue-draggable-plus]: ";
|
|
2294
2291
|
function Si(e) {
|
|
2295
|
-
console.
|
|
2292
|
+
console.warn(xi + e);
|
|
2296
2293
|
}
|
|
2297
|
-
function Ci(e
|
|
2294
|
+
function Ci(e) {
|
|
2295
|
+
console.error(xi + e);
|
|
2296
|
+
}
|
|
2297
|
+
function wi(e, t, n) {
|
|
2298
2298
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2299
2299
|
}
|
|
2300
|
-
function
|
|
2300
|
+
function Ti(e) {
|
|
2301
2301
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2302
2302
|
}
|
|
2303
|
-
function
|
|
2304
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2303
|
+
function Ei(e) {
|
|
2304
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Ti(n)] = e[n]), t), {});
|
|
2305
2305
|
}
|
|
2306
|
-
function
|
|
2306
|
+
function Di(e, t) {
|
|
2307
2307
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2308
2308
|
}
|
|
2309
|
-
function
|
|
2309
|
+
function Oi(e, t, n) {
|
|
2310
2310
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2311
2311
|
}
|
|
2312
|
-
function
|
|
2312
|
+
function ki(e) {
|
|
2313
2313
|
return e === void 0;
|
|
2314
2314
|
}
|
|
2315
|
-
function
|
|
2315
|
+
function Ai(e) {
|
|
2316
2316
|
return typeof e == "string";
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function ji(e, t, n) {
|
|
2319
2319
|
let r = e.children[n];
|
|
2320
2320
|
e.insertBefore(t, r);
|
|
2321
2321
|
}
|
|
2322
|
-
function
|
|
2322
|
+
function Mi(e) {
|
|
2323
2323
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2324
2324
|
}
|
|
2325
|
-
function
|
|
2325
|
+
function Ni(e, t = document) {
|
|
2326
2326
|
let n = null;
|
|
2327
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2327
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Si(`Element not found: ${e}`), n;
|
|
2328
2328
|
}
|
|
2329
|
-
function
|
|
2329
|
+
function Pi(e, t, n = null) {
|
|
2330
2330
|
return function(...r) {
|
|
2331
2331
|
return e.apply(n, r), t.apply(n, r);
|
|
2332
2332
|
};
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2335
|
-
let n =
|
|
2334
|
+
function Fi(e, t) {
|
|
2335
|
+
let n = yi({}, e);
|
|
2336
2336
|
return Object.keys(t).forEach((r) => {
|
|
2337
|
-
n[r] ? n[r] =
|
|
2337
|
+
n[r] ? n[r] = Pi(e[r], t[r]) : n[r] = t[r];
|
|
2338
2338
|
}), n;
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2340
|
+
function Ii(e) {
|
|
2341
2341
|
return e instanceof HTMLElement;
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function Li(e, t) {
|
|
2344
2344
|
Object.keys(e).forEach((n) => {
|
|
2345
2345
|
t(n, e[n]);
|
|
2346
2346
|
});
|
|
2347
2347
|
}
|
|
2348
|
-
function
|
|
2348
|
+
function Ri(e) {
|
|
2349
2349
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2350
2350
|
}
|
|
2351
|
-
var
|
|
2352
|
-
function
|
|
2351
|
+
var zi = Object.assign;
|
|
2352
|
+
function Bi(e, t) {
|
|
2353
2353
|
var n = Object.keys(e);
|
|
2354
2354
|
if (Object.getOwnPropertySymbols) {
|
|
2355
2355
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2359,26 +2359,26 @@ function zi(e, t) {
|
|
|
2359
2359
|
}
|
|
2360
2360
|
return n;
|
|
2361
2361
|
}
|
|
2362
|
-
function
|
|
2362
|
+
function Vi(e) {
|
|
2363
2363
|
for (var t = 1; t < arguments.length; t++) {
|
|
2364
2364
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2365
|
-
t % 2 ?
|
|
2366
|
-
|
|
2367
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2365
|
+
t % 2 ? Bi(Object(n), !0).forEach(function(t) {
|
|
2366
|
+
Ui(e, t, n[t]);
|
|
2367
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Bi(Object(n)).forEach(function(t) {
|
|
2368
2368
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2369
2369
|
});
|
|
2370
2370
|
}
|
|
2371
2371
|
return e;
|
|
2372
2372
|
}
|
|
2373
|
-
function
|
|
2373
|
+
function Hi(e) {
|
|
2374
2374
|
"@babel/helpers - typeof";
|
|
2375
|
-
return
|
|
2375
|
+
return Hi = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2376
2376
|
return typeof e;
|
|
2377
2377
|
} : function(e) {
|
|
2378
2378
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2379
|
-
},
|
|
2379
|
+
}, Hi(e);
|
|
2380
2380
|
}
|
|
2381
|
-
function
|
|
2381
|
+
function Ui(e, t, n) {
|
|
2382
2382
|
return t in e ? Object.defineProperty(e, t, {
|
|
2383
2383
|
value: n,
|
|
2384
2384
|
enumerable: !0,
|
|
@@ -2386,45 +2386,45 @@ function Hi(e, t, n) {
|
|
|
2386
2386
|
writable: !0
|
|
2387
2387
|
}) : e[t] = n, e;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
return
|
|
2389
|
+
function Wi() {
|
|
2390
|
+
return Wi = Object.assign || function(e) {
|
|
2391
2391
|
for (var t = 1; t < arguments.length; t++) {
|
|
2392
2392
|
var n = arguments[t];
|
|
2393
2393
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2394
2394
|
}
|
|
2395
2395
|
return e;
|
|
2396
|
-
},
|
|
2396
|
+
}, Wi.apply(this, arguments);
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2398
|
+
function Gi(e, t) {
|
|
2399
2399
|
if (e == null) return {};
|
|
2400
2400
|
var n = {}, r = Object.keys(e), i, a;
|
|
2401
2401
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2402
2402
|
return n;
|
|
2403
2403
|
}
|
|
2404
|
-
function
|
|
2404
|
+
function Ki(e, t) {
|
|
2405
2405
|
if (e == null) return {};
|
|
2406
|
-
var n =
|
|
2406
|
+
var n = Gi(e, t), r, i;
|
|
2407
2407
|
if (Object.getOwnPropertySymbols) {
|
|
2408
2408
|
var a = Object.getOwnPropertySymbols(e);
|
|
2409
2409
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2410
2410
|
}
|
|
2411
2411
|
return n;
|
|
2412
2412
|
}
|
|
2413
|
-
var
|
|
2414
|
-
function
|
|
2413
|
+
var qi = "1.15.2";
|
|
2414
|
+
function Ji(e) {
|
|
2415
2415
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2416
2416
|
}
|
|
2417
|
-
var
|
|
2417
|
+
var Yi = Ji(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Xi = Ji(/Edge/i), Zi = Ji(/firefox/i), Qi = Ji(/safari/i) && !Ji(/chrome/i) && !Ji(/android/i), $i = Ji(/iP(ad|od|hone)/i), ea = Ji(/chrome/i) && Ji(/android/i), ta = {
|
|
2418
2418
|
capture: !1,
|
|
2419
2419
|
passive: !1
|
|
2420
2420
|
};
|
|
2421
2421
|
function I(e, t, n) {
|
|
2422
|
-
e.addEventListener(t, n, !
|
|
2422
|
+
e.addEventListener(t, n, !Yi && ta);
|
|
2423
2423
|
}
|
|
2424
2424
|
function L(e, t, n) {
|
|
2425
|
-
e.removeEventListener(t, n, !
|
|
2425
|
+
e.removeEventListener(t, n, !Yi && ta);
|
|
2426
2426
|
}
|
|
2427
|
-
function
|
|
2427
|
+
function na(e, t) {
|
|
2428
2428
|
if (t) {
|
|
2429
2429
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2430
2430
|
if (e.matches) return e.matches(t);
|
|
@@ -2436,22 +2436,22 @@ function ta(e, t) {
|
|
|
2436
2436
|
return !1;
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function ra(e) {
|
|
2440
2440
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2441
2441
|
}
|
|
2442
|
-
function
|
|
2442
|
+
function ia(e, t, n, r) {
|
|
2443
2443
|
if (e) {
|
|
2444
2444
|
n ||= document;
|
|
2445
2445
|
do {
|
|
2446
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2446
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && na(e, t) : na(e, t)) || r && e === n) return e;
|
|
2447
2447
|
if (e === n) break;
|
|
2448
|
-
} while (e =
|
|
2448
|
+
} while (e = ra(e));
|
|
2449
2449
|
}
|
|
2450
2450
|
return null;
|
|
2451
2451
|
}
|
|
2452
|
-
var
|
|
2452
|
+
var aa = /\s+/g;
|
|
2453
2453
|
function R(e, t, n) {
|
|
2454
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2454
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(aa, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(aa, " "));
|
|
2455
2455
|
}
|
|
2456
2456
|
function z(e, t, n) {
|
|
2457
2457
|
var r = e && e.style;
|
|
@@ -2460,7 +2460,7 @@ function z(e, t, n) {
|
|
|
2460
2460
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2461
2461
|
}
|
|
2462
2462
|
}
|
|
2463
|
-
function
|
|
2463
|
+
function oa(e, t) {
|
|
2464
2464
|
var n = "";
|
|
2465
2465
|
if (typeof e == "string") n = e;
|
|
2466
2466
|
else do {
|
|
@@ -2470,7 +2470,7 @@ function aa(e, t) {
|
|
|
2470
2470
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2471
2471
|
return i && new i(n);
|
|
2472
2472
|
}
|
|
2473
|
-
function
|
|
2473
|
+
function sa(e, t, n) {
|
|
2474
2474
|
if (e) {
|
|
2475
2475
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2476
2476
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2478,13 +2478,13 @@ function oa(e, t, n) {
|
|
|
2478
2478
|
}
|
|
2479
2479
|
return [];
|
|
2480
2480
|
}
|
|
2481
|
-
function
|
|
2481
|
+
function ca() {
|
|
2482
2482
|
return document.scrollingElement || document.documentElement;
|
|
2483
2483
|
}
|
|
2484
2484
|
function B(e, t, n, r, i) {
|
|
2485
2485
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2486
2486
|
var a, o, s, c, l, u, d;
|
|
2487
|
-
if (e !== window && e.parentNode && e !==
|
|
2487
|
+
if (e !== window && e.parentNode && e !== ca() ? (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, !Yi)) do
|
|
2488
2488
|
if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
|
|
2489
2489
|
var f = i.getBoundingClientRect();
|
|
2490
2490
|
o -= f.top + parseInt(z(i, "border-top-width")), s -= f.left + parseInt(z(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2492,7 +2492,7 @@ function B(e, t, n, r, i) {
|
|
|
2492
2492
|
}
|
|
2493
2493
|
while (i = i.parentNode);
|
|
2494
2494
|
if (r && e !== window) {
|
|
2495
|
-
var p =
|
|
2495
|
+
var p = oa(i || e), m = p && p.a, h = p && p.d;
|
|
2496
2496
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2497
2497
|
}
|
|
2498
2498
|
return {
|
|
@@ -2505,18 +2505,18 @@ function B(e, t, n, r, i) {
|
|
|
2505
2505
|
};
|
|
2506
2506
|
}
|
|
2507
2507
|
}
|
|
2508
|
-
function
|
|
2509
|
-
for (var r =
|
|
2508
|
+
function la(e, t, n) {
|
|
2509
|
+
for (var r = ha(e, !0), i = B(e)[t]; r;) {
|
|
2510
2510
|
var a = B(r)[n], o = void 0;
|
|
2511
2511
|
if (o = i >= a, !o) return r;
|
|
2512
|
-
if (r ===
|
|
2513
|
-
r =
|
|
2512
|
+
if (r === ca()) break;
|
|
2513
|
+
r = ha(r, !1);
|
|
2514
2514
|
}
|
|
2515
2515
|
return !1;
|
|
2516
2516
|
}
|
|
2517
|
-
function
|
|
2517
|
+
function ua(e, t, n, r) {
|
|
2518
2518
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2519
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2519
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && ia(o[a], n.draggable, e, !1)) {
|
|
2520
2520
|
if (i === t) return o[a];
|
|
2521
2521
|
i++;
|
|
2522
2522
|
}
|
|
@@ -2524,84 +2524,84 @@ function la(e, t, n, r) {
|
|
|
2524
2524
|
}
|
|
2525
2525
|
return null;
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2528
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !
|
|
2527
|
+
function da(e, t) {
|
|
2528
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !na(n, t));) n = n.previousElementSibling;
|
|
2529
2529
|
return n || null;
|
|
2530
2530
|
}
|
|
2531
|
-
function
|
|
2531
|
+
function fa(e, t) {
|
|
2532
2532
|
var n = 0;
|
|
2533
2533
|
if (!e || !e.parentNode) return -1;
|
|
2534
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2534
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || na(e, t)) && n++;
|
|
2535
2535
|
return n;
|
|
2536
2536
|
}
|
|
2537
|
-
function
|
|
2538
|
-
var t = 0, n = 0, r =
|
|
2537
|
+
function pa(e) {
|
|
2538
|
+
var t = 0, n = 0, r = ca();
|
|
2539
2539
|
if (e) do {
|
|
2540
|
-
var i =
|
|
2540
|
+
var i = oa(e), a = i.a, o = i.d;
|
|
2541
2541
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2542
2542
|
} while (e !== r && (e = e.parentNode));
|
|
2543
2543
|
return [t, n];
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2545
|
+
function ma(e, t) {
|
|
2546
2546
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2547
2547
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2548
2548
|
}
|
|
2549
2549
|
return -1;
|
|
2550
2550
|
}
|
|
2551
|
-
function
|
|
2552
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2551
|
+
function ha(e, t) {
|
|
2552
|
+
if (!e || !e.getBoundingClientRect) return ca();
|
|
2553
2553
|
var n = e, r = !1;
|
|
2554
2554
|
do
|
|
2555
2555
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2556
2556
|
var i = z(n);
|
|
2557
2557
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2558
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2558
|
+
if (!n.getBoundingClientRect || n === document.body) return ca();
|
|
2559
2559
|
if (r || t) return n;
|
|
2560
2560
|
r = !0;
|
|
2561
2561
|
}
|
|
2562
2562
|
}
|
|
2563
2563
|
while (n = n.parentNode);
|
|
2564
|
-
return
|
|
2564
|
+
return ca();
|
|
2565
2565
|
}
|
|
2566
|
-
function
|
|
2566
|
+
function ga(e, t) {
|
|
2567
2567
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2568
2568
|
return e;
|
|
2569
2569
|
}
|
|
2570
|
-
function
|
|
2570
|
+
function _a(e, t) {
|
|
2571
2571
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
2572
2572
|
}
|
|
2573
|
-
var
|
|
2574
|
-
function
|
|
2573
|
+
var va;
|
|
2574
|
+
function ya(e, t) {
|
|
2575
2575
|
return function() {
|
|
2576
|
-
if (!
|
|
2576
|
+
if (!va) {
|
|
2577
2577
|
var n = arguments, r = this;
|
|
2578
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2579
|
-
|
|
2578
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), va = setTimeout(function() {
|
|
2579
|
+
va = void 0;
|
|
2580
2580
|
}, t);
|
|
2581
2581
|
}
|
|
2582
2582
|
};
|
|
2583
2583
|
}
|
|
2584
|
-
function
|
|
2585
|
-
clearTimeout(
|
|
2584
|
+
function ba() {
|
|
2585
|
+
clearTimeout(va), va = void 0;
|
|
2586
2586
|
}
|
|
2587
|
-
function
|
|
2587
|
+
function xa(e, t, n) {
|
|
2588
2588
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2589
2589
|
}
|
|
2590
|
-
function
|
|
2590
|
+
function Sa(e) {
|
|
2591
2591
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2592
2592
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2593
2593
|
}
|
|
2594
|
-
function
|
|
2594
|
+
function Ca(e, t, n) {
|
|
2595
2595
|
var r = {};
|
|
2596
2596
|
return Array.from(e.children).forEach(function(i) {
|
|
2597
|
-
if (!(!
|
|
2597
|
+
if (!(!ia(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2598
2598
|
var a = B(i);
|
|
2599
2599
|
r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
|
|
2600
2600
|
}
|
|
2601
2601
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2602
2602
|
}
|
|
2603
2603
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2604
|
-
function
|
|
2604
|
+
function wa() {
|
|
2605
2605
|
var e = [], t;
|
|
2606
2606
|
return {
|
|
2607
2607
|
captureAnimationState: function() {
|
|
@@ -2611,9 +2611,9 @@ function Ca() {
|
|
|
2611
2611
|
target: t,
|
|
2612
2612
|
rect: B(t)
|
|
2613
2613
|
});
|
|
2614
|
-
var n =
|
|
2614
|
+
var n = Vi({}, e[e.length - 1].rect);
|
|
2615
2615
|
if (t.thisAnimationDuration) {
|
|
2616
|
-
var r =
|
|
2616
|
+
var r = oa(t, !0);
|
|
2617
2617
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2618
2618
|
}
|
|
2619
2619
|
t.fromRect = n;
|
|
@@ -2624,7 +2624,7 @@ function Ca() {
|
|
|
2624
2624
|
e.push(t);
|
|
2625
2625
|
},
|
|
2626
2626
|
removeAnimationState: function(t) {
|
|
2627
|
-
e.splice(
|
|
2627
|
+
e.splice(ma(e, { target: t }), 1);
|
|
2628
2628
|
},
|
|
2629
2629
|
animateAll: function(n) {
|
|
2630
2630
|
var r = this;
|
|
@@ -2634,8 +2634,8 @@ function Ca() {
|
|
|
2634
2634
|
}
|
|
2635
2635
|
var i = !1, a = 0;
|
|
2636
2636
|
e.forEach(function(e) {
|
|
2637
|
-
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2638
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2637
|
+
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = oa(n, !0);
|
|
2638
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && _a(c, s) && !_a(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ea(u, c, l, r.options)), _a(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
2639
2639
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2640
2640
|
}, t), n.thisAnimationDuration = t);
|
|
2641
2641
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2645,26 +2645,26 @@ function Ca() {
|
|
|
2645
2645
|
animate: function(e, t, n, r) {
|
|
2646
2646
|
if (r) {
|
|
2647
2647
|
z(e, "transition", ""), z(e, "transform", "");
|
|
2648
|
-
var i =
|
|
2649
|
-
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2648
|
+
var i = oa(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2649
|
+
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Ta(e), z(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), z(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2650
2650
|
z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2651
2651
|
}, r);
|
|
2652
2652
|
}
|
|
2653
2653
|
}
|
|
2654
2654
|
};
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2656
|
+
function Ta(e) {
|
|
2657
2657
|
return e.offsetWidth;
|
|
2658
2658
|
}
|
|
2659
|
-
function
|
|
2659
|
+
function Ea(e, t, n, r) {
|
|
2660
2660
|
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
2661
2661
|
}
|
|
2662
|
-
var
|
|
2662
|
+
var Da = [], Oa = { initializeByDefault: !0 }, ka = {
|
|
2663
2663
|
mount: function(e) {
|
|
2664
|
-
for (var t in
|
|
2665
|
-
|
|
2664
|
+
for (var t in Oa) Oa.hasOwnProperty(t) && !(t in e) && (e[t] = Oa[t]);
|
|
2665
|
+
Da.forEach(function(t) {
|
|
2666
2666
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2667
|
-
}),
|
|
2667
|
+
}), Da.push(e);
|
|
2668
2668
|
},
|
|
2669
2669
|
pluginEvent: function(e, t, n) {
|
|
2670
2670
|
var r = this;
|
|
@@ -2672,16 +2672,16 @@ var Ea = [], Da = { initializeByDefault: !0 }, Oa = {
|
|
|
2672
2672
|
r.eventCanceled = !0;
|
|
2673
2673
|
};
|
|
2674
2674
|
var i = e + "Global";
|
|
2675
|
-
|
|
2676
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2675
|
+
Da.forEach(function(r) {
|
|
2676
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Vi({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Vi({ sortable: t }, n)));
|
|
2677
2677
|
});
|
|
2678
2678
|
},
|
|
2679
2679
|
initializePlugins: function(e, t, n, r) {
|
|
2680
|
-
for (var i in
|
|
2680
|
+
for (var i in Da.forEach(function(r) {
|
|
2681
2681
|
var i = r.pluginName;
|
|
2682
2682
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2683
2683
|
var a = new r(e, t, e.options);
|
|
2684
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2684
|
+
a.sortable = e, a.options = e.options, e[i] = a, Wi(n, a.defaults);
|
|
2685
2685
|
}
|
|
2686
2686
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2687
2687
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2690,56 +2690,56 @@ var Ea = [], Da = { initializeByDefault: !0 }, Oa = {
|
|
|
2690
2690
|
},
|
|
2691
2691
|
getEventProperties: function(e, t) {
|
|
2692
2692
|
var n = {};
|
|
2693
|
-
return
|
|
2694
|
-
typeof r.eventProperties == "function" &&
|
|
2693
|
+
return Da.forEach(function(r) {
|
|
2694
|
+
typeof r.eventProperties == "function" && Wi(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2695
2695
|
}), n;
|
|
2696
2696
|
},
|
|
2697
2697
|
modifyOption: function(e, t, n) {
|
|
2698
2698
|
var r;
|
|
2699
|
-
return
|
|
2699
|
+
return Da.forEach(function(i) {
|
|
2700
2700
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2701
2701
|
}), r;
|
|
2702
2702
|
}
|
|
2703
2703
|
};
|
|
2704
|
-
function
|
|
2704
|
+
function Aa(e) {
|
|
2705
2705
|
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
2706
2706
|
if (t ||= n && n[V], t) {
|
|
2707
2707
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2708
|
-
window.CustomEvent && !
|
|
2708
|
+
window.CustomEvent && !Yi && !Xi ? h = new CustomEvent(r, {
|
|
2709
2709
|
bubbles: !0,
|
|
2710
2710
|
cancelable: !0
|
|
2711
2711
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
2712
|
-
var v =
|
|
2712
|
+
var v = Vi(Vi({}, m), ka.getEventProperties(r, t));
|
|
2713
2713
|
for (var y in v) h[y] = v[y];
|
|
2714
2714
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2715
2715
|
}
|
|
2716
2716
|
}
|
|
2717
|
-
var
|
|
2718
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2719
|
-
|
|
2717
|
+
var ja = ["evt"], H = function(e, t) {
|
|
2718
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Ki(n, ja);
|
|
2719
|
+
ka.pluginEvent.bind(Q)(e, t, Vi({
|
|
2720
2720
|
dragEl: W,
|
|
2721
2721
|
parentEl: G,
|
|
2722
2722
|
ghostEl: K,
|
|
2723
2723
|
rootEl: q,
|
|
2724
|
-
nextEl:
|
|
2725
|
-
lastDownEl:
|
|
2724
|
+
nextEl: Ma,
|
|
2725
|
+
lastDownEl: Na,
|
|
2726
2726
|
cloneEl: J,
|
|
2727
|
-
cloneHidden:
|
|
2728
|
-
dragStarted:
|
|
2727
|
+
cloneHidden: Pa,
|
|
2728
|
+
dragStarted: Ja,
|
|
2729
2729
|
putSortable: X,
|
|
2730
2730
|
activeSortable: Q.active,
|
|
2731
2731
|
originalEvent: r,
|
|
2732
|
-
oldIndex:
|
|
2733
|
-
oldDraggableIndex:
|
|
2732
|
+
oldIndex: Fa,
|
|
2733
|
+
oldDraggableIndex: Ia,
|
|
2734
2734
|
newIndex: Y,
|
|
2735
|
-
newDraggableIndex:
|
|
2736
|
-
hideGhostForTarget:
|
|
2737
|
-
unhideGhostForTarget:
|
|
2735
|
+
newDraggableIndex: La,
|
|
2736
|
+
hideGhostForTarget: po,
|
|
2737
|
+
unhideGhostForTarget: mo,
|
|
2738
2738
|
cloneNowHidden: function() {
|
|
2739
|
-
|
|
2739
|
+
Pa = !0;
|
|
2740
2740
|
},
|
|
2741
2741
|
cloneNowShown: function() {
|
|
2742
|
-
|
|
2742
|
+
Pa = !1;
|
|
2743
2743
|
},
|
|
2744
2744
|
dispatchSortableEvent: function(e) {
|
|
2745
2745
|
U({
|
|
@@ -2751,45 +2751,45 @@ var Aa = ["evt"], H = function(e, t) {
|
|
|
2751
2751
|
}, i));
|
|
2752
2752
|
};
|
|
2753
2753
|
function U(e) {
|
|
2754
|
-
|
|
2754
|
+
Aa(Vi({
|
|
2755
2755
|
putSortable: X,
|
|
2756
2756
|
cloneEl: J,
|
|
2757
2757
|
targetEl: W,
|
|
2758
2758
|
rootEl: q,
|
|
2759
|
-
oldIndex:
|
|
2760
|
-
oldDraggableIndex:
|
|
2759
|
+
oldIndex: Fa,
|
|
2760
|
+
oldDraggableIndex: Ia,
|
|
2761
2761
|
newIndex: Y,
|
|
2762
|
-
newDraggableIndex:
|
|
2762
|
+
newDraggableIndex: La
|
|
2763
2763
|
}, e));
|
|
2764
2764
|
}
|
|
2765
|
-
var W, G, K, q,
|
|
2766
|
-
if (
|
|
2767
|
-
if (
|
|
2765
|
+
var W, G, K, q, Ma, Na, J, Pa, Fa, Y, Ia, La, Ra, X, za = !1, Ba = !1, Va = [], Ha, Ua, Wa, Ga, Ka, qa, Ja, Ya, Xa, Za = !1, Qa = !1, $a, Z, eo = [], to = !1, no = [], ro = typeof document < "u", io = $i, ao = Xi || Yi ? "cssFloat" : "float", oo = ro && !ea && !$i && "draggable" in document.createElement("div"), so = function() {
|
|
2766
|
+
if (ro) {
|
|
2767
|
+
if (Yi) return !1;
|
|
2768
2768
|
var e = document.createElement("x");
|
|
2769
2769
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2770
2770
|
}
|
|
2771
|
-
}(),
|
|
2772
|
-
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2771
|
+
}(), co = function(e, t) {
|
|
2772
|
+
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = ua(e, 0, t), a = ua(e, 1, t), o = i && z(i), s = a && z(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + B(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + B(a).width;
|
|
2773
2773
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2774
2774
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2775
2775
|
if (i && o.float && o.float !== "none") {
|
|
2776
2776
|
var u = o.float === "left" ? "left" : "right";
|
|
2777
2777
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2778
2778
|
}
|
|
2779
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2780
|
-
},
|
|
2779
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ao] === "none" || a && n[ao] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2780
|
+
}, lo = function(e, t, n) {
|
|
2781
2781
|
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
2782
2782
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2783
|
-
},
|
|
2783
|
+
}, uo = function(e, t) {
|
|
2784
2784
|
var n;
|
|
2785
|
-
return
|
|
2785
|
+
return Va.some(function(r) {
|
|
2786
2786
|
var i = r[V].options.emptyInsertThreshold;
|
|
2787
|
-
if (!(!i ||
|
|
2787
|
+
if (!(!i || da(r))) {
|
|
2788
2788
|
var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2789
2789
|
if (o && s) return n = r;
|
|
2790
2790
|
}
|
|
2791
2791
|
}), n;
|
|
2792
|
-
},
|
|
2792
|
+
}, fo = function(e) {
|
|
2793
2793
|
function t(e, n) {
|
|
2794
2794
|
return function(r, i, a, o) {
|
|
2795
2795
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2802,31 +2802,31 @@ var W, G, K, q, ja, Ma, J, Na, Pa, Y, Fa, Ia, La, X, Ra = !1, za = !1, Ba = [],
|
|
|
2802
2802
|
};
|
|
2803
2803
|
}
|
|
2804
2804
|
var n = {}, r = e.group;
|
|
2805
|
-
(!r ||
|
|
2806
|
-
}, fo = function() {
|
|
2807
|
-
!oo && K && z(K, "display", "none");
|
|
2805
|
+
(!r || Hi(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;
|
|
2808
2806
|
}, po = function() {
|
|
2809
|
-
!
|
|
2807
|
+
!so && K && z(K, "display", "none");
|
|
2808
|
+
}, mo = function() {
|
|
2809
|
+
!so && K && z(K, "display", "");
|
|
2810
2810
|
};
|
|
2811
|
-
|
|
2812
|
-
if (
|
|
2811
|
+
ro && !ea && document.addEventListener("click", function(e) {
|
|
2812
|
+
if (Ba) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ba = !1, !1;
|
|
2813
2813
|
}, !0);
|
|
2814
|
-
var
|
|
2814
|
+
var ho = function(e) {
|
|
2815
2815
|
if (W) {
|
|
2816
2816
|
e = e.touches ? e.touches[0] : e;
|
|
2817
|
-
var t =
|
|
2817
|
+
var t = uo(e.clientX, e.clientY);
|
|
2818
2818
|
if (t) {
|
|
2819
2819
|
var n = {};
|
|
2820
2820
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2821
2821
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2822
2822
|
}
|
|
2823
2823
|
}
|
|
2824
|
-
},
|
|
2824
|
+
}, go = function(e) {
|
|
2825
2825
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2826
2826
|
};
|
|
2827
2827
|
function Q(e, t) {
|
|
2828
2828
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2829
|
-
this.el = e, this.options = t =
|
|
2829
|
+
this.el = e, this.options = t = Wi({}, t), e[V] = this;
|
|
2830
2830
|
var n = {
|
|
2831
2831
|
group: null,
|
|
2832
2832
|
sort: !0,
|
|
@@ -2839,7 +2839,7 @@ function Q(e, t) {
|
|
|
2839
2839
|
invertedSwapThreshold: null,
|
|
2840
2840
|
removeCloneOnHide: !0,
|
|
2841
2841
|
direction: function() {
|
|
2842
|
-
return
|
|
2842
|
+
return co(e, this.options);
|
|
2843
2843
|
},
|
|
2844
2844
|
ghostClass: "sortable-ghost",
|
|
2845
2845
|
chosenClass: "sortable-chosen",
|
|
@@ -2866,17 +2866,17 @@ function Q(e, t) {
|
|
|
2866
2866
|
x: 0,
|
|
2867
2867
|
y: 0
|
|
2868
2868
|
},
|
|
2869
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2869
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Qi,
|
|
2870
2870
|
emptyInsertThreshold: 5
|
|
2871
2871
|
};
|
|
2872
|
-
for (var r in
|
|
2873
|
-
for (var i in
|
|
2874
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
2872
|
+
for (var r in ka.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2873
|
+
for (var i in fo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2874
|
+
this.nativeDraggable = !t.forceFallback && oo, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? I(e, "pointerdown", this._onTapStart) : (I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart)), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), Va.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Wi(this, wa());
|
|
2875
2875
|
}
|
|
2876
2876
|
Q.prototype = {
|
|
2877
2877
|
constructor: Q,
|
|
2878
2878
|
_isOutsideThisEl: function(e) {
|
|
2879
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2879
|
+
!this.el.contains(e) && e !== this.el && (Ya = null);
|
|
2880
2880
|
},
|
|
2881
2881
|
_getDirection: function(e, t) {
|
|
2882
2882
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2884,8 +2884,8 @@ Q.prototype = {
|
|
|
2884
2884
|
_onTapStart: function(e) {
|
|
2885
2885
|
if (e.cancelable) {
|
|
2886
2886
|
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
2887
|
-
if (
|
|
2888
|
-
if (
|
|
2887
|
+
if (Eo(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Qi && s && s.tagName.toUpperCase() === "SELECT") && (s = ia(s, r.draggable, n, !1), !(s && s.animated) && Na !== s)) {
|
|
2888
|
+
if (Fa = fa(s), Ia = fa(s, r.draggable), typeof l == "function") {
|
|
2889
2889
|
if (l.call(this, e, s, this)) {
|
|
2890
2890
|
U({
|
|
2891
2891
|
sortable: t,
|
|
@@ -2898,7 +2898,7 @@ Q.prototype = {
|
|
|
2898
2898
|
return;
|
|
2899
2899
|
}
|
|
2900
2900
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2901
|
-
if (r =
|
|
2901
|
+
if (r = ia(c, r.trim(), n, !1), r) return U({
|
|
2902
2902
|
sortable: t,
|
|
2903
2903
|
rootEl: r,
|
|
2904
2904
|
name: "filter",
|
|
@@ -2910,7 +2910,7 @@ Q.prototype = {
|
|
|
2910
2910
|
i && e.cancelable && e.preventDefault();
|
|
2911
2911
|
return;
|
|
2912
2912
|
}
|
|
2913
|
-
r.handle && !
|
|
2913
|
+
r.handle && !ia(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2914
2914
|
}
|
|
2915
2915
|
}
|
|
2916
2916
|
},
|
|
@@ -2918,23 +2918,23 @@ Q.prototype = {
|
|
|
2918
2918
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2919
2919
|
if (n && !W && n.parentNode === i) {
|
|
2920
2920
|
var c = B(n);
|
|
2921
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2921
|
+
if (q = i, W = n, G = W.parentNode, Ma = W.nextSibling, Na = n, Ra = a.group, Q.dragged = W, Ha = {
|
|
2922
2922
|
target: W,
|
|
2923
2923
|
clientX: (t || e).clientX,
|
|
2924
2924
|
clientY: (t || e).clientY
|
|
2925
|
-
},
|
|
2925
|
+
}, Ka = Ha.clientX - c.left, qa = Ha.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2926
2926
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2927
2927
|
r._onDrop();
|
|
2928
2928
|
return;
|
|
2929
2929
|
}
|
|
2930
|
-
r._disableDelayedDragEvents(), !
|
|
2930
|
+
r._disableDelayedDragEvents(), !Zi && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2931
2931
|
sortable: r,
|
|
2932
2932
|
name: "choose",
|
|
2933
2933
|
originalEvent: e
|
|
2934
2934
|
}), R(W, a.chosenClass, !0);
|
|
2935
2935
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2936
|
-
|
|
2937
|
-
}), I(o, "dragover",
|
|
2936
|
+
sa(W, e.trim(), yo);
|
|
2937
|
+
}), I(o, "dragover", ho), I(o, "mousemove", ho), I(o, "touchmove", ho), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), Zi && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Xi || Yi))) {
|
|
2938
2938
|
if (Q.eventCanceled) {
|
|
2939
2939
|
this._onDrop();
|
|
2940
2940
|
return;
|
|
@@ -2948,7 +2948,7 @@ Q.prototype = {
|
|
|
2948
2948
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
2949
2949
|
},
|
|
2950
2950
|
_disableDelayedDrag: function() {
|
|
2951
|
-
W &&
|
|
2951
|
+
W && yo(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2952
2952
|
},
|
|
2953
2953
|
_disableDelayedDragEvents: function() {
|
|
2954
2954
|
var e = this.el.ownerDocument;
|
|
@@ -2957,14 +2957,14 @@ Q.prototype = {
|
|
|
2957
2957
|
_triggerDragStart: function(e, t) {
|
|
2958
2958
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : t ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(W, "dragend", this), I(q, "dragstart", this._onDragStart));
|
|
2959
2959
|
try {
|
|
2960
|
-
document.selection ?
|
|
2960
|
+
document.selection ? Do(function() {
|
|
2961
2961
|
document.selection.empty();
|
|
2962
2962
|
}) : window.getSelection().removeAllRanges();
|
|
2963
2963
|
} catch {}
|
|
2964
2964
|
},
|
|
2965
2965
|
_dragStarted: function(e, t) {
|
|
2966
|
-
if (
|
|
2967
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover",
|
|
2966
|
+
if (za = !1, q && W) {
|
|
2967
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", go);
|
|
2968
2968
|
var n = this.options;
|
|
2969
2969
|
!e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2970
2970
|
sortable: this,
|
|
@@ -2974,33 +2974,33 @@ Q.prototype = {
|
|
|
2974
2974
|
} else this._nulling();
|
|
2975
2975
|
},
|
|
2976
2976
|
_emulateDragOver: function() {
|
|
2977
|
-
if (
|
|
2978
|
-
this._lastX =
|
|
2979
|
-
for (var e = document.elementFromPoint(
|
|
2977
|
+
if (Ua) {
|
|
2978
|
+
this._lastX = Ua.clientX, this._lastY = Ua.clientY, po();
|
|
2979
|
+
for (var e = document.elementFromPoint(Ua.clientX, Ua.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Ua.clientX, Ua.clientY), e !== t);) t = e;
|
|
2980
2980
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2981
2981
|
if (t[V]) {
|
|
2982
2982
|
var n = void 0;
|
|
2983
2983
|
if (n = t[V]._onDragOver({
|
|
2984
|
-
clientX:
|
|
2985
|
-
clientY:
|
|
2984
|
+
clientX: Ua.clientX,
|
|
2985
|
+
clientY: Ua.clientY,
|
|
2986
2986
|
target: e,
|
|
2987
2987
|
rootEl: t
|
|
2988
2988
|
}), n && !this.options.dragoverBubble) break;
|
|
2989
2989
|
}
|
|
2990
2990
|
e = t;
|
|
2991
2991
|
} while (t = t.parentNode);
|
|
2992
|
-
|
|
2992
|
+
mo();
|
|
2993
2993
|
}
|
|
2994
2994
|
},
|
|
2995
2995
|
_onTouchMove: function(e) {
|
|
2996
|
-
if (
|
|
2997
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2998
|
-
if (!Q.active && !
|
|
2996
|
+
if (Ha) {
|
|
2997
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && oa(K, !0), o = K && a && a.a, s = K && a && a.d, c = io && Z && pa(Z), l = (i.clientX - Ha.clientX + r.x) / (o || 1) + (c ? c[0] - eo[0] : 0) / (o || 1), u = (i.clientY - Ha.clientY + r.y) / (s || 1) + (c ? c[1] - eo[1] : 0) / (s || 1);
|
|
2998
|
+
if (!Q.active && !za) {
|
|
2999
2999
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3000
3000
|
this._onDragStart(e, !0);
|
|
3001
3001
|
}
|
|
3002
3002
|
if (K) {
|
|
3003
|
-
a ? (a.e += l - (
|
|
3003
|
+
a ? (a.e += l - (Wa || 0), a.f += u - (Ga || 0)) : a = {
|
|
3004
3004
|
a: 1,
|
|
3005
3005
|
b: 0,
|
|
3006
3006
|
c: 0,
|
|
@@ -3009,19 +3009,19 @@ Q.prototype = {
|
|
|
3009
3009
|
f: u
|
|
3010
3010
|
};
|
|
3011
3011
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3012
|
-
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d),
|
|
3012
|
+
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), Wa = l, Ga = u, Ua = i;
|
|
3013
3013
|
}
|
|
3014
3014
|
e.cancelable && e.preventDefault();
|
|
3015
3015
|
}
|
|
3016
3016
|
},
|
|
3017
3017
|
_appendGhost: function() {
|
|
3018
3018
|
if (!K) {
|
|
3019
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0,
|
|
3020
|
-
if (
|
|
3019
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, io, !0, e), n = this.options;
|
|
3020
|
+
if (io) {
|
|
3021
3021
|
for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3022
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3022
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = ca()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = ca(), eo = pa(Z);
|
|
3023
3023
|
}
|
|
3024
|
-
K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position",
|
|
3024
|
+
K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position", io ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", Ka / parseInt(K.style.width) * 100 + "% " + qa / parseInt(K.style.height) * 100 + "%");
|
|
3025
3025
|
}
|
|
3026
3026
|
},
|
|
3027
3027
|
_onDragStart: function(e, t) {
|
|
@@ -3030,18 +3030,18 @@ Q.prototype = {
|
|
|
3030
3030
|
this._onDrop();
|
|
3031
3031
|
return;
|
|
3032
3032
|
}
|
|
3033
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
3033
|
+
H("setupClone", this), Q.eventCanceled || (J = Sa(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Do(function() {
|
|
3034
3034
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
3035
3035
|
sortable: n,
|
|
3036
3036
|
name: "clone"
|
|
3037
3037
|
}));
|
|
3038
|
-
}), !t && R(W, i.dragClass, !0), t ? (
|
|
3038
|
+
}), !t && R(W, i.dragClass, !0), t ? (Ba = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (L(document, "mouseup", n._onDrop), L(document, "touchend", n._onDrop), L(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), I(document, "drop", n), z(W, "transform", "translateZ(0)")), za = !0, n._dragStartId = Do(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), Ja = !0, Qi && z(document.body, "user-select", "none");
|
|
3039
3039
|
},
|
|
3040
3040
|
_onDragOver: function(e) {
|
|
3041
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3042
|
-
if (
|
|
3041
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Ra === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3042
|
+
if (to) return;
|
|
3043
3043
|
function h(o, s) {
|
|
3044
|
-
H(o, p,
|
|
3044
|
+
H(o, p, Vi({
|
|
3045
3045
|
evt: e,
|
|
3046
3046
|
isOwner: l,
|
|
3047
3047
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3053,7 +3053,7 @@ Q.prototype = {
|
|
|
3053
3053
|
target: n,
|
|
3054
3054
|
completed: _,
|
|
3055
3055
|
onMove: function(n, i) {
|
|
3056
|
-
return
|
|
3056
|
+
return vo(q, t, W, r, n, B(n), e, i);
|
|
3057
3057
|
},
|
|
3058
3058
|
changed: v
|
|
3059
3059
|
}, s));
|
|
@@ -3064,48 +3064,48 @@ Q.prototype = {
|
|
|
3064
3064
|
function _(r) {
|
|
3065
3065
|
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (R(W, X ? X.options.ghostClass : c.options.ghostClass, !1), R(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3066
3066
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3067
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
3067
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (Ya = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && ho(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3068
3068
|
}
|
|
3069
3069
|
function v() {
|
|
3070
|
-
Y =
|
|
3070
|
+
Y = fa(W), La = fa(W, o.draggable), U({
|
|
3071
3071
|
sortable: p,
|
|
3072
3072
|
name: "change",
|
|
3073
3073
|
toEl: t,
|
|
3074
3074
|
newIndex: Y,
|
|
3075
|
-
newDraggableIndex:
|
|
3075
|
+
newDraggableIndex: La,
|
|
3076
3076
|
originalEvent: e
|
|
3077
3077
|
});
|
|
3078
3078
|
}
|
|
3079
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3079
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ia(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3080
3080
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3081
|
-
if (
|
|
3081
|
+
if (Ba = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Ra.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
3082
3082
|
if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3083
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3084
|
-
var y =
|
|
3085
|
-
if (!y ||
|
|
3083
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Ma ? q.insertBefore(W, Ma) : q.appendChild(W)), _(!0);
|
|
3084
|
+
var y = da(t, o.draggable);
|
|
3085
|
+
if (!y || So(e, f, this) && !y.animated) {
|
|
3086
3086
|
if (y === W) return _(!1);
|
|
3087
|
-
if (y && t === e.target && (n = y), n && (i = B(n)),
|
|
3088
|
-
} else if (y &&
|
|
3089
|
-
var b =
|
|
3087
|
+
if (y && t === e.target && (n = y), n && (i = B(n)), vo(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);
|
|
3088
|
+
} else if (y && xo(e, f, this)) {
|
|
3089
|
+
var b = ua(t, 0, o, !0);
|
|
3090
3090
|
if (b === W) return _(!1);
|
|
3091
|
-
if (n = b, i = B(n),
|
|
3091
|
+
if (n = b, i = B(n), vo(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
3092
3092
|
} else if (n.parentNode === t) {
|
|
3093
3093
|
i = B(n);
|
|
3094
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
3095
|
-
|
|
3094
|
+
var x = 0, S, C = W.parentNode !== t, w = !lo(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = la(n, "top", "top") || la(W, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3095
|
+
Ya !== n && (S = i[T], Za = !1, Qa = !w && o.invertSwap || C), x = Co(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Qa, Ya === n);
|
|
3096
3096
|
var O;
|
|
3097
3097
|
if (x !== 0) {
|
|
3098
|
-
var k =
|
|
3098
|
+
var k = fa(W);
|
|
3099
3099
|
do
|
|
3100
3100
|
k -= x, O = G.children[k];
|
|
3101
3101
|
while (O && (z(O, "display") === "none" || O === K));
|
|
3102
3102
|
}
|
|
3103
3103
|
if (x === 0 || O === n) return _(!1);
|
|
3104
|
-
|
|
3104
|
+
Ya = n, Xa = x;
|
|
3105
3105
|
var ee = n.nextElementSibling, A = !1;
|
|
3106
3106
|
A = x === 1;
|
|
3107
|
-
var te =
|
|
3108
|
-
if (te !== !1) return (te === 1 || te === -1) && (A = te === 1),
|
|
3107
|
+
var te = vo(q, t, W, r, n, i, e, A);
|
|
3108
|
+
if (te !== !1) return (te === 1 || te === -1) && (A = te === 1), to = !0, setTimeout(bo, 30), g(), A && !ee ? t.appendChild(W) : n.parentNode.insertBefore(W, A ? ee : n), E && xa(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !Qa && ($a = Math.abs(S - B(n)[T])), v(), _(!0);
|
|
3109
3109
|
}
|
|
3110
3110
|
if (t.contains(W)) return _(!1);
|
|
3111
3111
|
}
|
|
@@ -3113,7 +3113,7 @@ Q.prototype = {
|
|
|
3113
3113
|
},
|
|
3114
3114
|
_ignoreWhileAnimating: null,
|
|
3115
3115
|
_offMoveEvents: function() {
|
|
3116
|
-
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover",
|
|
3116
|
+
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", ho), L(document, "mousemove", ho), L(document, "touchmove", ho);
|
|
3117
3117
|
},
|
|
3118
3118
|
_offUpEvents: function() {
|
|
3119
3119
|
var e = this.el.ownerDocument;
|
|
@@ -3121,18 +3121,18 @@ Q.prototype = {
|
|
|
3121
3121
|
},
|
|
3122
3122
|
_onDrop: function(e) {
|
|
3123
3123
|
var t = this.el, n = this.options;
|
|
3124
|
-
if (Y =
|
|
3124
|
+
if (Y = fa(W), La = fa(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = fa(W), La = fa(W, n.draggable), Q.eventCanceled) {
|
|
3125
3125
|
this._nulling();
|
|
3126
3126
|
return;
|
|
3127
3127
|
}
|
|
3128
|
-
|
|
3128
|
+
za = !1, Qa = !1, Za = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Oo(this.cloneId), Oo(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Qi && z(document.body, "user-select", ""), z(W, "transform", ""), e && (Ja && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && L(W, "dragend", this), yo(W), W.style["will-change"] = "", Ja && !za && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
|
|
3129
3129
|
sortable: this,
|
|
3130
3130
|
name: "unchoose",
|
|
3131
3131
|
toEl: G,
|
|
3132
3132
|
newIndex: null,
|
|
3133
3133
|
newDraggableIndex: null,
|
|
3134
3134
|
originalEvent: e
|
|
3135
|
-
}), q === G ? Y !==
|
|
3135
|
+
}), q === G ? Y !== Fa && Y >= 0 && (U({
|
|
3136
3136
|
sortable: this,
|
|
3137
3137
|
name: "update",
|
|
3138
3138
|
toEl: G,
|
|
@@ -3164,7 +3164,7 @@ Q.prototype = {
|
|
|
3164
3164
|
name: "sort",
|
|
3165
3165
|
toEl: G,
|
|
3166
3166
|
originalEvent: e
|
|
3167
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
3167
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = Fa, La = Ia), U({
|
|
3168
3168
|
sortable: this,
|
|
3169
3169
|
name: "end",
|
|
3170
3170
|
toEl: G,
|
|
@@ -3172,9 +3172,9 @@ Q.prototype = {
|
|
|
3172
3172
|
}), this.save()))), this._nulling();
|
|
3173
3173
|
},
|
|
3174
3174
|
_nulling: function() {
|
|
3175
|
-
H("nulling", this), q = W = G = K =
|
|
3175
|
+
H("nulling", this), q = W = G = K = Ma = J = Na = Pa = Ha = Ua = Ja = Y = La = Fa = Ia = Ya = Xa = X = Ra = Q.dragged = Q.ghost = Q.clone = Q.active = null, no.forEach(function(e) {
|
|
3176
3176
|
e.checked = !0;
|
|
3177
|
-
}),
|
|
3177
|
+
}), no.length = Wa = Ga = 0;
|
|
3178
3178
|
},
|
|
3179
3179
|
handleEvent: function(e) {
|
|
3180
3180
|
switch (e.type) {
|
|
@@ -3184,7 +3184,7 @@ Q.prototype = {
|
|
|
3184
3184
|
break;
|
|
3185
3185
|
case "dragenter":
|
|
3186
3186
|
case "dragover":
|
|
3187
|
-
W && (this._onDragOver(e),
|
|
3187
|
+
W && (this._onDragOver(e), _o(e));
|
|
3188
3188
|
break;
|
|
3189
3189
|
case "selectstart":
|
|
3190
3190
|
e.preventDefault();
|
|
@@ -3192,14 +3192,14 @@ Q.prototype = {
|
|
|
3192
3192
|
}
|
|
3193
3193
|
},
|
|
3194
3194
|
toArray: function() {
|
|
3195
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3195
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], ia(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || To(t));
|
|
3196
3196
|
return e;
|
|
3197
3197
|
},
|
|
3198
3198
|
sort: function(e, t) {
|
|
3199
3199
|
var n = {}, r = this.el;
|
|
3200
3200
|
this.toArray().forEach(function(e, t) {
|
|
3201
3201
|
var i = r.children[t];
|
|
3202
|
-
|
|
3202
|
+
ia(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3203
3203
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3204
3204
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3205
3205
|
}), t && this.animateAll();
|
|
@@ -3209,25 +3209,25 @@ Q.prototype = {
|
|
|
3209
3209
|
e && e.set && e.set(this);
|
|
3210
3210
|
},
|
|
3211
3211
|
closest: function(e, t) {
|
|
3212
|
-
return
|
|
3212
|
+
return ia(e, t || this.options.draggable, this.el, !1);
|
|
3213
3213
|
},
|
|
3214
3214
|
option: function(e, t) {
|
|
3215
3215
|
var n = this.options;
|
|
3216
3216
|
if (t === void 0) return n[e];
|
|
3217
|
-
var r =
|
|
3218
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
3217
|
+
var r = ka.modifyOption(this, e, t);
|
|
3218
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && fo(n);
|
|
3219
3219
|
},
|
|
3220
3220
|
destroy: function() {
|
|
3221
3221
|
H("destroy", this);
|
|
3222
3222
|
var e = this.el;
|
|
3223
3223
|
e[V] = null, L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart), L(e, "pointerdown", this._onTapStart), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3224
3224
|
e.removeAttribute("draggable");
|
|
3225
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3225
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Va.splice(Va.indexOf(this.el), 1), this.el = e = null;
|
|
3226
3226
|
},
|
|
3227
3227
|
_hideClone: function() {
|
|
3228
|
-
if (!
|
|
3228
|
+
if (!Pa) {
|
|
3229
3229
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3230
|
-
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J),
|
|
3230
|
+
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Pa = !0;
|
|
3231
3231
|
}
|
|
3232
3232
|
},
|
|
3233
3233
|
_showClone: function(e) {
|
|
@@ -3235,99 +3235,99 @@ Q.prototype = {
|
|
|
3235
3235
|
this._hideClone();
|
|
3236
3236
|
return;
|
|
3237
3237
|
}
|
|
3238
|
-
if (
|
|
3238
|
+
if (Pa) {
|
|
3239
3239
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
3240
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
3240
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Ma ? q.insertBefore(J, Ma) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), Pa = !1;
|
|
3241
3241
|
}
|
|
3242
3242
|
}
|
|
3243
3243
|
};
|
|
3244
|
-
function
|
|
3244
|
+
function _o(e) {
|
|
3245
3245
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3246
3246
|
}
|
|
3247
|
-
function
|
|
3247
|
+
function vo(e, t, n, r, i, a, o, s) {
|
|
3248
3248
|
var c, l = e[V], u = l.options.onMove, d;
|
|
3249
|
-
return window.CustomEvent && !
|
|
3249
|
+
return window.CustomEvent && !Yi && !Xi ? c = new CustomEvent("move", {
|
|
3250
3250
|
bubbles: !0,
|
|
3251
3251
|
cancelable: !0
|
|
3252
3252
|
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || B(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3253
3253
|
}
|
|
3254
|
-
function
|
|
3254
|
+
function yo(e) {
|
|
3255
3255
|
e.draggable = !1;
|
|
3256
3256
|
}
|
|
3257
|
-
function
|
|
3258
|
-
|
|
3257
|
+
function bo() {
|
|
3258
|
+
to = !1;
|
|
3259
3259
|
}
|
|
3260
|
-
function
|
|
3261
|
-
var r = B(
|
|
3260
|
+
function xo(e, t, n) {
|
|
3261
|
+
var r = B(ua(n.el, 0, n.options, !0)), i = Ca(n.el, n.options, K), a = 10;
|
|
3262
3262
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3265
|
-
var r = B(
|
|
3264
|
+
function So(e, t, n) {
|
|
3265
|
+
var r = B(da(n.el, n.options.draggable)), i = Ca(n.el, n.options, K), a = 10;
|
|
3266
3266
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
3267
3267
|
}
|
|
3268
|
-
function
|
|
3268
|
+
function Co(e, t, n, r, i, a, o, s) {
|
|
3269
3269
|
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
3270
3270
|
if (!o) {
|
|
3271
|
-
if (s &&
|
|
3272
|
-
if (!
|
|
3273
|
-
else if (
|
|
3274
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3271
|
+
if (s && $a < l * i) {
|
|
3272
|
+
if (!Za && (Xa === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Za = !0), Za) f = !0;
|
|
3273
|
+
else if (Xa === 1 ? c < u + $a : c > d - $a) return -Xa;
|
|
3274
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return wo(t);
|
|
3275
3275
|
}
|
|
3276
3276
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3277
3277
|
}
|
|
3278
|
-
function Co(e) {
|
|
3279
|
-
return da(W) < da(e) ? 1 : -1;
|
|
3280
|
-
}
|
|
3281
3278
|
function wo(e) {
|
|
3279
|
+
return fa(W) < fa(e) ? 1 : -1;
|
|
3280
|
+
}
|
|
3281
|
+
function To(e) {
|
|
3282
3282
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3283
3283
|
return r.toString(36);
|
|
3284
3284
|
}
|
|
3285
|
-
function
|
|
3286
|
-
|
|
3285
|
+
function Eo(e) {
|
|
3286
|
+
no.length = 0;
|
|
3287
3287
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3288
3288
|
var r = t[n];
|
|
3289
|
-
r.checked &&
|
|
3289
|
+
r.checked && no.push(r);
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
3292
|
-
function
|
|
3292
|
+
function Do(e) {
|
|
3293
3293
|
return setTimeout(e, 0);
|
|
3294
3294
|
}
|
|
3295
|
-
function
|
|
3295
|
+
function Oo(e) {
|
|
3296
3296
|
return clearTimeout(e);
|
|
3297
3297
|
}
|
|
3298
|
-
|
|
3299
|
-
(Q.active ||
|
|
3298
|
+
ro && I(document, "touchmove", function(e) {
|
|
3299
|
+
(Q.active || za) && e.cancelable && e.preventDefault();
|
|
3300
3300
|
}), Q.utils = {
|
|
3301
3301
|
on: I,
|
|
3302
3302
|
off: L,
|
|
3303
3303
|
css: z,
|
|
3304
|
-
find:
|
|
3304
|
+
find: sa,
|
|
3305
3305
|
is: function(e, t) {
|
|
3306
|
-
return !!
|
|
3306
|
+
return !!ia(e, t, e, !1);
|
|
3307
3307
|
},
|
|
3308
|
-
extend:
|
|
3309
|
-
throttle:
|
|
3310
|
-
closest:
|
|
3308
|
+
extend: ga,
|
|
3309
|
+
throttle: ya,
|
|
3310
|
+
closest: ia,
|
|
3311
3311
|
toggleClass: R,
|
|
3312
|
-
clone:
|
|
3313
|
-
index:
|
|
3314
|
-
nextTick:
|
|
3315
|
-
cancelNextTick:
|
|
3316
|
-
detectDirection:
|
|
3317
|
-
getChild:
|
|
3312
|
+
clone: Sa,
|
|
3313
|
+
index: fa,
|
|
3314
|
+
nextTick: Do,
|
|
3315
|
+
cancelNextTick: Oo,
|
|
3316
|
+
detectDirection: co,
|
|
3317
|
+
getChild: ua
|
|
3318
3318
|
}, Q.get = function(e) {
|
|
3319
3319
|
return e[V];
|
|
3320
3320
|
}, Q.mount = function() {
|
|
3321
3321
|
var e = [...arguments];
|
|
3322
3322
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3323
3323
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3324
|
-
e.utils && (Q.utils =
|
|
3324
|
+
e.utils && (Q.utils = Vi(Vi({}, Q.utils), e.utils)), ka.mount(e);
|
|
3325
3325
|
});
|
|
3326
3326
|
}, Q.create = function(e, t) {
|
|
3327
3327
|
return new Q(e, t);
|
|
3328
|
-
}, Q.version =
|
|
3329
|
-
var $ = [],
|
|
3330
|
-
function
|
|
3328
|
+
}, Q.version = qi;
|
|
3329
|
+
var $ = [], ko, Ao, jo = !1, Mo, No, Po, Fo;
|
|
3330
|
+
function Io() {
|
|
3331
3331
|
function e() {
|
|
3332
3332
|
for (var e in this.defaults = {
|
|
3333
3333
|
scroll: !0,
|
|
@@ -3347,63 +3347,63 @@ function Fo() {
|
|
|
3347
3347
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3348
3348
|
},
|
|
3349
3349
|
drop: function() {
|
|
3350
|
-
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3350
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Ro(), Lo(), ba();
|
|
3351
3351
|
},
|
|
3352
3352
|
nulling: function() {
|
|
3353
|
-
|
|
3353
|
+
Po = Ao = ko = jo = Fo = Mo = No = null, $.length = 0;
|
|
3354
3354
|
},
|
|
3355
3355
|
_handleFallbackAutoScroll: function(e) {
|
|
3356
3356
|
this._handleAutoScroll(e, !0);
|
|
3357
3357
|
},
|
|
3358
3358
|
_handleAutoScroll: function(e, t) {
|
|
3359
3359
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3360
|
-
if (
|
|
3361
|
-
|
|
3362
|
-
var o =
|
|
3363
|
-
|
|
3364
|
-
var a =
|
|
3365
|
-
a !== o && (o = a,
|
|
3366
|
-
}, 10),
|
|
3360
|
+
if (Po = e, t || this.options.forceAutoScrollFallback || Xi || Yi || Qi) {
|
|
3361
|
+
zo(e, this.options, a, t);
|
|
3362
|
+
var o = ha(a, !0);
|
|
3363
|
+
jo && (!Fo || r !== Mo || i !== No) && (Fo && Ro(), Fo = setInterval(function() {
|
|
3364
|
+
var a = ha(document.elementFromPoint(r, i), !0);
|
|
3365
|
+
a !== o && (o = a, Lo()), zo(e, n.options, a, t);
|
|
3366
|
+
}, 10), Mo = r, No = i);
|
|
3367
3367
|
} else {
|
|
3368
|
-
if (!this.options.bubbleScroll ||
|
|
3369
|
-
|
|
3368
|
+
if (!this.options.bubbleScroll || ha(a, !0) === ca()) {
|
|
3369
|
+
Lo();
|
|
3370
3370
|
return;
|
|
3371
3371
|
}
|
|
3372
|
-
|
|
3372
|
+
zo(e, this.options, ha(a, !1), !1);
|
|
3373
3373
|
}
|
|
3374
3374
|
}
|
|
3375
|
-
},
|
|
3375
|
+
}, Wi(e, {
|
|
3376
3376
|
pluginName: "scroll",
|
|
3377
3377
|
initializeByDefault: !0
|
|
3378
3378
|
});
|
|
3379
3379
|
}
|
|
3380
|
-
function
|
|
3380
|
+
function Lo() {
|
|
3381
3381
|
$.forEach(function(e) {
|
|
3382
3382
|
clearInterval(e.pid);
|
|
3383
3383
|
}), $ = [];
|
|
3384
3384
|
}
|
|
3385
|
-
function
|
|
3386
|
-
clearInterval(
|
|
3385
|
+
function Ro() {
|
|
3386
|
+
clearInterval(Fo);
|
|
3387
3387
|
}
|
|
3388
|
-
var
|
|
3388
|
+
var zo = ya(function(e, t, n, r) {
|
|
3389
3389
|
if (t.scroll) {
|
|
3390
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3391
|
-
|
|
3392
|
-
var d = 0, f =
|
|
3390
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ca(), l = !1, u;
|
|
3391
|
+
Ao !== n && (Ao = n, Lo(), ko = t.scroll, u = t.scrollFn, ko === !0 && (ko = ha(n, !0)));
|
|
3392
|
+
var d = 0, f = ko;
|
|
3393
3393
|
do {
|
|
3394
3394
|
var p = f, m = B(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = z(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3395
3395
|
p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
|
|
3396
3396
|
var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
|
|
3397
3397
|
if (!$[d]) for (var ee = 0; ee <= d; ee++) $[ee] || ($[ee] = {});
|
|
3398
3398
|
($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3399
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3399
|
+
r && this.layer === 0 && Q.active._onTouchMove(Po);
|
|
3400
3400
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3401
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
3401
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Po, $[this.layer].el) !== "continue" || xa($[this.layer].el, n, t);
|
|
3402
3402
|
}.bind({ layer: d }), 24))), d++;
|
|
3403
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3404
|
-
|
|
3403
|
+
} while (t.bubbleScroll && f !== c && (f = ha(f, !1)));
|
|
3404
|
+
jo = l;
|
|
3405
3405
|
}
|
|
3406
|
-
}, 30),
|
|
3406
|
+
}, 30), Bo = function(e) {
|
|
3407
3407
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3408
3408
|
if (t) {
|
|
3409
3409
|
var c = n || i;
|
|
@@ -3415,8 +3415,8 @@ var Ro = va(function(e, t, n, r) {
|
|
|
3415
3415
|
}));
|
|
3416
3416
|
}
|
|
3417
3417
|
};
|
|
3418
|
-
function
|
|
3419
|
-
|
|
3418
|
+
function Vo() {}
|
|
3419
|
+
Vo.prototype = {
|
|
3420
3420
|
startIndex: null,
|
|
3421
3421
|
dragStart: function(e) {
|
|
3422
3422
|
var t = e.oldDraggableIndex;
|
|
@@ -3425,72 +3425,72 @@ Bo.prototype = {
|
|
|
3425
3425
|
onSpill: function(e) {
|
|
3426
3426
|
var t = e.dragEl, n = e.putSortable;
|
|
3427
3427
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3428
|
-
var r =
|
|
3428
|
+
var r = ua(this.sortable.el, this.startIndex, this.options);
|
|
3429
3429
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3430
3430
|
},
|
|
3431
|
-
drop:
|
|
3432
|
-
},
|
|
3433
|
-
function
|
|
3434
|
-
|
|
3431
|
+
drop: Bo
|
|
3432
|
+
}, Wi(Vo, { pluginName: "revertOnSpill" });
|
|
3433
|
+
function Ho() {}
|
|
3434
|
+
Ho.prototype = {
|
|
3435
3435
|
onSpill: function(e) {
|
|
3436
3436
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3437
3437
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3438
3438
|
},
|
|
3439
|
-
drop:
|
|
3440
|
-
},
|
|
3441
|
-
function
|
|
3439
|
+
drop: Bo
|
|
3440
|
+
}, Wi(Ho, { pluginName: "removeOnSpill" }), Q.mount(new Io()), Q.mount(Ho, Vo);
|
|
3441
|
+
function Uo(e) {
|
|
3442
3442
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3443
3443
|
}
|
|
3444
|
-
function
|
|
3444
|
+
function Wo(e) {
|
|
3445
3445
|
re() && r(e);
|
|
3446
3446
|
}
|
|
3447
|
-
function
|
|
3447
|
+
function Go(e) {
|
|
3448
3448
|
re() ? a(e) : ie(e);
|
|
3449
3449
|
}
|
|
3450
|
-
var
|
|
3451
|
-
function
|
|
3452
|
-
|
|
3450
|
+
var Ko = null, qo = null;
|
|
3451
|
+
function Jo(e = null, t = null) {
|
|
3452
|
+
Ko = e, qo = t;
|
|
3453
3453
|
}
|
|
3454
|
-
function
|
|
3454
|
+
function Yo() {
|
|
3455
3455
|
return {
|
|
3456
|
-
data:
|
|
3457
|
-
clonedData:
|
|
3456
|
+
data: Ko,
|
|
3457
|
+
clonedData: qo
|
|
3458
3458
|
};
|
|
3459
3459
|
}
|
|
3460
|
-
var
|
|
3461
|
-
function
|
|
3460
|
+
var Xo = Symbol("cloneElement");
|
|
3461
|
+
function Zo(...e) {
|
|
3462
3462
|
let t = re()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3463
3463
|
Array.isArray(k(i)) || (a = i, i = null);
|
|
3464
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3464
|
+
let o = null, { immediate: s = !0, clone: l = Uo, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
|
|
3465
3465
|
function p(e) {
|
|
3466
3466
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3467
3467
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3468
3468
|
let s = k(k(i)?.[r]), c = l(s);
|
|
3469
|
-
|
|
3469
|
+
Jo(s, c), a[Xo] = c;
|
|
3470
3470
|
}
|
|
3471
3471
|
function m(e) {
|
|
3472
|
-
let t = e.item[
|
|
3473
|
-
if (!
|
|
3474
|
-
if (
|
|
3472
|
+
let t = e.item[Xo];
|
|
3473
|
+
if (!ki(t)) {
|
|
3474
|
+
if (Mi(e.item), g(i)) {
|
|
3475
3475
|
let n = [...k(i)];
|
|
3476
|
-
i.value =
|
|
3476
|
+
i.value = Oi(n, e.newDraggableIndex, t);
|
|
3477
3477
|
return;
|
|
3478
3478
|
}
|
|
3479
|
-
|
|
3479
|
+
Oi(k(i), e.newDraggableIndex, t);
|
|
3480
3480
|
}
|
|
3481
3481
|
}
|
|
3482
3482
|
function h(e) {
|
|
3483
3483
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3484
|
-
if (
|
|
3485
|
-
|
|
3484
|
+
if (ji(t, n, r), o === "clone") {
|
|
3485
|
+
Mi(s);
|
|
3486
3486
|
return;
|
|
3487
3487
|
}
|
|
3488
3488
|
if (g(i)) {
|
|
3489
3489
|
let e = [...k(i)];
|
|
3490
|
-
i.value =
|
|
3490
|
+
i.value = Di(e, a);
|
|
3491
3491
|
return;
|
|
3492
3492
|
}
|
|
3493
|
-
|
|
3493
|
+
Di(k(i), a);
|
|
3494
3494
|
}
|
|
3495
3495
|
function _(e) {
|
|
3496
3496
|
if (f) {
|
|
@@ -3498,12 +3498,12 @@ function Xo(...e) {
|
|
|
3498
3498
|
return;
|
|
3499
3499
|
}
|
|
3500
3500
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3501
|
-
if (
|
|
3501
|
+
if (Mi(n), ji(t, n, r), g(i)) {
|
|
3502
3502
|
let e = [...k(i)];
|
|
3503
|
-
i.value =
|
|
3503
|
+
i.value = wi(e, a, o);
|
|
3504
3504
|
return;
|
|
3505
3505
|
}
|
|
3506
|
-
|
|
3506
|
+
wi(k(i), a, o);
|
|
3507
3507
|
}
|
|
3508
3508
|
function v(e) {
|
|
3509
3509
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3522,7 +3522,7 @@ function Xo(...e) {
|
|
|
3522
3522
|
n = null;
|
|
3523
3523
|
}
|
|
3524
3524
|
ie(() => {
|
|
3525
|
-
if (
|
|
3525
|
+
if (Jo(), o) throw o;
|
|
3526
3526
|
});
|
|
3527
3527
|
}
|
|
3528
3528
|
let y = {
|
|
@@ -3534,19 +3534,19 @@ function Xo(...e) {
|
|
|
3534
3534
|
};
|
|
3535
3535
|
function b(e) {
|
|
3536
3536
|
let n = k(r);
|
|
3537
|
-
return e ||=
|
|
3537
|
+
return e ||= Ai(n) ? Ni(n, t?.$el) : n, e && !Ii(e) && (e = e.$el), e || Ci("Root element not found"), e;
|
|
3538
3538
|
}
|
|
3539
3539
|
function x() {
|
|
3540
|
-
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3541
|
-
return
|
|
3542
|
-
|
|
3543
|
-
}),
|
|
3540
|
+
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = bi(e, ["immediate", "clone"]);
|
|
3541
|
+
return Li(r, (e, t) => {
|
|
3542
|
+
Ri(e) && (r[e] = (e, ...n) => (zi(e, Yo()), t(e, ...n)));
|
|
3543
|
+
}), Fi(i === null ? {} : y, r);
|
|
3544
3544
|
}
|
|
3545
3545
|
let S = (e) => {
|
|
3546
3546
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3547
3547
|
};
|
|
3548
3548
|
c(() => a, () => {
|
|
3549
|
-
o &&
|
|
3549
|
+
o && Li(x(), (e, t) => {
|
|
3550
3550
|
o?.option(e, t);
|
|
3551
3551
|
});
|
|
3552
3552
|
}, { deep: !0 });
|
|
@@ -3559,15 +3559,15 @@ function Xo(...e) {
|
|
|
3559
3559
|
toArray: () => o?.toArray(),
|
|
3560
3560
|
closest: (...e) => o?.closest(...e)
|
|
3561
3561
|
};
|
|
3562
|
-
return
|
|
3562
|
+
return Go(() => {
|
|
3563
3563
|
s && S();
|
|
3564
|
-
}),
|
|
3564
|
+
}), Wo(C.destroy), yi({
|
|
3565
3565
|
start: S,
|
|
3566
3566
|
pause: () => C?.option("disabled", !0),
|
|
3567
3567
|
resume: () => C?.option("disabled", !1)
|
|
3568
3568
|
}, C);
|
|
3569
3569
|
}
|
|
3570
|
-
var
|
|
3570
|
+
var Qo = [
|
|
3571
3571
|
"update",
|
|
3572
3572
|
"start",
|
|
3573
3573
|
"add",
|
|
@@ -3580,7 +3580,7 @@ var Zo = [
|
|
|
3580
3580
|
"clone",
|
|
3581
3581
|
"move",
|
|
3582
3582
|
"change"
|
|
3583
|
-
],
|
|
3583
|
+
], $o = y({
|
|
3584
3584
|
name: "VueDraggable",
|
|
3585
3585
|
model: {
|
|
3586
3586
|
prop: "modelValue",
|
|
@@ -3630,33 +3630,33 @@ var Zo = [
|
|
|
3630
3630
|
"tag",
|
|
3631
3631
|
"target",
|
|
3632
3632
|
"customUpdate",
|
|
3633
|
-
...
|
|
3633
|
+
...Qo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3634
3634
|
],
|
|
3635
|
-
emits: ["update:modelValue", ...
|
|
3635
|
+
emits: ["update:modelValue", ...Qo],
|
|
3636
3636
|
setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
|
|
3637
|
-
let o =
|
|
3637
|
+
let o = Qo.reduce((e, t) => {
|
|
3638
3638
|
let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3639
3639
|
return e[n] = (...e) => r(t, ...e), e;
|
|
3640
3640
|
}, {}), s = j(() => {
|
|
3641
|
-
let n = e(t), { modelValue: r } = n, i =
|
|
3641
|
+
let n = e(t), { modelValue: r } = n, i = bi(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
|
|
3642
3642
|
let r = k(n);
|
|
3643
3643
|
return r !== void 0 && (e[t] = r), e;
|
|
3644
3644
|
}, {});
|
|
3645
|
-
return
|
|
3645
|
+
return yi(yi({}, o), Ei(yi(yi({}, a), s)));
|
|
3646
3646
|
}), c = j({
|
|
3647
3647
|
get: () => t.modelValue,
|
|
3648
3648
|
set: (e) => r("update:modelValue", e)
|
|
3649
|
-
}), l = _(), u = ee(
|
|
3649
|
+
}), l = _(), u = ee(Zo(t.target || l, c, s));
|
|
3650
3650
|
return i(u), () => ae(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
|
|
3651
3651
|
}
|
|
3652
|
-
}),
|
|
3652
|
+
}), es = {
|
|
3653
3653
|
mounted: "mounted",
|
|
3654
3654
|
unmounted: "unmounted"
|
|
3655
3655
|
};
|
|
3656
|
-
|
|
3656
|
+
es.mounted, es.unmounted;
|
|
3657
3657
|
//#endregion
|
|
3658
3658
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3659
|
-
var
|
|
3659
|
+
var ts = { class: "tpl:w-full" }, ns = {
|
|
3660
3660
|
key: 0,
|
|
3661
3661
|
"data-testid": "section-drop-hint",
|
|
3662
3662
|
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)]"
|
|
@@ -3668,13 +3668,13 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3668
3668
|
},
|
|
3669
3669
|
setup(e) {
|
|
3670
3670
|
let n = {
|
|
3671
|
-
title:
|
|
3672
|
-
paragraph:
|
|
3673
|
-
image:
|
|
3674
|
-
button:
|
|
3675
|
-
divider:
|
|
3676
|
-
custom:
|
|
3677
|
-
}, r = e, { t: a } =
|
|
3671
|
+
title: fi,
|
|
3672
|
+
paragraph: Jr,
|
|
3673
|
+
image: Fr,
|
|
3674
|
+
button: wn,
|
|
3675
|
+
divider: gr,
|
|
3676
|
+
custom: mr
|
|
3677
|
+
}, r = e, { t: a } = Dt(), s = nt(_t, "SectionBlock"), c = N(St, null), l = N(yt, null), u = j(() => {
|
|
3678
3678
|
switch (r.block.columns) {
|
|
3679
3679
|
case "2": return ["50%", "50%"];
|
|
3680
3680
|
case "3": return [
|
|
@@ -3690,34 +3690,34 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3690
3690
|
let e = u.value.length, t = [...r.block.children];
|
|
3691
3691
|
for (; t.length < e;) t.push([]);
|
|
3692
3692
|
return t.slice(0, e);
|
|
3693
|
-
});
|
|
3694
|
-
function
|
|
3693
|
+
}), g = j(() => r.viewport === "mobile" && r.block.stackOnMobile !== !1);
|
|
3694
|
+
function _(e) {
|
|
3695
3695
|
return h.value[e] || [];
|
|
3696
3696
|
}
|
|
3697
|
-
function
|
|
3697
|
+
function v(e, t) {
|
|
3698
3698
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), i = [...r.block.children];
|
|
3699
3699
|
for (; i.length <= e;) i.push([]);
|
|
3700
3700
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
3701
3701
|
}
|
|
3702
|
-
function
|
|
3703
|
-
return
|
|
3702
|
+
function y(e) {
|
|
3703
|
+
return Yr(e, l, n);
|
|
3704
3704
|
}
|
|
3705
|
-
function
|
|
3705
|
+
function S(e, t) {
|
|
3706
3706
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
3707
3707
|
fieldValues: t.fieldValues,
|
|
3708
3708
|
dataSourceFetched: t.dataSourceFetched
|
|
3709
3709
|
});
|
|
3710
3710
|
}
|
|
3711
|
-
return (n, r) => (f(), x("div",
|
|
3711
|
+
return (n, r) => (f(), x("div", ts, [b("div", { class: o(["tpl:flex tpl:gap-0", { "tpl:flex-col": g.value }]) }, [(f(!0), x(A, null, t(h.value, (n, r) => (f(), x("div", {
|
|
3712
3712
|
key: r,
|
|
3713
|
-
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded",
|
|
3714
|
-
style: i({ width: u.value[r] })
|
|
3715
|
-
}, [w(k(
|
|
3716
|
-
"model-value":
|
|
3713
|
+
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", _(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3714
|
+
style: i({ width: g.value ? "100%" : u.value[r] })
|
|
3715
|
+
}, [w(k($o), {
|
|
3716
|
+
"model-value": _(r),
|
|
3717
3717
|
group: {
|
|
3718
3718
|
name: "blocks",
|
|
3719
3719
|
pull: !0,
|
|
3720
|
-
put: (e, t, n) => k(
|
|
3720
|
+
put: (e, t, n) => k(pi)(n)
|
|
3721
3721
|
},
|
|
3722
3722
|
animation: 150,
|
|
3723
3723
|
"ghost-class": "tpl-ghost",
|
|
@@ -3728,19 +3728,19 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3728
3728
|
"empty-insert-threshold": 20,
|
|
3729
3729
|
"force-fallback": !0,
|
|
3730
3730
|
class: "tpl:min-h-[60px]",
|
|
3731
|
-
"onUpdate:modelValue": (e) =>
|
|
3731
|
+
"onUpdate:modelValue": (e) => v(r, e)
|
|
3732
3732
|
}, {
|
|
3733
|
-
default: m(() => [(f(!0), x(A, null, t(
|
|
3733
|
+
default: m(() => [(f(!0), x(A, null, t(_(r), (t) => oe((f(), x("div", { key: t.id }, [w(ui, {
|
|
3734
3734
|
block: t,
|
|
3735
3735
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
3736
3736
|
viewport: e.viewport,
|
|
3737
3737
|
"preview-mode": k(s).state.previewMode,
|
|
3738
3738
|
onSelect: (e) => k(s).selectBlock(t.id)
|
|
3739
3739
|
}, {
|
|
3740
|
-
default: m(() => [(f(), D(d(
|
|
3740
|
+
default: m(() => [(f(), D(d(y(t)), {
|
|
3741
3741
|
block: t,
|
|
3742
3742
|
viewport: e.viewport,
|
|
3743
|
-
onFetchData: (e) =>
|
|
3743
|
+
onFetchData: (e) => S(t, e),
|
|
3744
3744
|
onUpdate: (e) => k(s).updateBlock(t.id, e)
|
|
3745
3745
|
}, null, 40, [
|
|
3746
3746
|
"block",
|
|
@@ -3761,7 +3761,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3761
3761
|
"model-value",
|
|
3762
3762
|
"group",
|
|
3763
3763
|
"onUpdate:modelValue"
|
|
3764
|
-
]),
|
|
3764
|
+
]), _(r).length === 0 ? (f(), x("div", ns, [b("span", null, p(k(a).section.dropHere), 1)])) : M("", !0)], 6))), 128))], 2)]));
|
|
3765
3765
|
}
|
|
3766
3766
|
}), is = ke, as = {
|
|
3767
3767
|
small: 24,
|
|
@@ -3853,7 +3853,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3853
3853
|
viewport: {}
|
|
3854
3854
|
},
|
|
3855
3855
|
setup(e) {
|
|
3856
|
-
let n = e, { t: r } =
|
|
3856
|
+
let n = e, { t: r } = Dt(), a = j(() => ({
|
|
3857
3857
|
display: "flex",
|
|
3858
3858
|
flexWrap: "wrap",
|
|
3859
3859
|
gap: `${n.block.spacing}px`,
|
|
@@ -3875,7 +3875,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3875
3875
|
"platform",
|
|
3876
3876
|
"icon-style",
|
|
3877
3877
|
"icon-size"
|
|
3878
|
-
])], 8, ds))), 128))], 4)) : (f(), x("div", fs, [w(k(
|
|
3878
|
+
])], 8, ds))), 128))], 4)) : (f(), x("div", fs, [w(k(Fn), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
3879
3879
|
}
|
|
3880
3880
|
}), ms = { class: "tpl:w-full" }, hs = {
|
|
3881
3881
|
key: 0,
|
|
@@ -3891,7 +3891,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3891
3891
|
viewport: {}
|
|
3892
3892
|
},
|
|
3893
3893
|
setup(e) {
|
|
3894
|
-
let t = e, n =
|
|
3894
|
+
let t = e, n = nt(_t, "SpacerBlock"), r = j(() => ({
|
|
3895
3895
|
height: `${t.block.height}px`,
|
|
3896
3896
|
minHeight: `${t.block.height}px`,
|
|
3897
3897
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
@@ -3912,7 +3912,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3912
3912
|
], xs = {
|
|
3913
3913
|
key: 1,
|
|
3914
3914
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3915
|
-
}, Ss = /*#__PURE__*/
|
|
3915
|
+
}, Ss = /*#__PURE__*/ Pt(/* @__PURE__ */ y({
|
|
3916
3916
|
__name: "TableBlock",
|
|
3917
3917
|
props: {
|
|
3918
3918
|
block: {},
|
|
@@ -3926,7 +3926,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3926
3926
|
updated(e, t) {
|
|
3927
3927
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3928
3928
|
}
|
|
3929
|
-
}, r = e, { t: a } =
|
|
3929
|
+
}, r = e, { t: a } = Dt(), o = nt(_t, "TableBlock"), s = j(() => r.block.rows.length > 0), c = j(() => {
|
|
3930
3930
|
let e = {
|
|
3931
3931
|
width: "100%",
|
|
3932
3932
|
borderCollapse: "collapse",
|
|
@@ -3979,7 +3979,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3979
3979
|
onBlur: (n) => g(e.id, t.id, n),
|
|
3980
3980
|
onKeydown: r[1] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3981
3981
|
onClick: P(h, ["stop"])
|
|
3982
|
-
}, null, 44, bs)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", xs, [w(k(
|
|
3982
|
+
}, null, 44, bs)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", xs, [w(k(In), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
|
|
3983
3983
|
}
|
|
3984
3984
|
}), [["__scopeId", "data-v-963ac422"]]), Cs = /* @__PURE__ */ y({
|
|
3985
3985
|
__name: "VideoPlayButton",
|
|
@@ -4049,7 +4049,7 @@ var Es = ["src", "alt"], Ds = {
|
|
|
4049
4049
|
viewport: {}
|
|
4050
4050
|
},
|
|
4051
4051
|
setup(e) {
|
|
4052
|
-
let t = e, { t: n } =
|
|
4052
|
+
let t = e, { t: n } = Dt(), { syntax: r } = Ft(), a = j(() => Ae(t.block.url, r) || Ae(t.block.thumbnailUrl, r)), o = j(() => a.value ? null : Ts(t.block.url, t.block.thumbnailUrl)), s = j(() => ({ textAlign: t.block.align })), c = j(() => {
|
|
4053
4053
|
let e = t.block.align;
|
|
4054
4054
|
return {
|
|
4055
4055
|
maxWidth: "100%",
|
|
@@ -4074,12 +4074,12 @@ var Es = ["src", "alt"], Ds = {
|
|
|
4074
4074
|
key: 1,
|
|
4075
4075
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
4076
4076
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
4077
|
-
}, [w(k(
|
|
4077
|
+
}, [w(k(Ln), {
|
|
4078
4078
|
size: 36,
|
|
4079
4079
|
"stroke-width": 1.5,
|
|
4080
4080
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4081
4081
|
style: { opacity: "0.5" }
|
|
4082
|
-
}), b("span", Ds, [w(
|
|
4082
|
+
}), b("span", Ds, [w(xn, { text: l.value }, null, 8, ["text"])])], 4)) : o.value ? (f(), x(A, { key: 2 }, [e.block.url ? (f(), x("a", {
|
|
4083
4083
|
key: 0,
|
|
4084
4084
|
href: e.block.url,
|
|
4085
4085
|
target: "_blank",
|
|
@@ -4099,7 +4099,7 @@ var Es = ["src", "alt"], Ds = {
|
|
|
4099
4099
|
class: "tpl:w-full tpl:border-0",
|
|
4100
4100
|
src: o.value,
|
|
4101
4101
|
alt: e.block.alt
|
|
4102
|
-
}, null, 8, As), w(Cs)], 4))], 64)) : (f(), x("div", js, [w(k(
|
|
4102
|
+
}, null, 8, As), w(Cs)], 4))], 64)) : (f(), x("div", js, [w(k(Ln), {
|
|
4103
4103
|
size: 40,
|
|
4104
4104
|
"stroke-width": 1.5,
|
|
4105
4105
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
@@ -4107,40 +4107,40 @@ var Es = ["src", "alt"], Ds = {
|
|
|
4107
4107
|
}
|
|
4108
4108
|
}), Ns = {
|
|
4109
4109
|
section: rs,
|
|
4110
|
-
title:
|
|
4111
|
-
paragraph:
|
|
4112
|
-
image:
|
|
4113
|
-
button:
|
|
4114
|
-
divider:
|
|
4110
|
+
title: fi,
|
|
4111
|
+
paragraph: Jr,
|
|
4112
|
+
image: Fr,
|
|
4113
|
+
button: wn,
|
|
4114
|
+
divider: gr,
|
|
4115
4115
|
video: Ms,
|
|
4116
4116
|
social: ps,
|
|
4117
|
-
menu:
|
|
4117
|
+
menu: zr,
|
|
4118
4118
|
table: Ss,
|
|
4119
4119
|
spacer: gs,
|
|
4120
|
-
html:
|
|
4120
|
+
html: xr,
|
|
4121
4121
|
countdown: C(() => import("./CountdownBlock-173fiO5Z.js").then((e) => e.n))
|
|
4122
4122
|
};
|
|
4123
4123
|
function Ps(e) {
|
|
4124
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
4124
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Dt(r);
|
|
4125
4125
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4126
|
-
let { resolvedTheme: l } =
|
|
4126
|
+
let { resolvedTheme: l } = on(j(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = cn({
|
|
4127
4127
|
themeOverrides: d,
|
|
4128
4128
|
resolvedTheme: l,
|
|
4129
4129
|
extraStyles: e.themeExtraStyles
|
|
4130
|
-
}), p =
|
|
4130
|
+
}), p = Ht({
|
|
4131
4131
|
content: t.content,
|
|
4132
4132
|
setContent: (e, n) => t.setContent(e, n),
|
|
4133
4133
|
...e.historyOptions
|
|
4134
4134
|
});
|
|
4135
|
-
|
|
4136
|
-
let m =
|
|
4135
|
+
Jt(t, p);
|
|
4136
|
+
let m = Wt({
|
|
4137
4137
|
addBlock: t.addBlock,
|
|
4138
4138
|
removeBlock: t.removeBlock,
|
|
4139
4139
|
updateBlock: t.updateBlock,
|
|
4140
4140
|
selectBlock: t.selectBlock,
|
|
4141
4141
|
findBlockLocation: t.findBlockLocation,
|
|
4142
4142
|
blockDefaults: n.blockDefaults
|
|
4143
|
-
}), h =
|
|
4143
|
+
}), h = Kt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Gt({
|
|
4144
4144
|
content: t.content,
|
|
4145
4145
|
isDirty: () => t.state.isDirty,
|
|
4146
4146
|
...e.autoSaveOptions
|
|
@@ -4148,24 +4148,24 @@ function Ps(e) {
|
|
|
4148
4148
|
g && (v = c(p.isNavigating, (e) => {
|
|
4149
4149
|
e ? g.pause() : g.resume();
|
|
4150
4150
|
}));
|
|
4151
|
-
let y =
|
|
4151
|
+
let y = an(t, {
|
|
4152
4152
|
t: a,
|
|
4153
4153
|
format: o
|
|
4154
|
-
}), b =
|
|
4155
|
-
if (
|
|
4154
|
+
}), b = fn();
|
|
4155
|
+
if (_n(b, Ns), n.customBlocks?.length) for (let e of n.customBlocks) b.registerCustom(e, mr);
|
|
4156
4156
|
function x(e) {
|
|
4157
|
-
for (let t of e) b.registerCustom(t,
|
|
4157
|
+
for (let t of e) b.registerCustom(t, mr);
|
|
4158
4158
|
}
|
|
4159
|
-
let S =
|
|
4159
|
+
let S = Qt();
|
|
4160
4160
|
if (s() && u(S.dispose), e.containerEl) {
|
|
4161
4161
|
let t = e.containerEl;
|
|
4162
|
-
|
|
4162
|
+
Je(document, "pointerdown", (e) => {
|
|
4163
4163
|
let n = t.value;
|
|
4164
4164
|
n && (e.composedPath?.() ?? []).includes(n) && S.claim();
|
|
4165
4165
|
}, { capture: !0 });
|
|
4166
4166
|
}
|
|
4167
4167
|
function C(r) {
|
|
4168
|
-
S.isActive() &&
|
|
4168
|
+
S.isActive() && yn(r, {
|
|
4169
4169
|
history: p,
|
|
4170
4170
|
selectBlock: (e) => t.selectBlock(e),
|
|
4171
4171
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4174,19 +4174,19 @@ function Ps(e) {
|
|
|
4174
4174
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
4175
4175
|
});
|
|
4176
4176
|
}
|
|
4177
|
-
|
|
4177
|
+
Je(document, "keydown", C);
|
|
4178
4178
|
let w = _(null);
|
|
4179
|
-
E(
|
|
4179
|
+
E(mt, e.editorRoot ?? document), E(Xe, w), E(et, r), E(_t, t), E(ct, p), E(ht, m), E(St, h), E(pt, i), E(at, f), E(tt, l), E(lt, n.blockDefaults), E(yt, b), E(dt, n.customBlocks ?? []), E(gt, n.paletteBlocks), E(ft, pn(t.content, b));
|
|
4180
4180
|
let T = pe(n.mergeTags?.syntax);
|
|
4181
|
-
E(
|
|
4182
|
-
let D =
|
|
4181
|
+
E(ot, n.mergeTags?.tags ?? []), E(st, T), E(it, n.mergeTags?.onRequest ?? null), E(Ze, n.mergeTags?.autocomplete !== !1), E(wt, $t()), E(ut, n.logicTags?.tags ?? []), E(Et, n.logicTags?.pairs ?? []), E($e, n.logicTags?.onRequest ?? null), E(Tt, en()), E(Qe, n.onRequestMedia ?? null), E(bt, n.displayConditions?.conditions ?? []), E(vt, n.displayConditions?.allowCustom ?? !1), E(xt, e.capabilities ?? {}), E(Ct, y);
|
|
4182
|
+
let D = tn(n.lint) ? null : nn({
|
|
4183
4183
|
content: t.content,
|
|
4184
4184
|
options: n.lint ?? {},
|
|
4185
4185
|
updateBlock: t.updateBlock,
|
|
4186
4186
|
updateSettings: t.updateSettings,
|
|
4187
4187
|
removeBlock: t.removeBlock
|
|
4188
4188
|
});
|
|
4189
|
-
E(
|
|
4189
|
+
E(rt, D);
|
|
4190
4190
|
function O() {
|
|
4191
4191
|
v?.(), D?.destroy(), g?.destroy(), p.destroy();
|
|
4192
4192
|
}
|
|
@@ -4209,4 +4209,4 @@ function Ps(e) {
|
|
|
4209
4209
|
};
|
|
4210
4210
|
}
|
|
4211
4211
|
//#endregion
|
|
4212
|
-
export {
|
|
4212
|
+
export { Fn as A, Rt as B, Xn as C, Un as D, Wn as E, Dn as F, wn as I, dn as L, Mn as M, kn as N, Bn as O, On as P, rn as R, tr as S, Gn as T, xr as _, ps as a, ar as b, $o as c, Xr as d, Yr as f, Cr as g, Fr as h, gs as i, Nn as j, In as k, fi as l, zr as m, Ms as n, os as o, Jr as p, Ss as r, rs as s, Ps as t, ui as u, gr as v, Yn as w, rr as x, mr as y, qt as z };
|