pennsieve-dashboard 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,204 +1,215 @@
1
1
  var Hs = Object.defineProperty;
2
2
  var Os = (o, e, t) => e in o ? Hs(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var B = (o, e, t) => Os(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as ye, createElementBlock as U, openBlock as T, createElementVNode as M, ref as F, reactive as rs, watch as ue, isRef as Ps, isReactive as $s, markRaw as Bs, computed as Te, resolveComponent as ie, createBlock as le, withCtx as q, createVNode as X, Fragment as Le, renderList as it, unref as he, createTextVNode as We, inject as Us, shallowRef as ns, resolveDirective as os, renderSlot as vt, mergeProps as ri, withDirectives as De, toDisplayString as Ce, withKeys as ls, vShow as wt, vModelText as Fs, createCommentVNode as xt, normalizeClass as Ws, resolveDynamicComponent as Ui, provide as Gs, onBeforeMount as Vs, onMounted as qs, defineAsyncComponent as js, nextTick as Ys } from "vue";
5
- import { defineStore as Xs, storeToRefs as _t } from "pinia";
6
- import { ElTag as Ks, ElTooltip as as } from "element-plus";
3
+ var O = (o, e, t) => Os(o, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as we, createElementBlock as $, openBlock as R, createElementVNode as z, ref as B, reactive as ns, watch as ce, isRef as Ps, isReactive as $s, markRaw as Bs, computed as Ce, resolveComponent as ie, createBlock as ae, withCtx as q, createVNode as X, Fragment as ze, renderList as it, unref as ue, createTextVNode as We, inject as Us, shallowRef as os, resolveDirective as ls, renderSlot as wt, mergeProps as li, withDirectives as Le, toDisplayString as Ae, withKeys as as, vShow as xt, vModelText as Fs, createCommentVNode as kt, normalizeClass as Ws, resolveDynamicComponent as Fi, provide as Gs, onBeforeMount as Vs, onMounted as qs, onBeforeUnmount as js, defineAsyncComponent as Ys, nextTick as Xs } from "vue";
5
+ import { defineStore as Ks, storeToRefs as ti } from "pinia";
6
+ import { ElTag as Zs, ElTooltip as hs } from "element-plus";
7
7
  /*! Element Plus Icons Vue v2.3.2 */
8
- var Zs = /* @__PURE__ */ ye({
8
+ var Qs = /* @__PURE__ */ we({
9
9
  name: "CircleCloseFilled",
10
10
  __name: "circle-close-filled",
11
11
  setup(o) {
12
- return (e, t) => (T(), U("svg", {
12
+ return (e, t) => (R(), $("svg", {
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
14
  viewBox: "0 0 1024 1024"
15
15
  }, [
16
- M("path", {
16
+ z("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
- }), Qs = Zs, Js = /* @__PURE__ */ ye({
22
+ }), Js = Qs, er = /* @__PURE__ */ we({
23
23
  name: "Close",
24
24
  __name: "close",
25
25
  setup(o) {
26
- return (e, t) => (T(), U("svg", {
26
+ return (e, t) => (R(), $("svg", {
27
27
  xmlns: "http://www.w3.org/2000/svg",
28
28
  viewBox: "0 0 1024 1024"
29
29
  }, [
30
- M("path", {
30
+ z("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
- }), er = Js, tr = /* @__PURE__ */ ye({
36
+ }), tr = er, ir = /* @__PURE__ */ we({
37
37
  name: "Edit",
38
38
  __name: "edit",
39
39
  setup(o) {
40
- return (e, t) => (T(), U("svg", {
40
+ return (e, t) => (R(), $("svg", {
41
41
  xmlns: "http://www.w3.org/2000/svg",
42
42
  viewBox: "0 0 1024 1024"
43
43
  }, [
44
- M("path", {
44
+ z("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
- M("path", {
48
+ z("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
- }), hs = tr, ir = /* @__PURE__ */ ye({
54
+ }), us = ir, sr = /* @__PURE__ */ we({
55
55
  name: "Lock",
56
56
  __name: "lock",
57
57
  setup(o) {
58
- return (e, t) => (T(), U("svg", {
58
+ return (e, t) => (R(), $("svg", {
59
59
  xmlns: "http://www.w3.org/2000/svg",
60
60
  viewBox: "0 0 1024 1024"
61
61
  }, [
62
- M("path", {
62
+ z("path", {
63
63
  fill: "currentColor",
64
64
  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"
65
65
  }),
66
- M("path", {
66
+ z("path", {
67
67
  fill: "currentColor",
68
68
  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"
69
69
  })
70
70
  ]));
71
71
  }
72
- }), sr = ir, rr = /* @__PURE__ */ ye({
72
+ }), rr = sr, nr = /* @__PURE__ */ we({
73
73
  name: "Unlock",
74
74
  __name: "unlock",
75
75
  setup(o) {
76
- return (e, t) => (T(), U("svg", {
76
+ return (e, t) => (R(), $("svg", {
77
77
  xmlns: "http://www.w3.org/2000/svg",
78
78
  viewBox: "0 0 1024 1024"
79
79
  }, [
80
- M("path", {
80
+ z("path", {
81
81
  fill: "currentColor",
82
82
  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"
83
83
  }),
84
- M("path", {
84
+ z("path", {
85
85
  fill: "currentColor",
86
86
  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"
87
87
  })
88
88
  ]));
89
89
  }
90
- }), nr = rr;
91
- const nt = Xs("globalPensieveDashVars", () => {
92
- const o = F([]), e = F({}), t = "dashboard-globalVarsStore", i = F(null), s = F([]), r = F([]), l = F({}), n = rs({});
93
- function u(C, k) {
94
- n[C] = k;
90
+ }), or = nr;
91
+ const nt = Ks("globalPensieveDashVars", () => {
92
+ const o = B([]), e = B({}), t = "dashboard-globalVarsStore", i = B([]), s = B([]), r = B({}), l = ns({});
93
+ function n(x, E) {
94
+ l[x] = E;
95
95
  }
96
- function a(C = {}) {
97
- for (const k of Object.keys(n)) delete n[k];
98
- Object.assign(n, C);
96
+ function u(x = {}) {
97
+ for (const E of Object.keys(l)) delete l[E];
98
+ Object.assign(l, x);
99
99
  }
100
- const h = (C) => {
101
- delete n[C], P();
100
+ const a = (x) => {
101
+ delete l[x], me();
102
102
  };
103
- function p() {
104
- for (const C of Object.keys(n)) delete n[C];
105
- }
106
- function d() {
107
- return JSON.parse(JSON.stringify(n));
103
+ function h() {
104
+ for (const x of Object.keys(l)) delete l[x];
108
105
  }
109
- const m = (C) => r.value.find((k) => k.id === C), v = (C, k) => {
110
- s.value.push({ name: C, value: k });
111
- }, N = () => {
112
- s.value = [];
113
- }, O = (C) => {
114
- const k = L(C);
115
- l.value = k;
116
- }, A = () => l.value;
117
- function L(C) {
118
- const k = {};
119
- if (!C || typeof C != "object") return k;
120
- for (const [R, z] of Object.entries(C))
121
- if (z && typeof z == "object" && !(Ps(z) || $s(z))) {
122
- const Q = Object.getPrototypeOf(z) === Object.prototype;
123
- k[R] = Q ? { ...z } : Bs(z);
106
+ function p() {
107
+ return JSON.parse(JSON.stringify(l));
108
+ }
109
+ const d = (x) => s.value.find((E) => E.id === x), _ = (x, E) => {
110
+ i.value.push({ name: x, value: E });
111
+ }, v = () => {
112
+ i.value = [];
113
+ }, L = (x) => {
114
+ const E = C(x);
115
+ r.value = E;
116
+ }, H = () => r.value;
117
+ function C(x) {
118
+ const E = {};
119
+ if (!x || typeof x != "object") return E;
120
+ for (const [K, W] of Object.entries(x))
121
+ if (W && typeof W == "object" && !(Ps(W) || $s(W))) {
122
+ const oe = Object.getPrototypeOf(W) === Object.prototype;
123
+ E[K] = oe ? { ...W } : Bs(W);
124
124
  } else
125
- k[R] = z;
126
- return k;
127
- }
128
- const S = (C) => {
129
- const k = r.value.find((R) => R.id === C);
130
- k && (k.Props = k.Props || {}, k.Props.locked = !k.Props.locked);
131
- }, _ = (C) => C.map((k) => {
132
- const R = e.value[k.componentKey];
133
- return R ? {
134
- ...k,
135
- component: R
125
+ E[K] = W;
126
+ return E;
127
+ }
128
+ const D = (x) => {
129
+ const E = s.value.find((K) => K.id === x);
130
+ E && (E.Props = E.Props || {}, E.Props.locked = !E.Props.locked);
131
+ }, S = (x) => x.map((E) => {
132
+ const K = e.value[E.componentKey];
133
+ return K ? {
134
+ ...E,
135
+ component: K
136
136
  // attach runtime component
137
137
  } : null;
138
- }).filter((k) => !!k);
139
- function y() {
140
- var k, R;
141
- return (((R = (k = i.value) == null ? void 0 : k.save) == null ? void 0 : R.call(k)) ?? []).map((z) => {
142
- const Q = r.value.find((It) => It.id === z.id);
143
- if (!Q || !Q.componentKey)
144
- return console.warn(`save: missing item or componentKey for id=${z == null ? void 0 : z.id}`), null;
145
- const { x: Re, y: Se, w: Ie, h: Mt } = z;
138
+ }).filter((E) => !!E);
139
+ let m = null;
140
+ function y(x) {
141
+ m = x;
142
+ }
143
+ function P() {
144
+ m = null;
145
+ }
146
+ function U() {
147
+ return m ? m() : null;
148
+ }
149
+ function pe() {
150
+ var E, K;
151
+ return (((K = (E = U()) == null ? void 0 : E.save) == null ? void 0 : K.call(E)) ?? []).map((W) => {
152
+ const oe = s.value.find((at) => at.id === W.id);
153
+ if (!oe || !oe.componentKey)
154
+ return console.warn(`save: missing item or componentKey for id=${W == null ? void 0 : W.id}`), null;
155
+ const { x: It, y: Ht, w: lt, h: Ot } = W;
146
156
  return {
147
- id: Q.id,
148
- componentKey: Q.componentKey,
149
- componentName: Q.componentName,
150
- hideHeader: Q.hideHeader,
151
- Props: Q.Props ?? {},
152
- x: Re,
153
- y: Se,
154
- w: Ie,
155
- h: Mt
157
+ id: oe.id,
158
+ componentKey: oe.componentKey,
159
+ componentName: oe.componentName,
160
+ hideHeader: oe.hideHeader,
161
+ Props: oe.Props ?? {},
162
+ x: It,
163
+ y: Ht,
164
+ w: lt,
165
+ h: Ot
156
166
  };
157
- }).filter((z) => !!z);
167
+ }).filter((W) => !!W);
158
168
  }
159
- const P = () => {
160
- var k;
161
- const C = {
169
+ const me = () => {
170
+ var E;
171
+ const x = {
162
172
  version: 1,
163
- items: y(),
164
- filters: d()
173
+ items: pe(),
174
+ filters: p()
165
175
  };
166
- ((k = C.items) == null ? void 0 : k.length) < 1 || localStorage.setItem(t, JSON.stringify(C));
167
- }, $ = () => {
168
- const C = localStorage.getItem(t);
169
- if (!C) {
170
- r.value = o.value, a({});
176
+ ((E = x.items) == null ? void 0 : E.length) < 1 || localStorage.setItem(t, JSON.stringify(x));
177
+ }, N = () => {
178
+ const x = localStorage.getItem(t);
179
+ if (!x) {
180
+ s.value = o.value, u({});
171
181
  return;
172
182
  }
173
183
  try {
174
- const k = JSON.parse(C);
175
- r.value = Array.isArray(k.items) ? _(k.items) : o.value, a(k.filters ?? {});
176
- } catch (k) {
177
- console.error("Failed to parse globalVarsStore:", k), r.value = o.value, a({});
184
+ const E = JSON.parse(x);
185
+ s.value = Array.isArray(E.items) ? S(E.items) : o.value, u(E.filters ?? {});
186
+ } catch (E) {
187
+ console.error("Failed to parse globalVarsStore:", E), s.value = o.value, u({});
178
188
  }
179
189
  };
180
- return ue(n, () => P(), { deep: !0 }), {
181
- DASHBOARD_ITEMS: r,
190
+ return ce(l, () => me(), { deep: !0 }), {
191
+ DASHBOARD_ITEMS: s,
182
192
  DefaultLayout: o,
183
193
  ComponentRegistry: e,
184
- optionsData: s,
185
- gridInstance: i,
186
- Services: l,
187
- Filters: n,
188
- setFilter: u,
189
- clearFilter: h,
190
- clearAllFilters: p,
191
- resetFilters: a,
192
- getDashItem: m,
193
- toggleWidgetLock: S,
194
- addOptionsDataItems: v,
195
- clearOptionsDataItems: N,
196
- saveToLocalStorage: P,
197
- loadFromLocalStorage: $,
198
- setOptionServices: O,
199
- getServices: A
194
+ optionsData: i,
195
+ Services: r,
196
+ Filters: l,
197
+ registerGridProvider: y,
198
+ unregisterGridProvider: P,
199
+ setFilter: n,
200
+ clearFilter: a,
201
+ clearAllFilters: h,
202
+ resetFilters: u,
203
+ getDashItem: d,
204
+ toggleWidgetLock: D,
205
+ addOptionsDataItems: _,
206
+ clearOptionsDataItems: v,
207
+ saveToLocalStorage: me,
208
+ loadFromLocalStorage: N,
209
+ setOptionServices: L,
210
+ getServices: H
200
211
  };
201
- }), or = { class: "widget-settings-container" }, lr = { class: "widget-setting" }, ar = { class: "dialog-footer" }, hr = /* @__PURE__ */ ye({
212
+ }), lr = { class: "widget-settings-container" }, ar = { class: "widget-setting" }, hr = { class: "dialog-footer" }, ur = /* @__PURE__ */ we({
202
213
  __name: "TextWidgetSettings",
203
214
  props: {
204
215
  showDialog: { type: Boolean },
@@ -208,31 +219,31 @@ const nt = Xs("globalPensieveDashVars", () => {
208
219
  },
209
220
  emits: ["close-dialog", "update-text-var"],
210
221
  setup(o, { emit: e }) {
211
- const t = nt(), { optionsData: i } = _t(t), s = e, r = o, l = Te({
222
+ const t = nt(), { optionsData: i } = ti(t), s = e, r = o, l = Ce({
212
223
  get: () => r.showDialog,
213
224
  set: (p) => {
214
225
  p || s("close-dialog");
215
226
  }
216
- }), n = F(r.reactiveSourceValue ?? ""), u = F(r.manualEntryValue ?? ""), a = F(!!r.hideHeaderValue);
217
- ue(() => r.reactiveSourceValue, (p) => {
227
+ }), n = B(r.reactiveSourceValue ?? ""), u = B(r.manualEntryValue ?? ""), a = B(!!r.hideHeaderValue);
228
+ ce(() => r.reactiveSourceValue, (p) => {
218
229
  n.value = p ?? "";
219
- }), ue(() => r.manualEntryValue, (p) => {
230
+ }), ce(() => r.manualEntryValue, (p) => {
220
231
  u.value = p ?? "";
221
- }, { immediate: !0 }), ue(() => r.hideHeaderValue, (p) => {
232
+ }, { immediate: !0 }), ce(() => r.hideHeaderValue, (p) => {
222
233
  a.value = !!p;
223
234
  });
224
235
  function h() {
225
236
  var v;
226
- const p = (n.value || "").trim(), d = p !== "", m = d ? null : ((v = u.value) == null ? void 0 : v.trim()) || "";
237
+ const p = (n.value || "").trim(), d = p !== "", _ = d ? null : ((v = u.value) == null ? void 0 : v.trim()) || "";
227
238
  s("update-text-var", {
228
239
  reactiveSource: d ? p : null,
229
- manualEdit: m,
240
+ manualEdit: _,
230
241
  hideHeader: a.value
231
242
  }), l.value = !1;
232
243
  }
233
244
  return (p, d) => {
234
- const m = ie("el-option"), v = ie("el-select"), N = ie("el-input"), O = ie("el-checkbox"), A = ie("el-button"), L = ie("el-dialog");
235
- return T(), le(L, {
245
+ const _ = ie("el-option"), v = ie("el-select"), L = ie("el-input"), H = ie("el-checkbox"), C = ie("el-button"), D = ie("el-dialog");
246
+ return R(), ae(D, {
236
247
  class: "full-dialog-dashboard",
237
248
  modelValue: l.value,
238
249
  "onUpdate:modelValue": d[4] || (d[4] = (S) => l.value = S),
@@ -240,8 +251,8 @@ const nt = Xs("globalPensieveDashVars", () => {
240
251
  "append-to-body": !0
241
252
  }, {
242
253
  footer: q(() => [
243
- M("div", ar, [
244
- X(A, {
254
+ z("div", hr, [
255
+ X(C, {
245
256
  class: "secondary",
246
257
  onClick: d[3] || (d[3] = (S) => l.value = !1)
247
258
  }, {
@@ -250,7 +261,7 @@ const nt = Xs("globalPensieveDashVars", () => {
250
261
  ])]),
251
262
  _: 1
252
263
  }),
253
- X(A, { onClick: h }, {
264
+ X(C, { onClick: h }, {
254
265
  default: q(() => [...d[9] || (d[9] = [
255
266
  We("Save", -1)
256
267
  ])]),
@@ -259,22 +270,22 @@ const nt = Xs("globalPensieveDashVars", () => {
259
270
  ])
260
271
  ]),
261
272
  default: q(() => [
262
- M("div", or, [
263
- M("div", lr, [
264
- d[5] || (d[5] = M("h4", null, "Select This Widget's Value", -1)),
265
- d[6] || (d[6] = M("h5", null, "Select From Variables", -1)),
273
+ z("div", lr, [
274
+ z("div", ar, [
275
+ d[5] || (d[5] = z("h4", null, "Select This Widget's Value", -1)),
276
+ d[6] || (d[6] = z("h5", null, "Select From Variables", -1)),
266
277
  X(v, {
267
278
  modelValue: n.value,
268
279
  "onUpdate:modelValue": d[0] || (d[0] = (S) => n.value = S),
269
280
  class: "text-settings-height"
270
281
  }, {
271
282
  default: q(() => [
272
- (T(), le(m, {
283
+ (R(), ae(_, {
273
284
  value: "",
274
285
  key: "__manual__",
275
286
  label: "Manual entry"
276
287
  })),
277
- (T(!0), U(Le, null, it(he(i), (S) => (T(), le(m, {
288
+ (R(!0), $(ze, null, it(ue(i), (S) => (R(), ae(_, {
278
289
  key: S.name,
279
290
  label: S.name,
280
291
  value: S.name
@@ -282,13 +293,13 @@ const nt = Xs("globalPensieveDashVars", () => {
282
293
  ]),
283
294
  _: 1
284
295
  }, 8, ["modelValue"]),
285
- d[7] || (d[7] = M("h5", null, "Manual Entry", -1)),
286
- X(N, {
296
+ d[7] || (d[7] = z("h5", null, "Manual Entry", -1)),
297
+ X(L, {
287
298
  modelValue: u.value,
288
299
  "onUpdate:modelValue": d[1] || (d[1] = (S) => u.value = S),
289
300
  class: "text-settings-height"
290
301
  }, null, 8, ["modelValue"]),
291
- X(O, {
302
+ X(H, {
292
303
  modelValue: a.value,
293
304
  "onUpdate:modelValue": d[2] || (d[2] = (S) => a.value = S),
294
305
  label: "Hide Header"
@@ -300,12 +311,12 @@ const nt = Xs("globalPensieveDashVars", () => {
300
311
  }, 8, ["modelValue"]);
301
312
  };
302
313
  }
303
- }), Ne = (o, e) => {
314
+ }), Me = (o, e) => {
304
315
  const t = o.__vccOpts || o;
305
316
  for (const [i, s] of e)
306
317
  t[i] = s;
307
318
  return t;
308
- }, ur = /* @__PURE__ */ Ne(hr, [["__scopeId", "data-v-769ea864"]]), cr = { key: 0 }, dr = /* @__PURE__ */ ye({
319
+ }, cr = /* @__PURE__ */ Me(ur, [["__scopeId", "data-v-769ea864"]]), dr = { key: 0 }, pr = /* @__PURE__ */ we({
309
320
  inheritAttrs: !1,
310
321
  __name: "TextWidget",
311
322
  props: {
@@ -317,115 +328,115 @@ const nt = Xs("globalPensieveDashVars", () => {
317
328
  setup(o) {
318
329
  const e = nt(), t = o;
319
330
  Us("dashboard:globalVars", null);
320
- const i = F(t.displayText ?? "");
321
- ue(() => t.displayText, (A) => {
322
- i.value = A ?? "";
331
+ const i = B(t.displayText ?? "");
332
+ ce(() => t.displayText, (C) => {
333
+ i.value = C ?? "";
323
334
  }, { immediate: !0 });
324
- const s = Te(() => !!(t.bindedKey && t.bindedKey.trim() !== "")), r = Te(() => {
325
- var _;
326
- const A = (_ = t.bindedKey) == null ? void 0 : _.trim();
327
- if (!A) return "—";
328
- const L = e.optionsData.find((y) => (y == null ? void 0 : y.name) === A), S = L == null ? void 0 : L.value;
335
+ const s = Ce(() => !!(t.bindedKey && t.bindedKey.trim() !== "")), r = Ce(() => {
336
+ var m;
337
+ const C = (m = t.bindedKey) == null ? void 0 : m.trim();
338
+ if (!C) return "—";
339
+ const D = e.optionsData.find((y) => (y == null ? void 0 : y.name) === C), S = D == null ? void 0 : D.value;
329
340
  return Array.isArray(S) ? S.join(", ") : S && typeof S == "object" ? JSON.stringify(S) : S ?? "—";
330
- }), l = F("Text Widget"), n = ns([{ comp: hs, event: m, tooltip: "open Text settings" }]), u = F(!1), a = F(null);
341
+ }), l = B("Text Widget"), n = os([{ comp: us, event: _, tooltip: "open Text settings" }]), u = B(!1), a = B(null);
331
342
  function h() {
332
- var A, L;
333
- u.value = !0, (L = (A = a.value) == null ? void 0 : A.focus) == null || L.call(A);
343
+ var C, D;
344
+ u.value = !0, (D = (C = a.value) == null ? void 0 : C.focus) == null || D.call(C);
334
345
  }
335
346
  function p() {
336
347
  u.value = !1;
337
348
  }
338
- const d = F(!1);
339
- function m() {
349
+ const d = B(!1);
350
+ function _() {
340
351
  d.value = !0;
341
352
  }
342
353
  function v() {
343
354
  d.value = !1, e.saveToLocalStorage();
344
355
  }
345
- function N({ manualEdit: A, reactiveSource: L, hideHeader: S }) {
346
- const _ = e.getDashItem(t.widgetID);
347
- _ && (_.hideHeader = S, L && L.trim() !== "" ? (_.Props = _.Props || {}, _.Props.bindedKey = L, _.Props.displayText = null, _.componentName = O(L)) : (_.Props = _.Props || {}, _.Props.bindedKey = null, _.Props.displayText = A ?? "", _.componentName = A ?? "Text"), e.saveToLocalStorage());
356
+ function L({ manualEdit: C, reactiveSource: D, hideHeader: S }) {
357
+ const m = e.getDashItem(t.widgetID);
358
+ m && (m.hideHeader = S, D && D.trim() !== "" ? (m.Props = m.Props || {}, m.Props.bindedKey = D, m.Props.displayText = null, m.componentName = H(D)) : (m.Props = m.Props || {}, m.Props.bindedKey = null, m.Props.displayText = C ?? "", m.componentName = C ?? "Text"), e.saveToLocalStorage());
348
359
  }
349
- function O(A) {
350
- return A ? A.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (L) => L.toUpperCase()) : "";
360
+ function H(C) {
361
+ return C ? C.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (D) => D.toUpperCase()) : "";
351
362
  }
352
- return (A, L) => {
353
- const S = ie("el-input"), _ = os("click-out");
354
- return T(), U(Le, null, [
355
- vt(A.$slots, "default", {
363
+ return (C, D) => {
364
+ const S = ie("el-input"), m = ls("click-out");
365
+ return R(), $(ze, null, [
366
+ wt(C.$slots, "default", {
356
367
  widgetName: l.value,
357
368
  childIcons: n.value
358
369
  }, void 0, !0),
359
- M("div", ri({ class: "text-widget-wrap" }, A.$attrs), [
360
- s.value ? (T(), U("div", cr, [
361
- M("h2", null, Ce(r.value), 1)
362
- ])) : De((T(), U("div", {
370
+ z("div", li({ class: "text-widget-wrap" }, C.$attrs), [
371
+ s.value ? (R(), $("div", dr, [
372
+ z("h2", null, Ae(r.value), 1)
373
+ ])) : Le((R(), $("div", {
363
374
  key: 1,
364
- onKeyup: ls(p, ["enter"]),
375
+ onKeyup: as(p, ["enter"]),
365
376
  class: "tw-flex"
366
377
  }, [
367
- De(M("div", null, [
378
+ Le(z("div", null, [
368
379
  X(S, {
369
380
  ref_key: "textUserInput",
370
381
  ref: a,
371
382
  modelValue: i.value,
372
- "onUpdate:modelValue": L[0] || (L[0] = (y) => i.value = y),
373
- onFocus: L[1] || (L[1] = (y) => {
374
- var P, $;
375
- return ($ = (P = y.target) == null ? void 0 : P.select) == null ? void 0 : $.call(P);
383
+ "onUpdate:modelValue": D[0] || (D[0] = (y) => i.value = y),
384
+ onFocus: D[1] || (D[1] = (y) => {
385
+ var P, U;
386
+ return (U = (P = y.target) == null ? void 0 : P.select) == null ? void 0 : U.call(P);
376
387
  })
377
388
  }, null, 8, ["modelValue"])
378
389
  ], 512), [
379
- [wt, u.value]
390
+ [xt, u.value]
380
391
  ]),
381
- De(M("div", {
382
- onClick: L[2] || (L[2] = (y) => h()),
392
+ Le(z("div", {
393
+ onClick: D[2] || (D[2] = (y) => h()),
383
394
  class: "tw-w-full tw-h-full"
384
395
  }, [
385
- M("h2", null, Ce(i.value), 1)
396
+ z("h2", null, Ae(i.value), 1)
386
397
  ], 512), [
387
- [wt, !u.value]
398
+ [xt, !u.value]
388
399
  ])
389
400
  ], 32)), [
390
- [_, p]
401
+ [m, p]
391
402
  ])
392
403
  ], 16),
393
- X(ur, {
404
+ X(cr, {
394
405
  "show-dialog": d.value,
395
406
  "reactive-source-value": t.bindedKey || "",
396
407
  "manual-entry-value": i.value,
397
408
  "hide-header-value": t.hideHeader || !1,
398
409
  onCloseDialog: v,
399
- onUpdateTextVar: N
410
+ onUpdateTextVar: L
400
411
  }, null, 8, ["show-dialog", "reactive-source-value", "manual-entry-value", "hide-header-value"])
401
412
  ], 64);
402
413
  };
403
414
  }
404
- }), io = /* @__PURE__ */ Ne(dr, [["__scopeId", "data-v-4743c11f"]]);
405
- function ni() {
415
+ }), so = /* @__PURE__ */ Me(pr, [["__scopeId", "data-v-4743c11f"]]);
416
+ function ai() {
406
417
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
407
418
  }
408
- var Me = ni();
409
- function us(o) {
410
- Me = o;
419
+ var Ie = ai();
420
+ function cs(o) {
421
+ Ie = o;
411
422
  }
412
423
  var tt = { exec: () => null };
413
- function H(o, e = "") {
424
+ function I(o, e = "") {
414
425
  let t = typeof o == "string" ? o : o.source, i = { replace: (s, r) => {
415
426
  let l = typeof r == "string" ? r : r.source;
416
427
  return l = l.replace(se.caret, "$1"), t = t.replace(s, l), i;
417
428
  }, getRegex: () => new RegExp(t, e) };
418
429
  return i;
419
430
  }
420
- var se = { 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") }, pr = /^(?:[ \t]*(?:\n|$))+/, fr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, gr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ot = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, mr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, oi = /(?:[*+-]|\d{1,9}[.)])/, cs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ds = H(cs).replace(/bull/g, oi).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(), _r = H(cs).replace(/bull/g, oi).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(), li = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, yr = /^[^\n]+/, ai = /(?!\s*\])(?:\\.|[^\[\]\\])+/, br = H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ai).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), vr = H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, oi).getRegex(), Lt = "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", hi = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, wr = H("^ {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", hi).replace("tag", Lt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ps = H(li).replace("hr", ot).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", Lt).getRegex(), xr = H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ps).getRegex(), ui = { blockquote: xr, code: fr, def: br, fences: gr, heading: mr, hr: ot, html: wr, lheading: ds, list: vr, newline: pr, paragraph: ps, table: tt, text: yr }, Fi = H("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ot).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", Lt).getRegex(), kr = { ...ui, lheading: _r, table: Fi, paragraph: H(li).replace("hr", ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Fi).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", Lt).getRegex() }, Er = { ...ui, html: H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", hi).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: H(li).replace("hr", ot).replace("heading", ` *#{1,6} *[^
421
- ]`).replace("lheading", ds).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Tr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Rr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, fs = /^( {2,}|\\)\n(?!\s*$)/, Sr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, zt = /[\p{P}\p{S}]/u, ci = /[\s\p{P}\p{S}]/u, gs = /[^\s\p{P}\p{S}]/u, Cr = H(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, ci).getRegex(), ms = /(?!~)[\p{P}\p{S}]/u, Ar = /(?!~)[\s\p{P}\p{S}]/u, Dr = /(?:[^\s\p{P}\p{S}]|~)/u, Lr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, _s = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, zr = H(_s, "u").replace(/punct/g, zt).getRegex(), Nr = H(_s, "u").replace(/punct/g, ms).getRegex(), ys = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Mr = H(ys, "gu").replace(/notPunctSpace/g, gs).replace(/punctSpace/g, ci).replace(/punct/g, zt).getRegex(), Ir = H(ys, "gu").replace(/notPunctSpace/g, Dr).replace(/punctSpace/g, Ar).replace(/punct/g, ms).getRegex(), Hr = H("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, gs).replace(/punctSpace/g, ci).replace(/punct/g, zt).getRegex(), Or = H(/\\(punct)/, "gu").replace(/punct/g, zt).getRegex(), Pr = H(/^<(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(), $r = H(hi).replace("(?:-->|$)", "-->").getRegex(), Br = H("^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", $r).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Ur = H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", kt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), bs = H(/^!?\[(label)\]\[(ref)\]/).replace("label", kt).replace("ref", ai).getRegex(), vs = H(/^!?\[(ref)\](?:\[\])?/).replace("ref", ai).getRegex(), Fr = H("reflink|nolink(?!\\()", "g").replace("reflink", bs).replace("nolink", vs).getRegex(), di = { _backpedal: tt, anyPunctuation: Or, autolink: Pr, blockSkip: Lr, br: fs, code: Rr, del: tt, emStrongLDelim: zr, emStrongRDelimAst: Mr, emStrongRDelimUnd: Hr, escape: Tr, link: Ur, nolink: vs, punctuation: Cr, reflink: bs, reflinkSearch: Fr, tag: Br, text: Sr, url: tt }, Wr = { ...di, link: H(/^!?\[(label)\]\((.*?)\)/).replace("label", kt).getRegex(), reflink: H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kt).getRegex() }, Jt = { ...di, emStrongRDelimAst: Ir, emStrongLDelim: Nr, url: H(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, Gr = { ...Jt, br: H(fs).replace("{2,}", "*").getRegex(), text: H(Jt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: ui, gfm: kr, pedantic: Er }, Ye = { normal: di, gfm: Jt, breaks: Gr, pedantic: Wr }, Vr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Wi = (o) => Vr[o];
422
- function ge(o, e) {
431
+ var se = { 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") }, fr = /^(?:[ \t]*(?:\n|$))+/, gr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, mr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ot = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, _r = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, hi = /(?:[*+-]|\d{1,9}[.)])/, ds = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ps = I(ds).replace(/bull/g, hi).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(), yr = I(ds).replace(/bull/g, hi).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(), ui = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, br = /^[^\n]+/, ci = /(?!\s*\])(?:\\.|[^\[\]\\])+/, vr = I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ci).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), wr = I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, hi).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", di = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xr = I("^ {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", di).replace("tag", zt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), fs = I(ui).replace("hr", ot).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(), kr = I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", fs).getRegex(), pi = { blockquote: kr, code: gr, def: vr, fences: mr, heading: _r, hr: ot, html: xr, lheading: ps, list: wr, newline: fr, paragraph: fs, table: tt, text: br }, Wi = I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ot).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(), Er = { ...pi, lheading: yr, table: Wi, paragraph: I(ui).replace("hr", ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Wi).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() }, Tr = { ...pi, html: I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", di).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: I(ui).replace("hr", ot).replace("heading", ` *#{1,6} *[^
432
+ ]`).replace("lheading", ps).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Rr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Sr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, gs = /^( {2,}|\\)\n(?!\s*$)/, Cr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Nt = /[\p{P}\p{S}]/u, fi = /[\s\p{P}\p{S}]/u, ms = /[^\s\p{P}\p{S}]/u, Ar = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, fi).getRegex(), _s = /(?!~)[\p{P}\p{S}]/u, Dr = /(?!~)[\s\p{P}\p{S}]/u, Lr = /(?:[^\s\p{P}\p{S}]|~)/u, zr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, ys = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Nr = I(ys, "u").replace(/punct/g, Nt).getRegex(), Mr = I(ys, "u").replace(/punct/g, _s).getRegex(), bs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ir = I(bs, "gu").replace(/notPunctSpace/g, ms).replace(/punctSpace/g, fi).replace(/punct/g, Nt).getRegex(), Hr = I(bs, "gu").replace(/notPunctSpace/g, Lr).replace(/punctSpace/g, Dr).replace(/punct/g, _s).getRegex(), Or = I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ms).replace(/punctSpace/g, fi).replace(/punct/g, Nt).getRegex(), Pr = I(/\\(punct)/, "gu").replace(/punct/g, Nt).getRegex(), $r = I(/^<(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(), Br = I(di).replace("(?:-->|$)", "-->").getRegex(), Ur = I("^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", Br).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Et = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Fr = I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Et).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vs = I(/^!?\[(label)\]\[(ref)\]/).replace("label", Et).replace("ref", ci).getRegex(), ws = I(/^!?\[(ref)\](?:\[\])?/).replace("ref", ci).getRegex(), Wr = I("reflink|nolink(?!\\()", "g").replace("reflink", vs).replace("nolink", ws).getRegex(), gi = { _backpedal: tt, anyPunctuation: Pr, autolink: $r, blockSkip: zr, br: gs, code: Sr, del: tt, emStrongLDelim: Nr, emStrongRDelimAst: Ir, emStrongRDelimUnd: Or, escape: Rr, link: Fr, nolink: ws, punctuation: Ar, reflink: vs, reflinkSearch: Wr, tag: Ur, text: Cr, url: tt }, Gr = { ...gi, link: I(/^!?\[(label)\]\((.*?)\)/).replace("label", Et).getRegex(), reflink: I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Et).getRegex() }, ii = { ...gi, emStrongRDelimAst: Hr, emStrongLDelim: Mr, url: I(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, Vr = { ...ii, br: I(gs).replace("{2,}", "*").getRegex(), text: I(ii.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, mt = { normal: pi, gfm: Er, pedantic: Tr }, Ye = { normal: gi, gfm: ii, breaks: Vr, pedantic: Gr }, qr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Gi = (o) => qr[o];
433
+ function ye(o, e) {
423
434
  if (e) {
424
- if (se.escapeTest.test(o)) return o.replace(se.escapeReplace, Wi);
425
- } else if (se.escapeTestNoEncode.test(o)) return o.replace(se.escapeReplaceNoEncode, Wi);
435
+ if (se.escapeTest.test(o)) return o.replace(se.escapeReplace, Gi);
436
+ } else if (se.escapeTestNoEncode.test(o)) return o.replace(se.escapeReplaceNoEncode, Gi);
426
437
  return o;
427
438
  }
428
- function Gi(o) {
439
+ function Vi(o) {
429
440
  try {
430
441
  o = encodeURI(o).replace(se.percentDecode, "%");
431
442
  } catch {
@@ -433,7 +444,7 @@ function Gi(o) {
433
444
  }
434
445
  return o;
435
446
  }
436
- function Vi(o, e) {
447
+ function qi(o, e) {
437
448
  var r;
438
449
  let t = o.replace(se.findPipe, (l, n, u) => {
439
450
  let a = !1, h = n;
@@ -453,7 +464,7 @@ function Xe(o, e, t) {
453
464
  s++;
454
465
  return o.slice(0, i - s);
455
466
  }
456
- function qr(o, e) {
467
+ function jr(o, e) {
457
468
  if (o.indexOf(e[1]) === -1) return -1;
458
469
  let t = 0;
459
470
  for (let i = 0; i < o.length; i++) if (o[i] === "\\") i++;
@@ -461,13 +472,13 @@ function qr(o, e) {
461
472
  else if (o[i] === e[1] && (t--, t < 0)) return i;
462
473
  return t > 0 ? -2 : -1;
463
474
  }
464
- function qi(o, e, t, i, s) {
475
+ function ji(o, e, t, i, s) {
465
476
  let r = e.href, l = e.title || null, n = o[1].replace(s.other.outputLinkReplace, "$1");
466
477
  i.state.inLink = !0;
467
478
  let u = { type: o[0].charAt(0) === "!" ? "image" : "link", raw: t, href: r, title: l, text: n, tokens: i.inlineTokens(n) };
468
479
  return i.state.inLink = !1, u;
469
480
  }
470
- function jr(o, e, t) {
481
+ function Yr(o, e, t) {
471
482
  let i = o.match(t.other.indentCodeCompensation);
472
483
  if (i === null) return e;
473
484
  let s = i[1];
@@ -480,12 +491,12 @@ function jr(o, e, t) {
480
491
  }).join(`
481
492
  `);
482
493
  }
483
- var Et = class {
494
+ var Tt = class {
484
495
  constructor(o) {
485
- B(this, "options");
486
- B(this, "rules");
487
- B(this, "lexer");
488
- this.options = o || Me;
496
+ O(this, "options");
497
+ O(this, "rules");
498
+ O(this, "lexer");
499
+ this.options = o || Ie;
489
500
  }
490
501
  space(o) {
491
502
  let e = this.rules.block.newline.exec(o);
@@ -502,7 +513,7 @@ var Et = class {
502
513
  fences(o) {
503
514
  let e = this.rules.block.fences.exec(o);
504
515
  if (e) {
505
- let t = e[0], i = jr(t, e[3] || "", this.rules);
516
+ let t = e[0], i = Yr(t, e[3] || "", this.rules);
506
517
  return { type: "code", raw: t, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: i };
507
518
  }
508
519
  }
@@ -545,16 +556,16 @@ ${h}` : h;
545
556
  let d = r.at(-1);
546
557
  if ((d == null ? void 0 : d.type) === "code") break;
547
558
  if ((d == null ? void 0 : d.type) === "blockquote") {
548
- let m = d, v = m.raw + `
559
+ let _ = d, v = _.raw + `
549
560
  ` + t.join(`
550
- `), N = this.blockquote(v);
551
- r[r.length - 1] = N, i = i.substring(0, i.length - m.raw.length) + N.raw, s = s.substring(0, s.length - m.text.length) + N.text;
561
+ `), L = this.blockquote(v);
562
+ r[r.length - 1] = L, i = i.substring(0, i.length - _.raw.length) + L.raw, s = s.substring(0, s.length - _.text.length) + L.text;
552
563
  break;
553
564
  } else if ((d == null ? void 0 : d.type) === "list") {
554
- let m = d, v = m.raw + `
565
+ let _ = d, v = _.raw + `
555
566
  ` + t.join(`
556
- `), N = this.list(v);
557
- r[r.length - 1] = N, i = i.substring(0, i.length - d.raw.length) + N.raw, s = s.substring(0, s.length - m.raw.length) + N.raw, t = v.substring(r.at(-1).raw.length).split(`
567
+ `), L = this.list(v);
568
+ r[r.length - 1] = L, i = i.substring(0, i.length - d.raw.length) + L.raw, s = s.substring(0, s.length - _.raw.length) + L.raw, t = v.substring(r.at(-1).raw.length).split(`
558
569
  `);
559
570
  continue;
560
571
  }
@@ -573,29 +584,29 @@ ${h}` : h;
573
584
  if (!(e = r.exec(o)) || this.rules.block.hr.test(o)) break;
574
585
  a = e[0], o = o.substring(a.length);
575
586
  let p = e[2].split(`
576
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (A) => " ".repeat(3 * A.length)), d = o.split(`
577
- `, 1)[0], m = !p.trim(), v = 0;
578
- 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 + `
587
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (C) => " ".repeat(3 * C.length)), d = o.split(`
588
+ `, 1)[0], _ = !p.trim(), v = 0;
589
+ if (this.options.pedantic ? (v = 2, h = p.trimStart()) : _ ? 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), _ && this.rules.other.blankLine.test(d) && (a += d + `
579
590
  `, o = o.substring(d.length + 1), u = !0), !u) {
580
- let A = this.rules.other.nextBulletRegex(v), L = this.rules.other.hrRegex(v), S = this.rules.other.fencesBeginRegex(v), _ = this.rules.other.headingBeginRegex(v), y = this.rules.other.htmlBeginRegex(v);
591
+ let C = this.rules.other.nextBulletRegex(v), D = this.rules.other.hrRegex(v), S = this.rules.other.fencesBeginRegex(v), m = this.rules.other.headingBeginRegex(v), y = this.rules.other.htmlBeginRegex(v);
581
592
  for (; o; ) {
582
593
  let P = o.split(`
583
- `, 1)[0], $;
584
- if (d = P, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), $ = d) : $ = d.replace(this.rules.other.tabCharGlobal, " "), S.test(d) || _.test(d) || y.test(d) || A.test(d) || L.test(d)) break;
585
- if ($.search(this.rules.other.nonSpaceChar) >= v || !d.trim()) h += `
586
- ` + $.slice(v);
594
+ `, 1)[0], U;
595
+ if (d = P, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), U = d) : U = d.replace(this.rules.other.tabCharGlobal, " "), S.test(d) || m.test(d) || y.test(d) || C.test(d) || D.test(d)) break;
596
+ if (U.search(this.rules.other.nonSpaceChar) >= v || !d.trim()) h += `
597
+ ` + U.slice(v);
587
598
  else {
588
- if (m || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || S.test(p) || _.test(p) || L.test(p)) break;
599
+ if (_ || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || S.test(p) || m.test(p) || D.test(p)) break;
589
600
  h += `
590
601
  ` + d;
591
602
  }
592
- !m && !d.trim() && (m = !0), a += P + `
593
- `, o = o.substring(P.length + 1), p = $.slice(v);
603
+ !_ && !d.trim() && (_ = !0), a += P + `
604
+ `, o = o.substring(P.length + 1), p = U.slice(v);
594
605
  }
595
606
  }
596
607
  s.loose || (l ? s.loose = !0 : this.rules.other.doubleBlankLine.test(a) && (l = !0));
597
- let N = null, O;
598
- this.options.gfm && (N = this.rules.other.listIsTask.exec(h), N && (O = N[0] !== "[ ] ", h = h.replace(this.rules.other.listReplaceTask, ""))), s.items.push({ type: "list_item", raw: a, task: !!N, checked: O, loose: !1, text: h, tokens: [] }), s.raw += a;
608
+ let L = null, H;
609
+ this.options.gfm && (L = this.rules.other.listIsTask.exec(h), L && (H = L[0] !== "[ ] ", h = h.replace(this.rules.other.listReplaceTask, ""))), s.items.push({ type: "list_item", raw: a, task: !!L, checked: H, loose: !1, text: h, tokens: [] }), s.raw += a;
599
610
  }
600
611
  let n = s.items.at(-1);
601
612
  if (n) n.raw = n.raw.trimEnd(), n.text = n.text.trimEnd();
@@ -624,12 +635,12 @@ ${h}` : h;
624
635
  var l;
625
636
  let e = this.rules.block.table.exec(o);
626
637
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
627
- let t = Vi(e[1]), i = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (l = e[3]) != null && l.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
638
+ let t = qi(e[1]), i = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (l = e[3]) != null && l.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
628
639
  `) : [], r = { type: "table", raw: e[0], header: [], align: [], rows: [] };
629
640
  if (t.length === i.length) {
630
641
  for (let n of i) this.rules.other.tableAlignRight.test(n) ? r.align.push("right") : this.rules.other.tableAlignCenter.test(n) ? r.align.push("center") : this.rules.other.tableAlignLeft.test(n) ? r.align.push("left") : r.align.push(null);
631
642
  for (let n = 0; n < t.length; n++) r.header.push({ text: t[n], tokens: this.lexer.inline(t[n]), header: !0, align: r.align[n] });
632
- for (let n of s) r.rows.push(Vi(n, r.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: !1, align: r.align[a] })));
643
+ for (let n of s) r.rows.push(qi(n, r.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: !1, align: r.align[a] })));
633
644
  return r;
634
645
  }
635
646
  }
@@ -666,7 +677,7 @@ ${h}` : h;
666
677
  let r = Xe(t.slice(0, -1), "\\");
667
678
  if ((t.length - r.length) % 2 === 0) return;
668
679
  } else {
669
- let r = qr(e[2], "()");
680
+ let r = jr(e[2], "()");
670
681
  if (r === -2) return;
671
682
  if (r > -1) {
672
683
  let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + r;
@@ -678,7 +689,7 @@ ${h}` : h;
678
689
  let r = this.rules.other.pedanticHrefTitle.exec(i);
679
690
  r && (i = r[1], s = r[3]);
680
691
  } else s = e[3] ? e[3].slice(1, -1) : "";
681
- return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? i = i.slice(1) : i = i.slice(1, -1)), qi(e, { href: i && i.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
692
+ return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? i = i.slice(1) : i = i.slice(1, -1)), ji(e, { href: i && i.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
682
693
  }
683
694
  }
684
695
  reflink(o, e) {
@@ -689,7 +700,7 @@ ${h}` : h;
689
700
  let r = t[0].charAt(0);
690
701
  return { type: "text", raw: r, text: r };
691
702
  }
692
- return qi(t, s, t[0], this.lexer, this.rules);
703
+ return ji(t, s, t[0], this.lexer, this.rules);
693
704
  }
694
705
  }
695
706
  emStrong(o, e, t = "") {
@@ -709,8 +720,8 @@ ${h}` : h;
709
720
  l = Math.min(l, l + n + u);
710
721
  let h = [...i[0]][0].length, p = o.slice(0, s + i.index + h + l);
711
722
  if (Math.min(s, l) % 2) {
712
- let m = p.slice(1, -1);
713
- return { type: "em", raw: p, text: m, tokens: this.lexer.inlineTokens(m) };
723
+ let _ = p.slice(1, -1);
724
+ return { type: "em", raw: p, text: _, tokens: this.lexer.inlineTokens(_) };
714
725
  }
715
726
  let d = p.slice(2, -2);
716
727
  return { type: "strong", raw: p, text: d, tokens: this.lexer.inlineTokens(d) };
@@ -762,25 +773,25 @@ ${h}` : h;
762
773
  return { type: "text", raw: e[0], text: e[0], escaped: t };
763
774
  }
764
775
  }
765
- }, ke = class ei {
776
+ }, Re = class si {
766
777
  constructor(e) {
767
- B(this, "tokens");
768
- B(this, "options");
769
- B(this, "state");
770
- B(this, "tokenizer");
771
- B(this, "inlineQueue");
772
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Me, this.options.tokenizer = this.options.tokenizer || new Et(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
773
- let t = { other: se, block: ft.normal, inline: Ye.normal };
774
- this.options.pedantic ? (t.block = ft.pedantic, t.inline = Ye.pedantic) : this.options.gfm && (t.block = ft.gfm, this.options.breaks ? t.inline = Ye.breaks : t.inline = Ye.gfm), this.tokenizer.rules = t;
778
+ O(this, "tokens");
779
+ O(this, "options");
780
+ O(this, "state");
781
+ O(this, "tokenizer");
782
+ O(this, "inlineQueue");
783
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Ie, 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 };
784
+ let t = { other: se, block: mt.normal, inline: Ye.normal };
785
+ 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;
775
786
  }
776
787
  static get rules() {
777
- return { block: ft, inline: Ye };
788
+ return { block: mt, inline: Ye };
778
789
  }
779
790
  static lex(e, t) {
780
- return new ei(t).lex(e);
791
+ return new si(t).lex(e);
781
792
  }
782
793
  static lexInline(e, t) {
783
- return new ei(t).inlineTokens(e);
794
+ return new si(t).inlineTokens(e);
784
795
  }
785
796
  lex(e) {
786
797
  e = e.replace(se.carriageReturn, `
@@ -948,9 +959,9 @@ ${h}` : h;
948
959
  }
949
960
  let p = e;
950
961
  if ((a = this.options.extensions) != null && a.startInline) {
951
- let d = 1 / 0, m = e.slice(1), v;
952
- this.options.extensions.startInline.forEach((N) => {
953
- v = N.call({ lexer: this }, m), typeof v == "number" && v >= 0 && (d = Math.min(d, v));
962
+ let d = 1 / 0, _ = e.slice(1), v;
963
+ this.options.extensions.startInline.forEach((L) => {
964
+ v = L.call({ lexer: this }, _), typeof v == "number" && v >= 0 && (d = Math.min(d, v));
954
965
  }), d < 1 / 0 && d >= 0 && (p = e.substring(0, d + 1));
955
966
  }
956
967
  if (h = this.tokenizer.inlineText(p)) {
@@ -969,11 +980,11 @@ ${h}` : h;
969
980
  }
970
981
  return t;
971
982
  }
972
- }, Tt = class {
983
+ }, Rt = class {
973
984
  constructor(o) {
974
- B(this, "options");
975
- B(this, "parser");
976
- this.options = o || Me;
985
+ O(this, "options");
986
+ O(this, "parser");
987
+ this.options = o || Ie;
977
988
  }
978
989
  space(o) {
979
990
  return "";
@@ -982,8 +993,8 @@ ${h}` : h;
982
993
  var r;
983
994
  let i = (r = (e || "").match(se.notSpaceStart)) == null ? void 0 : r[0], s = o.replace(se.endingNewline, "") + `
984
995
  `;
985
- return i ? '<pre><code class="language-' + ge(i) + '">' + (t ? s : ge(s, !0)) + `</code></pre>
986
- ` : "<pre><code>" + (t ? s : ge(s, !0)) + `</code></pre>
996
+ return i ? '<pre><code class="language-' + ye(i) + '">' + (t ? s : ye(s, !0)) + `</code></pre>
997
+ ` : "<pre><code>" + (t ? s : ye(s, !0)) + `</code></pre>
987
998
  `;
988
999
  }
989
1000
  blockquote({ tokens: o }) {
@@ -1021,7 +1032,7 @@ ${this.parser.parse(o)}</blockquote>
1021
1032
  let e = "";
1022
1033
  if (o.task) {
1023
1034
  let i = this.checkbox({ checked: !!o.checked });
1024
- o.loose ? ((t = o.tokens[0]) == null ? void 0 : t.type) === "paragraph" ? (o.tokens[0].text = i + " " + o.tokens[0].text, o.tokens[0].tokens && o.tokens[0].tokens.length > 0 && o.tokens[0].tokens[0].type === "text" && (o.tokens[0].tokens[0].text = i + " " + ge(o.tokens[0].tokens[0].text), o.tokens[0].tokens[0].escaped = !0)) : o.tokens.unshift({ type: "text", raw: i + " ", text: i + " ", escaped: !0 }) : e += i + " ";
1035
+ o.loose ? ((t = o.tokens[0]) == null ? void 0 : t.type) === "paragraph" ? (o.tokens[0].text = i + " " + o.tokens[0].text, o.tokens[0].tokens && o.tokens[0].tokens.length > 0 && o.tokens[0].tokens[0].type === "text" && (o.tokens[0].tokens[0].text = i + " " + ye(o.tokens[0].tokens[0].text), o.tokens[0].tokens[0].escaped = !0)) : o.tokens.unshift({ type: "text", raw: i + " ", text: i + " ", escaped: !0 }) : e += i + " ";
1025
1036
  }
1026
1037
  return e += this.parser.parse(o.tokens, !!o.loose), `<li>${e}</li>
1027
1038
  `;
@@ -1067,7 +1078,7 @@ ${o}</tr>
1067
1078
  return `<em>${this.parser.parseInline(o)}</em>`;
1068
1079
  }
1069
1080
  codespan({ text: o }) {
1070
- return `<code>${ge(o, !0)}</code>`;
1081
+ return `<code>${ye(o, !0)}</code>`;
1071
1082
  }
1072
1083
  br(o) {
1073
1084
  return "<br>";
@@ -1076,24 +1087,24 @@ ${o}</tr>
1076
1087
  return `<del>${this.parser.parseInline(o)}</del>`;
1077
1088
  }
1078
1089
  link({ href: o, title: e, tokens: t }) {
1079
- let i = this.parser.parseInline(t), s = Gi(o);
1090
+ let i = this.parser.parseInline(t), s = Vi(o);
1080
1091
  if (s === null) return i;
1081
1092
  o = s;
1082
1093
  let r = '<a href="' + o + '"';
1083
- return e && (r += ' title="' + ge(e) + '"'), r += ">" + i + "</a>", r;
1094
+ return e && (r += ' title="' + ye(e) + '"'), r += ">" + i + "</a>", r;
1084
1095
  }
1085
1096
  image({ href: o, title: e, text: t, tokens: i }) {
1086
1097
  i && (t = this.parser.parseInline(i, this.parser.textRenderer));
1087
- let s = Gi(o);
1088
- if (s === null) return ge(t);
1098
+ let s = Vi(o);
1099
+ if (s === null) return ye(t);
1089
1100
  o = s;
1090
1101
  let r = `<img src="${o}" alt="${t}"`;
1091
- return e && (r += ` title="${ge(e)}"`), r += ">", r;
1102
+ return e && (r += ` title="${ye(e)}"`), r += ">", r;
1092
1103
  }
1093
1104
  text(o) {
1094
- return "tokens" in o && o.tokens ? this.parser.parseInline(o.tokens) : "escaped" in o && o.escaped ? o.text : ge(o.text);
1105
+ return "tokens" in o && o.tokens ? this.parser.parseInline(o.tokens) : "escaped" in o && o.escaped ? o.text : ye(o.text);
1095
1106
  }
1096
- }, pi = class {
1107
+ }, mi = class {
1097
1108
  strong({ text: o }) {
1098
1109
  return o;
1099
1110
  }
@@ -1121,18 +1132,18 @@ ${o}</tr>
1121
1132
  br() {
1122
1133
  return "";
1123
1134
  }
1124
- }, Ee = class ti {
1135
+ }, Se = class ri {
1125
1136
  constructor(e) {
1126
- B(this, "options");
1127
- B(this, "renderer");
1128
- B(this, "textRenderer");
1129
- this.options = e || Me, this.options.renderer = this.options.renderer || new Tt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new pi();
1137
+ O(this, "options");
1138
+ O(this, "renderer");
1139
+ O(this, "textRenderer");
1140
+ this.options = e || Ie, this.options.renderer = this.options.renderer || new Rt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new mi();
1130
1141
  }
1131
1142
  static parse(e, t) {
1132
- return new ti(t).parse(e);
1143
+ return new ri(t).parse(e);
1133
1144
  }
1134
1145
  static parseInline(e, t) {
1135
- return new ti(t).parseInline(e);
1146
+ return new ri(t).parseInline(e);
1136
1147
  }
1137
1148
  parse(e, t = !0) {
1138
1149
  var s, r;
@@ -1267,11 +1278,11 @@ ${o}</tr>
1267
1278
  }
1268
1279
  return i;
1269
1280
  }
1270
- }, Qt, yt = (Qt = class {
1281
+ }, ei, bt = (ei = class {
1271
1282
  constructor(o) {
1272
- B(this, "options");
1273
- B(this, "block");
1274
- this.options = o || Me;
1283
+ O(this, "options");
1284
+ O(this, "block");
1285
+ this.options = o || Ie;
1275
1286
  }
1276
1287
  preprocess(o) {
1277
1288
  return o;
@@ -1283,23 +1294,23 @@ ${o}</tr>
1283
1294
  return o;
1284
1295
  }
1285
1296
  provideLexer() {
1286
- return this.block ? ke.lex : ke.lexInline;
1297
+ return this.block ? Re.lex : Re.lexInline;
1287
1298
  }
1288
1299
  provideParser() {
1289
- return this.block ? Ee.parse : Ee.parseInline;
1300
+ return this.block ? Se.parse : Se.parseInline;
1290
1301
  }
1291
- }, B(Qt, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Qt), Yr = class {
1302
+ }, O(ei, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ei), Xr = class {
1292
1303
  constructor(...o) {
1293
- B(this, "defaults", ni());
1294
- B(this, "options", this.setOptions);
1295
- B(this, "parse", this.parseMarkdown(!0));
1296
- B(this, "parseInline", this.parseMarkdown(!1));
1297
- B(this, "Parser", Ee);
1298
- B(this, "Renderer", Tt);
1299
- B(this, "TextRenderer", pi);
1300
- B(this, "Lexer", ke);
1301
- B(this, "Tokenizer", Et);
1302
- B(this, "Hooks", yt);
1304
+ O(this, "defaults", ai());
1305
+ O(this, "options", this.setOptions);
1306
+ O(this, "parse", this.parseMarkdown(!0));
1307
+ O(this, "parseInline", this.parseMarkdown(!1));
1308
+ O(this, "Parser", Se);
1309
+ O(this, "Renderer", Rt);
1310
+ O(this, "TextRenderer", mi);
1311
+ O(this, "Lexer", Re);
1312
+ O(this, "Tokenizer", Tt);
1313
+ O(this, "Hooks", bt);
1303
1314
  this.use(...o);
1304
1315
  }
1305
1316
  walkTokens(o, e) {
@@ -1347,7 +1358,7 @@ ${o}</tr>
1347
1358
  }
1348
1359
  "childTokens" in s && s.childTokens && (e.childTokens[s.name] = s.childTokens);
1349
1360
  }), i.extensions = e), t.renderer) {
1350
- let s = this.defaults.renderer || new Tt(this.defaults);
1361
+ let s = this.defaults.renderer || new Rt(this.defaults);
1351
1362
  for (let r in t.renderer) {
1352
1363
  if (!(r in s)) throw new Error(`renderer '${r}' does not exist`);
1353
1364
  if (["options", "parser"].includes(r)) continue;
@@ -1360,7 +1371,7 @@ ${o}</tr>
1360
1371
  i.renderer = s;
1361
1372
  }
1362
1373
  if (t.tokenizer) {
1363
- let s = this.defaults.tokenizer || new Et(this.defaults);
1374
+ let s = this.defaults.tokenizer || new Tt(this.defaults);
1364
1375
  for (let r in t.tokenizer) {
1365
1376
  if (!(r in s)) throw new Error(`tokenizer '${r}' does not exist`);
1366
1377
  if (["options", "rules", "lexer"].includes(r)) continue;
@@ -1373,12 +1384,12 @@ ${o}</tr>
1373
1384
  i.tokenizer = s;
1374
1385
  }
1375
1386
  if (t.hooks) {
1376
- let s = this.defaults.hooks || new yt();
1387
+ let s = this.defaults.hooks || new bt();
1377
1388
  for (let r in t.hooks) {
1378
1389
  if (!(r in s)) throw new Error(`hook '${r}' does not exist`);
1379
1390
  if (["options", "block"].includes(r)) continue;
1380
1391
  let l = r, n = t.hooks[l], u = s[l];
1381
- yt.passThroughHooks.has(r) ? s[l] = (a) => {
1392
+ bt.passThroughHooks.has(r) ? s[l] = (a) => {
1382
1393
  if (this.defaults.async) return Promise.resolve(n.call(s, a)).then((p) => u.call(s, p));
1383
1394
  let h = n.call(s, a);
1384
1395
  return u.call(s, h);
@@ -1403,10 +1414,10 @@ ${o}</tr>
1403
1414
  return this.defaults = { ...this.defaults, ...o }, this;
1404
1415
  }
1405
1416
  lexer(o, e) {
1406
- return ke.lex(o, e ?? this.defaults);
1417
+ return Re.lex(o, e ?? this.defaults);
1407
1418
  }
1408
1419
  parser(o, e) {
1409
- return Ee.parse(o, e ?? this.defaults);
1420
+ return Se.parse(o, e ?? this.defaults);
1410
1421
  }
1411
1422
  parseMarkdown(o) {
1412
1423
  return (e, t) => {
@@ -1415,7 +1426,7 @@ ${o}</tr>
1415
1426
  if (typeof e > "u" || e === null) return r(new Error("marked(): input parameter is undefined or null"));
1416
1427
  if (typeof e != "string") return r(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
1417
1428
  s.hooks && (s.hooks.options = s, s.hooks.block = o);
1418
- let l = s.hooks ? s.hooks.provideLexer() : o ? ke.lex : ke.lexInline, n = s.hooks ? s.hooks.provideParser() : o ? Ee.parse : Ee.parseInline;
1429
+ let l = s.hooks ? s.hooks.provideLexer() : o ? Re.lex : Re.lexInline, n = s.hooks ? s.hooks.provideParser() : o ? Se.parse : Se.parseInline;
1419
1430
  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);
1420
1431
  try {
1421
1432
  s.hooks && (e = s.hooks.preprocess(e));
@@ -1432,149 +1443,149 @@ ${o}</tr>
1432
1443
  return (t) => {
1433
1444
  if (t.message += `
1434
1445
  Please report this to https://github.com/markedjs/marked.`, o) {
1435
- let i = "<p>An error occurred:</p><pre>" + ge(t.message + "", !0) + "</pre>";
1446
+ let i = "<p>An error occurred:</p><pre>" + ye(t.message + "", !0) + "</pre>";
1436
1447
  return e ? Promise.resolve(i) : i;
1437
1448
  }
1438
1449
  if (e) return Promise.reject(t);
1439
1450
  throw t;
1440
1451
  };
1441
1452
  }
1442
- }, ze = new Yr();
1443
- function I(o, e) {
1444
- return ze.parse(o, e);
1453
+ }, Ne = new Xr();
1454
+ function M(o, e) {
1455
+ return Ne.parse(o, e);
1445
1456
  }
1446
- I.options = I.setOptions = function(o) {
1447
- return ze.setOptions(o), I.defaults = ze.defaults, us(I.defaults), I;
1457
+ M.options = M.setOptions = function(o) {
1458
+ return Ne.setOptions(o), M.defaults = Ne.defaults, cs(M.defaults), M;
1448
1459
  };
1449
- I.getDefaults = ni;
1450
- I.defaults = Me;
1451
- I.use = function(...o) {
1452
- return ze.use(...o), I.defaults = ze.defaults, us(I.defaults), I;
1460
+ M.getDefaults = ai;
1461
+ M.defaults = Ie;
1462
+ M.use = function(...o) {
1463
+ return Ne.use(...o), M.defaults = Ne.defaults, cs(M.defaults), M;
1453
1464
  };
1454
- I.walkTokens = function(o, e) {
1455
- return ze.walkTokens(o, e);
1465
+ M.walkTokens = function(o, e) {
1466
+ return Ne.walkTokens(o, e);
1456
1467
  };
1457
- I.parseInline = ze.parseInline;
1458
- I.Parser = Ee;
1459
- I.parser = Ee.parse;
1460
- I.Renderer = Tt;
1461
- I.TextRenderer = pi;
1462
- I.Lexer = ke;
1463
- I.lexer = ke.lex;
1464
- I.Tokenizer = Et;
1465
- I.Hooks = yt;
1466
- I.parse = I;
1467
- I.options;
1468
- I.setOptions;
1469
- I.use;
1470
- I.walkTokens;
1471
- I.parseInline;
1472
- Ee.parse;
1473
- ke.lex;
1468
+ M.parseInline = Ne.parseInline;
1469
+ M.Parser = Se;
1470
+ M.parser = Se.parse;
1471
+ M.Renderer = Rt;
1472
+ M.TextRenderer = mi;
1473
+ M.Lexer = Re;
1474
+ M.lexer = Re.lex;
1475
+ M.Tokenizer = Tt;
1476
+ M.Hooks = bt;
1477
+ M.parse = M;
1478
+ M.options;
1479
+ M.setOptions;
1480
+ M.use;
1481
+ M.walkTokens;
1482
+ M.parseInline;
1483
+ Se.parse;
1484
+ Re.lex;
1474
1485
  /*! @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 */
1475
1486
  const {
1476
- entries: ws,
1477
- setPrototypeOf: ji,
1478
- isFrozen: Xr,
1479
- getPrototypeOf: Kr,
1480
- getOwnPropertyDescriptor: Zr
1487
+ entries: xs,
1488
+ setPrototypeOf: Yi,
1489
+ isFrozen: Kr,
1490
+ getPrototypeOf: Zr,
1491
+ getOwnPropertyDescriptor: Qr
1481
1492
  } = Object;
1482
1493
  let {
1483
1494
  freeze: re,
1484
- seal: ce,
1485
- create: xs
1495
+ seal: de,
1496
+ create: ks
1486
1497
  } = Object, {
1487
- apply: ii,
1488
- construct: si
1498
+ apply: ni,
1499
+ construct: oi
1489
1500
  } = typeof Reflect < "u" && Reflect;
1490
1501
  re || (re = function(e) {
1491
1502
  return e;
1492
1503
  });
1493
- ce || (ce = function(e) {
1504
+ de || (de = function(e) {
1494
1505
  return e;
1495
1506
  });
1496
- ii || (ii = function(e, t, i) {
1507
+ ni || (ni = function(e, t, i) {
1497
1508
  return e.apply(t, i);
1498
1509
  });
1499
- si || (si = function(e, t) {
1510
+ oi || (oi = function(e, t) {
1500
1511
  return new e(...t);
1501
1512
  });
1502
- const gt = ne(Array.prototype.forEach), Qr = ne(Array.prototype.lastIndexOf), Yi = ne(Array.prototype.pop), Ke = ne(Array.prototype.push), Jr = ne(Array.prototype.splice), bt = ne(String.prototype.toLowerCase), jt = ne(String.prototype.toString), Xi = ne(String.prototype.match), Ze = ne(String.prototype.replace), en = ne(String.prototype.indexOf), tn = ne(String.prototype.trim), de = ne(Object.prototype.hasOwnProperty), te = ne(RegExp.prototype.test), Qe = sn(TypeError);
1513
+ const _t = ne(Array.prototype.forEach), Jr = ne(Array.prototype.lastIndexOf), Xi = ne(Array.prototype.pop), Ke = ne(Array.prototype.push), en = ne(Array.prototype.splice), vt = ne(String.prototype.toLowerCase), Xt = ne(String.prototype.toString), Ki = ne(String.prototype.match), Ze = ne(String.prototype.replace), tn = ne(String.prototype.indexOf), sn = ne(String.prototype.trim), fe = ne(Object.prototype.hasOwnProperty), te = ne(RegExp.prototype.test), Qe = rn(TypeError);
1503
1514
  function ne(o) {
1504
1515
  return function(e) {
1505
1516
  e instanceof RegExp && (e.lastIndex = 0);
1506
1517
  for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
1507
1518
  i[s - 1] = arguments[s];
1508
- return ii(o, e, i);
1519
+ return ni(o, e, i);
1509
1520
  };
1510
1521
  }
1511
- function sn(o) {
1522
+ function rn(o) {
1512
1523
  return function() {
1513
1524
  for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
1514
1525
  t[i] = arguments[i];
1515
- return si(o, t);
1526
+ return oi(o, t);
1516
1527
  };
1517
1528
  }
1518
- function D(o, e) {
1519
- let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : bt;
1520
- ji && ji(o, null);
1529
+ function A(o, e) {
1530
+ let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : vt;
1531
+ Yi && Yi(o, null);
1521
1532
  let i = e.length;
1522
1533
  for (; i--; ) {
1523
1534
  let s = e[i];
1524
1535
  if (typeof s == "string") {
1525
1536
  const r = t(s);
1526
- r !== s && (Xr(e) || (e[i] = r), s = r);
1537
+ r !== s && (Kr(e) || (e[i] = r), s = r);
1527
1538
  }
1528
1539
  o[s] = !0;
1529
1540
  }
1530
1541
  return o;
1531
1542
  }
1532
- function rn(o) {
1543
+ function nn(o) {
1533
1544
  for (let e = 0; e < o.length; e++)
1534
- de(o, e) || (o[e] = null);
1545
+ fe(o, e) || (o[e] = null);
1535
1546
  return o;
1536
1547
  }
1537
- function xe(o) {
1538
- const e = xs(null);
1539
- for (const [t, i] of ws(o))
1540
- de(o, t) && (Array.isArray(i) ? e[t] = rn(i) : i && typeof i == "object" && i.constructor === Object ? e[t] = xe(i) : e[t] = i);
1548
+ function Te(o) {
1549
+ const e = ks(null);
1550
+ for (const [t, i] of xs(o))
1551
+ fe(o, t) && (Array.isArray(i) ? e[t] = nn(i) : i && typeof i == "object" && i.constructor === Object ? e[t] = Te(i) : e[t] = i);
1541
1552
  return e;
1542
1553
  }
1543
1554
  function Je(o, e) {
1544
1555
  for (; o !== null; ) {
1545
- const i = Zr(o, e);
1556
+ const i = Qr(o, e);
1546
1557
  if (i) {
1547
1558
  if (i.get)
1548
1559
  return ne(i.get);
1549
1560
  if (typeof i.value == "function")
1550
1561
  return ne(i.value);
1551
1562
  }
1552
- o = Kr(o);
1563
+ o = Zr(o);
1553
1564
  }
1554
1565
  function t() {
1555
1566
  return null;
1556
1567
  }
1557
1568
  return t;
1558
1569
  }
1559
- const Ki = re(["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"]), Yt = re(["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"]), Xt = re(["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"]), nn = re(["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"]), Kt = re(["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"]), on = re(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Zi = re(["#text"]), Qi = re(["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 = re(["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"]), Ji = re(["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"]), mt = re(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ln = ce(/\{\{[\w\W]*|[\w\W]*\}\}/gm), an = ce(/<%[\w\W]*|[\w\W]*%>/gm), hn = ce(/\$\{[\w\W]*/gm), un = ce(/^data-[\-\w.\u00B7-\uFFFF]+$/), cn = ce(/^aria-[\-\w]+$/), ks = ce(
1570
+ const Zi = re(["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"]), Kt = re(["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"]), Zt = re(["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"]), on = re(["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"]), Qt = re(["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"]), ln = re(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Qi = re(["#text"]), Ji = re(["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"]), Jt = re(["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"]), es = re(["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 = re(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), an = de(/\{\{[\w\W]*|[\w\W]*\}\}/gm), hn = de(/<%[\w\W]*|[\w\W]*%>/gm), un = de(/\$\{[\w\W]*/gm), cn = de(/^data-[\-\w.\u00B7-\uFFFF]+$/), dn = de(/^aria-[\-\w]+$/), Es = de(
1560
1571
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
1561
1572
  // eslint-disable-line no-useless-escape
1562
- ), dn = ce(/^(?:\w+script|data):/i), pn = ce(
1573
+ ), pn = de(/^(?:\w+script|data):/i), fn = de(
1563
1574
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
1564
1575
  // eslint-disable-line no-control-regex
1565
- ), Es = ce(/^html$/i), fn = ce(/^[a-z][.\w]*(-[.\w]+)+$/i);
1566
- var es = /* @__PURE__ */ Object.freeze({
1576
+ ), Ts = de(/^html$/i), gn = de(/^[a-z][.\w]*(-[.\w]+)+$/i);
1577
+ var ts = /* @__PURE__ */ Object.freeze({
1567
1578
  __proto__: null,
1568
- ARIA_ATTR: cn,
1569
- ATTR_WHITESPACE: pn,
1570
- CUSTOM_ELEMENT: fn,
1571
- DATA_ATTR: un,
1572
- DOCTYPE_NAME: Es,
1573
- ERB_EXPR: an,
1574
- IS_ALLOWED_URI: ks,
1575
- IS_SCRIPT_OR_DATA: dn,
1576
- MUSTACHE_EXPR: ln,
1577
- TMPLIT_EXPR: hn
1579
+ ARIA_ATTR: dn,
1580
+ ATTR_WHITESPACE: fn,
1581
+ CUSTOM_ELEMENT: gn,
1582
+ DATA_ATTR: cn,
1583
+ DOCTYPE_NAME: Ts,
1584
+ ERB_EXPR: hn,
1585
+ IS_ALLOWED_URI: Es,
1586
+ IS_SCRIPT_OR_DATA: pn,
1587
+ MUSTACHE_EXPR: an,
1588
+ TMPLIT_EXPR: un
1578
1589
  });
1579
1590
  const et = {
1580
1591
  element: 1,
@@ -1583,9 +1594,9 @@ const et = {
1583
1594
  progressingInstruction: 7,
1584
1595
  comment: 8,
1585
1596
  document: 9
1586
- }, gn = function() {
1597
+ }, mn = function() {
1587
1598
  return typeof window > "u" ? null : window;
1588
- }, mn = function(e, t) {
1599
+ }, _n = function(e, t) {
1589
1600
  if (typeof e != "object" || typeof e.createPolicy != "function")
1590
1601
  return null;
1591
1602
  let i = null;
@@ -1604,7 +1615,7 @@ const et = {
1604
1615
  } catch {
1605
1616
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
1606
1617
  }
1607
- }, ts = function() {
1618
+ }, is = function() {
1608
1619
  return {
1609
1620
  afterSanitizeAttributes: [],
1610
1621
  afterSanitizeElements: [],
@@ -1617,9 +1628,9 @@ const et = {
1617
1628
  uponSanitizeShadowNode: []
1618
1629
  };
1619
1630
  };
1620
- function Ts() {
1621
- let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gn();
1622
- const e = (w) => Ts(w);
1631
+ function Rs() {
1632
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : mn();
1633
+ const e = (w) => Rs(w);
1623
1634
  if (e.version = "3.2.6", e.removed = [], !o || !o.document || o.document.nodeType !== et.document || !o.Element)
1624
1635
  return e.isSupported = !1, e;
1625
1636
  let {
@@ -1634,40 +1645,40 @@ function Ts() {
1634
1645
  NamedNodeMap: h = o.NamedNodeMap || o.MozNamedAttrMap,
1635
1646
  HTMLFormElement: p,
1636
1647
  DOMParser: d,
1637
- trustedTypes: m
1638
- } = o, v = u.prototype, N = Je(v, "cloneNode"), O = Je(v, "remove"), A = Je(v, "nextSibling"), L = Je(v, "childNodes"), S = Je(v, "parentNode");
1648
+ trustedTypes: _
1649
+ } = o, v = u.prototype, L = Je(v, "cloneNode"), H = Je(v, "remove"), C = Je(v, "nextSibling"), D = Je(v, "childNodes"), S = Je(v, "parentNode");
1639
1650
  if (typeof l == "function") {
1640
1651
  const w = t.createElement("template");
1641
1652
  w.content && w.content.ownerDocument && (t = w.content.ownerDocument);
1642
1653
  }
1643
- let _, y = "";
1654
+ let m, y = "";
1644
1655
  const {
1645
1656
  implementation: P,
1646
- createNodeIterator: $,
1647
- createDocumentFragment: C,
1648
- getElementsByTagName: k
1657
+ createNodeIterator: U,
1658
+ createDocumentFragment: pe,
1659
+ getElementsByTagName: me
1649
1660
  } = t, {
1650
- importNode: R
1661
+ importNode: N
1651
1662
  } = i;
1652
- let z = ts();
1653
- e.isSupported = typeof ws == "function" && typeof S == "function" && P && P.createHTMLDocument !== void 0;
1663
+ let x = is();
1664
+ e.isSupported = typeof xs == "function" && typeof S == "function" && P && P.createHTMLDocument !== void 0;
1654
1665
  const {
1655
- MUSTACHE_EXPR: Q,
1656
- ERB_EXPR: Re,
1657
- TMPLIT_EXPR: Se,
1658
- DATA_ATTR: Ie,
1659
- ARIA_ATTR: Mt,
1660
- IS_SCRIPT_OR_DATA: It,
1661
- ATTR_WHITESPACE: mi,
1662
- CUSTOM_ELEMENT: Ss
1663
- } = es;
1666
+ MUSTACHE_EXPR: E,
1667
+ ERB_EXPR: K,
1668
+ TMPLIT_EXPR: W,
1669
+ DATA_ATTR: oe,
1670
+ ARIA_ATTR: It,
1671
+ IS_SCRIPT_OR_DATA: Ht,
1672
+ ATTR_WHITESPACE: lt,
1673
+ CUSTOM_ELEMENT: Ot
1674
+ } = ts;
1664
1675
  let {
1665
- IS_ALLOWED_URI: _i
1666
- } = es, j = null;
1667
- const yi = D({}, [...Ki, ...Yt, ...Xt, ...Kt, ...Zi]);
1668
- let K = null;
1669
- const bi = D({}, [...Qi, ...Zt, ...Ji, ...mt]);
1670
- let G = Object.seal(xs(null, {
1676
+ IS_ALLOWED_URI: at
1677
+ } = ts, j = null;
1678
+ const bi = A({}, [...Zi, ...Kt, ...Zt, ...Qt, ...Qi]);
1679
+ let Z = null;
1680
+ const vi = A({}, [...Ji, ...Jt, ...es, ...yt]);
1681
+ let G = Object.seal(ks(null, {
1671
1682
  tagNameCheck: {
1672
1683
  writable: !0,
1673
1684
  configurable: !1,
@@ -1686,53 +1697,53 @@ function Ts() {
1686
1697
  enumerable: !0,
1687
1698
  value: !1
1688
1699
  }
1689
- })), Ge = null, Ht = null, vi = !0, Ot = !0, wi = !1, xi = !0, He = !1, lt = !0, Ae = !1, Pt = !1, $t = !1, Oe = !1, at = !1, ht = !1, ki = !0, Ei = !1;
1700
+ })), Ge = null, Pt = null, wi = !0, $t = !0, xi = !1, ki = !0, He = !1, ht = !0, De = !1, Bt = !1, Ut = !1, Oe = !1, ut = !1, ct = !1, Ei = !0, Ti = !1;
1690
1701
  const Cs = "user-content-";
1691
- let Bt = !0, Ve = !1, Pe = {}, $e = null;
1692
- const Ti = D({}, ["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"]);
1693
- let Ri = null;
1694
- const Si = D({}, ["audio", "video", "img", "source", "image", "track"]);
1695
- let Ut = null;
1696
- const Ci = D({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ut = "http://www.w3.org/1998/Math/MathML", ct = "http://www.w3.org/2000/svg", be = "http://www.w3.org/1999/xhtml";
1697
- let Be = be, Ft = !1, Wt = null;
1698
- const As = D({}, [ut, ct, be], jt);
1699
- let dt = D({}, ["mi", "mo", "mn", "ms", "mtext"]), pt = D({}, ["annotation-xml"]);
1700
- const Ds = D({}, ["title", "style", "font", "a", "script"]);
1702
+ let Ft = !0, Ve = !1, Pe = {}, $e = null;
1703
+ const Ri = A({}, ["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"]);
1704
+ let Si = null;
1705
+ const Ci = A({}, ["audio", "video", "img", "source", "image", "track"]);
1706
+ let Wt = null;
1707
+ const Ai = A({}, ["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", xe = "http://www.w3.org/1999/xhtml";
1708
+ let Be = xe, Gt = !1, Vt = null;
1709
+ const As = A({}, [dt, pt, xe], Xt);
1710
+ let ft = A({}, ["mi", "mo", "mn", "ms", "mtext"]), gt = A({}, ["annotation-xml"]);
1711
+ const Ds = A({}, ["title", "style", "font", "a", "script"]);
1701
1712
  let qe = null;
1702
1713
  const Ls = ["application/xhtml+xml", "text/html"], zs = "text/html";
1703
1714
  let Y = null, Ue = null;
1704
- const Ns = t.createElement("form"), Ai = function(c) {
1715
+ const Ns = t.createElement("form"), Di = function(c) {
1705
1716
  return c instanceof RegExp || c instanceof Function;
1706
- }, Gt = function() {
1717
+ }, qt = function() {
1707
1718
  let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1708
1719
  if (!(Ue && Ue === c)) {
1709
- if ((!c || typeof c != "object") && (c = {}), c = xe(c), qe = // eslint-disable-next-line unicorn/prefer-includes
1710
- Ls.indexOf(c.PARSER_MEDIA_TYPE) === -1 ? zs : c.PARSER_MEDIA_TYPE, Y = qe === "application/xhtml+xml" ? jt : bt, j = de(c, "ALLOWED_TAGS") ? D({}, c.ALLOWED_TAGS, Y) : yi, K = de(c, "ALLOWED_ATTR") ? D({}, c.ALLOWED_ATTR, Y) : bi, Wt = de(c, "ALLOWED_NAMESPACES") ? D({}, c.ALLOWED_NAMESPACES, jt) : As, Ut = de(c, "ADD_URI_SAFE_ATTR") ? D(xe(Ci), c.ADD_URI_SAFE_ATTR, Y) : Ci, Ri = de(c, "ADD_DATA_URI_TAGS") ? D(xe(Si), c.ADD_DATA_URI_TAGS, Y) : Si, $e = de(c, "FORBID_CONTENTS") ? D({}, c.FORBID_CONTENTS, Y) : Ti, Ge = de(c, "FORBID_TAGS") ? D({}, c.FORBID_TAGS, Y) : xe({}), Ht = de(c, "FORBID_ATTR") ? D({}, c.FORBID_ATTR, Y) : xe({}), Pe = de(c, "USE_PROFILES") ? c.USE_PROFILES : !1, vi = c.ALLOW_ARIA_ATTR !== !1, Ot = c.ALLOW_DATA_ATTR !== !1, wi = c.ALLOW_UNKNOWN_PROTOCOLS || !1, xi = c.ALLOW_SELF_CLOSE_IN_ATTR !== !1, He = c.SAFE_FOR_TEMPLATES || !1, lt = c.SAFE_FOR_XML !== !1, Ae = c.WHOLE_DOCUMENT || !1, Oe = c.RETURN_DOM || !1, at = c.RETURN_DOM_FRAGMENT || !1, ht = c.RETURN_TRUSTED_TYPE || !1, $t = c.FORCE_BODY || !1, ki = c.SANITIZE_DOM !== !1, Ei = c.SANITIZE_NAMED_PROPS || !1, Bt = c.KEEP_CONTENT !== !1, Ve = c.IN_PLACE || !1, _i = c.ALLOWED_URI_REGEXP || ks, Be = c.NAMESPACE || be, dt = c.MATHML_TEXT_INTEGRATION_POINTS || dt, pt = c.HTML_INTEGRATION_POINTS || pt, G = c.CUSTOM_ELEMENT_HANDLING || {}, c.CUSTOM_ELEMENT_HANDLING && Ai(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (G.tagNameCheck = c.CUSTOM_ELEMENT_HANDLING.tagNameCheck), c.CUSTOM_ELEMENT_HANDLING && Ai(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (G.attributeNameCheck = c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), c.CUSTOM_ELEMENT_HANDLING && typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), He && (Ot = !1), at && (Oe = !0), Pe && (j = D({}, Zi), K = [], Pe.html === !0 && (D(j, Ki), D(K, Qi)), Pe.svg === !0 && (D(j, Yt), D(K, Zt), D(K, mt)), Pe.svgFilters === !0 && (D(j, Xt), D(K, Zt), D(K, mt)), Pe.mathMl === !0 && (D(j, Kt), D(K, Ji), D(K, mt))), c.ADD_TAGS && (j === yi && (j = xe(j)), D(j, c.ADD_TAGS, Y)), c.ADD_ATTR && (K === bi && (K = xe(K)), D(K, c.ADD_ATTR, Y)), c.ADD_URI_SAFE_ATTR && D(Ut, c.ADD_URI_SAFE_ATTR, Y), c.FORBID_CONTENTS && ($e === Ti && ($e = xe($e)), D($e, c.FORBID_CONTENTS, Y)), Bt && (j["#text"] = !0), Ae && D(j, ["html", "head", "body"]), j.table && (D(j, ["tbody"]), delete Ge.tbody), c.TRUSTED_TYPES_POLICY) {
1720
+ if ((!c || typeof c != "object") && (c = {}), c = Te(c), qe = // eslint-disable-next-line unicorn/prefer-includes
1721
+ Ls.indexOf(c.PARSER_MEDIA_TYPE) === -1 ? zs : c.PARSER_MEDIA_TYPE, Y = qe === "application/xhtml+xml" ? Xt : vt, j = fe(c, "ALLOWED_TAGS") ? A({}, c.ALLOWED_TAGS, Y) : bi, Z = fe(c, "ALLOWED_ATTR") ? A({}, c.ALLOWED_ATTR, Y) : vi, Vt = fe(c, "ALLOWED_NAMESPACES") ? A({}, c.ALLOWED_NAMESPACES, Xt) : As, Wt = fe(c, "ADD_URI_SAFE_ATTR") ? A(Te(Ai), c.ADD_URI_SAFE_ATTR, Y) : Ai, Si = fe(c, "ADD_DATA_URI_TAGS") ? A(Te(Ci), c.ADD_DATA_URI_TAGS, Y) : Ci, $e = fe(c, "FORBID_CONTENTS") ? A({}, c.FORBID_CONTENTS, Y) : Ri, Ge = fe(c, "FORBID_TAGS") ? A({}, c.FORBID_TAGS, Y) : Te({}), Pt = fe(c, "FORBID_ATTR") ? A({}, c.FORBID_ATTR, Y) : Te({}), Pe = fe(c, "USE_PROFILES") ? c.USE_PROFILES : !1, wi = c.ALLOW_ARIA_ATTR !== !1, $t = c.ALLOW_DATA_ATTR !== !1, xi = c.ALLOW_UNKNOWN_PROTOCOLS || !1, ki = c.ALLOW_SELF_CLOSE_IN_ATTR !== !1, He = c.SAFE_FOR_TEMPLATES || !1, ht = c.SAFE_FOR_XML !== !1, De = c.WHOLE_DOCUMENT || !1, Oe = c.RETURN_DOM || !1, ut = c.RETURN_DOM_FRAGMENT || !1, ct = c.RETURN_TRUSTED_TYPE || !1, Ut = c.FORCE_BODY || !1, Ei = c.SANITIZE_DOM !== !1, Ti = c.SANITIZE_NAMED_PROPS || !1, Ft = c.KEEP_CONTENT !== !1, Ve = c.IN_PLACE || !1, at = c.ALLOWED_URI_REGEXP || Es, Be = c.NAMESPACE || xe, ft = c.MATHML_TEXT_INTEGRATION_POINTS || ft, gt = c.HTML_INTEGRATION_POINTS || gt, G = c.CUSTOM_ELEMENT_HANDLING || {}, c.CUSTOM_ELEMENT_HANDLING && Di(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (G.tagNameCheck = c.CUSTOM_ELEMENT_HANDLING.tagNameCheck), c.CUSTOM_ELEMENT_HANDLING && Di(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (G.attributeNameCheck = c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), c.CUSTOM_ELEMENT_HANDLING && typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), He && ($t = !1), ut && (Oe = !0), Pe && (j = A({}, Qi), Z = [], Pe.html === !0 && (A(j, Zi), A(Z, Ji)), Pe.svg === !0 && (A(j, Kt), A(Z, Jt), A(Z, yt)), Pe.svgFilters === !0 && (A(j, Zt), A(Z, Jt), A(Z, yt)), Pe.mathMl === !0 && (A(j, Qt), A(Z, es), A(Z, yt))), c.ADD_TAGS && (j === bi && (j = Te(j)), A(j, c.ADD_TAGS, Y)), c.ADD_ATTR && (Z === vi && (Z = Te(Z)), A(Z, c.ADD_ATTR, Y)), c.ADD_URI_SAFE_ATTR && A(Wt, c.ADD_URI_SAFE_ATTR, Y), c.FORBID_CONTENTS && ($e === Ri && ($e = Te($e)), A($e, c.FORBID_CONTENTS, Y)), Ft && (j["#text"] = !0), De && A(j, ["html", "head", "body"]), j.table && (A(j, ["tbody"]), delete Ge.tbody), c.TRUSTED_TYPES_POLICY) {
1711
1722
  if (typeof c.TRUSTED_TYPES_POLICY.createHTML != "function")
1712
1723
  throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1713
1724
  if (typeof c.TRUSTED_TYPES_POLICY.createScriptURL != "function")
1714
1725
  throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1715
- _ = c.TRUSTED_TYPES_POLICY, y = _.createHTML("");
1726
+ m = c.TRUSTED_TYPES_POLICY, y = m.createHTML("");
1716
1727
  } else
1717
- _ === void 0 && (_ = mn(m, s)), _ !== null && typeof y == "string" && (y = _.createHTML(""));
1728
+ m === void 0 && (m = _n(_, s)), m !== null && typeof y == "string" && (y = m.createHTML(""));
1718
1729
  re && re(c), Ue = c;
1719
1730
  }
1720
- }, Di = D({}, [...Yt, ...Xt, ...nn]), Li = D({}, [...Kt, ...on]), Ms = function(c) {
1731
+ }, Li = A({}, [...Kt, ...Zt, ...on]), zi = A({}, [...Qt, ...ln]), Ms = function(c) {
1721
1732
  let g = S(c);
1722
1733
  (!g || !g.tagName) && (g = {
1723
1734
  namespaceURI: Be,
1724
1735
  tagName: "template"
1725
1736
  });
1726
- const b = bt(c.tagName), W = bt(g.tagName);
1727
- return Wt[c.namespaceURI] ? c.namespaceURI === ct ? g.namespaceURI === be ? b === "svg" : g.namespaceURI === ut ? b === "svg" && (W === "annotation-xml" || dt[W]) : !!Di[b] : c.namespaceURI === ut ? g.namespaceURI === be ? b === "math" : g.namespaceURI === ct ? b === "math" && pt[W] : !!Li[b] : c.namespaceURI === be ? g.namespaceURI === ct && !pt[W] || g.namespaceURI === ut && !dt[W] ? !1 : !Li[b] && (Ds[b] || !Di[b]) : !!(qe === "application/xhtml+xml" && Wt[c.namespaceURI]) : !1;
1728
- }, fe = function(c) {
1737
+ const b = vt(c.tagName), F = vt(g.tagName);
1738
+ return Vt[c.namespaceURI] ? c.namespaceURI === pt ? g.namespaceURI === xe ? b === "svg" : g.namespaceURI === dt ? b === "svg" && (F === "annotation-xml" || ft[F]) : !!Li[b] : c.namespaceURI === dt ? g.namespaceURI === xe ? b === "math" : g.namespaceURI === pt ? b === "math" && gt[F] : !!zi[b] : c.namespaceURI === xe ? g.namespaceURI === pt && !gt[F] || g.namespaceURI === dt && !ft[F] ? !1 : !zi[b] && (Ds[b] || !Li[b]) : !!(qe === "application/xhtml+xml" && Vt[c.namespaceURI]) : !1;
1739
+ }, _e = function(c) {
1729
1740
  Ke(e.removed, {
1730
1741
  element: c
1731
1742
  });
1732
1743
  try {
1733
1744
  S(c).removeChild(c);
1734
1745
  } catch {
1735
- O(c);
1746
+ H(c);
1736
1747
  }
1737
1748
  }, Fe = function(c, g) {
1738
1749
  try {
@@ -1747,9 +1758,9 @@ function Ts() {
1747
1758
  });
1748
1759
  }
1749
1760
  if (g.removeAttribute(c), c === "is")
1750
- if (Oe || at)
1761
+ if (Oe || ut)
1751
1762
  try {
1752
- fe(g);
1763
+ _e(g);
1753
1764
  } catch {
1754
1765
  }
1755
1766
  else
@@ -1757,96 +1768,96 @@ function Ts() {
1757
1768
  g.setAttribute(c, "");
1758
1769
  } catch {
1759
1770
  }
1760
- }, zi = function(c) {
1771
+ }, Ni = function(c) {
1761
1772
  let g = null, b = null;
1762
- if ($t)
1773
+ if (Ut)
1763
1774
  c = "<remove></remove>" + c;
1764
1775
  else {
1765
- const V = Xi(c, /^[\r\n\t ]+/);
1776
+ const V = Ki(c, /^[\r\n\t ]+/);
1766
1777
  b = V && V[0];
1767
1778
  }
1768
- qe === "application/xhtml+xml" && Be === be && (c = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + c + "</body></html>");
1769
- const W = _ ? _.createHTML(c) : c;
1770
- if (Be === be)
1779
+ qe === "application/xhtml+xml" && Be === xe && (c = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + c + "</body></html>");
1780
+ const F = m ? m.createHTML(c) : c;
1781
+ if (Be === xe)
1771
1782
  try {
1772
- g = new d().parseFromString(W, qe);
1783
+ g = new d().parseFromString(F, qe);
1773
1784
  } catch {
1774
1785
  }
1775
1786
  if (!g || !g.documentElement) {
1776
1787
  g = P.createDocument(Be, "template", null);
1777
1788
  try {
1778
- g.documentElement.innerHTML = Ft ? y : W;
1789
+ g.documentElement.innerHTML = Gt ? y : F;
1779
1790
  } catch {
1780
1791
  }
1781
1792
  }
1782
1793
  const J = g.body || g.documentElement;
1783
- return c && b && J.insertBefore(t.createTextNode(b), J.childNodes[0] || null), Be === be ? k.call(g, Ae ? "html" : "body")[0] : Ae ? g.documentElement : J;
1784
- }, Ni = function(c) {
1785
- return $.call(
1794
+ return c && b && J.insertBefore(t.createTextNode(b), J.childNodes[0] || null), Be === xe ? me.call(g, De ? "html" : "body")[0] : De ? g.documentElement : J;
1795
+ }, Mi = function(c) {
1796
+ return U.call(
1786
1797
  c.ownerDocument || c,
1787
1798
  c,
1788
1799
  // eslint-disable-next-line no-bitwise
1789
1800
  a.SHOW_ELEMENT | a.SHOW_COMMENT | a.SHOW_TEXT | a.SHOW_PROCESSING_INSTRUCTION | a.SHOW_CDATA_SECTION,
1790
1801
  null
1791
1802
  );
1792
- }, Vt = function(c) {
1803
+ }, jt = function(c) {
1793
1804
  return c instanceof p && (typeof c.nodeName != "string" || typeof c.textContent != "string" || typeof c.removeChild != "function" || !(c.attributes instanceof h) || typeof c.removeAttribute != "function" || typeof c.setAttribute != "function" || typeof c.namespaceURI != "string" || typeof c.insertBefore != "function" || typeof c.hasChildNodes != "function");
1794
- }, Mi = function(c) {
1805
+ }, Ii = function(c) {
1795
1806
  return typeof n == "function" && c instanceof n;
1796
1807
  };
1797
- function ve(w, c, g) {
1798
- gt(w, (b) => {
1808
+ function ke(w, c, g) {
1809
+ _t(w, (b) => {
1799
1810
  b.call(e, c, g, Ue);
1800
1811
  });
1801
1812
  }
1802
- const Ii = function(c) {
1813
+ const Hi = function(c) {
1803
1814
  let g = null;
1804
- if (ve(z.beforeSanitizeElements, c, null), Vt(c))
1805
- return fe(c), !0;
1815
+ if (ke(x.beforeSanitizeElements, c, null), jt(c))
1816
+ return _e(c), !0;
1806
1817
  const b = Y(c.nodeName);
1807
- if (ve(z.uponSanitizeElement, c, {
1818
+ if (ke(x.uponSanitizeElement, c, {
1808
1819
  tagName: b,
1809
1820
  allowedTags: j
1810
- }), lt && c.hasChildNodes() && !Mi(c.firstElementChild) && te(/<[/\w!]/g, c.innerHTML) && te(/<[/\w!]/g, c.textContent) || c.nodeType === et.progressingInstruction || lt && c.nodeType === et.comment && te(/<[/\w]/g, c.data))
1811
- return fe(c), !0;
1821
+ }), ht && c.hasChildNodes() && !Ii(c.firstElementChild) && te(/<[/\w!]/g, c.innerHTML) && te(/<[/\w!]/g, c.textContent) || c.nodeType === et.progressingInstruction || ht && c.nodeType === et.comment && te(/<[/\w]/g, c.data))
1822
+ return _e(c), !0;
1812
1823
  if (!j[b] || Ge[b]) {
1813
- if (!Ge[b] && Oi(b) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, b) || G.tagNameCheck instanceof Function && G.tagNameCheck(b)))
1824
+ if (!Ge[b] && Pi(b) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, b) || G.tagNameCheck instanceof Function && G.tagNameCheck(b)))
1814
1825
  return !1;
1815
- if (Bt && !$e[b]) {
1816
- const W = S(c) || c.parentNode, J = L(c) || c.childNodes;
1817
- if (J && W) {
1826
+ if (Ft && !$e[b]) {
1827
+ const F = S(c) || c.parentNode, J = D(c) || c.childNodes;
1828
+ if (J && F) {
1818
1829
  const V = J.length;
1819
- for (let oe = V - 1; oe >= 0; --oe) {
1820
- const we = N(J[oe], !0);
1821
- we.__removalCount = (c.__removalCount || 0) + 1, W.insertBefore(we, A(c));
1830
+ for (let le = V - 1; le >= 0; --le) {
1831
+ const Ee = L(J[le], !0);
1832
+ Ee.__removalCount = (c.__removalCount || 0) + 1, F.insertBefore(Ee, C(c));
1822
1833
  }
1823
1834
  }
1824
1835
  }
1825
- return fe(c), !0;
1836
+ return _e(c), !0;
1826
1837
  }
1827
- return c instanceof u && !Ms(c) || (b === "noscript" || b === "noembed" || b === "noframes") && te(/<\/no(script|embed|frames)/i, c.innerHTML) ? (fe(c), !0) : (He && c.nodeType === et.text && (g = c.textContent, gt([Q, Re, Se], (W) => {
1828
- g = Ze(g, W, " ");
1838
+ return c instanceof u && !Ms(c) || (b === "noscript" || b === "noembed" || b === "noframes") && te(/<\/no(script|embed|frames)/i, c.innerHTML) ? (_e(c), !0) : (He && c.nodeType === et.text && (g = c.textContent, _t([E, K, W], (F) => {
1839
+ g = Ze(g, F, " ");
1829
1840
  }), c.textContent !== g && (Ke(e.removed, {
1830
1841
  element: c.cloneNode()
1831
- }), c.textContent = g)), ve(z.afterSanitizeElements, c, null), !1);
1832
- }, Hi = function(c, g, b) {
1833
- if (ki && (g === "id" || g === "name") && (b in t || b in Ns))
1842
+ }), c.textContent = g)), ke(x.afterSanitizeElements, c, null), !1);
1843
+ }, Oi = function(c, g, b) {
1844
+ if (Ei && (g === "id" || g === "name") && (b in t || b in Ns))
1834
1845
  return !1;
1835
- if (!(Ot && !Ht[g] && te(Ie, g))) {
1836
- if (!(vi && te(Mt, g))) {
1837
- if (!K[g] || Ht[g]) {
1846
+ if (!($t && !Pt[g] && te(oe, g))) {
1847
+ if (!(wi && te(It, g))) {
1848
+ if (!Z[g] || Pt[g]) {
1838
1849
  if (
1839
1850
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1840
1851
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1841
1852
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1842
- !(Oi(c) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, c) || G.tagNameCheck instanceof Function && G.tagNameCheck(c)) && (G.attributeNameCheck instanceof RegExp && te(G.attributeNameCheck, g) || G.attributeNameCheck instanceof Function && G.attributeNameCheck(g)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1853
+ !(Pi(c) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, c) || G.tagNameCheck instanceof Function && G.tagNameCheck(c)) && (G.attributeNameCheck instanceof RegExp && te(G.attributeNameCheck, g) || G.attributeNameCheck instanceof Function && G.attributeNameCheck(g)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1843
1854
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1844
1855
  g === "is" && G.allowCustomizedBuiltInElements && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, b) || G.tagNameCheck instanceof Function && G.tagNameCheck(b)))
1845
1856
  ) return !1;
1846
- } else if (!Ut[g]) {
1847
- if (!te(_i, Ze(b, mi, ""))) {
1848
- if (!((g === "src" || g === "xlink:href" || g === "href") && c !== "script" && en(b, "data:") === 0 && Ri[c])) {
1849
- if (!(wi && !te(It, Ze(b, mi, "")))) {
1857
+ } else if (!Wt[g]) {
1858
+ if (!te(at, Ze(b, lt, ""))) {
1859
+ if (!((g === "src" || g === "xlink:href" || g === "href") && c !== "script" && tn(b, "data:") === 0 && Si[c])) {
1860
+ if (!(xi && !te(Ht, Ze(b, lt, "")))) {
1850
1861
  if (b)
1851
1862
  return !1;
1852
1863
  }
@@ -1856,31 +1867,31 @@ function Ts() {
1856
1867
  }
1857
1868
  }
1858
1869
  return !0;
1859
- }, Oi = function(c) {
1860
- return c !== "annotation-xml" && Xi(c, Ss);
1861
1870
  }, Pi = function(c) {
1862
- ve(z.beforeSanitizeAttributes, c, null);
1871
+ return c !== "annotation-xml" && Ki(c, Ot);
1872
+ }, $i = function(c) {
1873
+ ke(x.beforeSanitizeAttributes, c, null);
1863
1874
  const {
1864
1875
  attributes: g
1865
1876
  } = c;
1866
- if (!g || Vt(c))
1877
+ if (!g || jt(c))
1867
1878
  return;
1868
1879
  const b = {
1869
1880
  attrName: "",
1870
1881
  attrValue: "",
1871
1882
  keepAttr: !0,
1872
- allowedAttributes: K,
1883
+ allowedAttributes: Z,
1873
1884
  forceKeepAttr: void 0
1874
1885
  };
1875
- let W = g.length;
1876
- for (; W--; ) {
1877
- const J = g[W], {
1886
+ let F = g.length;
1887
+ for (; F--; ) {
1888
+ const J = g[F], {
1878
1889
  name: V,
1879
- namespaceURI: oe,
1880
- value: we
1881
- } = J, je = Y(V), qt = we;
1882
- let ee = V === "value" ? qt : tn(qt);
1883
- if (b.attrName = je, b.attrValue = ee, b.keepAttr = !0, b.forceKeepAttr = void 0, ve(z.uponSanitizeAttribute, c, b), ee = b.attrValue, Ei && (je === "id" || je === "name") && (Fe(V, c), ee = Cs + ee), lt && te(/((--!?|])>)|<\/(style|title)/i, ee)) {
1890
+ namespaceURI: le,
1891
+ value: Ee
1892
+ } = J, je = Y(V), Yt = Ee;
1893
+ let ee = V === "value" ? Yt : sn(Yt);
1894
+ if (b.attrName = je, b.attrValue = ee, b.keepAttr = !0, b.forceKeepAttr = void 0, ke(x.uponSanitizeAttribute, c, b), ee = b.attrValue, Ti && (je === "id" || je === "name") && (Fe(V, c), ee = Cs + ee), ht && te(/((--!?|])>)|<\/(style|title)/i, ee)) {
1884
1895
  Fe(V, c);
1885
1896
  continue;
1886
1897
  }
@@ -1890,47 +1901,47 @@ function Ts() {
1890
1901
  Fe(V, c);
1891
1902
  continue;
1892
1903
  }
1893
- if (!xi && te(/\/>/i, ee)) {
1904
+ if (!ki && te(/\/>/i, ee)) {
1894
1905
  Fe(V, c);
1895
1906
  continue;
1896
1907
  }
1897
- He && gt([Q, Re, Se], (Bi) => {
1898
- ee = Ze(ee, Bi, " ");
1908
+ He && _t([E, K, W], (Ui) => {
1909
+ ee = Ze(ee, Ui, " ");
1899
1910
  });
1900
- const $i = Y(c.nodeName);
1901
- if (!Hi($i, je, ee)) {
1911
+ const Bi = Y(c.nodeName);
1912
+ if (!Oi(Bi, je, ee)) {
1902
1913
  Fe(V, c);
1903
1914
  continue;
1904
1915
  }
1905
- if (_ && typeof m == "object" && typeof m.getAttributeType == "function" && !oe)
1906
- switch (m.getAttributeType($i, je)) {
1916
+ if (m && typeof _ == "object" && typeof _.getAttributeType == "function" && !le)
1917
+ switch (_.getAttributeType(Bi, je)) {
1907
1918
  case "TrustedHTML": {
1908
- ee = _.createHTML(ee);
1919
+ ee = m.createHTML(ee);
1909
1920
  break;
1910
1921
  }
1911
1922
  case "TrustedScriptURL": {
1912
- ee = _.createScriptURL(ee);
1923
+ ee = m.createScriptURL(ee);
1913
1924
  break;
1914
1925
  }
1915
1926
  }
1916
- if (ee !== qt)
1927
+ if (ee !== Yt)
1917
1928
  try {
1918
- oe ? c.setAttributeNS(oe, V, ee) : c.setAttribute(V, ee), Vt(c) ? fe(c) : Yi(e.removed);
1929
+ le ? c.setAttributeNS(le, V, ee) : c.setAttribute(V, ee), jt(c) ? _e(c) : Xi(e.removed);
1919
1930
  } catch {
1920
1931
  Fe(V, c);
1921
1932
  }
1922
1933
  }
1923
- ve(z.afterSanitizeAttributes, c, null);
1934
+ ke(x.afterSanitizeAttributes, c, null);
1924
1935
  }, Is = function w(c) {
1925
1936
  let g = null;
1926
- const b = Ni(c);
1927
- for (ve(z.beforeSanitizeShadowDOM, c, null); g = b.nextNode(); )
1928
- ve(z.uponSanitizeShadowNode, g, null), Ii(g), Pi(g), g.content instanceof r && w(g.content);
1929
- ve(z.afterSanitizeShadowDOM, c, null);
1937
+ const b = Mi(c);
1938
+ for (ke(x.beforeSanitizeShadowDOM, c, null); g = b.nextNode(); )
1939
+ ke(x.uponSanitizeShadowNode, g, null), Hi(g), $i(g), g.content instanceof r && w(g.content);
1940
+ ke(x.afterSanitizeShadowDOM, c, null);
1930
1941
  };
1931
1942
  return e.sanitize = function(w) {
1932
- let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null, b = null, W = null, J = null;
1933
- if (Ft = !w, Ft && (w = "<!-->"), typeof w != "string" && !Mi(w))
1943
+ let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null, b = null, F = null, J = null;
1944
+ if (Gt = !w, Gt && (w = "<!-->"), typeof w != "string" && !Ii(w))
1934
1945
  if (typeof w.toString == "function") {
1935
1946
  if (w = w.toString(), typeof w != "string")
1936
1947
  throw Qe("dirty is not a string, aborting");
@@ -1938,65 +1949,65 @@ function Ts() {
1938
1949
  throw Qe("toString is not a function");
1939
1950
  if (!e.isSupported)
1940
1951
  return w;
1941
- if (Pt || Gt(c), e.removed = [], typeof w == "string" && (Ve = !1), Ve) {
1952
+ if (Bt || qt(c), e.removed = [], typeof w == "string" && (Ve = !1), Ve) {
1942
1953
  if (w.nodeName) {
1943
- const we = Y(w.nodeName);
1944
- if (!j[we] || Ge[we])
1954
+ const Ee = Y(w.nodeName);
1955
+ if (!j[Ee] || Ge[Ee])
1945
1956
  throw Qe("root node is forbidden and cannot be sanitized in-place");
1946
1957
  }
1947
1958
  } else if (w instanceof n)
1948
- g = zi("<!---->"), b = g.ownerDocument.importNode(w, !0), b.nodeType === et.element && b.nodeName === "BODY" || b.nodeName === "HTML" ? g = b : g.appendChild(b);
1959
+ g = Ni("<!---->"), b = g.ownerDocument.importNode(w, !0), b.nodeType === et.element && b.nodeName === "BODY" || b.nodeName === "HTML" ? g = b : g.appendChild(b);
1949
1960
  else {
1950
- if (!Oe && !He && !Ae && // eslint-disable-next-line unicorn/prefer-includes
1961
+ if (!Oe && !He && !De && // eslint-disable-next-line unicorn/prefer-includes
1951
1962
  w.indexOf("<") === -1)
1952
- return _ && ht ? _.createHTML(w) : w;
1953
- if (g = zi(w), !g)
1954
- return Oe ? null : ht ? y : "";
1963
+ return m && ct ? m.createHTML(w) : w;
1964
+ if (g = Ni(w), !g)
1965
+ return Oe ? null : ct ? y : "";
1955
1966
  }
1956
- g && $t && fe(g.firstChild);
1957
- const V = Ni(Ve ? w : g);
1958
- for (; W = V.nextNode(); )
1959
- Ii(W), Pi(W), W.content instanceof r && Is(W.content);
1967
+ g && Ut && _e(g.firstChild);
1968
+ const V = Mi(Ve ? w : g);
1969
+ for (; F = V.nextNode(); )
1970
+ Hi(F), $i(F), F.content instanceof r && Is(F.content);
1960
1971
  if (Ve)
1961
1972
  return w;
1962
1973
  if (Oe) {
1963
- if (at)
1964
- for (J = C.call(g.ownerDocument); g.firstChild; )
1974
+ if (ut)
1975
+ for (J = pe.call(g.ownerDocument); g.firstChild; )
1965
1976
  J.appendChild(g.firstChild);
1966
1977
  else
1967
1978
  J = g;
1968
- return (K.shadowroot || K.shadowrootmode) && (J = R.call(i, J, !0)), J;
1979
+ return (Z.shadowroot || Z.shadowrootmode) && (J = N.call(i, J, !0)), J;
1969
1980
  }
1970
- let oe = Ae ? g.outerHTML : g.innerHTML;
1971
- return Ae && j["!doctype"] && g.ownerDocument && g.ownerDocument.doctype && g.ownerDocument.doctype.name && te(Es, g.ownerDocument.doctype.name) && (oe = "<!DOCTYPE " + g.ownerDocument.doctype.name + `>
1972
- ` + oe), He && gt([Q, Re, Se], (we) => {
1973
- oe = Ze(oe, we, " ");
1974
- }), _ && ht ? _.createHTML(oe) : oe;
1981
+ let le = De ? g.outerHTML : g.innerHTML;
1982
+ return De && j["!doctype"] && g.ownerDocument && g.ownerDocument.doctype && g.ownerDocument.doctype.name && te(Ts, g.ownerDocument.doctype.name) && (le = "<!DOCTYPE " + g.ownerDocument.doctype.name + `>
1983
+ ` + le), He && _t([E, K, W], (Ee) => {
1984
+ le = Ze(le, Ee, " ");
1985
+ }), m && ct ? m.createHTML(le) : le;
1975
1986
  }, e.setConfig = function() {
1976
1987
  let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1977
- Gt(w), Pt = !0;
1988
+ qt(w), Bt = !0;
1978
1989
  }, e.clearConfig = function() {
1979
- Ue = null, Pt = !1;
1990
+ Ue = null, Bt = !1;
1980
1991
  }, e.isValidAttribute = function(w, c, g) {
1981
- Ue || Gt({});
1982
- const b = Y(w), W = Y(c);
1983
- return Hi(b, W, g);
1992
+ Ue || qt({});
1993
+ const b = Y(w), F = Y(c);
1994
+ return Oi(b, F, g);
1984
1995
  }, e.addHook = function(w, c) {
1985
- typeof c == "function" && Ke(z[w], c);
1996
+ typeof c == "function" && Ke(x[w], c);
1986
1997
  }, e.removeHook = function(w, c) {
1987
1998
  if (c !== void 0) {
1988
- const g = Qr(z[w], c);
1989
- return g === -1 ? void 0 : Jr(z[w], g, 1)[0];
1999
+ const g = Jr(x[w], c);
2000
+ return g === -1 ? void 0 : en(x[w], g, 1)[0];
1990
2001
  }
1991
- return Yi(z[w]);
2002
+ return Xi(x[w]);
1992
2003
  }, e.removeHooks = function(w) {
1993
- z[w] = [];
2004
+ x[w] = [];
1994
2005
  }, e.removeAllHooks = function() {
1995
- z = ts();
2006
+ x = is();
1996
2007
  }, e;
1997
2008
  }
1998
- var _n = Ts();
1999
- const yn = ["innerHTML"], bn = "Markdown", vn = /* @__PURE__ */ ye({
2009
+ var yn = Rs();
2010
+ const bn = ["innerHTML"], vn = "Markdown", wn = /* @__PURE__ */ we({
2000
2011
  inheritAttrs: !1,
2001
2012
  __name: "Markdown",
2002
2013
  props: {
@@ -2007,22 +2018,22 @@ const yn = ["innerHTML"], bn = "Markdown", vn = /* @__PURE__ */ ye({
2007
2018
  },
2008
2019
  emits: ["update:markdownText", "changeMode"],
2009
2020
  setup(o, { emit: e }) {
2010
- const t = o, i = e, s = ns([{ comp: hs, event: a, tooltip: "Edit Markdown" }]);
2011
- I.setOptions({
2021
+ const t = o, i = e, s = os([{ comp: us, event: a, tooltip: "Edit Markdown" }]);
2022
+ M.setOptions({
2012
2023
  gfm: !0,
2013
2024
  breaks: !0
2014
2025
  });
2015
- const r = F(t.markdownText ?? "");
2016
- ue(() => t.markdownText, (h) => {
2026
+ const r = B(t.markdownText ?? "");
2027
+ ce(() => t.markdownText, (h) => {
2017
2028
  h !== void 0 && h !== r.value && (r.value = h);
2018
2029
  });
2019
- const l = F(t.mode ? t.mode === "edit" : !1);
2020
- ue(() => t.mode, (h) => {
2030
+ const l = B(t.mode ? t.mode === "edit" : !1);
2031
+ ce(() => t.mode, (h) => {
2021
2032
  h && (l.value = h === "edit");
2022
2033
  });
2023
- const n = Te(() => {
2024
- const h = t.inputFormat === "html" ? r.value ?? "" : I.parse(r.value ?? "");
2025
- return t.sanitize === !1 ? h : _n.sanitize(h);
2034
+ const n = Ce(() => {
2035
+ const h = t.inputFormat === "html" ? r.value ?? "" : M.parse(r.value ?? "");
2036
+ return t.sanitize === !1 ? h : yn.sanitize(h);
2026
2037
  });
2027
2038
  function u() {
2028
2039
  i("update:markdownText", r.value);
@@ -2030,13 +2041,13 @@ const yn = ["innerHTML"], bn = "Markdown", vn = /* @__PURE__ */ ye({
2030
2041
  function a() {
2031
2042
  l.value = !l.value, i("changeMode", l.value ? "edit" : "preview");
2032
2043
  }
2033
- return (h, p) => (T(), U(Le, null, [
2034
- vt(h.$slots, "default", {
2035
- widgetName: bn,
2044
+ return (h, p) => (R(), $(ze, null, [
2045
+ wt(h.$slots, "default", {
2046
+ widgetName: vn,
2036
2047
  childIcons: s.value
2037
2048
  }, void 0, !0),
2038
- M("div", ri({ class: "markdown-widget-wrap" }, h.$attrs), [
2039
- l.value ? De((T(), U("textarea", {
2049
+ z("div", li({ class: "markdown-widget-wrap" }, h.$attrs), [
2050
+ l.value ? Le((R(), $("textarea", {
2040
2051
  key: 0,
2041
2052
  "onUpdate:modelValue": p[0] || (p[0] = (d) => r.value = d),
2042
2053
  onInput: u,
@@ -2044,16 +2055,16 @@ const yn = ["innerHTML"], bn = "Markdown", vn = /* @__PURE__ */ ye({
2044
2055
  placeholder: "Write markdown here…"
2045
2056
  }, null, 544)), [
2046
2057
  [Fs, r.value]
2047
- ]) : (T(), U("div", {
2058
+ ]) : (R(), $("div", {
2048
2059
  key: 1,
2049
2060
  class: "markdown-output",
2050
2061
  innerHTML: n.value
2051
- }, null, 8, yn))
2062
+ }, null, 8, bn))
2052
2063
  ], 16)
2053
2064
  ], 64));
2054
2065
  }
2055
- }), so = /* @__PURE__ */ Ne(vn, [["__scopeId", "data-v-b2d32c29"]]);
2056
- function wn(o, e, t, i, s) {
2066
+ }), ro = /* @__PURE__ */ Me(wn, [["__scopeId", "data-v-b2d32c29"]]);
2067
+ function xn(o, e, t, i, s) {
2057
2068
  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));
2058
2069
  return r.prototype = e.prototype, r;
2059
2070
  }
@@ -2354,7 +2365,7 @@ class f {
2354
2365
  ), (i || e.target).dispatchEvent(s);
2355
2366
  }
2356
2367
  }
2357
- class me {
2368
+ class be {
2358
2369
  constructor(e = {}) {
2359
2370
  this.addedNodes = [], this.removedNodes = [], this.column = e.column || 12, this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
2360
2371
  }
@@ -2520,7 +2531,7 @@ class me {
2520
2531
  * @param resizing if out of bound, resize down or move into the grid to fit ?
2521
2532
  */
2522
2533
  prepareNode(e, t) {
2523
- e._id = e._id ?? me._idSeq++, (e.x === void 0 || e.y === void 0 || e.x === null || e.y === null) && (e.autoPosition = !0);
2534
+ e._id = e._id ?? be._idSeq++, (e.x === void 0 || e.y === void 0 || e.x === null || e.y === null) && (e.autoPosition = !0);
2524
2535
  let i = { x: 0, y: 0, w: 1, h: 1 };
2525
2536
  return f.defaults(e, i), e.autoPosition || delete e.autoPosition, e.noResize || delete e.noResize, e.noMove || delete e.noMove, f.sanitizeMinMax(e), typeof e.x == "string" && (e.x = Number(e.x)), typeof e.y == "string" && (e.y = Number(e.y)), typeof e.w == "string" && (e.w = Number(e.w)), typeof e.h == "string" && (e.h = Number(e.h)), isNaN(e.x) && (e.x = i.x, e.autoPosition = !0), isNaN(e.y) && (e.y = i.y, e.autoPosition = !0), isNaN(e.w) && (e.w = i.w), isNaN(e.h) && (e.h = i.h), this.nodeBoundFix(e, t), e;
2526
2537
  }
@@ -2602,7 +2613,7 @@ class me {
2602
2613
  return !1;
2603
2614
  if (t.pack = !0, !this.maxRow)
2604
2615
  return this.moveNode(e, t);
2605
- let i, s = new me({
2616
+ let i, s = new be({
2606
2617
  column: this.column,
2607
2618
  float: this.float,
2608
2619
  nodes: this.nodes.map((l) => l._id === e._id ? (i = { ...l }, i) : { ...l })
@@ -2624,7 +2635,7 @@ class me {
2624
2635
  willItFit(e) {
2625
2636
  if (delete e._willFitPos, !this.maxRow)
2626
2637
  return !0;
2627
- let t = new me({
2638
+ let t = new be({
2628
2639
  column: this.column,
2629
2640
  float: this.float,
2630
2641
  nodes: this.nodes.map((s) => ({ ...s }))
@@ -2650,8 +2661,8 @@ class me {
2650
2661
  if (n.length) {
2651
2662
  let p = e._moving && !t.nested, d = p ? this.directionCollideCoverage(e, t, n) : n[0];
2652
2663
  if (p && d && ((h = (a = e.grid) == null ? void 0 : a.opts) != null && h.subGridDynamic) && !e.grid._isTemp) {
2653
- let m = f.areaIntercept(t.rect, d._rect), v = f.area(t.rect), N = f.area(d._rect);
2654
- m / (v < N ? v : N) > 0.8 && (d.grid.makeSubGrid(d.el, void 0, e), d = void 0);
2664
+ let _ = f.areaIntercept(t.rect, d._rect), v = f.area(t.rect), L = f.area(d._rect);
2665
+ _ / (v < L ? v : L) > 0.8 && (d.grid.makeSubGrid(d.el, void 0, e), d = void 0);
2655
2666
  }
2656
2667
  d ? u = !this._fixCollisions(e, r, d, t) : (u = !1, i && delete t.pack);
2657
2668
  }
@@ -2725,17 +2736,17 @@ class me {
2725
2736
  const a = this._layouts[t] || [];
2726
2737
  let h = this._layouts.length - 1;
2727
2738
  !a.length && e !== h && ((u = this._layouts[h]) != null && u.length) && (e = h, this._layouts[h].forEach((p) => {
2728
- let d = i.find((m) => m._id === p._id);
2739
+ let d = i.find((_) => _._id === p._id);
2729
2740
  d && (!r && !p.autoPosition && (d.x = p.x ?? d.x, d.y = p.y ?? d.y), d.w = p.w ?? d.w, (p.x == null || p.y === void 0) && (d.autoPosition = !0));
2730
2741
  })), a.forEach((p) => {
2731
- let d = i.findIndex((m) => m._id === p._id);
2742
+ let d = i.findIndex((_) => _._id === p._id);
2732
2743
  if (d !== -1) {
2733
- const m = i[d];
2744
+ const _ = i[d];
2734
2745
  if (r) {
2735
- m.w = p.w;
2746
+ _.w = p.w;
2736
2747
  return;
2737
2748
  }
2738
- (p.autoPosition || isNaN(p.x) || isNaN(p.y)) && this.findEmptyPosition(p, l), p.autoPosition || (m.x = p.x ?? m.x, m.y = p.y ?? m.y, m.w = p.w ?? m.w, l.push(m)), i.splice(d, 1);
2749
+ (p.autoPosition || isNaN(p.x) || isNaN(p.y)) && this.findEmptyPosition(p, l), p.autoPosition || (_.x = p.x ?? _.x, _.y = p.y ?? _.y, _.w = p.w ?? _.w, l.push(_)), i.splice(d, 1);
2739
2750
  }
2740
2751
  });
2741
2752
  }
@@ -2769,7 +2780,7 @@ class me {
2769
2780
  return e.forEach((r, l) => {
2770
2781
  if (r._id === void 0) {
2771
2782
  const n = r.id ? this.nodes.find((u) => u.id === r.id) : void 0;
2772
- r._id = (n == null ? void 0 : n._id) ?? me._idSeq++;
2783
+ r._id = (n == null ? void 0 : n._id) ?? be._idSeq++;
2773
2784
  }
2774
2785
  s[l] = { x: r.x, y: r.y, w: r.w, _id: r._id };
2775
2786
  }), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
@@ -2780,7 +2791,7 @@ class me {
2780
2791
  * @param column corresponding column index to save it under
2781
2792
  */
2782
2793
  cacheOneLayout(e, t) {
2783
- e._id = e._id ?? me._idSeq++;
2794
+ e._id = e._id ?? be._idSeq++;
2784
2795
  let i = { x: e.x, y: e.y, w: e.w, _id: e._id };
2785
2796
  (e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
2786
2797
  let s = this.findCacheLayout(e, t);
@@ -2804,8 +2815,8 @@ class me {
2804
2815
  return this;
2805
2816
  }
2806
2817
  }
2807
- me._idSeq = 0;
2808
- const ae = {
2818
+ be._idSeq = 0;
2819
+ const he = {
2809
2820
  alwaysShowResizeHandle: "mobile",
2810
2821
  animate: !0,
2811
2822
  auto: !0,
@@ -2837,18 +2848,18 @@ const ae = {
2837
2848
  // staticGrid: false,
2838
2849
  // styleInHead: false,
2839
2850
  //removable
2840
- }, xn = {
2851
+ }, kn = {
2841
2852
  handle: ".grid-stack-item-content",
2842
2853
  appendTo: "body"
2843
2854
  // revert: 'invalid',
2844
2855
  // scroll: false,
2845
2856
  };
2846
- class x {
2857
+ class k {
2847
2858
  }
2848
- const pe = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2849
- class _e {
2859
+ const ge = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2860
+ class ve {
2850
2861
  }
2851
- function Rt(o, e) {
2862
+ function St(o, e) {
2852
2863
  if (o.touches.length > 1)
2853
2864
  return;
2854
2865
  o.cancelable && o.preventDefault();
@@ -2886,7 +2897,7 @@ function Rt(o, e) {
2886
2897
  // relatedTarget
2887
2898
  ), o.target.dispatchEvent(i);
2888
2899
  }
2889
- function Rs(o, e) {
2900
+ function Ss(o, e) {
2890
2901
  o.cancelable && o.preventDefault();
2891
2902
  const t = document.createEvent("MouseEvents");
2892
2903
  t.initMouseEvent(
@@ -2922,46 +2933,46 @@ function Rs(o, e) {
2922
2933
  // relatedTarget
2923
2934
  ), o.target.dispatchEvent(t);
2924
2935
  }
2925
- function St(o) {
2926
- _e.touchHandled || (_e.touchHandled = !0, Rt(o, "mousedown"));
2927
- }
2928
2936
  function Ct(o) {
2929
- _e.touchHandled && Rt(o, "mousemove");
2937
+ ve.touchHandled || (ve.touchHandled = !0, St(o, "mousedown"));
2930
2938
  }
2931
2939
  function At(o) {
2932
- if (!_e.touchHandled)
2933
- return;
2934
- _e.pointerLeaveTimeout && (window.clearTimeout(_e.pointerLeaveTimeout), delete _e.pointerLeaveTimeout);
2935
- const e = !!x.dragElement;
2936
- Rt(o, "mouseup"), e || Rt(o, "click"), _e.touchHandled = !1;
2940
+ ve.touchHandled && St(o, "mousemove");
2937
2941
  }
2938
2942
  function Dt(o) {
2939
- o.pointerType !== "mouse" && o.target.releasePointerCapture(o.pointerId);
2943
+ if (!ve.touchHandled)
2944
+ return;
2945
+ ve.pointerLeaveTimeout && (window.clearTimeout(ve.pointerLeaveTimeout), delete ve.pointerLeaveTimeout);
2946
+ const e = !!k.dragElement;
2947
+ St(o, "mouseup"), e || St(o, "click"), ve.touchHandled = !1;
2940
2948
  }
2941
- function is(o) {
2942
- x.dragElement && o.pointerType !== "mouse" && Rs(o, "mouseenter");
2949
+ function Lt(o) {
2950
+ o.pointerType !== "mouse" && o.target.releasePointerCapture(o.pointerId);
2943
2951
  }
2944
2952
  function ss(o) {
2945
- x.dragElement && o.pointerType !== "mouse" && (_e.pointerLeaveTimeout = window.setTimeout(() => {
2946
- delete _e.pointerLeaveTimeout, Rs(o, "mouseleave");
2953
+ k.dragElement && o.pointerType !== "mouse" && Ss(o, "mouseenter");
2954
+ }
2955
+ function rs(o) {
2956
+ k.dragElement && o.pointerType !== "mouse" && (ve.pointerLeaveTimeout = window.setTimeout(() => {
2957
+ delete ve.pointerLeaveTimeout, Ss(o, "mouseleave");
2947
2958
  }, 10));
2948
2959
  }
2949
- class Nt {
2960
+ class Mt {
2950
2961
  constructor(e, t, i) {
2951
2962
  this.moving = !1, this.host = e, this.dir = t, this.option = i, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._init();
2952
2963
  }
2953
2964
  /** @internal */
2954
2965
  _init() {
2955
2966
  const e = document.createElement("div");
2956
- return e.classList.add("ui-resizable-handle"), e.classList.add(`${Nt.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), pe && (this.el.addEventListener("touchstart", St), this.el.addEventListener("pointerdown", Dt)), this;
2967
+ 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), ge && (this.el.addEventListener("touchstart", Ct), this.el.addEventListener("pointerdown", Lt)), this;
2957
2968
  }
2958
2969
  /** call this when resize handle needs to be removed and cleaned up */
2959
2970
  destroy() {
2960
- return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), pe && (this.el.removeEventListener("touchstart", St), this.el.removeEventListener("pointerdown", Dt)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2971
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), ge && (this.el.removeEventListener("touchstart", Ct), this.el.removeEventListener("pointerdown", Lt)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2961
2972
  }
2962
2973
  /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
2963
2974
  _mouseDown(e) {
2964
- this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), pe && (this.el.addEventListener("touchmove", Ct), this.el.addEventListener("touchend", At)), e.stopPropagation(), e.preventDefault();
2975
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), ge && (this.el.addEventListener("touchmove", At), this.el.addEventListener("touchend", Dt)), e.stopPropagation(), e.preventDefault();
2965
2976
  }
2966
2977
  /** @internal */
2967
2978
  _mouseMove(e) {
@@ -2970,15 +2981,15 @@ class Nt {
2970
2981
  }
2971
2982
  /** @internal */
2972
2983
  _mouseUp(e) {
2973
- this.moving && this._triggerEvent("stop", e), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), pe && (this.el.removeEventListener("touchmove", Ct), this.el.removeEventListener("touchend", At)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2984
+ this.moving && this._triggerEvent("stop", e), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), ge && (this.el.removeEventListener("touchmove", At), this.el.removeEventListener("touchend", Dt)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2974
2985
  }
2975
2986
  /** @internal */
2976
2987
  _triggerEvent(e, t) {
2977
2988
  return this.option[e] && this.option[e](t), this;
2978
2989
  }
2979
2990
  }
2980
- Nt.prefix = "ui-resizable-";
2981
- class fi {
2991
+ Mt.prefix = "ui-resizable-";
2992
+ class _i {
2982
2993
  constructor() {
2983
2994
  this._eventRegister = {};
2984
2995
  }
@@ -3006,7 +3017,7 @@ class fi {
3006
3017
  return this._eventRegister[e](t);
3007
3018
  }
3008
3019
  }
3009
- class st extends fi {
3020
+ class st extends _i {
3010
3021
  constructor(e, t = {}) {
3011
3022
  super(), this.rectScale = { x: 1, y: 1 }, this._ui = () => {
3012
3023
  const s = this.el.parentElement.getBoundingClientRect(), r = {
@@ -3061,22 +3072,22 @@ class st extends fi {
3061
3072
  }
3062
3073
  /** @internal turns auto hide on/off */
3063
3074
  _setupAutoHide(e) {
3064
- return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), x.overResizeElement === this && delete x.overResizeElement), this;
3075
+ return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), k.overResizeElement === this && delete k.overResizeElement), this;
3065
3076
  }
3066
3077
  /** @internal */
3067
3078
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3068
3079
  _mouseOver(e) {
3069
- x.overResizeElement || x.dragElement || (x.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
3080
+ k.overResizeElement || k.dragElement || (k.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
3070
3081
  }
3071
3082
  /** @internal */
3072
3083
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3073
3084
  _mouseOut(e) {
3074
- x.overResizeElement === this && (delete x.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
3085
+ k.overResizeElement === this && (delete k.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
3075
3086
  }
3076
3087
  /** @internal */
3077
3088
  _setupHandlers() {
3078
3089
  let e = this.option.handles || "e,s,se";
3079
- return e === "all" && (e = "n,e,s,w,se,sw,ne,nw"), this.handlers = e.split(",").map((t) => t.trim()).map((t) => new Nt(this.el, t, {
3090
+ return e === "all" && (e = "n,e,s,w,se,sw,ne,nw"), this.handlers = e.split(",").map((t) => t.trim()).map((t) => new Mt(this.el, t, {
3080
3091
  start: (i) => {
3081
3092
  this._resizeStart(i);
3082
3093
  },
@@ -3165,8 +3176,8 @@ class st extends fi {
3165
3176
  }
3166
3177
  }
3167
3178
  st._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
3168
- const kn = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
3169
- class rt extends fi {
3179
+ const En = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
3180
+ class rt extends _i {
3170
3181
  constructor(e, t = {}) {
3171
3182
  super(), this.dragScale = { x: 1, y: 1 }, this.el = e, this.option = t;
3172
3183
  let i = t.handle.substring(1);
@@ -3179,10 +3190,10 @@ class rt extends fi {
3179
3190
  super.off(e);
3180
3191
  }
3181
3192
  enable() {
3182
- this.disabled !== !1 && (super.enable(), this.dragEl.addEventListener("mousedown", this._mouseDown), pe && (this.dragEl.addEventListener("touchstart", St), this.dragEl.addEventListener("pointerdown", Dt)), this.el.classList.remove("ui-draggable-disabled"));
3193
+ this.disabled !== !1 && (super.enable(), this.dragEl.addEventListener("mousedown", this._mouseDown), ge && (this.dragEl.addEventListener("touchstart", Ct), this.dragEl.addEventListener("pointerdown", Lt)), this.el.classList.remove("ui-draggable-disabled"));
3183
3194
  }
3184
3195
  disable(e = !1) {
3185
- this.disabled !== !0 && (super.disable(), this.dragEl.removeEventListener("mousedown", this._mouseDown), pe && (this.dragEl.removeEventListener("touchstart", St), this.dragEl.removeEventListener("pointerdown", Dt)), e || this.el.classList.add("ui-draggable-disabled"));
3196
+ this.disabled !== !0 && (super.disable(), this.dragEl.removeEventListener("mousedown", this._mouseDown), ge && (this.dragEl.removeEventListener("touchstart", Ct), this.dragEl.removeEventListener("pointerdown", Lt)), e || this.el.classList.add("ui-draggable-disabled"));
3186
3197
  }
3187
3198
  destroy() {
3188
3199
  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();
@@ -3192,8 +3203,8 @@ class rt extends fi {
3192
3203
  }
3193
3204
  /** @internal call when mouse goes down before a dragstart happens */
3194
3205
  _mouseDown(e) {
3195
- if (!x.mouseHandled)
3196
- return e.button !== 0 || e.target.closest(kn) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete x.dragElement, delete x.dropElement, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), pe && (this.dragEl.addEventListener("touchmove", Ct), this.dragEl.addEventListener("touchend", At)), e.preventDefault(), document.activeElement && document.activeElement.blur(), x.mouseHandled = !0), !0;
3206
+ if (!k.mouseHandled)
3207
+ return e.button !== 0 || e.target.closest(En) || 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), ge && (this.dragEl.addEventListener("touchmove", At), this.dragEl.addEventListener("touchend", Dt)), e.preventDefault(), document.activeElement && document.activeElement.blur(), k.mouseHandled = !0), !0;
3197
3208
  }
3198
3209
  /** @internal method to call actual drag event */
3199
3210
  _callDrag(e) {
@@ -3207,15 +3218,15 @@ class rt extends fi {
3207
3218
  var i;
3208
3219
  let t = this.mouseDownEvent;
3209
3220
  if (this.dragging)
3210
- if (this._dragFollow(e), x.pauseDrag) {
3211
- const s = Number.isInteger(x.pauseDrag) ? x.pauseDrag : 100;
3221
+ if (this._dragFollow(e), k.pauseDrag) {
3222
+ const s = Number.isInteger(k.pauseDrag) ? k.pauseDrag : 100;
3212
3223
  this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), s);
3213
3224
  } else
3214
3225
  this._callDrag(e);
3215
3226
  else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
3216
- this.dragging = !0, x.dragElement = this;
3227
+ this.dragging = !0, k.dragElement = this;
3217
3228
  let s = (i = this.el.gridstackNode) == null ? void 0 : i.grid;
3218
- s ? x.dropElement = s.el.ddElement.ddDroppable : delete x.dropElement, this.helper = this._createHelper(e), this._setupHelperContainmentStyle(), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment);
3229
+ s ? k.dropElement = s.el.ddElement.ddDroppable : delete k.dropElement, this.helper = this._createHelper(e), this._setupHelperContainmentStyle(), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment);
3219
3230
  const r = f.initEvent(e, { target: this.el, type: "dragstart" });
3220
3231
  this._setupHelperStyle(e), this.option.start && this.option.start(r, this.ui()), this.triggerEvent("dragstart", r);
3221
3232
  }
@@ -3224,12 +3235,12 @@ class rt extends fi {
3224
3235
  /** @internal call when the mouse gets released to drop the item at current location */
3225
3236
  _mouseUp(e) {
3226
3237
  var t;
3227
- if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), pe && (this.dragEl.removeEventListener("touchmove", Ct, !0), this.dragEl.removeEventListener("touchend", At, !0)), this.dragging) {
3228
- delete this.dragging, ((t = x.dropElement) == null ? void 0 : t.el) === this.el.parentElement && delete x.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper === this.el ? this._removeHelperStyle() : this.helper.remove();
3238
+ if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), ge && (this.dragEl.removeEventListener("touchmove", At, !0), this.dragEl.removeEventListener("touchend", Dt, !0)), this.dragging) {
3239
+ 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();
3229
3240
  const i = f.initEvent(e, { target: this.el, type: "dragstop" });
3230
- this.option.stop && this.option.stop(i), this.triggerEvent("dragstop", i), x.dropElement && x.dropElement.drop(e);
3241
+ this.option.stop && this.option.stop(i), this.triggerEvent("dragstop", i), k.dropElement && k.dropElement.drop(e);
3231
3242
  }
3232
- delete this.helper, delete this.mouseDownEvent, delete x.dragElement, delete x.dropElement, delete x.mouseHandled, e.preventDefault();
3243
+ delete this.helper, delete this.mouseDownEvent, delete k.dragElement, delete k.dropElement, delete k.mouseHandled, e.preventDefault();
3233
3244
  }
3234
3245
  /** @internal create a clone copy (or user defined method) of the original drag item if set */
3235
3246
  _createHelper(e) {
@@ -3311,7 +3322,7 @@ class rt extends fi {
3311
3322
  }
3312
3323
  }
3313
3324
  rt.originStyleProp = ["transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
3314
- class En extends fi {
3325
+ class Tn extends _i {
3315
3326
  constructor(e, t = {}) {
3316
3327
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
3317
3328
  }
@@ -3322,10 +3333,10 @@ class En extends fi {
3322
3333
  super.off(e);
3323
3334
  }
3324
3335
  enable() {
3325
- 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), pe && (this.el.addEventListener("pointerenter", is), this.el.addEventListener("pointerleave", ss)));
3336
+ 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), ge && (this.el.addEventListener("pointerenter", ss), this.el.addEventListener("pointerleave", rs)));
3326
3337
  }
3327
3338
  disable(e = !1) {
3328
- 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), pe && (this.el.removeEventListener("pointerenter", is), this.el.removeEventListener("pointerleave", ss)));
3339
+ 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), ge && (this.el.removeEventListener("pointerenter", ss), this.el.removeEventListener("pointerleave", rs)));
3329
3340
  }
3330
3341
  destroy() {
3331
3342
  this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
@@ -3335,21 +3346,21 @@ class En extends fi {
3335
3346
  }
3336
3347
  /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */
3337
3348
  _mouseEnter(e) {
3338
- if (!x.dragElement || !this._canDrop(x.dragElement.el))
3349
+ if (!k.dragElement || !this._canDrop(k.dragElement.el))
3339
3350
  return;
3340
- e.preventDefault(), e.stopPropagation(), x.dropElement && x.dropElement !== this && x.dropElement._mouseLeave(e), x.dropElement = this;
3351
+ e.preventDefault(), e.stopPropagation(), k.dropElement && k.dropElement !== this && k.dropElement._mouseLeave(e), k.dropElement = this;
3341
3352
  const t = f.initEvent(e, { target: this.el, type: "dropover" });
3342
- this.option.over && this.option.over(t, this._ui(x.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
3353
+ this.option.over && this.option.over(t, this._ui(k.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
3343
3354
  }
3344
3355
  /** @internal called when the item is leaving our area, stop tracking if we had moving item */
3345
3356
  _mouseLeave(e) {
3346
3357
  var i;
3347
- if (!x.dragElement || x.dropElement !== this)
3358
+ if (!k.dragElement || k.dropElement !== this)
3348
3359
  return;
3349
3360
  e.preventDefault(), e.stopPropagation();
3350
3361
  const t = f.initEvent(e, { target: this.el, type: "dropout" });
3351
- if (this.option.out && this.option.out(t, this._ui(x.dragElement)), this.triggerEvent("dropout", t), x.dropElement === this) {
3352
- delete x.dropElement;
3362
+ if (this.option.out && this.option.out(t, this._ui(k.dragElement)), this.triggerEvent("dropout", t), k.dropElement === this) {
3363
+ delete k.dropElement;
3353
3364
  let s, r = this.el.parentElement;
3354
3365
  for (; !s && r; )
3355
3366
  s = (i = r.ddElement) == null ? void 0 : i.ddDroppable, r = r.parentElement;
@@ -3360,7 +3371,7 @@ class En extends fi {
3360
3371
  drop(e) {
3361
3372
  e.preventDefault();
3362
3373
  const t = f.initEvent(e, { target: this.el, type: "drop" });
3363
- this.option.drop && this.option.drop(t, this._ui(x.dragElement)), this.triggerEvent("drop", t);
3374
+ this.option.drop && this.option.drop(t, this._ui(k.dragElement)), this.triggerEvent("drop", t);
3364
3375
  }
3365
3376
  /** @internal true if element matches the string/method accept option */
3366
3377
  _canDrop(e) {
@@ -3378,9 +3389,9 @@ class En extends fi {
3378
3389
  };
3379
3390
  }
3380
3391
  }
3381
- class gi {
3392
+ class yi {
3382
3393
  static init(e) {
3383
- return e.ddElement || (e.ddElement = new gi(e)), e.ddElement;
3394
+ return e.ddElement || (e.ddElement = new yi(e)), e.ddElement;
3384
3395
  }
3385
3396
  constructor(e) {
3386
3397
  this.el = e;
@@ -3404,13 +3415,13 @@ class gi {
3404
3415
  return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
3405
3416
  }
3406
3417
  setupDroppable(e) {
3407
- return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new En(this.el, e), this;
3418
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Tn(this.el, e), this;
3408
3419
  }
3409
3420
  cleanDroppable() {
3410
3421
  return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
3411
3422
  }
3412
3423
  }
3413
- class Tn {
3424
+ class Rn {
3414
3425
  resizable(e, t, i, s) {
3415
3426
  return this._getDDElements(e).forEach((r) => {
3416
3427
  if (t === "disable" || t === "enable")
@@ -3475,7 +3486,7 @@ class Tn {
3475
3486
  }
3476
3487
  on(e, t, i) {
3477
3488
  return this._getDDElements(e).forEach((s) => s.on(t, (r) => {
3478
- i(r, x.dragElement ? x.dragElement.el : r.target, x.dragElement ? x.dragElement.helper : null);
3489
+ i(r, k.dragElement ? k.dragElement.el : r.target, k.dragElement ? k.dragElement.helper : null);
3479
3490
  })), this;
3480
3491
  }
3481
3492
  off(e, t) {
@@ -3486,7 +3497,7 @@ class Tn {
3486
3497
  let i = f.getElements(e);
3487
3498
  if (!i.length)
3488
3499
  return [];
3489
- let s = i.map((r) => r.ddElement || (t ? gi.init(r) : null));
3500
+ let s = i.map((r) => r.ddElement || (t ? yi.init(r) : null));
3490
3501
  return t || s.filter((r) => r), s;
3491
3502
  }
3492
3503
  }
@@ -3497,8 +3508,8 @@ class Tn {
3497
3508
  * Copyright (c) 2021-2022 Alain Dumesny
3498
3509
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
3499
3510
  */
3500
- const Z = new Tn();
3501
- class E {
3511
+ const Q = new Rn();
3512
+ class T {
3502
3513
  /**
3503
3514
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
3504
3515
  * simply return the existing instance (ignore any passed options). There is also an initAll() version that support
@@ -3513,8 +3524,8 @@ class E {
3513
3524
  * let grid = document.querySelector('.grid-stack').gridstack;
3514
3525
  */
3515
3526
  static init(e = {}, t = ".grid-stack") {
3516
- let i = E.getGridElement(t);
3517
- return i ? (i.gridstack || (i.gridstack = new E(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 ?
3527
+ let i = T.getGridElement(t);
3528
+ return i ? (i.gridstack || (i.gridstack = new T(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 ?
3518
3529
  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);
3519
3530
  }
3520
3531
  /**
@@ -3528,8 +3539,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3528
3539
  */
3529
3540
  static initAll(e = {}, t = ".grid-stack") {
3530
3541
  let i = [];
3531
- return E.getGridElements(t).forEach((s) => {
3532
- s.gridstack || (s.gridstack = new E(s, f.cloneDeep(e))), i.push(s.gridstack);
3542
+ return T.getGridElements(t).forEach((s) => {
3543
+ s.gridstack || (s.gridstack = new T(s, f.cloneDeep(e))), i.push(s.gridstack);
3533
3544
  }), i.length === 0 && console.error('GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
3534
3545
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`), i;
3535
3546
  }
@@ -3548,27 +3559,27 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3548
3559
  const l = i.gridstack;
3549
3560
  return t && (l.opts = { ...l.opts, ...t }), t.children !== void 0 && l.load(t.children), l;
3550
3561
  }
3551
- if (!e.classList.contains("grid-stack") || E.addRemoveCB)
3552
- if (E.addRemoveCB)
3553
- i = E.addRemoveCB(e, t, !0, !0);
3562
+ if (!e.classList.contains("grid-stack") || T.addRemoveCB)
3563
+ if (T.addRemoveCB)
3564
+ i = T.addRemoveCB(e, t, !0, !0);
3554
3565
  else {
3555
3566
  let l = document.implementation.createHTMLDocument("");
3556
3567
  l.body.innerHTML = `<div class="grid-stack ${t.class || ""}"></div>`, i = l.body.children[0], e.appendChild(i);
3557
3568
  }
3558
- return E.init(t, i);
3569
+ return T.init(t, i);
3559
3570
  }
3560
3571
  /** call this method to register your engine instead of the default one.
3561
3572
  * See instead `GridStackOptions.engineClass` if you only need to
3562
3573
  * replace just one instance.
3563
3574
  */
3564
3575
  static registerEngine(e) {
3565
- E.engineClass = e;
3576
+ T.engineClass = e;
3566
3577
  }
3567
3578
  /** @internal create placeholder DIV as needed */
3568
3579
  get placeholder() {
3569
3580
  if (!this._placeholder) {
3570
3581
  let e = document.createElement("div");
3571
- e.className = "placeholder-content", this.opts.placeholderText && (e.innerHTML = this.opts.placeholderText), this._placeholder = document.createElement("div"), this._placeholder.classList.add(this.opts.placeholderClass, ae.itemClass, this.opts.itemClass), this.placeholder.appendChild(e);
3582
+ e.className = "placeholder-content", this.opts.placeholderText && (e.innerHTML = this.opts.placeholderText), this._placeholder = document.createElement("div"), this._placeholder.classList.add(this.opts.placeholderClass, he.itemClass, this.opts.itemClass), this.placeholder.appendChild(e);
3572
3583
  }
3573
3584
  return this._placeholder;
3574
3585
  }
@@ -3583,24 +3594,24 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3583
3594
  let i = f.toNumber(e.getAttribute("gs-row"));
3584
3595
  t.column === "auto" && delete t.column, t.alwaysShowResizeHandle !== void 0 && (t._alwaysShowResizeHandle = t.alwaysShowResizeHandle);
3585
3596
  let s = {
3586
- ...f.cloneDeep(ae),
3587
- column: f.toNumber(e.getAttribute("gs-column")) || ae.column,
3588
- minRow: i || f.toNumber(e.getAttribute("gs-min-row")) || ae.minRow,
3589
- maxRow: i || f.toNumber(e.getAttribute("gs-max-row")) || ae.maxRow,
3590
- staticGrid: f.toBool(e.getAttribute("gs-static")) || ae.staticGrid,
3597
+ ...f.cloneDeep(he),
3598
+ column: f.toNumber(e.getAttribute("gs-column")) || he.column,
3599
+ minRow: i || f.toNumber(e.getAttribute("gs-min-row")) || he.minRow,
3600
+ maxRow: i || f.toNumber(e.getAttribute("gs-max-row")) || he.maxRow,
3601
+ staticGrid: f.toBool(e.getAttribute("gs-static")) || he.staticGrid,
3591
3602
  draggable: {
3592
- handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || ae.draggable.handle
3603
+ handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || he.draggable.handle
3593
3604
  },
3594
3605
  removableOptions: {
3595
- accept: t.itemClass || ae.removableOptions.accept,
3596
- decline: ae.removableOptions.decline
3606
+ accept: t.itemClass || he.removableOptions.accept,
3607
+ decline: he.removableOptions.decline
3597
3608
  }
3598
3609
  };
3599
3610
  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");
3600
3611
  const r = (u = this.el.parentElement) == null ? void 0 : u.parentElement;
3601
- let l = r != null && r.classList.contains(ae.itemClass) ? r.gridstackNode : void 0;
3602
- 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 !== ae.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 = pe), this._styleSheetClass = "gs-id-" + me._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
3603
- let n = this.opts.engineClass || E.engineClass || me;
3612
+ let l = r != null && r.classList.contains(he.itemClass) ? r.gridstackNode : void 0;
3613
+ 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 = ge), this._styleSheetClass = "gs-id-" + be._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
3614
+ let n = this.opts.engineClass || T.engineClass || be;
3604
3615
  if (this.engine = new n({
3605
3616
  column: this.getColumn(),
3606
3617
  float: this.opts.float,
@@ -3610,15 +3621,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3610
3621
  this.engine.nodes.forEach((d) => {
3611
3622
  p = Math.max(p, d.y + d.h);
3612
3623
  }), h.forEach((d) => {
3613
- let m = d.el;
3614
- m && (d._removeDOM ? (m && m.remove(), delete d._removeDOM) : this._writePosAttr(m, d));
3624
+ let _ = d.el;
3625
+ _ && (d._removeDOM ? (_ && _.remove(), delete d._removeDOM) : this._writePosAttr(_, d));
3615
3626
  }), this._updateStyles(!1, p);
3616
3627
  }
3617
3628
  }), this.opts.auto && (this.batchUpdate(), this.getGridItems().forEach((h) => this._prepareElement(h)), this.batchUpdate(!1)), this.opts.children) {
3618
3629
  let h = this.opts.children;
3619
3630
  delete this.opts.children, h.length && this.load(h);
3620
3631
  }
3621
- this.setAnimation(this.opts.animate), this._updateStyles(), this.el.classList.add("gs-" + this.opts.column), this.opts.subGridDynamic && !x.pauseDrag && (x.pauseDrag = !0), ((a = this.opts.draggable) == null ? void 0 : a.pause) !== void 0 && (x.pauseDrag = this.opts.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
3632
+ this.setAnimation(this.opts.animate), this._updateStyles(), this.el.classList.add("gs-" + this.opts.column), this.opts.subGridDynamic && !k.pauseDrag && (k.pauseDrag = !0), ((a = this.opts.draggable) == null ? void 0 : a.pause) !== void 0 && (k.pauseDrag = this.opts.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
3622
3633
  }
3623
3634
  /**
3624
3635
  * add a new widget and returns it.
@@ -3646,8 +3657,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3646
3657
  } else if (arguments.length === 0 || arguments.length === 1 && i(e))
3647
3658
  if (r = t = e, r != null && r.el)
3648
3659
  s = r.el;
3649
- else if (E.addRemoveCB)
3650
- s = E.addRemoveCB(this.el, t, !0, !1);
3660
+ else if (T.addRemoveCB)
3661
+ s = T.addRemoveCB(this.el, t, !0, !1);
3651
3662
  else {
3652
3663
  let n = (t == null ? void 0 : t.content) || "", u = document.implementation.createHTMLDocument("");
3653
3664
  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];
@@ -3670,31 +3681,31 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3670
3681
  * @returns newly created grid
3671
3682
  */
3672
3683
  makeSubGrid(e, t, i, s = !0) {
3673
- var m, v, N;
3684
+ var _, v, L;
3674
3685
  let r = e.gridstackNode;
3675
- if (r || (r = this.makeWidget(e).gridstackNode), (m = r.subGrid) != null && m.el)
3686
+ if (r || (r = this.makeWidget(e).gridstackNode), (_ = r.subGrid) != null && _.el)
3676
3687
  return r.subGrid;
3677
3688
  let l, n = this;
3678
3689
  for (; n && !l; )
3679
- l = (v = n.opts) == null ? void 0 : v.subGridOpts, n = (N = n.parentGridItem) == null ? void 0 : N.grid;
3690
+ l = (v = n.opts) == null ? void 0 : v.subGridOpts, n = (L = n.parentGridItem) == null ? void 0 : L.grid;
3680
3691
  t = f.cloneDeep({ ...l || {}, children: void 0, ...t || r.subGridOpts }), r.subGridOpts = t;
3681
3692
  let u;
3682
3693
  t.column === "auto" && (u = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), t.disableOneColumnMode = !0);
3683
3694
  let a = r.el.querySelector(".grid-stack-item-content"), h, p;
3684
3695
  if (s) {
3685
- 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), E.addRemoveCB)
3686
- h = E.addRemoveCB(this.el, p, !0, !1);
3696
+ 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), T.addRemoveCB)
3697
+ h = T.addRemoveCB(this.el, p, !0, !1);
3687
3698
  else {
3688
- let O = document.implementation.createHTMLDocument("");
3689
- O.body.innerHTML = '<div class="grid-stack-item"></div>', h = O.body.children[0], h.appendChild(a), O.body.innerHTML = '<div class="grid-stack-item-content"></div>', a = O.body.children[0], r.el.appendChild(a);
3699
+ let H = document.implementation.createHTMLDocument("");
3700
+ H.body.innerHTML = '<div class="grid-stack-item"></div>', h = H.body.children[0], h.appendChild(a), H.body.innerHTML = '<div class="grid-stack-item-content"></div>', a = H.body.children[0], r.el.appendChild(a);
3690
3701
  }
3691
3702
  this._prepareDragDropByNode(r);
3692
3703
  }
3693
3704
  if (i) {
3694
- let O = u ? t.column : r.w, A = r.h + i.h, L = r.el.style;
3695
- L.transition = "none", this.update(r.el, { w: O, h: A }), setTimeout(() => L.transition = null);
3705
+ let H = u ? t.column : r.w, C = r.h + i.h, D = r.el.style;
3706
+ D.transition = "none", this.update(r.el, { w: H, h: C }), setTimeout(() => D.transition = null);
3696
3707
  }
3697
- let d = r.subGrid = E.addGrid(a, t);
3708
+ let d = r.subGrid = T.addGrid(a, t);
3698
3709
  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;
3699
3710
  }
3700
3711
  /**
@@ -3717,7 +3728,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3717
3728
  * @param saveCB callback for each node -> widget, so application can insert additional data to be saved into the widget data structure.
3718
3729
  * @returns list of widgets or full grid option, including .children list of widgets
3719
3730
  */
3720
- save(e = !0, t = !1, i = E.saveCB) {
3731
+ save(e = !0, t = !1, i = T.saveCB) {
3721
3732
  let s = this.engine.save(e, i);
3722
3733
  if (s.forEach((r) => {
3723
3734
  var l;
@@ -3733,7 +3744,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3733
3744
  let r = f.cloneDeep(this.opts);
3734
3745
  r.marginBottom === r.marginTop && r.marginRight === r.marginLeft && r.marginTop === r.marginRight && (r.margin = r.marginTop, delete r.marginTop, delete r.marginRight, delete r.marginBottom, delete r.marginLeft), r.rtl === (this.el.style.direction === "rtl") && (r.rtl = "auto"), this._isAutoCellHeight && (r.cellHeight = "auto"), this._autoColumn && (r.column = "auto", delete r.disableOneColumnMode);
3735
3746
  const l = r._alwaysShowResizeHandle;
3736
- return delete r._alwaysShowResizeHandle, l !== void 0 ? r.alwaysShowResizeHandle = l : delete r.alwaysShowResizeHandle, f.removeInternalAndSame(r, ae), r.children = s, r;
3747
+ return delete r._alwaysShowResizeHandle, l !== void 0 ? r.alwaysShowResizeHandle = l : delete r.alwaysShowResizeHandle, f.removeInternalAndSame(r, he), r.children = s, r;
3737
3748
  }
3738
3749
  return s;
3739
3750
  }
@@ -3747,19 +3758,19 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3747
3758
  * @example
3748
3759
  * see http://gridstackjs.com/demo/serialization.html
3749
3760
  */
3750
- load(e, t = E.addRemoveCB || !0) {
3761
+ load(e, t = T.addRemoveCB || !0) {
3751
3762
  e = f.cloneDeep(e);
3752
3763
  const i = e.some((a) => a.x !== void 0 || a.y !== void 0);
3753
3764
  i && (e = f.sort(e, -1, this._prevColumn || this.getColumn())), this._insertNotAppend = i;
3754
3765
  const s = this.opts.column;
3755
3766
  this._prevColumn && this._prevColumn !== s && e.some((a) => (a.x || 0) + a.w > s) && (this._ignoreLayoutsNodeChange = !0, this.engine.cacheLayout(e, this._prevColumn, !0));
3756
- const r = E.addRemoveCB;
3757
- typeof t == "function" && (E.addRemoveCB = t);
3767
+ const r = T.addRemoveCB;
3768
+ typeof t == "function" && (T.addRemoveCB = t);
3758
3769
  let l = [];
3759
3770
  this.batchUpdate(), t && [...this.engine.nodes].forEach((h) => {
3760
3771
  if (!h.id)
3761
3772
  return;
3762
- f.find(e, h.id) || (E.addRemoveCB && E.addRemoveCB(this.el, h, !1, !1), l.push(h), this.removeWidget(h.el, !0, !1));
3773
+ f.find(e, h.id) || (T.addRemoveCB && T.addRemoveCB(this.el, h, !1, !1), l.push(h), this.removeWidget(h.el, !0, !1));
3763
3774
  });
3764
3775
  let n = [];
3765
3776
  this.engine.nodes = this.engine.nodes.filter((a) => f.find(e, a.id) ? (n.push(a), !1) : !0);
@@ -3773,7 +3784,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3773
3784
  d && d.gridstack && (d.gridstack.load(a.subGridOpts.children), this._insertNotAppend = !0);
3774
3785
  }
3775
3786
  } else t && this.addWidget(a);
3776
- }), this.engine.removedNodes = l, this.doContentResize(u, !0), this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this._insertNotAppend, r ? E.addRemoveCB = r : delete E.addRemoveCB, this;
3787
+ }), this.engine.removedNodes = l, this.doContentResize(u, !0), this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this._insertNotAppend, r ? T.addRemoveCB = r : delete T.addRemoveCB, this;
3777
3788
  }
3778
3789
  /**
3779
3790
  * use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
@@ -3929,7 +3940,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3929
3940
  * grid.makeWidget('2', {w:2, content: 'hello'});
3930
3941
  */
3931
3942
  makeWidget(e, t) {
3932
- let i = E.getElement(e);
3943
+ let i = T.getElement(e);
3933
3944
  this._prepareElement(i, !0, t);
3934
3945
  const s = i.gridstackNode;
3935
3946
  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;
@@ -3971,11 +3982,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3971
3982
  * @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
3972
3983
  */
3973
3984
  removeWidget(e, t = !0, i = !0) {
3974
- return E.getElements(e).forEach((s) => {
3985
+ return T.getElements(e).forEach((s) => {
3975
3986
  if (s.parentElement && s.parentElement !== this.el)
3976
3987
  return;
3977
3988
  let r = s.gridstackNode;
3978
- r || (r = this.engine.nodes.find((l) => s === l.el)), r && (E.addRemoveCB && E.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
3989
+ r || (r = this.engine.nodes.find((l) => s === l.el)), r && (T.addRemoveCB && T.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
3979
3990
  }), i && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this;
3980
3991
  }
3981
3992
  /**
@@ -4017,7 +4028,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4017
4028
  let i = arguments, s = 1;
4018
4029
  return t = { x: i[s++], y: i[s++], w: i[s++], h: i[s++] }, this.update(e, t);
4019
4030
  }
4020
- return E.getElements(e).forEach((i) => {
4031
+ return T.getElements(e).forEach((i) => {
4021
4032
  var h;
4022
4033
  let s = i == null ? void 0 : i.gridstackNode;
4023
4034
  if (!s)
@@ -4058,19 +4069,19 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4058
4069
  if (!r)
4059
4070
  return;
4060
4071
  let l = t && i.h ? i.h * r : e.clientHeight, n;
4061
- if (i.resizeToContentParent && (n = e.querySelector(i.resizeToContentParent)), n || (n = e.querySelector(E.resizeToContentParent)), !n)
4072
+ if (i.resizeToContentParent && (n = e.querySelector(i.resizeToContentParent)), n || (n = e.querySelector(T.resizeToContentParent)), !n)
4062
4073
  return;
4063
4074
  const u = e.clientHeight - n.clientHeight, a = t && i.h ? i.h * r - u : n.clientHeight;
4064
4075
  let h;
4065
4076
  if (i.subGrid)
4066
4077
  h = i.subGrid.getRow() * i.subGrid.getCellHeight();
4067
4078
  else {
4068
- const m = n.firstElementChild;
4069
- if (!m) {
4070
- console.log(`Error: resizeToContent() '${E.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
4079
+ const _ = n.firstElementChild;
4080
+ if (!_) {
4081
+ console.log(`Error: resizeToContent() '${T.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
4071
4082
  return;
4072
4083
  }
4073
- h = m.getBoundingClientRect().height || a;
4084
+ h = _.getBoundingClientRect().height || a;
4074
4085
  }
4075
4086
  if (a === h)
4076
4087
  return;
@@ -4081,7 +4092,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4081
4092
  }
4082
4093
  /** call the user resize (so they can do extra work) else our build in version */
4083
4094
  resizeToContentCheck(e, t = !1) {
4084
- E.resizeToContentCB ? E.resizeToContentCB(e, t) : this.resizeToContent(e, t);
4095
+ T.resizeToContentCB ? T.resizeToContentCB(e, t) : this.resizeToContent(e, t);
4085
4096
  }
4086
4097
  /**
4087
4098
  * 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).
@@ -4281,7 +4292,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4281
4292
  }
4282
4293
  /** @internal */
4283
4294
  static getGridElement(e) {
4284
- return E.getElement(e);
4295
+ return T.getElement(e);
4285
4296
  }
4286
4297
  /** @internal */
4287
4298
  static getGridElements(e) {
@@ -4299,7 +4310,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4299
4310
  */
4300
4311
  /** get the global (but static to this code) DD implementation */
4301
4312
  static getDD() {
4302
- return Z;
4313
+ return Q;
4303
4314
  }
4304
4315
  /**
4305
4316
  * call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
@@ -4310,10 +4321,10 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4310
4321
  * @param root optional root which defaults to document (for shadow dom pas the parent HTMLDocument)
4311
4322
  */
4312
4323
  static setupDragIn(e, t, i = document) {
4313
- (t == null ? void 0 : t.pause) !== void 0 && (x.pauseDrag = t.pause), t = { ...xn, ...t || {} };
4324
+ (t == null ? void 0 : t.pause) !== void 0 && (k.pauseDrag = t.pause), t = { ...kn, ...t || {} };
4314
4325
  let s = typeof e == "string" ? f.getElements(e, i) : e;
4315
4326
  s.length && (s == null || s.forEach((r) => {
4316
- Z.isDraggable(r) || Z.dragIn(r, t);
4327
+ Q.isDraggable(r) || Q.dragIn(r, t);
4317
4328
  }));
4318
4329
  }
4319
4330
  /**
@@ -4323,7 +4334,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4323
4334
  * @param val if true widget will be draggable, assuming the parent grid isn't noMove or static.
4324
4335
  */
4325
4336
  movable(e, t) {
4326
- return this.opts.staticGrid ? this : (E.getElements(e).forEach((i) => {
4337
+ return this.opts.staticGrid ? this : (T.getElements(e).forEach((i) => {
4327
4338
  let s = i.gridstackNode;
4328
4339
  s && (t ? delete s.noMove : s.noMove = !0, this._prepareDragDropByNode(s));
4329
4340
  }), this);
@@ -4334,7 +4345,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4334
4345
  * @param val if true widget will be resizable, assuming the parent grid isn't noResize or static.
4335
4346
  */
4336
4347
  resizable(e, t) {
4337
- return this.opts.staticGrid ? this : (E.getElements(e).forEach((i) => {
4348
+ return this.opts.staticGrid ? this : (T.getElements(e).forEach((i) => {
4338
4349
  let s = i.gridstackNode;
4339
4350
  s && (t ? delete s.noResize : s.noResize = !0, this._prepareDragDropByNode(s));
4340
4351
  }), this);
@@ -4386,12 +4397,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4386
4397
  }
4387
4398
  /** @internal removes any drag&drop present (called during destroy) */
4388
4399
  _removeDD(e) {
4389
- return Z.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
4400
+ return Q.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
4390
4401
  }
4391
4402
  /** @internal called to add drag over to support widgets being added externally */
4392
4403
  _setupAcceptWidget() {
4393
4404
  if (this.opts.staticGrid || !this.opts.acceptWidgets && !this.opts.removable)
4394
- return Z.droppable(this.el, "destroy"), this;
4405
+ return Q.droppable(this.el, "destroy"), this;
4395
4406
  let e, t, i = (s, r, l) => {
4396
4407
  let n = r.gridstackNode;
4397
4408
  if (!n)
@@ -4403,7 +4414,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4403
4414
  if (n._temporaryRemoved) {
4404
4415
  if (n.x = Math.max(0, Math.round(h / t)), n.y = Math.max(0, Math.round(a / e)), delete n.autoPosition, this.engine.nodeBoundFix(n), !this.engine.willItFit(n)) {
4405
4416
  if (n.autoPosition = !0, !this.engine.willItFit(n)) {
4406
- Z.off(r, "drag");
4417
+ Q.off(r, "drag");
4407
4418
  return;
4408
4419
  }
4409
4420
  n._willFitPos && (f.copyPos(n, n._willFitPos), delete n._willFitPos);
@@ -4412,7 +4423,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4412
4423
  } else
4413
4424
  this._dragOrResize(l, s, p, n, t, e);
4414
4425
  };
4415
- return Z.droppable(this.el, {
4426
+ return Q.droppable(this.el, {
4416
4427
  accept: (s) => {
4417
4428
  let r = s.gridstackNode;
4418
4429
  if ((r == null ? void 0 : r.grid) === this)
@@ -4439,7 +4450,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4439
4450
  n != null && n.grid && n.grid !== this && !n._temporaryRemoved && n.grid._leave(r, l), t = this.cellWidth(), e = this.getCellHeight(!0), n || (n = this._readAttr(r, !1)), n.grid || (n._isExternal = !0, r.gridstackNode = n), l = l || r;
4440
4451
  let u = n.w || Math.round(l.offsetWidth / t) || 1, a = n.h || Math.round(l.offsetHeight / e) || 1;
4441
4452
  return n.grid && n.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = n), r.gridstackNode = n = { ...n, w: u, h: a, grid: this }, delete n.x, delete n.y, this.engine.cleanupNode(n).nodeBoundFix(n), n._initDD = n._isExternal = // DOM needs to be re-parented on a drop
4442
- n._temporaryRemoved = !0) : (n.w = u, n.h = a, n._temporaryRemoved = !0), this._itemRemoving(n.el, !1), Z.on(r, "drag", i), i(s, r, l), !1;
4453
+ n._temporaryRemoved = !0) : (n.w = u, n.h = a, n._temporaryRemoved = !0), this._itemRemoving(n.el, !1), Q.on(r, "drag", i), i(s, r, l), !1;
4443
4454
  }).on(this.el, "dropout", (s, r, l) => {
4444
4455
  let n = r.gridstackNode;
4445
4456
  return n && (!n.grid || n.grid === this) && (this._leave(r, l), this._isTemp && this.removeAsSubGrid(n)), !1;
@@ -4452,14 +4463,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4452
4463
  this.placeholder.remove();
4453
4464
  let a = r._gridstackNodeOrig;
4454
4465
  if (delete r._gridstackNodeOrig, u && (a != null && a.grid) && a.grid !== this) {
4455
- let m = a.grid;
4456
- m.engine.removeNodeFromLayoutCache(a), m.engine.removedNodes.push(a), m._triggerRemoveEvent()._triggerChangeEvent(), m.parentGridItem && !m.engine.nodes.length && m.opts.subGridDynamic && m.removeAsSubGrid();
4466
+ let _ = a.grid;
4467
+ _.engine.removeNodeFromLayoutCache(a), _.engine.removedNodes.push(a), _._triggerRemoveEvent()._triggerChangeEvent(), _.parentGridItem && !_.engine.nodes.length && _.opts.subGridDynamic && _.removeAsSubGrid();
4457
4468
  }
4458
- if (!n || (u && (this.engine.cleanupNode(n), n.grid = this), delete n.grid._isTemp, Z.off(r, "drag"), l !== r ? (l.remove(), r.gridstackNode = a, u && (r = r.cloneNode(!0))) : (r.remove(), this._removeDD(r)), !u))
4469
+ if (!n || (u && (this.engine.cleanupNode(n), n.grid = this), delete n.grid._isTemp, Q.off(r, "drag"), l !== r ? (l.remove(), r.gridstackNode = a, u && (r = r.cloneNode(!0))) : (r.remove(), this._removeDD(r)), !u))
4459
4470
  return !1;
4460
4471
  r.gridstackNode = n, n.el = r;
4461
4472
  let h = (d = (p = n.subGrid) == null ? void 0 : p.el) == null ? void 0 : d.gridstack;
4462
- return f.copyPos(n, this._readAttr(this.placeholder)), f.removePositioningStyles(r), this._writeAttr(r, n), r.classList.add(ae.itemClass, this.opts.itemClass), this.el.appendChild(r), h && (h.parentGridItem = n, h.opts.styleInHead || h._updateStyles(!0)), this._prepareDragDropByNode(n), this._updateContainerHeight(), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, a && a.grid ? a : void 0, n), !1;
4473
+ return f.copyPos(n, this._readAttr(this.placeholder)), f.removePositioningStyles(r), this._writeAttr(r, n), r.classList.add(he.itemClass, this.opts.itemClass), this.el.appendChild(r), h && (h.parentGridItem = n, h.opts.styleInHead || h._updateStyles(!0)), this._prepareDragDropByNode(n), this._updateContainerHeight(), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, a && a.grid ? a : void 0, n), !1;
4463
4474
  }), this;
4464
4475
  }
4465
4476
  /** @internal mark item for removal */
@@ -4473,7 +4484,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4473
4484
  let e = document.querySelector(this.opts.removable);
4474
4485
  if (!e)
4475
4486
  return this;
4476
- Z.isDroppable(e) || Z.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => this._itemRemoving(i, !0)).on(e, "dropout", (t, i) => this._itemRemoving(i, !1));
4487
+ Q.isDroppable(e) || Q.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => this._itemRemoving(i, !0)).on(e, "dropout", (t, i) => this._itemRemoving(i, !1));
4477
4488
  }
4478
4489
  return this;
4479
4490
  }
@@ -4500,7 +4511,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4500
4511
  this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), h.type === "resizestop" && (Number.isInteger(e.sizeToContent) && (e.sizeToContent = e.h), this.doContentResize(!1, !0, e));
4501
4512
  }
4502
4513
  };
4503
- Z.draggable(t, {
4514
+ Q.draggable(t, {
4504
4515
  start: n,
4505
4516
  stop: a,
4506
4517
  drag: u
@@ -4510,26 +4521,26 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4510
4521
  resize: u
4511
4522
  }), e._initDD = !0;
4512
4523
  }
4513
- return Z.draggable(t, i ? "disable" : "enable").resizable(t, s ? "disable" : "enable"), this;
4524
+ return Q.draggable(t, i ? "disable" : "enable").resizable(t, s ? "disable" : "enable"), this;
4514
4525
  }
4515
4526
  /** @internal handles actual drag/resize start */
4516
4527
  _onStartMoving(e, t, i, s, r, l) {
4517
- this.engine.cleanNodes().beginUpdate(s), this._writePosAttr(this.placeholder, s), this.el.appendChild(this.placeholder), s.el = this.placeholder, s._lastUiPosition = i.position, s._prevYPix = i.position.top, s._moving = t.type === "dragstart", delete s._lastTried, t.type === "dropover" && s._temporaryRemoved && (this.engine.addNode(s), s._moving = !0), this.engine.cacheRects(r, l, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart" && (Z.resizable(e, "option", "minWidth", r * (s.minW || 1)).resizable(e, "option", "minHeight", l * (s.minH || 1)), s.maxW && Z.resizable(e, "option", "maxWidth", r * s.maxW), s.maxH && Z.resizable(e, "option", "maxHeight", l * s.maxH));
4528
+ this.engine.cleanNodes().beginUpdate(s), this._writePosAttr(this.placeholder, s), this.el.appendChild(this.placeholder), s.el = this.placeholder, s._lastUiPosition = i.position, s._prevYPix = i.position.top, s._moving = t.type === "dragstart", delete s._lastTried, t.type === "dropover" && s._temporaryRemoved && (this.engine.addNode(s), s._moving = !0), this.engine.cacheRects(r, l, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart" && (Q.resizable(e, "option", "minWidth", r * (s.minW || 1)).resizable(e, "option", "minHeight", l * (s.minH || 1)), s.maxW && Q.resizable(e, "option", "maxWidth", r * s.maxW), s.maxH && Q.resizable(e, "option", "maxHeight", l * s.maxH));
4518
4529
  }
4519
4530
  /** @internal handles actual drag/resize */
4520
4531
  _dragOrResize(e, t, i, s, r, l) {
4521
- 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);
4522
- if (a = Math.min(a, v), h = Math.min(h, v), p = Math.min(p, m), d = Math.min(d, m), t.type === "drag") {
4532
+ let n = { ...s._orig }, u, a = this.opts.marginLeft, h = this.opts.marginRight, p = this.opts.marginTop, d = this.opts.marginBottom, _ = Math.round(l * 0.1), v = Math.round(r * 0.1);
4533
+ if (a = Math.min(a, v), h = Math.min(h, v), p = Math.min(p, _), d = Math.min(d, _), t.type === "drag") {
4523
4534
  if (s._temporaryRemoved)
4524
4535
  return;
4525
- let O = i.position.top - s._prevYPix;
4526
- s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && f.updateScrollPosition(e, i.position, O);
4527
- let A = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : a), L = i.position.top + (i.position.top > s._lastUiPosition.top ? -d : p);
4528
- n.x = Math.round(A / r), n.y = Math.round(L / l);
4536
+ let H = i.position.top - s._prevYPix;
4537
+ s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && f.updateScrollPosition(e, i.position, H);
4538
+ let C = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : a), D = i.position.top + (i.position.top > s._lastUiPosition.top ? -d : p);
4539
+ n.x = Math.round(C / r), n.y = Math.round(D / l);
4529
4540
  let S = this._extraDragRow;
4530
4541
  if (this.engine.collide(s, n)) {
4531
- let _ = this.getRow(), y = Math.max(0, n.y + s.h - _);
4532
- this.opts.maxRow && _ + y > this.opts.maxRow && (y = Math.max(0, this.opts.maxRow - _)), this._extraDragRow = y;
4542
+ let m = this.getRow(), y = Math.max(0, n.y + s.h - m);
4543
+ this.opts.maxRow && m + y > this.opts.maxRow && (y = Math.max(0, this.opts.maxRow - m)), this._extraDragRow = y;
4533
4544
  } else
4534
4545
  this._extraDragRow = 0;
4535
4546
  if (this._extraDragRow !== S && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
@@ -4537,20 +4548,20 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4537
4548
  } else if (t.type === "resize") {
4538
4549
  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)
4539
4550
  return;
4540
- let O = i.position.left + a, A = i.position.top + p;
4541
- n.x = Math.round(O / r), n.y = Math.round(A / l), u = !0;
4551
+ let H = i.position.left + a, C = i.position.top + p;
4552
+ n.x = Math.round(H / r), n.y = Math.round(C / l), u = !0;
4542
4553
  }
4543
4554
  s._event = t, s._lastTried = n;
4544
- let N = {
4555
+ let L = {
4545
4556
  x: i.position.left + a,
4546
4557
  y: i.position.top + p,
4547
4558
  w: (i.size ? i.size.width : s.w * r) - a - h,
4548
4559
  h: (i.size ? i.size.height : s.h * l) - p - d
4549
4560
  };
4550
- if (this.engine.moveNodeCheck(s, { ...n, cellWidth: r, cellHeight: l, rect: N, resizing: u })) {
4561
+ if (this.engine.moveNodeCheck(s, { ...n, cellWidth: r, cellHeight: l, rect: L, resizing: u })) {
4551
4562
  s._lastUiPosition = i.position, this.engine.cacheRects(r, l, p, h, d, a), delete s._skipDown, u && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
4552
- let O = t.target;
4553
- this._writePosAttr(O, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, O);
4563
+ let H = t.target;
4564
+ this._writePosAttr(H, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, H);
4554
4565
  }
4555
4566
  }
4556
4567
  /** @internal called when item leaving our area by either cursor dropout event
@@ -4559,44 +4570,44 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4559
4570
  */
4560
4571
  _leave(e, t) {
4561
4572
  let i = e.gridstackNode;
4562
- i && (Z.off(e, "drag"), !i._temporaryRemoved && (i._temporaryRemoved = !0, this.engine.removeNode(i), i.el = i._isExternal && t ? t : e, this.opts.removable === !0 && this._itemRemoving(e, !0), e._gridstackNodeOrig ? (e.gridstackNode = e._gridstackNodeOrig, delete e._gridstackNodeOrig) : i._isExternal && (delete i.el, delete e.gridstackNode, this.engine.restoreInitial())));
4573
+ i && (Q.off(e, "drag"), !i._temporaryRemoved && (i._temporaryRemoved = !0, this.engine.removeNode(i), i.el = i._isExternal && t ? t : e, this.opts.removable === !0 && this._itemRemoving(e, !0), e._gridstackNodeOrig ? (e.gridstackNode = e._gridstackNodeOrig, delete e._gridstackNodeOrig) : i._isExternal && (delete i.el, delete e.gridstackNode, this.engine.restoreInitial())));
4563
4574
  }
4564
4575
  // legacy method removed
4565
4576
  commit() {
4566
- return wn(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4577
+ return xn(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4567
4578
  }
4568
4579
  }
4569
- E.resizeToContentParent = ".grid-stack-item-content";
4570
- E.Utils = f;
4571
- E.Engine = me;
4572
- E.GDRev = "9.5.1";
4573
- const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class: "color-primary" }, Cn = { class: "color-secondary" }, An = {
4580
+ T.resizeToContentParent = ".grid-stack-item-content";
4581
+ T.Utils = f;
4582
+ T.Engine = be;
4583
+ T.GDRev = "9.5.1";
4584
+ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class: "color-primary" }, An = { class: "color-secondary" }, Dn = {
4574
4585
  key: 1,
4575
4586
  class: "empty"
4576
- }, Dn = {
4587
+ }, Ln = {
4577
4588
  key: 0,
4578
4589
  class: "clear-filter-div"
4579
- }, Ln = /* @__PURE__ */ ye({
4590
+ }, zn = /* @__PURE__ */ we({
4580
4591
  __name: "Filter",
4581
4592
  props: {
4582
4593
  order: {},
4583
4594
  exclude: {}
4584
4595
  },
4585
4596
  setup(o) {
4586
- const e = o, t = nt(), i = Te(() => ({ ...t.Filters })), s = Te(() => {
4597
+ const e = o, t = nt(), i = Ce(() => ({ ...t.Filters })), s = Ce(() => {
4587
4598
  const a = i.value;
4588
4599
  return Object.keys(a).map((h) => ({ key: h, value: a[h] })).filter(({ value: h }) => !(h == null || typeof h == "string" && h.trim() === "" || Array.isArray(h) && h.length === 0));
4589
- }), r = Te(() => {
4600
+ }), r = Ce(() => {
4590
4601
  var p;
4591
4602
  const a = new Set(e.exclude ?? []), h = s.value.filter((d) => !a.has(d.key));
4592
4603
  if ((p = e.order) != null && p.length) {
4593
- const d = new Map(e.order.map((m, v) => [m, v]));
4594
- h.sort((m, v) => {
4595
- const N = d.has(m.key) ? d.get(m.key) : Number.MAX_SAFE_INTEGER, O = d.has(v.key) ? d.get(v.key) : Number.MAX_SAFE_INTEGER;
4596
- return N - O || m.key.localeCompare(v.key);
4604
+ const d = new Map(e.order.map((_, v) => [_, v]));
4605
+ h.sort((_, v) => {
4606
+ const L = d.has(_.key) ? d.get(_.key) : Number.MAX_SAFE_INTEGER, H = d.has(v.key) ? d.get(v.key) : Number.MAX_SAFE_INTEGER;
4607
+ return L - H || _.key.localeCompare(v.key);
4597
4608
  });
4598
4609
  } else
4599
- h.sort((d, m) => d.key.localeCompare(m.key));
4610
+ h.sort((d, _) => d.key.localeCompare(_.key));
4600
4611
  return h;
4601
4612
  });
4602
4613
  function l(a) {
@@ -4611,30 +4622,30 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4611
4622
  }
4612
4623
  return (a, h) => {
4613
4624
  const p = ie("el-icon"), d = ie("el-row");
4614
- return T(), le(d, {
4625
+ return R(), ae(d, {
4615
4626
  class: "filter-wrapper tw-m-1",
4616
4627
  align: "middle",
4617
4628
  justify: "space-between"
4618
4629
  }, {
4619
4630
  default: q(() => [
4620
- M("div", Rn, [
4621
- r.value.length ? (T(!0), U(Le, { key: 0 }, it(r.value, (m) => (T(), le(he(Ks), {
4631
+ z("div", Sn, [
4632
+ r.value.length ? (R(!0), $(ze, { key: 0 }, it(r.value, (_) => (R(), ae(ue(Zs), {
4622
4633
  class: "color-background",
4623
- key: m.key,
4634
+ key: _.key,
4624
4635
  closable: "",
4625
- onClose: (v) => n(m.key),
4636
+ onClose: (v) => n(_.key),
4626
4637
  effect: "dark",
4627
4638
  type: "info"
4628
4639
  }, {
4629
4640
  default: q(() => [
4630
- M("b", Sn, Ce(m.key) + ": ", 1),
4631
- M("span", Cn, Ce(l(m.value)), 1)
4641
+ z("b", Cn, Ae(_.key) + ": ", 1),
4642
+ z("span", An, Ae(l(_.value)), 1)
4632
4643
  ]),
4633
4644
  _: 2
4634
- }, 1032, ["onClose"]))), 128)) : (T(), U("span", An, "No filters"))
4645
+ }, 1032, ["onClose"]))), 128)) : (R(), $("span", Dn))
4635
4646
  ]),
4636
- r.value.length ? (T(), U("div", Dn, [
4637
- X(he(as), {
4647
+ r.value.length ? (R(), $("div", Ln, [
4648
+ X(ue(hs), {
4638
4649
  placement: "top-start",
4639
4650
  content: "Clear All Filters"
4640
4651
  }, {
@@ -4644,26 +4655,26 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4644
4655
  onClick: u
4645
4656
  }, {
4646
4657
  default: q(() => [
4647
- X(he(Qs))
4658
+ X(ue(Js))
4648
4659
  ]),
4649
4660
  _: 1
4650
4661
  })
4651
4662
  ]),
4652
4663
  _: 1
4653
4664
  })
4654
- ])) : xt("", !0)
4665
+ ])) : kt("", !0)
4655
4666
  ]),
4656
4667
  _: 1
4657
4668
  });
4658
4669
  };
4659
4670
  }
4660
- }), zn = /* @__PURE__ */ Ne(Ln, [["__scopeId", "data-v-f706b94f"]]), Nn = {
4671
+ }), Nn = /* @__PURE__ */ Me(zn, [["__scopeId", "data-v-3487ec9b"]]), Mn = {
4661
4672
  key: 0,
4662
4673
  class: "content-header dash-header-visible stick-to-top tw-flex tw-flex-row tw-items-center tw-justify-between tw-h-10"
4663
- }, Mn = { class: "editing-div" }, In = { class: "tw-m-4 tw-leading-none tw-pl-1 widget-name" }, Hn = { class: "header-slot-icon" }, On = {
4674
+ }, In = { class: "editing-div" }, Hn = { class: "tw-m-4 tw-leading-none tw-pl-1 widget-name" }, On = { class: "header-slot-icon" }, Pn = {
4664
4675
  key: 1,
4665
4676
  class: "dash-header-hide content-header"
4666
- }, Pn = { class: "header-slot-icon" }, $n = {
4677
+ }, $n = { class: "header-slot-icon" }, Bn = {
4667
4678
  __name: "DashHeader",
4668
4679
  props: {
4669
4680
  widgetName: {
@@ -4678,11 +4689,11 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4678
4689
  hideHeader: Boolean
4679
4690
  },
4680
4691
  setup(o) {
4681
- const e = nt(), t = o, i = F(null);
4682
- ue(() => t.widgetName, (u) => {
4692
+ const e = nt(), t = o, i = B(null);
4693
+ ce(() => t.widgetName, (u) => {
4683
4694
  i.value = u;
4684
4695
  }, { immediate: !0 });
4685
- const s = F(!1), r = F(null);
4696
+ const s = B(!1), r = B(null);
4686
4697
  function l() {
4687
4698
  s.value = !0, r.value && r.value.focus();
4688
4699
  }
@@ -4694,18 +4705,18 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4694
4705
  u.componentName = i;
4695
4706
  }
4696
4707
  return (u, a) => {
4697
- const h = ie("el-input"), p = os("click-out");
4698
- return o.hideHeader ? (T(), U("div", On, [
4699
- M("div", Pn, [
4700
- vt(u.$slots, "default", {}, void 0, !0)
4708
+ const h = ie("el-input"), p = ls("click-out");
4709
+ return o.hideHeader ? (R(), $("div", Pn, [
4710
+ z("div", $n, [
4711
+ wt(u.$slots, "default", {}, void 0, !0)
4701
4712
  ])
4702
- ])) : (T(), U("div", Nn, [
4703
- M("div", null, [
4704
- De((T(), U("div", {
4705
- onKeyup: ls(n, ["enter"]),
4713
+ ])) : (R(), $("div", Mn, [
4714
+ z("div", null, [
4715
+ Le((R(), $("div", {
4716
+ onKeyup: as(n, ["enter"]),
4706
4717
  class: "tw-flex"
4707
4718
  }, [
4708
- De(M("div", Mn, [
4719
+ Le(z("div", In, [
4709
4720
  X(h, {
4710
4721
  onFocus: a[0] || (a[0] = (d) => d.target.select()),
4711
4722
  ref_key: "textUserInput",
@@ -4714,27 +4725,27 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4714
4725
  "onUpdate:modelValue": a[1] || (a[1] = (d) => i.value = d)
4715
4726
  }, null, 8, ["modelValue"])
4716
4727
  ], 512), [
4717
- [wt, s.value]
4728
+ [xt, s.value]
4718
4729
  ]),
4719
- De(M("div", {
4730
+ Le(z("div", {
4720
4731
  onClick: a[2] || (a[2] = (d) => l()),
4721
4732
  class: "visible-div"
4722
4733
  }, [
4723
- M("div", In, Ce(i.value), 1)
4734
+ z("div", Hn, Ae(i.value), 1)
4724
4735
  ], 512), [
4725
- [wt, !s.value]
4736
+ [xt, !s.value]
4726
4737
  ])
4727
4738
  ], 32)), [
4728
4739
  [p, n]
4729
4740
  ])
4730
4741
  ]),
4731
- M("div", Hn, [
4732
- vt(u.$slots, "default", {}, void 0, !0)
4742
+ z("div", On, [
4743
+ wt(u.$slots, "default", {}, void 0, !0)
4733
4744
  ])
4734
4745
  ]));
4735
4746
  };
4736
4747
  }
4737
- }, Bn = /* @__PURE__ */ Ne($n, [["__scopeId", "data-v-4f4aa869"]]), Un = { class: "tw-flex" }, Fn = {
4748
+ }, Un = /* @__PURE__ */ Me(Bn, [["__scopeId", "data-v-4f4aa869"]]), Fn = { class: "tw-flex" }, Wn = {
4738
4749
  __name: "WidgetWrapper",
4739
4750
  props: {
4740
4751
  widgetID: {
@@ -4766,13 +4777,13 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4766
4777
  emits: ["removeWidget", "toggle-lock"],
4767
4778
  setup(o, { emit: e }) {
4768
4779
  const t = e, i = o;
4769
- let s = F(null);
4770
- const r = F(!1);
4771
- ue(() => i.isLocked, (u) => {
4780
+ let s = B(null);
4781
+ const r = B(!1);
4782
+ ce(() => i.isLocked, (u) => {
4772
4783
  r.value = u;
4773
4784
  }, { immediate: !0 });
4774
- const l = F(null);
4775
- ue(() => i.hideWidgetsHeader, (u) => {
4785
+ const l = B(null);
4786
+ ce(() => i.hideWidgetsHeader, (u) => {
4776
4787
  l.value = u;
4777
4788
  }, { immediate: !0 });
4778
4789
  function n() {
@@ -4783,12 +4794,12 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4783
4794
  }
4784
4795
  return (u, a) => {
4785
4796
  const h = ie("el-icon");
4786
- return T(), U("div", {
4797
+ return R(), $("div", {
4787
4798
  ref_key: "instance",
4788
4799
  ref: s,
4789
4800
  class: Ws(["grid-stack-item-content", { "locked-widget": o.isLocked }])
4790
4801
  }, [
4791
- (T(), le(Ui(o.componentTag), ri({
4802
+ (R(), ae(Fi(o.componentTag), li({
4792
4803
  class: ["widget-body", { "widget-body-no-head": l.value }],
4793
4804
  widgetID: o.widgetID,
4794
4805
  hideHeader: l.value
@@ -4797,7 +4808,7 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4797
4808
  isLocked: r.value
4798
4809
  }), {
4799
4810
  default: q((p) => [
4800
- p ? (T(), le(Bn, {
4811
+ p ? (R(), ae(Un, {
4801
4812
  key: 0,
4802
4813
  widgetName: i.componentName,
4803
4814
  widgetID: o.widgetID,
@@ -4805,13 +4816,13 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4805
4816
  hideHeader: l.value
4806
4817
  }, {
4807
4818
  default: q(() => [
4808
- M("div", Un, [
4809
- (T(!0), U(Le, null, it(p.childIcons, (d) => (T(), le(he(as), { placement: "bottom-start" }, {
4819
+ z("div", Fn, [
4820
+ (R(!0), $(ze, null, it(p.childIcons, (d) => (R(), ae(ue(hs), { placement: "bottom-start" }, {
4810
4821
  content: q(() => [
4811
- We(Ce(d.tooltip), 1)
4822
+ We(Ae(d.tooltip), 1)
4812
4823
  ]),
4813
4824
  default: q(() => [
4814
- (T(), le(Ui(d.comp), {
4825
+ (R(), ae(Fi(d.comp), {
4815
4826
  class: "tw-w-4 header-icon",
4816
4827
  onClick: d.event
4817
4828
  }, null, 8, ["onClick"]))
@@ -4823,51 +4834,51 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4823
4834
  onClick: a[0] || (a[0] = (d) => n())
4824
4835
  }, {
4825
4836
  default: q(() => [
4826
- r.value ? (T(), le(he(sr), { key: 0 })) : (T(), le(he(nr), { key: 1 }))
4837
+ r.value ? (R(), ae(ue(rr), { key: 0 })) : (R(), ae(ue(or), { key: 1 }))
4827
4838
  ]),
4828
4839
  _: 1
4829
4840
  }),
4830
- !o.staticMode && !o.isLocked ? (T(), le(h, {
4841
+ !o.staticMode && !o.isLocked ? (R(), ae(h, {
4831
4842
  key: 0,
4832
4843
  class: "item-widget-button",
4833
4844
  onClick: a[1] || (a[1] = (d) => u.$emit("removeWidget"))
4834
4845
  }, {
4835
4846
  default: q(() => [
4836
- X(he(er))
4847
+ X(ue(tr))
4837
4848
  ]),
4838
4849
  _: 1
4839
- })) : xt("", !0)
4850
+ })) : kt("", !0)
4840
4851
  ])
4841
4852
  ]),
4842
4853
  _: 2
4843
- }, 1032, ["widgetName", "widgetID", "staticMode", "hideHeader"])) : xt("", !0)
4854
+ }, 1032, ["widgetName", "widgetID", "staticMode", "hideHeader"])) : kt("", !0)
4844
4855
  ]),
4845
4856
  _: 1
4846
4857
  }, 16, ["class", "widgetID", "hideHeader", "style", "isLocked"]))
4847
4858
  ], 2);
4848
4859
  };
4849
4860
  }
4850
- }, Wn = /* @__PURE__ */ Ne(Fn, [["__scopeId", "data-v-a2daf4ac"]]), Gn = { class: "dashboard-app" }, Vn = {
4861
+ }, Gn = /* @__PURE__ */ Me(Wn, [["__scopeId", "data-v-a2daf4ac"]]), Vn = { class: "dashboard-app" }, qn = {
4851
4862
  key: 0,
4852
4863
  class: "dash-header tw-max-h-screen tw-flex tw-flex-col"
4853
- }, qn = { class: "tw-float-left tw-m-1 button" }, jn = {
4864
+ }, jn = { class: "tw-float-left tw-m-1 button" }, Yn = {
4854
4865
  key: 1,
4855
4866
  class: "tw-h-10 dash-header"
4856
- }, Yn = { class: "tw-float-left tw-m-1" }, Xn = { class: "tw-m-4 tw-w-40" }, Kn = ["gs-x", "gs-y", "gs-w", "gs-h", "gs-id", "id", "props", "gs-locked", "gs-no-move", "gs-no-resize"], Zn = /* @__PURE__ */ ye({
4867
+ }, Xn = { class: "tw-float-left tw-m-1" }, Kn = { class: "tw-m-4 tw-w-40" }, Zn = ["gs-x", "gs-y", "gs-w", "gs-h", "gs-id", "id", "props", "gs-locked", "gs-no-move", "gs-no-resize"], Qn = /* @__PURE__ */ we({
4857
4868
  __name: "Dashboard",
4858
4869
  props: {
4859
4870
  hideHeader: {},
4860
4871
  options: {}
4861
4872
  },
4862
4873
  setup(o) {
4863
- const e = o, t = nt(), { DASHBOARD_ITEMS: i } = _t(t), s = {
4864
- apiUrl: Te(() => {
4865
- var _;
4866
- return (_ = t.Services) == null ? void 0 : _.ApiUrl;
4874
+ const e = o, t = nt(), { DASHBOARD_ITEMS: i } = ti(t), s = {
4875
+ apiUrl: Ce(() => {
4876
+ var m;
4877
+ return (m = t.Services) == null ? void 0 : m.ApiUrl;
4867
4878
  }),
4868
- s3Url: Te(() => {
4869
- var _;
4870
- return (_ = t.Services) == null ? void 0 : _.s3Url;
4879
+ s3Url: Ce(() => {
4880
+ var m;
4881
+ return (m = t.Services) == null ? void 0 : m.s3Url;
4871
4882
  }),
4872
4883
  filters: t.Filters,
4873
4884
  setFilter: t.setFilter,
@@ -4875,22 +4886,22 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4875
4886
  resetFilters: t.resetFilters
4876
4887
  };
4877
4888
  Gs("dashboard:globalVars", s);
4878
- let r = F("Edit Grid");
4879
- const { gridInstance: l } = _t(t), n = F(null);
4880
- let u = F(!0), a = 0;
4881
- const h = F([]), { ComponentRegistry: p } = _t(t), d = rs({});
4889
+ let r = B("Edit Grid"), l = null;
4890
+ const n = B(null);
4891
+ let u = B(!0), a = 0;
4892
+ const h = B([]), { ComponentRegistry: p } = ti(t), d = ns({});
4882
4893
  Vs(() => {
4883
- var _;
4884
- m(), t.loadFromLocalStorage(), a = ((_ = i.value) == null ? void 0 : _.length) + 1;
4894
+ var m;
4895
+ _(), t.loadFromLocalStorage(), a = ((m = i.value) == null ? void 0 : m.length) + 1;
4885
4896
  }), qs(() => {
4886
- v(), N();
4887
- });
4888
- function m() {
4889
- var _, y;
4890
- t.DefaultLayout = (_ = e.options) == null ? void 0 : _.defaultLayout, t.setOptionServices((y = e.options) == null ? void 0 : y.services);
4897
+ v(), L();
4898
+ }), js(() => t.unregisterGridProvider());
4899
+ function _() {
4900
+ var m, y;
4901
+ t.DefaultLayout = (m = e.options) == null ? void 0 : m.defaultLayout, t.setOptionServices((y = e.options) == null ? void 0 : y.services);
4891
4902
  }
4892
4903
  function v() {
4893
- const _ = {
4904
+ const m = {
4894
4905
  float: !0,
4895
4906
  column: 12,
4896
4907
  cellHeight: "70px",
@@ -4901,118 +4912,117 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
4901
4912
  handles: "e,se,s,sw,w,n"
4902
4913
  }
4903
4914
  };
4904
- l.value = E.init(_), l.value.setStatic(u.value);
4915
+ l = T.init(m), t.registerGridProvider(() => l), l.setStatic(u.value);
4905
4916
  }
4906
- ue(
4917
+ ce(
4907
4918
  () => {
4908
- var _;
4909
- return (_ = e.options) == null ? void 0 : _.availableWidgets;
4919
+ var m;
4920
+ return (m = e.options) == null ? void 0 : m.availableWidgets;
4910
4921
  },
4911
- (_) => {
4912
- p.value = {}, h.value = [], _ && _.forEach((y, P) => {
4913
- let $, C;
4922
+ (m) => {
4923
+ p.value = {}, h.value = [], m && m.forEach((y, P) => {
4924
+ let U, pe;
4914
4925
  if (y && typeof y == "object" && "name" in y && "component" in y)
4915
- $ = y.name, C = y.component;
4926
+ U = y.name, pe = y.component;
4916
4927
  else if (y && typeof y == "object" && "name" in y && "loader" in y)
4917
- $ = y.name, C = js(async () => {
4918
- const k = await y.loader();
4919
- return k.default ?? k;
4928
+ U = y.name, pe = Ys(async () => {
4929
+ const me = await y.loader();
4930
+ return me.default ?? me;
4920
4931
  });
4921
4932
  else if (y && (typeof y == "function" || typeof y == "object"))
4922
- C = y, $ = y.name || `Widget${P + 1}`;
4933
+ pe = y, U = y.name || `Widget${P + 1}`;
4923
4934
  else if (typeof y == "function")
4924
4935
  return;
4925
- !$ || !C || p.value[$] || (p.value[$] = C, h.value.push($));
4936
+ !U || !pe || p.value[U] || (p.value[U] = pe, h.value.push(U));
4926
4937
  });
4927
4938
  },
4928
4939
  { immediate: !0, deep: !0 }
4929
4940
  );
4930
- function N() {
4931
- const _ = e.options.globalData;
4932
- if (_) {
4941
+ function L() {
4942
+ const m = e.options.globalData;
4943
+ if (m) {
4933
4944
  t.clearOptionsDataItems();
4934
- for (const y in _)
4935
- t.addOptionsDataItems(y, _[y]);
4945
+ for (const y in m)
4946
+ t.addOptionsDataItems(y, m[y]);
4936
4947
  }
4937
4948
  }
4938
- ue(() => u.value, (_) => {
4939
- l.value.setStatic(_), r.value = _ ? "Edit Grid" : "Save Grid";
4949
+ ce(() => u.value, (m) => {
4950
+ l.setStatic(m), r.value = m ? "Edit Grid" : "Save Grid";
4940
4951
  });
4941
- function O(_) {
4942
- if (!_)
4952
+ function H(m) {
4953
+ if (!m)
4943
4954
  return;
4944
- const y = `${_}-${a}`, P = {
4955
+ const y = `${m}-${a}`, P = {
4945
4956
  id: y,
4946
4957
  w: 2,
4947
4958
  h: 6,
4948
4959
  autoPosition: !0,
4949
- component: p.value[_],
4950
- componentKey: _,
4951
- componentName: _,
4960
+ component: p.value[m],
4961
+ componentKey: m,
4962
+ componentName: m,
4952
4963
  Props: {}
4953
4964
  };
4954
- a++, i.value.push(P), Ys(() => {
4955
- var $;
4956
- ($ = l.value) == null || $.makeWidget(`#${y}`);
4965
+ a++, i.value.push(P), Xs(() => {
4966
+ l == null || l.makeWidget(`#${y}`);
4957
4967
  });
4958
4968
  }
4959
- function A(_) {
4960
- var y = i.value.findIndex(($) => $.id == _);
4969
+ function C(m) {
4970
+ var y = i.value.findIndex((U) => U.id == m);
4961
4971
  i.value.splice(y, 1);
4962
- const P = `#${_}`;
4963
- l.value.removeWidget(P, !1);
4972
+ const P = `#${m}`;
4973
+ l.removeWidget(P, !1);
4964
4974
  }
4965
- function L({ id: _, isLocked: y }) {
4966
- const P = d[_];
4967
- P && l.value && l.value.update(P, {
4975
+ function D({ id: m, isLocked: y }) {
4976
+ const P = d[m];
4977
+ P && l && l.update(P, {
4968
4978
  locked: !y,
4969
4979
  noMove: !y,
4970
4980
  noResize: !y
4971
- }), t.toggleWidgetLock(_);
4981
+ }), t.toggleWidgetLock(m);
4972
4982
  }
4973
4983
  function S() {
4974
4984
  u.value = !u.value, u.value && t.saveToLocalStorage();
4975
4985
  }
4976
- return (_, y) => {
4977
- const P = ie("el-button"), $ = ie("el-option"), C = ie("el-select"), k = ie("el-col");
4978
- return T(), U("div", Gn, [
4979
- _.hideHeader ? (T(), U("div", jn, [
4986
+ return (m, y) => {
4987
+ const P = ie("el-button"), U = ie("el-option"), pe = ie("el-select"), me = ie("el-col");
4988
+ return R(), $("div", Vn, [
4989
+ m.hideHeader ? (R(), $("div", Yn, [
4980
4990
  y[2] || (y[2] = We("x ", -1)),
4981
- M("span", Yn, [
4991
+ z("span", Xn, [
4982
4992
  X(P, {
4983
4993
  class: "edit-button",
4984
- onClick: y[1] || (y[1] = (R) => S())
4994
+ onClick: y[1] || (y[1] = (N) => S())
4985
4995
  }, {
4986
4996
  default: q(() => [
4987
- We(Ce(he(r)), 1)
4997
+ We(Ae(ue(r)), 1)
4988
4998
  ]),
4989
4999
  _: 1
4990
5000
  })
4991
5001
  ])
4992
- ])) : (T(), U("div", Vn, [
4993
- M("span", qn, [
5002
+ ])) : (R(), $("div", qn, [
5003
+ z("span", jn, [
4994
5004
  X(P, {
4995
5005
  class: "edit-button",
4996
- onClick: y[0] || (y[0] = (R) => S())
5006
+ onClick: y[0] || (y[0] = (N) => S())
4997
5007
  }, {
4998
5008
  default: q(() => [
4999
- We(Ce(he(r)), 1)
5009
+ We(Ae(ue(r)), 1)
5000
5010
  ]),
5001
5011
  _: 1
5002
5012
  })
5003
5013
  ]),
5004
- X(zn)
5014
+ X(Nn)
5005
5015
  ])),
5006
- he(u) ? xt("", !0) : (T(), le(k, { key: 2 }, {
5016
+ ue(u) ? kt("", !0) : (R(), ae(me, { key: 2 }, {
5007
5017
  default: q(() => [
5008
- M("div", Xn, [
5009
- X(C, { placeholder: "Add New Widget" }, {
5018
+ z("div", Kn, [
5019
+ X(pe, { placeholder: "Add New Widget" }, {
5010
5020
  default: q(() => [
5011
- (T(!0), U(Le, null, it(h.value, (R) => (T(), le($, {
5012
- key: R,
5013
- label: R,
5014
- value: R,
5015
- onClick: (z) => O(R)
5021
+ (R(!0), $(ze, null, it(h.value, (N) => (R(), ae(U, {
5022
+ key: N,
5023
+ label: N,
5024
+ value: N,
5025
+ onClick: (x) => H(N)
5016
5026
  }, null, 8, ["label", "value", "onClick"]))), 128))
5017
5027
  ]),
5018
5028
  _: 1
@@ -5021,49 +5031,49 @@ const Rn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Sn = { class:
5021
5031
  ]),
5022
5032
  _: 1
5023
5033
  })),
5024
- M("div", {
5034
+ z("div", {
5025
5035
  ref_key: "root",
5026
5036
  ref: n,
5027
5037
  class: "grid-stack tw-h-screen"
5028
5038
  }, [
5029
- (T(!0), U(Le, null, it(he(i), (R) => {
5030
- var z, Q, Re, Se;
5031
- return T(), U("div", {
5039
+ (R(!0), $(ze, null, it(ue(i), (N) => {
5040
+ var x, E, K, W;
5041
+ return R(), $("div", {
5032
5042
  class: "grid-stack-item",
5033
5043
  ref_for: !0,
5034
- ref: (Ie) => d[R.id] = Ie,
5035
- "gs-x": R.x,
5036
- "gs-y": R.y,
5037
- "gs-w": R.w,
5038
- "gs-h": R.h,
5039
- "gs-id": R.id,
5040
- id: R.id,
5041
- key: R.id,
5042
- props: R.Props,
5043
- "gs-locked": (z = R.Props) == null ? void 0 : z.locked,
5044
- "gs-no-move": (Q = R.Props) == null ? void 0 : Q.locked,
5045
- "gs-no-resize": (Re = R.Props) == null ? void 0 : Re.locked
5044
+ ref: (oe) => d[N.id] = oe,
5045
+ "gs-x": N.x,
5046
+ "gs-y": N.y,
5047
+ "gs-w": N.w,
5048
+ "gs-h": N.h,
5049
+ "gs-id": N.id,
5050
+ id: N.id,
5051
+ key: N.id,
5052
+ props: N.Props,
5053
+ "gs-locked": (x = N.Props) == null ? void 0 : x.locked,
5054
+ "gs-no-move": (E = N.Props) == null ? void 0 : E.locked,
5055
+ "gs-no-resize": (K = N.Props) == null ? void 0 : K.locked
5046
5056
  }, [
5047
- X(Wn, {
5048
- widgetID: R.id,
5049
- onRemoveWidget: (Ie) => A(R.id),
5050
- onToggleLock: L,
5051
- "static-mode": he(u),
5052
- componentTag: R.component,
5053
- componentProperties: R.Props,
5054
- componentName: R.componentName,
5055
- hideWidgetsHeader: R.hideHeader,
5056
- "is-locked": (Se = R.Props) == null ? void 0 : Se.locked
5057
+ X(Gn, {
5058
+ widgetID: N.id,
5059
+ onRemoveWidget: (oe) => C(N.id),
5060
+ onToggleLock: D,
5061
+ "static-mode": ue(u),
5062
+ componentTag: N.component,
5063
+ componentProperties: N.Props,
5064
+ componentName: N.componentName,
5065
+ hideWidgetsHeader: N.hideHeader,
5066
+ "is-locked": (W = N.Props) == null ? void 0 : W.locked
5057
5067
  }, null, 8, ["widgetID", "onRemoveWidget", "static-mode", "componentTag", "componentProperties", "componentName", "hideWidgetsHeader", "is-locked"])
5058
- ], 8, Kn);
5068
+ ], 8, Zn);
5059
5069
  }), 128))
5060
5070
  ], 512)
5061
5071
  ]);
5062
5072
  };
5063
5073
  }
5064
- }), ro = /* @__PURE__ */ Ne(Zn, [["__scopeId", "data-v-e3de89f1"]]);
5074
+ }), no = /* @__PURE__ */ Me(Qn, [["__scopeId", "data-v-8526759f"]]);
5065
5075
  export {
5066
- so as MarkdownWidget,
5067
- ro as PennsieveDashboard,
5068
- io as TextWidget
5076
+ ro as MarkdownWidget,
5077
+ no as PennsieveDashboard,
5078
+ so as TextWidget
5069
5079
  };