pennsieve-dashboard 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pennsieve-dashboard.es.js +660 -607
- package/dist/pennsieve-dashboard.umd.js +19 -19
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var U = (o, e, t) =>
|
|
4
|
-
import { defineComponent as
|
|
1
|
+
var Bs = Object.defineProperty;
|
|
2
|
+
var Fs = (o, e, t) => e in o ? Bs(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var U = (o, e, t) => Fs(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as ue, createElementBlock as O, openBlock as T, createElementVNode as C, ref as F, reactive as Qt, isRef as Us, isReactive as Ws, markRaw as Gs, computed as ve, watch as ce, resolveComponent as re, createBlock as ie, withCtx as G, createVNode as V, Fragment as Ce, renderList as We, unref as J, createTextVNode as Se, inject as Vs, shallowRef as ls, resolveDirective as as, renderSlot as wt, mergeProps as oi, withDirectives as ze, toDisplayString as be, withKeys as hs, vShow as xt, vModelText as qs, createCommentVNode as kt, toRaw as js, onMounted as us, onBeforeUnmount as cs, normalizeClass as ds, resolveDynamicComponent as Wi, onBeforeMount as Ys, provide as Xs, defineAsyncComponent as Zs, nextTick as Gi } from "vue";
|
|
5
5
|
import { defineStore as Ks, storeToRefs as Jt } from "pinia";
|
|
6
6
|
import { ElTag as Qs, ElTooltip as ei } from "element-plus";
|
|
7
7
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
8
|
-
var Js = /* @__PURE__ */
|
|
8
|
+
var Js = /* @__PURE__ */ ue({
|
|
9
9
|
name: "CircleCloseFilled",
|
|
10
10
|
__name: "circle-close-filled",
|
|
11
11
|
setup(o) {
|
|
12
|
-
return (e, t) => (T(),
|
|
12
|
+
return (e, t) => (T(), O("svg", {
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
viewBox: "0 0 1024 1024"
|
|
15
15
|
}, [
|
|
16
|
-
|
|
16
|
+
C("path", {
|
|
17
17
|
fill: "currentColor",
|
|
18
18
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
|
|
19
19
|
})
|
|
20
20
|
]));
|
|
21
21
|
}
|
|
22
|
-
}), er = Js, tr = /* @__PURE__ */
|
|
22
|
+
}), er = Js, tr = /* @__PURE__ */ ue({
|
|
23
23
|
name: "Close",
|
|
24
24
|
__name: "close",
|
|
25
25
|
setup(o) {
|
|
26
|
-
return (e, t) => (T(),
|
|
26
|
+
return (e, t) => (T(), O("svg", {
|
|
27
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28
28
|
viewBox: "0 0 1024 1024"
|
|
29
29
|
}, [
|
|
30
|
-
|
|
30
|
+
C("path", {
|
|
31
31
|
fill: "currentColor",
|
|
32
32
|
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
33
33
|
})
|
|
34
34
|
]));
|
|
35
35
|
}
|
|
36
|
-
}), ir = tr, sr = /* @__PURE__ */
|
|
36
|
+
}), ir = tr, sr = /* @__PURE__ */ ue({
|
|
37
37
|
name: "Edit",
|
|
38
38
|
__name: "edit",
|
|
39
39
|
setup(o) {
|
|
40
|
-
return (e, t) => (T(),
|
|
40
|
+
return (e, t) => (T(), O("svg", {
|
|
41
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
42
|
viewBox: "0 0 1024 1024"
|
|
43
43
|
}, [
|
|
44
|
-
|
|
44
|
+
C("path", {
|
|
45
45
|
fill: "currentColor",
|
|
46
46
|
d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
|
|
47
47
|
}),
|
|
48
|
-
|
|
48
|
+
C("path", {
|
|
49
49
|
fill: "currentColor",
|
|
50
50
|
d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
|
|
51
51
|
})
|
|
52
52
|
]));
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
54
|
+
}), ps = sr, rr = /* @__PURE__ */ ue({
|
|
55
55
|
name: "FullScreen",
|
|
56
56
|
__name: "full-screen",
|
|
57
57
|
setup(o) {
|
|
58
|
-
return (e, t) => (T(),
|
|
58
|
+
return (e, t) => (T(), O("svg", {
|
|
59
59
|
xmlns: "http://www.w3.org/2000/svg",
|
|
60
60
|
viewBox: "0 0 1024 1024"
|
|
61
61
|
}, [
|
|
62
|
-
|
|
62
|
+
C("path", {
|
|
63
63
|
fill: "currentColor",
|
|
64
64
|
d: "m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"
|
|
65
65
|
})
|
|
66
66
|
]));
|
|
67
67
|
}
|
|
68
|
-
}), nr = rr, or = /* @__PURE__ */
|
|
68
|
+
}), nr = rr, or = /* @__PURE__ */ ue({
|
|
69
69
|
name: "Lock",
|
|
70
70
|
__name: "lock",
|
|
71
71
|
setup(o) {
|
|
72
|
-
return (e, t) => (T(),
|
|
72
|
+
return (e, t) => (T(), O("svg", {
|
|
73
73
|
xmlns: "http://www.w3.org/2000/svg",
|
|
74
74
|
viewBox: "0 0 1024 1024"
|
|
75
75
|
}, [
|
|
76
|
-
|
|
76
|
+
C("path", {
|
|
77
77
|
fill: "currentColor",
|
|
78
78
|
d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"
|
|
79
79
|
}),
|
|
80
|
-
|
|
80
|
+
C("path", {
|
|
81
81
|
fill: "currentColor",
|
|
82
82
|
d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"
|
|
83
83
|
})
|
|
84
84
|
]));
|
|
85
85
|
}
|
|
86
|
-
}), lr = or, ar = /* @__PURE__ */
|
|
86
|
+
}), lr = or, ar = /* @__PURE__ */ ue({
|
|
87
87
|
name: "ScaleToOriginal",
|
|
88
88
|
__name: "scale-to-original",
|
|
89
89
|
setup(o) {
|
|
90
|
-
return (e, t) => (T(),
|
|
90
|
+
return (e, t) => (T(), O("svg", {
|
|
91
91
|
xmlns: "http://www.w3.org/2000/svg",
|
|
92
92
|
viewBox: "0 0 1024 1024"
|
|
93
93
|
}, [
|
|
94
|
-
|
|
94
|
+
C("path", {
|
|
95
95
|
fill: "currentColor",
|
|
96
96
|
d: "M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"
|
|
97
97
|
})
|
|
98
98
|
]));
|
|
99
99
|
}
|
|
100
|
-
}), hr = ar, ur = /* @__PURE__ */
|
|
100
|
+
}), hr = ar, ur = /* @__PURE__ */ ue({
|
|
101
101
|
name: "Unlock",
|
|
102
102
|
__name: "unlock",
|
|
103
103
|
setup(o) {
|
|
104
|
-
return (e, t) => (T(),
|
|
104
|
+
return (e, t) => (T(), O("svg", {
|
|
105
105
|
xmlns: "http://www.w3.org/2000/svg",
|
|
106
106
|
viewBox: "0 0 1024 1024"
|
|
107
107
|
}, [
|
|
108
|
-
|
|
108
|
+
C("path", {
|
|
109
109
|
fill: "currentColor",
|
|
110
110
|
d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"
|
|
111
111
|
}),
|
|
112
|
-
|
|
112
|
+
C("path", {
|
|
113
113
|
fill: "currentColor",
|
|
114
114
|
d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"
|
|
115
115
|
})
|
|
@@ -118,44 +118,44 @@ var Js = /* @__PURE__ */ ce({
|
|
|
118
118
|
}), cr = ur;
|
|
119
119
|
const rt = Ks("globalPensieveDashVars", () => {
|
|
120
120
|
const o = F([]), e = F({}), t = "dashboard-globalVarsStore", i = F([]), s = F([]), r = F({}), l = Qt({}), n = Qt({});
|
|
121
|
-
function u(
|
|
122
|
-
l[
|
|
121
|
+
function u(L, R, j = !1) {
|
|
122
|
+
l[L] = R, n[L] = j;
|
|
123
123
|
}
|
|
124
|
-
function a(
|
|
124
|
+
function a(L = {}) {
|
|
125
125
|
for (const R of Object.keys(l)) delete l[R];
|
|
126
|
-
Object.assign(l,
|
|
126
|
+
Object.assign(l, L);
|
|
127
127
|
}
|
|
128
|
-
const h = (
|
|
129
|
-
delete l[
|
|
128
|
+
const h = (L) => {
|
|
129
|
+
delete l[L];
|
|
130
130
|
};
|
|
131
131
|
function p() {
|
|
132
|
-
for (const
|
|
132
|
+
for (const L of Object.keys(l)) delete l[L];
|
|
133
133
|
}
|
|
134
134
|
function d() {
|
|
135
135
|
s.value = [...o.value], a({});
|
|
136
136
|
}
|
|
137
|
-
const m = (
|
|
138
|
-
i.value.push({ name:
|
|
137
|
+
const m = (L) => s.value.find((R) => R.id === L), v = (L, R) => {
|
|
138
|
+
i.value.push({ name: L, value: R });
|
|
139
139
|
}, S = () => {
|
|
140
140
|
i.value = [];
|
|
141
|
-
}, I = (
|
|
142
|
-
r.value =
|
|
141
|
+
}, I = (L) => {
|
|
142
|
+
r.value = A(L);
|
|
143
143
|
}, x = () => r.value;
|
|
144
|
-
function
|
|
144
|
+
function A(L) {
|
|
145
145
|
const R = {};
|
|
146
|
-
if (!
|
|
147
|
-
for (const [j,
|
|
148
|
-
if (
|
|
149
|
-
const M = Object.getPrototypeOf(
|
|
150
|
-
R[j] = M ? {
|
|
146
|
+
if (!L || typeof L != "object") return R;
|
|
147
|
+
for (const [j, B] of Object.entries(L))
|
|
148
|
+
if (B && typeof B == "object" && !(Us(B) || Ws(B))) {
|
|
149
|
+
const M = Object.getPrototypeOf(B) === Object.prototype;
|
|
150
|
+
R[j] = M ? { ...B } : Gs(B);
|
|
151
151
|
} else
|
|
152
|
-
R[j] =
|
|
152
|
+
R[j] = B;
|
|
153
153
|
return R;
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
const R = s.value.find((j) => j.id ===
|
|
155
|
+
const D = (L) => {
|
|
156
|
+
const R = s.value.find((j) => j.id === L);
|
|
157
157
|
R && (R.Props = R.Props || {}, R.Props.locked = !R.Props.locked);
|
|
158
|
-
}, E = (
|
|
158
|
+
}, E = (L) => L.map((R) => {
|
|
159
159
|
const j = e.value[R.componentKey];
|
|
160
160
|
return j ? {
|
|
161
161
|
...R,
|
|
@@ -163,9 +163,9 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
163
163
|
// attach runtime component
|
|
164
164
|
} : null;
|
|
165
165
|
}).filter((R) => !!R);
|
|
166
|
-
function H(
|
|
166
|
+
function H(L) {
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function _() {
|
|
169
169
|
}
|
|
170
170
|
return {
|
|
171
171
|
DASHBOARD_ITEMS: s,
|
|
@@ -176,25 +176,25 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
176
176
|
Filters: l,
|
|
177
177
|
displayFilters: n,
|
|
178
178
|
registerGridProvider: H,
|
|
179
|
-
unregisterGridProvider:
|
|
179
|
+
unregisterGridProvider: _,
|
|
180
180
|
setFilter: u,
|
|
181
181
|
clearFilter: h,
|
|
182
182
|
clearAllFilters: p,
|
|
183
183
|
resetFilters: a,
|
|
184
184
|
resetGridLayout: d,
|
|
185
185
|
getDashItem: m,
|
|
186
|
-
toggleWidgetLock:
|
|
187
|
-
addOptionsDataItems:
|
|
186
|
+
toggleWidgetLock: D,
|
|
187
|
+
addOptionsDataItems: v,
|
|
188
188
|
clearOptionsDataItems: S,
|
|
189
189
|
//saveToLocalStorage,
|
|
190
190
|
loadFromLocalStorage: () => {
|
|
191
|
-
const
|
|
192
|
-
if (!
|
|
191
|
+
const L = localStorage.getItem(t);
|
|
192
|
+
if (!L) {
|
|
193
193
|
d();
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
196
|
try {
|
|
197
|
-
const R = JSON.parse(
|
|
197
|
+
const R = JSON.parse(L);
|
|
198
198
|
s.value = Array.isArray(R.items) ? E(R.items) : [...o.value], a(R.filters ?? {});
|
|
199
199
|
} catch (R) {
|
|
200
200
|
console.error("Failed to parse globalVarsStore:", R), s.value = [...o.value], a({});
|
|
@@ -203,7 +203,7 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
203
203
|
setOptionServices: I,
|
|
204
204
|
getServices: x
|
|
205
205
|
};
|
|
206
|
-
}), dr = { class: "widget-settings-container" }, pr = { class: "widget-setting" }, fr = { class: "dialog-footer" }, gr = /* @__PURE__ */
|
|
206
|
+
}), dr = { class: "widget-settings-container" }, pr = { class: "widget-setting" }, fr = { class: "dialog-footer" }, gr = /* @__PURE__ */ ue({
|
|
207
207
|
__name: "TextWidgetSettings",
|
|
208
208
|
props: {
|
|
209
209
|
showDialog: { type: Boolean },
|
|
@@ -219,16 +219,16 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
219
219
|
p || s("close-dialog");
|
|
220
220
|
}
|
|
221
221
|
}), n = F(r.reactiveSourceValue ?? ""), u = F(r.manualEntryValue ?? ""), a = F(!!r.hideHeaderValue);
|
|
222
|
-
|
|
222
|
+
ce(() => r.reactiveSourceValue, (p) => {
|
|
223
223
|
n.value = p ?? "";
|
|
224
|
-
}),
|
|
224
|
+
}), ce(() => r.manualEntryValue, (p) => {
|
|
225
225
|
u.value = p ?? "";
|
|
226
|
-
}, { immediate: !0 }),
|
|
226
|
+
}, { immediate: !0 }), ce(() => r.hideHeaderValue, (p) => {
|
|
227
227
|
a.value = !!p;
|
|
228
228
|
});
|
|
229
229
|
function h() {
|
|
230
|
-
var
|
|
231
|
-
const p = (n.value || "").trim(), d = p !== "", m = d ? null : ((
|
|
230
|
+
var v;
|
|
231
|
+
const p = (n.value || "").trim(), d = p !== "", m = d ? null : ((v = u.value) == null ? void 0 : v.trim()) || "";
|
|
232
232
|
s("update-text-var", {
|
|
233
233
|
reactiveSource: d ? p : null,
|
|
234
234
|
manualEdit: m,
|
|
@@ -236,26 +236,26 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
236
236
|
}), l.value = !1;
|
|
237
237
|
}
|
|
238
238
|
return (p, d) => {
|
|
239
|
-
const m = re("el-option"),
|
|
240
|
-
return T(),
|
|
239
|
+
const m = re("el-option"), v = re("el-select"), S = re("el-input"), I = re("el-checkbox"), x = re("el-button"), A = re("el-dialog");
|
|
240
|
+
return T(), ie(A, {
|
|
241
241
|
class: "full-dialog-dashboard",
|
|
242
242
|
modelValue: l.value,
|
|
243
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
243
|
+
"onUpdate:modelValue": d[4] || (d[4] = (D) => l.value = D),
|
|
244
244
|
title: "Text Widget Settings",
|
|
245
245
|
"append-to-body": !0
|
|
246
246
|
}, {
|
|
247
247
|
footer: G(() => [
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
C("div", fr, [
|
|
249
|
+
V(x, {
|
|
250
250
|
class: "secondary",
|
|
251
|
-
onClick: d[3] || (d[3] = (
|
|
251
|
+
onClick: d[3] || (d[3] = (D) => l.value = !1)
|
|
252
252
|
}, {
|
|
253
253
|
default: G(() => [...d[8] || (d[8] = [
|
|
254
254
|
Se("Cancel", -1)
|
|
255
255
|
])]),
|
|
256
256
|
_: 1
|
|
257
257
|
}),
|
|
258
|
-
|
|
258
|
+
V(x, { onClick: h }, {
|
|
259
259
|
default: G(() => [...d[9] || (d[9] = [
|
|
260
260
|
Se("Save", -1)
|
|
261
261
|
])]),
|
|
@@ -264,38 +264,38 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
264
264
|
])
|
|
265
265
|
]),
|
|
266
266
|
default: G(() => [
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
d[5] || (d[5] =
|
|
270
|
-
d[6] || (d[6] =
|
|
271
|
-
|
|
267
|
+
C("div", dr, [
|
|
268
|
+
C("div", pr, [
|
|
269
|
+
d[5] || (d[5] = C("h4", null, "Select This Widget's Value", -1)),
|
|
270
|
+
d[6] || (d[6] = C("h5", null, "Select From Variables", -1)),
|
|
271
|
+
V(v, {
|
|
272
272
|
modelValue: n.value,
|
|
273
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
273
|
+
"onUpdate:modelValue": d[0] || (d[0] = (D) => n.value = D),
|
|
274
274
|
class: "text-settings-height"
|
|
275
275
|
}, {
|
|
276
276
|
default: G(() => [
|
|
277
|
-
(T(),
|
|
277
|
+
(T(), ie(m, {
|
|
278
278
|
value: "",
|
|
279
279
|
key: "__manual__",
|
|
280
280
|
label: "Manual entry"
|
|
281
281
|
})),
|
|
282
|
-
(T(!0),
|
|
283
|
-
key:
|
|
284
|
-
label:
|
|
285
|
-
value:
|
|
282
|
+
(T(!0), O(Ce, null, We(J(i), (D) => (T(), ie(m, {
|
|
283
|
+
key: D.name,
|
|
284
|
+
label: D.name,
|
|
285
|
+
value: D.name
|
|
286
286
|
}, null, 8, ["label", "value"]))), 128))
|
|
287
287
|
]),
|
|
288
288
|
_: 1
|
|
289
289
|
}, 8, ["modelValue"]),
|
|
290
|
-
d[7] || (d[7] =
|
|
291
|
-
|
|
290
|
+
d[7] || (d[7] = C("h5", null, "Manual Entry", -1)),
|
|
291
|
+
V(S, {
|
|
292
292
|
modelValue: u.value,
|
|
293
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
293
|
+
"onUpdate:modelValue": d[1] || (d[1] = (D) => u.value = D),
|
|
294
294
|
class: "text-settings-height"
|
|
295
295
|
}, null, 8, ["modelValue"]),
|
|
296
|
-
|
|
296
|
+
V(I, {
|
|
297
297
|
modelValue: a.value,
|
|
298
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
298
|
+
"onUpdate:modelValue": d[2] || (d[2] = (D) => a.value = D),
|
|
299
299
|
label: "Hide Header"
|
|
300
300
|
}, null, 8, ["modelValue"])
|
|
301
301
|
])
|
|
@@ -305,12 +305,12 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
305
305
|
}, 8, ["modelValue"]);
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
|
-
}),
|
|
308
|
+
}), Ae = (o, e) => {
|
|
309
309
|
const t = o.__vccOpts || o;
|
|
310
310
|
for (const [i, s] of e)
|
|
311
311
|
t[i] = s;
|
|
312
312
|
return t;
|
|
313
|
-
}, mr = /* @__PURE__ */
|
|
313
|
+
}, mr = /* @__PURE__ */ Ae(gr, [["__scopeId", "data-v-769ea864"]]), _r = { key: 0 }, yr = /* @__PURE__ */ ue({
|
|
314
314
|
inheritAttrs: !1,
|
|
315
315
|
__name: "TextWidget",
|
|
316
316
|
props: {
|
|
@@ -321,21 +321,21 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
321
321
|
},
|
|
322
322
|
setup(o) {
|
|
323
323
|
const e = rt(), t = o;
|
|
324
|
-
|
|
324
|
+
Vs("dashboard:globalVars", null);
|
|
325
325
|
const i = F(t.displayText ?? "");
|
|
326
|
-
|
|
326
|
+
ce(() => t.displayText, (x) => {
|
|
327
327
|
i.value = x ?? "";
|
|
328
328
|
}, { immediate: !0 });
|
|
329
329
|
const s = ve(() => !!(t.bindedKey && t.bindedKey.trim() !== "")), r = ve(() => {
|
|
330
330
|
var E;
|
|
331
331
|
const x = (E = t.bindedKey) == null ? void 0 : E.trim();
|
|
332
332
|
if (!x) return "—";
|
|
333
|
-
const
|
|
334
|
-
return Array.isArray(
|
|
335
|
-
}), l = F("Text Widget"), n = ls([{ comp:
|
|
333
|
+
const A = e.optionsData.find((H) => (H == null ? void 0 : H.name) === x), D = A == null ? void 0 : A.value;
|
|
334
|
+
return Array.isArray(D) ? D.join(", ") : D && typeof D == "object" ? JSON.stringify(D) : D ?? "—";
|
|
335
|
+
}), l = F("Text Widget"), n = ls([{ comp: ps, event: m, tooltip: "open Text settings" }]), u = F(!1), a = F(null);
|
|
336
336
|
function h() {
|
|
337
|
-
var x,
|
|
338
|
-
u.value = !0, (
|
|
337
|
+
var x, A;
|
|
338
|
+
u.value = !0, (A = (x = a.value) == null ? void 0 : x.focus) == null || A.call(x);
|
|
339
339
|
}
|
|
340
340
|
function p() {
|
|
341
341
|
u.value = !1;
|
|
@@ -344,50 +344,50 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
344
344
|
function m() {
|
|
345
345
|
d.value = !0;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function v() {
|
|
348
348
|
d.value = !1;
|
|
349
349
|
}
|
|
350
|
-
function S({ manualEdit: x, reactiveSource:
|
|
350
|
+
function S({ manualEdit: x, reactiveSource: A, hideHeader: D }) {
|
|
351
351
|
const E = e.getDashItem(t.widgetID);
|
|
352
|
-
E && (E.hideHeader =
|
|
352
|
+
E && (E.hideHeader = D, A && A.trim() !== "" ? (E.Props = E.Props || {}, E.Props.bindedKey = A, E.Props.displayText = null, E.componentName = I(A)) : (E.Props = E.Props || {}, E.Props.bindedKey = null, E.Props.displayText = x ?? "", E.componentName = x ?? "Text"));
|
|
353
353
|
}
|
|
354
354
|
function I(x) {
|
|
355
|
-
return x ? x.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (
|
|
355
|
+
return x ? x.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (A) => A.toUpperCase()) : "";
|
|
356
356
|
}
|
|
357
|
-
return (x,
|
|
358
|
-
const
|
|
359
|
-
return T(),
|
|
360
|
-
|
|
357
|
+
return (x, A) => {
|
|
358
|
+
const D = re("el-input"), E = as("click-out");
|
|
359
|
+
return T(), O(Ce, null, [
|
|
360
|
+
wt(x.$slots, "default", {
|
|
361
361
|
widgetName: l.value,
|
|
362
362
|
childIcons: n.value
|
|
363
363
|
}, void 0, !0),
|
|
364
|
-
|
|
365
|
-
s.value ? (T(),
|
|
366
|
-
|
|
367
|
-
])) :
|
|
364
|
+
C("div", oi({ class: "text-widget-wrap" }, x.$attrs), [
|
|
365
|
+
s.value ? (T(), O("div", _r, [
|
|
366
|
+
C("h2", null, be(r.value), 1)
|
|
367
|
+
])) : ze((T(), O("div", {
|
|
368
368
|
key: 1,
|
|
369
369
|
onKeyup: hs(p, ["enter"]),
|
|
370
370
|
class: "tw-flex"
|
|
371
371
|
}, [
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
ze(C("div", null, [
|
|
373
|
+
V(D, {
|
|
374
374
|
ref_key: "textUserInput",
|
|
375
375
|
ref: a,
|
|
376
376
|
modelValue: i.value,
|
|
377
|
-
"onUpdate:modelValue":
|
|
378
|
-
onFocus:
|
|
379
|
-
var
|
|
380
|
-
return (
|
|
377
|
+
"onUpdate:modelValue": A[0] || (A[0] = (H) => i.value = H),
|
|
378
|
+
onFocus: A[1] || (A[1] = (H) => {
|
|
379
|
+
var _, y;
|
|
380
|
+
return (y = (_ = H.target) == null ? void 0 : _.select) == null ? void 0 : y.call(_);
|
|
381
381
|
})
|
|
382
382
|
}, null, 8, ["modelValue"])
|
|
383
383
|
], 512), [
|
|
384
384
|
[xt, u.value]
|
|
385
385
|
]),
|
|
386
|
-
|
|
387
|
-
onClick:
|
|
386
|
+
ze(C("div", {
|
|
387
|
+
onClick: A[2] || (A[2] = (H) => h()),
|
|
388
388
|
class: "tw-w-full tw-h-full"
|
|
389
389
|
}, [
|
|
390
|
-
|
|
390
|
+
C("h2", null, be(i.value), 1)
|
|
391
391
|
], 512), [
|
|
392
392
|
[xt, !u.value]
|
|
393
393
|
])
|
|
@@ -395,35 +395,35 @@ const rt = Ks("globalPensieveDashVars", () => {
|
|
|
395
395
|
[E, p]
|
|
396
396
|
])
|
|
397
397
|
], 16),
|
|
398
|
-
|
|
398
|
+
V(mr, {
|
|
399
399
|
"show-dialog": d.value,
|
|
400
400
|
"reactive-source-value": t.bindedKey || "",
|
|
401
401
|
"manual-entry-value": i.value,
|
|
402
402
|
"hide-header-value": t.hideHeader || !1,
|
|
403
|
-
onCloseDialog:
|
|
403
|
+
onCloseDialog: v,
|
|
404
404
|
onUpdateTextVar: S
|
|
405
405
|
}, null, 8, ["show-dialog", "reactive-source-value", "manual-entry-value", "hide-header-value"])
|
|
406
406
|
], 64);
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
}),
|
|
409
|
+
}), _o = /* @__PURE__ */ Ae(yr, [["__scopeId", "data-v-bbd00006"]]);
|
|
410
410
|
function li() {
|
|
411
411
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
412
412
|
}
|
|
413
413
|
var Me = li();
|
|
414
|
-
function
|
|
414
|
+
function fs(o) {
|
|
415
415
|
Me = o;
|
|
416
416
|
}
|
|
417
|
-
var
|
|
418
|
-
function
|
|
417
|
+
var tt = { exec: () => null };
|
|
418
|
+
function $(o, e = "") {
|
|
419
419
|
let t = typeof o == "string" ? o : o.source, i = { replace: (s, r) => {
|
|
420
420
|
let l = typeof r == "string" ? r : r.source;
|
|
421
421
|
return l = l.replace(ne.caret, "$1"), t = t.replace(s, l), i;
|
|
422
422
|
}, getRegex: () => new RegExp(t, e) };
|
|
423
423
|
return i;
|
|
424
424
|
}
|
|
425
|
-
var ne = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (o) => new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}#`), htmlBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}<(?:[a-z].*>|!--)`, "i") }, vr = /^(?:[ \t]*(?:\n|$))+/,
|
|
426
|
-
]`).replace("lheading",
|
|
425
|
+
var ne = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (o) => new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}#`), htmlBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}<(?:[a-z].*>|!--)`, "i") }, vr = /^(?:[ \t]*(?:\n|$))+/, br = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, nt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, xr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ai = /(?:[*+-]|\d{1,9}[.)])/, gs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ms = $(gs).replace(/bull/g, ai).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), kr = $(gs).replace(/bull/g, ai).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), hi = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Er = /^[^\n]+/, ui = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Tr = $(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ui).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Rr = $(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ai).getRegex(), zt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ci = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Sr = $("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ci).replace("tag", zt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), _s = $(hi).replace("hr", nt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), Cr = $(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", _s).getRegex(), di = { blockquote: Cr, code: br, def: Tr, fences: wr, heading: xr, hr: nt, html: Sr, lheading: ms, list: Rr, newline: vr, paragraph: _s, table: tt, text: Er }, Vi = $("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", nt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), Ar = { ...di, lheading: kr, table: Vi, paragraph: $(hi).replace("hr", nt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Vi).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex() }, Dr = { ...di, html: $(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ci).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: tt, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: $(hi).replace("hr", nt).replace("heading", ` *#{1,6} *[^
|
|
426
|
+
]`).replace("lheading", ms).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Lr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, zr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ys = /^( {2,}|\\)\n(?!\s*$)/, Nr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Nt = /[\p{P}\p{S}]/u, pi = /[\s\p{P}\p{S}]/u, vs = /[^\s\p{P}\p{S}]/u, Mr = $(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, pi).getRegex(), bs = /(?!~)[\p{P}\p{S}]/u, Ir = /(?!~)[\s\p{P}\p{S}]/u, Hr = /(?:[^\s\p{P}\p{S}]|~)/u, Or = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, ws = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Pr = $(ws, "u").replace(/punct/g, Nt).getRegex(), $r = $(ws, "u").replace(/punct/g, bs).getRegex(), xs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Br = $(xs, "gu").replace(/notPunctSpace/g, vs).replace(/punctSpace/g, pi).replace(/punct/g, Nt).getRegex(), Fr = $(xs, "gu").replace(/notPunctSpace/g, Hr).replace(/punctSpace/g, Ir).replace(/punct/g, bs).getRegex(), Ur = $("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, vs).replace(/punctSpace/g, pi).replace(/punct/g, Nt).getRegex(), Wr = $(/\\(punct)/, "gu").replace(/punct/g, Nt).getRegex(), Gr = $(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Vr = $(ci).replace("(?:-->|$)", "-->").getRegex(), qr = $("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Vr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Et = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, jr = $(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Et).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ks = $(/^!?\[(label)\]\[(ref)\]/).replace("label", Et).replace("ref", ui).getRegex(), Es = $(/^!?\[(ref)\](?:\[\])?/).replace("ref", ui).getRegex(), Yr = $("reflink|nolink(?!\\()", "g").replace("reflink", ks).replace("nolink", Es).getRegex(), fi = { _backpedal: tt, anyPunctuation: Wr, autolink: Gr, blockSkip: Or, br: ys, code: zr, del: tt, emStrongLDelim: Pr, emStrongRDelimAst: Br, emStrongRDelimUnd: Ur, escape: Lr, link: jr, nolink: Es, punctuation: Mr, reflink: ks, reflinkSearch: Yr, tag: qr, text: Nr, url: tt }, Xr = { ...fi, link: $(/^!?\[(label)\]\((.*?)\)/).replace("label", Et).getRegex(), reflink: $(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Et).getRegex() }, ti = { ...fi, emStrongRDelimAst: Fr, emStrongLDelim: $r, url: $(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, Zr = { ...ti, br: $(ys).replace("{2,}", "*").getRegex(), text: $(ti.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, mt = { normal: di, gfm: Ar, pedantic: Dr }, Ye = { normal: fi, gfm: ti, breaks: Zr, pedantic: Xr }, Kr = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, qi = (o) => Kr[o];
|
|
427
427
|
function me(o, e) {
|
|
428
428
|
if (e) {
|
|
429
429
|
if (ne.escapeTest.test(o)) return o.replace(ne.escapeReplace, qi);
|
|
@@ -450,7 +450,7 @@ function Yi(o, e) {
|
|
|
450
450
|
for (; s < i.length; s++) i[s] = i[s].trim().replace(ne.slashPipe, "|");
|
|
451
451
|
return i;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Xe(o, e, t) {
|
|
454
454
|
let i = o.length;
|
|
455
455
|
if (i === 0) return "";
|
|
456
456
|
let s = 0;
|
|
@@ -500,7 +500,7 @@ var Tt = class {
|
|
|
500
500
|
let e = this.rules.block.code.exec(o);
|
|
501
501
|
if (e) {
|
|
502
502
|
let t = e[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
503
|
-
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? t :
|
|
503
|
+
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? t : Xe(t, `
|
|
504
504
|
`) };
|
|
505
505
|
}
|
|
506
506
|
}
|
|
@@ -516,7 +516,7 @@ var Tt = class {
|
|
|
516
516
|
if (e) {
|
|
517
517
|
let t = e[2].trim();
|
|
518
518
|
if (this.rules.other.endingHash.test(t)) {
|
|
519
|
-
let i =
|
|
519
|
+
let i = Xe(t, "#");
|
|
520
520
|
(this.options.pedantic || !i || this.rules.other.endingSpaceChar.test(i)) && (t = i.trim());
|
|
521
521
|
}
|
|
522
522
|
return { type: "heading", raw: e[0], depth: e[1].length, text: t, tokens: this.lexer.inline(t) };
|
|
@@ -524,13 +524,13 @@ var Tt = class {
|
|
|
524
524
|
}
|
|
525
525
|
hr(o) {
|
|
526
526
|
let e = this.rules.block.hr.exec(o);
|
|
527
|
-
if (e) return { type: "hr", raw:
|
|
527
|
+
if (e) return { type: "hr", raw: Xe(e[0], `
|
|
528
528
|
`) };
|
|
529
529
|
}
|
|
530
530
|
blockquote(o) {
|
|
531
531
|
let e = this.rules.block.blockquote.exec(o);
|
|
532
532
|
if (e) {
|
|
533
|
-
let t =
|
|
533
|
+
let t = Xe(e[0], `
|
|
534
534
|
`).split(`
|
|
535
535
|
`), i = "", s = "", r = [];
|
|
536
536
|
for (; t.length > 0; ) {
|
|
@@ -550,16 +550,16 @@ ${h}` : h;
|
|
|
550
550
|
let d = r.at(-1);
|
|
551
551
|
if ((d == null ? void 0 : d.type) === "code") break;
|
|
552
552
|
if ((d == null ? void 0 : d.type) === "blockquote") {
|
|
553
|
-
let m = d,
|
|
553
|
+
let m = d, v = m.raw + `
|
|
554
554
|
` + t.join(`
|
|
555
|
-
`), S = this.blockquote(
|
|
555
|
+
`), S = this.blockquote(v);
|
|
556
556
|
r[r.length - 1] = S, i = i.substring(0, i.length - m.raw.length) + S.raw, s = s.substring(0, s.length - m.text.length) + S.text;
|
|
557
557
|
break;
|
|
558
558
|
} else if ((d == null ? void 0 : d.type) === "list") {
|
|
559
|
-
let m = d,
|
|
559
|
+
let m = d, v = m.raw + `
|
|
560
560
|
` + t.join(`
|
|
561
|
-
`), S = this.list(
|
|
562
|
-
r[r.length - 1] = S, i = i.substring(0, i.length - d.raw.length) + S.raw, s = s.substring(0, s.length - m.raw.length) + S.raw, t =
|
|
561
|
+
`), S = this.list(v);
|
|
562
|
+
r[r.length - 1] = S, i = i.substring(0, i.length - d.raw.length) + S.raw, s = s.substring(0, s.length - m.raw.length) + S.raw, t = v.substring(r.at(-1).raw.length).split(`
|
|
563
563
|
`);
|
|
564
564
|
continue;
|
|
565
565
|
}
|
|
@@ -579,23 +579,23 @@ ${h}` : h;
|
|
|
579
579
|
a = e[0], o = o.substring(a.length);
|
|
580
580
|
let p = e[2].split(`
|
|
581
581
|
`, 1)[0].replace(this.rules.other.listReplaceTabs, (x) => " ".repeat(3 * x.length)), d = o.split(`
|
|
582
|
-
`, 1)[0], m = !p.trim(),
|
|
583
|
-
if (this.options.pedantic ? (
|
|
582
|
+
`, 1)[0], m = !p.trim(), v = 0;
|
|
583
|
+
if (this.options.pedantic ? (v = 2, h = p.trimStart()) : m ? v = e[1].length + 1 : (v = e[2].search(this.rules.other.nonSpaceChar), v = v > 4 ? 1 : v, h = p.slice(v), v += e[1].length), m && this.rules.other.blankLine.test(d) && (a += d + `
|
|
584
584
|
`, o = o.substring(d.length + 1), u = !0), !u) {
|
|
585
|
-
let x = this.rules.other.nextBulletRegex(
|
|
585
|
+
let x = this.rules.other.nextBulletRegex(v), A = this.rules.other.hrRegex(v), D = this.rules.other.fencesBeginRegex(v), E = this.rules.other.headingBeginRegex(v), H = this.rules.other.htmlBeginRegex(v);
|
|
586
586
|
for (; o; ) {
|
|
587
|
-
let
|
|
588
|
-
`, 1)[0],
|
|
589
|
-
if (d =
|
|
590
|
-
if (
|
|
591
|
-
` +
|
|
587
|
+
let _ = o.split(`
|
|
588
|
+
`, 1)[0], y;
|
|
589
|
+
if (d = _, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), y = d) : y = d.replace(this.rules.other.tabCharGlobal, " "), D.test(d) || E.test(d) || H.test(d) || x.test(d) || A.test(d)) break;
|
|
590
|
+
if (y.search(this.rules.other.nonSpaceChar) >= v || !d.trim()) h += `
|
|
591
|
+
` + y.slice(v);
|
|
592
592
|
else {
|
|
593
|
-
if (m || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 ||
|
|
593
|
+
if (m || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || D.test(p) || E.test(p) || A.test(p)) break;
|
|
594
594
|
h += `
|
|
595
595
|
` + d;
|
|
596
596
|
}
|
|
597
|
-
!m && !d.trim() && (m = !0), a +=
|
|
598
|
-
`, o = o.substring(
|
|
597
|
+
!m && !d.trim() && (m = !0), a += _ + `
|
|
598
|
+
`, o = o.substring(_.length + 1), p = y.slice(v);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
s.loose || (l ? s.loose = !0 : this.rules.other.doubleBlankLine.test(a) && (l = !0));
|
|
@@ -668,7 +668,7 @@ ${h}` : h;
|
|
|
668
668
|
let t = e[2].trim();
|
|
669
669
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(t)) {
|
|
670
670
|
if (!this.rules.other.endAngleBracket.test(t)) return;
|
|
671
|
-
let r =
|
|
671
|
+
let r = Xe(t.slice(0, -1), "\\");
|
|
672
672
|
if ((t.length - r.length) % 2 === 0) return;
|
|
673
673
|
} else {
|
|
674
674
|
let r = Qr(e[2], "()");
|
|
@@ -767,7 +767,7 @@ ${h}` : h;
|
|
|
767
767
|
return { type: "text", raw: e[0], text: e[0], escaped: t };
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
-
},
|
|
770
|
+
}, Te = class ii {
|
|
771
771
|
constructor(e) {
|
|
772
772
|
U(this, "tokens");
|
|
773
773
|
U(this, "options");
|
|
@@ -775,11 +775,11 @@ ${h}` : h;
|
|
|
775
775
|
U(this, "tokenizer");
|
|
776
776
|
U(this, "inlineQueue");
|
|
777
777
|
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Me, this.options.tokenizer = this.options.tokenizer || new Tt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
778
|
-
let t = { other: ne, block: mt.normal, inline:
|
|
779
|
-
this.options.pedantic ? (t.block = mt.pedantic, t.inline =
|
|
778
|
+
let t = { other: ne, block: mt.normal, inline: Ye.normal };
|
|
779
|
+
this.options.pedantic ? (t.block = mt.pedantic, t.inline = Ye.pedantic) : this.options.gfm && (t.block = mt.gfm, this.options.breaks ? t.inline = Ye.breaks : t.inline = Ye.gfm), this.tokenizer.rules = t;
|
|
780
780
|
}
|
|
781
781
|
static get rules() {
|
|
782
|
-
return { block: mt, inline:
|
|
782
|
+
return { block: mt, inline: Ye };
|
|
783
783
|
}
|
|
784
784
|
static lex(e, t) {
|
|
785
785
|
return new ii(t).lex(e);
|
|
@@ -953,9 +953,9 @@ ${h}` : h;
|
|
|
953
953
|
}
|
|
954
954
|
let p = e;
|
|
955
955
|
if ((a = this.options.extensions) != null && a.startInline) {
|
|
956
|
-
let d = 1 / 0, m = e.slice(1),
|
|
956
|
+
let d = 1 / 0, m = e.slice(1), v;
|
|
957
957
|
this.options.extensions.startInline.forEach((S) => {
|
|
958
|
-
|
|
958
|
+
v = S.call({ lexer: this }, m), typeof v == "number" && v >= 0 && (d = Math.min(d, v));
|
|
959
959
|
}), d < 1 / 0 && d >= 0 && (p = e.substring(0, d + 1));
|
|
960
960
|
}
|
|
961
961
|
if (h = this.tokenizer.inlineText(p)) {
|
|
@@ -1126,7 +1126,7 @@ ${o}</tr>
|
|
|
1126
1126
|
br() {
|
|
1127
1127
|
return "";
|
|
1128
1128
|
}
|
|
1129
|
-
},
|
|
1129
|
+
}, Re = class si {
|
|
1130
1130
|
constructor(e) {
|
|
1131
1131
|
U(this, "options");
|
|
1132
1132
|
U(this, "renderer");
|
|
@@ -1288,10 +1288,10 @@ ${o}</tr>
|
|
|
1288
1288
|
return o;
|
|
1289
1289
|
}
|
|
1290
1290
|
provideLexer() {
|
|
1291
|
-
return this.block ?
|
|
1291
|
+
return this.block ? Te.lex : Te.lexInline;
|
|
1292
1292
|
}
|
|
1293
1293
|
provideParser() {
|
|
1294
|
-
return this.block ?
|
|
1294
|
+
return this.block ? Re.parse : Re.parseInline;
|
|
1295
1295
|
}
|
|
1296
1296
|
}, U(Kt, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Kt), en = class {
|
|
1297
1297
|
constructor(...o) {
|
|
@@ -1299,10 +1299,10 @@ ${o}</tr>
|
|
|
1299
1299
|
U(this, "options", this.setOptions);
|
|
1300
1300
|
U(this, "parse", this.parseMarkdown(!0));
|
|
1301
1301
|
U(this, "parseInline", this.parseMarkdown(!1));
|
|
1302
|
-
U(this, "Parser",
|
|
1302
|
+
U(this, "Parser", Re);
|
|
1303
1303
|
U(this, "Renderer", Rt);
|
|
1304
1304
|
U(this, "TextRenderer", gi);
|
|
1305
|
-
U(this, "Lexer",
|
|
1305
|
+
U(this, "Lexer", Te);
|
|
1306
1306
|
U(this, "Tokenizer", Tt);
|
|
1307
1307
|
U(this, "Hooks", vt);
|
|
1308
1308
|
this.use(...o);
|
|
@@ -1408,10 +1408,10 @@ ${o}</tr>
|
|
|
1408
1408
|
return this.defaults = { ...this.defaults, ...o }, this;
|
|
1409
1409
|
}
|
|
1410
1410
|
lexer(o, e) {
|
|
1411
|
-
return
|
|
1411
|
+
return Te.lex(o, e ?? this.defaults);
|
|
1412
1412
|
}
|
|
1413
1413
|
parser(o, e) {
|
|
1414
|
-
return
|
|
1414
|
+
return Re.parse(o, e ?? this.defaults);
|
|
1415
1415
|
}
|
|
1416
1416
|
parseMarkdown(o) {
|
|
1417
1417
|
return (e, t) => {
|
|
@@ -1420,7 +1420,7 @@ ${o}</tr>
|
|
|
1420
1420
|
if (typeof e > "u" || e === null) return r(new Error("marked(): input parameter is undefined or null"));
|
|
1421
1421
|
if (typeof e != "string") return r(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1422
1422
|
s.hooks && (s.hooks.options = s, s.hooks.block = o);
|
|
1423
|
-
let l = s.hooks ? s.hooks.provideLexer() : o ?
|
|
1423
|
+
let l = s.hooks ? s.hooks.provideLexer() : o ? Te.lex : Te.lexInline, n = s.hooks ? s.hooks.provideParser() : o ? Re.parse : Re.parseInline;
|
|
1424
1424
|
if (s.async) return Promise.resolve(s.hooks ? s.hooks.preprocess(e) : e).then((u) => l(u, s)).then((u) => s.hooks ? s.hooks.processAllTokens(u) : u).then((u) => s.walkTokens ? Promise.all(this.walkTokens(u, s.walkTokens)).then(() => u) : u).then((u) => n(u, s)).then((u) => s.hooks ? s.hooks.postprocess(u) : u).catch(r);
|
|
1425
1425
|
try {
|
|
1426
1426
|
s.hooks && (e = s.hooks.preprocess(e));
|
|
@@ -1444,41 +1444,41 @@ Please report this to https://github.com/markedjs/marked.`, o) {
|
|
|
1444
1444
|
throw t;
|
|
1445
1445
|
};
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1448
|
-
function
|
|
1449
|
-
return
|
|
1447
|
+
}, Ne = new en();
|
|
1448
|
+
function P(o, e) {
|
|
1449
|
+
return Ne.parse(o, e);
|
|
1450
1450
|
}
|
|
1451
|
-
|
|
1452
|
-
return
|
|
1451
|
+
P.options = P.setOptions = function(o) {
|
|
1452
|
+
return Ne.setOptions(o), P.defaults = Ne.defaults, fs(P.defaults), P;
|
|
1453
1453
|
};
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
return
|
|
1454
|
+
P.getDefaults = li;
|
|
1455
|
+
P.defaults = Me;
|
|
1456
|
+
P.use = function(...o) {
|
|
1457
|
+
return Ne.use(...o), P.defaults = Ne.defaults, fs(P.defaults), P;
|
|
1458
1458
|
};
|
|
1459
|
-
|
|
1460
|
-
return
|
|
1459
|
+
P.walkTokens = function(o, e) {
|
|
1460
|
+
return Ne.walkTokens(o, e);
|
|
1461
1461
|
};
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1462
|
+
P.parseInline = Ne.parseInline;
|
|
1463
|
+
P.Parser = Re;
|
|
1464
|
+
P.parser = Re.parse;
|
|
1465
|
+
P.Renderer = Rt;
|
|
1466
|
+
P.TextRenderer = gi;
|
|
1467
|
+
P.Lexer = Te;
|
|
1468
|
+
P.lexer = Te.lex;
|
|
1469
|
+
P.Tokenizer = Tt;
|
|
1470
|
+
P.Hooks = vt;
|
|
1471
|
+
P.parse = P;
|
|
1472
|
+
P.options;
|
|
1473
|
+
P.setOptions;
|
|
1474
|
+
P.use;
|
|
1475
|
+
P.walkTokens;
|
|
1476
|
+
P.parseInline;
|
|
1477
|
+
Re.parse;
|
|
1478
|
+
Te.lex;
|
|
1479
1479
|
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
|
1480
1480
|
const {
|
|
1481
|
-
entries:
|
|
1481
|
+
entries: Ts,
|
|
1482
1482
|
setPrototypeOf: Zi,
|
|
1483
1483
|
isFrozen: tn,
|
|
1484
1484
|
getPrototypeOf: sn,
|
|
@@ -1486,8 +1486,8 @@ const {
|
|
|
1486
1486
|
} = Object;
|
|
1487
1487
|
let {
|
|
1488
1488
|
freeze: oe,
|
|
1489
|
-
seal:
|
|
1490
|
-
create:
|
|
1489
|
+
seal: de,
|
|
1490
|
+
create: Rs
|
|
1491
1491
|
} = Object, {
|
|
1492
1492
|
apply: ri,
|
|
1493
1493
|
construct: ni
|
|
@@ -1495,7 +1495,7 @@ let {
|
|
|
1495
1495
|
oe || (oe = function(e) {
|
|
1496
1496
|
return e;
|
|
1497
1497
|
});
|
|
1498
|
-
|
|
1498
|
+
de || (de = function(e) {
|
|
1499
1499
|
return e;
|
|
1500
1500
|
});
|
|
1501
1501
|
ri || (ri = function(e, t, i) {
|
|
@@ -1504,7 +1504,7 @@ ri || (ri = function(e, t, i) {
|
|
|
1504
1504
|
ni || (ni = function(e, t) {
|
|
1505
1505
|
return new e(...t);
|
|
1506
1506
|
});
|
|
1507
|
-
const _t = le(Array.prototype.forEach), nn = le(Array.prototype.lastIndexOf), Ki = le(Array.prototype.pop),
|
|
1507
|
+
const _t = le(Array.prototype.forEach), nn = le(Array.prototype.lastIndexOf), Ki = le(Array.prototype.pop), Ze = le(Array.prototype.push), on = le(Array.prototype.splice), bt = le(String.prototype.toLowerCase), qt = le(String.prototype.toString), Qi = le(String.prototype.match), Ke = le(String.prototype.replace), ln = le(String.prototype.indexOf), an = le(String.prototype.trim), pe = le(Object.prototype.hasOwnProperty), se = le(RegExp.prototype.test), Qe = hn(TypeError);
|
|
1508
1508
|
function le(o) {
|
|
1509
1509
|
return function(e) {
|
|
1510
1510
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -1520,8 +1520,8 @@ function hn(o) {
|
|
|
1520
1520
|
return ni(o, t);
|
|
1521
1521
|
};
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1524
|
-
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
1523
|
+
function N(o, e) {
|
|
1524
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : bt;
|
|
1525
1525
|
Zi && Zi(o, null);
|
|
1526
1526
|
let i = e.length;
|
|
1527
1527
|
for (; i--; ) {
|
|
@@ -1536,16 +1536,16 @@ function z(o, e) {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
function un(o) {
|
|
1538
1538
|
for (let e = 0; e < o.length; e++)
|
|
1539
|
-
|
|
1539
|
+
pe(o, e) || (o[e] = null);
|
|
1540
1540
|
return o;
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1543
|
-
const e =
|
|
1544
|
-
for (const [t, i] of
|
|
1545
|
-
|
|
1542
|
+
function Ee(o) {
|
|
1543
|
+
const e = Rs(null);
|
|
1544
|
+
for (const [t, i] of Ts(o))
|
|
1545
|
+
pe(o, t) && (Array.isArray(i) ? e[t] = un(i) : i && typeof i == "object" && i.constructor === Object ? e[t] = Ee(i) : e[t] = i);
|
|
1546
1546
|
return e;
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function Je(o, e) {
|
|
1549
1549
|
for (; o !== null; ) {
|
|
1550
1550
|
const i = rn(o, e);
|
|
1551
1551
|
if (i) {
|
|
@@ -1561,34 +1561,34 @@ function Qe(o, e) {
|
|
|
1561
1561
|
}
|
|
1562
1562
|
return t;
|
|
1563
1563
|
}
|
|
1564
|
-
const Ji = oe(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), jt = oe(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Yt = oe(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), cn = oe(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Xt = oe(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), dn = oe(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), es = oe(["#text"]), ts = oe(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Zt = oe(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), is = oe(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), yt = oe(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), pn =
|
|
1564
|
+
const Ji = oe(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), jt = oe(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Yt = oe(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), cn = oe(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Xt = oe(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), dn = oe(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), es = oe(["#text"]), ts = oe(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Zt = oe(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), is = oe(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), yt = oe(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), pn = de(/\{\{[\w\W]*|[\w\W]*\}\}/gm), fn = de(/<%[\w\W]*|[\w\W]*%>/gm), gn = de(/\$\{[\w\W]*/gm), mn = de(/^data-[\-\w.\u00B7-\uFFFF]+$/), _n = de(/^aria-[\-\w]+$/), Ss = de(
|
|
1565
1565
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
1566
1566
|
// eslint-disable-line no-useless-escape
|
|
1567
|
-
), yn =
|
|
1567
|
+
), yn = de(/^(?:\w+script|data):/i), vn = de(
|
|
1568
1568
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
1569
1569
|
// eslint-disable-line no-control-regex
|
|
1570
|
-
),
|
|
1570
|
+
), Cs = de(/^html$/i), bn = de(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
1571
1571
|
var ss = /* @__PURE__ */ Object.freeze({
|
|
1572
1572
|
__proto__: null,
|
|
1573
1573
|
ARIA_ATTR: _n,
|
|
1574
1574
|
ATTR_WHITESPACE: vn,
|
|
1575
|
-
CUSTOM_ELEMENT:
|
|
1575
|
+
CUSTOM_ELEMENT: bn,
|
|
1576
1576
|
DATA_ATTR: mn,
|
|
1577
|
-
DOCTYPE_NAME:
|
|
1577
|
+
DOCTYPE_NAME: Cs,
|
|
1578
1578
|
ERB_EXPR: fn,
|
|
1579
|
-
IS_ALLOWED_URI:
|
|
1579
|
+
IS_ALLOWED_URI: Ss,
|
|
1580
1580
|
IS_SCRIPT_OR_DATA: yn,
|
|
1581
1581
|
MUSTACHE_EXPR: pn,
|
|
1582
1582
|
TMPLIT_EXPR: gn
|
|
1583
1583
|
});
|
|
1584
|
-
const
|
|
1584
|
+
const et = {
|
|
1585
1585
|
element: 1,
|
|
1586
1586
|
text: 3,
|
|
1587
1587
|
// Deprecated
|
|
1588
1588
|
progressingInstruction: 7,
|
|
1589
1589
|
comment: 8,
|
|
1590
1590
|
document: 9
|
|
1591
|
-
},
|
|
1591
|
+
}, wn = function() {
|
|
1592
1592
|
return typeof window > "u" ? null : window;
|
|
1593
1593
|
}, xn = function(e, t) {
|
|
1594
1594
|
if (typeof e != "object" || typeof e.createPolicy != "function")
|
|
@@ -1622,10 +1622,10 @@ const Je = {
|
|
|
1622
1622
|
uponSanitizeShadowNode: []
|
|
1623
1623
|
};
|
|
1624
1624
|
};
|
|
1625
|
-
function
|
|
1626
|
-
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
1627
|
-
const e = (
|
|
1628
|
-
if (e.version = "3.2.6", e.removed = [], !o || !o.document || o.document.nodeType !==
|
|
1625
|
+
function As() {
|
|
1626
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : wn();
|
|
1627
|
+
const e = (w) => As(w);
|
|
1628
|
+
if (e.version = "3.2.6", e.removed = [], !o || !o.document || o.document.nodeType !== et.document || !o.Element)
|
|
1629
1629
|
return e.isSupported = !1, e;
|
|
1630
1630
|
let {
|
|
1631
1631
|
document: t
|
|
@@ -1640,39 +1640,39 @@ function Cs() {
|
|
|
1640
1640
|
HTMLFormElement: p,
|
|
1641
1641
|
DOMParser: d,
|
|
1642
1642
|
trustedTypes: m
|
|
1643
|
-
} = o,
|
|
1643
|
+
} = o, v = u.prototype, S = Je(v, "cloneNode"), I = Je(v, "remove"), x = Je(v, "nextSibling"), A = Je(v, "childNodes"), D = Je(v, "parentNode");
|
|
1644
1644
|
if (typeof l == "function") {
|
|
1645
|
-
const
|
|
1646
|
-
|
|
1645
|
+
const w = t.createElement("template");
|
|
1646
|
+
w.content && w.content.ownerDocument && (t = w.content.ownerDocument);
|
|
1647
1647
|
}
|
|
1648
1648
|
let E, H = "";
|
|
1649
1649
|
const {
|
|
1650
|
-
implementation:
|
|
1651
|
-
createNodeIterator:
|
|
1652
|
-
createDocumentFragment:
|
|
1650
|
+
implementation: _,
|
|
1651
|
+
createNodeIterator: y,
|
|
1652
|
+
createDocumentFragment: L,
|
|
1653
1653
|
getElementsByTagName: R
|
|
1654
1654
|
} = t, {
|
|
1655
1655
|
importNode: j
|
|
1656
1656
|
} = i;
|
|
1657
|
-
let
|
|
1658
|
-
e.isSupported = typeof
|
|
1657
|
+
let B = rs();
|
|
1658
|
+
e.isSupported = typeof Ts == "function" && typeof D == "function" && _ && _.createHTMLDocument !== void 0;
|
|
1659
1659
|
const {
|
|
1660
1660
|
MUSTACHE_EXPR: M,
|
|
1661
|
-
ERB_EXPR:
|
|
1661
|
+
ERB_EXPR: De,
|
|
1662
1662
|
TMPLIT_EXPR: Ie,
|
|
1663
1663
|
DATA_ATTR: ot,
|
|
1664
1664
|
ARIA_ATTR: lt,
|
|
1665
1665
|
IS_SCRIPT_OR_DATA: at,
|
|
1666
1666
|
ATTR_WHITESPACE: yi,
|
|
1667
|
-
CUSTOM_ELEMENT:
|
|
1667
|
+
CUSTOM_ELEMENT: Ls
|
|
1668
1668
|
} = ss;
|
|
1669
1669
|
let {
|
|
1670
1670
|
IS_ALLOWED_URI: vi
|
|
1671
1671
|
} = ss, X = null;
|
|
1672
|
-
const
|
|
1672
|
+
const bi = N({}, [...Ji, ...jt, ...Yt, ...Xt, ...es]);
|
|
1673
1673
|
let K = null;
|
|
1674
|
-
const
|
|
1675
|
-
let
|
|
1674
|
+
const wi = N({}, [...ts, ...Zt, ...is, ...yt]);
|
|
1675
|
+
let q = Object.seal(Rs(null, {
|
|
1676
1676
|
tagNameCheck: {
|
|
1677
1677
|
writable: !0,
|
|
1678
1678
|
configurable: !1,
|
|
@@ -1691,62 +1691,62 @@ function Cs() {
|
|
|
1691
1691
|
enumerable: !0,
|
|
1692
1692
|
value: !1
|
|
1693
1693
|
}
|
|
1694
|
-
})),
|
|
1695
|
-
const
|
|
1696
|
-
let $t = !0,
|
|
1697
|
-
const Si =
|
|
1694
|
+
})), Ge = null, It = null, xi = !0, Ht = !0, ki = !1, Ei = !0, He = !1, ht = !0, Le = !1, Ot = !1, Pt = !1, Oe = !1, ut = !1, ct = !1, Ti = !0, Ri = !1;
|
|
1695
|
+
const zs = "user-content-";
|
|
1696
|
+
let $t = !0, Ve = !1, Pe = {}, $e = null;
|
|
1697
|
+
const Si = N({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
1698
1698
|
let Ci = null;
|
|
1699
|
-
const Ai =
|
|
1699
|
+
const Ai = N({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
1700
1700
|
let Bt = null;
|
|
1701
|
-
const Di =
|
|
1702
|
-
let Be = we,
|
|
1703
|
-
const
|
|
1704
|
-
let ft =
|
|
1705
|
-
const
|
|
1706
|
-
let
|
|
1707
|
-
const
|
|
1708
|
-
let Z = null,
|
|
1709
|
-
const
|
|
1701
|
+
const Di = N({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), dt = "http://www.w3.org/1998/Math/MathML", pt = "http://www.w3.org/2000/svg", we = "http://www.w3.org/1999/xhtml";
|
|
1702
|
+
let Be = we, Ft = !1, Ut = null;
|
|
1703
|
+
const Ns = N({}, [dt, pt, we], qt);
|
|
1704
|
+
let ft = N({}, ["mi", "mo", "mn", "ms", "mtext"]), gt = N({}, ["annotation-xml"]);
|
|
1705
|
+
const Ms = N({}, ["title", "style", "font", "a", "script"]);
|
|
1706
|
+
let qe = null;
|
|
1707
|
+
const Is = ["application/xhtml+xml", "text/html"], Hs = "text/html";
|
|
1708
|
+
let Z = null, Fe = null;
|
|
1709
|
+
const Os = t.createElement("form"), Li = function(c) {
|
|
1710
1710
|
return c instanceof RegExp || c instanceof Function;
|
|
1711
1711
|
}, Wt = function() {
|
|
1712
1712
|
let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1713
|
-
if (!(
|
|
1714
|
-
if ((!c || typeof c != "object") && (c = {}), c =
|
|
1715
|
-
|
|
1713
|
+
if (!(Fe && Fe === c)) {
|
|
1714
|
+
if ((!c || typeof c != "object") && (c = {}), c = Ee(c), qe = // eslint-disable-next-line unicorn/prefer-includes
|
|
1715
|
+
Is.indexOf(c.PARSER_MEDIA_TYPE) === -1 ? Hs : c.PARSER_MEDIA_TYPE, Z = qe === "application/xhtml+xml" ? qt : bt, X = pe(c, "ALLOWED_TAGS") ? N({}, c.ALLOWED_TAGS, Z) : bi, K = pe(c, "ALLOWED_ATTR") ? N({}, c.ALLOWED_ATTR, Z) : wi, Ut = pe(c, "ALLOWED_NAMESPACES") ? N({}, c.ALLOWED_NAMESPACES, qt) : Ns, Bt = pe(c, "ADD_URI_SAFE_ATTR") ? N(Ee(Di), c.ADD_URI_SAFE_ATTR, Z) : Di, Ci = pe(c, "ADD_DATA_URI_TAGS") ? N(Ee(Ai), c.ADD_DATA_URI_TAGS, Z) : Ai, $e = pe(c, "FORBID_CONTENTS") ? N({}, c.FORBID_CONTENTS, Z) : Si, Ge = pe(c, "FORBID_TAGS") ? N({}, c.FORBID_TAGS, Z) : Ee({}), It = pe(c, "FORBID_ATTR") ? N({}, c.FORBID_ATTR, Z) : Ee({}), Pe = pe(c, "USE_PROFILES") ? c.USE_PROFILES : !1, xi = c.ALLOW_ARIA_ATTR !== !1, Ht = c.ALLOW_DATA_ATTR !== !1, ki = c.ALLOW_UNKNOWN_PROTOCOLS || !1, Ei = c.ALLOW_SELF_CLOSE_IN_ATTR !== !1, He = c.SAFE_FOR_TEMPLATES || !1, ht = c.SAFE_FOR_XML !== !1, Le = c.WHOLE_DOCUMENT || !1, Oe = c.RETURN_DOM || !1, ut = c.RETURN_DOM_FRAGMENT || !1, ct = c.RETURN_TRUSTED_TYPE || !1, Pt = c.FORCE_BODY || !1, Ti = c.SANITIZE_DOM !== !1, Ri = c.SANITIZE_NAMED_PROPS || !1, $t = c.KEEP_CONTENT !== !1, Ve = c.IN_PLACE || !1, vi = c.ALLOWED_URI_REGEXP || Ss, Be = c.NAMESPACE || we, ft = c.MATHML_TEXT_INTEGRATION_POINTS || ft, gt = c.HTML_INTEGRATION_POINTS || gt, q = c.CUSTOM_ELEMENT_HANDLING || {}, c.CUSTOM_ELEMENT_HANDLING && Li(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (q.tagNameCheck = c.CUSTOM_ELEMENT_HANDLING.tagNameCheck), c.CUSTOM_ELEMENT_HANDLING && Li(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (q.attributeNameCheck = c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), c.CUSTOM_ELEMENT_HANDLING && typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (q.allowCustomizedBuiltInElements = c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), He && (Ht = !1), ut && (Oe = !0), Pe && (X = N({}, es), K = [], Pe.html === !0 && (N(X, Ji), N(K, ts)), Pe.svg === !0 && (N(X, jt), N(K, Zt), N(K, yt)), Pe.svgFilters === !0 && (N(X, Yt), N(K, Zt), N(K, yt)), Pe.mathMl === !0 && (N(X, Xt), N(K, is), N(K, yt))), c.ADD_TAGS && (X === bi && (X = Ee(X)), N(X, c.ADD_TAGS, Z)), c.ADD_ATTR && (K === wi && (K = Ee(K)), N(K, c.ADD_ATTR, Z)), c.ADD_URI_SAFE_ATTR && N(Bt, c.ADD_URI_SAFE_ATTR, Z), c.FORBID_CONTENTS && ($e === Si && ($e = Ee($e)), N($e, c.FORBID_CONTENTS, Z)), $t && (X["#text"] = !0), Le && N(X, ["html", "head", "body"]), X.table && (N(X, ["tbody"]), delete Ge.tbody), c.TRUSTED_TYPES_POLICY) {
|
|
1716
1716
|
if (typeof c.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
1717
|
-
throw
|
|
1717
|
+
throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1718
1718
|
if (typeof c.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
1719
|
-
throw
|
|
1719
|
+
throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
1720
1720
|
E = c.TRUSTED_TYPES_POLICY, H = E.createHTML("");
|
|
1721
1721
|
} else
|
|
1722
1722
|
E === void 0 && (E = xn(m, s)), E !== null && typeof H == "string" && (H = E.createHTML(""));
|
|
1723
|
-
oe && oe(c),
|
|
1723
|
+
oe && oe(c), Fe = c;
|
|
1724
1724
|
}
|
|
1725
|
-
}, zi =
|
|
1726
|
-
let g =
|
|
1725
|
+
}, zi = N({}, [...jt, ...Yt, ...cn]), Ni = N({}, [...Xt, ...dn]), Ps = function(c) {
|
|
1726
|
+
let g = D(c);
|
|
1727
1727
|
(!g || !g.tagName) && (g = {
|
|
1728
1728
|
namespaceURI: Be,
|
|
1729
1729
|
tagName: "template"
|
|
1730
1730
|
});
|
|
1731
|
-
const
|
|
1732
|
-
return
|
|
1731
|
+
const b = bt(c.tagName), W = bt(g.tagName);
|
|
1732
|
+
return Ut[c.namespaceURI] ? c.namespaceURI === pt ? g.namespaceURI === we ? b === "svg" : g.namespaceURI === dt ? b === "svg" && (W === "annotation-xml" || ft[W]) : !!zi[b] : c.namespaceURI === dt ? g.namespaceURI === we ? b === "math" : g.namespaceURI === pt ? b === "math" && gt[W] : !!Ni[b] : c.namespaceURI === we ? g.namespaceURI === pt && !gt[W] || g.namespaceURI === dt && !ft[W] ? !1 : !Ni[b] && (Ms[b] || !zi[b]) : !!(qe === "application/xhtml+xml" && Ut[c.namespaceURI]) : !1;
|
|
1733
1733
|
}, ge = function(c) {
|
|
1734
|
-
|
|
1734
|
+
Ze(e.removed, {
|
|
1735
1735
|
element: c
|
|
1736
1736
|
});
|
|
1737
1737
|
try {
|
|
1738
|
-
|
|
1738
|
+
D(c).removeChild(c);
|
|
1739
1739
|
} catch {
|
|
1740
1740
|
I(c);
|
|
1741
1741
|
}
|
|
1742
|
-
},
|
|
1742
|
+
}, Ue = function(c, g) {
|
|
1743
1743
|
try {
|
|
1744
|
-
|
|
1744
|
+
Ze(e.removed, {
|
|
1745
1745
|
attribute: g.getAttributeNode(c),
|
|
1746
1746
|
from: g
|
|
1747
1747
|
});
|
|
1748
1748
|
} catch {
|
|
1749
|
-
|
|
1749
|
+
Ze(e.removed, {
|
|
1750
1750
|
attribute: null,
|
|
1751
1751
|
from: g
|
|
1752
1752
|
});
|
|
@@ -1763,31 +1763,31 @@ function Cs() {
|
|
|
1763
1763
|
} catch {
|
|
1764
1764
|
}
|
|
1765
1765
|
}, Mi = function(c) {
|
|
1766
|
-
let g = null,
|
|
1766
|
+
let g = null, b = null;
|
|
1767
1767
|
if (Pt)
|
|
1768
1768
|
c = "<remove></remove>" + c;
|
|
1769
1769
|
else {
|
|
1770
1770
|
const Y = Qi(c, /^[\r\n\t ]+/);
|
|
1771
|
-
|
|
1771
|
+
b = Y && Y[0];
|
|
1772
1772
|
}
|
|
1773
|
-
|
|
1773
|
+
qe === "application/xhtml+xml" && Be === we && (c = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + c + "</body></html>");
|
|
1774
1774
|
const W = E ? E.createHTML(c) : c;
|
|
1775
1775
|
if (Be === we)
|
|
1776
1776
|
try {
|
|
1777
|
-
g = new d().parseFromString(W,
|
|
1777
|
+
g = new d().parseFromString(W, qe);
|
|
1778
1778
|
} catch {
|
|
1779
1779
|
}
|
|
1780
1780
|
if (!g || !g.documentElement) {
|
|
1781
|
-
g =
|
|
1781
|
+
g = _.createDocument(Be, "template", null);
|
|
1782
1782
|
try {
|
|
1783
|
-
g.documentElement.innerHTML =
|
|
1783
|
+
g.documentElement.innerHTML = Ft ? H : W;
|
|
1784
1784
|
} catch {
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
|
-
const
|
|
1788
|
-
return c &&
|
|
1787
|
+
const ee = g.body || g.documentElement;
|
|
1788
|
+
return c && b && ee.insertBefore(t.createTextNode(b), ee.childNodes[0] || null), Be === we ? R.call(g, Le ? "html" : "body")[0] : Le ? g.documentElement : ee;
|
|
1789
1789
|
}, Ii = function(c) {
|
|
1790
|
-
return
|
|
1790
|
+
return y.call(
|
|
1791
1791
|
c.ownerDocument || c,
|
|
1792
1792
|
c,
|
|
1793
1793
|
// eslint-disable-next-line no-bitwise
|
|
@@ -1799,43 +1799,43 @@ function Cs() {
|
|
|
1799
1799
|
}, Hi = function(c) {
|
|
1800
1800
|
return typeof n == "function" && c instanceof n;
|
|
1801
1801
|
};
|
|
1802
|
-
function
|
|
1803
|
-
_t(
|
|
1804
|
-
|
|
1802
|
+
function xe(w, c, g) {
|
|
1803
|
+
_t(w, (b) => {
|
|
1804
|
+
b.call(e, c, g, Fe);
|
|
1805
1805
|
});
|
|
1806
1806
|
}
|
|
1807
1807
|
const Oi = function(c) {
|
|
1808
1808
|
let g = null;
|
|
1809
|
-
if (
|
|
1809
|
+
if (xe(B.beforeSanitizeElements, c, null), Gt(c))
|
|
1810
1810
|
return ge(c), !0;
|
|
1811
|
-
const
|
|
1812
|
-
if (
|
|
1813
|
-
tagName:
|
|
1811
|
+
const b = Z(c.nodeName);
|
|
1812
|
+
if (xe(B.uponSanitizeElement, c, {
|
|
1813
|
+
tagName: b,
|
|
1814
1814
|
allowedTags: X
|
|
1815
|
-
}), ht && c.hasChildNodes() && !Hi(c.firstElementChild) && se(/<[/\w!]/g, c.innerHTML) && se(/<[/\w!]/g, c.textContent) || c.nodeType ===
|
|
1815
|
+
}), ht && c.hasChildNodes() && !Hi(c.firstElementChild) && se(/<[/\w!]/g, c.innerHTML) && se(/<[/\w!]/g, c.textContent) || c.nodeType === et.progressingInstruction || ht && c.nodeType === et.comment && se(/<[/\w]/g, c.data))
|
|
1816
1816
|
return ge(c), !0;
|
|
1817
|
-
if (!X[
|
|
1818
|
-
if (!
|
|
1817
|
+
if (!X[b] || Ge[b]) {
|
|
1818
|
+
if (!Ge[b] && $i(b) && (q.tagNameCheck instanceof RegExp && se(q.tagNameCheck, b) || q.tagNameCheck instanceof Function && q.tagNameCheck(b)))
|
|
1819
1819
|
return !1;
|
|
1820
|
-
if ($t && !$e[
|
|
1821
|
-
const W =
|
|
1822
|
-
if (
|
|
1823
|
-
const Y =
|
|
1820
|
+
if ($t && !$e[b]) {
|
|
1821
|
+
const W = D(c) || c.parentNode, ee = A(c) || c.childNodes;
|
|
1822
|
+
if (ee && W) {
|
|
1823
|
+
const Y = ee.length;
|
|
1824
1824
|
for (let ae = Y - 1; ae >= 0; --ae) {
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1825
|
+
const ke = S(ee[ae], !0);
|
|
1826
|
+
ke.__removalCount = (c.__removalCount || 0) + 1, W.insertBefore(ke, x(c));
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
1829
|
}
|
|
1830
1830
|
return ge(c), !0;
|
|
1831
1831
|
}
|
|
1832
|
-
return c instanceof u && !
|
|
1833
|
-
g =
|
|
1834
|
-
}), c.textContent !== g && (
|
|
1832
|
+
return c instanceof u && !Ps(c) || (b === "noscript" || b === "noembed" || b === "noframes") && se(/<\/no(script|embed|frames)/i, c.innerHTML) ? (ge(c), !0) : (He && c.nodeType === et.text && (g = c.textContent, _t([M, De, Ie], (W) => {
|
|
1833
|
+
g = Ke(g, W, " ");
|
|
1834
|
+
}), c.textContent !== g && (Ze(e.removed, {
|
|
1835
1835
|
element: c.cloneNode()
|
|
1836
|
-
}), c.textContent = g)),
|
|
1837
|
-
}, Pi = function(c, g,
|
|
1838
|
-
if (Ti && (g === "id" || g === "name") && (
|
|
1836
|
+
}), c.textContent = g)), xe(B.afterSanitizeElements, c, null), !1);
|
|
1837
|
+
}, Pi = function(c, g, b) {
|
|
1838
|
+
if (Ti && (g === "id" || g === "name") && (b in t || b in Os))
|
|
1839
1839
|
return !1;
|
|
1840
1840
|
if (!(Ht && !It[g] && se(ot, g))) {
|
|
1841
1841
|
if (!(xi && se(lt, g))) {
|
|
@@ -1844,15 +1844,15 @@ function Cs() {
|
|
|
1844
1844
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
1845
1845
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1846
1846
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
1847
|
-
!($i(c) && (
|
|
1847
|
+
!($i(c) && (q.tagNameCheck instanceof RegExp && se(q.tagNameCheck, c) || q.tagNameCheck instanceof Function && q.tagNameCheck(c)) && (q.attributeNameCheck instanceof RegExp && se(q.attributeNameCheck, g) || q.attributeNameCheck instanceof Function && q.attributeNameCheck(g)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
1848
1848
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1849
|
-
g === "is" &&
|
|
1849
|
+
g === "is" && q.allowCustomizedBuiltInElements && (q.tagNameCheck instanceof RegExp && se(q.tagNameCheck, b) || q.tagNameCheck instanceof Function && q.tagNameCheck(b)))
|
|
1850
1850
|
) return !1;
|
|
1851
1851
|
} else if (!Bt[g]) {
|
|
1852
|
-
if (!se(vi,
|
|
1853
|
-
if (!((g === "src" || g === "xlink:href" || g === "href") && c !== "script" && ln(
|
|
1854
|
-
if (!(ki && !se(at,
|
|
1855
|
-
if (
|
|
1852
|
+
if (!se(vi, Ke(b, yi, ""))) {
|
|
1853
|
+
if (!((g === "src" || g === "xlink:href" || g === "href") && c !== "script" && ln(b, "data:") === 0 && Ci[c])) {
|
|
1854
|
+
if (!(ki && !se(at, Ke(b, yi, "")))) {
|
|
1855
|
+
if (b)
|
|
1856
1856
|
return !1;
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
@@ -1862,15 +1862,15 @@ function Cs() {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
return !0;
|
|
1864
1864
|
}, $i = function(c) {
|
|
1865
|
-
return c !== "annotation-xml" && Qi(c,
|
|
1865
|
+
return c !== "annotation-xml" && Qi(c, Ls);
|
|
1866
1866
|
}, Bi = function(c) {
|
|
1867
|
-
|
|
1867
|
+
xe(B.beforeSanitizeAttributes, c, null);
|
|
1868
1868
|
const {
|
|
1869
1869
|
attributes: g
|
|
1870
1870
|
} = c;
|
|
1871
1871
|
if (!g || Gt(c))
|
|
1872
1872
|
return;
|
|
1873
|
-
const
|
|
1873
|
+
const b = {
|
|
1874
1874
|
attrName: "",
|
|
1875
1875
|
attrValue: "",
|
|
1876
1876
|
keepAttr: !0,
|
|
@@ -1879,129 +1879,129 @@ function Cs() {
|
|
|
1879
1879
|
};
|
|
1880
1880
|
let W = g.length;
|
|
1881
1881
|
for (; W--; ) {
|
|
1882
|
-
const
|
|
1882
|
+
const ee = g[W], {
|
|
1883
1883
|
name: Y,
|
|
1884
1884
|
namespaceURI: ae,
|
|
1885
|
-
value:
|
|
1886
|
-
} =
|
|
1887
|
-
let
|
|
1888
|
-
if (
|
|
1889
|
-
|
|
1885
|
+
value: ke
|
|
1886
|
+
} = ee, je = Z(Y), Vt = ke;
|
|
1887
|
+
let te = Y === "value" ? Vt : an(Vt);
|
|
1888
|
+
if (b.attrName = je, b.attrValue = te, b.keepAttr = !0, b.forceKeepAttr = void 0, xe(B.uponSanitizeAttribute, c, b), te = b.attrValue, Ri && (je === "id" || je === "name") && (Ue(Y, c), te = zs + te), ht && se(/((--!?|])>)|<\/(style|title)/i, te)) {
|
|
1889
|
+
Ue(Y, c);
|
|
1890
1890
|
continue;
|
|
1891
1891
|
}
|
|
1892
|
-
if (
|
|
1892
|
+
if (b.forceKeepAttr)
|
|
1893
1893
|
continue;
|
|
1894
|
-
if (!
|
|
1895
|
-
|
|
1894
|
+
if (!b.keepAttr) {
|
|
1895
|
+
Ue(Y, c);
|
|
1896
1896
|
continue;
|
|
1897
1897
|
}
|
|
1898
|
-
if (!Ei && se(/\/>/i,
|
|
1899
|
-
|
|
1898
|
+
if (!Ei && se(/\/>/i, te)) {
|
|
1899
|
+
Ue(Y, c);
|
|
1900
1900
|
continue;
|
|
1901
1901
|
}
|
|
1902
|
-
He && _t([M,
|
|
1903
|
-
|
|
1902
|
+
He && _t([M, De, Ie], (Ui) => {
|
|
1903
|
+
te = Ke(te, Ui, " ");
|
|
1904
1904
|
});
|
|
1905
|
-
const
|
|
1906
|
-
if (!Pi(
|
|
1907
|
-
|
|
1905
|
+
const Fi = Z(c.nodeName);
|
|
1906
|
+
if (!Pi(Fi, je, te)) {
|
|
1907
|
+
Ue(Y, c);
|
|
1908
1908
|
continue;
|
|
1909
1909
|
}
|
|
1910
1910
|
if (E && typeof m == "object" && typeof m.getAttributeType == "function" && !ae)
|
|
1911
|
-
switch (m.getAttributeType(
|
|
1911
|
+
switch (m.getAttributeType(Fi, je)) {
|
|
1912
1912
|
case "TrustedHTML": {
|
|
1913
|
-
|
|
1913
|
+
te = E.createHTML(te);
|
|
1914
1914
|
break;
|
|
1915
1915
|
}
|
|
1916
1916
|
case "TrustedScriptURL": {
|
|
1917
|
-
|
|
1917
|
+
te = E.createScriptURL(te);
|
|
1918
1918
|
break;
|
|
1919
1919
|
}
|
|
1920
1920
|
}
|
|
1921
|
-
if (
|
|
1921
|
+
if (te !== Vt)
|
|
1922
1922
|
try {
|
|
1923
|
-
ae ? c.setAttributeNS(ae, Y,
|
|
1923
|
+
ae ? c.setAttributeNS(ae, Y, te) : c.setAttribute(Y, te), Gt(c) ? ge(c) : Ki(e.removed);
|
|
1924
1924
|
} catch {
|
|
1925
|
-
|
|
1925
|
+
Ue(Y, c);
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
|
-
|
|
1929
|
-
},
|
|
1928
|
+
xe(B.afterSanitizeAttributes, c, null);
|
|
1929
|
+
}, $s = function w(c) {
|
|
1930
1930
|
let g = null;
|
|
1931
|
-
const
|
|
1932
|
-
for (
|
|
1933
|
-
|
|
1934
|
-
|
|
1931
|
+
const b = Ii(c);
|
|
1932
|
+
for (xe(B.beforeSanitizeShadowDOM, c, null); g = b.nextNode(); )
|
|
1933
|
+
xe(B.uponSanitizeShadowNode, g, null), Oi(g), Bi(g), g.content instanceof r && w(g.content);
|
|
1934
|
+
xe(B.afterSanitizeShadowDOM, c, null);
|
|
1935
1935
|
};
|
|
1936
|
-
return e.sanitize = function(
|
|
1937
|
-
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null,
|
|
1938
|
-
if (
|
|
1939
|
-
if (typeof
|
|
1940
|
-
if (
|
|
1941
|
-
throw
|
|
1936
|
+
return e.sanitize = function(w) {
|
|
1937
|
+
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null, b = null, W = null, ee = null;
|
|
1938
|
+
if (Ft = !w, Ft && (w = "<!-->"), typeof w != "string" && !Hi(w))
|
|
1939
|
+
if (typeof w.toString == "function") {
|
|
1940
|
+
if (w = w.toString(), typeof w != "string")
|
|
1941
|
+
throw Qe("dirty is not a string, aborting");
|
|
1942
1942
|
} else
|
|
1943
|
-
throw
|
|
1943
|
+
throw Qe("toString is not a function");
|
|
1944
1944
|
if (!e.isSupported)
|
|
1945
|
-
return
|
|
1946
|
-
if (Ot || Wt(c), e.removed = [], typeof
|
|
1947
|
-
if (
|
|
1948
|
-
const
|
|
1949
|
-
if (!X[
|
|
1950
|
-
throw
|
|
1945
|
+
return w;
|
|
1946
|
+
if (Ot || Wt(c), e.removed = [], typeof w == "string" && (Ve = !1), Ve) {
|
|
1947
|
+
if (w.nodeName) {
|
|
1948
|
+
const ke = Z(w.nodeName);
|
|
1949
|
+
if (!X[ke] || Ge[ke])
|
|
1950
|
+
throw Qe("root node is forbidden and cannot be sanitized in-place");
|
|
1951
1951
|
}
|
|
1952
|
-
} else if (
|
|
1953
|
-
g = Mi("<!---->"),
|
|
1952
|
+
} else if (w instanceof n)
|
|
1953
|
+
g = Mi("<!---->"), b = g.ownerDocument.importNode(w, !0), b.nodeType === et.element && b.nodeName === "BODY" || b.nodeName === "HTML" ? g = b : g.appendChild(b);
|
|
1954
1954
|
else {
|
|
1955
|
-
if (!Oe && !He && !
|
|
1956
|
-
|
|
1957
|
-
return E && ct ? E.createHTML(
|
|
1958
|
-
if (g = Mi(
|
|
1955
|
+
if (!Oe && !He && !Le && // eslint-disable-next-line unicorn/prefer-includes
|
|
1956
|
+
w.indexOf("<") === -1)
|
|
1957
|
+
return E && ct ? E.createHTML(w) : w;
|
|
1958
|
+
if (g = Mi(w), !g)
|
|
1959
1959
|
return Oe ? null : ct ? H : "";
|
|
1960
1960
|
}
|
|
1961
1961
|
g && Pt && ge(g.firstChild);
|
|
1962
|
-
const Y = Ii(
|
|
1962
|
+
const Y = Ii(Ve ? w : g);
|
|
1963
1963
|
for (; W = Y.nextNode(); )
|
|
1964
|
-
Oi(W), Bi(W), W.content instanceof r &&
|
|
1965
|
-
if (
|
|
1966
|
-
return
|
|
1964
|
+
Oi(W), Bi(W), W.content instanceof r && $s(W.content);
|
|
1965
|
+
if (Ve)
|
|
1966
|
+
return w;
|
|
1967
1967
|
if (Oe) {
|
|
1968
1968
|
if (ut)
|
|
1969
|
-
for (
|
|
1970
|
-
|
|
1969
|
+
for (ee = L.call(g.ownerDocument); g.firstChild; )
|
|
1970
|
+
ee.appendChild(g.firstChild);
|
|
1971
1971
|
else
|
|
1972
|
-
|
|
1973
|
-
return (K.shadowroot || K.shadowrootmode) && (
|
|
1972
|
+
ee = g;
|
|
1973
|
+
return (K.shadowroot || K.shadowrootmode) && (ee = j.call(i, ee, !0)), ee;
|
|
1974
1974
|
}
|
|
1975
|
-
let ae =
|
|
1976
|
-
return
|
|
1977
|
-
` + ae), He && _t([M,
|
|
1978
|
-
ae =
|
|
1975
|
+
let ae = Le ? g.outerHTML : g.innerHTML;
|
|
1976
|
+
return Le && X["!doctype"] && g.ownerDocument && g.ownerDocument.doctype && g.ownerDocument.doctype.name && se(Cs, g.ownerDocument.doctype.name) && (ae = "<!DOCTYPE " + g.ownerDocument.doctype.name + `>
|
|
1977
|
+
` + ae), He && _t([M, De, Ie], (ke) => {
|
|
1978
|
+
ae = Ke(ae, ke, " ");
|
|
1979
1979
|
}), E && ct ? E.createHTML(ae) : ae;
|
|
1980
1980
|
}, e.setConfig = function() {
|
|
1981
|
-
let
|
|
1982
|
-
Wt(
|
|
1981
|
+
let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1982
|
+
Wt(w), Ot = !0;
|
|
1983
1983
|
}, e.clearConfig = function() {
|
|
1984
|
-
|
|
1985
|
-
}, e.isValidAttribute = function(
|
|
1986
|
-
|
|
1987
|
-
const
|
|
1988
|
-
return Pi(
|
|
1989
|
-
}, e.addHook = function(
|
|
1990
|
-
typeof c == "function" &&
|
|
1991
|
-
}, e.removeHook = function(
|
|
1984
|
+
Fe = null, Ot = !1;
|
|
1985
|
+
}, e.isValidAttribute = function(w, c, g) {
|
|
1986
|
+
Fe || Wt({});
|
|
1987
|
+
const b = Z(w), W = Z(c);
|
|
1988
|
+
return Pi(b, W, g);
|
|
1989
|
+
}, e.addHook = function(w, c) {
|
|
1990
|
+
typeof c == "function" && Ze(B[w], c);
|
|
1991
|
+
}, e.removeHook = function(w, c) {
|
|
1992
1992
|
if (c !== void 0) {
|
|
1993
|
-
const g = nn(
|
|
1994
|
-
return g === -1 ? void 0 : on(
|
|
1993
|
+
const g = nn(B[w], c);
|
|
1994
|
+
return g === -1 ? void 0 : on(B[w], g, 1)[0];
|
|
1995
1995
|
}
|
|
1996
|
-
return Ki(
|
|
1997
|
-
}, e.removeHooks = function(
|
|
1998
|
-
|
|
1996
|
+
return Ki(B[w]);
|
|
1997
|
+
}, e.removeHooks = function(w) {
|
|
1998
|
+
B[w] = [];
|
|
1999
1999
|
}, e.removeAllHooks = function() {
|
|
2000
|
-
|
|
2000
|
+
B = rs();
|
|
2001
2001
|
}, e;
|
|
2002
2002
|
}
|
|
2003
|
-
var kn =
|
|
2004
|
-
const En = ["innerHTML"], Tn = "Markdown", Rn = /* @__PURE__ */
|
|
2003
|
+
var kn = As();
|
|
2004
|
+
const En = ["innerHTML"], Tn = "Markdown", Rn = /* @__PURE__ */ ue({
|
|
2005
2005
|
inheritAttrs: !1,
|
|
2006
2006
|
__name: "Markdown",
|
|
2007
2007
|
props: {
|
|
@@ -2012,21 +2012,21 @@ const En = ["innerHTML"], Tn = "Markdown", Rn = /* @__PURE__ */ ce({
|
|
|
2012
2012
|
},
|
|
2013
2013
|
emits: ["update:markdownText", "changeMode"],
|
|
2014
2014
|
setup(o, { emit: e }) {
|
|
2015
|
-
const t = o, i = e, s = ls([{ comp:
|
|
2016
|
-
|
|
2015
|
+
const t = o, i = e, s = ls([{ comp: ps, event: a, tooltip: "Edit Markdown" }]);
|
|
2016
|
+
P.setOptions({
|
|
2017
2017
|
gfm: !0,
|
|
2018
2018
|
breaks: !0
|
|
2019
2019
|
});
|
|
2020
2020
|
const r = F(t.markdownText ?? "");
|
|
2021
|
-
|
|
2021
|
+
ce(() => t.markdownText, (h) => {
|
|
2022
2022
|
h !== void 0 && h !== r.value && (r.value = h);
|
|
2023
2023
|
});
|
|
2024
2024
|
const l = F(t.mode ? t.mode === "edit" : !1);
|
|
2025
|
-
|
|
2025
|
+
ce(() => t.mode, (h) => {
|
|
2026
2026
|
h && (l.value = h === "edit");
|
|
2027
2027
|
});
|
|
2028
2028
|
const n = ve(() => {
|
|
2029
|
-
const h = t.inputFormat === "html" ? r.value ?? "" :
|
|
2029
|
+
const h = t.inputFormat === "html" ? r.value ?? "" : P.parse(r.value ?? "");
|
|
2030
2030
|
return t.sanitize === !1 ? h : kn.sanitize(h);
|
|
2031
2031
|
});
|
|
2032
2032
|
function u() {
|
|
@@ -2035,21 +2035,21 @@ const En = ["innerHTML"], Tn = "Markdown", Rn = /* @__PURE__ */ ce({
|
|
|
2035
2035
|
function a() {
|
|
2036
2036
|
l.value = !l.value, i("changeMode", l.value ? "edit" : "preview");
|
|
2037
2037
|
}
|
|
2038
|
-
return (h, p) => (T(),
|
|
2039
|
-
|
|
2038
|
+
return (h, p) => (T(), O(Ce, null, [
|
|
2039
|
+
wt(h.$slots, "default", {
|
|
2040
2040
|
widgetName: Tn,
|
|
2041
2041
|
childIcons: s.value
|
|
2042
2042
|
}, void 0, !0),
|
|
2043
|
-
|
|
2044
|
-
l.value ?
|
|
2043
|
+
C("div", oi({ class: "markdown-widget-wrap" }, h.$attrs), [
|
|
2044
|
+
l.value ? ze((T(), O("textarea", {
|
|
2045
2045
|
key: 0,
|
|
2046
2046
|
"onUpdate:modelValue": p[0] || (p[0] = (d) => r.value = d),
|
|
2047
2047
|
onInput: u,
|
|
2048
2048
|
class: "markdown-input",
|
|
2049
2049
|
placeholder: "Write markdown here…"
|
|
2050
2050
|
}, null, 544)), [
|
|
2051
|
-
[
|
|
2052
|
-
]) : (T(),
|
|
2051
|
+
[qs, r.value]
|
|
2052
|
+
]) : (T(), O("div", {
|
|
2053
2053
|
key: 1,
|
|
2054
2054
|
class: "markdown-output",
|
|
2055
2055
|
innerHTML: n.value
|
|
@@ -2057,7 +2057,7 @@ const En = ["innerHTML"], Tn = "Markdown", Rn = /* @__PURE__ */ ce({
|
|
|
2057
2057
|
], 16)
|
|
2058
2058
|
], 64));
|
|
2059
2059
|
}
|
|
2060
|
-
}),
|
|
2060
|
+
}), yo = /* @__PURE__ */ Ae(Rn, [["__scopeId", "data-v-5bf532d5"]]);
|
|
2061
2061
|
function Sn(o, e, t, i, s) {
|
|
2062
2062
|
let r = (...l) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(o, l));
|
|
2063
2063
|
return r.prototype = e.prototype, r;
|
|
@@ -2655,8 +2655,8 @@ class _e {
|
|
|
2655
2655
|
if (n.length) {
|
|
2656
2656
|
let p = e._moving && !t.nested, d = p ? this.directionCollideCoverage(e, t, n) : n[0];
|
|
2657
2657
|
if (p && d && ((h = (a = e.grid) == null ? void 0 : a.opts) != null && h.subGridDynamic) && !e.grid._isTemp) {
|
|
2658
|
-
let m = f.areaIntercept(t.rect, d._rect),
|
|
2659
|
-
m / (
|
|
2658
|
+
let m = f.areaIntercept(t.rect, d._rect), v = f.area(t.rect), S = f.area(d._rect);
|
|
2659
|
+
m / (v < S ? v : S) > 0.8 && (d.grid.makeSubGrid(d.el, void 0, e), d = void 0);
|
|
2660
2660
|
}
|
|
2661
2661
|
d ? u = !this._fixCollisions(e, r, d, t) : (u = !1, i && delete t.pack);
|
|
2662
2662
|
}
|
|
@@ -2850,7 +2850,7 @@ const he = {
|
|
|
2850
2850
|
};
|
|
2851
2851
|
class k {
|
|
2852
2852
|
}
|
|
2853
|
-
const
|
|
2853
|
+
const fe = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
|
|
2854
2854
|
class ye {
|
|
2855
2855
|
}
|
|
2856
2856
|
function St(o, e) {
|
|
@@ -2891,7 +2891,7 @@ function St(o, e) {
|
|
|
2891
2891
|
// relatedTarget
|
|
2892
2892
|
), o.target.dispatchEvent(i);
|
|
2893
2893
|
}
|
|
2894
|
-
function
|
|
2894
|
+
function Ds(o, e) {
|
|
2895
2895
|
o.cancelable && o.preventDefault();
|
|
2896
2896
|
const t = document.createEvent("MouseEvents");
|
|
2897
2897
|
t.initMouseEvent(
|
|
@@ -2944,11 +2944,11 @@ function Lt(o) {
|
|
|
2944
2944
|
o.pointerType !== "mouse" && o.target.releasePointerCapture(o.pointerId);
|
|
2945
2945
|
}
|
|
2946
2946
|
function ns(o) {
|
|
2947
|
-
k.dragElement && o.pointerType !== "mouse" &&
|
|
2947
|
+
k.dragElement && o.pointerType !== "mouse" && Ds(o, "mouseenter");
|
|
2948
2948
|
}
|
|
2949
2949
|
function os(o) {
|
|
2950
2950
|
k.dragElement && o.pointerType !== "mouse" && (ye.pointerLeaveTimeout = window.setTimeout(() => {
|
|
2951
|
-
delete ye.pointerLeaveTimeout,
|
|
2951
|
+
delete ye.pointerLeaveTimeout, Ds(o, "mouseleave");
|
|
2952
2952
|
}, 10));
|
|
2953
2953
|
}
|
|
2954
2954
|
class Mt {
|
|
@@ -2958,15 +2958,15 @@ class Mt {
|
|
|
2958
2958
|
/** @internal */
|
|
2959
2959
|
_init() {
|
|
2960
2960
|
const e = document.createElement("div");
|
|
2961
|
-
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Mt.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.el = e, this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown),
|
|
2961
|
+
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Mt.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.el = e, this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), fe && (this.el.addEventListener("touchstart", Ct), this.el.addEventListener("pointerdown", Lt)), this;
|
|
2962
2962
|
}
|
|
2963
2963
|
/** call this when resize handle needs to be removed and cleaned up */
|
|
2964
2964
|
destroy() {
|
|
2965
|
-
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown),
|
|
2965
|
+
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), fe && (this.el.removeEventListener("touchstart", Ct), this.el.removeEventListener("pointerdown", Lt)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
|
|
2966
2966
|
}
|
|
2967
2967
|
/** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
|
|
2968
2968
|
_mouseDown(e) {
|
|
2969
|
-
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0),
|
|
2969
|
+
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), fe && (this.el.addEventListener("touchmove", At), this.el.addEventListener("touchend", Dt)), e.stopPropagation(), e.preventDefault();
|
|
2970
2970
|
}
|
|
2971
2971
|
/** @internal */
|
|
2972
2972
|
_mouseMove(e) {
|
|
@@ -2975,7 +2975,7 @@ class Mt {
|
|
|
2975
2975
|
}
|
|
2976
2976
|
/** @internal */
|
|
2977
2977
|
_mouseUp(e) {
|
|
2978
|
-
this.moving && this._triggerEvent("stop", e), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0),
|
|
2978
|
+
this.moving && this._triggerEvent("stop", e), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), fe && (this.el.removeEventListener("touchmove", At), this.el.removeEventListener("touchend", Dt)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
|
|
2979
2979
|
}
|
|
2980
2980
|
/** @internal */
|
|
2981
2981
|
_triggerEvent(e, t) {
|
|
@@ -3184,10 +3184,10 @@ class st extends mi {
|
|
|
3184
3184
|
super.off(e);
|
|
3185
3185
|
}
|
|
3186
3186
|
enable() {
|
|
3187
|
-
this.disabled !== !1 && (super.enable(), this.dragEl.addEventListener("mousedown", this._mouseDown),
|
|
3187
|
+
this.disabled !== !1 && (super.enable(), this.dragEl.addEventListener("mousedown", this._mouseDown), fe && (this.dragEl.addEventListener("touchstart", Ct), this.dragEl.addEventListener("pointerdown", Lt)), this.el.classList.remove("ui-draggable-disabled"));
|
|
3188
3188
|
}
|
|
3189
3189
|
disable(e = !1) {
|
|
3190
|
-
this.disabled !== !0 && (super.disable(), this.dragEl.removeEventListener("mousedown", this._mouseDown),
|
|
3190
|
+
this.disabled !== !0 && (super.disable(), this.dragEl.removeEventListener("mousedown", this._mouseDown), fe && (this.dragEl.removeEventListener("touchstart", Ct), this.dragEl.removeEventListener("pointerdown", Lt)), e || this.el.classList.add("ui-draggable-disabled"));
|
|
3191
3191
|
}
|
|
3192
3192
|
destroy() {
|
|
3193
3193
|
this.dragTimeout && window.clearTimeout(this.dragTimeout), delete this.dragTimeout, this.mouseDownEvent && this._mouseUp(this.mouseDownEvent), this.disable(!0), delete this.el, delete this.helper, delete this.option, super.destroy();
|
|
@@ -3198,7 +3198,7 @@ class st extends mi {
|
|
|
3198
3198
|
/** @internal call when mouse goes down before a dragstart happens */
|
|
3199
3199
|
_mouseDown(e) {
|
|
3200
3200
|
if (!k.mouseHandled)
|
|
3201
|
-
return e.button !== 0 || e.target.closest(An) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete k.dragElement, delete k.dropElement, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0),
|
|
3201
|
+
return e.button !== 0 || e.target.closest(An) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete k.dragElement, delete k.dropElement, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), fe && (this.dragEl.addEventListener("touchmove", At), this.dragEl.addEventListener("touchend", Dt)), e.preventDefault(), document.activeElement && document.activeElement.blur(), k.mouseHandled = !0), !0;
|
|
3202
3202
|
}
|
|
3203
3203
|
/** @internal method to call actual drag event */
|
|
3204
3204
|
_callDrag(e) {
|
|
@@ -3229,7 +3229,7 @@ class st extends mi {
|
|
|
3229
3229
|
/** @internal call when the mouse gets released to drop the item at current location */
|
|
3230
3230
|
_mouseUp(e) {
|
|
3231
3231
|
var t;
|
|
3232
|
-
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0),
|
|
3232
|
+
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), fe && (this.dragEl.removeEventListener("touchmove", At, !0), this.dragEl.removeEventListener("touchend", Dt, !0)), this.dragging) {
|
|
3233
3233
|
delete this.dragging, ((t = k.dropElement) == null ? void 0 : t.el) === this.el.parentElement && delete k.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper === this.el ? this._removeHelperStyle() : this.helper.remove();
|
|
3234
3234
|
const i = f.initEvent(e, { target: this.el, type: "dragstop" });
|
|
3235
3235
|
this.option.stop && this.option.stop(i), this.triggerEvent("dragstop", i), k.dropElement && k.dropElement.drop(e);
|
|
@@ -3327,10 +3327,10 @@ class Dn extends mi {
|
|
|
3327
3327
|
super.off(e);
|
|
3328
3328
|
}
|
|
3329
3329
|
enable() {
|
|
3330
|
-
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave),
|
|
3330
|
+
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), fe && (this.el.addEventListener("pointerenter", ns), this.el.addEventListener("pointerleave", os)));
|
|
3331
3331
|
}
|
|
3332
3332
|
disable(e = !1) {
|
|
3333
|
-
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave),
|
|
3333
|
+
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), fe && (this.el.removeEventListener("pointerenter", ns), this.el.removeEventListener("pointerleave", os)));
|
|
3334
3334
|
}
|
|
3335
3335
|
destroy() {
|
|
3336
3336
|
this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
|
|
@@ -3503,7 +3503,7 @@ class Ln {
|
|
|
3503
3503
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
3504
3504
|
*/
|
|
3505
3505
|
const Q = new Ln();
|
|
3506
|
-
class
|
|
3506
|
+
class z {
|
|
3507
3507
|
/**
|
|
3508
3508
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
3509
3509
|
* simply return the existing instance (ignore any passed options). There is also an initAll() version that support
|
|
@@ -3518,8 +3518,8 @@ class L {
|
|
|
3518
3518
|
* let grid = document.querySelector('.grid-stack').gridstack;
|
|
3519
3519
|
*/
|
|
3520
3520
|
static init(e = {}, t = ".grid-stack") {
|
|
3521
|
-
let i =
|
|
3522
|
-
return i ? (i.gridstack || (i.gridstack = new
|
|
3521
|
+
let i = z.getGridElement(t);
|
|
3522
|
+
return i ? (i.gridstack || (i.gridstack = new z(i, f.cloneDeep(e))), i.gridstack) : (console.error(typeof t == "string" ? 'GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
|
|
3523
3523
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.` : "GridStack.init() no grid element was passed."), null);
|
|
3524
3524
|
}
|
|
3525
3525
|
/**
|
|
@@ -3533,8 +3533,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3533
3533
|
*/
|
|
3534
3534
|
static initAll(e = {}, t = ".grid-stack") {
|
|
3535
3535
|
let i = [];
|
|
3536
|
-
return
|
|
3537
|
-
s.gridstack || (s.gridstack = new
|
|
3536
|
+
return z.getGridElements(t).forEach((s) => {
|
|
3537
|
+
s.gridstack || (s.gridstack = new z(s, f.cloneDeep(e))), i.push(s.gridstack);
|
|
3538
3538
|
}), i.length === 0 && console.error('GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
|
|
3539
3539
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`), i;
|
|
3540
3540
|
}
|
|
@@ -3553,21 +3553,21 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3553
3553
|
const l = i.gridstack;
|
|
3554
3554
|
return t && (l.opts = { ...l.opts, ...t }), t.children !== void 0 && l.load(t.children), l;
|
|
3555
3555
|
}
|
|
3556
|
-
if (!e.classList.contains("grid-stack") ||
|
|
3557
|
-
if (
|
|
3558
|
-
i =
|
|
3556
|
+
if (!e.classList.contains("grid-stack") || z.addRemoveCB)
|
|
3557
|
+
if (z.addRemoveCB)
|
|
3558
|
+
i = z.addRemoveCB(e, t, !0, !0);
|
|
3559
3559
|
else {
|
|
3560
3560
|
let l = document.implementation.createHTMLDocument("");
|
|
3561
3561
|
l.body.innerHTML = `<div class="grid-stack ${t.class || ""}"></div>`, i = l.body.children[0], e.appendChild(i);
|
|
3562
3562
|
}
|
|
3563
|
-
return
|
|
3563
|
+
return z.init(t, i);
|
|
3564
3564
|
}
|
|
3565
3565
|
/** call this method to register your engine instead of the default one.
|
|
3566
3566
|
* See instead `GridStackOptions.engineClass` if you only need to
|
|
3567
3567
|
* replace just one instance.
|
|
3568
3568
|
*/
|
|
3569
3569
|
static registerEngine(e) {
|
|
3570
|
-
|
|
3570
|
+
z.engineClass = e;
|
|
3571
3571
|
}
|
|
3572
3572
|
/** @internal create placeholder DIV as needed */
|
|
3573
3573
|
get placeholder() {
|
|
@@ -3604,8 +3604,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3604
3604
|
e.getAttribute("gs-animate") && (s.animate = f.toBool(e.getAttribute("gs-animate"))), this.opts = f.defaults(t, s), t = null, this._initMargin(), this.opts.column !== 1 && !this.opts.disableOneColumnMode && this._widthOrContainer() <= this.opts.oneColumnSize && (this._prevColumn = this.getColumn(), this.opts.column = 1), this.opts.rtl === "auto" && (this.opts.rtl = e.style.direction === "rtl"), this.opts.rtl && this.el.classList.add("grid-stack-rtl");
|
|
3605
3605
|
const r = (u = this.el.parentElement) == null ? void 0 : u.parentElement;
|
|
3606
3606
|
let l = r != null && r.classList.contains(he.itemClass) ? r.gridstackNode : void 0;
|
|
3607
|
-
l && (l.subGrid = this, this.parentGridItem = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = this.opts.cellHeight === "auto", this._isAutoCellHeight || this.opts.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof this.opts.cellHeight == "number" && this.opts.cellHeightUnit && this.opts.cellHeightUnit !== he.cellHeightUnit && (this.opts.cellHeight = this.opts.cellHeight + this.opts.cellHeightUnit, delete this.opts.cellHeightUnit), this.cellHeight(this.opts.cellHeight, !1)), this.opts.alwaysShowResizeHandle === "mobile" && (this.opts.alwaysShowResizeHandle =
|
|
3608
|
-
let n = this.opts.engineClass ||
|
|
3607
|
+
l && (l.subGrid = this, this.parentGridItem = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = this.opts.cellHeight === "auto", this._isAutoCellHeight || this.opts.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof this.opts.cellHeight == "number" && this.opts.cellHeightUnit && this.opts.cellHeightUnit !== he.cellHeightUnit && (this.opts.cellHeight = this.opts.cellHeight + this.opts.cellHeightUnit, delete this.opts.cellHeightUnit), this.cellHeight(this.opts.cellHeight, !1)), this.opts.alwaysShowResizeHandle === "mobile" && (this.opts.alwaysShowResizeHandle = fe), this._styleSheetClass = "gs-id-" + _e._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
|
|
3608
|
+
let n = this.opts.engineClass || z.engineClass || _e;
|
|
3609
3609
|
if (this.engine = new n({
|
|
3610
3610
|
column: this.getColumn(),
|
|
3611
3611
|
float: this.opts.float,
|
|
@@ -3651,8 +3651,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3651
3651
|
} else if (arguments.length === 0 || arguments.length === 1 && i(e))
|
|
3652
3652
|
if (r = t = e, r != null && r.el)
|
|
3653
3653
|
s = r.el;
|
|
3654
|
-
else if (
|
|
3655
|
-
s =
|
|
3654
|
+
else if (z.addRemoveCB)
|
|
3655
|
+
s = z.addRemoveCB(this.el, t, !0, !1);
|
|
3656
3656
|
else {
|
|
3657
3657
|
let n = (t == null ? void 0 : t.content) || "", u = document.implementation.createHTMLDocument("");
|
|
3658
3658
|
u.body.innerHTML = `<div class="grid-stack-item ${this.opts.itemClass || ""}"><div class="grid-stack-item-content">${n}</div></div>`, s = u.body.children[0];
|
|
@@ -3675,20 +3675,20 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3675
3675
|
* @returns newly created grid
|
|
3676
3676
|
*/
|
|
3677
3677
|
makeSubGrid(e, t, i, s = !0) {
|
|
3678
|
-
var m,
|
|
3678
|
+
var m, v, S;
|
|
3679
3679
|
let r = e.gridstackNode;
|
|
3680
3680
|
if (r || (r = this.makeWidget(e).gridstackNode), (m = r.subGrid) != null && m.el)
|
|
3681
3681
|
return r.subGrid;
|
|
3682
3682
|
let l, n = this;
|
|
3683
3683
|
for (; n && !l; )
|
|
3684
|
-
l = (
|
|
3684
|
+
l = (v = n.opts) == null ? void 0 : v.subGridOpts, n = (S = n.parentGridItem) == null ? void 0 : S.grid;
|
|
3685
3685
|
t = f.cloneDeep({ ...l || {}, children: void 0, ...t || r.subGridOpts }), r.subGridOpts = t;
|
|
3686
3686
|
let u;
|
|
3687
3687
|
t.column === "auto" && (u = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), t.disableOneColumnMode = !0);
|
|
3688
3688
|
let a = r.el.querySelector(".grid-stack-item-content"), h, p;
|
|
3689
3689
|
if (s) {
|
|
3690
|
-
if (this._removeDD(r.el), p = { ...r, x: 0, y: 0 }, f.removeInternalForSave(p), delete p.subGridOpts, r.content && (p.content = r.content, delete r.content),
|
|
3691
|
-
h =
|
|
3690
|
+
if (this._removeDD(r.el), p = { ...r, x: 0, y: 0 }, f.removeInternalForSave(p), delete p.subGridOpts, r.content && (p.content = r.content, delete r.content), z.addRemoveCB)
|
|
3691
|
+
h = z.addRemoveCB(this.el, p, !0, !1);
|
|
3692
3692
|
else {
|
|
3693
3693
|
let I = document.implementation.createHTMLDocument("");
|
|
3694
3694
|
I.body.innerHTML = '<div class="grid-stack-item"></div>', h = I.body.children[0], h.appendChild(a), I.body.innerHTML = '<div class="grid-stack-item-content"></div>', a = I.body.children[0], r.el.appendChild(a);
|
|
@@ -3696,10 +3696,10 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3696
3696
|
this._prepareDragDropByNode(r);
|
|
3697
3697
|
}
|
|
3698
3698
|
if (i) {
|
|
3699
|
-
let I = u ? t.column : r.w, x = r.h + i.h,
|
|
3700
|
-
|
|
3699
|
+
let I = u ? t.column : r.w, x = r.h + i.h, A = r.el.style;
|
|
3700
|
+
A.transition = "none", this.update(r.el, { w: I, h: x }), setTimeout(() => A.transition = null);
|
|
3701
3701
|
}
|
|
3702
|
-
let d = r.subGrid =
|
|
3702
|
+
let d = r.subGrid = z.addGrid(a, t);
|
|
3703
3703
|
return i != null && i._moving && (d._isTemp = !0), u && (d._autoColumn = !0), s && d.addWidget(h, p), i && (i._moving ? window.setTimeout(() => f.simulateMouseEvent(i._event, "mouseenter", d.el), 0) : d.addWidget(r.el, r)), d;
|
|
3704
3704
|
}
|
|
3705
3705
|
/**
|
|
@@ -3722,7 +3722,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3722
3722
|
* @param saveCB callback for each node -> widget, so application can insert additional data to be saved into the widget data structure.
|
|
3723
3723
|
* @returns list of widgets or full grid option, including .children list of widgets
|
|
3724
3724
|
*/
|
|
3725
|
-
save(e = !0, t = !1, i =
|
|
3725
|
+
save(e = !0, t = !1, i = z.saveCB) {
|
|
3726
3726
|
let s = this.engine.save(e, i);
|
|
3727
3727
|
if (s.forEach((r) => {
|
|
3728
3728
|
var l;
|
|
@@ -3752,19 +3752,19 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3752
3752
|
* @example
|
|
3753
3753
|
* see http://gridstackjs.com/demo/serialization.html
|
|
3754
3754
|
*/
|
|
3755
|
-
load(e, t =
|
|
3755
|
+
load(e, t = z.addRemoveCB || !0) {
|
|
3756
3756
|
e = f.cloneDeep(e);
|
|
3757
3757
|
const i = e.some((a) => a.x !== void 0 || a.y !== void 0);
|
|
3758
3758
|
i && (e = f.sort(e, -1, this._prevColumn || this.getColumn())), this._insertNotAppend = i;
|
|
3759
3759
|
const s = this.opts.column;
|
|
3760
3760
|
this._prevColumn && this._prevColumn !== s && e.some((a) => (a.x || 0) + a.w > s) && (this._ignoreLayoutsNodeChange = !0, this.engine.cacheLayout(e, this._prevColumn, !0));
|
|
3761
|
-
const r =
|
|
3762
|
-
typeof t == "function" && (
|
|
3761
|
+
const r = z.addRemoveCB;
|
|
3762
|
+
typeof t == "function" && (z.addRemoveCB = t);
|
|
3763
3763
|
let l = [];
|
|
3764
3764
|
this.batchUpdate(), t && [...this.engine.nodes].forEach((h) => {
|
|
3765
3765
|
if (!h.id)
|
|
3766
3766
|
return;
|
|
3767
|
-
f.find(e, h.id) || (
|
|
3767
|
+
f.find(e, h.id) || (z.addRemoveCB && z.addRemoveCB(this.el, h, !1, !1), l.push(h), this.removeWidget(h.el, !0, !1));
|
|
3768
3768
|
});
|
|
3769
3769
|
let n = [];
|
|
3770
3770
|
this.engine.nodes = this.engine.nodes.filter((a) => f.find(e, a.id) ? (n.push(a), !1) : !0);
|
|
@@ -3778,7 +3778,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3778
3778
|
d && d.gridstack && (d.gridstack.load(a.subGridOpts.children), this._insertNotAppend = !0);
|
|
3779
3779
|
}
|
|
3780
3780
|
} else t && this.addWidget(a);
|
|
3781
|
-
}), this.engine.removedNodes = l, this.doContentResize(u, !0), this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this._insertNotAppend, r ?
|
|
3781
|
+
}), this.engine.removedNodes = l, this.doContentResize(u, !0), this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this._insertNotAppend, r ? z.addRemoveCB = r : delete z.addRemoveCB, this;
|
|
3782
3782
|
}
|
|
3783
3783
|
/**
|
|
3784
3784
|
* use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
|
|
@@ -3934,7 +3934,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3934
3934
|
* grid.makeWidget('2', {w:2, content: 'hello'});
|
|
3935
3935
|
*/
|
|
3936
3936
|
makeWidget(e, t) {
|
|
3937
|
-
let i =
|
|
3937
|
+
let i = z.getElement(e);
|
|
3938
3938
|
this._prepareElement(i, !0, t);
|
|
3939
3939
|
const s = i.gridstackNode;
|
|
3940
3940
|
return this._updateContainerHeight(), this.doContentResize(!1, !1, s), s.subGridOpts && this.makeSubGrid(i, s.subGridOpts, void 0, !1), this._prevColumn && this.opts.column === 1 && (this._ignoreLayoutsNodeChange = !0), this._triggerAddEvent(), this._triggerChangeEvent(), delete this._ignoreLayoutsNodeChange, i;
|
|
@@ -3976,11 +3976,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3976
3976
|
* @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
|
|
3977
3977
|
*/
|
|
3978
3978
|
removeWidget(e, t = !0, i = !0) {
|
|
3979
|
-
return
|
|
3979
|
+
return z.getElements(e).forEach((s) => {
|
|
3980
3980
|
if (s.parentElement && s.parentElement !== this.el)
|
|
3981
3981
|
return;
|
|
3982
3982
|
let r = s.gridstackNode;
|
|
3983
|
-
r || (r = this.engine.nodes.find((l) => s === l.el)), r && (
|
|
3983
|
+
r || (r = this.engine.nodes.find((l) => s === l.el)), r && (z.addRemoveCB && z.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
|
|
3984
3984
|
}), i && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this;
|
|
3985
3985
|
}
|
|
3986
3986
|
/**
|
|
@@ -4022,7 +4022,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4022
4022
|
let i = arguments, s = 1;
|
|
4023
4023
|
return t = { x: i[s++], y: i[s++], w: i[s++], h: i[s++] }, this.update(e, t);
|
|
4024
4024
|
}
|
|
4025
|
-
return
|
|
4025
|
+
return z.getElements(e).forEach((i) => {
|
|
4026
4026
|
var h;
|
|
4027
4027
|
let s = i == null ? void 0 : i.gridstackNode;
|
|
4028
4028
|
if (!s)
|
|
@@ -4063,7 +4063,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4063
4063
|
if (!r)
|
|
4064
4064
|
return;
|
|
4065
4065
|
let l = t && i.h ? i.h * r : e.clientHeight, n;
|
|
4066
|
-
if (i.resizeToContentParent && (n = e.querySelector(i.resizeToContentParent)), n || (n = e.querySelector(
|
|
4066
|
+
if (i.resizeToContentParent && (n = e.querySelector(i.resizeToContentParent)), n || (n = e.querySelector(z.resizeToContentParent)), !n)
|
|
4067
4067
|
return;
|
|
4068
4068
|
const u = e.clientHeight - n.clientHeight, a = t && i.h ? i.h * r - u : n.clientHeight;
|
|
4069
4069
|
let h;
|
|
@@ -4072,7 +4072,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4072
4072
|
else {
|
|
4073
4073
|
const m = n.firstElementChild;
|
|
4074
4074
|
if (!m) {
|
|
4075
|
-
console.log(`Error: resizeToContent() '${
|
|
4075
|
+
console.log(`Error: resizeToContent() '${z.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
|
|
4076
4076
|
return;
|
|
4077
4077
|
}
|
|
4078
4078
|
h = m.getBoundingClientRect().height || a;
|
|
@@ -4086,7 +4086,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4086
4086
|
}
|
|
4087
4087
|
/** call the user resize (so they can do extra work) else our build in version */
|
|
4088
4088
|
resizeToContentCheck(e, t = !1) {
|
|
4089
|
-
|
|
4089
|
+
z.resizeToContentCB ? z.resizeToContentCB(e, t) : this.resizeToContent(e, t);
|
|
4090
4090
|
}
|
|
4091
4091
|
/**
|
|
4092
4092
|
* Updates the margins which will set all 4 sides at once - see `GridStackOptions.margin` for format options (CSS string format of 1,2,4 values or single number).
|
|
@@ -4286,7 +4286,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4286
4286
|
}
|
|
4287
4287
|
/** @internal */
|
|
4288
4288
|
static getGridElement(e) {
|
|
4289
|
-
return
|
|
4289
|
+
return z.getElement(e);
|
|
4290
4290
|
}
|
|
4291
4291
|
/** @internal */
|
|
4292
4292
|
static getGridElements(e) {
|
|
@@ -4328,7 +4328,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4328
4328
|
* @param val if true widget will be draggable, assuming the parent grid isn't noMove or static.
|
|
4329
4329
|
*/
|
|
4330
4330
|
movable(e, t) {
|
|
4331
|
-
return this.opts.staticGrid ? this : (
|
|
4331
|
+
return this.opts.staticGrid ? this : (z.getElements(e).forEach((i) => {
|
|
4332
4332
|
let s = i.gridstackNode;
|
|
4333
4333
|
s && (t ? delete s.noMove : s.noMove = !0, this._prepareDragDropByNode(s));
|
|
4334
4334
|
}), this);
|
|
@@ -4339,7 +4339,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4339
4339
|
* @param val if true widget will be resizable, assuming the parent grid isn't noResize or static.
|
|
4340
4340
|
*/
|
|
4341
4341
|
resizable(e, t) {
|
|
4342
|
-
return this.opts.staticGrid ? this : (
|
|
4342
|
+
return this.opts.staticGrid ? this : (z.getElements(e).forEach((i) => {
|
|
4343
4343
|
let s = i.gridstackNode;
|
|
4344
4344
|
s && (t ? delete s.noResize : s.noResize = !0, this._prepareDragDropByNode(s));
|
|
4345
4345
|
}), this);
|
|
@@ -4523,21 +4523,21 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4523
4523
|
}
|
|
4524
4524
|
/** @internal handles actual drag/resize */
|
|
4525
4525
|
_dragOrResize(e, t, i, s, r, l) {
|
|
4526
|
-
let n = { ...s._orig }, u, a = this.opts.marginLeft, h = this.opts.marginRight, p = this.opts.marginTop, d = this.opts.marginBottom, m = Math.round(l * 0.1),
|
|
4527
|
-
if (a = Math.min(a,
|
|
4526
|
+
let n = { ...s._orig }, u, a = this.opts.marginLeft, h = this.opts.marginRight, p = this.opts.marginTop, d = this.opts.marginBottom, m = Math.round(l * 0.1), v = Math.round(r * 0.1);
|
|
4527
|
+
if (a = Math.min(a, v), h = Math.min(h, v), p = Math.min(p, m), d = Math.min(d, m), t.type === "drag") {
|
|
4528
4528
|
if (s._temporaryRemoved)
|
|
4529
4529
|
return;
|
|
4530
4530
|
let I = i.position.top - s._prevYPix;
|
|
4531
4531
|
s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && f.updateScrollPosition(e, i.position, I);
|
|
4532
|
-
let x = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : a),
|
|
4533
|
-
n.x = Math.round(x / r), n.y = Math.round(
|
|
4534
|
-
let
|
|
4532
|
+
let x = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : a), A = i.position.top + (i.position.top > s._lastUiPosition.top ? -d : p);
|
|
4533
|
+
n.x = Math.round(x / r), n.y = Math.round(A / l);
|
|
4534
|
+
let D = this._extraDragRow;
|
|
4535
4535
|
if (this.engine.collide(s, n)) {
|
|
4536
4536
|
let E = this.getRow(), H = Math.max(0, n.y + s.h - E);
|
|
4537
4537
|
this.opts.maxRow && E + H > this.opts.maxRow && (H = Math.max(0, this.opts.maxRow - E)), this._extraDragRow = H;
|
|
4538
4538
|
} else
|
|
4539
4539
|
this._extraDragRow = 0;
|
|
4540
|
-
if (this._extraDragRow !==
|
|
4540
|
+
if (this._extraDragRow !== D && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
|
|
4541
4541
|
return;
|
|
4542
4542
|
} else if (t.type === "resize") {
|
|
4543
4543
|
if (n.x < 0 || (f.updateScrollResize(t, e, l), n.w = Math.round((i.size.width - a) / r), n.h = Math.round((i.size.height - p) / l), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
|
|
@@ -4571,17 +4571,17 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4571
4571
|
return Sn(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
|
|
4572
4572
|
}
|
|
4573
4573
|
}
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4574
|
+
z.resizeToContentParent = ".grid-stack-item-content";
|
|
4575
|
+
z.Utils = f;
|
|
4576
|
+
z.Engine = _e;
|
|
4577
|
+
z.GDRev = "9.5.1";
|
|
4578
4578
|
const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class: "color-primary" }, Mn = { class: "color-secondary" }, In = {
|
|
4579
4579
|
key: 1,
|
|
4580
4580
|
class: "empty"
|
|
4581
4581
|
}, Hn = {
|
|
4582
4582
|
key: 0,
|
|
4583
4583
|
class: "clear-filter-div"
|
|
4584
|
-
}, On = /* @__PURE__ */
|
|
4584
|
+
}, On = /* @__PURE__ */ ue({
|
|
4585
4585
|
__name: "Filter",
|
|
4586
4586
|
props: {
|
|
4587
4587
|
order: {}
|
|
@@ -4594,17 +4594,17 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4594
4594
|
var p;
|
|
4595
4595
|
const h = r.value.filter((d) => s.value.hasOwnProperty(d.key) && s.value[d.key]);
|
|
4596
4596
|
if ((p = e.order) != null && p.length) {
|
|
4597
|
-
const d = new Map(e.order.map((m,
|
|
4598
|
-
h.sort((m,
|
|
4599
|
-
const S = d.has(m.key) ? d.get(m.key) : Number.MAX_SAFE_INTEGER, I = d.has(
|
|
4600
|
-
return S - I || m.key.localeCompare(
|
|
4597
|
+
const d = new Map(e.order.map((m, v) => [m, v]));
|
|
4598
|
+
h.sort((m, v) => {
|
|
4599
|
+
const S = d.has(m.key) ? d.get(m.key) : Number.MAX_SAFE_INTEGER, I = d.has(v.key) ? d.get(v.key) : Number.MAX_SAFE_INTEGER;
|
|
4600
|
+
return S - I || m.key.localeCompare(v.key);
|
|
4601
4601
|
});
|
|
4602
4602
|
} else
|
|
4603
4603
|
h.sort((d, m) => d.key.localeCompare(m.key));
|
|
4604
4604
|
return h;
|
|
4605
4605
|
});
|
|
4606
4606
|
function n(h) {
|
|
4607
|
-
return Array.isArray(h) ?
|
|
4607
|
+
return Array.isArray(h) ? js(h).map((d) => d && typeof d == "object" ? d.name ?? JSON.stringify(d).replace(/[{}"]/g, "") : String(d ?? "")).join(", ") : h && typeof h == "object" ? JSON.stringify(h).replace(/[{}"]/g, "") : String(h ?? "");
|
|
4608
4608
|
}
|
|
4609
4609
|
function u(h) {
|
|
4610
4610
|
const p = t;
|
|
@@ -4615,40 +4615,40 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4615
4615
|
}
|
|
4616
4616
|
return (h, p) => {
|
|
4617
4617
|
const d = re("el-icon"), m = re("el-row");
|
|
4618
|
-
return T(),
|
|
4618
|
+
return T(), ie(m, {
|
|
4619
4619
|
class: "filter-wrapper tw-m-1",
|
|
4620
4620
|
align: "middle",
|
|
4621
4621
|
justify: "space-between"
|
|
4622
4622
|
}, {
|
|
4623
4623
|
default: G(() => [
|
|
4624
|
-
|
|
4625
|
-
l.value.length ? (T(!0),
|
|
4624
|
+
C("div", zn, [
|
|
4625
|
+
l.value.length ? (T(!0), O(Ce, { key: 0 }, We(l.value, (v) => (T(), ie(J(Qs), {
|
|
4626
4626
|
class: "color-background",
|
|
4627
|
-
key:
|
|
4627
|
+
key: v.key,
|
|
4628
4628
|
closable: "",
|
|
4629
|
-
onClose: (S) => u(
|
|
4629
|
+
onClose: (S) => u(v.key),
|
|
4630
4630
|
effect: "dark",
|
|
4631
4631
|
type: "info"
|
|
4632
4632
|
}, {
|
|
4633
4633
|
default: G(() => [
|
|
4634
|
-
|
|
4635
|
-
|
|
4634
|
+
C("b", Nn, be(v.key) + ": ", 1),
|
|
4635
|
+
C("span", Mn, be(n(v.value)), 1)
|
|
4636
4636
|
]),
|
|
4637
4637
|
_: 2
|
|
4638
|
-
}, 1032, ["onClose"]))), 128)) : (T(),
|
|
4638
|
+
}, 1032, ["onClose"]))), 128)) : (T(), O("span", In))
|
|
4639
4639
|
]),
|
|
4640
|
-
l.value.length ? (T(),
|
|
4641
|
-
|
|
4640
|
+
l.value.length ? (T(), O("div", Hn, [
|
|
4641
|
+
V(J(ei), {
|
|
4642
4642
|
placement: "top-start",
|
|
4643
4643
|
content: "Clear All Filters"
|
|
4644
4644
|
}, {
|
|
4645
4645
|
default: G(() => [
|
|
4646
|
-
|
|
4646
|
+
V(d, {
|
|
4647
4647
|
color: "#FFFF",
|
|
4648
4648
|
onClick: a
|
|
4649
4649
|
}, {
|
|
4650
4650
|
default: G(() => [
|
|
4651
|
-
|
|
4651
|
+
V(J(er))
|
|
4652
4652
|
]),
|
|
4653
4653
|
_: 1
|
|
4654
4654
|
})
|
|
@@ -4661,10 +4661,10 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4661
4661
|
});
|
|
4662
4662
|
};
|
|
4663
4663
|
}
|
|
4664
|
-
}), Pn = /* @__PURE__ */
|
|
4664
|
+
}), Pn = /* @__PURE__ */ Ae(On, [["__scopeId", "data-v-55b985b8"]]), $n = {
|
|
4665
4665
|
key: 0,
|
|
4666
4666
|
class: "content-header dash-header-visible stick-to-top tw-flex tw-flex-row tw-items-center tw-justify-between tw-h-10"
|
|
4667
|
-
}, Bn = { class: "editing-div" },
|
|
4667
|
+
}, Bn = { class: "editing-div" }, Fn = { class: "tw-m-4 tw-leading-none tw-pl-1 widget-name" }, Un = { class: "header-slot-icon" }, Wn = {
|
|
4668
4668
|
key: 1,
|
|
4669
4669
|
class: "dash-header-hide content-header"
|
|
4670
4670
|
}, Gn = { class: "header-slot-icon" }, Vn = {
|
|
@@ -4683,7 +4683,7 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4683
4683
|
},
|
|
4684
4684
|
setup(o) {
|
|
4685
4685
|
const e = rt(), t = o, i = F(null);
|
|
4686
|
-
|
|
4686
|
+
ce(() => t.widgetName, (u) => {
|
|
4687
4687
|
i.value = u;
|
|
4688
4688
|
}, { immediate: !0 });
|
|
4689
4689
|
const s = F(!1), r = F(null);
|
|
@@ -4699,18 +4699,18 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4699
4699
|
}
|
|
4700
4700
|
return (u, a) => {
|
|
4701
4701
|
const h = re("el-input"), p = as("click-out");
|
|
4702
|
-
return o.hideHeader ? (T(),
|
|
4703
|
-
|
|
4704
|
-
|
|
4702
|
+
return o.hideHeader ? (T(), O("div", Wn, [
|
|
4703
|
+
C("div", Gn, [
|
|
4704
|
+
wt(u.$slots, "default", {}, void 0, !0)
|
|
4705
4705
|
])
|
|
4706
|
-
])) : (T(),
|
|
4707
|
-
|
|
4708
|
-
|
|
4706
|
+
])) : (T(), O("div", $n, [
|
|
4707
|
+
C("div", null, [
|
|
4708
|
+
ze((T(), O("div", {
|
|
4709
4709
|
onKeyup: hs(n, ["enter"]),
|
|
4710
4710
|
class: "tw-flex"
|
|
4711
4711
|
}, [
|
|
4712
|
-
|
|
4713
|
-
|
|
4712
|
+
ze(C("div", Bn, [
|
|
4713
|
+
V(h, {
|
|
4714
4714
|
onFocus: a[0] || (a[0] = (d) => d.target.select()),
|
|
4715
4715
|
ref_key: "textUserInput",
|
|
4716
4716
|
ref: r,
|
|
@@ -4720,11 +4720,11 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4720
4720
|
], 512), [
|
|
4721
4721
|
[xt, s.value]
|
|
4722
4722
|
]),
|
|
4723
|
-
|
|
4723
|
+
ze(C("div", {
|
|
4724
4724
|
onClick: a[2] || (a[2] = (d) => l()),
|
|
4725
4725
|
class: "visible-div"
|
|
4726
4726
|
}, [
|
|
4727
|
-
|
|
4727
|
+
C("div", Fn, be(i.value), 1)
|
|
4728
4728
|
], 512), [
|
|
4729
4729
|
[xt, !s.value]
|
|
4730
4730
|
])
|
|
@@ -4732,13 +4732,13 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4732
4732
|
[p, n]
|
|
4733
4733
|
])
|
|
4734
4734
|
]),
|
|
4735
|
-
|
|
4736
|
-
|
|
4735
|
+
C("div", Un, [
|
|
4736
|
+
wt(u.$slots, "default", {}, void 0, !0)
|
|
4737
4737
|
])
|
|
4738
4738
|
]));
|
|
4739
4739
|
};
|
|
4740
4740
|
}
|
|
4741
|
-
}, qn = /* @__PURE__ */
|
|
4741
|
+
}, qn = /* @__PURE__ */ Ae(Vn, [["__scopeId", "data-v-4f4aa869"]]), jn = { class: "tw-flex" }, Yn = {
|
|
4742
4742
|
__name: "WidgetWrapper",
|
|
4743
4743
|
props: {
|
|
4744
4744
|
widgetID: { type: String, required: !0 },
|
|
@@ -4752,9 +4752,9 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4752
4752
|
emits: ["removeWidget", "toggle-lock"],
|
|
4753
4753
|
setup(o, { emit: e }) {
|
|
4754
4754
|
const t = e, i = o, s = F(null), r = F(!1);
|
|
4755
|
-
|
|
4755
|
+
ce(() => i.isLocked, (x) => r.value = x, { immediate: !0 });
|
|
4756
4756
|
const l = F(null);
|
|
4757
|
-
|
|
4757
|
+
ce(() => i.hideWidgetsHeader, (x) => l.value = x, { immediate: !0 });
|
|
4758
4758
|
const n = F(!1), u = F(!1), a = () => document.fullscreenElement === s.value;
|
|
4759
4759
|
async function h() {
|
|
4760
4760
|
const x = s.value;
|
|
@@ -4785,9 +4785,9 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4785
4785
|
function m() {
|
|
4786
4786
|
t("toggle-lock", { id: i.widgetID, isLocked: r.value });
|
|
4787
4787
|
}
|
|
4788
|
-
let
|
|
4788
|
+
let v = "";
|
|
4789
4789
|
function S(x) {
|
|
4790
|
-
x ? (
|
|
4790
|
+
x ? (v = document.body.style.overflow || "", document.body.style.overflow = "hidden") : document.body.style.overflow = v;
|
|
4791
4791
|
}
|
|
4792
4792
|
function I() {
|
|
4793
4793
|
u.value = !!document.fullscreenElement, u.value ? (n.value = a(), n.value || S(!1)) : (n.value = !1, S(!1));
|
|
@@ -4796,17 +4796,17 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4796
4796
|
document.addEventListener("fullscreenchange", I);
|
|
4797
4797
|
}), cs(() => {
|
|
4798
4798
|
document.removeEventListener("fullscreenchange", I), S(!1);
|
|
4799
|
-
}), (x,
|
|
4800
|
-
const
|
|
4801
|
-
return T(),
|
|
4799
|
+
}), (x, A) => {
|
|
4800
|
+
const D = re("el-icon");
|
|
4801
|
+
return T(), O("div", {
|
|
4802
4802
|
ref_key: "instance",
|
|
4803
4803
|
ref: s,
|
|
4804
|
-
class:
|
|
4804
|
+
class: ds(["grid-stack-item-content", {
|
|
4805
4805
|
"locked-widget": o.isLocked,
|
|
4806
4806
|
"gs-fullscreen": n.value && !u.value
|
|
4807
4807
|
}])
|
|
4808
4808
|
}, [
|
|
4809
|
-
(T(),
|
|
4809
|
+
(T(), ie(Wi(o.componentTag), oi({
|
|
4810
4810
|
class: ["widget-body", { "widget-body-no-head": l.value }],
|
|
4811
4811
|
widgetID: o.widgetID,
|
|
4812
4812
|
hideHeader: l.value
|
|
@@ -4815,7 +4815,7 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4815
4815
|
isLocked: r.value
|
|
4816
4816
|
}), {
|
|
4817
4817
|
default: G((E) => [
|
|
4818
|
-
E ? (T(),
|
|
4818
|
+
E ? (T(), ie(qn, {
|
|
4819
4819
|
key: 0,
|
|
4820
4820
|
widgetName: i.componentName,
|
|
4821
4821
|
widgetID: o.widgetID,
|
|
@@ -4823,52 +4823,52 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4823
4823
|
hideHeader: l.value
|
|
4824
4824
|
}, {
|
|
4825
4825
|
default: G(() => [
|
|
4826
|
-
|
|
4827
|
-
(T(!0),
|
|
4826
|
+
C("div", jn, [
|
|
4827
|
+
(T(!0), O(Ce, null, We(E.childIcons, (H) => (T(), ie(J(ei), { placement: "bottom-start" }, {
|
|
4828
4828
|
content: G(() => [
|
|
4829
|
-
Se(
|
|
4829
|
+
Se(be(H.tooltip), 1)
|
|
4830
4830
|
]),
|
|
4831
4831
|
default: G(() => [
|
|
4832
|
-
(T(),
|
|
4832
|
+
(T(), ie(Wi(H.comp), {
|
|
4833
4833
|
class: "tw-w-4 header-icon",
|
|
4834
4834
|
onClick: H.event
|
|
4835
4835
|
}, null, 8, ["onClick"]))
|
|
4836
4836
|
]),
|
|
4837
4837
|
_: 2
|
|
4838
4838
|
}, 1024))), 256)),
|
|
4839
|
-
|
|
4839
|
+
V(J(ei), { placement: "bottom-start" }, {
|
|
4840
4840
|
content: G(() => [
|
|
4841
|
-
Se(
|
|
4841
|
+
Se(be(n.value ? "Exit Fullscreen" : "Fullscreen"), 1)
|
|
4842
4842
|
]),
|
|
4843
4843
|
default: G(() => [
|
|
4844
|
-
|
|
4844
|
+
V(D, {
|
|
4845
4845
|
class: "header-icon",
|
|
4846
4846
|
onClick: d
|
|
4847
4847
|
}, {
|
|
4848
4848
|
default: G(() => [
|
|
4849
|
-
n.value ? (T(),
|
|
4849
|
+
n.value ? (T(), ie(J(hr), { key: 0 })) : (T(), ie(J(nr), { key: 1 }))
|
|
4850
4850
|
]),
|
|
4851
4851
|
_: 1
|
|
4852
4852
|
})
|
|
4853
4853
|
]),
|
|
4854
4854
|
_: 1
|
|
4855
4855
|
}),
|
|
4856
|
-
|
|
4856
|
+
V(D, {
|
|
4857
4857
|
class: "header-icon lock-toggle",
|
|
4858
|
-
onClick:
|
|
4858
|
+
onClick: A[0] || (A[0] = (H) => m())
|
|
4859
4859
|
}, {
|
|
4860
4860
|
default: G(() => [
|
|
4861
|
-
r.value ? (T(),
|
|
4861
|
+
r.value ? (T(), ie(J(lr), { key: 0 })) : (T(), ie(J(cr), { key: 1 }))
|
|
4862
4862
|
]),
|
|
4863
4863
|
_: 1
|
|
4864
4864
|
}),
|
|
4865
|
-
!o.staticMode && !o.isLocked ? (T(),
|
|
4865
|
+
!o.staticMode && !o.isLocked ? (T(), ie(D, {
|
|
4866
4866
|
key: 0,
|
|
4867
4867
|
class: "item-widget-button",
|
|
4868
|
-
onClick:
|
|
4868
|
+
onClick: A[1] || (A[1] = (H) => x.$emit("removeWidget"))
|
|
4869
4869
|
}, {
|
|
4870
4870
|
default: G(() => [
|
|
4871
|
-
|
|
4871
|
+
V(J(ir))
|
|
4872
4872
|
]),
|
|
4873
4873
|
_: 1
|
|
4874
4874
|
})) : kt("", !0)
|
|
@@ -4882,13 +4882,13 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4882
4882
|
], 2);
|
|
4883
4883
|
};
|
|
4884
4884
|
}
|
|
4885
|
-
}, Xn = /* @__PURE__ */
|
|
4885
|
+
}, Xn = /* @__PURE__ */ Ae(Yn, [["__scopeId", "data-v-6b7fdde8"]]), Zn = { class: "dashboard-app" }, Kn = {
|
|
4886
4886
|
key: 0,
|
|
4887
4887
|
class: "dash-header tw-max-h-screen tw-flex tw-flex-col"
|
|
4888
4888
|
}, Qn = { class: "tw-float-left tw-m-1 button" }, Jn = {
|
|
4889
4889
|
key: 1,
|
|
4890
4890
|
class: "tw-h-10 dash-header"
|
|
4891
|
-
}, eo = { class: "tw-float-left tw-m-1" }, to = { class: "tw-m-4 tw-w-50 tw-flex-row tw-flex" }, io = { class: "tw-m-w-4 tw-w-40" }, so = ["gs-x", "gs-y", "gs-w", "gs-h", "gs-id", "id", "props", "gs-locked", "gs-no-move", "gs-no-resize"], ro = /* @__PURE__ */
|
|
4891
|
+
}, eo = { class: "tw-float-left tw-m-1" }, to = { class: "tw-m-4 tw-w-50 tw-flex-row tw-flex" }, io = { class: "tw-m-w-4 tw-w-40" }, so = ["gs-x", "gs-y", "gs-w", "gs-h", "gs-id", "id", "props", "gs-locked", "gs-no-move", "gs-no-resize"], ro = /* @__PURE__ */ ue({
|
|
4892
4892
|
__name: "Dashboard",
|
|
4893
4893
|
props: {
|
|
4894
4894
|
hideHeader: {},
|
|
@@ -4901,26 +4901,26 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4901
4901
|
let n = F(!0), u = 0;
|
|
4902
4902
|
const a = F([]), { ComponentRegistry: h } = Jt(t), p = Qt({});
|
|
4903
4903
|
Ys(() => {
|
|
4904
|
-
var
|
|
4905
|
-
d(), m(), t.loadFromLocalStorage(), u = ((
|
|
4904
|
+
var _;
|
|
4905
|
+
d(), m(), t.loadFromLocalStorage(), u = ((_ = i.value) == null ? void 0 : _.length) + 1;
|
|
4906
4906
|
}), us(() => {
|
|
4907
4907
|
S(), x();
|
|
4908
4908
|
}), cs(() => {
|
|
4909
4909
|
I(), t.unregisterGridProvider();
|
|
4910
4910
|
});
|
|
4911
4911
|
function d() {
|
|
4912
|
-
var
|
|
4913
|
-
t.DefaultLayout = (
|
|
4912
|
+
var _, y;
|
|
4913
|
+
t.DefaultLayout = (_ = e.options) == null ? void 0 : _.defaultLayout, t.setOptionServices((y = e.options) == null ? void 0 : y.services);
|
|
4914
4914
|
}
|
|
4915
4915
|
function m() {
|
|
4916
|
-
const
|
|
4916
|
+
const _ = {
|
|
4917
4917
|
apiUrl: ve(() => {
|
|
4918
|
-
var
|
|
4919
|
-
return (
|
|
4918
|
+
var y;
|
|
4919
|
+
return (y = t.Services) == null ? void 0 : y.ApiUrl;
|
|
4920
4920
|
}),
|
|
4921
4921
|
s3Url: ve(() => {
|
|
4922
|
-
var
|
|
4923
|
-
return (
|
|
4922
|
+
var y;
|
|
4923
|
+
return (y = t.Services) == null ? void 0 : y.s3Url;
|
|
4924
4924
|
}),
|
|
4925
4925
|
services: t.Services,
|
|
4926
4926
|
filters: t.Filters,
|
|
@@ -4928,24 +4928,24 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4928
4928
|
clearFilter: t.clearFilter,
|
|
4929
4929
|
resetFilters: t.resetFilters
|
|
4930
4930
|
};
|
|
4931
|
-
Xs("dashboard:globalVars",
|
|
4931
|
+
Xs("dashboard:globalVars", _);
|
|
4932
4932
|
}
|
|
4933
|
-
async function
|
|
4933
|
+
async function v() {
|
|
4934
4934
|
if (t.resetGridLayout(), await Gi(), !!r) {
|
|
4935
4935
|
r.batchUpdate(), r.removeAll();
|
|
4936
|
-
for (const
|
|
4937
|
-
const
|
|
4938
|
-
if (!
|
|
4939
|
-
console.warn("makeWidget: element not found for id",
|
|
4936
|
+
for (const _ of i.value) {
|
|
4937
|
+
const y = document.getElementById(_.id);
|
|
4938
|
+
if (!y) {
|
|
4939
|
+
console.warn("makeWidget: element not found for id", _.id);
|
|
4940
4940
|
continue;
|
|
4941
4941
|
}
|
|
4942
|
-
|
|
4942
|
+
y.classList.add("grid-stack-item"), _.w != null && y.setAttribute("gs-w", String(_.w)), _.h != null && y.setAttribute("gs-h", String(_.h)), _.x != null && y.setAttribute("gs-x", String(_.x)), _.y != null && y.setAttribute("gs-y", String(_.y)), _.x == null && _.y == null && _.autoPosition && y.setAttribute("gs-auto-position", "true"), !y.gridstackNode && r.makeWidget(y);
|
|
4943
4943
|
}
|
|
4944
4944
|
r.commit();
|
|
4945
4945
|
}
|
|
4946
4946
|
}
|
|
4947
4947
|
function S() {
|
|
4948
|
-
const
|
|
4948
|
+
const _ = {
|
|
4949
4949
|
float: !0,
|
|
4950
4950
|
column: 12,
|
|
4951
4951
|
cellHeight: "70px",
|
|
@@ -4956,129 +4956,143 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
4956
4956
|
handles: "e,se,s,sw,w,n"
|
|
4957
4957
|
}
|
|
4958
4958
|
};
|
|
4959
|
-
r =
|
|
4959
|
+
r = z.init(_), t.registerGridProvider(() => r), r.setStatic(n.value);
|
|
4960
4960
|
}
|
|
4961
4961
|
function I() {
|
|
4962
4962
|
r && (r.destroy(!1), r = null);
|
|
4963
4963
|
}
|
|
4964
|
-
|
|
4964
|
+
function x() {
|
|
4965
|
+
const _ = e.options.globalData;
|
|
4966
|
+
if (_) {
|
|
4967
|
+
t.clearOptionsDataItems();
|
|
4968
|
+
for (const y in _)
|
|
4969
|
+
t.addOptionsDataItems(y, _[y]);
|
|
4970
|
+
}
|
|
4971
|
+
}
|
|
4972
|
+
ce(
|
|
4965
4973
|
() => {
|
|
4966
|
-
var
|
|
4967
|
-
return (
|
|
4974
|
+
var _;
|
|
4975
|
+
return (_ = e.options) == null ? void 0 : _.availableWidgets;
|
|
4968
4976
|
},
|
|
4969
|
-
(
|
|
4970
|
-
h.value = {}, a.value = [],
|
|
4977
|
+
(_) => {
|
|
4978
|
+
h.value = {}, a.value = [], _ && _.forEach((y, L) => {
|
|
4971
4979
|
let R, j;
|
|
4972
|
-
if (
|
|
4973
|
-
R =
|
|
4974
|
-
else if (
|
|
4975
|
-
R =
|
|
4976
|
-
const
|
|
4977
|
-
return
|
|
4980
|
+
if (y && typeof y == "object" && "name" in y && "component" in y)
|
|
4981
|
+
R = y.name, j = y.component;
|
|
4982
|
+
else if (y && typeof y == "object" && "name" in y && "loader" in y)
|
|
4983
|
+
R = y.name, j = Zs(async () => {
|
|
4984
|
+
const B = await y.loader();
|
|
4985
|
+
return B.default ?? B;
|
|
4978
4986
|
});
|
|
4979
|
-
else if (
|
|
4980
|
-
j =
|
|
4981
|
-
else if (typeof
|
|
4987
|
+
else if (y && (typeof y == "function" || typeof y == "object"))
|
|
4988
|
+
j = y, R = y.name || `Widget${L + 1}`;
|
|
4989
|
+
else if (typeof y == "function")
|
|
4982
4990
|
return;
|
|
4983
4991
|
!R || !j || h.value[R] || (h.value[R] = j, a.value.push(R));
|
|
4984
4992
|
});
|
|
4985
4993
|
},
|
|
4986
4994
|
{ immediate: !0, deep: !0 }
|
|
4987
|
-
)
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
t.clearOptionsDataItems();
|
|
4992
|
-
for (const _ in v)
|
|
4993
|
-
t.addOptionsDataItems(_, v[_]);
|
|
4995
|
+
), ce(
|
|
4996
|
+
() => n.value,
|
|
4997
|
+
(_) => {
|
|
4998
|
+
r.setStatic(_), s.value = _ ? "Edit Grid" : "Save Grid";
|
|
4994
4999
|
}
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5000
|
+
), ce(
|
|
5001
|
+
() => {
|
|
5002
|
+
var _;
|
|
5003
|
+
return (_ = e.options) == null ? void 0 : _.defaultLayout;
|
|
5004
|
+
},
|
|
5005
|
+
(_) => {
|
|
5006
|
+
_ && (t.DefaultLayout = _, t.DASHBOARD_ITEMS = [..._], t.resetFilters({}));
|
|
5007
|
+
},
|
|
5008
|
+
{ deep: !0 }
|
|
5009
|
+
);
|
|
5010
|
+
function A(_) {
|
|
5011
|
+
if (!_)
|
|
5001
5012
|
return;
|
|
5002
|
-
const
|
|
5003
|
-
id:
|
|
5013
|
+
const y = `${_}-${u}`, L = {
|
|
5014
|
+
id: y,
|
|
5004
5015
|
w: 2,
|
|
5005
5016
|
h: 6,
|
|
5006
5017
|
autoPosition: !0,
|
|
5007
|
-
component: h.value[
|
|
5008
|
-
componentKey:
|
|
5009
|
-
componentName:
|
|
5018
|
+
component: h.value[_],
|
|
5019
|
+
componentKey: _,
|
|
5020
|
+
componentName: _,
|
|
5010
5021
|
Props: {}
|
|
5011
5022
|
};
|
|
5012
|
-
u++, i.value.push(
|
|
5013
|
-
r == null || r.makeWidget(`#${
|
|
5023
|
+
u++, i.value.push(L), Gi(() => {
|
|
5024
|
+
r == null || r.makeWidget(`#${y}`);
|
|
5014
5025
|
});
|
|
5015
5026
|
}
|
|
5016
|
-
function
|
|
5017
|
-
var
|
|
5018
|
-
i.value.splice(
|
|
5019
|
-
const
|
|
5020
|
-
r.removeWidget(
|
|
5027
|
+
function D(_) {
|
|
5028
|
+
var y = i.value.findIndex((R) => R.id == _);
|
|
5029
|
+
i.value.splice(y, 1);
|
|
5030
|
+
const L = `#${_}`;
|
|
5031
|
+
r.removeWidget(L, !1);
|
|
5021
5032
|
}
|
|
5022
|
-
function E({
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5033
|
+
function E({
|
|
5034
|
+
id: _,
|
|
5035
|
+
isLocked: y
|
|
5036
|
+
}) {
|
|
5037
|
+
const L = p[_];
|
|
5038
|
+
L && r && r.update(L, {
|
|
5039
|
+
locked: !y,
|
|
5040
|
+
noMove: !y,
|
|
5041
|
+
noResize: !y
|
|
5042
|
+
}), t.toggleWidgetLock(_);
|
|
5029
5043
|
}
|
|
5030
5044
|
function H() {
|
|
5031
5045
|
n.value = !n.value, n.value;
|
|
5032
5046
|
}
|
|
5033
|
-
return (
|
|
5034
|
-
const
|
|
5035
|
-
return T(),
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5047
|
+
return (_, y) => {
|
|
5048
|
+
const L = re("el-button"), R = re("el-option"), j = re("el-select"), B = re("el-col");
|
|
5049
|
+
return T(), O("div", Zn, [
|
|
5050
|
+
_.hideHeader ? (T(), O("div", Jn, [
|
|
5051
|
+
y[3] || (y[3] = Se(" x ", -1)),
|
|
5052
|
+
C("span", eo, [
|
|
5053
|
+
V(L, {
|
|
5040
5054
|
class: "edit-button",
|
|
5041
|
-
onClick:
|
|
5055
|
+
onClick: y[1] || (y[1] = (M) => H())
|
|
5042
5056
|
}, {
|
|
5043
5057
|
default: G(() => [
|
|
5044
|
-
Se(
|
|
5058
|
+
Se(be(J(s)), 1)
|
|
5045
5059
|
]),
|
|
5046
5060
|
_: 1
|
|
5047
5061
|
})
|
|
5048
5062
|
])
|
|
5049
|
-
])) : (T(),
|
|
5050
|
-
|
|
5051
|
-
|
|
5063
|
+
])) : (T(), O("div", Kn, [
|
|
5064
|
+
C("span", Qn, [
|
|
5065
|
+
V(L, {
|
|
5052
5066
|
class: "edit-button",
|
|
5053
|
-
onClick:
|
|
5067
|
+
onClick: y[0] || (y[0] = (M) => H())
|
|
5054
5068
|
}, {
|
|
5055
5069
|
default: G(() => [
|
|
5056
|
-
Se(
|
|
5070
|
+
Se(be(J(s)), 1)
|
|
5057
5071
|
]),
|
|
5058
5072
|
_: 1
|
|
5059
5073
|
})
|
|
5060
5074
|
]),
|
|
5061
|
-
|
|
5075
|
+
V(Pn)
|
|
5062
5076
|
])),
|
|
5063
|
-
|
|
5077
|
+
J(n) ? kt("", !0) : (T(), ie(B, { key: 2 }, {
|
|
5064
5078
|
default: G(() => [
|
|
5065
|
-
|
|
5066
|
-
|
|
5079
|
+
C("div", to, [
|
|
5080
|
+
V(j, { placeholder: "Add New Widget" }, {
|
|
5067
5081
|
default: G(() => [
|
|
5068
|
-
(T(!0),
|
|
5082
|
+
(T(!0), O(Ce, null, We(a.value, (M) => (T(), ie(R, {
|
|
5069
5083
|
key: M,
|
|
5070
5084
|
label: M,
|
|
5071
5085
|
value: M,
|
|
5072
|
-
onClick: (
|
|
5086
|
+
onClick: (De) => A(M)
|
|
5073
5087
|
}, null, 8, ["label", "value", "onClick"]))), 128))
|
|
5074
5088
|
]),
|
|
5075
5089
|
_: 1
|
|
5076
5090
|
}),
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
onClick:
|
|
5091
|
+
C("div", io, [
|
|
5092
|
+
V(L, {
|
|
5093
|
+
onClick: y[2] || (y[2] = (M) => v())
|
|
5080
5094
|
}, {
|
|
5081
|
-
default: G(() => [...
|
|
5095
|
+
default: G(() => [...y[4] || (y[4] = [
|
|
5082
5096
|
Se("Reset Grid Layout", -1)
|
|
5083
5097
|
])]),
|
|
5084
5098
|
_: 1
|
|
@@ -5088,14 +5102,14 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
5088
5102
|
]),
|
|
5089
5103
|
_: 1
|
|
5090
5104
|
})),
|
|
5091
|
-
|
|
5105
|
+
C("div", {
|
|
5092
5106
|
ref_key: "root",
|
|
5093
5107
|
ref: l,
|
|
5094
5108
|
class: "grid-stack tw-h-screen"
|
|
5095
5109
|
}, [
|
|
5096
|
-
(T(!0),
|
|
5097
|
-
var
|
|
5098
|
-
return T(),
|
|
5110
|
+
(T(!0), O(Ce, null, We(J(i), (M) => {
|
|
5111
|
+
var De, Ie, ot, lt;
|
|
5112
|
+
return T(), O("div", {
|
|
5099
5113
|
class: "grid-stack-item",
|
|
5100
5114
|
ref_for: !0,
|
|
5101
5115
|
ref: (at) => p[M.id] = at,
|
|
@@ -5107,15 +5121,15 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
5107
5121
|
id: M.id,
|
|
5108
5122
|
key: M.id,
|
|
5109
5123
|
props: M.Props,
|
|
5110
|
-
"gs-locked": (
|
|
5124
|
+
"gs-locked": (De = M.Props) == null ? void 0 : De.locked,
|
|
5111
5125
|
"gs-no-move": (Ie = M.Props) == null ? void 0 : Ie.locked,
|
|
5112
5126
|
"gs-no-resize": (ot = M.Props) == null ? void 0 : ot.locked
|
|
5113
5127
|
}, [
|
|
5114
|
-
|
|
5128
|
+
V(Xn, {
|
|
5115
5129
|
widgetID: M.id,
|
|
5116
|
-
onRemoveWidget: (at) =>
|
|
5130
|
+
onRemoveWidget: (at) => D(M.id),
|
|
5117
5131
|
onToggleLock: E,
|
|
5118
|
-
"static-mode":
|
|
5132
|
+
"static-mode": J(n),
|
|
5119
5133
|
componentTag: M.component,
|
|
5120
5134
|
componentProperties: M.Props,
|
|
5121
5135
|
componentName: M.componentName,
|
|
@@ -5128,9 +5142,48 @@ const zn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nn = { class:
|
|
|
5128
5142
|
]);
|
|
5129
5143
|
};
|
|
5130
5144
|
}
|
|
5131
|
-
}),
|
|
5145
|
+
}), no = /* @__PURE__ */ Ae(ro, [["__scopeId", "data-v-b50180d4"]]), oo = { class: "dashboard-multi-wrap" }, lo = { class: "dash-main-header" }, ao = { class: "button-group" }, ho = ["onClick"], uo = { class: "dashboard-content" }, co = /* @__PURE__ */ ue({
|
|
5146
|
+
__name: "DashboardWrap",
|
|
5147
|
+
props: {
|
|
5148
|
+
dashboardOptions: {},
|
|
5149
|
+
default: {}
|
|
5150
|
+
},
|
|
5151
|
+
setup(o) {
|
|
5152
|
+
const e = o, t = F(
|
|
5153
|
+
e.default || e.dashboardOptions && e.dashboardOptions[0] || {}
|
|
5154
|
+
), i = F(e.dashboardOptions), s = (r) => {
|
|
5155
|
+
console.log(r), t.value = r;
|
|
5156
|
+
};
|
|
5157
|
+
return (r, l) => (T(), O("div", oo, [
|
|
5158
|
+
C("div", lo, [
|
|
5159
|
+
l[0] || (l[0] = C("h4", { class: "header-title" }, "Precision Dashboard Selection", -1)),
|
|
5160
|
+
l[1] || (l[1] = C("p", { class: "header-description" }, " Select a dashboard view to explore different aspects of gene analysis. Choose between co-expression analysis or side-by-side cell/gene comparison. ", -1)),
|
|
5161
|
+
C("div", ao, [
|
|
5162
|
+
(T(!0), O(Ce, null, We(i.value, (n) => {
|
|
5163
|
+
var u;
|
|
5164
|
+
return T(), O("button", {
|
|
5165
|
+
key: n.name,
|
|
5166
|
+
class: ds([
|
|
5167
|
+
"dashboard-button",
|
|
5168
|
+
{ active: ((u = t.value) == null ? void 0 : u.name) === n.name }
|
|
5169
|
+
]),
|
|
5170
|
+
onClick: (a) => s(n)
|
|
5171
|
+
}, be(n.name), 11, ho);
|
|
5172
|
+
}), 128))
|
|
5173
|
+
])
|
|
5174
|
+
]),
|
|
5175
|
+
C("div", uo, [
|
|
5176
|
+
V(J(no), {
|
|
5177
|
+
class: "dashboard-app",
|
|
5178
|
+
options: t.value
|
|
5179
|
+
}, null, 8, ["options"])
|
|
5180
|
+
])
|
|
5181
|
+
]));
|
|
5182
|
+
}
|
|
5183
|
+
}), vo = /* @__PURE__ */ Ae(co, [["__scopeId", "data-v-19811701"]]);
|
|
5132
5184
|
export {
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5185
|
+
yo as MarkdownWidget,
|
|
5186
|
+
vo as MultiDashboard,
|
|
5187
|
+
no as PennsieveDashboard,
|
|
5188
|
+
_o as TextWidget
|
|
5136
5189
|
};
|