@opengis/bi 1.2.26 → 1.2.27

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,15 +1,15 @@
1
- var ds = Object.defineProperty;
2
- var us = (s, e, t) => e in s ? ds(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var P = (s, e, t) => us(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { h as Ke, defineComponent as ge, ref as I, computed as F, onUnmounted as Ue, createElementBlock as y, openBlock as p, Fragment as U, createElementVNode as h, createCommentVNode as A, createTextVNode as X, toDisplayString as W, renderList as Z, mergeModels as Be, useModel as Ut, withDirectives as Gt, normalizeClass as ee, vModelCheckbox as hs, defineAsyncComponent as M, onMounted as le, watch as te, normalizeStyle as Ge, createBlock as N, createVNode as T, unref as E, resolveDynamicComponent as Ht, createStaticVNode as ps, mergeProps as he, resolveComponent as J, withCtx as j, Teleport as fs, Transition as gs, withModifiers as ms, renderSlot as St, getCurrentInstance as me, onErrorCaptured as bs, inject as Zt, vModelText as xs, provide as Qe, readonly as ys } from "vue";
5
- import { useRouter as we, useRoute as ws } from "vue-router";
1
+ var us = Object.defineProperty;
2
+ var hs = (s, e, t) => e in s ? us(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var P = (s, e, t) => hs(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { h as Ke, defineComponent as ge, ref as I, computed as q, onUnmounted as Ue, createElementBlock as x, openBlock as h, Fragment as U, createElementVNode as c, createCommentVNode as A, createTextVNode as X, toDisplayString as W, renderList as Z, mergeModels as Be, useModel as Gt, withDirectives as et, normalizeClass as se, vModelCheckbox as ps, defineAsyncComponent as M, onMounted as le, watch as ae, normalizeStyle as Ge, createBlock as E, createVNode as T, unref as N, withModifiers as Ht, resolveDynamicComponent as Zt, createStaticVNode as fs, mergeProps as he, resolveComponent as K, withCtx as j, Teleport as gs, Transition as ms, renderSlot as Rt, getCurrentInstance as me, onErrorCaptured as bs, inject as Qt, vModelText as xs, vModelSelect as ys, provide as Qe, readonly as ws } from "vue";
5
+ import { useRouter as we, useRoute as vs } from "vue-router";
6
6
  /**
7
7
  * @license lucide-vue-next v0.577.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */
12
- const vs = (s) => {
12
+ const ks = (s) => {
13
13
  for (const e in s)
14
14
  if (e.startsWith("aria-") || e === "role" || e === "title")
15
15
  return !0;
@@ -21,14 +21,14 @@ const vs = (s) => {
21
21
  * This source code is licensed under the ISC license.
22
22
  * See the LICENSE file in the root directory of this source tree.
23
23
  */
24
- const Rt = (s) => s === "";
24
+ const Vt = (s) => s === "";
25
25
  /**
26
26
  * @license lucide-vue-next v0.577.0 - ISC
27
27
  *
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
30
  */
31
- const ks = (...s) => s.filter((e, t, a) => !!e && e.trim() !== "" && a.indexOf(e) === t).join(" ").trim();
31
+ const $s = (...s) => s.filter((e, t, a) => !!e && e.trim() !== "" && a.indexOf(e) === t).join(" ").trim();
32
32
  /**
33
33
  * @license lucide-vue-next v0.577.0 - ISC
34
34
  *
@@ -42,7 +42,7 @@ const Lt = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
42
42
  * This source code is licensed under the ISC license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
44
  */
45
- const $s = (s) => s.replace(
45
+ const _s = (s) => s.replace(
46
46
  /^([A-Z])|[\s-_]+(\w)/g,
47
47
  (e, t, a) => a ? a.toUpperCase() : t.toLowerCase()
48
48
  );
@@ -52,8 +52,8 @@ const $s = (s) => s.replace(
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
54
  */
55
- const _s = (s) => {
56
- const e = $s(s);
55
+ const Ds = (s) => {
56
+ const e = _s(s);
57
57
  return e.charAt(0).toUpperCase() + e.slice(1);
58
58
  };
59
59
  /**
@@ -79,7 +79,7 @@ var ze = {
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
81
  */
82
- const Ds = ({
82
+ const Cs = ({
83
83
  name: s,
84
84
  iconNode: e,
85
85
  absoluteStrokeWidth: t,
@@ -89,7 +89,7 @@ const Ds = ({
89
89
  size: n = ze.width,
90
90
  color: o = ze.stroke,
91
91
  ...l
92
- }, { slots: c }) => Ke(
92
+ }, { slots: d }) => Ke(
93
93
  "svg",
94
94
  {
95
95
  ...ze,
@@ -97,15 +97,15 @@ const Ds = ({
97
97
  width: n,
98
98
  height: n,
99
99
  stroke: o,
100
- "stroke-width": Rt(t) || Rt(a) || t === !0 || a === !0 ? Number(r || i || ze["stroke-width"]) * 24 / Number(n) : r || i || ze["stroke-width"],
101
- class: ks(
100
+ "stroke-width": Vt(t) || Vt(a) || t === !0 || a === !0 ? Number(r || i || ze["stroke-width"]) * 24 / Number(n) : r || i || ze["stroke-width"],
101
+ class: $s(
102
102
  "lucide",
103
103
  l.class,
104
- ...s ? [`lucide-${Lt(_s(s))}-icon`, `lucide-${Lt(s)}`] : ["lucide-icon"]
104
+ ...s ? [`lucide-${Lt(Ds(s))}-icon`, `lucide-${Lt(s)}`] : ["lucide-icon"]
105
105
  ),
106
- ...!c.default && !vs(l) && { "aria-hidden": "true" }
106
+ ...!d.default && !ks(l) && { "aria-hidden": "true" }
107
107
  },
108
- [...e.map((u) => Ke(...u)), ...c.default ? [c.default()] : []]
108
+ [...e.map((u) => Ke(...u)), ...d.default ? [d.default()] : []]
109
109
  );
110
110
  /**
111
111
  * @license lucide-vue-next v0.577.0 - ISC
@@ -113,8 +113,8 @@ const Ds = ({
113
113
  * This source code is licensed under the ISC license.
114
114
  * See the LICENSE file in the root directory of this source tree.
115
115
  */
116
- const se = (s, e) => (t, { slots: a, attrs: r }) => Ke(
117
- Ds,
116
+ const ee = (s, e) => (t, { slots: a, attrs: r }) => Ke(
117
+ Cs,
118
118
  {
119
119
  ...r,
120
120
  ...t,
@@ -129,7 +129,19 @@ const se = (s, e) => (t, { slots: a, attrs: r }) => Ke(
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
131
  */
132
- const Cs = se("chevron-right", [
132
+ const zs = ee("arrow-up-down", [
133
+ ["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
134
+ ["path", { d: "M17 20V4", key: "1ejh1v" }],
135
+ ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
136
+ ["path", { d: "M7 4v16", key: "1glfcx" }]
137
+ ]);
138
+ /**
139
+ * @license lucide-vue-next v0.577.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */
144
+ const Ts = ee("chevron-right", [
133
145
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
134
146
  ]);
135
147
  /**
@@ -138,7 +150,7 @@ const Cs = se("chevron-right", [
138
150
  * This source code is licensed under the ISC license.
139
151
  * See the LICENSE file in the root directory of this source tree.
140
152
  */
141
- const zs = se("download", [
153
+ const Is = ee("download", [
142
154
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
143
155
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
144
156
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
@@ -149,7 +161,7 @@ const zs = se("download", [
149
161
  * This source code is licensed under the ISC license.
150
162
  * See the LICENSE file in the root directory of this source tree.
151
163
  */
152
- const Ts = se("ellipsis-vertical", [
164
+ const Ss = ee("ellipsis-vertical", [
153
165
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
154
166
  ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
155
167
  ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
@@ -160,7 +172,7 @@ const Ts = se("ellipsis-vertical", [
160
172
  * This source code is licensed under the ISC license.
161
173
  * See the LICENSE file in the root directory of this source tree.
162
174
  */
163
- const Is = se("funnel", [
175
+ const Rs = ee("funnel", [
164
176
  [
165
177
  "path",
166
178
  {
@@ -175,7 +187,7 @@ const Is = se("funnel", [
175
187
  * This source code is licensed under the ISC license.
176
188
  * See the LICENSE file in the root directory of this source tree.
177
189
  */
178
- const Ss = se("layout-dashboard", [
190
+ const Vs = ee("layout-dashboard", [
179
191
  ["rect", { width: "7", height: "9", x: "3", y: "3", rx: "1", key: "10lvy0" }],
180
192
  ["rect", { width: "7", height: "5", x: "14", y: "3", rx: "1", key: "16une8" }],
181
193
  ["rect", { width: "7", height: "9", x: "14", y: "12", rx: "1", key: "1hutg5" }],
@@ -187,7 +199,7 @@ const Ss = se("layout-dashboard", [
187
199
  * This source code is licensed under the ISC license.
188
200
  * See the LICENSE file in the root directory of this source tree.
189
201
  */
190
- const Rs = se("layout-grid", [
202
+ const Ls = ee("layout-grid", [
191
203
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
192
204
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
193
205
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
@@ -199,7 +211,7 @@ const Rs = se("layout-grid", [
199
211
  * This source code is licensed under the ISC license.
200
212
  * See the LICENSE file in the root directory of this source tree.
201
213
  */
202
- const Ls = se("pencil", [
214
+ const Ws = ee("pencil", [
203
215
  [
204
216
  "path",
205
217
  {
@@ -215,7 +227,7 @@ const Ls = se("pencil", [
215
227
  * This source code is licensed under the ISC license.
216
228
  * See the LICENSE file in the root directory of this source tree.
217
229
  */
218
- const Qt = se("plus", [
230
+ const Xt = ee("plus", [
219
231
  ["path", { d: "M5 12h14", key: "1ays0h" }],
220
232
  ["path", { d: "M12 5v14", key: "s699le" }]
221
233
  ]);
@@ -225,7 +237,7 @@ const Qt = se("plus", [
225
237
  * This source code is licensed under the ISC license.
226
238
  * See the LICENSE file in the root directory of this source tree.
227
239
  */
228
- const Vs = se("save", [
240
+ const Ns = ee("save", [
229
241
  [
230
242
  "path",
231
243
  {
@@ -242,7 +254,7 @@ const Vs = se("save", [
242
254
  * This source code is licensed under the ISC license.
243
255
  * See the LICENSE file in the root directory of this source tree.
244
256
  */
245
- const Vt = se("search", [
257
+ const Wt = ee("search", [
246
258
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
247
259
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
248
260
  ]);
@@ -252,7 +264,7 @@ const Vt = se("search", [
252
264
  * This source code is licensed under the ISC license.
253
265
  * See the LICENSE file in the root directory of this source tree.
254
266
  */
255
- const Ws = se("table-2", [
267
+ const Es = ee("table-2", [
256
268
  [
257
269
  "path",
258
270
  {
@@ -267,7 +279,7 @@ const Ws = se("table-2", [
267
279
  * This source code is licensed under the ISC license.
268
280
  * See the LICENSE file in the root directory of this source tree.
269
281
  */
270
- const Ns = se("trash-2", [
282
+ const js = ee("trash-2", [
271
283
  ["path", { d: "M10 11v6", key: "nco0om" }],
272
284
  ["path", { d: "M14 11v6", key: "outv1u" }],
273
285
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
@@ -280,7 +292,7 @@ const Ns = se("trash-2", [
280
292
  * This source code is licensed under the ISC license.
281
293
  * See the LICENSE file in the root directory of this source tree.
282
294
  */
283
- const Es = se("x", [
295
+ const Bs = ee("x", [
284
296
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
285
297
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
286
298
  ]), Xe = {
@@ -288,7 +300,7 @@ const Es = se("x", [
288
300
  month: "Місяць",
289
301
  quarter: "Квартал",
290
302
  year: "Рік"
291
- }, js = ["onClick"], Bs = { class: "flex items-center justify-between w-full" }, Os = { key: 0 }, Ps = /* @__PURE__ */ ge({
303
+ }, Os = ["onClick"], Ps = { class: "flex items-center justify-between w-full" }, As = { key: 0 }, Fs = /* @__PURE__ */ ge({
292
304
  __name: "vs-bi-dropdown",
293
305
  props: {
294
306
  title: {},
@@ -297,35 +309,35 @@ const Es = se("x", [
297
309
  },
298
310
  emits: ["selected"],
299
311
  setup(s, { emit: e }) {
300
- const t = s, a = e, r = I(!1), i = I(t.value ?? null), n = I(null), o = F(() => {
301
- const g = t.options;
302
- return typeof g == "string" ? g.split(",").map((b, k) => ({ id: k, text: b.trim() })) : Array.isArray(g) ? g : [];
303
- }), l = F(() => {
304
- const g = o.value.find(
312
+ const t = s, a = e, r = I(!1), i = I(t.value ?? null), n = I(null), o = q(() => {
313
+ const m = t.options;
314
+ return typeof m == "string" ? m.split(",").map((b, k) => ({ id: k, text: b.trim() })) : Array.isArray(m) ? m : [];
315
+ }), l = q(() => {
316
+ const m = o.value.find(
305
317
  (b) => (b.id ?? b) === i.value
306
318
  );
307
- return g ? g.text ?? String(g) : t.title ?? "";
308
- }), c = (g) => {
309
- const b = (g == null ? void 0 : g.id) ?? g;
319
+ return m ? m.text ?? String(m) : t.title ?? "";
320
+ }), d = (m) => {
321
+ const b = (m == null ? void 0 : m.id) ?? m;
310
322
  i.value = b, r.value = !1, a("selected", b), document.removeEventListener("click", u);
311
- }, u = (g) => {
312
- n.value && !n.value.contains(g.target) && (r.value = !1, document.removeEventListener("click", u));
313
- }, f = () => {
323
+ }, u = (m) => {
324
+ n.value && !n.value.contains(m.target) && (r.value = !1, document.removeEventListener("click", u));
325
+ }, p = () => {
314
326
  r.value = !r.value, r.value ? setTimeout(() => {
315
327
  document.addEventListener("click", u);
316
328
  }, 200) : document.removeEventListener("click", u);
317
- }, v = (g) => (Xe == null ? void 0 : Xe[g]) ?? g;
329
+ }, v = (m) => (Xe == null ? void 0 : Xe[m]) ?? m;
318
330
  return Ue(() => {
319
331
  document.removeEventListener("click", u);
320
- }), (g, b) => (p(), y(U, null, [
321
- h("button", {
332
+ }), (m, b) => (h(), x(U, null, [
333
+ c("button", {
322
334
  type: "button",
323
335
  "aria-expanded": "true",
324
336
  class: "hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative group pr-2 -ms-2 py-1.5 pl-2.5 inline-flex shrink-0 justify-center items-center gap-x-1.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 before:absolute before:inset-0 before:z-[1] dark:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:bg-neutral-700",
325
- onClick: f
337
+ onClick: p
326
338
  }, [
327
339
  X(W(v(l.value)) + " ", 1),
328
- b[0] || (b[0] = h("svg", {
340
+ b[0] || (b[0] = c("svg", {
329
341
  class: "shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",
330
342
  xmlns: "http://www.w3.org/2000/svg",
331
343
  width: "16",
@@ -337,10 +349,10 @@ const Es = se("x", [
337
349
  "stroke-linecap": "round",
338
350
  "stroke-linejoin": "round"
339
351
  }, [
340
- h("path", { d: "m6 9 6 6 6-6" })
352
+ c("path", { d: "m6 9 6 6 6-6" })
341
353
  ], -1))
342
354
  ]),
343
- r.value ? (p(), y("div", {
355
+ r.value ? (h(), x("div", {
344
356
  key: 0,
345
357
  ref_key: "biDropdown",
346
358
  ref: n,
@@ -351,15 +363,15 @@ const Es = se("x", [
351
363
  "aria-orientation": "vertical",
352
364
  style: { "margin-top": "10px" }
353
365
  }, [
354
- (p(!0), y(U, null, Z(o.value, (k) => (p(), y("div", {
366
+ (h(!0), x(U, null, Z(o.value, (k) => (h(), x("div", {
355
367
  key: k.id || k,
356
368
  class: "cursor-pointer selected hs-selected:bg-gray-100 dark:hs-selected:bg-neutral-800 py-1.5 px-2 w-full text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
357
- onClick: ($) => c(k)
369
+ onClick: (D) => d(k)
358
370
  }, [
359
- h("div", Bs, [
360
- h("span", null, W(v(k.text || k)), 1),
361
- i.value === (k.id || k) ? (p(), y("span", Os, [...b[1] || (b[1] = [
362
- h("svg", {
371
+ c("div", Ps, [
372
+ c("span", null, W(v(k.text || k)), 1),
373
+ i.value === (k.id || k) ? (h(), x("span", As, [...b[1] || (b[1] = [
374
+ c("svg", {
363
375
  class: "shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",
364
376
  xmlns: "http:.w3.org/2000/svg",
365
377
  width: "24",
@@ -371,15 +383,15 @@ const Es = se("x", [
371
383
  "stroke-linecap": "round",
372
384
  "stroke-linejoin": "round"
373
385
  }, [
374
- h("polyline", { points: "20 6 9 17 4 12" })
386
+ c("polyline", { points: "20 6 9 17 4 12" })
375
387
  ], -1)
376
388
  ])])) : A("", !0)
377
389
  ])
378
- ], 8, js))), 128))
390
+ ], 8, Os))), 128))
379
391
  ], 512)) : A("", !0)
380
392
  ], 64));
381
393
  }
382
- }), As = { class: "flex items-center space-x-2" }, Fs = /* @__PURE__ */ ge({
394
+ }), qs = { class: "flex items-center space-x-2" }, Ms = /* @__PURE__ */ ge({
383
395
  __name: "vs-bi-switch",
384
396
  props: /* @__PURE__ */ Be({
385
397
  leftLabel: {},
@@ -394,25 +406,25 @@ const Es = se("x", [
394
406
  }),
395
407
  emits: /* @__PURE__ */ Be(["update:is-enabled"], ["update:modelValue"]),
396
408
  setup(s, { emit: e }) {
397
- const t = e, a = Ut(s, "modelValue"), r = () => {
409
+ const t = e, a = Gt(s, "modelValue"), r = () => {
398
410
  t("update:is-enabled", a);
399
411
  };
400
- return (i, n) => (p(), y("div", As, [
401
- s.leftLabel ? (p(), y("div", {
412
+ return (i, n) => (h(), x("div", qs, [
413
+ s.leftLabel ? (h(), x("div", {
402
414
  key: 0,
403
- class: ee(["transition-colors", { "text-blue-500": !a.value }])
415
+ class: se(["transition-colors", { "text-blue-500": !a.value }])
404
416
  }, W(s.leftLabel), 3)) : A("", !0),
405
- Gt(h("input", {
417
+ et(c("input", {
406
418
  "onUpdate:modelValue": n[0] || (n[0] = (o) => a.value = o),
407
419
  type: "checkbox",
408
420
  class: "relative w-11 h-6 p-px bg-gray-100 border-transparent text-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:ring-blue-600 disabled:opacity-50 disabled:pointer-events-none checked:bg-none checked:text-blue-600 checked:border-blue-600 focus:checked:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-600 before:inline-block before:size-5 before:bg-white checked:before:bg-blue-200 before:translate-x-0 checked:before:translate-x-full before:rounded-full before:shadow before:h-5 before:w-5 before:transform before:ring-0 before:transition before:ease-in-out before:duration-200 dark:before:bg-neutral-400 dark:checked:before:bg-blue-200",
409
421
  onChange: r
410
422
  }, null, 544), [
411
- [hs, a.value]
423
+ [ps, a.value]
412
424
  ]),
413
- s.rightLabel ? (p(), y("div", {
425
+ s.rightLabel ? (h(), x("div", {
414
426
  key: 1,
415
- class: ee(["transition-colors", { "text-blue-500": a.value }])
427
+ class: se(["transition-colors", { "text-blue-500": a.value }])
416
428
  }, W(s.rightLabel), 3)) : A("", !0)
417
429
  ]));
418
430
  }
@@ -421,36 +433,36 @@ const Es = se("x", [
421
433
  for (const [a, r] of e)
422
434
  t[a] = r;
423
435
  return t;
424
- }, qs = {}, Ms = { class: "flex items-center justify-center h-full" };
425
- function Us(s, e) {
426
- return p(), y("div", Ms, [...e[0] || (e[0] = [
427
- h("div", { class: "text-center text-gray-500" }, [
428
- h("h2", { class: "text-2xl font-bold" }, "No data available")
436
+ }, Us = {}, Gs = { class: "flex items-center justify-center h-full" };
437
+ function Hs(s, e) {
438
+ return h(), x("div", Gs, [...e[0] || (e[0] = [
439
+ c("div", { class: "text-center text-gray-500" }, [
440
+ c("h2", { class: "text-2xl font-bold" }, "No data available")
429
441
  ], -1)
430
442
  ])]);
431
443
  }
432
- const Gs = /* @__PURE__ */ Q(qs, [["render", Us]]), Wt = {
433
- "bi-bar": M(() => Promise.resolve().then(() => Jn)),
434
- "bi-number": M(() => import("./vs-number-BM6bcbqf.js")),
435
- "bi-text": M(() => import("./vs-text-gU23_bK6.js")),
436
- "bi-listbar": M(() => Promise.resolve().then(() => Yi)),
437
- "bi-pie": M(() => Promise.resolve().then(() => li)),
438
- "bi-donut": M(() => Promise.resolve().then(() => ai)),
439
- "bi-line": M(() => Promise.resolve().then(() => pi)),
440
- "bi-stat": M(() => Promise.resolve().then(() => Ii)),
441
- "bi-pivot": M(() => Promise.resolve().then(() => go)),
442
- "bi-progress": M(() => Promise.resolve().then(() => Fi)),
443
- "bi-funnel": M(() => import("./vs-funnel-bar-Bm8btLrA.js")),
444
- "bi-map": M(() => import("./vs-map-3A5t9VTQ.js")),
445
- "bi-cluster": M(() => import("./vs-map-cluster-DKZhfi6w.js")),
446
- "bi-table": M(() => import("./vs-table-CYix8IRT.js"))
444
+ const Zs = /* @__PURE__ */ Q(Us, [["render", Hs]]), Nt = {
445
+ "bi-bar": M(() => Promise.resolve().then(() => ei)),
446
+ "bi-number": M(() => import("./vs-number-BvAcFzRT.js")),
447
+ "bi-text": M(() => import("./vs-text-GIhpwEL4.js")),
448
+ "bi-listbar": M(() => Promise.resolve().then(() => Ki)),
449
+ "bi-pie": M(() => Promise.resolve().then(() => ci)),
450
+ "bi-donut": M(() => Promise.resolve().then(() => ni)),
451
+ "bi-line": M(() => Promise.resolve().then(() => gi)),
452
+ "bi-stat": M(() => Promise.resolve().then(() => Ri)),
453
+ "bi-pivot": M(() => Promise.resolve().then(() => bo)),
454
+ "bi-progress": M(() => Promise.resolve().then(() => Mi)),
455
+ "bi-funnel": M(() => import("./vs-funnel-bar-DwVkX7Q2.js")),
456
+ "bi-map": M(() => import("./vs-map-BeYJ2aj0.js")),
457
+ "bi-cluster": M(() => import("./vs-map-cluster-ltvourI_.js")),
458
+ "bi-table": M(() => import("./vs-table-CBFIS-pF.js"))
447
459
  };
448
- let Xt = "/api";
460
+ let Yt = "/api";
449
461
  function He(s) {
450
- Xt = s || "/api";
462
+ Yt = s || "/api";
451
463
  }
452
- function Hs(s, e) {
453
- const t = Xt.replace(/\/$/, ""), r = s.startsWith("http") || s.startsWith("//") || t && s.startsWith(t) ? s : `${t}${s.startsWith("/") ? s : `/${s}`}`;
464
+ function Qs(s, e) {
465
+ const t = Yt.replace(/\/$/, ""), r = s.startsWith("http") || s.startsWith("//") || t && s.startsWith(t) ? s : `${t}${s.startsWith("/") ? s : `/${s}`}`;
454
466
  if (!e || !Object.keys(e).length) return r;
455
467
  const i = new URLSearchParams();
456
468
  Object.entries(e).forEach(([o, l]) => {
@@ -460,7 +472,7 @@ function Hs(s, e) {
460
472
  return n ? `${r}${r.includes("?") ? "&" : "?"}${n}` : r;
461
473
  }
462
474
  async function Ee(s, e = {}) {
463
- const { params: t, ...a } = e, r = Hs(s, t), i = {
475
+ const { params: t, ...a } = e, r = Qs(s, t), i = {
464
476
  ...a.headers
465
477
  };
466
478
  a.body != null && (i["Content-Type"] = i["Content-Type"] ?? "application/json");
@@ -490,13 +502,13 @@ const H = {
490
502
  delete(s) {
491
503
  return Ee(s, { method: "DELETE" });
492
504
  }
493
- }, Zs = {
505
+ }, Xs = {
494
506
  key: 0,
495
507
  class: "text-[16px] flex max-w-full items-center min-h-0 justify-between h-fit shrink-0"
496
- }, Qs = { class: "flex items-center justify-between w-full gap-2" }, Xs = { class: "flex items-center gap-2 min-w-0" }, Ys = { class: "text-gray-800 inline-block line-clamp-1 font-semibold" }, Js = { class: "flex flex-col justify-end" }, Ks = {
508
+ }, Ys = { class: "flex items-center justify-between w-full gap-2" }, Js = { class: "flex items-center gap-2 min-w-0" }, Ks = { class: "text-gray-800 inline-block line-clamp-1 font-semibold" }, ea = { class: "flex flex-col justify-end" }, ta = {
497
509
  key: 0,
498
510
  class: "flex items-center justify-end w-full gap-2"
499
- }, ea = { class: "w-full h-full" }, Oe = /* @__PURE__ */ ge({
511
+ }, Oe = /* @__PURE__ */ ge({
500
512
  __name: "vs-widget",
501
513
  props: {
502
514
  dashboard: {},
@@ -510,117 +522,117 @@ const H = {
510
522
  },
511
523
  emits: ["update:current-widget-data"],
512
524
  setup(s, { emit: e }) {
513
- const t = s, a = e, r = I(null), i = I(null), n = I(null), o = I({}), l = I([]), c = F(() => {
514
- var d, x;
515
- const w = (d = t.dashboardWidgets) == null ? void 0 : d.find((_) => _.name === t.widget);
516
- return ((x = w == null ? void 0 : w.data) == null ? void 0 : x.title) ?? (w == null ? void 0 : w.title) ?? "";
517
- }), u = F(() => {
518
- var d;
519
- const w = (d = t.dashboardWidgets) == null ? void 0 : d.find((x) => x.name === t.widget);
520
- return (w == null ? void 0 : w.type) ?? "text";
521
- }), f = F(() => {
522
- var w, d;
523
- return t.height || ((d = (w = o.value) == null ? void 0 : w.style) == null ? void 0 : d.height) || 480;
524
- }), v = F(() => {
525
- var d;
526
- const w = (d = o.value) == null ? void 0 : d.controls;
527
- return !w || typeof w == "boolean" ? [] : Object.keys(w).map((x) => ({
528
- name: x,
529
- options: w[x]
525
+ const t = s, a = e, r = I(null), i = I(null), n = I(null), o = I({}), l = I([]), d = q(() => {
526
+ var f, w;
527
+ const y = (f = t.dashboardWidgets) == null ? void 0 : f.find(($) => $.name === t.widget);
528
+ return ((w = y == null ? void 0 : y.data) == null ? void 0 : w.title) ?? (y == null ? void 0 : y.title) ?? "";
529
+ }), u = q(() => {
530
+ var f;
531
+ const y = (f = t.dashboardWidgets) == null ? void 0 : f.find((w) => w.name === t.widget);
532
+ return (y == null ? void 0 : y.type) ?? "text";
533
+ }), p = q(() => {
534
+ var y, f;
535
+ return t.height || ((f = (y = o.value) == null ? void 0 : y.style) == null ? void 0 : f.height) || 480;
536
+ }), v = q(() => {
537
+ var f;
538
+ const y = (f = o.value) == null ? void 0 : f.controls;
539
+ return !y || typeof y == "boolean" ? [] : Object.keys(y).map((w) => ({
540
+ name: w,
541
+ options: y[w]
530
542
  }));
531
- }), g = F(() => {
532
- const w = u.value ? `bi-${u.value}` : "";
533
- return w && w in Wt ? Wt[w] : null;
543
+ }), m = q(() => {
544
+ const y = u.value ? `bi-${u.value}` : "";
545
+ return y && y in Nt ? Nt[y] : null;
534
546
  });
535
- function b(w, d) {
536
- var x, _;
537
- (_ = (x = i.value) == null ? void 0 : x.changeStyle) == null || _.call(x, w, d);
547
+ function b(y, f) {
548
+ var w, $;
549
+ ($ = (w = i.value) == null ? void 0 : w.changeStyle) == null || $.call(w, y, f);
538
550
  }
539
- function k(w, d) {
540
- const x = l.value.find((_) => _.name === d);
541
- x ? x.option = w : l.value.push({ name: d, option: w }), $();
551
+ function k(y, f) {
552
+ const w = l.value.find(($) => $.name === f);
553
+ w ? w.option = y : l.value.push({ name: f, option: y }), D();
542
554
  }
543
- function $() {
544
- var d, x;
545
- let w = `/bi-data?dashboard=${t.dashboard}&widget=${t.widget}`;
546
- l.value.forEach((_) => {
547
- w += `&${_.name}=${_.option}`;
548
- }), (x = (d = i.value) == null ? void 0 : d.getDataFromURL) == null || x.call(d, w);
555
+ function D() {
556
+ var f, w;
557
+ let y = `/bi-data?dashboard=${t.dashboard}&widget=${t.widget}`;
558
+ l.value.forEach(($) => {
559
+ y += `&${$.name}=${$.option}`;
560
+ }), (w = (f = i.value) == null ? void 0 : f.getDataFromURL) == null || w.call(f, y);
549
561
  }
550
- function L() {
551
- const w = n.value;
552
- if (w != null && w.getDataURL) {
553
- const d = w.getDataURL({
562
+ function V() {
563
+ const y = n.value;
564
+ if (y != null && y.getDataURL) {
565
+ const f = y.getDataURL({
554
566
  type: "png",
555
567
  pixelRatio: 2,
556
568
  backgroundColor: "#ffffff"
557
- }), x = document.createElement("a");
558
- x.href = d, x.download = "chart.png", document.body.appendChild(x), x.click(), document.body.removeChild(x);
569
+ }), w = document.createElement("a");
570
+ w.href = f, w.download = "chart.png", document.body.appendChild(w), w.click(), document.body.removeChild(w);
559
571
  }
560
572
  }
561
573
  return le(() => {
562
574
  t.prefix && He(t.prefix);
563
- }), te(
575
+ }), ae(
564
576
  () => t.filterURl,
565
- (w) => {
566
- var d, x;
567
- w && ((x = (d = i.value) == null ? void 0 : d.setFilter) == null || x.call(d, w));
577
+ (y) => {
578
+ var f, w;
579
+ y && ((w = (f = i.value) == null ? void 0 : f.setFilter) == null || w.call(f, y));
568
580
  }
569
- ), te(
581
+ ), ae(
570
582
  () => t.selectedWidget,
571
- (w, d) => {
572
- var x;
573
- w !== d && w === ((x = o.value) == null ? void 0 : x.id) && a("update:current-widget-data", o.value);
583
+ (y, f) => {
584
+ var w;
585
+ y !== f && y === ((w = o.value) == null ? void 0 : w.id) && a("update:current-widget-data", o.value);
574
586
  }
575
- ), te(
587
+ ), ae(
576
588
  o,
577
- (w, d) => {
578
- (w == null ? void 0 : w.id) !== (d == null ? void 0 : d.id) && a("update:current-widget-data", w);
589
+ (y, f) => {
590
+ (y == null ? void 0 : y.id) !== (f == null ? void 0 : f.id) && a("update:current-widget-data", y);
579
591
  },
580
592
  { deep: !0 }
581
- ), (w, d) => {
582
- var x, _, D;
583
- return p(), y("div", {
593
+ ), (y, f) => {
594
+ var w, $, _;
595
+ return h(), x("div", {
584
596
  ref_key: "widgetRef",
585
597
  ref: r,
586
598
  class: "box-border relative p-4 bg-white border border-gray-200 rounded-xl shadow-sm select-auto overflow-hidden",
587
- style: Ge({ height: f.value + "px", maxHeight: f.value + "px" })
599
+ style: Ge({ height: p.value + "px", maxHeight: p.value + "px" })
588
600
  }, [
589
- ["text", "cluster", "map"].includes(u.value) ? A("", !0) : (p(), y("div", Zs, [
590
- h("div", Qs, [
591
- h("div", Xs, [
592
- h("span", Ys, W(c.value), 1)
601
+ ["text", "cluster", "map"].includes(u.value) ? A("", !0) : (h(), x("div", Xs, [
602
+ c("div", Ys, [
603
+ c("div", Js, [
604
+ c("span", Ks, W(d.value), 1)
593
605
  ]),
594
- h("div", Js, [
595
- (x = v.value) != null && x.length ? (p(), y("span", Ks, [
596
- (p(!0), y(U, null, Z((_ = v.value) == null ? void 0 : _.filter(
597
- (m) => (m == null ? void 0 : m.options) && (m == null ? void 0 : m.name) !== "export"
598
- ), (m) => {
606
+ c("div", ea, [
607
+ (w = v.value) != null && w.length ? (h(), x("span", ta, [
608
+ (h(!0), x(U, null, Z(($ = v.value) == null ? void 0 : $.filter(
609
+ (g) => (g == null ? void 0 : g.options) && (g == null ? void 0 : g.name) !== "export"
610
+ ), (g) => {
599
611
  var C, z;
600
- return p(), y("div", {
601
- key: m == null ? void 0 : m.name
612
+ return h(), x("div", {
613
+ key: g == null ? void 0 : g.name
602
614
  }, [
603
- Array.isArray(m == null ? void 0 : m.options) ? (p(), N(Ps, {
615
+ Array.isArray(g == null ? void 0 : g.options) ? (h(), E(Fs, {
604
616
  key: 0,
605
- title: m == null ? void 0 : m.name,
606
- options: m == null ? void 0 : m.options,
607
- value: ((z = (C = o.value) == null ? void 0 : C.data) == null ? void 0 : z[m == null ? void 0 : m.name]) ?? null,
608
- onSelected: (R) => k(R, m == null ? void 0 : m.name)
609
- }, null, 8, ["title", "options", "value", "onSelected"])) : typeof m.options == "boolean" ? (p(), N(Fs, {
617
+ title: g == null ? void 0 : g.name,
618
+ options: g == null ? void 0 : g.options,
619
+ value: ((z = (C = o.value) == null ? void 0 : C.data) == null ? void 0 : z[g == null ? void 0 : g.name]) ?? null,
620
+ onSelected: (R) => k(R, g == null ? void 0 : g.name)
621
+ }, null, 8, ["title", "options", "value", "onSelected"])) : typeof g.options == "boolean" ? (h(), E(Ms, {
610
622
  key: 1,
611
- "left-label": m == null ? void 0 : m.name,
612
- "model-value": !!(m != null && m.options),
613
- "onUpdate:isEnabled": (R) => b(m == null ? void 0 : m.name, R)
623
+ "left-label": g == null ? void 0 : g.name,
624
+ "model-value": !!(g != null && g.options),
625
+ "onUpdate:isEnabled": (R) => b(g == null ? void 0 : g.name, R)
614
626
  }, null, 8, ["left-label", "model-value", "onUpdate:isEnabled"])) : A("", !0)
615
627
  ]);
616
628
  }), 128)),
617
- (D = v.value) != null && D.some((m) => (m == null ? void 0 : m.name) === "export") ? (p(), y("button", {
629
+ (_ = v.value) != null && _.some((g) => (g == null ? void 0 : g.name) === "export") ? (h(), x("button", {
618
630
  key: 0,
619
631
  type: "button",
620
632
  class: "h-[32px] w-[32px] rounded-lg hover:bg-gray-100 duration-100 flex items-center justify-center",
621
- onClick: L
633
+ onClick: V
622
634
  }, [
623
- T(E(zs), {
635
+ T(N(Is), {
624
636
  size: 16,
625
637
  class: "text-gray-800"
626
638
  })
@@ -629,20 +641,24 @@ const H = {
629
641
  ])
630
642
  ])
631
643
  ])),
632
- h("div", ea, [
633
- g.value ? (p(), N(Ht(g.value), {
644
+ c("div", {
645
+ class: "w-full h-full",
646
+ onClick: f[2] || (f[2] = Ht(() => {
647
+ }, ["stop"]))
648
+ }, [
649
+ m.value ? (h(), E(Zt(m.value), {
634
650
  key: 0,
635
651
  ref_key: "chartRef",
636
652
  ref: i,
637
653
  "current-widget": n.value,
638
- "onUpdate:currentWidget": d[0] || (d[0] = (m) => n.value = m),
654
+ "onUpdate:currentWidget": f[0] || (f[0] = (g) => n.value = g),
639
655
  "widget-data": o.value,
640
- "onUpdate:widgetData": d[1] || (d[1] = (m) => o.value = m),
656
+ "onUpdate:widgetData": f[1] || (f[1] = (g) => o.value = g),
641
657
  dashboard: s.dashboard,
642
- title: c.value,
658
+ title: d.value,
643
659
  widget: s.widget,
644
660
  "prefetched-data": s.prefetchedData
645
- }, null, 40, ["current-widget", "widget-data", "dashboard", "title", "widget", "prefetched-data"])) : (p(), N(Gs, {
661
+ }, null, 40, ["current-widget", "widget-data", "dashboard", "title", "widget", "prefetched-data"])) : (h(), E(Zs, {
646
662
  key: 1,
647
663
  class: "w-full h-full"
648
664
  }))
@@ -650,72 +666,72 @@ const H = {
650
666
  ], 4);
651
667
  };
652
668
  }
653
- }), ta = { class: "w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit" }, sa = { class: "p-5 min-h-[500px] flex flex-col justify-center items-center text-center" }, aa = { class: "max-w-sm mx-auto mt-6" }, ra = { class: "font-medium text-gray-800 dark:text-neutral-200" }, na = { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, Pe = /* @__PURE__ */ ge({
669
+ }), sa = { class: "w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit" }, aa = { class: "p-5 min-h-[500px] flex flex-col justify-center items-center text-center" }, ra = { class: "max-w-sm mx-auto mt-6" }, na = { class: "font-medium text-gray-800 dark:text-neutral-200" }, ia = { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, Pe = /* @__PURE__ */ ge({
654
670
  __name: "vs-new-nodata",
655
671
  props: {
656
672
  title: { default: "Дані для відображення відсутні" },
657
673
  text: { default: "Змініть параметри пошуку або спробуйте пізніше" }
658
674
  },
659
675
  setup(s) {
660
- return (e, t) => (p(), y("div", ta, [
661
- h("div", null, [
662
- h("div", sa, [
663
- t[0] || (t[0] = ps('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>', 1)),
664
- h("div", aa, [
665
- h("p", ra, W(s.title), 1),
666
- h("p", na, W(s.text), 1)
676
+ return (e, t) => (h(), x("div", sa, [
677
+ c("div", null, [
678
+ c("div", aa, [
679
+ t[0] || (t[0] = fs('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>', 1)),
680
+ c("div", ra, [
681
+ c("p", na, W(s.title), 1),
682
+ c("p", ia, W(s.text), 1)
667
683
  ])
668
684
  ])
669
685
  ])
670
686
  ]));
671
687
  }
672
- }), ia = {
688
+ }), oa = {
673
689
  __name: "filter",
674
690
  setup(s) {
675
- return (e, t) => (p(), N(E(Is), he(e.$attrs, { size: 24 }), null, 16));
691
+ return (e, t) => (h(), E(N(Rs), he(e.$attrs, { size: 24 }), null, 16));
676
692
  }
677
- }, oa = {
678
- components: { filterIcon: ia },
693
+ }, la = {
694
+ components: { filterIcon: oa },
679
695
  props: ["filterScheme"],
680
696
  emits: ["filters:changed"]
681
- }, la = { class: "flex items-center" }, ca = {
697
+ }, da = { class: "flex items-center" }, ca = {
682
698
  key: 0,
683
699
  type: "button",
684
700
  class: "py-2 px-2.5 ml-3 h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 opacity-60 cursor-not-allowed",
685
701
  disabled: "",
686
702
  title: "Фільтри вимкнено (v3-filter видалено)"
687
703
  };
688
- function da(s, e, t, a, r, i) {
689
- const n = J("filterIcon");
690
- return p(), y("div", la, [
691
- t.filterScheme ? (p(), y("button", ca, [
704
+ function ua(s, e, t, a, r, i) {
705
+ const n = K("filterIcon");
706
+ return h(), x("div", da, [
707
+ t.filterScheme ? (h(), x("button", ca, [
692
708
  T(n),
693
709
  e[0] || (e[0] = X(" Фільтри ", -1))
694
710
  ])) : A("", !0)
695
711
  ]);
696
712
  }
697
- const ua = /* @__PURE__ */ Q(oa, [["render", da]]), ha = {
698
- components: { VsFilterHeader: ua },
713
+ const ha = /* @__PURE__ */ Q(la, [["render", ua]]), pa = {
714
+ components: { VsFilterHeader: ha },
699
715
  props: {
700
716
  dashboardData: { type: Object, default: null },
701
717
  filters: { type: Array, default: null }
702
718
  }
703
- }, pa = { class: "bg-white px-5 flex gap-4 h-[90px] border border-gray-200 rounded-xl mb-2 pt-[3px] justify-between items-center" }, fa = { class: "grow" }, ga = { class: "text-lg font-semibold text-stone-800 dark:text-neutral-200" }, ma = {
719
+ }, fa = { class: "bg-white px-5 flex gap-4 h-[90px] border border-gray-200 rounded-xl mb-2 pt-[3px] justify-between items-center" }, ga = { class: "grow" }, ma = { class: "text-lg font-semibold text-stone-800 dark:text-neutral-200" }, ba = {
704
720
  key: 0,
705
721
  class: "inline-flex items-center text-sm gap-x-2 text-stone-800 hover:text-stone-500 focus:outline-none focus:text-stone-500 dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400"
706
- }, ba = {
722
+ }, xa = {
707
723
  key: 0,
708
724
  class: "flex items-center gap-3"
709
725
  };
710
- function xa(s, e, t, a, r, i) {
711
- var o, l, c;
712
- const n = J("VsFilterHeader");
713
- return p(), y("div", pa, [
714
- h("div", fa, [
715
- h("h1", ga, W((o = t.dashboardData) == null ? void 0 : o.title), 1),
716
- (l = t.dashboardData) != null && l.description ? (p(), y("button", ma, W((c = t.dashboardData) == null ? void 0 : c.description), 1)) : A("", !0)
726
+ function ya(s, e, t, a, r, i) {
727
+ var o, l, d;
728
+ const n = K("VsFilterHeader");
729
+ return h(), x("div", fa, [
730
+ c("div", ga, [
731
+ c("h1", ma, W((o = t.dashboardData) == null ? void 0 : o.title), 1),
732
+ (l = t.dashboardData) != null && l.description ? (h(), x("button", ba, W((d = t.dashboardData) == null ? void 0 : d.description), 1)) : A("", !0)
717
733
  ]),
718
- t.filters ? (p(), y("div", ba, [
734
+ t.filters ? (h(), x("div", xa, [
719
735
  T(n, {
720
736
  filterScheme: t.filters,
721
737
  "onFilters:changed": e[0] || (e[0] = (u) => s.$emit("filters:changed", u))
@@ -723,13 +739,13 @@ function xa(s, e, t, a, r, i) {
723
739
  ])) : A("", !0)
724
740
  ]);
725
741
  }
726
- const ya = /* @__PURE__ */ Q(ha, [["render", xa]]), wa = {
742
+ const wa = /* @__PURE__ */ Q(pa, [["render", ya]]), va = {
727
743
  key: 0,
728
744
  class: "text-gray-400 shrink-0"
729
- }, va = ["onClick"], ka = ["onClick"], $a = {
745
+ }, ka = ["onClick"], $a = ["onClick"], _a = {
730
746
  key: 4,
731
747
  class: "text-gray-900 font-medium truncate"
732
- }, Yt = {
748
+ }, Jt = {
733
749
  __name: "vs-breadcrumbs",
734
750
  props: {
735
751
  items: {
@@ -740,25 +756,25 @@ const ya = /* @__PURE__ */ Q(ha, [["render", xa]]), wa = {
740
756
  compact: { type: Boolean, default: !1 }
741
757
  },
742
758
  setup(s) {
743
- const e = s, t = we(), a = F(() => Array.isArray(e.items) ? e.items : []);
759
+ const e = s, t = we(), a = q(() => Array.isArray(e.items) ? e.items : []);
744
760
  function r(i) {
745
761
  t != null && t.push ? t.push(i) : typeof i == "string" && (window != null && window.location) && (window.location.href = i);
746
762
  }
747
763
  return (i, n) => {
748
- const o = J("router-link");
749
- return p(), y("nav", {
750
- class: ee(["flex items-center gap-2 text-sm text-gray-600", s.compact ? "py-1" : "py-6"]),
764
+ const o = K("router-link");
765
+ return h(), x("nav", {
766
+ class: se(["flex items-center gap-2 text-sm text-gray-600", s.compact ? "py-1" : "py-6"]),
751
767
  "aria-label": "Breadcrumb"
752
768
  }, [
753
- (p(!0), y(U, null, Z(a.value, (l, c) => (p(), y(U, { key: c }, [
754
- c > 0 ? (p(), y("span", wa, [
755
- T(E(Cs), { class: "w-4 h-4" })
769
+ (h(!0), x(U, null, Z(a.value, (l, d) => (h(), x(U, { key: d }, [
770
+ d > 0 ? (h(), x("span", va, [
771
+ T(N(Ts), { class: "w-4 h-4" })
756
772
  ])) : A("", !0),
757
- typeof l.onClick == "function" ? (p(), y("span", {
773
+ typeof l.onClick == "function" ? (h(), x("span", {
758
774
  key: 1,
759
775
  class: "hover:text-gray-900 transition-colors cursor-pointer",
760
776
  onClick: (u) => l.onClick()
761
- }, W(l.label), 9, va)) : E(t) && l.to ? (p(), N(o, {
777
+ }, W(l.label), 9, ka)) : N(t) && l.to ? (h(), E(o, {
762
778
  key: 2,
763
779
  to: l.to,
764
780
  class: "hover:text-gray-900 transition-colors"
@@ -767,17 +783,17 @@ const ya = /* @__PURE__ */ Q(ha, [["render", xa]]), wa = {
767
783
  X(W(l.label), 1)
768
784
  ]),
769
785
  _: 2
770
- }, 1032, ["to"])) : l.to ? (p(), y("span", {
786
+ }, 1032, ["to"])) : l.to ? (h(), x("span", {
771
787
  key: 3,
772
788
  class: "hover:text-gray-900 transition-colors cursor-pointer",
773
789
  onClick: (u) => r(l.to)
774
- }, W(l.label), 9, ka)) : (p(), y("span", $a, W(l.label), 1))
790
+ }, W(l.label), 9, $a)) : (h(), x("span", _a, W(l.label), 1))
775
791
  ], 64))), 128))
776
792
  ], 2);
777
793
  };
778
794
  }
779
- }, _a = {
780
- components: { VsWidget: Oe, VsNewNodata: Pe, VsHeader: ya, VsBreadcrumbs: Yt },
795
+ }, Da = {
796
+ components: { VsWidget: Oe, VsNewNodata: Pe, VsHeader: wa, VsBreadcrumbs: Jt },
781
797
  props: ["id", "prefix"],
782
798
  data() {
783
799
  return {
@@ -825,33 +841,33 @@ const ya = /* @__PURE__ */ Q(ha, [["render", xa]]), wa = {
825
841
  }), this.filterURl += e);
826
842
  }
827
843
  }
828
- }, Da = { class: "w-full pb-8 overflow-y-auto mx-auto" }, Ca = { class: "grid flex-grow w-full grid-cols-12 gap-4 h-fit" };
829
- function za(s, e, t, a, r, i) {
844
+ }, Ca = { class: "w-full pb-8 overflow-y-auto mx-auto" }, za = { class: "grid flex-grow w-full grid-cols-12 gap-4 h-fit" };
845
+ function Ta(s, e, t, a, r, i) {
830
846
  var l;
831
- const n = J("VsNewNodata"), o = J("VsWidget");
832
- return p(), y("div", Da, [
833
- h("div", Ca, [
834
- r.error || !r.dashboardData ? (p(), N(n, {
847
+ const n = K("VsNewNodata"), o = K("VsWidget");
848
+ return h(), x("div", Ca, [
849
+ c("div", za, [
850
+ r.error || !r.dashboardData ? (h(), E(n, {
835
851
  key: 0,
836
852
  class: "col-span-12"
837
853
  })) : A("", !0),
838
- (p(!0), y(U, null, Z(((l = r.dashboardData) == null ? void 0 : l.panels) || [], (c, u) => {
839
- var f;
840
- return p(), y("div", {
854
+ (h(!0), x(U, null, Z(((l = r.dashboardData) == null ? void 0 : l.panels) || [], (d, u) => {
855
+ var p;
856
+ return h(), x("div", {
841
857
  key: u,
842
- class: ee([`col-span-12 lg:col-span-${c.col || 12}`, "flex flex-col gap-[10px]"])
858
+ class: se([`col-span-12 lg:col-span-${d.col || 12}`, "flex flex-col gap-[10px]"])
843
859
  }, [
844
- (f = c.widgets) != null && f.length ? (p(!0), y(U, { key: 0 }, Z(c.widgets, (v) => (p(), N(o, {
860
+ (p = d.widgets) != null && p.length ? (h(!0), x(U, { key: 0 }, Z(d.widgets, (v) => (h(), E(o, {
845
861
  key: v,
846
862
  dashboard: t.id,
847
863
  widget: v,
848
864
  "dashboard-widgets": r.dashboardData.widgets,
849
865
  "filter-u-rl": r.filterURl
850
- }, null, 8, ["dashboard", "widget", "dashboard-widgets", "filter-u-rl"]))), 128)) : (p(), N(o, {
866
+ }, null, 8, ["dashboard", "widget", "dashboard-widgets", "filter-u-rl"]))), 128)) : (h(), E(o, {
851
867
  key: 1,
852
868
  class: "flex flex-col",
853
869
  dashboard: t.id,
854
- widget: c.widget,
870
+ widget: d.widget,
855
871
  "dashboard-widgets": r.dashboardData.widgets,
856
872
  "filter-u-rl": r.filterURl
857
873
  }, null, 8, ["dashboard", "widget", "dashboard-widgets", "filter-u-rl"]))
@@ -860,21 +876,21 @@ function za(s, e, t, a, r, i) {
860
876
  ])
861
877
  ]);
862
878
  }
863
- const yo = /* @__PURE__ */ Q(_a, [["render", za]]);
864
- var Ta = /* @__PURE__ */ ((s) => (s.Dashboard = "/dashboard", s.BiPlatform = "/bi-platform", s.EditorBase = "/editor", s.AllDashboards = "/dashboards", s.DashboardByName = "/dashboards/:name", s))(Ta || {}), Nt;
879
+ const vo = /* @__PURE__ */ Q(Da, [["render", Ta]]);
880
+ var Ia = /* @__PURE__ */ ((s) => (s.Dashboard = "/dashboard", s.BiPlatform = "/bi-platform", s.EditorBase = "/editor", s.AllDashboards = "/dashboards", s.DashboardByName = "/dashboards/:name", s))(Ia || {}), Et;
865
881
  ((s) => {
866
882
  ((e) => {
867
883
  e.Bar = "bar", e.ListBar = "listbar", e.Number = "number", e.Text = "text", e.Pie = "pie", e.Heatmap = "heatmap", e.Calendar = "calendar", e.Line = "line", e.Stat = "stat", e.Pivot = "pivot", e.Funnel = "funnel", e.Progress = "progress";
868
884
  })(s.Types || (s.Types = {}));
869
- })(Nt || (Nt = {}));
870
- var Y = /* @__PURE__ */ ((s) => (s.AllDashboards = "all-dashboards", s.BiPlatform = "bi-platform", s.Dashboard = "dashboard", s.Erobota = "erobota", s.Datatest = "datatest", s.Sourcedate = "sourcedate", s.Widgetwidget = "widgetwidget", s.Test = "test", s.Demo = "demo", s.Crm = "crm", s.Editor = "editor", s.EditorDashboard = "editor-dashboard", s.EditorWidget = "editor-widget", s.Editordetails = "editordetails", s.Dbtables = "dbtables", s.Biviewer = "biviewer", s.Biviewerinner = "biviewerinner", s.Bieditor = "bieditor", s.Bieditorinner = "bieditorinner", s))(Y || {});
871
- const Ia = {
885
+ })(Et || (Et = {}));
886
+ var J = /* @__PURE__ */ ((s) => (s.AllDashboards = "all-dashboards", s.BiPlatform = "bi-platform", s.Dashboard = "dashboard", s.Erobota = "erobota", s.Datatest = "datatest", s.Sourcedate = "sourcedate", s.Widgetwidget = "widgetwidget", s.Test = "test", s.Demo = "demo", s.Crm = "crm", s.Editor = "editor-all-dashboards", s.EditorDashboard = "editor-dashboard", s.EditorWidget = "editor-widget", s.Editordetails = "editordetails", s.Dbtables = "dbtables", s.Biviewer = "biviewer", s.Biviewerinner = "biviewerinner", s.Bieditor = "bieditor", s.Bieditorinner = "bieditorinner", s))(J || {});
887
+ const Sa = {
872
888
  key: 0,
873
889
  class: "vs-modal-wrapper fixed inset-0 flex items-center justify-center p-4"
874
- }, Sa = { class: "flex items-center justify-between shrink-0 py-2.5 px-4 border-b border-gray-200 dark:border-[#454545]" }, Ra = { class: "font-medium text-gray-800 dark:text-white" }, La = { class: "vs-modal-content flex-1 min-h-0 overflow-auto p-4" }, Va = {
890
+ }, Ra = { class: "flex items-center justify-between shrink-0 py-2.5 px-4 border-b border-gray-200 dark:border-[#454545]" }, Va = { class: "font-medium text-gray-800 dark:text-white" }, La = { class: "vs-modal-content flex-1 min-h-0 overflow-auto p-4" }, Wa = {
875
891
  key: 0,
876
892
  class: "shrink-0 border-t border-gray-200 dark:border-neutral-700"
877
- }, Wa = {
893
+ }, Na = {
878
894
  __name: "vs-modal",
879
895
  props: {
880
896
  visible: { type: Boolean, default: !1 },
@@ -885,7 +901,7 @@ const Ia = {
885
901
  },
886
902
  emits: ["close", "update:visible"],
887
903
  setup(s, { emit: e }) {
888
- const t = s, a = e, r = F(() => t.size === "small" ? "md:max-w-[40%] w-full max-w-md" : t.size === "lg" ? "md:max-w-[70%] w-full max-w-4xl" : "md:max-w-[50%] w-full max-w-lg");
904
+ const t = s, a = e, r = q(() => t.size === "small" ? "md:max-w-[40%] w-full max-w-md" : t.size === "lg" ? "md:max-w-[70%] w-full max-w-4xl" : "md:max-w-[50%] w-full max-w-lg");
889
905
  function i() {
890
906
  a("update:visible", !1), a("close");
891
907
  }
@@ -896,35 +912,35 @@ const Ia = {
896
912
  window.addEventListener("keydown", n);
897
913
  }), Ue(() => {
898
914
  window.removeEventListener("keydown", n);
899
- }), (o, l) => (p(), N(fs, { to: s.teleport }, [
900
- s.visible ? (p(), y("div", Ia, [
901
- h("div", {
915
+ }), (o, l) => (h(), E(gs, { to: s.teleport }, [
916
+ s.visible ? (h(), x("div", Sa, [
917
+ c("div", {
902
918
  class: "absolute inset-0 bg-black/50",
903
919
  "aria-hidden": "true",
904
- onMousedown: l[0] || (l[0] = (c) => s.closeClickBack && c.target === c.currentTarget && i())
920
+ onMousedown: l[0] || (l[0] = (d) => s.closeClickBack && d.target === d.currentTarget && i())
905
921
  }, null, 32),
906
- T(gs, {
922
+ T(ms, {
907
923
  name: "vs-modal",
908
924
  appear: ""
909
925
  }, {
910
926
  default: j(() => [
911
- s.visible ? (p(), y("div", {
927
+ s.visible ? (h(), x("div", {
912
928
  key: 0,
913
- class: ee(["vs-modal-panel relative flex flex-col bg-white dark:bg-[#1A1A1A] rounded-xl shadow-xl max-h-[85vh] min-w-0 border border-gray-200 dark:border-[#454545]", r.value]),
929
+ class: se(["vs-modal-panel relative flex flex-col bg-white dark:bg-[#1A1A1A] rounded-xl shadow-xl max-h-[85vh] min-w-0 border border-gray-200 dark:border-[#454545]", r.value]),
914
930
  role: "dialog",
915
931
  "aria-modal": "true",
916
- onMousedown: l[1] || (l[1] = ms(() => {
932
+ onMousedown: l[1] || (l[1] = Ht(() => {
917
933
  }, ["stop"]))
918
934
  }, [
919
- h("div", Sa, [
920
- h("h3", Ra, W(s.title), 1),
921
- h("button", {
935
+ c("div", Ra, [
936
+ c("h3", Va, W(s.title), 1),
937
+ c("button", {
922
938
  type: "button",
923
939
  class: "size-8 inline-flex justify-center items-center rounded-full bg-gray-100 text-gray-800 hover:bg-gray-200 dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-300",
924
940
  "aria-label": "Закрити",
925
941
  onClick: i
926
942
  }, [...l[2] || (l[2] = [
927
- h("svg", {
943
+ c("svg", {
928
944
  class: "w-4 h-4",
929
945
  xmlns: "http://www.w3.org/2000/svg",
930
946
  fill: "none",
@@ -932,7 +948,7 @@ const Ia = {
932
948
  stroke: "currentColor",
933
949
  "stroke-width": "2"
934
950
  }, [
935
- h("path", {
951
+ c("path", {
936
952
  "stroke-linecap": "round",
937
953
  "stroke-linejoin": "round",
938
954
  d: "M6 18L18 6M6 6l12 12"
@@ -940,11 +956,11 @@ const Ia = {
940
956
  ], -1)
941
957
  ])])
942
958
  ]),
943
- h("div", La, [
944
- St(o.$slots, "default", {}, void 0, !0)
959
+ c("div", La, [
960
+ Rt(o.$slots, "default", {}, void 0, !0)
945
961
  ]),
946
- o.$slots.footer ? (p(), y("div", Va, [
947
- St(o.$slots, "footer", {}, void 0, !0)
962
+ o.$slots.footer ? (h(), x("div", Wa, [
963
+ Rt(o.$slots, "footer", {}, void 0, !0)
948
964
  ])) : A("", !0)
949
965
  ], 34)) : A("", !0)
950
966
  ]),
@@ -953,12 +969,12 @@ const Ia = {
953
969
  ])) : A("", !0)
954
970
  ], 8, ["to"]));
955
971
  }
956
- }, Le = /* @__PURE__ */ Q(Wa, [["__scopeId", "data-v-5722a50f"]]), Na = {
972
+ }, Ve = /* @__PURE__ */ Q(Na, [["__scopeId", "data-v-5722a50f"]]), Ea = {
957
973
  __name: "icon-plus",
958
974
  setup(s) {
959
- return (e, t) => (p(), N(E(Qt), he(e.$attrs, { size: 24 }), null, 16));
975
+ return (e, t) => (h(), E(N(Xt), he(e.$attrs, { size: 24 }), null, 16));
960
976
  }
961
- }, Ea = { class: "mb-4 overflow-auto scrollbar max-h-96" }, ja = {
977
+ }, ja = { class: "mb-4 overflow-auto scrollbar max-h-96" }, Ba = {
962
978
  __name: "vs-editor-create-widget",
963
979
  props: {
964
980
  columns: {
@@ -972,19 +988,19 @@ const Ia = {
972
988
  emits: ["update-data"],
973
989
  setup(s, { expose: e, emit: t }) {
974
990
  var b;
975
- const a = M(() => import("@opengis/form")), r = (b = me().proxy) == null ? void 0 : b.$notify, i = t, n = s, o = I(!1), l = I({}), c = I();
991
+ const a = M(() => import("@opengis/form")), r = (b = me().proxy) == null ? void 0 : b.$notify, i = t, n = s, o = I(!1), l = I({}), d = I();
976
992
  function u() {
977
993
  o.value = !0;
978
994
  }
979
- function f() {
995
+ function p() {
980
996
  o.value = !1;
981
997
  }
982
- e({ open: u, close: f });
998
+ e({ open: u, close: p });
983
999
  const v = async () => {
984
1000
  var k;
985
1001
  try {
986
- const $ = (k = c.value) == null ? void 0 : k.doValidation;
987
- typeof $ == "function" && await $(), await H.post(
1002
+ const D = (k = d.value) == null ? void 0 : k.doValidation;
1003
+ typeof D == "function" && await D(), await H.post(
988
1004
  `/bi-dashboard/${n.selectedDashboard}`,
989
1005
  l.value
990
1006
  ), await r({
@@ -992,16 +1008,16 @@ const Ia = {
992
1008
  title: "Успішно!",
993
1009
  message: "Віджет успішно створено"
994
1010
  }), await i("update-data"), l.value = {}, o.value = !1;
995
- } catch ($) {
996
- const L = ($ == null ? void 0 : $.message) || "При спробі створити віджет сталася помилка. Перевірте обов'язкові поля (зокрема Type).";
1011
+ } catch (D) {
1012
+ const V = (D == null ? void 0 : D.message) || "При спробі створити віджет сталася помилка. Перевірте обов'язкові поля (зокрема Type).";
997
1013
  r == null || r({
998
1014
  type: "error",
999
1015
  title: "Помилка!",
1000
- message: L
1016
+ message: V
1001
1017
  });
1002
1018
  }
1003
- }, g = F(() => {
1004
- var k, $, L, w;
1019
+ }, m = q(() => {
1020
+ var k, D, V, y;
1005
1021
  return {
1006
1022
  title: {
1007
1023
  type: "text",
@@ -1015,12 +1031,12 @@ const Ia = {
1015
1031
  view: "buttons",
1016
1032
  style: { size: "xs" },
1017
1033
  validators: ["required"],
1018
- options: ($ = (k = n.columns) == null ? void 0 : k.filter(
1019
- (d) => (d == null ? void 0 : d.type) == "text" || (d == null ? void 0 : d.type) === "date" || (d == null ? void 0 : d.type) === "timestamp without time zone" || (d == null ? void 0 : d.type) === "boolean" || (d == null ? void 0 : d.type) === "integer"
1020
- )) == null ? void 0 : $.map(({ name: d, type: x }) => ({
1021
- id: d,
1022
- text: d,
1023
- type: x
1034
+ options: (D = (k = n.columns) == null ? void 0 : k.filter(
1035
+ (f) => (f == null ? void 0 : f.type) == "text" || (f == null ? void 0 : f.type) === "date" || (f == null ? void 0 : f.type) === "timestamp without time zone" || (f == null ? void 0 : f.type) === "boolean" || (f == null ? void 0 : f.type) === "integer"
1036
+ )) == null ? void 0 : D.map(({ name: f, type: w }) => ({
1037
+ id: f,
1038
+ text: f,
1039
+ type: w
1024
1040
  }))
1025
1041
  },
1026
1042
  metric: {
@@ -1031,10 +1047,10 @@ const Ia = {
1031
1047
  style: { size: "xs" },
1032
1048
  options: [
1033
1049
  { id: "count", label: "count" },
1034
- ...(w = (L = n.columns) == null ? void 0 : L.filter((d) => (d == null ? void 0 : d.type) === "numeric" || (d == null ? void 0 : d.type) === "double precision")) == null ? void 0 : w.map(({ name: d, type: x }) => ({
1035
- id: d,
1036
- text: d,
1037
- type: x
1050
+ ...(y = (V = n.columns) == null ? void 0 : V.filter((f) => (f == null ? void 0 : f.type) === "numeric" || (f == null ? void 0 : f.type) === "double precision")) == null ? void 0 : y.map(({ name: f, type: w }) => ({
1051
+ id: f,
1052
+ text: f,
1053
+ type: w
1038
1054
  }))
1039
1055
  ]
1040
1056
  },
@@ -1140,21 +1156,21 @@ const Ia = {
1140
1156
  }
1141
1157
  };
1142
1158
  });
1143
- return (k, $) => {
1144
- const L = J("VsPopover");
1145
- return p(), y("div", null, [
1146
- s.inline ? A("", !0) : (p(), N(L, {
1159
+ return (k, D) => {
1160
+ const V = K("VsPopover");
1161
+ return h(), x("div", null, [
1162
+ s.inline ? A("", !0) : (h(), E(V, {
1147
1163
  key: 0,
1148
1164
  placement: "right",
1149
1165
  trigger: "hover"
1150
1166
  }, {
1151
1167
  reference: j(() => [
1152
- h("div", null, [
1153
- h("button", {
1168
+ c("div", null, [
1169
+ c("button", {
1154
1170
  class: "z-50 flex items-center justify-center h-[50px] !w-[50px] text-2xl text-white transition-colors bg-blue-500 rounded-full cursor-pointer hover:bg-blue-700",
1155
1171
  onClick: u
1156
1172
  }, [
1157
- T(Na, {
1173
+ T(Ea, {
1158
1174
  height: "20",
1159
1175
  width: "20"
1160
1176
  })
@@ -1162,37 +1178,37 @@ const Ia = {
1162
1178
  ])
1163
1179
  ]),
1164
1180
  default: j(() => [
1165
- $[1] || ($[1] = X(" Створити віджет ", -1))
1181
+ D[1] || (D[1] = X(" Створити віджет ", -1))
1166
1182
  ]),
1167
1183
  _: 1
1168
1184
  })),
1169
- T(Le, {
1185
+ T(Ve, {
1170
1186
  teleport: "#modal",
1171
1187
  visible: o.value,
1172
1188
  title: "Створити віджет",
1173
- onClose: f
1189
+ onClose: p
1174
1190
  }, {
1175
1191
  footer: j(() => [
1176
- h("div", { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, [
1177
- h("button", {
1192
+ c("div", { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, [
1193
+ c("button", {
1178
1194
  style: { border: "1px solid #000" },
1179
- onClick: f,
1195
+ onClick: p,
1180
1196
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"
1181
1197
  }, " Скасувати "),
1182
- h("button", {
1198
+ c("button", {
1183
1199
  onClick: v,
1184
1200
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
1185
1201
  }, " Створити ")
1186
1202
  ])
1187
1203
  ]),
1188
1204
  default: j(() => [
1189
- h("div", Ea, [
1190
- T(E(a), {
1205
+ c("div", ja, [
1206
+ T(N(a), {
1191
1207
  ref_key: "form",
1192
- ref: c,
1193
- schema: g.value,
1208
+ ref: d,
1209
+ schema: m.value,
1194
1210
  values: l.value,
1195
- "onUpdate:values": $[0] || ($[0] = (w) => l.value = w)
1211
+ "onUpdate:values": D[0] || (D[0] = (y) => l.value = y)
1196
1212
  }, null, 8, ["schema", "values"])
1197
1213
  ])
1198
1214
  ]),
@@ -1201,17 +1217,17 @@ const Ia = {
1201
1217
  ]);
1202
1218
  };
1203
1219
  }
1204
- }, Jt = {
1220
+ }, Kt = {
1205
1221
  __name: "delete",
1206
1222
  setup(s) {
1207
- return (e, t) => (p(), N(E(Ns), he(e.$attrs, { size: 24 }), null, 16));
1223
+ return (e, t) => (h(), E(N(js), he(e.$attrs, { size: 24 }), null, 16));
1208
1224
  }
1209
- }, Kt = {
1225
+ }, es = {
1210
1226
  __name: "edit",
1211
1227
  setup(s) {
1212
- return (e, t) => (p(), N(E(Ls), he(e.$attrs, { size: 24 }), null, 16));
1228
+ return (e, t) => (h(), E(N(Ws), he(e.$attrs, { size: 24 }), null, 16));
1213
1229
  }
1214
- }, Ba = { class: "space-y-4" }, Oa = {
1230
+ }, Oa = { class: "space-y-4" }, Pa = {
1215
1231
  __name: "vs-editor-form-style",
1216
1232
  props: {
1217
1233
  widgetName: { type: String },
@@ -1221,14 +1237,14 @@ const Ia = {
1221
1237
  },
1222
1238
  emits: ["update-dashboard"],
1223
1239
  setup(s, { expose: e, emit: t }) {
1224
- var _, D, m, C;
1225
- const a = M(() => import("@opengis/form")), { $notify: r } = me().proxy, i = t, n = s, o = I(null), l = F(() => n.dashboardId || o.value), c = ((_ = n.data) == null ? void 0 : _.type) || ((m = (D = n.data) == null ? void 0 : D.data) == null ? void 0 : m.type), f = {
1240
+ var $, _, g, C;
1241
+ const a = M(() => import("@opengis/form")), { $notify: r } = me().proxy, i = t, n = s, o = I(null), l = q(() => n.dashboardId || o.value), d = (($ = n.data) == null ? void 0 : $.type) || ((g = (_ = n.data) == null ? void 0 : _.data) == null ? void 0 : g.type), p = {
1226
1242
  pie: { label: !1, legend: !0, tooltip: !0 },
1227
1243
  donut: { label: !1, legend: !0, tooltip: !0 },
1228
1244
  bar: { label: !1, legend: !1, tooltip: !0 },
1229
1245
  line: { label: !1, legend: !1, tooltip: !0 },
1230
1246
  funnel: { label: !1, legend: !1, tooltip: !0 }
1231
- }[c] || { label: !1, legend: !1, tooltip: !0 }, v = {
1247
+ }[d] || { label: !1, legend: !1, tooltip: !0 }, v = {
1232
1248
  show: {
1233
1249
  label: "Підпис",
1234
1250
  type: "switcher",
@@ -1261,7 +1277,7 @@ const Ia = {
1261
1277
  { id: "bottom", text: "Bottom" }
1262
1278
  ]
1263
1279
  }
1264
- }, g = {
1280
+ }, m = {
1265
1281
  show: {
1266
1282
  label: "Легенда",
1267
1283
  type: "switcher",
@@ -1273,41 +1289,41 @@ const Ia = {
1273
1289
  type: "switcher",
1274
1290
  title: "Показати тултіп"
1275
1291
  }
1276
- }, k = (C = n.data) == null ? void 0 : C.style, $ = I(
1277
- k != null && k.label ? { ...k.label } : { show: f.label }
1278
- ), L = I(
1279
- k != null && k.legend ? { ...k.legend } : { show: f.legend }
1280
- ), w = I(
1281
- k != null && k.tooltip ? { ...k.tooltip } : { show: f.tooltip }
1282
- ), d = () => {
1292
+ }, k = (C = n.data) == null ? void 0 : C.style, D = I(
1293
+ k != null && k.label ? { ...k.label } : { show: p.label }
1294
+ ), V = I(
1295
+ k != null && k.legend ? { ...k.legend } : { show: p.legend }
1296
+ ), y = I(
1297
+ k != null && k.tooltip ? { ...k.tooltip } : { show: p.tooltip }
1298
+ ), f = () => {
1283
1299
  const z = new CustomEvent(`update-style-${n.widgetName}`);
1284
1300
  z.chartId = n.widgetName, z.options = {
1285
1301
  options: {
1286
- legend: L.value,
1287
- tooltip: w.value,
1288
- label: $.value
1302
+ legend: V.value,
1303
+ tooltip: y.value,
1304
+ label: D.value
1289
1305
  },
1290
- seriesOptions: $.value
1306
+ seriesOptions: D.value
1291
1307
  }, window.dispatchEvent(z);
1292
1308
  };
1293
- te($, d, { deep: !0 }), te(L, d, { deep: !0 }), te(w, d, { deep: !0 });
1294
- const x = async () => {
1309
+ ae(D, f, { deep: !0 }), ae(V, f, { deep: !0 }), ae(y, f, { deep: !0 });
1310
+ const w = async () => {
1295
1311
  try {
1296
1312
  await H.put(`/bi-dashboard/${l.value}/${n.widgetName}`, {
1297
1313
  style: {
1298
- legend: L.value,
1299
- tooltip: w.value,
1300
- label: $.value
1314
+ legend: V.value,
1315
+ tooltip: y.value,
1316
+ label: D.value
1301
1317
  }
1302
1318
  });
1303
1319
  const z = new CustomEvent(`update-style-${n.widgetName}`);
1304
1320
  z.chartId = n.widgetName, z.options = {
1305
1321
  options: {
1306
- legend: L.value,
1307
- tooltip: w.value,
1308
- label: $.value
1322
+ legend: V.value,
1323
+ tooltip: y.value,
1324
+ label: D.value
1309
1325
  },
1310
- seriesOptions: $.value
1326
+ seriesOptions: D.value
1311
1327
  }, window.dispatchEvent(z), i("update-dashboard"), r({
1312
1328
  type: "success",
1313
1329
  title: "Успішно!",
@@ -1323,30 +1339,30 @@ const Ia = {
1323
1339
  };
1324
1340
  return le(() => {
1325
1341
  const z = new URLSearchParams(window.top.location.search);
1326
- o.value = z.get("dashboard"), d();
1327
- }), e({ requestUpdateWidget: x }), (z, R) => (p(), y("div", Ba, [
1328
- T(E(a), {
1342
+ o.value = z.get("dashboard"), f();
1343
+ }), e({ requestUpdateWidget: w }), (z, R) => (h(), x("div", Oa, [
1344
+ T(N(a), {
1329
1345
  schema: v,
1330
- values: $.value,
1331
- "onUpdate:values": R[0] || (R[0] = (q) => $.value = q),
1346
+ values: D.value,
1347
+ "onUpdate:values": R[0] || (R[0] = (F) => D.value = F),
1332
1348
  class: "p-0"
1333
1349
  }, null, 8, ["values"]),
1334
- T(E(a), {
1335
- schema: g,
1336
- values: L.value,
1337
- "onUpdate:values": R[1] || (R[1] = (q) => L.value = q),
1350
+ T(N(a), {
1351
+ schema: m,
1352
+ values: V.value,
1353
+ "onUpdate:values": R[1] || (R[1] = (F) => V.value = F),
1338
1354
  class: "p-0"
1339
1355
  }, null, 8, ["values"]),
1340
- T(E(a), {
1356
+ T(N(a), {
1341
1357
  schema: b,
1342
- values: w.value,
1343
- "onUpdate:values": R[2] || (R[2] = (q) => w.value = q),
1358
+ values: y.value,
1359
+ "onUpdate:values": R[2] || (R[2] = (F) => y.value = F),
1344
1360
  class: "p-0"
1345
1361
  }, null, 8, ["values"])
1346
1362
  ]));
1347
1363
  }
1348
1364
  };
1349
- function tt() {
1365
+ function st() {
1350
1366
  return {
1351
1367
  async: !1,
1352
1368
  breaks: !1,
@@ -1360,39 +1376,39 @@ function tt() {
1360
1376
  walkTokens: null
1361
1377
  };
1362
1378
  }
1363
- let be = tt();
1364
- function es(s) {
1379
+ let be = st();
1380
+ function ts(s) {
1365
1381
  be = s;
1366
1382
  }
1367
- const ts = /[&<>"']/, Pa = new RegExp(ts.source, "g"), ss = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Aa = new RegExp(ss.source, "g"), Fa = {
1383
+ const ss = /[&<>"']/, Aa = new RegExp(ss.source, "g"), as = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Fa = new RegExp(as.source, "g"), qa = {
1368
1384
  "&": "&amp;",
1369
1385
  "<": "&lt;",
1370
1386
  ">": "&gt;",
1371
1387
  '"': "&quot;",
1372
1388
  "'": "&#39;"
1373
- }, Et = (s) => Fa[s];
1374
- function K(s, e) {
1389
+ }, jt = (s) => qa[s];
1390
+ function te(s, e) {
1375
1391
  if (e) {
1376
- if (ts.test(s))
1377
- return s.replace(Pa, Et);
1378
- } else if (ss.test(s))
1379
- return s.replace(Aa, Et);
1392
+ if (ss.test(s))
1393
+ return s.replace(Aa, jt);
1394
+ } else if (as.test(s))
1395
+ return s.replace(Fa, jt);
1380
1396
  return s;
1381
1397
  }
1382
- const qa = /(^|[^\[])\^/g;
1398
+ const Ma = /(^|[^\[])\^/g;
1383
1399
  function O(s, e) {
1384
1400
  let t = typeof s == "string" ? s : s.source;
1385
1401
  e = e || "";
1386
1402
  const a = {
1387
1403
  replace: (r, i) => {
1388
1404
  let n = typeof i == "string" ? i : i.source;
1389
- return n = n.replace(qa, "$1"), t = t.replace(r, n), a;
1405
+ return n = n.replace(Ma, "$1"), t = t.replace(r, n), a;
1390
1406
  },
1391
1407
  getRegex: () => new RegExp(t, e)
1392
1408
  };
1393
1409
  return a;
1394
1410
  }
1395
- function jt(s) {
1411
+ function Bt(s) {
1396
1412
  try {
1397
1413
  s = encodeURI(s).replace(/%25/g, "%");
1398
1414
  } catch {
@@ -1401,10 +1417,10 @@ function jt(s) {
1401
1417
  return s;
1402
1418
  }
1403
1419
  const Se = { exec: () => null };
1404
- function Bt(s, e) {
1420
+ function Ot(s, e) {
1405
1421
  const t = s.replace(/\|/g, (i, n, o) => {
1406
- let l = !1, c = n;
1407
- for (; --c >= 0 && o[c] === "\\"; )
1422
+ let l = !1, d = n;
1423
+ for (; --d >= 0 && o[d] === "\\"; )
1408
1424
  l = !l;
1409
1425
  return l ? "|" : " |";
1410
1426
  }), a = t.split(/ \|/);
@@ -1428,7 +1444,7 @@ function Te(s, e, t) {
1428
1444
  r++;
1429
1445
  return s.slice(0, a - r);
1430
1446
  }
1431
- function Ma(s, e) {
1447
+ function Ua(s, e) {
1432
1448
  if (s.indexOf(e[1]) === -1)
1433
1449
  return -1;
1434
1450
  let t = 0;
@@ -1441,8 +1457,8 @@ function Ma(s, e) {
1441
1457
  return a;
1442
1458
  return -1;
1443
1459
  }
1444
- function Ot(s, e, t, a) {
1445
- const r = e.href, i = e.title ? K(e.title) : null, n = s[1].replace(/\\([\[\]])/g, "$1");
1460
+ function Pt(s, e, t, a) {
1461
+ const r = e.href, i = e.title ? te(e.title) : null, n = s[1].replace(/\\([\[\]])/g, "$1");
1446
1462
  if (s[0].charAt(0) !== "!") {
1447
1463
  a.state.inLink = !0;
1448
1464
  const o = {
@@ -1460,10 +1476,10 @@ function Ot(s, e, t, a) {
1460
1476
  raw: t,
1461
1477
  href: r,
1462
1478
  title: i,
1463
- text: K(n)
1479
+ text: te(n)
1464
1480
  };
1465
1481
  }
1466
- function Ua(s, e) {
1482
+ function Ga(s, e) {
1467
1483
  const t = s.match(/^(\s+)(?:```)/);
1468
1484
  if (t === null)
1469
1485
  return e;
@@ -1511,7 +1527,7 @@ class Ae {
1511
1527
  fences(e) {
1512
1528
  const t = this.rules.block.fences.exec(e);
1513
1529
  if (t) {
1514
- const a = t[0], r = Ua(a, t[3] || "");
1530
+ const a = t[0], r = Ga(a, t[3] || "");
1515
1531
  return {
1516
1532
  type: "code",
1517
1533
  raw: a,
@@ -1556,38 +1572,38 @@ class Ae {
1556
1572
  for (; a.length > 0; ) {
1557
1573
  let o = !1;
1558
1574
  const l = [];
1559
- let c;
1560
- for (c = 0; c < a.length; c++)
1561
- if (/^ {0,3}>/.test(a[c]))
1562
- l.push(a[c]), o = !0;
1575
+ let d;
1576
+ for (d = 0; d < a.length; d++)
1577
+ if (/^ {0,3}>/.test(a[d]))
1578
+ l.push(a[d]), o = !0;
1563
1579
  else if (!o)
1564
- l.push(a[c]);
1580
+ l.push(a[d]);
1565
1581
  else
1566
1582
  break;
1567
- a = a.slice(c);
1583
+ a = a.slice(d);
1568
1584
  const u = l.join(`
1569
- `), f = u.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
1585
+ `), p = u.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
1570
1586
  $1`).replace(/^ {0,3}>[ \t]?/gm, "");
1571
1587
  r = r ? `${r}
1572
1588
  ${u}` : u, i = i ? `${i}
1573
- ${f}` : f;
1589
+ ${p}` : p;
1574
1590
  const v = this.lexer.state.top;
1575
- if (this.lexer.state.top = !0, this.lexer.blockTokens(f, n, !0), this.lexer.state.top = v, a.length === 0)
1591
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(p, n, !0), this.lexer.state.top = v, a.length === 0)
1576
1592
  break;
1577
- const g = n[n.length - 1];
1578
- if ((g == null ? void 0 : g.type) === "code")
1593
+ const m = n[n.length - 1];
1594
+ if ((m == null ? void 0 : m.type) === "code")
1579
1595
  break;
1580
- if ((g == null ? void 0 : g.type) === "blockquote") {
1581
- const b = g, k = b.raw + `
1596
+ if ((m == null ? void 0 : m.type) === "blockquote") {
1597
+ const b = m, k = b.raw + `
1582
1598
  ` + a.join(`
1583
- `), $ = this.blockquote(k);
1584
- n[n.length - 1] = $, r = r.substring(0, r.length - b.raw.length) + $.raw, i = i.substring(0, i.length - b.text.length) + $.text;
1599
+ `), D = this.blockquote(k);
1600
+ n[n.length - 1] = D, r = r.substring(0, r.length - b.raw.length) + D.raw, i = i.substring(0, i.length - b.text.length) + D.text;
1585
1601
  break;
1586
- } else if ((g == null ? void 0 : g.type) === "list") {
1587
- const b = g, k = b.raw + `
1602
+ } else if ((m == null ? void 0 : m.type) === "list") {
1603
+ const b = m, k = b.raw + `
1588
1604
  ` + a.join(`
1589
- `), $ = this.list(k);
1590
- n[n.length - 1] = $, r = r.substring(0, r.length - g.raw.length) + $.raw, i = i.substring(0, i.length - b.raw.length) + $.raw, a = k.substring(n[n.length - 1].raw.length).split(`
1605
+ `), D = this.list(k);
1606
+ n[n.length - 1] = D, r = r.substring(0, r.length - m.raw.length) + D.raw, i = i.substring(0, i.length - b.raw.length) + D.raw, a = k.substring(n[n.length - 1].raw.length).split(`
1591
1607
  `);
1592
1608
  continue;
1593
1609
  }
@@ -1616,51 +1632,51 @@ ${f}` : f;
1616
1632
  const n = new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`);
1617
1633
  let o = !1;
1618
1634
  for (; e; ) {
1619
- let l = !1, c = "", u = "";
1635
+ let l = !1, d = "", u = "";
1620
1636
  if (!(t = n.exec(e)) || this.rules.block.hr.test(e))
1621
1637
  break;
1622
- c = t[0], e = e.substring(c.length);
1623
- let f = t[2].split(`
1624
- `, 1)[0].replace(/^\t+/, (L) => " ".repeat(3 * L.length)), v = e.split(`
1625
- `, 1)[0], g = !f.trim(), b = 0;
1626
- if (this.options.pedantic ? (b = 2, u = f.trimStart()) : g ? b = t[1].length + 1 : (b = t[2].search(/[^ ]/), b = b > 4 ? 1 : b, u = f.slice(b), b += t[1].length), g && /^[ \t]*$/.test(v) && (c += v + `
1638
+ d = t[0], e = e.substring(d.length);
1639
+ let p = t[2].split(`
1640
+ `, 1)[0].replace(/^\t+/, (V) => " ".repeat(3 * V.length)), v = e.split(`
1641
+ `, 1)[0], m = !p.trim(), b = 0;
1642
+ if (this.options.pedantic ? (b = 2, u = p.trimStart()) : m ? b = t[1].length + 1 : (b = t[2].search(/[^ ]/), b = b > 4 ? 1 : b, u = p.slice(b), b += t[1].length), m && /^[ \t]*$/.test(v) && (d += v + `
1627
1643
  `, e = e.substring(v.length + 1), l = !0), !l) {
1628
- const L = new RegExp(`^ {0,${Math.min(3, b - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), w = new RegExp(`^ {0,${Math.min(3, b - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), d = new RegExp(`^ {0,${Math.min(3, b - 1)}}(?:\`\`\`|~~~)`), x = new RegExp(`^ {0,${Math.min(3, b - 1)}}#`), _ = new RegExp(`^ {0,${Math.min(3, b - 1)}}<(?:[a-z].*>|!--)`, "i");
1644
+ const V = new RegExp(`^ {0,${Math.min(3, b - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), y = new RegExp(`^ {0,${Math.min(3, b - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), f = new RegExp(`^ {0,${Math.min(3, b - 1)}}(?:\`\`\`|~~~)`), w = new RegExp(`^ {0,${Math.min(3, b - 1)}}#`), $ = new RegExp(`^ {0,${Math.min(3, b - 1)}}<(?:[a-z].*>|!--)`, "i");
1629
1645
  for (; e; ) {
1630
- const D = e.split(`
1646
+ const _ = e.split(`
1631
1647
  `, 1)[0];
1632
- let m;
1633
- if (v = D, this.options.pedantic ? (v = v.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), m = v) : m = v.replace(/\t/g, " "), d.test(v) || x.test(v) || _.test(v) || L.test(v) || w.test(v))
1648
+ let g;
1649
+ if (v = _, this.options.pedantic ? (v = v.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), g = v) : g = v.replace(/\t/g, " "), f.test(v) || w.test(v) || $.test(v) || V.test(v) || y.test(v))
1634
1650
  break;
1635
- if (m.search(/[^ ]/) >= b || !v.trim())
1651
+ if (g.search(/[^ ]/) >= b || !v.trim())
1636
1652
  u += `
1637
- ` + m.slice(b);
1653
+ ` + g.slice(b);
1638
1654
  else {
1639
- if (g || f.replace(/\t/g, " ").search(/[^ ]/) >= 4 || d.test(f) || x.test(f) || w.test(f))
1655
+ if (m || p.replace(/\t/g, " ").search(/[^ ]/) >= 4 || f.test(p) || w.test(p) || y.test(p))
1640
1656
  break;
1641
1657
  u += `
1642
1658
  ` + v;
1643
1659
  }
1644
- !g && !v.trim() && (g = !0), c += D + `
1645
- `, e = e.substring(D.length + 1), f = m.slice(b);
1660
+ !m && !v.trim() && (m = !0), d += _ + `
1661
+ `, e = e.substring(_.length + 1), p = g.slice(b);
1646
1662
  }
1647
1663
  }
1648
- i.loose || (o ? i.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(c) && (o = !0));
1649
- let k = null, $;
1650
- this.options.gfm && (k = /^\[[ xX]\] /.exec(u), k && ($ = k[0] !== "[ ] ", u = u.replace(/^\[[ xX]\] +/, ""))), i.items.push({
1664
+ i.loose || (o ? i.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(d) && (o = !0));
1665
+ let k = null, D;
1666
+ this.options.gfm && (k = /^\[[ xX]\] /.exec(u), k && (D = k[0] !== "[ ] ", u = u.replace(/^\[[ xX]\] +/, ""))), i.items.push({
1651
1667
  type: "list_item",
1652
- raw: c,
1668
+ raw: d,
1653
1669
  task: !!k,
1654
- checked: $,
1670
+ checked: D,
1655
1671
  loose: !1,
1656
1672
  text: u,
1657
1673
  tokens: []
1658
- }), i.raw += c;
1674
+ }), i.raw += d;
1659
1675
  }
1660
1676
  i.items[i.items.length - 1].raw = i.items[i.items.length - 1].raw.trimEnd(), i.items[i.items.length - 1].text = i.items[i.items.length - 1].text.trimEnd(), i.raw = i.raw.trimEnd();
1661
1677
  for (let l = 0; l < i.items.length; l++)
1662
1678
  if (this.lexer.state.top = !1, i.items[l].tokens = this.lexer.blockTokens(i.items[l].text, []), !i.loose) {
1663
- const c = i.items[l].tokens.filter((f) => f.type === "space"), u = c.length > 0 && c.some((f) => /\n.*\n/.test(f.raw));
1679
+ const d = i.items[l].tokens.filter((p) => p.type === "space"), u = d.length > 0 && d.some((p) => /\n.*\n/.test(p.raw));
1664
1680
  i.loose = u;
1665
1681
  }
1666
1682
  if (i.loose)
@@ -1697,7 +1713,7 @@ ${f}` : f;
1697
1713
  const t = this.rules.block.table.exec(e);
1698
1714
  if (!t || !/[:|]/.test(t[2]))
1699
1715
  return;
1700
- const a = Bt(t[1]), r = t[2].replace(/^\||\| *$/g, "").split("|"), i = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
1716
+ const a = Ot(t[1]), r = t[2].replace(/^\||\| *$/g, "").split("|"), i = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
1701
1717
  `) : [], n = {
1702
1718
  type: "table",
1703
1719
  raw: t[0],
@@ -1716,11 +1732,11 @@ ${f}` : f;
1716
1732
  align: n.align[o]
1717
1733
  });
1718
1734
  for (const o of i)
1719
- n.rows.push(Bt(o, n.header.length).map((l, c) => ({
1735
+ n.rows.push(Ot(o, n.header.length).map((l, d) => ({
1720
1736
  text: l,
1721
1737
  tokens: this.lexer.inline(l),
1722
1738
  header: !1,
1723
- align: n.align[c]
1739
+ align: n.align[d]
1724
1740
  })));
1725
1741
  return n;
1726
1742
  }
@@ -1765,7 +1781,7 @@ ${f}` : f;
1765
1781
  return {
1766
1782
  type: "escape",
1767
1783
  raw: t[0],
1768
- text: K(t[1])
1784
+ text: te(t[1])
1769
1785
  };
1770
1786
  }
1771
1787
  tag(e) {
@@ -1791,7 +1807,7 @@ ${f}` : f;
1791
1807
  if ((a.length - n.length) % 2 === 0)
1792
1808
  return;
1793
1809
  } else {
1794
- const n = Ma(t[2], "()");
1810
+ const n = Ua(t[2], "()");
1795
1811
  if (n > -1) {
1796
1812
  const l = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + n;
1797
1813
  t[2] = t[2].substring(0, n), t[0] = t[0].substring(0, l).trim(), t[3] = "";
@@ -1803,7 +1819,7 @@ ${f}` : f;
1803
1819
  n && (r = n[1], i = n[3]);
1804
1820
  } else
1805
1821
  i = t[3] ? t[3].slice(1, -1) : "";
1806
- return r = r.trim(), /^</.test(r) && (this.options.pedantic && !/>$/.test(a) ? r = r.slice(1) : r = r.slice(1, -1)), Ot(t, {
1822
+ return r = r.trim(), /^</.test(r) && (this.options.pedantic && !/>$/.test(a) ? r = r.slice(1) : r = r.slice(1, -1)), Pt(t, {
1807
1823
  href: r && r.replace(this.rules.inline.anyPunctuation, "$1"),
1808
1824
  title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
1809
1825
  }, t[0], this.lexer);
@@ -1821,7 +1837,7 @@ ${f}` : f;
1821
1837
  text: n
1822
1838
  };
1823
1839
  }
1824
- return Ot(a, i, a[0], this.lexer);
1840
+ return Pt(a, i, a[0], this.lexer);
1825
1841
  }
1826
1842
  }
1827
1843
  emStrong(e, t, a = "") {
@@ -1830,35 +1846,35 @@ ${f}` : f;
1830
1846
  return;
1831
1847
  if (!(r[1] || r[2] || "") || !a || this.rules.inline.punctuation.exec(a)) {
1832
1848
  const n = [...r[0]].length - 1;
1833
- let o, l, c = n, u = 0;
1834
- const f = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1835
- for (f.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = f.exec(t)) != null; ) {
1849
+ let o, l, d = n, u = 0;
1850
+ const p = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1851
+ for (p.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = p.exec(t)) != null; ) {
1836
1852
  if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o)
1837
1853
  continue;
1838
1854
  if (l = [...o].length, r[3] || r[4]) {
1839
- c += l;
1855
+ d += l;
1840
1856
  continue;
1841
1857
  } else if ((r[5] || r[6]) && n % 3 && !((n + l) % 3)) {
1842
1858
  u += l;
1843
1859
  continue;
1844
1860
  }
1845
- if (c -= l, c > 0)
1861
+ if (d -= l, d > 0)
1846
1862
  continue;
1847
- l = Math.min(l, l + c + u);
1848
- const v = [...r[0]][0].length, g = e.slice(0, n + r.index + v + l);
1863
+ l = Math.min(l, l + d + u);
1864
+ const v = [...r[0]][0].length, m = e.slice(0, n + r.index + v + l);
1849
1865
  if (Math.min(n, l) % 2) {
1850
- const k = g.slice(1, -1);
1866
+ const k = m.slice(1, -1);
1851
1867
  return {
1852
1868
  type: "em",
1853
- raw: g,
1869
+ raw: m,
1854
1870
  text: k,
1855
1871
  tokens: this.lexer.inlineTokens(k)
1856
1872
  };
1857
1873
  }
1858
- const b = g.slice(2, -2);
1874
+ const b = m.slice(2, -2);
1859
1875
  return {
1860
1876
  type: "strong",
1861
- raw: g,
1877
+ raw: m,
1862
1878
  text: b,
1863
1879
  tokens: this.lexer.inlineTokens(b)
1864
1880
  };
@@ -1870,7 +1886,7 @@ ${f}` : f;
1870
1886
  if (t) {
1871
1887
  let a = t[2].replace(/\n/g, " ");
1872
1888
  const r = /[^ ]/.test(a), i = /^ /.test(a) && / $/.test(a);
1873
- return r && i && (a = a.substring(1, a.length - 1)), a = K(a, !0), {
1889
+ return r && i && (a = a.substring(1, a.length - 1)), a = te(a, !0), {
1874
1890
  type: "codespan",
1875
1891
  raw: t[0],
1876
1892
  text: a
@@ -1899,7 +1915,7 @@ ${f}` : f;
1899
1915
  const t = this.rules.inline.autolink.exec(e);
1900
1916
  if (t) {
1901
1917
  let a, r;
1902
- return t[2] === "@" ? (a = K(t[1]), r = "mailto:" + a) : (a = K(t[1]), r = a), {
1918
+ return t[2] === "@" ? (a = te(t[1]), r = "mailto:" + a) : (a = te(t[1]), r = a), {
1903
1919
  type: "link",
1904
1920
  raw: t[0],
1905
1921
  text: a,
@@ -1920,13 +1936,13 @@ ${f}` : f;
1920
1936
  if (t = this.rules.inline.url.exec(e)) {
1921
1937
  let r, i;
1922
1938
  if (t[2] === "@")
1923
- r = K(t[0]), i = "mailto:" + r;
1939
+ r = te(t[0]), i = "mailto:" + r;
1924
1940
  else {
1925
1941
  let n;
1926
1942
  do
1927
1943
  n = t[0], t[0] = ((a = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : a[0]) ?? "";
1928
1944
  while (n !== t[0]);
1929
- r = K(t[0]), t[1] === "www." ? i = "http://" + t[0] : i = t[0];
1945
+ r = te(t[0]), t[1] === "www." ? i = "http://" + t[0] : i = t[0];
1930
1946
  }
1931
1947
  return {
1932
1948
  type: "link",
@@ -1947,7 +1963,7 @@ ${f}` : f;
1947
1963
  const t = this.rules.inline.text.exec(e);
1948
1964
  if (t) {
1949
1965
  let a;
1950
- return this.lexer.state.inRawBlock ? a = t[0] : a = K(t[0]), {
1966
+ return this.lexer.state.inRawBlock ? a = t[0] : a = te(t[0]), {
1951
1967
  type: "text",
1952
1968
  raw: t[0],
1953
1969
  text: a
@@ -1955,81 +1971,81 @@ ${f}` : f;
1955
1971
  }
1956
1972
  }
1957
1973
  }
1958
- const Ga = /^(?:[ \t]*(?:\n|$))+/, Ha = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Za = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, We = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Qa = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, as = /(?:[*+-]|\d{1,9}[.)])/, rs = O(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, as).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/).getRegex(), st = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Xa = /^[^\n]+/, at = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Ya = O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", at).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ja = O(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, as).getRegex(), Ze = "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", rt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ka = O("^ {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", rt).replace("tag", Ze).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ns = O(st).replace("hr", We).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", Ze).getRegex(), er = O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ns).getRegex(), nt = {
1959
- blockquote: er,
1960
- code: Ha,
1961
- def: Ya,
1962
- fences: Za,
1963
- heading: Qa,
1974
+ const Ha = /^(?:[ \t]*(?:\n|$))+/, Za = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Qa = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, We = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Xa = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, rs = /(?:[*+-]|\d{1,9}[.)])/, ns = O(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, rs).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/).getRegex(), at = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ya = /^[^\n]+/, rt = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Ja = O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", rt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ka = O(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, rs).getRegex(), Ze = "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", nt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, er = O("^ {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", nt).replace("tag", Ze).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), is = O(at).replace("hr", We).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", Ze).getRegex(), tr = O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", is).getRegex(), it = {
1975
+ blockquote: tr,
1976
+ code: Za,
1977
+ def: Ja,
1978
+ fences: Qa,
1979
+ heading: Xa,
1964
1980
  hr: We,
1965
- html: Ka,
1966
- lheading: rs,
1967
- list: Ja,
1968
- newline: Ga,
1969
- paragraph: ns,
1981
+ html: er,
1982
+ lheading: ns,
1983
+ list: Ka,
1984
+ newline: Ha,
1985
+ paragraph: is,
1970
1986
  table: Se,
1971
- text: Xa
1972
- }, Pt = O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", We).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", Ze).getRegex(), tr = {
1973
- ...nt,
1974
- table: Pt,
1975
- paragraph: O(st).replace("hr", We).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Pt).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", Ze).getRegex()
1976
- }, sr = {
1977
- ...nt,
1978
- html: O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", rt).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(),
1987
+ text: Ya
1988
+ }, At = O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", We).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", Ze).getRegex(), sr = {
1989
+ ...it,
1990
+ table: At,
1991
+ paragraph: O(at).replace("hr", We).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", At).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", Ze).getRegex()
1992
+ }, ar = {
1993
+ ...it,
1994
+ html: O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", nt).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(),
1979
1995
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1980
1996
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
1981
1997
  fences: Se,
1982
1998
  // fences not supported
1983
1999
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1984
- paragraph: O(st).replace("hr", We).replace("heading", ` *#{1,6} *[^
1985
- ]`).replace("lheading", rs).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1986
- }, is = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ar = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, os = /^( {2,}|\\)\n(?!\s*$)/, rr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ne = "\\p{P}\\p{S}", nr = O(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ne).getRegex(), ir = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, or = O(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ne).getRegex(), lr = O("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ne).getRegex(), cr = O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ne).getRegex(), dr = O(/\\([punct])/, "gu").replace(/punct/g, Ne).getRegex(), ur = O(/^<(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(), hr = O(rt).replace("(?:-->|$)", "-->").getRegex(), pr = O("^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", hr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Fe = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, fr = O(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Fe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ls = O(/^!?\[(label)\]\[(ref)\]/).replace("label", Fe).replace("ref", at).getRegex(), cs = O(/^!?\[(ref)\](?:\[\])?/).replace("ref", at).getRegex(), gr = O("reflink|nolink(?!\\()", "g").replace("reflink", ls).replace("nolink", cs).getRegex(), it = {
2000
+ paragraph: O(at).replace("hr", We).replace("heading", ` *#{1,6} *[^
2001
+ ]`).replace("lheading", ns).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2002
+ }, os = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, rr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ls = /^( {2,}|\\)\n(?!\s*$)/, nr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ne = "\\p{P}\\p{S}", ir = O(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Ne).getRegex(), or = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, lr = O(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Ne).getRegex(), dr = O("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Ne).getRegex(), cr = O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Ne).getRegex(), ur = O(/\\([punct])/, "gu").replace(/punct/g, Ne).getRegex(), hr = O(/^<(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(), pr = O(nt).replace("(?:-->|$)", "-->").getRegex(), fr = O("^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", pr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Fe = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, gr = O(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Fe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ds = O(/^!?\[(label)\]\[(ref)\]/).replace("label", Fe).replace("ref", rt).getRegex(), cs = O(/^!?\[(ref)\](?:\[\])?/).replace("ref", rt).getRegex(), mr = O("reflink|nolink(?!\\()", "g").replace("reflink", ds).replace("nolink", cs).getRegex(), ot = {
1987
2003
  _backpedal: Se,
1988
2004
  // only used for GFM url
1989
- anyPunctuation: dr,
1990
- autolink: ur,
1991
- blockSkip: ir,
1992
- br: os,
1993
- code: ar,
2005
+ anyPunctuation: ur,
2006
+ autolink: hr,
2007
+ blockSkip: or,
2008
+ br: ls,
2009
+ code: rr,
1994
2010
  del: Se,
1995
- emStrongLDelim: or,
1996
- emStrongRDelimAst: lr,
2011
+ emStrongLDelim: lr,
2012
+ emStrongRDelimAst: dr,
1997
2013
  emStrongRDelimUnd: cr,
1998
- escape: is,
1999
- link: fr,
2014
+ escape: os,
2015
+ link: gr,
2000
2016
  nolink: cs,
2001
- punctuation: nr,
2002
- reflink: ls,
2003
- reflinkSearch: gr,
2004
- tag: pr,
2005
- text: rr,
2017
+ punctuation: ir,
2018
+ reflink: ds,
2019
+ reflinkSearch: mr,
2020
+ tag: fr,
2021
+ text: nr,
2006
2022
  url: Se
2007
- }, mr = {
2008
- ...it,
2023
+ }, br = {
2024
+ ...ot,
2009
2025
  link: O(/^!?\[(label)\]\((.*?)\)/).replace("label", Fe).getRegex(),
2010
2026
  reflink: O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Fe).getRegex()
2011
- }, et = {
2012
- ...it,
2013
- escape: O(is).replace("])", "~|])").getRegex(),
2027
+ }, tt = {
2028
+ ...ot,
2029
+ escape: O(os).replace("])", "~|])").getRegex(),
2014
2030
  url: O(/^((?: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(),
2015
2031
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2016
2032
  del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
2017
2033
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
2018
- }, br = {
2019
- ...et,
2020
- br: O(os).replace("{2,}", "*").getRegex(),
2021
- text: O(et.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2034
+ }, xr = {
2035
+ ...tt,
2036
+ br: O(ls).replace("{2,}", "*").getRegex(),
2037
+ text: O(tt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2022
2038
  }, je = {
2023
- normal: nt,
2024
- gfm: tr,
2025
- pedantic: sr
2026
- }, Ie = {
2027
2039
  normal: it,
2028
- gfm: et,
2029
- breaks: br,
2030
- pedantic: mr
2040
+ gfm: sr,
2041
+ pedantic: ar
2042
+ }, Ie = {
2043
+ normal: ot,
2044
+ gfm: tt,
2045
+ breaks: xr,
2046
+ pedantic: br
2031
2047
  };
2032
- class ae {
2048
+ class re {
2033
2049
  constructor(e) {
2034
2050
  P(this, "tokens");
2035
2051
  P(this, "options");
@@ -2060,13 +2076,13 @@ class ae {
2060
2076
  * Static Lex Method
2061
2077
  */
2062
2078
  static lex(e, t) {
2063
- return new ae(t).lex(e);
2079
+ return new re(t).lex(e);
2064
2080
  }
2065
2081
  /**
2066
2082
  * Static Lex Inline Method
2067
2083
  */
2068
2084
  static lexInline(e, t) {
2069
- return new ae(t).inlineTokens(e);
2085
+ return new re(t).inlineTokens(e);
2070
2086
  }
2071
2087
  /**
2072
2088
  * Preprocessing
@@ -2140,9 +2156,9 @@ class ae {
2140
2156
  if (n = e, this.options.extensions && this.options.extensions.startBlock) {
2141
2157
  let o = 1 / 0;
2142
2158
  const l = e.slice(1);
2143
- let c;
2159
+ let d;
2144
2160
  this.options.extensions.startBlock.forEach((u) => {
2145
- c = u.call({ lexer: this }, l), typeof c == "number" && c >= 0 && (o = Math.min(o, c));
2161
+ d = u.call({ lexer: this }, l), typeof d == "number" && d >= 0 && (o = Math.min(o, d));
2146
2162
  }), o < 1 / 0 && o >= 0 && (n = e.substring(0, o + 1));
2147
2163
  }
2148
2164
  if (this.state.top && (r = this.tokenizer.paragraph(n))) {
@@ -2175,7 +2191,7 @@ class ae {
2175
2191
  * Lexing/Compiling
2176
2192
  */
2177
2193
  inlineTokens(e, t = []) {
2178
- let a, r, i, n = e, o, l, c;
2194
+ let a, r, i, n = e, o, l, d;
2179
2195
  if (this.tokens.links) {
2180
2196
  const u = Object.keys(this.tokens.links);
2181
2197
  if (u.length > 0)
@@ -2187,7 +2203,7 @@ class ae {
2187
2203
  for (; (o = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; )
2188
2204
  n = n.slice(0, o.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
2189
2205
  for (; e; )
2190
- if (l || (c = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((u) => (a = u.call({ lexer: this }, e, t)) ? (e = e.substring(a.raw.length), t.push(a), !0) : !1))) {
2206
+ if (l || (d = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((u) => (a = u.call({ lexer: this }, e, t)) ? (e = e.substring(a.raw.length), t.push(a), !0) : !1))) {
2191
2207
  if (a = this.tokenizer.escape(e)) {
2192
2208
  e = e.substring(a.raw.length), t.push(a);
2193
2209
  continue;
@@ -2204,7 +2220,7 @@ class ae {
2204
2220
  e = e.substring(a.raw.length), r = t[t.length - 1], r && a.type === "text" && r.type === "text" ? (r.raw += a.raw, r.text += a.text) : t.push(a);
2205
2221
  continue;
2206
2222
  }
2207
- if (a = this.tokenizer.emStrong(e, n, c)) {
2223
+ if (a = this.tokenizer.emStrong(e, n, d)) {
2208
2224
  e = e.substring(a.raw.length), t.push(a);
2209
2225
  continue;
2210
2226
  }
@@ -2230,14 +2246,14 @@ class ae {
2230
2246
  }
2231
2247
  if (i = e, this.options.extensions && this.options.extensions.startInline) {
2232
2248
  let u = 1 / 0;
2233
- const f = e.slice(1);
2249
+ const p = e.slice(1);
2234
2250
  let v;
2235
- this.options.extensions.startInline.forEach((g) => {
2236
- v = g.call({ lexer: this }, f), typeof v == "number" && v >= 0 && (u = Math.min(u, v));
2251
+ this.options.extensions.startInline.forEach((m) => {
2252
+ v = m.call({ lexer: this }, p), typeof v == "number" && v >= 0 && (u = Math.min(u, v));
2237
2253
  }), u < 1 / 0 && u >= 0 && (i = e.substring(0, u + 1));
2238
2254
  }
2239
2255
  if (a = this.tokenizer.inlineText(i)) {
2240
- e = e.substring(a.raw.length), a.raw.slice(-1) !== "_" && (c = a.raw.slice(-1)), l = !0, r = t[t.length - 1], r && r.type === "text" ? (r.raw += a.raw, r.text += a.text) : t.push(a);
2256
+ e = e.substring(a.raw.length), a.raw.slice(-1) !== "_" && (d = a.raw.slice(-1)), l = !0, r = t[t.length - 1], r && r.type === "text" ? (r.raw += a.raw, r.text += a.text) : t.push(a);
2241
2257
  continue;
2242
2258
  }
2243
2259
  if (e) {
@@ -2266,8 +2282,8 @@ class qe {
2266
2282
  var n;
2267
2283
  const r = (n = (t || "").match(/^\S*/)) == null ? void 0 : n[0], i = e.replace(/\n$/, "") + `
2268
2284
  `;
2269
- return r ? '<pre><code class="language-' + K(r) + '">' + (a ? i : K(i, !0)) + `</code></pre>
2270
- ` : "<pre><code>" + (a ? i : K(i, !0)) + `</code></pre>
2285
+ return r ? '<pre><code class="language-' + te(r) + '">' + (a ? i : te(i, !0)) + `</code></pre>
2286
+ ` : "<pre><code>" + (a ? i : te(i, !0)) + `</code></pre>
2271
2287
  `;
2272
2288
  }
2273
2289
  blockquote({ tokens: e }) {
@@ -2366,7 +2382,7 @@ ${e}</tr>
2366
2382
  return `<del>${this.parser.parseInline(e)}</del>`;
2367
2383
  }
2368
2384
  link({ href: e, title: t, tokens: a }) {
2369
- const r = this.parser.parseInline(a), i = jt(e);
2385
+ const r = this.parser.parseInline(a), i = Bt(e);
2370
2386
  if (i === null)
2371
2387
  return r;
2372
2388
  e = i;
@@ -2374,7 +2390,7 @@ ${e}</tr>
2374
2390
  return t && (n += ' title="' + t + '"'), n += ">" + r + "</a>", n;
2375
2391
  }
2376
2392
  image({ href: e, title: t, text: a }) {
2377
- const r = jt(e);
2393
+ const r = Bt(e);
2378
2394
  if (r === null)
2379
2395
  return a;
2380
2396
  e = r;
@@ -2385,7 +2401,7 @@ ${e}</tr>
2385
2401
  return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : e.text;
2386
2402
  }
2387
2403
  }
2388
- class ot {
2404
+ class lt {
2389
2405
  // no need for block level renderers
2390
2406
  strong({ text: e }) {
2391
2407
  return e;
@@ -2415,24 +2431,24 @@ class ot {
2415
2431
  return "";
2416
2432
  }
2417
2433
  }
2418
- class re {
2434
+ class ne {
2419
2435
  constructor(e) {
2420
2436
  P(this, "options");
2421
2437
  P(this, "renderer");
2422
2438
  P(this, "textRenderer");
2423
- this.options = e || be, this.options.renderer = this.options.renderer || new qe(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ot();
2439
+ this.options = e || be, this.options.renderer = this.options.renderer || new qe(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new lt();
2424
2440
  }
2425
2441
  /**
2426
2442
  * Static Parse Method
2427
2443
  */
2428
2444
  static parse(e, t) {
2429
- return new re(t).parse(e);
2445
+ return new ne(t).parse(e);
2430
2446
  }
2431
2447
  /**
2432
2448
  * Static Parse Inline Method
2433
2449
  */
2434
2450
  static parseInline(e, t) {
2435
- return new re(t).parseInline(e);
2451
+ return new ne(t).parseInline(e);
2436
2452
  }
2437
2453
  /**
2438
2454
  * Parse Loop
@@ -2605,13 +2621,13 @@ class Re {
2605
2621
  * Provide function to tokenize markdown
2606
2622
  */
2607
2623
  provideLexer() {
2608
- return this.block ? ae.lex : ae.lexInline;
2624
+ return this.block ? re.lex : re.lexInline;
2609
2625
  }
2610
2626
  /**
2611
2627
  * Provide function to parse tokens
2612
2628
  */
2613
2629
  provideParser() {
2614
- return this.block ? re.parse : re.parseInline;
2630
+ return this.block ? ne.parse : ne.parseInline;
2615
2631
  }
2616
2632
  }
2617
2633
  P(Re, "passThroughHooks", /* @__PURE__ */ new Set([
@@ -2619,16 +2635,16 @@ P(Re, "passThroughHooks", /* @__PURE__ */ new Set([
2619
2635
  "postprocess",
2620
2636
  "processAllTokens"
2621
2637
  ]));
2622
- class xr {
2638
+ class yr {
2623
2639
  constructor(...e) {
2624
- P(this, "defaults", tt());
2640
+ P(this, "defaults", st());
2625
2641
  P(this, "options", this.setOptions);
2626
2642
  P(this, "parse", this.parseMarkdown(!0));
2627
2643
  P(this, "parseInline", this.parseMarkdown(!1));
2628
- P(this, "Parser", re);
2644
+ P(this, "Parser", ne);
2629
2645
  P(this, "Renderer", qe);
2630
- P(this, "TextRenderer", ot);
2631
- P(this, "Lexer", ae);
2646
+ P(this, "TextRenderer", lt);
2647
+ P(this, "Lexer", re);
2632
2648
  P(this, "Tokenizer", Ae);
2633
2649
  P(this, "Hooks", Re);
2634
2650
  this.use(...e);
@@ -2646,8 +2662,8 @@ class xr {
2646
2662
  for (const l of o.header)
2647
2663
  a = a.concat(this.walkTokens(l.tokens, t));
2648
2664
  for (const l of o.rows)
2649
- for (const c of l)
2650
- a = a.concat(this.walkTokens(c.tokens, t));
2665
+ for (const d of l)
2666
+ a = a.concat(this.walkTokens(d.tokens, t));
2651
2667
  break;
2652
2668
  }
2653
2669
  case "list": {
@@ -2658,8 +2674,8 @@ class xr {
2658
2674
  default: {
2659
2675
  const o = n;
2660
2676
  (i = (r = this.defaults.extensions) == null ? void 0 : r.childTokens) != null && i[o.type] ? this.defaults.extensions.childTokens[o.type].forEach((l) => {
2661
- const c = o[l].flat(1 / 0);
2662
- a = a.concat(this.walkTokens(c, t));
2677
+ const d = o[l].flat(1 / 0);
2678
+ a = a.concat(this.walkTokens(d, t));
2663
2679
  }) : o.tokens && (a = a.concat(this.walkTokens(o.tokens, t)));
2664
2680
  }
2665
2681
  }
@@ -2693,10 +2709,10 @@ class xr {
2693
2709
  throw new Error(`renderer '${n}' does not exist`);
2694
2710
  if (["options", "parser"].includes(n))
2695
2711
  continue;
2696
- const o = n, l = a.renderer[o], c = i[o];
2712
+ const o = n, l = a.renderer[o], d = i[o];
2697
2713
  i[o] = (...u) => {
2698
- let f = l.apply(i, u);
2699
- return f === !1 && (f = c.apply(i, u)), f || "";
2714
+ let p = l.apply(i, u);
2715
+ return p === !1 && (p = d.apply(i, u)), p || "";
2700
2716
  };
2701
2717
  }
2702
2718
  r.renderer = i;
@@ -2708,10 +2724,10 @@ class xr {
2708
2724
  throw new Error(`tokenizer '${n}' does not exist`);
2709
2725
  if (["options", "rules", "lexer"].includes(n))
2710
2726
  continue;
2711
- const o = n, l = a.tokenizer[o], c = i[o];
2727
+ const o = n, l = a.tokenizer[o], d = i[o];
2712
2728
  i[o] = (...u) => {
2713
- let f = l.apply(i, u);
2714
- return f === !1 && (f = c.apply(i, u)), f;
2729
+ let p = l.apply(i, u);
2730
+ return p === !1 && (p = d.apply(i, u)), p;
2715
2731
  };
2716
2732
  }
2717
2733
  r.tokenizer = i;
@@ -2723,15 +2739,15 @@ class xr {
2723
2739
  throw new Error(`hook '${n}' does not exist`);
2724
2740
  if (["options", "block"].includes(n))
2725
2741
  continue;
2726
- const o = n, l = a.hooks[o], c = i[o];
2742
+ const o = n, l = a.hooks[o], d = i[o];
2727
2743
  Re.passThroughHooks.has(n) ? i[o] = (u) => {
2728
2744
  if (this.defaults.async)
2729
- return Promise.resolve(l.call(i, u)).then((v) => c.call(i, v));
2730
- const f = l.call(i, u);
2731
- return c.call(i, f);
2745
+ return Promise.resolve(l.call(i, u)).then((v) => d.call(i, v));
2746
+ const p = l.call(i, u);
2747
+ return d.call(i, p);
2732
2748
  } : i[o] = (...u) => {
2733
- let f = l.apply(i, u);
2734
- return f === !1 && (f = c.apply(i, u)), f;
2749
+ let p = l.apply(i, u);
2750
+ return p === !1 && (p = d.apply(i, u)), p;
2735
2751
  };
2736
2752
  }
2737
2753
  r.hooks = i;
@@ -2750,10 +2766,10 @@ class xr {
2750
2766
  return this.defaults = { ...this.defaults, ...e }, this;
2751
2767
  }
2752
2768
  lexer(e, t) {
2753
- return ae.lex(e, t ?? this.defaults);
2769
+ return re.lex(e, t ?? this.defaults);
2754
2770
  }
2755
2771
  parser(e, t) {
2756
- return re.parse(e, t ?? this.defaults);
2772
+ return ne.parse(e, t ?? this.defaults);
2757
2773
  }
2758
2774
  parseMarkdown(e) {
2759
2775
  return (a, r) => {
@@ -2765,15 +2781,15 @@ class xr {
2765
2781
  if (typeof a != "string")
2766
2782
  return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(a) + ", string expected"));
2767
2783
  n.hooks && (n.hooks.options = n, n.hooks.block = e);
2768
- const l = n.hooks ? n.hooks.provideLexer() : e ? ae.lex : ae.lexInline, c = n.hooks ? n.hooks.provideParser() : e ? re.parse : re.parseInline;
2784
+ const l = n.hooks ? n.hooks.provideLexer() : e ? re.lex : re.lexInline, d = n.hooks ? n.hooks.provideParser() : e ? ne.parse : ne.parseInline;
2769
2785
  if (n.async)
2770
- return Promise.resolve(n.hooks ? n.hooks.preprocess(a) : a).then((u) => l(u, n)).then((u) => n.hooks ? n.hooks.processAllTokens(u) : u).then((u) => n.walkTokens ? Promise.all(this.walkTokens(u, n.walkTokens)).then(() => u) : u).then((u) => c(u, n)).then((u) => n.hooks ? n.hooks.postprocess(u) : u).catch(o);
2786
+ return Promise.resolve(n.hooks ? n.hooks.preprocess(a) : a).then((u) => l(u, n)).then((u) => n.hooks ? n.hooks.processAllTokens(u) : u).then((u) => n.walkTokens ? Promise.all(this.walkTokens(u, n.walkTokens)).then(() => u) : u).then((u) => d(u, n)).then((u) => n.hooks ? n.hooks.postprocess(u) : u).catch(o);
2771
2787
  try {
2772
2788
  n.hooks && (a = n.hooks.preprocess(a));
2773
2789
  let u = l(a, n);
2774
2790
  n.hooks && (u = n.hooks.processAllTokens(u)), n.walkTokens && this.walkTokens(u, n.walkTokens);
2775
- let f = c(u, n);
2776
- return n.hooks && (f = n.hooks.postprocess(f)), f;
2791
+ let p = d(u, n);
2792
+ return n.hooks && (p = n.hooks.postprocess(p)), p;
2777
2793
  } catch (u) {
2778
2794
  return o(u);
2779
2795
  }
@@ -2783,7 +2799,7 @@ class xr {
2783
2799
  return (a) => {
2784
2800
  if (a.message += `
2785
2801
  Please report this to https://github.com/markedjs/marked.`, e) {
2786
- const r = "<p>An error occurred:</p><pre>" + K(a.message + "", !0) + "</pre>";
2802
+ const r = "<p>An error occurred:</p><pre>" + te(a.message + "", !0) + "</pre>";
2787
2803
  return t ? Promise.resolve(r) : r;
2788
2804
  }
2789
2805
  if (t)
@@ -2792,28 +2808,28 @@ Please report this to https://github.com/markedjs/marked.`, e) {
2792
2808
  };
2793
2809
  }
2794
2810
  }
2795
- const fe = new xr();
2811
+ const fe = new yr();
2796
2812
  function B(s, e) {
2797
2813
  return fe.parse(s, e);
2798
2814
  }
2799
2815
  B.options = B.setOptions = function(s) {
2800
- return fe.setOptions(s), B.defaults = fe.defaults, es(B.defaults), B;
2816
+ return fe.setOptions(s), B.defaults = fe.defaults, ts(B.defaults), B;
2801
2817
  };
2802
- B.getDefaults = tt;
2818
+ B.getDefaults = st;
2803
2819
  B.defaults = be;
2804
2820
  B.use = function(...s) {
2805
- return fe.use(...s), B.defaults = fe.defaults, es(B.defaults), B;
2821
+ return fe.use(...s), B.defaults = fe.defaults, ts(B.defaults), B;
2806
2822
  };
2807
2823
  B.walkTokens = function(s, e) {
2808
2824
  return fe.walkTokens(s, e);
2809
2825
  };
2810
2826
  B.parseInline = fe.parseInline;
2811
- B.Parser = re;
2812
- B.parser = re.parse;
2827
+ B.Parser = ne;
2828
+ B.parser = ne.parse;
2813
2829
  B.Renderer = qe;
2814
- B.TextRenderer = ot;
2815
- B.Lexer = ae;
2816
- B.lexer = ae.lex;
2830
+ B.TextRenderer = lt;
2831
+ B.Lexer = re;
2832
+ B.lexer = re.lex;
2817
2833
  B.Tokenizer = Ae;
2818
2834
  B.Hooks = Re;
2819
2835
  B.parse = B;
@@ -2822,9 +2838,9 @@ B.setOptions;
2822
2838
  B.use;
2823
2839
  B.walkTokens;
2824
2840
  B.parseInline;
2825
- re.parse;
2826
- ae.lex;
2827
- const yr = { class: "space-y-4" }, wr = {
2841
+ ne.parse;
2842
+ re.lex;
2843
+ const wr = { class: "space-y-4" }, vr = {
2828
2844
  __name: "vs-editor-form-data",
2829
2845
  props: {
2830
2846
  widgetName: { type: String },
@@ -2835,30 +2851,30 @@ const yr = { class: "space-y-4" }, wr = {
2835
2851
  },
2836
2852
  emits: ["update-dashboard"],
2837
2853
  setup(s, { expose: e, emit: t }) {
2838
- var _, D, m, C, z, R, q, ne, ie, de, ve, ke, $e, _e, De, G, ue, Ce, ct, dt, ut, ht, pt, ft, gt, mt, bt, xt, yt, wt, vt, kt, $t, _t, Dt, Ct, zt, Tt;
2839
- const a = M(() => import("@opengis/form")), { $notify: r } = me().proxy, i = t, n = s, o = typeof window < "u" ? new URLSearchParams(window.top.location.search) : null, l = I((o == null ? void 0 : o.get("dashboard")) || null), c = I([]), u = F(() => {
2854
+ var $, _, g, C, z, R, F, Y, ie, ce, ve, ke, $e, _e, De, G, ue, Ce, ct, ut, ht, pt, ft, gt, mt, bt, xt, yt, wt, vt, kt, $t, _t, Dt, Ct, zt, Tt, It;
2855
+ const a = M(() => import("@opengis/form")), { $notify: r } = me().proxy, i = t, n = s, o = typeof window < "u" ? new URLSearchParams(window.top.location.search) : null, l = I((o == null ? void 0 : o.get("dashboard")) || null), d = I([]), u = q(() => {
2840
2856
  const S = n.columns ?? [];
2841
- return S.length ? S : c.value;
2842
- }), f = F(() => n.dashboardId || l.value);
2857
+ return S.length ? S : d.value;
2858
+ }), p = q(() => n.dashboardId || l.value);
2843
2859
  async function v() {
2844
2860
  if (n.columns !== null) return;
2845
- const S = f.value;
2861
+ const S = p.value;
2846
2862
  if (!(u.value.length || !S || !n.widgetName))
2847
2863
  try {
2848
- const V = await H.get(`/bi-data?dashboard=${S}&widget=${n.widgetName}`);
2849
- Array.isArray(V == null ? void 0 : V.columns) && V.columns.length && (c.value = V.columns);
2864
+ const L = await H.get(`/bi-data?dashboard=${S}&widget=${n.widgetName}`);
2865
+ Array.isArray(L == null ? void 0 : L.columns) && L.columns.length && (d.value = L.columns);
2850
2866
  } catch {
2851
2867
  }
2852
2868
  }
2853
- const g = (S) => (S == null ? void 0 : S.name) != null ? { id: S.name, text: S.title || S.name } : null, b = (S) => Array.isArray(S) ? [...S].sort((V, oe) => {
2854
- const xe = V.text && V.text !== V.id, It = oe.text && oe.text !== oe.id;
2855
- return xe && !It ? -1 : !xe && It ? 1 : (V.text || "").localeCompare(oe.text || "", void 0, { sensitivity: "base" });
2856
- }) : S, k = F(() => {
2869
+ const m = (S) => (S == null ? void 0 : S.name) != null ? { id: S.name, text: S.title || S.name } : null, b = (S) => Array.isArray(S) ? [...S].sort((L, oe) => {
2870
+ const xe = L.text && L.text !== L.id, St = oe.text && oe.text !== oe.id;
2871
+ return xe && !St ? -1 : !xe && St ? 1 : (L.text || "").localeCompare(oe.text || "", void 0, { sensitivity: "base" });
2872
+ }) : S, k = q(() => {
2857
2873
  const S = (u.value ?? []).filter(
2858
- (V) => (V == null ? void 0 : V.type) == "text" || (V == null ? void 0 : V.type) === "date" || (V == null ? void 0 : V.type) === "timestamp without time zone" || (V == null ? void 0 : V.type) === "boolean" || (V == null ? void 0 : V.type) === "integer"
2859
- ).map(g).filter(Boolean);
2874
+ (L) => (L == null ? void 0 : L.type) == "text" || (L == null ? void 0 : L.type) === "date" || (L == null ? void 0 : L.type) === "timestamp without time zone" || (L == null ? void 0 : L.type) === "boolean" || (L == null ? void 0 : L.type) === "integer"
2875
+ ).map(m).filter(Boolean);
2860
2876
  return b(S);
2861
- }), $ = F(() => `${n.widgetName}-${k.value.length}-${(u.value ?? []).length}`), L = F(() => ({
2877
+ }), D = q(() => `${n.widgetName}-${k.value.length}-${(u.value ?? []).length}`), V = q(() => ({
2862
2878
  text: {
2863
2879
  type: "Text",
2864
2880
  label: "Текст",
@@ -2904,7 +2920,7 @@ const yr = { class: "space-y-4" }, wr = {
2904
2920
  options: [
2905
2921
  { id: "count", text: "count" },
2906
2922
  ...b(
2907
- u.value.filter((S) => (S == null ? void 0 : S.type) === "numeric" || (S == null ? void 0 : S.type) === "double precision").map(g).filter(Boolean)
2923
+ u.value.filter((S) => (S == null ? void 0 : S.type) === "numeric" || (S == null ? void 0 : S.type) === "double precision").map(m).filter(Boolean)
2908
2924
  )
2909
2925
  ]
2910
2926
  },
@@ -2928,7 +2944,7 @@ const yr = { class: "space-y-4" }, wr = {
2928
2944
  ...b(
2929
2945
  u.value.filter(
2930
2946
  (S) => (S == null ? void 0 : S.type) == "text" || (S == null ? void 0 : S.type) === "boolean" || (S == null ? void 0 : S.type) === "integer"
2931
- ).map(g).filter(Boolean)
2947
+ ).map(m).filter(Boolean)
2932
2948
  )
2933
2949
  ],
2934
2950
  conditions: ["type", "==", "bar"]
@@ -2938,7 +2954,7 @@ const yr = { class: "space-y-4" }, wr = {
2938
2954
  label: "Колонки",
2939
2955
  style: { size: "xs" },
2940
2956
  options: b(
2941
- (u.value ?? []).map(g).filter(Boolean)
2957
+ (u.value ?? []).map(m).filter(Boolean)
2942
2958
  ),
2943
2959
  conditions: ["type", "in", ["table", "map"]]
2944
2960
  },
@@ -2957,31 +2973,31 @@ const yr = { class: "space-y-4" }, wr = {
2957
2973
  type: "Text",
2958
2974
  hidden: !0
2959
2975
  }
2960
- })), w = I({
2961
- x: ((D = (_ = n.data) == null ? void 0 : _.data) == null ? void 0 : D.x) || ((m = n.data) == null ? void 0 : m.x) || null,
2976
+ })), y = I({
2977
+ x: ((_ = ($ = n.data) == null ? void 0 : $.data) == null ? void 0 : _.x) || ((g = n.data) == null ? void 0 : g.x) || null,
2962
2978
  metric: ((z = (C = n.data) == null ? void 0 : C.data) == null ? void 0 : z.metric) || ((R = n.data) == null ? void 0 : R.metric) || null,
2963
- columns: ((ne = (q = n.data) == null ? void 0 : q.data) == null ? void 0 : ne.columns) || ((ie = n.data) == null ? void 0 : ie.columns) || null,
2964
- granularity: ((ve = (de = n.data) == null ? void 0 : de.data) == null ? void 0 : ve.granularity) || ((ke = n.data) == null ? void 0 : ke.granularity) || null,
2979
+ columns: ((Y = (F = n.data) == null ? void 0 : F.data) == null ? void 0 : Y.columns) || ((ie = n.data) == null ? void 0 : ie.columns) || null,
2980
+ granularity: ((ve = (ce = n.data) == null ? void 0 : ce.data) == null ? void 0 : ve.granularity) || ((ke = n.data) == null ? void 0 : ke.granularity) || null,
2965
2981
  type: ((_e = ($e = n.data) == null ? void 0 : $e.data) == null ? void 0 : _e.type) || ((De = n.data) == null ? void 0 : De.type) || null,
2966
2982
  groupby: ((ue = (G = n.data) == null ? void 0 : G.data) == null ? void 0 : ue.groupby) || n.data.groupby || null,
2967
- fx: ((ct = (Ce = n.data) == null ? void 0 : Ce.data) == null ? void 0 : ct.fx) || ((dt = n.data) == null ? void 0 : dt.fx) || null,
2968
- query: ((ht = (ut = n.data) == null ? void 0 : ut.data) == null ? void 0 : ht.query) || ((pt = n.data) == null ? void 0 : pt.query) || null,
2969
- y_type: ((gt = (ft = n.data) == null ? void 0 : ft.data) == null ? void 0 : gt.y_type) || ((mt = n.data) == null ? void 0 : mt.y_type) || null,
2970
- tableSQL: ((xt = (bt = n.data) == null ? void 0 : bt.data) == null ? void 0 : xt.tableSQL) || ((yt = n.data) == null ? void 0 : yt.tableSQL) || null,
2971
- cls: ((vt = (wt = n.data) == null ? void 0 : wt.data) == null ? void 0 : vt.cls) || ((kt = n.data) == null ? void 0 : kt.cls) || null,
2972
- text: ((_t = ($t = n.data) == null ? void 0 : $t.data) == null ? void 0 : _t.text) || ((Dt = n.data) == null ? void 0 : Dt.text) || null,
2973
- table: ((zt = (Ct = n.data) == null ? void 0 : Ct.data) == null ? void 0 : zt.table) || ((Tt = n.data) == null ? void 0 : Tt.table) || null
2974
- }), d = async () => {
2983
+ fx: ((ct = (Ce = n.data) == null ? void 0 : Ce.data) == null ? void 0 : ct.fx) || ((ut = n.data) == null ? void 0 : ut.fx) || null,
2984
+ query: ((pt = (ht = n.data) == null ? void 0 : ht.data) == null ? void 0 : pt.query) || ((ft = n.data) == null ? void 0 : ft.query) || null,
2985
+ y_type: ((mt = (gt = n.data) == null ? void 0 : gt.data) == null ? void 0 : mt.y_type) || ((bt = n.data) == null ? void 0 : bt.y_type) || null,
2986
+ tableSQL: ((yt = (xt = n.data) == null ? void 0 : xt.data) == null ? void 0 : yt.tableSQL) || ((wt = n.data) == null ? void 0 : wt.tableSQL) || null,
2987
+ cls: ((kt = (vt = n.data) == null ? void 0 : vt.data) == null ? void 0 : kt.cls) || (($t = n.data) == null ? void 0 : $t.cls) || null,
2988
+ text: ((Dt = (_t = n.data) == null ? void 0 : _t.data) == null ? void 0 : Dt.text) || ((Ct = n.data) == null ? void 0 : Ct.text) || null,
2989
+ table: ((Tt = (zt = n.data) == null ? void 0 : zt.data) == null ? void 0 : Tt.table) || ((It = n.data) == null ? void 0 : It.table) || null
2990
+ }), f = async () => {
2975
2991
  try {
2976
- await H.put(`/bi-dashboard/${f.value}/${n.widgetName}`, {
2977
- data: w.value
2992
+ await H.put(`/bi-dashboard/${p.value}/${n.widgetName}`, {
2993
+ data: y.value
2978
2994
  });
2979
- let S = `/bi-data?dashboard=${f.value}&widget=${n.widgetName}`;
2980
- Object.entries(w.value).forEach(([oe, xe]) => {
2995
+ let S = `/bi-data?dashboard=${p.value}&widget=${n.widgetName}`;
2996
+ Object.entries(y.value).forEach(([oe, xe]) => {
2981
2997
  S += `&${oe}=${xe}`;
2982
2998
  });
2983
- const V = new CustomEvent(`update-data-${n.widgetName}`);
2984
- V.filterUrl = S, window.dispatchEvent(V), i("update-dashboard"), r({
2999
+ const L = new CustomEvent(`update-data-${n.widgetName}`);
3000
+ L.filterUrl = S, window.dispatchEvent(L), i("update-dashboard"), r({
2985
3001
  type: "success",
2986
3002
  title: "Успішно!",
2987
3003
  message: "Дані успішно оновлено"
@@ -2993,14 +3009,14 @@ const yr = { class: "space-y-4" }, wr = {
2993
3009
  message: "При спробі оновити данні сталася помилка"
2994
3010
  });
2995
3011
  }
2996
- }, x = async () => {
3012
+ }, w = async () => {
2997
3013
  try {
2998
- let S = `/bi-data?dashboard=${f.value}&widget=${n.widgetName}`;
2999
- Object.entries(w.value).forEach(([oe, xe]) => {
3014
+ let S = `/bi-data?dashboard=${p.value}&widget=${n.widgetName}`;
3015
+ Object.entries(y.value).forEach(([oe, xe]) => {
3000
3016
  S += `&${oe}=${xe}`;
3001
3017
  });
3002
- const V = new CustomEvent(`update-data-${n.widgetName}`);
3003
- V.filterUrl = S, window.dispatchEvent(V), i("update-dashboard");
3018
+ const L = new CustomEvent(`update-data-${n.widgetName}`);
3019
+ L.filterUrl = S, window.dispatchEvent(L), i("update-dashboard");
3004
3020
  } catch {
3005
3021
  await r({
3006
3022
  type: "error",
@@ -3009,24 +3025,24 @@ const yr = { class: "space-y-4" }, wr = {
3009
3025
  });
3010
3026
  }
3011
3027
  };
3012
- return te(w, () => {
3013
- x();
3014
- }, { deep: !0 }), te(
3028
+ return ae(y, () => {
3029
+ w();
3030
+ }, { deep: !0 }), ae(
3015
3031
  () => [n.widgetName, n.dashboardId, l.value],
3016
3032
  () => {
3017
- c.value = [], v();
3033
+ d.value = [], v();
3018
3034
  },
3019
3035
  { immediate: !0 }
3020
- ), e({ requestUpdateWidget: d }), (S, V) => (p(), y("div", yr, [
3021
- (p(), N(E(a), {
3022
- key: $.value,
3023
- schema: L.value,
3024
- values: w.value,
3025
- "onUpdate:values": V[0] || (V[0] = (oe) => w.value = oe)
3036
+ ), e({ requestUpdateWidget: f }), (S, L) => (h(), x("div", wr, [
3037
+ (h(), E(N(a), {
3038
+ key: D.value,
3039
+ schema: V.value,
3040
+ values: y.value,
3041
+ "onUpdate:values": L[0] || (L[0] = (oe) => y.value = oe)
3026
3042
  }, null, 8, ["schema", "values"]))
3027
3043
  ]));
3028
3044
  }
3029
- }, vr = { class: "space-y-4" }, kr = {
3045
+ }, kr = { class: "space-y-4" }, $r = {
3030
3046
  __name: "vs-editor-form-yaml",
3031
3047
  props: {
3032
3048
  yamlValue: { type: null, default: () => "" },
@@ -3036,42 +3052,42 @@ const yr = { class: "space-y-4" }, wr = {
3036
3052
  emits: ["update-dashboard"],
3037
3053
  setup(s, { expose: e, emit: t }) {
3038
3054
  const a = typeof window < "u" ? window.echarts : null, r = M(
3039
- () => import("@opengis/form").then((g) => g.VsInputMonaco)
3040
- ), i = I(null), { $notify: n } = me().proxy, o = t, l = s, c = (g, { dimensions: b, source: k }) => {
3041
- const $ = g.getOption(), { data: L, ...w } = ($ == null ? void 0 : $.series)[0], [, ...d] = b || [], x = d.map((_, D) => ({
3042
- ...($ == null ? void 0 : $.series[D]) || {},
3043
- data: k.map((m) => m[D + 1]),
3044
- name: _
3055
+ () => import("@opengis/form").then((m) => m.VsInputMonaco)
3056
+ ), i = I(null), { $notify: n } = me().proxy, o = t, l = s, d = (m, { dimensions: b, source: k }) => {
3057
+ const D = m.getOption(), { data: V, ...y } = (D == null ? void 0 : D.series)[0], [, ...f] = b || [], w = f.map(($, _) => ({
3058
+ ...(D == null ? void 0 : D.series[_]) || {},
3059
+ data: k.map((g) => g[_ + 1]),
3060
+ name: $
3045
3061
  }));
3046
- g == null || g.setOption(
3062
+ m == null || m.setOption(
3047
3063
  {
3048
- ...$ || {},
3064
+ ...D || {},
3049
3065
  dataset: {
3050
3066
  dimensions: b,
3051
3067
  source: k
3052
3068
  },
3053
- series: x,
3069
+ series: w,
3054
3070
  xAxis: { type: "category" },
3055
3071
  yAxis: {}
3056
3072
  },
3057
3073
  !0
3058
3074
  );
3059
- }, u = (g) => {
3060
- const b = document.getElementById(g);
3075
+ }, u = (m) => {
3076
+ const b = document.getElementById(m);
3061
3077
  if (!b) return null;
3062
3078
  const k = a == null ? void 0 : a.getInstanceByDom(b);
3063
3079
  return k || null;
3064
- }, f = I(l.yamlValue), v = async () => {
3080
+ }, p = I(l.yamlValue), v = async () => {
3065
3081
  try {
3066
3082
  await H.put(`/bi-dashboard/${i.value}/${l.widgetName}`, {
3067
- yml: f.value
3083
+ yml: p.value
3068
3084
  });
3069
- const g = u(l.widgetName);
3070
- if (g) {
3085
+ const m = u(l.widgetName);
3086
+ if (m) {
3071
3087
  const b = await H.get(
3072
3088
  `/bi-data?dashboard=${i.value}&widget=${l.widgetName}`
3073
3089
  );
3074
- c(g, b);
3090
+ d(m, b);
3075
3091
  }
3076
3092
  o("update-dashboard"), n({
3077
3093
  type: "success",
@@ -3087,12 +3103,12 @@ const yr = { class: "space-y-4" }, wr = {
3087
3103
  }
3088
3104
  };
3089
3105
  return le(() => {
3090
- const g = new URLSearchParams(window.top.location.search);
3091
- i.value = g.get("dashboard");
3092
- }), e({ requestUpdateWidget: v }), (g, b) => (p(), y("div", vr, [
3093
- T(E(r), {
3094
- modelValue: f.value,
3095
- "onUpdate:modelValue": b[0] || (b[0] = (k) => f.value = k),
3106
+ const m = new URLSearchParams(window.top.location.search);
3107
+ i.value = m.get("dashboard");
3108
+ }), e({ requestUpdateWidget: v }), (m, b) => (h(), x("div", kr, [
3109
+ T(N(r), {
3110
+ modelValue: p.value,
3111
+ "onUpdate:modelValue": b[0] || (b[0] = (k) => p.value = k),
3096
3112
  syntax: "yaml",
3097
3113
  theme: "vs-light",
3098
3114
  height: 400,
@@ -3100,7 +3116,7 @@ const yr = { class: "space-y-4" }, wr = {
3100
3116
  }, null, 8, ["modelValue"])
3101
3117
  ]));
3102
3118
  }
3103
- }, $r = { class: "pt-[10px]" }, _r = {
3119
+ }, _r = { class: "pt-[10px]" }, Dr = {
3104
3120
  __name: "vs-editor-form-controls",
3105
3121
  props: {
3106
3122
  widgetName: { type: String },
@@ -3124,9 +3140,9 @@ const yr = { class: "space-y-4" }, wr = {
3124
3140
  groupby: {
3125
3141
  ua: "Groupby",
3126
3142
  type: "checkbox",
3127
- options: (u = i.columns) == null ? void 0 : u.map(({ name: f }) => f)
3143
+ options: (u = i.columns) == null ? void 0 : u.map(({ name: p }) => p)
3128
3144
  }
3129
- }, l = I(i.controls || {}), c = async () => {
3145
+ }, l = I(i.controls || {}), d = async () => {
3130
3146
  try {
3131
3147
  await H.put(`/bi-dashboard/${n.value}/${i.widgetName}`, {
3132
3148
  controls: l.value
@@ -3144,22 +3160,22 @@ const yr = { class: "space-y-4" }, wr = {
3144
3160
  }
3145
3161
  };
3146
3162
  return le(() => {
3147
- const f = new URLSearchParams(window.top.location.search);
3148
- n.value = f.get("dashboard");
3149
- }), (f, v) => {
3150
- const g = J("VsButton");
3151
- return p(), y("div", $r, [
3152
- T(g, {
3163
+ const p = new URLSearchParams(window.top.location.search);
3164
+ n.value = p.get("dashboard");
3165
+ }), (p, v) => {
3166
+ const m = K("VsButton");
3167
+ return h(), x("div", _r, [
3168
+ T(m, {
3153
3169
  class: "ml-[10px] mb-[10px]",
3154
3170
  type: "plain",
3155
- onClick: c
3171
+ onClick: d
3156
3172
  }, {
3157
3173
  default: j(() => [...v[1] || (v[1] = [
3158
3174
  X(" Зберегти ", -1)
3159
3175
  ])]),
3160
3176
  _: 1
3161
3177
  }),
3162
- T(E(t), {
3178
+ T(N(t), {
3163
3179
  schema: o,
3164
3180
  values: l.value,
3165
3181
  "onUpdate:values": v[0] || (v[0] = (b) => l.value = b)
@@ -3167,15 +3183,15 @@ const yr = { class: "space-y-4" }, wr = {
3167
3183
  ]);
3168
3184
  };
3169
3185
  }
3170
- }, At = {
3171
- "vs-editor-form-style": Oa,
3172
- "vs-editor-form-data": wr,
3173
- "vs-editor-form-yaml": kr,
3174
- "vs-editor-form-controls": _r
3175
- }, Dr = {
3186
+ }, Ft = {
3187
+ "vs-editor-form-style": Pa,
3188
+ "vs-editor-form-data": vr,
3189
+ "vs-editor-form-yaml": $r,
3190
+ "vs-editor-form-controls": Dr
3191
+ }, Cr = {
3176
3192
  key: 0,
3177
3193
  class: "p-4 text-sm text-amber-700 bg-amber-50 rounded-lg"
3178
- }, Ft = {
3194
+ }, qt = {
3179
3195
  __name: "editor-tab-error-boundary",
3180
3196
  props: {
3181
3197
  tabComponent: { type: Object, default: null },
@@ -3190,13 +3206,13 @@ const yr = { class: "space-y-4" }, wr = {
3190
3206
  }
3191
3207
  e({ save: r });
3192
3208
  const i = I(!1);
3193
- return bs((n, o, l) => (console.error("Editor tab error:", n, l), i.value = !0, !1)), te(
3209
+ return bs((n, o, l) => (console.error("Editor tab error:", n, l), i.value = !0, !1)), ae(
3194
3210
  () => t.tabComponent,
3195
3211
  () => {
3196
3212
  i.value = !1;
3197
3213
  },
3198
3214
  { immediate: !0 }
3199
- ), (n, o) => i.value ? (p(), y("div", Dr, " Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")) : (p(), N(Ht(s.tabComponent), he({
3215
+ ), (n, o) => i.value ? (h(), x("div", Cr, " Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")) : (h(), E(Zt(s.tabComponent), he({
3200
3216
  ref_key: "tabRef",
3201
3217
  ref: a,
3202
3218
  key: s.tabKey || "tab"
@@ -3204,16 +3220,16 @@ const yr = { class: "space-y-4" }, wr = {
3204
3220
  onUpdateDashboard: o[0] || (o[0] = (l) => n.$emit("update-dashboard"))
3205
3221
  }), null, 16));
3206
3222
  }
3207
- }, Cr = { class: "h-full flex flex-col bg-white shrink-0 !w-[400px] border rounded-xl overflow-hidden border-gray-200" }, zr = {
3223
+ }, zr = { class: "h-full flex flex-col bg-white shrink-0 !w-[400px] border rounded-xl overflow-hidden border-gray-200" }, Tr = {
3208
3224
  key: 0,
3209
3225
  class: "flex flex-col min-h-0 flex-1"
3210
- }, Tr = { class: "flex items-center border-b border-gray-200 bg-white shrink-0 px-4 h-[49px]" }, Ir = { class: "flex items-center gap-6 min-w-0 -mb-[14px]" }, Sr = ["onClick"], Rr = {
3226
+ }, Ir = { class: "flex items-center border-b border-gray-200 bg-white shrink-0 px-4 h-[49px]" }, Sr = { class: "flex items-center gap-6 min-w-0 -mb-[14px]" }, Rr = ["onClick"], Vr = {
3211
3227
  key: 0,
3212
3228
  class: "absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 rounded-full"
3213
- }, Lr = { class: "flex items-center gap-1 ml-auto shrink-0" }, Vr = {
3229
+ }, Lr = { class: "flex items-center gap-1 ml-auto shrink-0" }, Wr = {
3214
3230
  key: 1,
3215
3231
  class: "flex-1 min-h-0 overflow-auto px-4 py-4 [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
3216
- }, Wr = { key: 0 }, Nr = { key: 1 }, Er = { class: "p-4" }, jr = { class: "flex justify-end mt-4 gap-x-3" }, Br = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Or = {
3232
+ }, Nr = { key: 0 }, Er = { key: 1 }, jr = { class: "p-4" }, Br = { class: "flex justify-end mt-4 gap-x-3" }, Or = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Pr = {
3217
3233
  __name: "vs-editor-forms",
3218
3234
  props: /* @__PURE__ */ Be({
3219
3235
  selectedWidgetData: {
@@ -3226,7 +3242,7 @@ const yr = { class: "space-y-4" }, wr = {
3226
3242
  default: () => ""
3227
3243
  },
3228
3244
  currentWidgetData: {
3229
- type: String,
3245
+ type: Object,
3230
3246
  default: () => ""
3231
3247
  }
3232
3248
  }, {
@@ -3235,8 +3251,8 @@ const yr = { class: "space-y-4" }, wr = {
3235
3251
  }),
3236
3252
  emits: /* @__PURE__ */ Be(["update-data"], ["update:selectedWidget"]),
3237
3253
  setup(s, { emit: e }) {
3238
- var x, _;
3239
- const t = M(() => import("@opengis/form")), a = (_ = (x = me()) == null ? void 0 : x.proxy) == null ? void 0 : _.$notify, r = we(), i = e, n = I(null), o = s, l = I(!1), c = I(!0), u = I(!1), f = I({}), v = Ut(s, "selectedWidget"), g = [
3254
+ var w, $;
3255
+ const t = M(() => import("@opengis/form")), a = ($ = (w = me()) == null ? void 0 : w.proxy) == null ? void 0 : $.$notify, r = we(), i = e, n = I(null), o = s, l = I(!1), d = I(!0), u = I(!1), p = I({}), v = Gt(s, "selectedWidget"), m = [
3240
3256
  "table",
3241
3257
  "text",
3242
3258
  "number",
@@ -3249,49 +3265,49 @@ const yr = { class: "space-y-4" }, wr = {
3249
3265
  try {
3250
3266
  await H.delete(
3251
3267
  `/bi-dashboard/${o.selectedDashboard}/${o.selectedWidgetData.name}`
3252
- ), r.hasRoute(Y.EditorDashboard) ? r.push({
3253
- name: Y.EditorDashboard,
3268
+ ), r.hasRoute(J.EditorDashboard) ? r.push({
3269
+ name: J.EditorDashboard,
3254
3270
  params: { dashboardId: o.selectedDashboard }
3255
3271
  }) : v.value = "", i("update-data"), l.value = !1, a({
3256
3272
  type: "success",
3257
3273
  title: "Успішно!",
3258
3274
  message: "Віджет успішно видалено"
3259
3275
  });
3260
- } catch (D) {
3261
- console.error(D), a({
3276
+ } catch (_) {
3277
+ console.error(_), a({
3262
3278
  type: "error",
3263
3279
  title: "Помилка!",
3264
3280
  message: "При спробі видалити віджет виникла помилка"
3265
3281
  });
3266
3282
  }
3267
- }, $ = F(() => {
3268
- const D = [
3283
+ }, D = q(() => {
3284
+ const _ = [
3269
3285
  { id: "data", label: "Дані" },
3270
3286
  { id: "style", label: "Стилі" },
3271
3287
  { id: "yaml", label: "{ }" }
3272
3288
  // { id: 'controls', label: 'Контролси' },
3273
3289
  ];
3274
- return D == null ? void 0 : D.filter((m) => {
3290
+ return _ == null ? void 0 : _.filter((g) => {
3275
3291
  var C, z, R;
3276
- return m.id === "style" ? !(g != null && g.includes(
3292
+ return g.id === "style" ? !(m != null && m.includes(
3277
3293
  ((C = o.selectedWidgetData) == null ? void 0 : C.type) || ((R = (z = o.selectedWidgetData) == null ? void 0 : z.data) == null ? void 0 : R.type)
3278
3294
  )) : !0;
3279
3295
  });
3280
- }), L = () => {
3281
- var D, m, C, z, R, q, ne, ie, de;
3282
- f.value = {
3283
- title: (D = o.selectedWidgetData) == null ? void 0 : D.title,
3284
- type: (m = o.selectedWidgetData) == null ? void 0 : m.type,
3296
+ }), V = () => {
3297
+ var _, g, C, z, R, F, Y, ie, ce;
3298
+ p.value = {
3299
+ title: (_ = o.selectedWidgetData) == null ? void 0 : _.title,
3300
+ type: (g = o.selectedWidgetData) == null ? void 0 : g.type,
3285
3301
  table: (C = o.selectedWidgetData) == null ? void 0 : C.table_name,
3286
3302
  query: (R = (z = o.selectedWidgetData) == null ? void 0 : z.data) == null ? void 0 : R.query,
3287
- x: (ne = (q = o.selectedWidgetData) == null ? void 0 : q.data) == null ? void 0 : ne.x,
3288
- cls: (de = (ie = o.selectedWidgetData) == null ? void 0 : ie.data) == null ? void 0 : de.cls
3303
+ x: (Y = (F = o.selectedWidgetData) == null ? void 0 : F.data) == null ? void 0 : Y.x,
3304
+ cls: (ce = (ie = o.selectedWidgetData) == null ? void 0 : ie.data) == null ? void 0 : ce.cls
3289
3305
  }, u.value = !0;
3290
- }, w = async () => {
3306
+ }, y = async () => {
3291
3307
  try {
3292
3308
  await H.put(
3293
3309
  `/bi-dashboard/${o.selectedDashboard}/${o.selectedWidgetData.name}`,
3294
- f.value
3310
+ p.value
3295
3311
  ), a({
3296
3312
  type: "success",
3297
3313
  title: "Успішно!",
@@ -3305,10 +3321,10 @@ const yr = { class: "space-y-4" }, wr = {
3305
3321
  });
3306
3322
  }
3307
3323
  };
3308
- te(v, () => {
3309
- c.value = !1, setTimeout(() => c.value = !0);
3324
+ ae(v, () => {
3325
+ d.value = !1, setTimeout(() => d.value = !0);
3310
3326
  });
3311
- const d = {
3327
+ const f = {
3312
3328
  title: {
3313
3329
  type: "text",
3314
3330
  ua: "Заголовок",
@@ -3396,44 +3412,44 @@ const yr = { class: "space-y-4" }, wr = {
3396
3412
  placeholder: "Cls"
3397
3413
  }
3398
3414
  };
3399
- return (D, m) => {
3400
- var z, R, q, ne, ie, de, ve, ke, $e, _e, De;
3401
- const C = J("VsPopover");
3402
- return p(), y(U, null, [
3403
- h("div", Cr, [
3404
- s.selectedWidgetData ? (p(), y("div", zr, [
3405
- h("div", Tr, [
3406
- h("nav", Ir, [
3407
- (p(!0), y(U, null, Z($.value, (G) => (p(), y("button", {
3415
+ return (_, g) => {
3416
+ var z, R, F, Y, ie, ce, ve, ke, $e, _e, De;
3417
+ const C = K("VsPopover");
3418
+ return h(), x(U, null, [
3419
+ c("div", zr, [
3420
+ s.selectedWidgetData ? (h(), x("div", Tr, [
3421
+ c("div", Ir, [
3422
+ c("nav", Sr, [
3423
+ (h(!0), x(U, null, Z(D.value, (G) => (h(), x("button", {
3408
3424
  key: G.id,
3409
3425
  type: "button",
3410
- class: ee(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap", b.value === G.id ? "text-blue-600" : "text-gray-600 hover:text-gray-900"]),
3426
+ class: se(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap", b.value === G.id ? "text-blue-600" : "text-gray-600 hover:text-gray-900"]),
3411
3427
  onClick: (ue) => b.value = G.id
3412
3428
  }, [
3413
3429
  X(W(G.label) + " ", 1),
3414
- b.value === G.id ? (p(), y("span", Rr)) : A("", !0)
3415
- ], 10, Sr))), 128))
3430
+ b.value === G.id ? (h(), x("span", Vr)) : A("", !0)
3431
+ ], 10, Rr))), 128))
3416
3432
  ]),
3417
- h("div", Lr, [
3433
+ c("div", Lr, [
3418
3434
  T(C, {
3419
3435
  placement: "left",
3420
3436
  trigger: "hover"
3421
3437
  }, {
3422
3438
  reference: j(() => [
3423
- h("button", {
3439
+ c("button", {
3424
3440
  type: "button",
3425
3441
  class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
3426
3442
  title: "Зберегти",
3427
- onClick: m[0] || (m[0] = (G) => {
3443
+ onClick: g[0] || (g[0] = (G) => {
3428
3444
  var ue, Ce;
3429
3445
  return (Ce = (ue = n.value) == null ? void 0 : ue.save) == null ? void 0 : Ce.call(ue);
3430
3446
  })
3431
3447
  }, [
3432
- T(E(Vs), { class: "h-4 w-4" })
3448
+ T(N(Ns), { class: "h-4 w-4" })
3433
3449
  ])
3434
3450
  ]),
3435
3451
  default: j(() => [
3436
- m[9] || (m[9] = X(" Зберегти ", -1))
3452
+ g[9] || (g[9] = X(" Зберегти ", -1))
3437
3453
  ]),
3438
3454
  _: 1
3439
3455
  }),
@@ -3442,16 +3458,16 @@ const yr = { class: "space-y-4" }, wr = {
3442
3458
  trigger: "hover"
3443
3459
  }, {
3444
3460
  reference: j(() => [
3445
- h("button", {
3461
+ c("button", {
3446
3462
  type: "button",
3447
3463
  class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
3448
- onClick: L
3464
+ onClick: V
3449
3465
  }, [
3450
- T(Kt, { class: "h-4 w-4" })
3466
+ T(es, { class: "h-4 w-4" })
3451
3467
  ])
3452
3468
  ]),
3453
3469
  default: j(() => [
3454
- m[10] || (m[10] = X(" Редагувати віджет ", -1))
3470
+ g[10] || (g[10] = X(" Редагувати віджет ", -1))
3455
3471
  ]),
3456
3472
  _: 1
3457
3473
  }),
@@ -3460,71 +3476,71 @@ const yr = { class: "space-y-4" }, wr = {
3460
3476
  trigger: "hover"
3461
3477
  }, {
3462
3478
  reference: j(() => [
3463
- h("button", {
3479
+ c("button", {
3464
3480
  type: "button",
3465
3481
  class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
3466
- onClick: m[1] || (m[1] = (G) => l.value = !0)
3482
+ onClick: g[1] || (g[1] = (G) => l.value = !0)
3467
3483
  }, [
3468
- T(E(Jt), { class: "h-4 w-4" })
3484
+ T(N(Kt), { class: "h-4 w-4" })
3469
3485
  ])
3470
3486
  ]),
3471
3487
  default: j(() => [
3472
- m[11] || (m[11] = X(" Видалити віджет ", -1))
3488
+ g[11] || (g[11] = X(" Видалити віджет ", -1))
3473
3489
  ]),
3474
3490
  _: 1
3475
3491
  })
3476
3492
  ])
3477
3493
  ]),
3478
- (z = s.currentWidgetData) != null && z.status ? (p(), N(Pe, {
3494
+ (z = s.currentWidgetData) != null && z.status ? (h(), E(Pe, {
3479
3495
  key: 0,
3480
3496
  title: (R = s.currentWidgetData) == null ? void 0 : R.title,
3481
- text: (q = s.currentWidgetData) == null ? void 0 : q.message
3482
- }, null, 8, ["title", "text"])) : (p(), y("div", Vr, [
3483
- c.value && s.currentWidgetData ? (p(), y("div", Wr, [
3484
- T(Ft, {
3497
+ text: (F = s.currentWidgetData) == null ? void 0 : F.message
3498
+ }, null, 8, ["title", "text"])) : (h(), x("div", Wr, [
3499
+ d.value && s.currentWidgetData ? (h(), x("div", Nr, [
3500
+ T(qt, {
3485
3501
  ref_key: "tabPanelRef",
3486
3502
  ref: n,
3487
3503
  "tab-key": b.value,
3488
- "tab-component": E(At)["vs-editor-form-" + b.value],
3489
- widgetName: (ne = s.selectedWidgetData) == null ? void 0 : ne.name,
3504
+ "tab-component": N(Ft)["vs-editor-form-" + b.value],
3505
+ widgetName: (Y = s.selectedWidgetData) == null ? void 0 : Y.name,
3490
3506
  dashboardId: s.selectedDashboard,
3491
3507
  yamlValue: ((ie = s.selectedWidgetData) == null ? void 0 : ie.yml) || "",
3492
3508
  data: s.selectedWidgetData,
3493
- controls: (de = s.selectedWidgetData) == null ? void 0 : de.controls,
3509
+ controls: (ce = s.selectedWidgetData) == null ? void 0 : ce.controls,
3494
3510
  columns: (ve = s.currentWidgetData) == null ? void 0 : ve.columns,
3495
- onUpdateDashboard: m[2] || (m[2] = (G) => D.$emit("update-data"))
3511
+ onUpdateDashboard: g[2] || (g[2] = (G) => _.$emit("update-data"))
3496
3512
  }, null, 8, ["tab-key", "tab-component", "widgetName", "dashboardId", "yamlValue", "data", "controls", "columns"])
3497
- ])) : (p(), y("div", Nr, [
3498
- T(Ft, {
3513
+ ])) : (h(), x("div", Er, [
3514
+ T(qt, {
3499
3515
  ref_key: "tabPanelRef",
3500
3516
  ref: n,
3501
3517
  "tab-key": b.value,
3502
- "tab-component": E(At)["vs-editor-form-" + b.value],
3518
+ "tab-component": N(Ft)["vs-editor-form-" + b.value],
3503
3519
  widgetName: (ke = s.selectedWidgetData) == null ? void 0 : ke.name,
3504
3520
  dashboardId: s.selectedDashboard,
3505
3521
  yamlValue: (($e = s.selectedWidgetData) == null ? void 0 : $e.yml) || "",
3506
3522
  data: s.selectedWidgetData,
3507
3523
  controls: (_e = s.selectedWidgetData) == null ? void 0 : _e.controls,
3508
3524
  columns: (De = s.currentWidgetData) == null ? void 0 : De.columns,
3509
- onUpdateDashboard: m[3] || (m[3] = (G) => D.$emit("update-data"))
3525
+ onUpdateDashboard: g[3] || (g[3] = (G) => _.$emit("update-data"))
3510
3526
  }, null, 8, ["tab-key", "tab-component", "widgetName", "dashboardId", "yamlValue", "data", "controls", "columns"])
3511
3527
  ])),
3512
- T(Le, {
3528
+ T(Ve, {
3513
3529
  teleport: "#modal",
3514
3530
  visible: l.value,
3515
3531
  title: "Ви впевнені?",
3516
- onClose: m[5] || (m[5] = (G) => l.value = !1)
3532
+ onClose: g[5] || (g[5] = (G) => l.value = !1)
3517
3533
  }, {
3518
3534
  default: j(() => [
3519
- h("div", Er, [
3520
- m[12] || (m[12] = h("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей віджет? ", -1)),
3521
- h("div", jr, [
3522
- h("button", {
3535
+ c("div", jr, [
3536
+ g[12] || (g[12] = c("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей віджет? ", -1)),
3537
+ c("div", Br, [
3538
+ c("button", {
3523
3539
  type: "button",
3524
3540
  class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
3525
- onClick: m[4] || (m[4] = (G) => l.value = !1)
3541
+ onClick: g[4] || (g[4] = (G) => l.value = !1)
3526
3542
  }, " Скасувати "),
3527
- h("button", {
3543
+ c("button", {
3528
3544
  type: "button",
3529
3545
  class: "inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",
3530
3546
  onClick: k
@@ -3535,38 +3551,38 @@ const yr = { class: "space-y-4" }, wr = {
3535
3551
  _: 1
3536
3552
  }, 8, ["visible"])
3537
3553
  ]))
3538
- ])) : (p(), N(Pe, {
3554
+ ])) : (h(), E(Pe, {
3539
3555
  key: 1,
3540
3556
  title: "Оберіть один з віджетів",
3541
3557
  text: "",
3542
3558
  class: "p-4"
3543
3559
  }))
3544
3560
  ]),
3545
- T(Le, {
3561
+ T(Ve, {
3546
3562
  teleport: "#modal",
3547
3563
  visible: u.value,
3548
3564
  title: "Редагувати віджет",
3549
- onClose: m[8] || (m[8] = (G) => u.value = !1)
3565
+ onClose: g[8] || (g[8] = (G) => u.value = !1)
3550
3566
  }, {
3551
3567
  footer: j(() => [
3552
- h("div", Br, [
3553
- h("button", {
3568
+ c("div", Or, [
3569
+ c("button", {
3554
3570
  style: { border: "1px solid #000" },
3555
- onClick: m[7] || (m[7] = (G) => u.value = !1),
3571
+ onClick: g[7] || (g[7] = (G) => u.value = !1),
3556
3572
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg hover:bg-gray-100 duration-300"
3557
3573
  }, " Скасувати "),
3558
- h("button", {
3559
- onClick: w,
3574
+ c("button", {
3575
+ onClick: y,
3560
3576
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300"
3561
3577
  }, " Зберегти ")
3562
3578
  ])
3563
3579
  ]),
3564
3580
  default: j(() => [
3565
- d ? (p(), N(E(t), {
3581
+ f ? (h(), E(N(t), {
3566
3582
  key: 0,
3567
- schema: d,
3568
- values: f.value,
3569
- "onUpdate:values": m[6] || (m[6] = (G) => f.value = G)
3583
+ schema: f,
3584
+ values: p.value,
3585
+ "onUpdate:values": g[6] || (g[6] = (G) => p.value = G)
3570
3586
  }, null, 8, ["values"])) : A("", !0)
3571
3587
  ]),
3572
3588
  _: 1
@@ -3574,10 +3590,10 @@ const yr = { class: "space-y-4" }, wr = {
3574
3590
  ], 64);
3575
3591
  };
3576
3592
  }
3577
- }, Pr = { class: "overflow-hidden flex flex-col min-h-[480px]" }, Ar = { class: "flex-1 flex min-h-0 gap-4" }, Fr = { class: "flex-1 min-w-0 pb-4 overflow-auto bg-gray-50/50" }, qr = {
3593
+ }, Ar = { class: "overflow-hidden flex flex-col min-h-[480px]" }, Fr = { class: "flex-1 flex min-h-0 gap-4" }, qr = { class: "flex-1 min-w-0 pb-4 overflow-auto bg-gray-50/50" }, Mr = {
3578
3594
  key: 1,
3579
3595
  class: "flex items-center justify-center h-full"
3580
- }, Mr = { class: "w-[400px] shrink-0 flex flex-col" }, Ur = {
3596
+ }, Ur = { class: "w-[400px] shrink-0 flex flex-col" }, Gr = {
3581
3597
  __name: "vs-widget-editor-panel",
3582
3598
  props: {
3583
3599
  selectedWidget: { type: String, default: "" },
@@ -3602,21 +3618,21 @@ const yr = { class: "space-y-4" }, wr = {
3602
3618
  function n() {
3603
3619
  a("update-data");
3604
3620
  }
3605
- te(
3621
+ ae(
3606
3622
  () => [t.selectedDashboard, t.selectedWidget],
3607
3623
  () => {
3608
3624
  i();
3609
3625
  },
3610
3626
  { immediate: !0 }
3611
3627
  );
3612
- const o = F({
3628
+ const o = q({
3613
3629
  get: () => t.selectedWidget,
3614
3630
  set: (l) => a("update:selectedWidget", l)
3615
3631
  });
3616
- return (l, c) => (p(), y("div", Pr, [
3617
- h("div", Ar, [
3618
- h("div", Fr, [
3619
- r.value ? (p(), N(Oe, {
3632
+ return (l, d) => (h(), x("div", Ar, [
3633
+ c("div", Fr, [
3634
+ c("div", qr, [
3635
+ r.value ? (h(), E(Oe, {
3620
3636
  key: 0,
3621
3637
  dashboard: s.selectedDashboard,
3622
3638
  widget: s.selectedWidget,
@@ -3625,14 +3641,14 @@ const yr = { class: "space-y-4" }, wr = {
3625
3641
  "prefetched-data": r.value,
3626
3642
  "filter-u-rl": void 0,
3627
3643
  class: "max-h-full"
3628
- }, null, 8, ["dashboard", "widget", "selected-widget", "dashboard-widgets", "prefetched-data"])) : (p(), y("div", qr, [...c[1] || (c[1] = [
3629
- h("span", { class: "text-sm text-gray-400" }, "Завантаження...", -1)
3644
+ }, null, 8, ["dashboard", "widget", "selected-widget", "dashboard-widgets", "prefetched-data"])) : (h(), x("div", Mr, [...d[1] || (d[1] = [
3645
+ c("span", { class: "text-sm text-gray-400" }, "Завантаження...", -1)
3630
3646
  ])]))
3631
3647
  ]),
3632
- h("div", Mr, [
3633
- T(Or, {
3648
+ c("div", Ur, [
3649
+ T(Pr, {
3634
3650
  selectedWidget: o.value,
3635
- "onUpdate:selectedWidget": c[0] || (c[0] = (u) => o.value = u),
3651
+ "onUpdate:selectedWidget": d[0] || (d[0] = (u) => o.value = u),
3636
3652
  selectedWidgetData: s.selectedWidgetData,
3637
3653
  currentWidgetData: r.value || s.currentWidgetData || { columns: [] },
3638
3654
  selectedDashboard: s.selectedDashboard,
@@ -3642,30 +3658,30 @@ const yr = { class: "space-y-4" }, wr = {
3642
3658
  ])
3643
3659
  ]));
3644
3660
  }
3645
- }, Gr = {
3661
+ }, Hr = {
3646
3662
  __name: "icon-grid",
3647
3663
  setup(s) {
3648
- return (e, t) => (p(), N(E(Rs), he(e.$attrs, { size: 24 }), null, 16));
3664
+ return (e, t) => (h(), E(N(Ls), he(e.$attrs, { size: 24 }), null, 16));
3649
3665
  }
3650
- }, Hr = {
3666
+ }, Zr = {
3651
3667
  __name: "icon-table",
3652
3668
  setup(s) {
3653
- return (e, t) => (p(), N(E(Ws), he(e.$attrs, { size: 24 }), null, 16));
3669
+ return (e, t) => (h(), E(N(Es), he(e.$attrs, { size: 24 }), null, 16));
3654
3670
  }
3655
- }, Zr = {
3671
+ }, Qr = {
3656
3672
  __name: "icon-more",
3657
3673
  setup(s) {
3658
- return (e, t) => (p(), N(E(Ts), he(e.$attrs, { size: 24 }), null, 16));
3674
+ return (e, t) => (h(), E(N(Ss), he(e.$attrs, { size: 24 }), null, 16));
3659
3675
  }
3660
- }, Qr = M(() => import("@opengis/form")), Xr = {
3676
+ }, Xr = M(() => import("@opengis/form")), Yr = {
3661
3677
  components: {
3662
- VsModal: Le,
3663
- VForm: Qr,
3664
- deleteIcon: Jt,
3665
- editIcon: Kt,
3666
- IconGrid: Gr,
3667
- IconMore: Zr,
3668
- IconTable: Hr
3678
+ VsModal: Ve,
3679
+ VForm: Xr,
3680
+ deleteIcon: Kt,
3681
+ editIcon: es,
3682
+ IconGrid: Hr,
3683
+ IconMore: Qr,
3684
+ IconTable: Zr
3669
3685
  },
3670
3686
  watch: {
3671
3687
  dashboardData: {
@@ -3684,7 +3700,7 @@ const yr = { class: "space-y-4" }, wr = {
3684
3700
  }
3685
3701
  const e = (a = s == null ? void 0 : s.panels) == null ? void 0 : a.map((r) => {
3686
3702
  var o, l;
3687
- const { title: i = "", type: n = "" } = ((l = (o = s == null ? void 0 : s.widgets) == null ? void 0 : o.find((c) => (c == null ? void 0 : c.name) === (r == null ? void 0 : r.widget))) == null ? void 0 : l.data) || {};
3703
+ const { title: i = "", type: n = "" } = ((l = (o = s == null ? void 0 : s.widgets) == null ? void 0 : o.find((d) => (d == null ? void 0 : d.name) === (r == null ? void 0 : r.widget))) == null ? void 0 : l.data) || {};
3688
3704
  return { title: i, type: n, ...r };
3689
3705
  });
3690
3706
  this.formGridValue = {
@@ -3715,9 +3731,10 @@ const yr = { class: "space-y-4" }, wr = {
3715
3731
  label: "Опис"
3716
3732
  },
3717
3733
  {
3718
- type: "Text",
3734
+ type: "Select",
3719
3735
  key: "table_name",
3720
3736
  validators: ["required"],
3737
+ data: "pg.table_name",
3721
3738
  label: "Назва таблиці"
3722
3739
  },
3723
3740
  {
@@ -3863,22 +3880,22 @@ const yr = { class: "space-y-4" }, wr = {
3863
3880
  document.body.click();
3864
3881
  }
3865
3882
  }
3866
- }, Yr = {
3883
+ }, Jr = {
3867
3884
  key: 0,
3868
3885
  class: "flex items-center gap-4"
3869
- }, Jr = { class: "h-[30px] w-[30px] flex items-center justify-center" }, Kr = { class: "flex flex-col items-start -ml-2 -mr-2" }, en = { class: "p-4" }, tn = { class: "flex justify-end mt-4 gap-x-3" }, sn = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, an = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" };
3870
- function rn(s, e, t, a, r, i) {
3871
- const n = J("IconGrid"), o = J("VsPopover"), l = J("IconMore"), c = J("VsModal"), u = J("VForm");
3872
- return p(), y("div", null, [
3873
- t.selected ? (p(), y("div", Yr, [
3886
+ }, Kr = { class: "h-[30px] w-[30px] flex items-center justify-center" }, en = { class: "flex flex-col items-start -ml-2 -mr-2" }, tn = { class: "p-4" }, sn = { class: "flex justify-end mt-4 gap-x-3" }, an = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, rn = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" };
3887
+ function nn(s, e, t, a, r, i) {
3888
+ const n = K("IconGrid"), o = K("VsPopover"), l = K("IconMore"), d = K("VsModal"), u = K("VForm");
3889
+ return h(), x("div", null, [
3890
+ t.selected ? (h(), x("div", Jr, [
3874
3891
  T(o, {
3875
3892
  placement: "left",
3876
3893
  trigger: "hover"
3877
3894
  }, {
3878
3895
  reference: j(() => [
3879
- h("button", {
3896
+ c("button", {
3880
3897
  class: "h-[30px] w-[30px] flex items-center justify-center",
3881
- onClick: e[0] || (e[0] = (f) => r.isFormGrid = !0)
3898
+ onClick: e[0] || (e[0] = (p) => r.isFormGrid = !0)
3882
3899
  }, [
3883
3900
  T(n, { class: "h-[20px] text-gray-500" })
3884
3901
  ])
@@ -3895,20 +3912,20 @@ function rn(s, e, t, a, r, i) {
3895
3912
  reference: j(() => [
3896
3913
  T(o, { placement: "bottom-left" }, {
3897
3914
  reference: j(() => [
3898
- h("button", Jr, [
3915
+ c("button", Kr, [
3899
3916
  T(l, { class: "h-[20px]" })
3900
3917
  ])
3901
3918
  ]),
3902
3919
  default: j(() => [
3903
- h("div", Kr, [
3904
- h("button", {
3905
- onClick: e[1] || (e[1] = (f) => {
3920
+ c("div", en, [
3921
+ c("button", {
3922
+ onClick: e[1] || (e[1] = (p) => {
3906
3923
  i.closePopover(), r.isFormEdit = !0;
3907
3924
  }),
3908
3925
  class: "px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"
3909
3926
  }, " Редагувати дашборд "),
3910
- h("button", {
3911
- onClick: e[2] || (e[2] = (f) => {
3927
+ c("button", {
3928
+ onClick: e[2] || (e[2] = (p) => {
3912
3929
  i.closePopover(), r.isDeleteConfirm = !0;
3913
3930
  }),
3914
3931
  class: "px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"
@@ -3924,47 +3941,47 @@ function rn(s, e, t, a, r, i) {
3924
3941
  _: 1
3925
3942
  })
3926
3943
  ])) : A("", !0),
3927
- T(c, {
3944
+ T(d, {
3928
3945
  teleport: "#modal",
3929
3946
  visible: r.isDeleteConfirm,
3930
3947
  size: "small",
3931
3948
  title: "Ви впевнені?",
3932
- onClose: e[5] || (e[5] = (f) => r.isDeleteConfirm = !1)
3949
+ onClose: e[5] || (e[5] = (p) => r.isDeleteConfirm = !1)
3933
3950
  }, {
3934
3951
  default: j(() => [
3935
- h("div", en, [
3936
- e[16] || (e[16] = h("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей дашборд? ", -1)),
3937
- h("div", tn, [
3938
- h("button", {
3952
+ c("div", tn, [
3953
+ e[16] || (e[16] = c("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей дашборд? ", -1)),
3954
+ c("div", sn, [
3955
+ c("button", {
3939
3956
  type: "button",
3940
3957
  class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
3941
- onClick: e[3] || (e[3] = (f) => r.isDeleteConfirm = !1)
3958
+ onClick: e[3] || (e[3] = (p) => r.isDeleteConfirm = !1)
3942
3959
  }, " Скасувати "),
3943
- h("button", {
3960
+ c("button", {
3944
3961
  type: "button",
3945
3962
  class: "inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",
3946
- onClick: e[4] || (e[4] = (...f) => i.deleteDashboard && i.deleteDashboard(...f))
3963
+ onClick: e[4] || (e[4] = (...p) => i.deleteDashboard && i.deleteDashboard(...p))
3947
3964
  }, " Так, я впевнена(ий) ")
3948
3965
  ])
3949
3966
  ])
3950
3967
  ]),
3951
3968
  _: 1
3952
3969
  }, 8, ["visible"]),
3953
- T(c, {
3970
+ T(d, {
3954
3971
  teleport: "#modal",
3955
3972
  visible: r.isFormEdit,
3956
3973
  title: "Редагувати дашборд",
3957
- onClose: e[9] || (e[9] = (f) => r.isFormEdit = !1)
3974
+ onClose: e[9] || (e[9] = (p) => r.isFormEdit = !1)
3958
3975
  }, {
3959
3976
  footer: j(() => [
3960
- h("div", sn, [
3961
- h("button", {
3977
+ c("div", an, [
3978
+ c("button", {
3962
3979
  style: { border: "1px solid #000" },
3963
- onClick: e[7] || (e[7] = (f) => r.isFormEdit = !1),
3980
+ onClick: e[7] || (e[7] = (p) => r.isFormEdit = !1),
3964
3981
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"
3965
3982
  }, " Скасувати "),
3966
- h("button", {
3967
- onClick: e[8] || (e[8] = (...f) => i.editDashboard && i.editDashboard(...f)),
3983
+ c("button", {
3984
+ onClick: e[8] || (e[8] = (...p) => i.editDashboard && i.editDashboard(...p)),
3968
3985
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
3969
3986
  }, " Зберегти ")
3970
3987
  ])
@@ -3974,26 +3991,26 @@ function rn(s, e, t, a, r, i) {
3974
3991
  ref: "formEdit",
3975
3992
  schema: r.editDashboardScheme,
3976
3993
  values: r.formEditValue,
3977
- "onUpdate:values": e[6] || (e[6] = (f) => r.formEditValue = f)
3994
+ "onUpdate:values": e[6] || (e[6] = (p) => r.formEditValue = p)
3978
3995
  }, null, 8, ["schema", "values"])
3979
3996
  ]),
3980
3997
  _: 1
3981
3998
  }, 8, ["visible"]),
3982
- T(c, {
3999
+ T(d, {
3983
4000
  teleport: "#modal",
3984
4001
  visible: r.isFormGrid,
3985
4002
  title: "Редагувати структуру дашборду",
3986
- onClose: e[13] || (e[13] = (f) => r.isFormGrid = !1)
4003
+ onClose: e[13] || (e[13] = (p) => r.isFormGrid = !1)
3987
4004
  }, {
3988
4005
  footer: j(() => [
3989
- h("div", an, [
3990
- h("button", {
4006
+ c("div", rn, [
4007
+ c("button", {
3991
4008
  style: { border: "1px solid #000" },
3992
- onClick: e[11] || (e[11] = (f) => r.isFormGrid = !1),
4009
+ onClick: e[11] || (e[11] = (p) => r.isFormGrid = !1),
3993
4010
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"
3994
4011
  }, " Скасувати "),
3995
- h("button", {
3996
- onClick: e[12] || (e[12] = (...f) => i.editDashboardGrid && i.editDashboardGrid(...f)),
4012
+ c("button", {
4013
+ onClick: e[12] || (e[12] = (...p) => i.editDashboardGrid && i.editDashboardGrid(...p)),
3997
4014
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
3998
4015
  }, " Зберегти ")
3999
4016
  ])
@@ -4003,23 +4020,23 @@ function rn(s, e, t, a, r, i) {
4003
4020
  ref: "formgrid",
4004
4021
  schema: r.editGridScheme,
4005
4022
  values: r.formGridValue,
4006
- "onUpdate:values": e[10] || (e[10] = (f) => r.formGridValue = f)
4023
+ "onUpdate:values": e[10] || (e[10] = (p) => r.formGridValue = p)
4007
4024
  }, null, 8, ["schema", "values"])
4008
4025
  ]),
4009
4026
  _: 1
4010
4027
  }, 8, ["visible"])
4011
4028
  ]);
4012
4029
  }
4013
- const nn = /* @__PURE__ */ Q(Xr, [["render", rn]]), on = { class: "flex-1 min-w-0 flex flex-col overflow-auto" }, ln = { class: "max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1" }, cn = { class: "relative z-10 shrink-0 mt-4 mb-6" }, dn = { class: "flex items-center text-sm text-gray-600" }, un = {
4030
+ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-0 flex flex-col overflow-auto" }, dn = { class: "max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1" }, cn = { class: "relative z-10 shrink-0 mt-4 mb-6" }, un = { class: "flex items-center text-sm text-gray-600" }, hn = {
4014
4031
  key: 0,
4015
4032
  class: "flex items-center justify-between gap-4 mt-3"
4016
- }, hn = { class: "min-w-0" }, pn = { class: "text-2xl font-bold text-gray-900" }, fn = {
4033
+ }, pn = { class: "min-w-0" }, fn = { class: "text-2xl font-bold text-gray-900" }, gn = {
4017
4034
  key: 0,
4018
4035
  class: "mt-1.5 text-sm text-gray-600"
4019
- }, gn = { class: "flex items-center shrink-0" }, mn = {
4036
+ }, mn = { class: "flex items-center shrink-0" }, bn = {
4020
4037
  key: 1,
4021
4038
  class: "grid flex-grow w-full grid-cols-12 gap-4 py-4 pr-[15px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
4022
- }, bn = {
4039
+ }, xn = {
4023
4040
  __name: "vs-editor",
4024
4041
  props: {
4025
4042
  prefix: String,
@@ -4031,121 +4048,121 @@ const nn = /* @__PURE__ */ Q(Xr, [["render", rn]]), on = { class: "flex-1 min-w-
4031
4048
  setup(s, { emit: e }) {
4032
4049
  const t = s;
4033
4050
  He(t.prefix || "/api");
4034
- const a = e, r = we(), i = F(() => r.hasRoute(Y.EditorWidget)), n = Zt("biClearDashboard", null), o = I(t.initialDashboardId || ""), l = I(t.initialWidgetId || ""), c = I(null), u = I(null), f = I(null);
4035
- te(() => t.initialWidgetId, (w) => {
4036
- l.value = w || "";
4051
+ const a = e, r = we(), i = q(() => r.hasRoute(J.EditorWidget)), n = Qt("biClearDashboard", null), o = I(t.initialDashboardId || ""), l = I(t.initialWidgetId || ""), d = I(null), u = I(null), p = I(null);
4052
+ ae(() => t.initialWidgetId, (y) => {
4053
+ l.value = y || "";
4037
4054
  });
4038
4055
  const v = async () => {
4039
4056
  if (!o.value) {
4040
- c.value = null;
4057
+ d.value = null;
4041
4058
  return;
4042
4059
  }
4043
4060
  try {
4044
- const w = await H.get(
4061
+ const y = await H.get(
4045
4062
  `/bi-dashboard/${o.value}`
4046
4063
  );
4047
- c.value = w;
4048
- } catch (w) {
4049
- console.error(w);
4064
+ d.value = y;
4065
+ } catch (y) {
4066
+ console.error(y);
4050
4067
  }
4051
- }, g = F(
4068
+ }, m = q(
4052
4069
  () => {
4053
- var w, d, x;
4054
- return (x = Array.isArray((w = c.value) == null ? void 0 : w.widgets) ? (d = c.value) == null ? void 0 : d.widgets : []) == null ? void 0 : x.find((_) => (_ == null ? void 0 : _.name) === l.value);
4070
+ var y, f, w;
4071
+ return (w = Array.isArray((y = d.value) == null ? void 0 : y.widgets) ? (f = d.value) == null ? void 0 : f.widgets : []) == null ? void 0 : w.find(($) => ($ == null ? void 0 : $.name) === l.value);
4055
4072
  }
4056
4073
  );
4057
- function b(w) {
4074
+ function b(y) {
4058
4075
  i.value ? r.push({
4059
- name: Y.EditorWidget,
4060
- params: { dashboardId: o.value, widgetId: w }
4061
- }) : l.value = w;
4076
+ name: J.EditorWidget,
4077
+ params: { dashboardId: o.value, widgetId: y }
4078
+ }) : l.value = y;
4062
4079
  }
4063
4080
  function k() {
4064
4081
  i.value ? r.push({
4065
- name: Y.EditorDashboard,
4082
+ name: J.EditorDashboard,
4066
4083
  params: { dashboardId: o.value }
4067
4084
  }) : l.value = "";
4068
4085
  }
4069
- function $() {
4070
- i.value ? r.push({ name: Y.Editor }) : (typeof n == "function" && n(), a("back"));
4086
+ function D() {
4087
+ i.value ? r.push({ name: J.Editor }) : (typeof n == "function" && n(), a("back"));
4071
4088
  }
4072
- const L = F(() => {
4073
- var x, _, D, m, C;
4074
- const d = [i.value ? { label: "Дашборди", to: { name: Y.Editor } } : { label: "Дашборди", onClick: $ }];
4075
- if ((x = c.value) != null && x.title || o.value) {
4076
- const z = ((_ = c.value) == null ? void 0 : _.title) || o.value || "Редактор";
4077
- !!l.value ? d.push(
4078
- i.value ? { label: z, to: { name: Y.EditorDashboard, params: { dashboardId: o.value } } } : { label: z, onClick: () => {
4089
+ const V = q(() => {
4090
+ var w, $, _, g, C;
4091
+ const f = [i.value ? { label: "Дашборди", to: { name: J.Editor } } : { label: "Дашборди", onClick: D }];
4092
+ if ((w = d.value) != null && w.title || o.value) {
4093
+ const z = (($ = d.value) == null ? void 0 : $.title) || o.value || "Редактор";
4094
+ !!l.value ? f.push(
4095
+ i.value ? { label: z, to: { name: J.EditorDashboard, params: { dashboardId: o.value } } } : { label: z, onClick: () => {
4079
4096
  l.value = "";
4080
4097
  } }
4081
- ) : d.push({ label: z });
4098
+ ) : f.push({ label: z });
4082
4099
  } else
4083
- d.push({ label: "Редактор" });
4084
- if (l.value && g.value) {
4085
- const z = ((m = (D = g.value) == null ? void 0 : D.data) == null ? void 0 : m.title) || ((C = g.value) == null ? void 0 : C.title) || l.value;
4086
- d.push({ label: z });
4100
+ f.push({ label: "Редактор" });
4101
+ if (l.value && m.value) {
4102
+ const z = ((g = (_ = m.value) == null ? void 0 : _.data) == null ? void 0 : g.title) || ((C = m.value) == null ? void 0 : C.title) || l.value;
4103
+ f.push({ label: z });
4087
4104
  }
4088
- return d;
4105
+ return f;
4089
4106
  });
4090
- return te(o, (w, d) => {
4091
- d && (l.value = ""), w ? v() : (c.value = null, $());
4107
+ return ae(o, (y, f) => {
4108
+ f && (l.value = ""), y ? v() : (d.value = null, D());
4092
4109
  }), le(() => {
4093
4110
  v();
4094
- }), (w, d) => {
4095
- var x, _;
4096
- return p(), y("div", {
4097
- class: ee(["flex w-full h-full", [s.customClass]])
4111
+ }), (y, f) => {
4112
+ var w, $;
4113
+ return h(), x("div", {
4114
+ class: se(["flex w-full h-full", [s.customClass]])
4098
4115
  }, [
4099
- h("div", on, [
4100
- h("div", ln, [
4101
- h("div", cn, [
4102
- h("div", dn, [
4103
- T(Yt, {
4104
- items: L.value,
4116
+ c("div", ln, [
4117
+ c("div", dn, [
4118
+ c("div", cn, [
4119
+ c("div", un, [
4120
+ T(Jt, {
4121
+ items: V.value,
4105
4122
  compact: ""
4106
4123
  }, null, 8, ["items"])
4107
4124
  ]),
4108
- o.value && c.value ? (p(), y("div", un, [
4109
- h("div", hn, [
4110
- h("h1", pn, W(c.value.title || o.value), 1),
4111
- c.value.description ? (p(), y("p", fn, W(c.value.description), 1)) : A("", !0)
4125
+ o.value && d.value ? (h(), x("div", hn, [
4126
+ c("div", pn, [
4127
+ c("h1", fn, W(d.value.title || o.value), 1),
4128
+ d.value.description ? (h(), x("p", gn, W(d.value.description), 1)) : A("", !0)
4112
4129
  ]),
4113
- h("div", gn, [
4114
- l.value ? (p(), y("button", {
4130
+ c("div", mn, [
4131
+ l.value ? (h(), x("button", {
4115
4132
  key: 0,
4116
4133
  type: "button",
4117
4134
  class: "flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",
4118
4135
  onClick: k
4119
4136
  }, [
4120
- T(E(Es), { class: "w-4 h-4" }),
4121
- d[5] || (d[5] = X(" Закрити ", -1))
4122
- ])) : (p(), y(U, { key: 1 }, [
4123
- T(nn, {
4137
+ T(N(Bs), { class: "w-4 h-4" }),
4138
+ f[5] || (f[5] = X(" Закрити ", -1))
4139
+ ])) : (h(), x(U, { key: 1 }, [
4140
+ T(on, {
4124
4141
  selected: o.value,
4125
- "onUpdate:selected": d[0] || (d[0] = (D) => o.value = D),
4126
- dashboardData: c.value,
4127
- columns: (x = c.value) == null ? void 0 : x.columns,
4128
- selectedWidgetData: g.value,
4142
+ "onUpdate:selected": f[0] || (f[0] = (_) => o.value = _),
4143
+ dashboardData: d.value,
4144
+ columns: (w = d.value) == null ? void 0 : w.columns,
4145
+ selectedWidgetData: m.value,
4129
4146
  prefix: s.prefix,
4130
4147
  onUpdateEditor: v
4131
4148
  }, null, 8, ["selected", "dashboardData", "columns", "selectedWidgetData", "prefix"]),
4132
- h("button", {
4149
+ c("button", {
4133
4150
  type: "button",
4134
4151
  class: "ml-4 flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",
4135
- onClick: d[1] || (d[1] = (D) => {
4136
- var m, C;
4137
- return (C = (m = f.value) == null ? void 0 : m.open) == null ? void 0 : C.call(m);
4152
+ onClick: f[1] || (f[1] = (_) => {
4153
+ var g, C;
4154
+ return (C = (g = p.value) == null ? void 0 : g.open) == null ? void 0 : C.call(g);
4138
4155
  })
4139
- }, [...d[6] || (d[6] = [
4140
- h("span", { class: "leading-none" }, "+", -1),
4156
+ }, [...f[6] || (f[6] = [
4157
+ c("span", { class: "leading-none" }, "+", -1),
4141
4158
  X(" Створити віджет ", -1)
4142
4159
  ])]),
4143
- o.value ? (p(), N(ja, {
4160
+ o.value ? (h(), E(Ba, {
4144
4161
  key: 0,
4145
4162
  ref_key: "createWidgetRef",
4146
- ref: f,
4163
+ ref: p,
4147
4164
  inline: "",
4148
- columns: (_ = c.value) == null ? void 0 : _.columns,
4165
+ columns: ($ = d.value) == null ? void 0 : $.columns,
4149
4166
  selectedDashboard: o.value,
4150
4167
  onUpdateData: v
4151
4168
  }, null, 8, ["columns", "selectedDashboard"])) : A("", !0)
@@ -4153,49 +4170,49 @@ const nn = /* @__PURE__ */ Q(Xr, [["render", rn]]), on = { class: "flex-1 min-w-
4153
4170
  ])
4154
4171
  ])) : A("", !0)
4155
4172
  ]),
4156
- l.value && c.value ? (p(), N(Ur, {
4173
+ l.value && d.value ? (h(), E(Gr, {
4157
4174
  key: 0,
4158
4175
  "selected-widget": l.value,
4159
- "onUpdate:selectedWidget": d[2] || (d[2] = (D) => l.value = D),
4160
- "selected-widget-data": g.value,
4176
+ "onUpdate:selectedWidget": f[2] || (f[2] = (_) => l.value = _),
4177
+ "selected-widget-data": m.value,
4161
4178
  "current-widget-data": u.value,
4162
4179
  "selected-dashboard": o.value,
4163
- "dashboard-widgets": c.value.widgets || [],
4180
+ "dashboard-widgets": d.value.widgets || [],
4164
4181
  onUpdateData: v
4165
- }, null, 8, ["selected-widget", "selected-widget-data", "current-widget-data", "selected-dashboard", "dashboard-widgets"])) : (p(), y("div", mn, [
4166
- c.value ? (p(!0), y(U, { key: 1 }, Z(c.value.panels, (D, m) => {
4182
+ }, null, 8, ["selected-widget", "selected-widget-data", "current-widget-data", "selected-dashboard", "dashboard-widgets"])) : (h(), x("div", bn, [
4183
+ d.value ? (h(!0), x(U, { key: 1 }, Z(d.value.panels, (_, g) => {
4167
4184
  var C;
4168
- return p(), y("div", {
4169
- key: m,
4170
- class: ee([`md:col-span-${D.col || 12} col-span-12`, "flex flex-col gap-[10px]"])
4185
+ return h(), x("div", {
4186
+ key: g,
4187
+ class: se([`md:col-span-${_.col || 12} col-span-12`, "flex flex-col gap-[10px]"])
4171
4188
  }, [
4172
- (C = D.widgets) != null && C.length ? (p(!0), y(U, { key: 0 }, Z(D.widgets, (z) => (p(), N(Oe, {
4189
+ (C = _.widgets) != null && C.length ? (h(!0), x(U, { key: 0 }, Z(_.widgets, (z) => (h(), E(Oe, {
4173
4190
  onClick: (R) => b(z),
4174
- "onUpdate:currentWidgetData": d[3] || (d[3] = (R) => u.value = R),
4191
+ "onUpdate:currentWidgetData": f[3] || (f[3] = (R) => u.value = R),
4175
4192
  key: z,
4176
4193
  dashboard: o.value,
4177
4194
  widget: z,
4178
4195
  selectedWidget: l.value,
4179
- "dashboard-widgets": c.value.widgets,
4180
- height: Number(D.height ?? 480),
4181
- class: ee({
4196
+ "dashboard-widgets": d.value.widgets,
4197
+ height: Number(_.height ?? 480),
4198
+ class: se({
4182
4199
  "border border-blue-500": l.value === z
4183
4200
  })
4184
- }, null, 8, ["onClick", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height", "class"]))), 128)) : (p(), N(Oe, {
4201
+ }, null, 8, ["onClick", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height", "class"]))), 128)) : (h(), E(Oe, {
4185
4202
  key: 1,
4186
- onClick: (z) => b(D.widget),
4187
- "onUpdate:currentWidgetData": d[4] || (d[4] = (z) => u.value = z),
4188
- class: ee(["flex flex-col", {
4189
- "border border-blue-500": l.value === D.widget
4203
+ onClick: (z) => b(_.widget),
4204
+ "onUpdate:currentWidgetData": f[4] || (f[4] = (z) => u.value = z),
4205
+ class: se(["flex flex-col", {
4206
+ "border border-blue-500": l.value === _.widget
4190
4207
  }]),
4191
4208
  dashboard: o.value,
4192
- widget: D.widget,
4209
+ widget: _.widget,
4193
4210
  selectedWidget: l.value,
4194
- "dashboard-widgets": c.value.widgets,
4195
- height: Number(D.height ?? 480)
4211
+ "dashboard-widgets": d.value.widgets,
4212
+ height: Number(_.height ?? 480)
4196
4213
  }, null, 8, ["onClick", "class", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height"]))
4197
4214
  ], 2);
4198
- }), 128)) : (p(), N(Pe, {
4215
+ }), 128)) : (h(), E(Pe, {
4199
4216
  key: 0,
4200
4217
  class: "col-span-12"
4201
4218
  }))
@@ -4205,7 +4222,7 @@ const nn = /* @__PURE__ */ Q(Xr, [["render", rn]]), on = { class: "flex-1 min-w-
4205
4222
  ], 2);
4206
4223
  };
4207
4224
  }
4208
- }, xn = /* @__PURE__ */ Q(bn, [["__scopeId", "data-v-f586e5b0"]]), yn = { class: "w-full h-screen" }, wn = /* @__PURE__ */ ge({
4225
+ }, yn = /* @__PURE__ */ Q(xn, [["__scopeId", "data-v-f586e5b0"]]), wn = { class: "w-full h-screen" }, vn = /* @__PURE__ */ ge({
4209
4226
  __name: "vs-editor-page",
4210
4227
  props: {
4211
4228
  prefix: { default: "/api" },
@@ -4214,8 +4231,8 @@ const nn = /* @__PURE__ */ Q(Xr, [["render", rn]]), on = { class: "flex-1 min-w-
4214
4231
  },
4215
4232
  emits: ["back"],
4216
4233
  setup(s) {
4217
- return (e, t) => (p(), y("div", yn, [
4218
- T(xn, {
4234
+ return (e, t) => (h(), x("div", wn, [
4235
+ T(yn, {
4219
4236
  customClass: "h-full w-full",
4220
4237
  prefix: s.prefix,
4221
4238
  "initial-dashboard-id": s.dashboardId,
@@ -4224,17 +4241,17 @@ const nn = /* @__PURE__ */ Q(Xr, [["render", rn]]), on = { class: "flex-1 min-w-
4224
4241
  }, null, 8, ["prefix", "initial-dashboard-id", "initial-widget-id"])
4225
4242
  ]));
4226
4243
  }
4227
- }), vn = { class: "relative group h-full" }, kn = { class: "flex items-start gap-3 flex-1 min-h-0" }, $n = { class: "p-2 bg-blue-50 rounded-lg group-hover:bg-blue-100 transition-colors shrink-0" }, _n = { class: "flex-1 min-w-0 flex flex-col min-h-0" }, Dn = { class: "font-semibold text-gray-900 mb-1 truncate" }, Cn = {
4244
+ }), kn = { class: "relative group h-full" }, $n = { class: "flex items-start gap-3 flex-1 min-h-0" }, _n = { class: "p-2 bg-blue-50 rounded-lg group-hover:bg-blue-100 transition-colors shrink-0" }, Dn = { class: "flex-1 min-w-0 flex flex-col min-h-0" }, Cn = { class: "font-semibold text-gray-900 mb-1 truncate" }, zn = {
4228
4245
  key: 0,
4229
4246
  class: "text-sm text-gray-600 mb-2 line-clamp-2 min-h-10"
4230
- }, zn = {
4247
+ }, Tn = {
4231
4248
  key: 1,
4232
4249
  class: "text-sm text-gray-600 mb-2 line-clamp-2 min-h-10 invisible",
4233
4250
  "aria-hidden": "true"
4234
- }, Tn = {
4251
+ }, In = {
4235
4252
  key: 2,
4236
4253
  class: "text-sm text-gray-400 mt-1 shrink-0"
4237
- }, In = {
4254
+ }, Sn = {
4238
4255
  __name: "dashboard-card",
4239
4256
  props: {
4240
4257
  title: String,
@@ -4249,42 +4266,42 @@ const nn = /* @__PURE__ */ Q(Xr, [["render", rn]]), on = { class: "flex-1 min-w-
4249
4266
  setup(s) {
4250
4267
  const e = s, t = we(), a = I(!1);
4251
4268
  function r() {
4252
- e.dashboardRouteName && (t.hasRoute(Y.EditorDashboard) ? t.push({
4253
- name: Y.EditorDashboard,
4269
+ e.dashboardRouteName && (t.hasRoute(J.EditorDashboard) ? t.push({
4270
+ name: J.EditorDashboard,
4254
4271
  params: { dashboardId: e.dashboardRouteName }
4255
4272
  }) : e.onOpenEditor ? e.onOpenEditor(e.dashboardRouteName) : t.push({ path: "/editor", query: { dashboard: e.dashboardRouteName } }));
4256
4273
  }
4257
4274
  function i(n) {
4258
4275
  n.target.closest(".dashboard-card-menu") || (a.value = !1);
4259
4276
  }
4260
- return le(() => document.addEventListener("click", i)), Ue(() => document.removeEventListener("click", i)), (n, o) => (p(), y("div", vn, [
4261
- h("button", {
4277
+ return le(() => document.addEventListener("click", i)), Ue(() => document.removeEventListener("click", i)), (n, o) => (h(), x("div", kn, [
4278
+ c("button", {
4262
4279
  type: "button",
4263
4280
  class: "w-full h-full bg-white border border-gray-200 rounded-lg p-6 hover:shadow-md hover:border-blue-200 transition-all text-left animate-fade-in flex flex-col",
4264
4281
  onClick: r
4265
4282
  }, [
4266
- h("div", kn, [
4267
- h("div", $n, [
4268
- T(E(Ss), {
4283
+ c("div", $n, [
4284
+ c("div", _n, [
4285
+ T(N(Vs), {
4269
4286
  size: 24,
4270
4287
  class: "w-5 h-5 text-blue-600"
4271
4288
  })
4272
4289
  ]),
4273
- h("div", _n, [
4274
- h("h3", Dn, W(s.title), 1),
4275
- s.description ? (p(), y("p", Cn, W(s.description), 1)) : (p(), y("p", zn, "   ")),
4276
- s.widgetCount != null ? (p(), y("p", Tn, W(s.widgetCount) + " віджетів ", 1)) : A("", !0)
4290
+ c("div", Dn, [
4291
+ c("h3", Cn, W(s.title), 1),
4292
+ s.description ? (h(), x("p", zn, W(s.description), 1)) : (h(), x("p", Tn, "   ")),
4293
+ s.widgetCount != null ? (h(), x("p", In, W(s.widgetCount) + " віджетів ", 1)) : A("", !0)
4277
4294
  ])
4278
4295
  ])
4279
4296
  ])
4280
4297
  ]));
4281
4298
  }
4282
- }, Sn = /* @__PURE__ */ Q(In, [["__scopeId", "data-v-716ced89"]]), Rn = [
4299
+ }, Rn = /* @__PURE__ */ Q(Sn, [["__scopeId", "data-v-716ced89"]]), Vn = [
4283
4300
  { type: "Text", key: "name", label: "Назва", validators: ["required"], original: { type: "Text", ua: "Назва", col: 8 } },
4284
4301
  { type: "Text", key: "title", label: "Заголовок", validators: ["required"], original: { type: "Text", ua: "Титул", col: 8 } },
4285
4302
  { type: "Text", key: "description", label: "Опис", original: { type: "Text", ua: "Назва", col: 8 } },
4286
4303
  { type: "Text", key: "words", label: "Ключові слова", original: { type: "Text", ua: "Назва", col: 8 } },
4287
- { type: "Text", key: "table_name", validators: ["required"], label: "Назва таблиці", original: { type: "Text", ua: "Назва", col: 8 } },
4304
+ { type: "Select", data: "pg.table_name", key: "table_name", validators: ["required"], label: "Назва", original: { type: "select", ua: "Назва", col: 8, data: "pg.table_name" } },
4288
4305
  { type: "Text", key: "db", label: "База даних", original: { type: "Text", ua: "Назва", col: 8 } },
4289
4306
  { type: "Text", key: "category", label: "Категорія", original: { type: "Text", ua: "Категорія", col: 8 } },
4290
4307
  { type: "Switcher", key: "public", label: "Публічний", original: { type: "Text", ua: "Назва", col: 8 } }
@@ -4296,57 +4313,60 @@ function Ln(s) {
4296
4313
  return e[a] = r, e;
4297
4314
  }, {});
4298
4315
  }
4299
- const Vn = { class: "flex-1 bg-gray-50" }, Wn = { class: "max-w-7xl mx-auto px-6 py-8" }, Nn = { class: "mb-6" }, En = { class: "flex items-center justify-between mb-6" }, jn = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Bn = { class: "flex items-center space-x-4" }, On = { class: "flex-1 relative" }, Pn = {
4316
+ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6 py-8" }, En = { class: "mb-6" }, jn = { class: "flex items-center justify-between mb-6" }, Bn = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, On = { class: "flex items-center space-x-4" }, Pn = { class: "flex-1 relative" }, An = { class: "relative" }, Fn = {
4300
4317
  key: 0,
4301
4318
  class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"
4302
- }, An = {
4319
+ }, qn = {
4303
4320
  key: 1,
4304
4321
  class: "flex flex-col items-center justify-center py-20 text-center"
4305
- }, Fn = { class: "mt-1 text-sm text-gray-400" }, qn = { class: "font-medium text-gray-500" }, Mn = /* @__PURE__ */ ge({
4322
+ }, Mn = { class: "mt-1 text-sm text-gray-400" }, Un = { class: "font-medium text-gray-500" }, Gn = /* @__PURE__ */ ge({
4306
4323
  __name: "all-dashboards-page",
4307
4324
  props: {
4308
4325
  prefix: {}
4309
4326
  },
4310
4327
  setup(s) {
4311
- const e = M(() => import("@opengis/form")), t = Ln(Rn), a = I([]), r = I([]), i = we(), n = Zt("biSetDashboard", void 0), o = s, l = I(null), c = I(!1), u = I({}), f = I(""), v = F(() => {
4312
- const d = f.value.trim().toLowerCase();
4313
- return d ? a.value.filter((x) => x.title.toLowerCase().includes(d)) : a.value;
4328
+ const e = M(() => import("@opengis/form")), t = Ln(Vn), a = I([]), r = I([]), i = we(), n = Qt("biSetDashboard", void 0), o = s, l = I(null), d = I(!1), u = I({}), p = I(""), v = I("title-asc"), m = q(() => {
4329
+ const w = p.value.trim().toLowerCase();
4330
+ let $ = a.value;
4331
+ w && ($ = $.filter((g) => g.title.toLowerCase().includes(w)));
4332
+ const _ = v.value === "title-asc" ? 1 : -1;
4333
+ return [...$].sort((g, C) => _ * g.title.localeCompare(C.title, "uk"));
4314
4334
  });
4315
- async function g() {
4335
+ async function b() {
4316
4336
  try {
4317
- const d = await H.get("/bi-dashboard?type=db"), x = Array.isArray(d == null ? void 0 : d.rows) ? d.rows : [];
4318
- r.value = x, a.value = x.map((_) => ({
4337
+ const w = await H.get("/bi-dashboard?type=db"), $ = Array.isArray(w == null ? void 0 : w.rows) ? w.rows : [];
4338
+ r.value = $, a.value = $.map((_) => ({
4319
4339
  routeName: String(_.name ?? ""),
4320
4340
  title: _.title ?? _.name ?? "Без назви",
4321
4341
  description: _.description ?? null,
4322
4342
  modified: "-",
4323
4343
  name: "-"
4324
4344
  }));
4325
- } catch (d) {
4326
- console.error("Failed to load dashboards", d), r.value = [], a.value = [];
4345
+ } catch (w) {
4346
+ console.error("Failed to load dashboards", w), r.value = [], a.value = [];
4327
4347
  }
4328
4348
  }
4329
- async function b() {
4330
- var x, _, D;
4331
- const d = (_ = (x = me()) == null ? void 0 : x.proxy) == null ? void 0 : _.$notify;
4349
+ async function k() {
4350
+ var $, _, g;
4351
+ const w = (_ = ($ = me()) == null ? void 0 : $.proxy) == null ? void 0 : _.$notify;
4332
4352
  try {
4333
- const m = (D = l.value) == null ? void 0 : D.validate();
4334
- typeof m == "function" && await m();
4335
- const { name: C, title: z, table_name: R } = u.value;
4336
- if (!C || !z || !R) {
4337
- d == null || d({ type: "error", title: "Помилка!", message: "Заповніть усі обов'язкові поля" });
4353
+ const C = (g = l.value) == null ? void 0 : g.validate();
4354
+ typeof C == "function" && await C();
4355
+ const { name: z, title: R, table_name: F } = u.value;
4356
+ if (!z || !R || !F) {
4357
+ w == null || w({ type: "error", title: "Помилка!", message: "Заповніть усі обов'язкові поля" });
4338
4358
  return;
4339
4359
  }
4340
- await H.post("/bi-dashboard", u.value), c.value = !1, u.value = {}, d == null || d({
4360
+ await H.post("/bi-dashboard", u.value), d.value = !1, u.value = {}, w == null || w({
4341
4361
  type: "success",
4342
4362
  title: "Успішно!",
4343
4363
  message: "Дашборд створено успішно"
4344
- }), i.hasRoute(Y.EditorDashboard) ? i.push({
4345
- name: Y.EditorDashboard,
4346
- params: { dashboardId: C }
4347
- }) : n ? n(C) : await g();
4364
+ }), i.hasRoute(J.EditorDashboard) ? i.push({
4365
+ name: J.EditorDashboard,
4366
+ params: { dashboardId: z }
4367
+ }) : n ? n(z) : await b();
4348
4368
  } catch {
4349
- d == null || d({
4369
+ w == null || w({
4350
4370
  type: "error",
4351
4371
  title: "Помилка!",
4352
4372
  message: "При спробі створити дашборд виникла помилка"
@@ -4354,154 +4374,169 @@ const Vn = { class: "flex-1 bg-gray-50" }, Wn = { class: "max-w-7xl mx-auto px-6
4354
4374
  }
4355
4375
  }
4356
4376
  le(() => {
4357
- He(o.prefix || "/api"), g();
4377
+ He(o.prefix || "/api"), b();
4358
4378
  });
4359
- const k = I(1), $ = () => {
4360
- const d = window.innerWidth;
4361
- k.value = d >= 1024 ? 3 : d >= 768 ? 2 : 1;
4379
+ const D = I(1), V = () => {
4380
+ const w = window.innerWidth;
4381
+ D.value = w >= 1024 ? 3 : w >= 768 ? 2 : 1;
4362
4382
  };
4363
4383
  le(() => {
4364
- $(), window.addEventListener("resize", $);
4384
+ V(), window.addEventListener("resize", V);
4365
4385
  }), Ue(() => {
4366
- window.removeEventListener("resize", $);
4386
+ window.removeEventListener("resize", V);
4367
4387
  });
4368
- const L = (d) => d ? d.trim().length > 70 ? 2 : 1 : 0, w = (d) => {
4369
- const x = k.value || 1, D = Math.floor(d / x) * x, m = D + x, C = v.value.slice(D, m);
4370
- let z = 0;
4371
- for (const R of C) {
4372
- const q = L(R.description ?? null);
4373
- if (q > z && (z = q), z === 2) break;
4388
+ const y = (w) => w ? w.trim().length > 70 ? 2 : 1 : 0, f = (w) => {
4389
+ const $ = D.value || 1, g = Math.floor(w / $) * $, C = g + $, z = m.value.slice(g, C);
4390
+ let R = 0;
4391
+ for (const F of z) {
4392
+ const Y = y(F.description ?? null);
4393
+ if (Y > R && (R = Y), R === 2) break;
4374
4394
  }
4375
- return z;
4395
+ return R;
4376
4396
  };
4377
- return I("grid"), (d, x) => (p(), y("div", Vn, [
4378
- h("div", Wn, [
4379
- h("div", Nn, [
4380
- h("div", En, [
4381
- x[6] || (x[6] = h("div", null, [
4382
- h("h1", { class: "text-3xl font-bold text-gray-900" }, "Дашборди"),
4383
- h("p", { class: "mt-2 text-gray-600" }, " Керуйте та переглядайте свої аналітичні дашборди ")
4397
+ return I("grid"), (w, $) => (h(), x("div", Wn, [
4398
+ c("div", Nn, [
4399
+ c("div", En, [
4400
+ c("div", jn, [
4401
+ $[7] || ($[7] = c("div", null, [
4402
+ c("h1", { class: "text-3xl font-bold text-gray-900" }, "Дашборди"),
4403
+ c("p", { class: "mt-2 text-gray-600" }, " Керуйте та переглядайте свої аналітичні дашборди ")
4384
4404
  ], -1)),
4385
- h("button", {
4405
+ c("button", {
4386
4406
  type: "button",
4387
4407
  class: "flex items-center gap-2 px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",
4388
- onClick: x[0] || (x[0] = (_) => c.value = !0)
4408
+ onClick: $[0] || ($[0] = (_) => d.value = !0)
4389
4409
  }, [
4390
- T(E(Qt), {
4410
+ T(N(Xt), {
4391
4411
  size: 24,
4392
4412
  class: "w-4 h-4"
4393
4413
  }),
4394
- x[5] || (x[5] = h("span", null, "Новий дашборд", -1))
4414
+ $[6] || ($[6] = c("span", null, "Новий дашборд", -1))
4395
4415
  ])
4396
4416
  ]),
4397
- T(Le, {
4417
+ T(Ve, {
4398
4418
  teleport: "#modal",
4399
- visible: c.value,
4419
+ visible: d.value,
4400
4420
  title: "Створити дашборд",
4401
- onClose: x[3] || (x[3] = (_) => c.value = !1)
4421
+ onClose: $[3] || ($[3] = (_) => d.value = !1)
4402
4422
  }, {
4403
4423
  footer: j(() => [
4404
- h("div", jn, [
4405
- h("button", {
4424
+ c("div", Bn, [
4425
+ c("button", {
4406
4426
  type: "button",
4407
4427
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",
4408
- onClick: x[2] || (x[2] = (_) => c.value = !1)
4428
+ onClick: $[2] || ($[2] = (_) => d.value = !1)
4409
4429
  }, " Скасувати "),
4410
- h("button", {
4430
+ c("button", {
4411
4431
  type: "button",
4412
4432
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",
4413
- onClick: b
4433
+ onClick: k
4414
4434
  }, " Зберегти ")
4415
4435
  ])
4416
4436
  ]),
4417
4437
  default: j(() => [
4418
- T(E(e), {
4438
+ T(N(e), {
4419
4439
  ref_key: "createFormRef",
4420
4440
  ref: l,
4421
- schema: E(t),
4441
+ schema: N(t),
4422
4442
  values: u.value,
4423
- "onUpdate:values": x[1] || (x[1] = (_) => u.value = _)
4443
+ "onUpdate:values": $[1] || ($[1] = (_) => u.value = _)
4424
4444
  }, null, 8, ["schema", "values"])
4425
4445
  ]),
4426
4446
  _: 1
4427
4447
  }, 8, ["visible"]),
4428
- h("div", Bn, [
4429
- h("div", On, [
4430
- T(E(Vt), {
4448
+ c("div", On, [
4449
+ c("div", Pn, [
4450
+ T(N(Wt), {
4431
4451
  size: 24,
4432
4452
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"
4433
4453
  }),
4434
- Gt(h("input", {
4435
- "onUpdate:modelValue": x[4] || (x[4] = (_) => f.value = _),
4454
+ et(c("input", {
4455
+ "onUpdate:modelValue": $[4] || ($[4] = (_) => p.value = _),
4436
4456
  type: "text",
4437
4457
  placeholder: "Пошук дашбордів...",
4438
4458
  class: "w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
4439
4459
  }, null, 512), [
4440
- [xs, f.value]
4460
+ [xs, p.value]
4441
4461
  ])
4462
+ ]),
4463
+ c("div", An, [
4464
+ et(c("select", {
4465
+ "onUpdate:modelValue": $[5] || ($[5] = (_) => v.value = _),
4466
+ class: "appearance-none pl-3 pr-8 py-2 border border-gray-300 rounded-lg bg-white text-sm text-gray-700 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500"
4467
+ }, [...$[8] || ($[8] = [
4468
+ c("option", { value: "title-asc" }, "Назва (А → Я)", -1),
4469
+ c("option", { value: "title-desc" }, "Назва (Я → А)", -1)
4470
+ ])], 512), [
4471
+ [ys, v.value]
4472
+ ]),
4473
+ T(N(zs), {
4474
+ size: 16,
4475
+ class: "absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none"
4476
+ })
4442
4477
  ])
4443
4478
  ])
4444
4479
  ]),
4445
- v.value.length ? (p(), y("div", Pn, [
4446
- (p(!0), y(U, null, Z(v.value, (_, D) => (p(), y("div", {
4480
+ m.value.length ? (h(), x("div", Fn, [
4481
+ (h(!0), x(U, null, Z(m.value, (_, g) => (h(), x("div", {
4447
4482
  key: _.routeName,
4448
4483
  class: "cursor-pointer h-full"
4449
4484
  }, [
4450
- T(Sn, {
4485
+ T(Rn, {
4451
4486
  title: _.title,
4452
4487
  description: _.description,
4453
4488
  modified: _.modified,
4454
4489
  name: _.name,
4455
- reserveLines: w(D),
4490
+ reserveLines: f(g),
4456
4491
  "dashboard-route-name": _.routeName,
4457
- "on-open-editor": E(n)
4492
+ "on-open-editor": N(n)
4458
4493
  }, null, 8, ["title", "description", "modified", "name", "reserveLines", "dashboard-route-name", "on-open-editor"])
4459
4494
  ]))), 128))
4460
- ])) : (p(), y("div", An, [
4461
- T(E(Vt), {
4495
+ ])) : (h(), x("div", qn, [
4496
+ T(N(Wt), {
4462
4497
  size: 48,
4463
4498
  class: "text-gray-300 mb-4"
4464
4499
  }),
4465
- x[9] || (x[9] = h("p", { class: "text-lg font-medium text-gray-500" }, "Дашбордів не знайдено", -1)),
4466
- h("p", Fn, [
4467
- x[7] || (x[7] = X(" За запитом «", -1)),
4468
- h("span", qn, W(f.value), 1),
4469
- x[8] || (x[8] = X("» нічого не знайдено. Спробуйте змінити пошуковий запит. ", -1))
4500
+ $[11] || ($[11] = c("p", { class: "text-lg font-medium text-gray-500" }, "Дашбордів не знайдено", -1)),
4501
+ c("p", Mn, [
4502
+ $[9] || ($[9] = X(" За запитом «", -1)),
4503
+ c("span", Un, W(p.value), 1),
4504
+ $[10] || ($[10] = X("» нічого не знайдено. Спробуйте змінити пошуковий запит. ", -1))
4470
4505
  ])
4471
4506
  ]))
4472
4507
  ])
4473
4508
  ]));
4474
4509
  }
4475
- }), wo = /* @__PURE__ */ ge({
4510
+ }), ko = /* @__PURE__ */ ge({
4476
4511
  __name: "editor-root-page",
4477
4512
  props: {
4478
4513
  prefix: { default: "/api" }
4479
4514
  },
4480
4515
  setup(s) {
4481
- const e = s, t = F(() => e.prefix), a = we(), r = ws(), i = F(
4482
- () => a.hasRoute(Y.EditorDashboard)
4516
+ const e = s, t = q(() => e.prefix), a = we(), r = vs(), i = q(
4517
+ () => a.hasRoute(J.EditorDashboard)
4483
4518
  ), n = I("");
4484
4519
  le(() => {
4485
4520
  var l;
4486
4521
  if (!i.value) {
4487
- const c = (l = r == null ? void 0 : r.query) == null ? void 0 : l.dashboard;
4488
- c != null && typeof c == "string" && (n.value = c.trim());
4522
+ const d = (l = r == null ? void 0 : r.query) == null ? void 0 : l.dashboard;
4523
+ d != null && typeof d == "string" && (n.value = d.trim());
4489
4524
  }
4490
4525
  });
4491
- const o = F(() => n.value.length > 0);
4526
+ const o = q(() => n.value.length > 0);
4492
4527
  return Qe("biSetDashboard", (l) => {
4493
4528
  n.value = l || "";
4494
4529
  }), Qe("biClearDashboard", () => {
4495
4530
  n.value = "";
4496
- }), Qe("biSelectedDashboardId", ys(n)), (l, c) => {
4497
- const u = J("router-view");
4498
- return i.value ? (p(), N(u, { key: 0 })) : (p(), y(U, { key: 1 }, [
4499
- o.value ? (p(), N(wn, {
4531
+ }), Qe("biSelectedDashboardId", ws(n)), (l, d) => {
4532
+ const u = K("router-view");
4533
+ return i.value ? (h(), E(u, { key: 0 })) : (h(), x(U, { key: 1 }, [
4534
+ o.value ? (h(), E(vn, {
4500
4535
  key: `editor-${n.value}`,
4501
4536
  prefix: t.value,
4502
4537
  "dashboard-id": n.value,
4503
- onBack: c[0] || (c[0] = (f) => n.value = "")
4504
- }, null, 8, ["prefix", "dashboard-id"])) : (p(), N(Mn, {
4538
+ onBack: d[0] || (d[0] = (p) => n.value = "")
4539
+ }, null, 8, ["prefix", "dashboard-id"])) : (h(), E(Gn, {
4505
4540
  key: 0,
4506
4541
  prefix: t.value
4507
4542
  }, null, 8, ["prefix"]))
@@ -4509,21 +4544,21 @@ const Vn = { class: "flex-1 bg-gray-50" }, Wn = { class: "max-w-7xl mx-auto px-6
4509
4544
  };
4510
4545
  }
4511
4546
  });
4512
- function ce(s, e) {
4547
+ function de(s, e) {
4513
4548
  const t = s && typeof s == "object" && "value" in s ? s.value : s;
4514
4549
  if (t == null) return "";
4515
4550
  const a = Number(t);
4516
4551
  return Number.isNaN(a) ? String(t) : new Intl.NumberFormat("en", e ?? { notation: "compact" }).format(a);
4517
4552
  }
4518
- function lt(s) {
4553
+ function dt(s) {
4519
4554
  if (!(s != null && s.includes("T"))) return s ?? "";
4520
4555
  const [e, t, a] = s.split("T")[0].split("-");
4521
4556
  return `${a}.${t}.${e}`;
4522
4557
  }
4523
- function vo(s) {
4558
+ function $o(s) {
4524
4559
  return Intl.NumberFormat("en").format(s ?? 0);
4525
4560
  }
4526
- class Un {
4561
+ class Hn {
4527
4562
  static getTooltipOptions(e = !0) {
4528
4563
  return {
4529
4564
  show: e,
@@ -4538,7 +4573,7 @@ class Un {
4538
4573
  };
4539
4574
  }
4540
4575
  }
4541
- const Gn = {
4576
+ const Zn = {
4542
4577
  show_label: !1,
4543
4578
  show_legend: !1,
4544
4579
  label: null,
@@ -4547,19 +4582,19 @@ const Gn = {
4547
4582
  color: null,
4548
4583
  title: null
4549
4584
  };
4550
- function Hn() {
4585
+ function Qn() {
4551
4586
  const s = "0123456789ABCDEF";
4552
4587
  let e = "#";
4553
4588
  for (let t = 0; t < 6; t += 1)
4554
4589
  e += s[Math.floor(Math.random() * 16)];
4555
4590
  return e;
4556
4591
  }
4557
- function Ve(s = Gn) {
4592
+ function Le(s = Zn) {
4558
4593
  var t, a, r;
4559
4594
  const e = {
4560
4595
  label: {
4561
4596
  show: ((t = s == null ? void 0 : s.label) == null ? void 0 : t.show) ?? (s == null ? void 0 : s.show_label) ?? !1,
4562
- formatter: (s == null ? void 0 : s.formatter) ?? ((i) => ce(i)),
4597
+ formatter: (s == null ? void 0 : s.formatter) ?? ((i) => de(i)),
4563
4598
  ...(s == null ? void 0 : s.label) || {}
4564
4599
  },
4565
4600
  legend: {
@@ -4573,7 +4608,7 @@ function Ve(s = Gn) {
4573
4608
  };
4574
4609
  return (s != null && s.colors || s != null && s.color) && (e.color = (s == null ? void 0 : s.colors) || (s == null ? void 0 : s.color) || null), e;
4575
4610
  }
4576
- function qt(s) {
4611
+ function Mt(s) {
4577
4612
  return {
4578
4613
  color: "#9ca3af",
4579
4614
  fontSize: 10,
@@ -4581,13 +4616,13 @@ function qt(s) {
4581
4616
  fontWeight: 400,
4582
4617
  label: s == null ? void 0 : s.label,
4583
4618
  show: !0,
4584
- formatter: (s == null ? void 0 : s.formatter) ?? ((e) => ce(e)),
4619
+ formatter: (s == null ? void 0 : s.formatter) ?? ((e) => de(e)),
4585
4620
  margin: (s == null ? void 0 : s.margin) ?? 7,
4586
4621
  interval: (s == null ? void 0 : s.interval) ?? "auto",
4587
4622
  rotate: (s == null ? void 0 : s.rotate) ?? 0
4588
4623
  };
4589
4624
  }
4590
- const Mt = [
4625
+ const Ut = [
4591
4626
  "#d3c7e6",
4592
4627
  "#bedae3",
4593
4628
  "#f8e9cb",
@@ -4719,11 +4754,11 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4719
4754
  }
4720
4755
  },
4721
4756
  async initChart(s, e, t) {
4722
- var a, r, i, n, o, l, c, u, f;
4757
+ var a, r, i, n, o, l, d, u, p;
4723
4758
  this.widgetInstance && this.widgetInstance.clear();
4724
4759
  try {
4725
- const v = this.$refs.chart, g = ye == null ? void 0 : ye.init(v);
4726
- if (!g) return;
4760
+ const v = this.$refs.chart, m = ye == null ? void 0 : ye.init(v);
4761
+ if (!m) return;
4727
4762
  const b = {
4728
4763
  tooltip: {
4729
4764
  show: ((r = (a = this.styleData) == null ? void 0 : a.tooltip) == null ? void 0 : r.show) !== !1,
@@ -4735,29 +4770,29 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4735
4770
  shadowColor: "transparent",
4736
4771
  padding: [0, 0, 0, 0],
4737
4772
  borderWidth: 0,
4738
- position: (k, $, L, w, d) => {
4739
- const [x, _] = k, [D, m] = d.contentSize, [C, z] = d.viewSize;
4740
- let R = x + 14, q = _ - m / 2;
4741
- return R + D > C && (R = x - D - 14), R < 0 && (R = 0), q + m > z && (q = z - m), q < 0 && (q = 0), [R, q];
4773
+ position: (k, D, V, y, f) => {
4774
+ const [w, $] = k, [_, g] = f.contentSize, [C, z] = f.viewSize;
4775
+ let R = w + 14, F = $ - g / 2;
4776
+ return R + _ > C && (R = w - _ - 14), R < 0 && (R = 0), F + g > z && (F = z - g), F < 0 && (F = 0), [R, F];
4742
4777
  },
4743
4778
  formatter: (k) => {
4744
- var m;
4745
- const L = (m = k[0]) == null ? void 0 : m.axisValue, w = L ? this.formatDate(L) : "N/A", d = [...k].filter((C) => {
4779
+ var g;
4780
+ const V = (g = k[0]) == null ? void 0 : g.axisValue, y = V ? this.formatDate(V) : "N/A", f = [...k].filter((C) => {
4746
4781
  var z;
4747
4782
  return parseFloat(C == null ? void 0 : C.data) || ((z = C == null ? void 0 : C.data) == null ? void 0 : z.value);
4748
4783
  }).sort((C, z) => {
4749
- var ne, ie;
4750
- const R = parseFloat(((ne = C == null ? void 0 : C.data) == null ? void 0 : ne.value) ?? (C == null ? void 0 : C.data)) || 0;
4784
+ var Y, ie;
4785
+ const R = parseFloat(((Y = C == null ? void 0 : C.data) == null ? void 0 : Y.value) ?? (C == null ? void 0 : C.data)) || 0;
4751
4786
  return (parseFloat(((ie = z == null ? void 0 : z.data) == null ? void 0 : ie.value) ?? (z == null ? void 0 : z.data)) || 0) - R;
4752
- }), x = d.slice(0, 8), _ = d.length - x.length;
4753
- let D = `
4787
+ }), w = f.slice(0, 8), $ = f.length - w.length;
4788
+ let _ = `
4754
4789
  <div style="background-color: rgba(255, 255, 255, 0.95)" class="border border-gray-200 text-gray-800 rounded-lg shadow-md dark:bg-neutral-800 dark:border-neutral-700 min-w-28">
4755
4790
  <div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 px-2 py-1">
4756
- ${w}
4791
+ ${y}
4757
4792
  </div>
4758
4793
  `;
4759
- return x.forEach((C) => {
4760
- D += `
4794
+ return w.forEach((C) => {
4795
+ _ += `
4761
4796
  <div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 dark:text-neutral-400">
4762
4797
  <span class="flex items-center">
4763
4798
  <span class="w-2.5 h-2.5 me-1.5 rounded-sm" style="background-color: ${C.color};"></span>
@@ -4766,10 +4801,10 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4766
4801
  <span>${this.getMetricValue(C == null ? void 0 : C.data)}</span>
4767
4802
  </div>
4768
4803
  `;
4769
- }), _ > 0 && (D += `
4804
+ }), $ > 0 && (_ += `
4770
4805
  <div class="text-xs px-2 py-0.5 text-gray-400 dark:text-neutral-500">
4771
- ... ще ${_}
4772
- </div>`), D += "</div>", D;
4806
+ ... ще ${$}
4807
+ </div>`), _ += "</div>", _;
4773
4808
  }
4774
4809
  },
4775
4810
  xAxis: {
@@ -4777,32 +4812,32 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4777
4812
  type: e ? "category" : "value",
4778
4813
  name: ((n = (i = this.styleData) == null ? void 0 : i.x_axis) == null ? void 0 : n.name) || "",
4779
4814
  axisLabel: {
4780
- ...qt((o = this.styleData) == null ? void 0 : o.x_axis),
4815
+ ...Mt((o = this.styleData) == null ? void 0 : o.x_axis),
4781
4816
  formatter: (k) => {
4782
- var L, w;
4783
- const $ = this.formatDate(k);
4784
- return ((w = (L = this.styleData) == null ? void 0 : L.x_axis) == null ? void 0 : w.overflow) === "ellipsis" && $.length > 10 ? `${$.slice(0, 10)}...` : $;
4817
+ var V, y;
4818
+ const D = this.formatDate(k);
4819
+ return ((y = (V = this.styleData) == null ? void 0 : V.x_axis) == null ? void 0 : y.overflow) === "ellipsis" && D.length > 10 ? `${D.slice(0, 10)}...` : D;
4785
4820
  }
4786
4821
  }
4787
4822
  },
4788
4823
  yAxis: {
4789
4824
  data: t != null && t.length ? t : null,
4790
4825
  type: t ? "category" : "value",
4791
- name: ((c = (l = this.styleData) == null ? void 0 : l.y_axis) == null ? void 0 : c.name) || "",
4792
- axisLabel: qt((u = this.styleData) == null ? void 0 : u.y_axis)
4826
+ name: ((d = (l = this.styleData) == null ? void 0 : l.y_axis) == null ? void 0 : d.name) || "",
4827
+ axisLabel: Mt((u = this.styleData) == null ? void 0 : u.y_axis)
4793
4828
  },
4794
4829
  series: s != null && s.length ? s : null,
4795
- ...Ve(this.styleData),
4830
+ ...Le(this.styleData),
4796
4831
  grid: {
4797
4832
  bottom: "0%",
4798
4833
  right: "0%",
4799
4834
  left: "0%",
4800
4835
  top: "20px",
4801
4836
  containLabel: !0,
4802
- ...((f = this.styleData) == null ? void 0 : f.grid) || {}
4837
+ ...((p = this.styleData) == null ? void 0 : p.grid) || {}
4803
4838
  }
4804
4839
  };
4805
- await g.setOption(b), g.resize(), this.widgetInstance = g, this.$emit("update:currentWidget", g);
4840
+ await m.setOption(b), m.resize(), this.widgetInstance = m, this.$emit("update:currentWidget", m);
4806
4841
  } catch (v) {
4807
4842
  console.error(v);
4808
4843
  }
@@ -4827,7 +4862,7 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4827
4862
  ...r,
4828
4863
  ...e.options,
4829
4864
  tooltip: {
4830
- ...Un.getTooltipOptions(e.options.tooltip.show)
4865
+ ...Hn.getTooltipOptions(e.options.tooltip.show)
4831
4866
  }
4832
4867
  });
4833
4868
  },
@@ -4850,13 +4885,13 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4850
4885
  getMetricValue(s) {
4851
4886
  var a;
4852
4887
  const e = (s == null ? void 0 : s.metric) || s;
4853
- return parseFloat(e) ? (a = ce(e, { notation: "standard" })) == null ? void 0 : a.replaceAll(
4888
+ return parseFloat(e) ? (a = de(e, { notation: "standard" })) == null ? void 0 : a.replaceAll(
4854
4889
  ",",
4855
4890
  " "
4856
4891
  ) : e;
4857
4892
  }
4858
4893
  }
4859
- }, Zn = {
4894
+ }, Xn = {
4860
4895
  name: "VsBar",
4861
4896
  mixins: [pe],
4862
4897
  data() {
@@ -4904,19 +4939,19 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4904
4939
  )
4905
4940
  );
4906
4941
  let o;
4907
- this.dimensions[0].includes("date") ? o = n.map((v) => lt(v)) : o = [...n];
4908
- let l, c;
4909
- ((e = this.styleData) == null ? void 0 : e.horizontal) === !0 ? c = [...o] : l = [...o];
4942
+ this.dimensions[0].includes("date") ? o = n.map((v) => dt(v)) : o = [...n];
4943
+ let l, d;
4944
+ ((e = this.styleData) == null ? void 0 : e.horizontal) === !0 ? d = [...o] : l = [...o];
4910
4945
  const u = this.sourceData.filter(
4911
4946
  (v) => parseFloat(v[this.dimensions[1]]) && v[this.dimensions[0]]
4912
4947
  ).map((v) => parseFloat(v[this.dimensions[1]]));
4913
- let f;
4914
- return ((t = this.styleData) == null ? void 0 : t.stack) !== !1 ? f = this.prepareStackData() : ((a = this.styleData) == null ? void 0 : a.negative_waterfall) === !0 ? f = this.prepareNegativeWaterfall() : ((r = this.styleData) == null ? void 0 : r.waterfall) === !0 ? f = this.prepareWaterfallData(u) : ((i = this.styleData) == null ? void 0 : i.accumulative) === !0 ? f = this.prepareAccumulative(u) : f = this.dimensions.slice(1).map((g, b) => ({
4915
- name: g,
4948
+ let p;
4949
+ return ((t = this.styleData) == null ? void 0 : t.stack) !== !1 ? p = this.prepareStackData() : ((a = this.styleData) == null ? void 0 : a.negative_waterfall) === !0 ? p = this.prepareNegativeWaterfall() : ((r = this.styleData) == null ? void 0 : r.waterfall) === !0 ? p = this.prepareWaterfallData(u) : ((i = this.styleData) == null ? void 0 : i.accumulative) === !0 ? p = this.prepareAccumulative(u) : p = this.dimensions.slice(1).map((m, b) => ({
4950
+ name: m,
4916
4951
  type: "bar",
4917
4952
  stack: `a${b}`,
4918
- data: this.sourceData.filter((k) => parseFloat(k[g]) && g).map((k) => parseFloat(k[g]))
4919
- })), { series: f, xs: l, ys: c };
4953
+ data: this.sourceData.filter((k) => parseFloat(k[m]) && m).map((k) => parseFloat(k[m]))
4954
+ })), { series: p, xs: l, ys: d };
4920
4955
  } catch (n) {
4921
4956
  return console.error(n), { series: [], xs: [], ys: [] };
4922
4957
  }
@@ -5008,18 +5043,18 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
5008
5043
  ];
5009
5044
  }
5010
5045
  }
5011
- }, Qn = ["id"];
5012
- function Xn(s, e, t, a, r, i) {
5013
- return p(), y("div", {
5046
+ }, Yn = ["id"];
5047
+ function Jn(s, e, t, a, r, i) {
5048
+ return h(), x("div", {
5014
5049
  id: i.uniqueID,
5015
5050
  ref: "chart",
5016
5051
  class: "h-full w-full min-h-[200px]"
5017
- }, null, 8, Qn);
5052
+ }, null, 8, Yn);
5018
5053
  }
5019
- const Yn = /* @__PURE__ */ Q(Zn, [["render", Xn]]), Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5054
+ const Kn = /* @__PURE__ */ Q(Xn, [["render", Jn]]), ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5020
5055
  __proto__: null,
5021
- default: Yn
5022
- }, Symbol.toStringTag, { value: "Module" })), Ye = typeof window < "u" ? window.echarts : null, Kn = {
5056
+ default: Kn
5057
+ }, Symbol.toStringTag, { value: "Module" })), Ye = typeof window < "u" ? window.echarts : null, ti = {
5023
5058
  name: "VsPie",
5024
5059
  props: ["currentWidget"],
5025
5060
  mixins: [pe],
@@ -5066,7 +5101,7 @@ const Yn = /* @__PURE__ */ Q(Zn, [["render", Xn]]), Jn = /* @__PURE__ */ Object.
5066
5101
  const { name: t, value: a, percent: r } = s;
5067
5102
  return `
5068
5103
  <div style="background-color:${e[0]}; font-size:12px; font-family:Helvetica, Arial, sans-serif; color:#ffff; padding:5px; border-radius:5px;">
5069
- ${t == null ? void 0 : t.replace("null", "Не визначено")}: ${ce(a)} (${r}%)
5104
+ ${t == null ? void 0 : t.replace("null", "Не визначено")}: ${de(a)} (${r}%)
5070
5105
  </div>`;
5071
5106
  },
5072
5107
  prepareData() {
@@ -5088,13 +5123,13 @@ const Yn = /* @__PURE__ */ Q(Zn, [["render", Xn]]), Jn = /* @__PURE__ */ Object.
5088
5123
  0
5089
5124
  ),
5090
5125
  10
5091
- ), c = n.map((b, k) => {
5092
- const $ = (o[k] / l * 100).toFixed(2);
5126
+ ), d = n.map((b, k) => {
5127
+ const D = (o[k] / l * 100).toFixed(2);
5093
5128
  return {
5094
- name: `${b} (${$}%)`,
5129
+ name: `${b} (${D}%)`,
5095
5130
  value: o[k]
5096
5131
  };
5097
- }), u = ((e = this.styleData) == null ? void 0 : e.innerRadius) || "80%", f = ((t = this.styleData) == null ? void 0 : t.outerRadius) || "100%", v = [u, f];
5132
+ }), u = ((e = this.styleData) == null ? void 0 : e.innerRadius) || "80%", p = ((t = this.styleData) == null ? void 0 : t.outerRadius) || "100%", v = [u, p];
5098
5133
  return this.styleData.legend = Me.getLegendOpions({
5099
5134
  borderRadius: 10,
5100
5135
  height: "100%",
@@ -5117,8 +5152,8 @@ const Yn = /* @__PURE__ */ Q(Zn, [["render", Xn]]), Jn = /* @__PURE__ */ Object.
5117
5152
  radius: v,
5118
5153
  center: ["50%", "60%"],
5119
5154
  height: "75%",
5120
- ...Ve(this.styleData),
5121
- data: c
5155
+ ...Le(this.styleData),
5156
+ data: d
5122
5157
  }
5123
5158
  ] };
5124
5159
  } catch (n) {
@@ -5159,9 +5194,9 @@ const Yn = /* @__PURE__ */ Q(Zn, [["render", Xn]]), Jn = /* @__PURE__ */ Object.
5159
5194
  backgroundColor: "transparent"
5160
5195
  },
5161
5196
  series: s,
5162
- ...Ve(this.styleData || {}),
5197
+ ...Le(this.styleData || {}),
5163
5198
  title: {
5164
- text: ce(r),
5199
+ text: de(r),
5165
5200
  left: "center",
5166
5201
  top: "41%",
5167
5202
  textStyle: {
@@ -5180,18 +5215,18 @@ const Yn = /* @__PURE__ */ Q(Zn, [["render", Xn]]), Jn = /* @__PURE__ */ Object.
5180
5215
  }
5181
5216
  }
5182
5217
  }
5183
- }, ei = ["id"];
5184
- function ti(s, e, t, a, r, i) {
5185
- return p(), y("div", {
5218
+ }, si = ["id"];
5219
+ function ai(s, e, t, a, r, i) {
5220
+ return h(), x("div", {
5186
5221
  id: i.uniqueID,
5187
5222
  ref: "chart",
5188
5223
  class: "h-full min-h-[200px] flex items-center"
5189
- }, null, 8, ei);
5224
+ }, null, 8, si);
5190
5225
  }
5191
- const si = /* @__PURE__ */ Q(Kn, [["render", ti]]), ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5226
+ const ri = /* @__PURE__ */ Q(ti, [["render", ai]]), ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5192
5227
  __proto__: null,
5193
- default: si
5194
- }, Symbol.toStringTag, { value: "Module" })), Je = typeof window < "u" ? window.echarts : null, ri = {
5228
+ default: ri
5229
+ }, Symbol.toStringTag, { value: "Module" })), Je = typeof window < "u" ? window.echarts : null, ii = {
5195
5230
  name: "VsPie",
5196
5231
  props: ["currentWidget"],
5197
5232
  mixins: [pe],
@@ -5238,7 +5273,7 @@ const si = /* @__PURE__ */ Q(Kn, [["render", ti]]), ai = /* @__PURE__ */ Object.
5238
5273
  const { name: t, value: a, percent: r } = s;
5239
5274
  return `
5240
5275
  <div style="background-color:${e[0]}; font-size:12px; font-family:Helvetica, Arial, sans-serif; color:#ffff; padding:5px; border-radius:5px;">
5241
- ${t == null ? void 0 : t.replace("null", "Не визначено")}: ${ce(a)} (${r}%)
5276
+ ${t == null ? void 0 : t.replace("null", "Не визначено")}: ${de(a)} (${r}%)
5242
5277
  </div>`;
5243
5278
  },
5244
5279
  prepareData() {
@@ -5247,25 +5282,25 @@ const si = /* @__PURE__ */ Q(Kn, [["render", ti]]), ai = /* @__PURE__ */ Object.
5247
5282
  this.styleData = this.styleData || {};
5248
5283
  const i = Array.from(
5249
5284
  new Set(
5250
- (this.sourceData || []).map((g) => g[this.dimensions[0]])
5285
+ (this.sourceData || []).map((m) => m[this.dimensions[0]])
5251
5286
  )
5252
5287
  ), n = Array.from(
5253
5288
  new Set(
5254
- (this.sourceData || []).map((g) => g[this.dimensions[1]])
5289
+ (this.sourceData || []).map((m) => m[this.dimensions[1]])
5255
5290
  )
5256
5291
  ), o = parseInt(
5257
5292
  (this.sourceData || []).reduce(
5258
- (g, b) => g + parseFloat(b == null ? void 0 : b.metric),
5293
+ (m, b) => m + parseFloat(b == null ? void 0 : b.metric),
5259
5294
  0
5260
5295
  ),
5261
5296
  10
5262
- ), l = i.map((g, b) => {
5297
+ ), l = i.map((m, b) => {
5263
5298
  const k = (n[b] / o * 100).toFixed(2);
5264
5299
  return {
5265
- name: `${g} (${k}%)`,
5300
+ name: `${m} (${k}%)`,
5266
5301
  value: n[b]
5267
5302
  };
5268
- }), c = ((s = this.styleData) == null ? void 0 : s.innerRadius) || "0%", u = ((e = this.styleData) == null ? void 0 : e.outerRadius) || "100%", f = [c, u];
5303
+ }), d = ((s = this.styleData) == null ? void 0 : s.innerRadius) || "0%", u = ((e = this.styleData) == null ? void 0 : e.outerRadius) || "100%", p = [d, u];
5269
5304
  return this.styleData.legend = Me.getLegendOpions({
5270
5305
  borderRadius: 10,
5271
5306
  height: "100%",
@@ -5273,7 +5308,7 @@ const si = /* @__PURE__ */ Q(Kn, [["render", ti]]), ai = /* @__PURE__ */ Object.
5273
5308
  type: "scroll",
5274
5309
  itemWidth: 14,
5275
5310
  itemHeight: 14,
5276
- formatter: (g) => g == null ? void 0 : g.replace("null", "Не визначено"),
5311
+ formatter: (m) => m == null ? void 0 : m.replace("null", "Не визначено"),
5277
5312
  textStyle: { fontSize: "14px" },
5278
5313
  ...((t = this.styleData) == null ? void 0 : t.legend) || {}
5279
5314
  }), this.styleData.label = Me.getLabelOptions(
@@ -5282,10 +5317,10 @@ const si = /* @__PURE__ */ Q(Kn, [["render", ti]]), ai = /* @__PURE__ */ Object.
5282
5317
  {
5283
5318
  name: this.titleCharts ? this.titleCharts : this.dimensions[0],
5284
5319
  type: "pie",
5285
- radius: f,
5320
+ radius: p,
5286
5321
  center: ["50%", "60%"],
5287
5322
  height: "75%",
5288
- ...Ve(this.styleData),
5323
+ ...Le(this.styleData),
5289
5324
  data: l
5290
5325
  }
5291
5326
  ] };
@@ -5321,7 +5356,7 @@ const si = /* @__PURE__ */ Q(Kn, [["render", ti]]), ai = /* @__PURE__ */ Object.
5321
5356
  backgroundColor: "transparent"
5322
5357
  },
5323
5358
  series: s,
5324
- ...Ve(this.styleData || {})
5359
+ ...Le(this.styleData || {})
5325
5360
  };
5326
5361
  this.chartInstance.setOption(r), this.$emit("update:currentWidget", this.chartInstance), this.chartInstance.resize(), window.addEventListener("resize", () => {
5327
5362
  var i;
@@ -5332,18 +5367,18 @@ const si = /* @__PURE__ */ Q(Kn, [["render", ti]]), ai = /* @__PURE__ */ Object.
5332
5367
  }
5333
5368
  }
5334
5369
  }
5335
- }, ni = ["id"];
5336
- function ii(s, e, t, a, r, i) {
5337
- return p(), y("div", {
5370
+ }, oi = ["id"];
5371
+ function li(s, e, t, a, r, i) {
5372
+ return h(), x("div", {
5338
5373
  id: i.uniqueID,
5339
5374
  ref: "chart",
5340
5375
  class: "h-full min-h-[200px] flex items-center"
5341
- }, null, 8, ni);
5376
+ }, null, 8, oi);
5342
5377
  }
5343
- const oi = /* @__PURE__ */ Q(ri, [["render", ii]]), li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5378
+ const di = /* @__PURE__ */ Q(ii, [["render", li]]), ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5344
5379
  __proto__: null,
5345
- default: oi
5346
- }, Symbol.toStringTag, { value: "Module" })), ci = {
5380
+ default: di
5381
+ }, Symbol.toStringTag, { value: "Module" })), ui = {
5347
5382
  name: "VsLine",
5348
5383
  mixins: [pe],
5349
5384
  data() {
@@ -5375,7 +5410,7 @@ const oi = /* @__PURE__ */ Q(ri, [["render", ii]]), li = /* @__PURE__ */ Object.
5375
5410
  new Set(this.sourceData.map((n) => n[this.dimensions[0]]))
5376
5411
  );
5377
5412
  let a;
5378
- this.dimensions[0].includes("date") ? a = t.map((n) => lt(n)) : a = [...t];
5413
+ this.dimensions[0].includes("date") ? a = t.map((n) => dt(n)) : a = [...t];
5379
5414
  const r = this.sourceData.map(
5380
5415
  (n) => parseFloat(n[this.dimensions[1]])
5381
5416
  );
@@ -5400,18 +5435,18 @@ const oi = /* @__PURE__ */ Q(ri, [["render", ii]]), li = /* @__PURE__ */ Object.
5400
5435
  }
5401
5436
  }
5402
5437
  }
5403
- }, di = ["id"];
5404
- function ui(s, e, t, a, r, i) {
5405
- return p(), y("div", {
5438
+ }, hi = ["id"];
5439
+ function pi(s, e, t, a, r, i) {
5440
+ return h(), x("div", {
5406
5441
  id: r.uniqueID,
5407
5442
  ref: "chart",
5408
5443
  style: { height: "400px" }
5409
- }, null, 8, di);
5444
+ }, null, 8, hi);
5410
5445
  }
5411
- const hi = /* @__PURE__ */ Q(ci, [["render", ui]]), pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5446
+ const fi = /* @__PURE__ */ Q(ui, [["render", pi]]), gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5412
5447
  __proto__: null,
5413
- default: hi
5414
- }, Symbol.toStringTag, { value: "Module" })), fi = {
5448
+ default: fi
5449
+ }, Symbol.toStringTag, { value: "Module" })), mi = {
5415
5450
  name: "VsStat",
5416
5451
  mixins: [pe],
5417
5452
  data() {
@@ -5436,27 +5471,27 @@ const hi = /* @__PURE__ */ Q(ci, [["render", ui]]), pi = /* @__PURE__ */ Object.
5436
5471
  this.columns = Object.keys(this.sourceData[0]);
5437
5472
  const s = this.getValues();
5438
5473
  this.sumValue = s.reduce((e, t) => e + t, 0), this.sourceData.forEach((e, t) => {
5439
- e.color = t < Mt.length - 1 ? Mt[t] : Hn();
5474
+ e.color = t < Ut.length - 1 ? Ut[t] : Qn();
5440
5475
  });
5441
5476
  },
5442
5477
  formattedValue(s) {
5443
5478
  const e = parseFloat(s);
5444
- return ce(e);
5479
+ return de(e);
5445
5480
  }
5446
5481
  }
5447
- }, gi = { class: "flex flex-col w-full h-full pt-[16px] rounded-xl" }, mi = { class: "flex flex-col justify-between w-full h-full" }, bi = { class: "w-full h-full pb-6 space-y-4" }, xi = { class: "flex w-full h-3 rounded-full gap-x-1 min-h-3 custom-x-scrollbar" }, yi = ["onMouseover"], wi = {
5482
+ }, bi = { class: "flex flex-col w-full h-full pt-[16px] rounded-xl" }, xi = { class: "flex flex-col justify-between w-full h-full" }, yi = { class: "w-full h-full pb-6 space-y-4" }, wi = { class: "flex w-full h-3 rounded-full gap-x-1 min-h-3 custom-x-scrollbar" }, vi = ["onMouseover"], ki = {
5448
5483
  key: 0,
5449
5484
  class: "absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"
5450
- }, vi = { class: "h-[calc(100%-20px)] w-full custom-scrollbar" }, ki = { class: "grid items-center justify-between grid-cols-2 py-2 gap-x-4" }, $i = { class: "flex items-center" }, _i = { class: "text-sm text-gray-800" }, Di = { class: "text-end" }, Ci = { class: "text-sm text-gray-500" };
5451
- function zi(s, e, t, a, r, i) {
5452
- return p(), y("div", gi, [
5453
- h("div", mi, [
5454
- h("div", bi, [
5455
- h("div", xi, [
5456
- (p(!0), y(U, null, Z(s.sourceData, (n, o) => {
5457
- var l, c, u, f;
5458
- return p(), y("div", {
5459
- class: ee(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap", `bg-[${n.color}]`]),
5485
+ }, $i = { class: "h-[calc(100%-40px)] w-full custom-scrollbar" }, _i = { class: "grid items-center justify-between grid-cols-2 py-2 gap-x-4" }, Di = { class: "flex items-center" }, Ci = { class: "text-sm text-gray-800" }, zi = { class: "text-end" }, Ti = { class: "text-sm text-gray-500" };
5486
+ function Ii(s, e, t, a, r, i) {
5487
+ return h(), x("div", bi, [
5488
+ c("div", xi, [
5489
+ c("div", yi, [
5490
+ c("div", wi, [
5491
+ (h(!0), x(U, null, Z(s.sourceData, (n, o) => {
5492
+ var l, d, u, p;
5493
+ return h(), x("div", {
5494
+ class: se(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap", `bg-[${n.color}]`]),
5460
5495
  style: Ge({
5461
5496
  width: `${parseFloat(n == null ? void 0 : n[(l = r.columns) == null ? void 0 : l[1]]) / r.sumValue * 100}%`
5462
5497
  }),
@@ -5467,22 +5502,22 @@ function zi(s, e, t, a, r, i) {
5467
5502
  onMouseover: (v) => r.showTooltip = o,
5468
5503
  onMouseleave: e[0] || (e[0] = (v) => r.showTooltip = -1)
5469
5504
  }, [
5470
- r.showTooltip > -1 ? (p(), y("div", wi, W(s.sourceData[r.showTooltip][r.columns[0]]) + " " + W((parseFloat((f = (c = s.sourceData) == null ? void 0 : c[r.showTooltip]) == null ? void 0 : f[(u = r.columns) == null ? void 0 : u[1]]) / r.sumValue * 100).toFixed(2)) + "% ", 1)) : A("", !0)
5471
- ], 46, yi);
5505
+ r.showTooltip > -1 ? (h(), x("div", ki, W(s.sourceData[r.showTooltip][r.columns[0]]) + " " + W((parseFloat((p = (d = s.sourceData) == null ? void 0 : d[r.showTooltip]) == null ? void 0 : p[(u = r.columns) == null ? void 0 : u[1]]) / r.sumValue * 100).toFixed(2)) + "% ", 1)) : A("", !0)
5506
+ ], 46, vi);
5472
5507
  }), 256))
5473
5508
  ]),
5474
- h("ul", vi, [
5475
- (p(!0), y(U, null, Z(s.sourceData, (n) => {
5509
+ c("ul", $i, [
5510
+ (h(!0), x(U, null, Z(s.sourceData, (n) => {
5476
5511
  var o, l;
5477
- return p(), y("li", ki, [
5478
- h("div", $i, [
5479
- h("span", {
5480
- class: ee(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]", `bg-[${n.color}]`])
5512
+ return h(), x("li", _i, [
5513
+ c("div", Di, [
5514
+ c("span", {
5515
+ class: se(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]", `bg-[${n.color}]`])
5481
5516
  }, null, 2),
5482
- h("span", _i, W((n == null ? void 0 : n[(o = r.columns) == null ? void 0 : o[0]]) || "Не визначено"), 1)
5517
+ c("span", Ci, W((n == null ? void 0 : n[(o = r.columns) == null ? void 0 : o[0]]) || "Не визначено"), 1)
5483
5518
  ]),
5484
- h("div", Di, [
5485
- h("span", Ci, W(i.formattedValue(n == null ? void 0 : n[(l = r.columns) == null ? void 0 : l[1]]) || "-"), 1)
5519
+ c("div", zi, [
5520
+ c("span", Ti, W(i.formattedValue(n == null ? void 0 : n[(l = r.columns) == null ? void 0 : l[1]]) || "-"), 1)
5486
5521
  ])
5487
5522
  ]);
5488
5523
  }), 256))
@@ -5491,10 +5526,10 @@ function zi(s, e, t, a, r, i) {
5491
5526
  ])
5492
5527
  ]);
5493
5528
  }
5494
- const Ti = /* @__PURE__ */ Q(fi, [["render", zi]]), Ii = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5529
+ const Si = /* @__PURE__ */ Q(mi, [["render", Ii]]), Ri = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5495
5530
  __proto__: null,
5496
- default: Ti
5497
- }, Symbol.toStringTag, { value: "Module" })), Si = {
5531
+ default: Si
5532
+ }, Symbol.toStringTag, { value: "Module" })), Vi = {
5498
5533
  name: "VsProgressBar",
5499
5534
  mixins: [pe],
5500
5535
  data() {
@@ -5521,28 +5556,28 @@ const Ti = /* @__PURE__ */ Q(fi, [["render", zi]]), Ii = /* @__PURE__ */ Object.
5521
5556
  this.maxValue = Math.max(...s);
5522
5557
  },
5523
5558
  formattedValue(s) {
5524
- return ce(s);
5559
+ return de(s);
5525
5560
  }
5526
5561
  }
5527
- }, Ri = {
5562
+ }, Li = {
5528
5563
  key: 0,
5529
5564
  class: "flex flex-col h-full pt-[16px] rounded-xl"
5530
- }, Li = { class: "h-full pt-0 pb-6 space-y-4" }, Vi = { class: "h-full space-y-4 custom-scrollbar" }, Wi = { class: "flex items-center justify-between mr-2 gap-x-2" }, Ni = { class: "grid items-center w-full grid-cols-2 gap-x-2" }, Ei = { class: "text-sm text-gray-800" }, ji = {
5565
+ }, Wi = { class: "h-full pt-0 pb-6 space-y-4" }, Ni = { class: "h-full space-y-4 custom-scrollbar" }, Ei = { class: "flex items-center justify-between mr-2 gap-x-2" }, ji = { class: "grid items-center w-full grid-cols-2 gap-x-2" }, Bi = { class: "text-sm text-gray-800" }, Oi = {
5531
5566
  class: "flex justify-end",
5532
5567
  role: "progressbar",
5533
5568
  "aria-valuenow": "100",
5534
5569
  "aria-valuemin": "0",
5535
5570
  "aria-valuemax": "100"
5536
- }, Bi = { class: "min-w-[60px] text-end" }, Oi = { class: "text-sm text-gray-500" };
5537
- function Pi(s, e, t, a, r, i) {
5538
- return r.columns ? (p(), y("div", Ri, [
5539
- h("div", Li, [
5540
- h("ul", Vi, [
5541
- (p(!0), y(U, null, Z(s.sourceData, (n, o) => (p(), y("li", Wi, [
5542
- h("div", Ni, [
5543
- h("span", Ei, W(n[r.columns[0]]), 1),
5544
- h("div", ji, [
5545
- h("div", {
5571
+ }, Pi = { class: "min-w-[60px] text-end" }, Ai = { class: "text-sm text-gray-500" };
5572
+ function Fi(s, e, t, a, r, i) {
5573
+ return r.columns ? (h(), x("div", Li, [
5574
+ c("div", Wi, [
5575
+ c("ul", Ni, [
5576
+ (h(!0), x(U, null, Z(s.sourceData, (n, o) => (h(), x("li", Ei, [
5577
+ c("div", ji, [
5578
+ c("span", Bi, W(n[r.columns[0]]), 1),
5579
+ c("div", Oi, [
5580
+ c("div", {
5546
5581
  class: "h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",
5547
5582
  style: Ge({
5548
5583
  width: `${parseFloat(n[r.columns[1]]) / r.maxValue * 100}%`
@@ -5550,18 +5585,18 @@ function Pi(s, e, t, a, r, i) {
5550
5585
  }, null, 4)
5551
5586
  ])
5552
5587
  ]),
5553
- h("div", Bi, [
5554
- h("span", Oi, W(i.formattedValue(n[r.columns[1]])), 1)
5588
+ c("div", Pi, [
5589
+ c("span", Ai, W(i.formattedValue(n[r.columns[1]])), 1)
5555
5590
  ])
5556
5591
  ]))), 256))
5557
5592
  ])
5558
5593
  ])
5559
5594
  ])) : A("", !0);
5560
5595
  }
5561
- const Ai = /* @__PURE__ */ Q(Si, [["render", Pi]]), Fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5596
+ const qi = /* @__PURE__ */ Q(Vi, [["render", Fi]]), Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5562
5597
  __proto__: null,
5563
- default: Ai
5564
- }, Symbol.toStringTag, { value: "Module" })), qi = {
5598
+ default: qi
5599
+ }, Symbol.toStringTag, { value: "Module" })), Ui = {
5565
5600
  name: "VsListbar",
5566
5601
  mixins: [pe],
5567
5602
  props: ["source"],
@@ -5593,44 +5628,44 @@ const Ai = /* @__PURE__ */ Q(Si, [["render", Pi]]), Fi = /* @__PURE__ */ Object.
5593
5628
  this.maxValue = Math.max(...s || []), this.restDimensions = (a = this.columns) == null ? void 0 : a.filter((r, i) => i !== 0);
5594
5629
  },
5595
5630
  formattedValue(s) {
5596
- return ce(s);
5631
+ return de(s);
5597
5632
  },
5598
5633
  getWidth(s) {
5599
5634
  return `${s / this.maxValue * 100}%`;
5600
5635
  }
5601
5636
  }
5602
- }, Mi = { class: "h-full pt-[20px] list-bar" }, Ui = { class: "space-y-2 custom-scrollbar h-full h-[calc(100%-20px)]" }, Gi = { class: "relative w-full truncate" }, Hi = { class: "relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800" }, Zi = { class: "text-[14px] text-gray-500" };
5603
- function Qi(s, e, t, a, r, i) {
5604
- return p(), y("div", Mi, [
5605
- h("ul", Ui, [
5606
- (p(!0), y(U, null, Z(s.sourceData, (n, o) => {
5607
- var l, c, u;
5608
- return p(), y("li", {
5637
+ }, Gi = { class: "h-full pt-[20px] list-bar" }, Hi = { class: "space-y-2 custom-scrollbar h-[calc(100%-40px)]" }, Zi = { class: "relative w-full truncate" }, Qi = { class: "relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800" }, Xi = { class: "text-[14px] text-gray-500" };
5638
+ function Yi(s, e, t, a, r, i) {
5639
+ return h(), x("div", Gi, [
5640
+ c("ul", Hi, [
5641
+ (h(!0), x(U, null, Z(s.sourceData, (n, o) => {
5642
+ var l, d, u;
5643
+ return h(), x("li", {
5609
5644
  key: o,
5610
5645
  class: "flex items-center justify-between w-full gap-x-2"
5611
5646
  }, [
5612
- h("div", Gi, [
5613
- h("span", Hi, W((n == null ? void 0 : n[(l = r.columns) == null ? void 0 : l[0]]) || "Без категорії"), 1),
5614
- h("div", {
5615
- class: ee(["absolute inset-y-0 h-full rounded start-0", n != null && n[(c = r.columns) == null ? void 0 : c[0]] ? "bg-indigo-100" : "bg-gray-100"]),
5647
+ c("div", Zi, [
5648
+ c("span", Qi, W((n == null ? void 0 : n[(l = r.columns) == null ? void 0 : l[0]]) || "Без категорії"), 1),
5649
+ c("div", {
5650
+ class: se(["absolute inset-y-0 h-full rounded start-0", n != null && n[(d = r.columns) == null ? void 0 : d[0]] ? "bg-indigo-100" : "bg-gray-100"]),
5616
5651
  style: Ge({ width: i.getWidth(n == null ? void 0 : n[(u = r.columns) == null ? void 0 : u[1]]) })
5617
5652
  }, null, 6)
5618
5653
  ]),
5619
- (p(!0), y(U, null, Z(r.restDimensions, (f, v) => (p(), y("div", {
5654
+ (h(!0), x(U, null, Z(r.restDimensions, (p, v) => (h(), x("div", {
5620
5655
  key: v,
5621
5656
  class: "w-20 mr-2 text-end"
5622
5657
  }, [
5623
- h("span", Zi, W(i.formattedValue(n == null ? void 0 : n[f])), 1)
5658
+ c("span", Xi, W(i.formattedValue(n == null ? void 0 : n[p])), 1)
5624
5659
  ]))), 128))
5625
5660
  ]);
5626
5661
  }), 128))
5627
5662
  ])
5628
5663
  ]);
5629
5664
  }
5630
- const Xi = /* @__PURE__ */ Q(qi, [["render", Qi]]), Yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5665
+ const Ji = /* @__PURE__ */ Q(Ui, [["render", Yi]]), Ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5631
5666
  __proto__: null,
5632
- default: Xi
5633
- }, Symbol.toStringTag, { value: "Module" })), Ji = {
5667
+ default: Ji
5668
+ }, Symbol.toStringTag, { value: "Module" })), eo = {
5634
5669
  name: "VsPivotTable",
5635
5670
  mixins: [pe],
5636
5671
  data() {
@@ -5655,46 +5690,46 @@ const Xi = /* @__PURE__ */ Q(qi, [["render", Qi]]), Yi = /* @__PURE__ */ Object.
5655
5690
  const s = Array.from(
5656
5691
  new Set(this.sourceData.map((e) => e[this.dimensions[0]]))
5657
5692
  );
5658
- this.dimensions[0].includes("date") ? this.xs = s.map((e) => lt(e)) : this.xs = [...s], this.products = this.dimensions.filter((e, t) => t != 0), this.values = this.products.map((e, t) => ({
5693
+ this.dimensions[0].includes("date") ? this.xs = s.map((e) => dt(e)) : this.xs = [...s], this.products = this.dimensions.filter((e, t) => t != 0), this.values = this.products.map((e, t) => ({
5659
5694
  name: e,
5660
- data: this.sourceData.filter((a) => parseFloat(a[e])).map((a) => ce(parseFloat(a[e])))
5695
+ data: this.sourceData.filter((a) => parseFloat(a[e])).map((a) => de(parseFloat(a[e])))
5661
5696
  }));
5662
5697
  } catch (s) {
5663
5698
  console.error(s);
5664
5699
  }
5665
5700
  }
5666
5701
  }
5667
- }, Ki = { class: "flex flex-col h-full p-5 space-y-4 rounded-xl custom-scrollbar" }, eo = { class: "overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 custom-scrollbar" }, to = { class: "inline-block min-w-full align-middle" }, so = { class: "min-w-full divide-y divide-gray-200" }, ao = { class: "space-x-2" }, ro = {
5702
+ }, to = { class: "flex flex-col h-full p-5 space-y-4 rounded-xl custom-scrollbar" }, so = { class: "overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 custom-scrollbar" }, ao = { class: "inline-block min-w-full align-middle" }, ro = { class: "min-w-full divide-y divide-gray-200" }, no = { class: "space-x-2" }, io = {
5668
5703
  scope: "col",
5669
5704
  class: "xl:min-w-[120px] min-w-48"
5670
- }, no = { class: "py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500" }, io = { class: "divide-y divide-gray-200 text-[12px]" }, oo = { class: "py-3 size-px whitespace-nowrap" }, lo = { class: "flex items-center gap-x-3" }, co = { class: "font-medium text-gray-800" }, uo = { class: "py-3 size-px whitespace-nowrap" }, ho = { class: "text-gray-600" };
5671
- function po(s, e, t, a, r, i) {
5672
- return p(), y("div", Ki, [
5673
- h("div", eo, [
5674
- h("div", to, [
5675
- h("table", so, [
5676
- h("thead", null, [
5677
- h("tr", ao, [
5678
- e[0] || (e[0] = h("th", {
5705
+ }, oo = { class: "py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500" }, lo = { class: "divide-y divide-gray-200 text-[12px]" }, co = { class: "py-3 size-px whitespace-nowrap" }, uo = { class: "flex items-center gap-x-3" }, ho = { class: "font-medium text-gray-800" }, po = { class: "py-3 size-px whitespace-nowrap" }, fo = { class: "text-gray-600" };
5706
+ function go(s, e, t, a, r, i) {
5707
+ return h(), x("div", to, [
5708
+ c("div", so, [
5709
+ c("div", ao, [
5710
+ c("table", ro, [
5711
+ c("thead", null, [
5712
+ c("tr", no, [
5713
+ e[0] || (e[0] = c("th", {
5679
5714
  scope: "col",
5680
5715
  class: "min-w-[200px]"
5681
5716
  }, [
5682
- h("div", { class: "py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500" })
5717
+ c("div", { class: "py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500" })
5683
5718
  ], -1)),
5684
- (p(!0), y(U, null, Z(r.xs, (n) => (p(), y("th", ro, [
5685
- h("div", no, W(n), 1)
5719
+ (h(!0), x(U, null, Z(r.xs, (n) => (h(), x("th", io, [
5720
+ c("div", oo, W(n), 1)
5686
5721
  ]))), 256))
5687
5722
  ])
5688
5723
  ]),
5689
- (p(!0), y(U, null, Z(r.values, (n) => (p(), y("tbody", io, [
5690
- h("tr", null, [
5691
- h("td", oo, [
5692
- h("div", lo, [
5693
- h("span", co, W(n.name), 1)
5724
+ (h(!0), x(U, null, Z(r.values, (n) => (h(), x("tbody", lo, [
5725
+ c("tr", null, [
5726
+ c("td", co, [
5727
+ c("div", uo, [
5728
+ c("span", ho, W(n.name), 1)
5694
5729
  ])
5695
5730
  ]),
5696
- (p(!0), y(U, null, Z(r.xs, (o, l) => (p(), y("td", uo, [
5697
- h("span", ho, W(n.data[l]), 1)
5731
+ (h(!0), x(U, null, Z(r.xs, (o, l) => (h(), x("td", po, [
5732
+ c("span", fo, W(n.data[l]), 1)
5698
5733
  ]))), 256))
5699
5734
  ])
5700
5735
  ]))), 256))
@@ -5703,36 +5738,36 @@ function po(s, e, t, a, r, i) {
5703
5738
  ])
5704
5739
  ]);
5705
5740
  }
5706
- const fo = /* @__PURE__ */ Q(Ji, [["render", po]]), go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5741
+ const mo = /* @__PURE__ */ Q(eo, [["render", go]]), bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5707
5742
  __proto__: null,
5708
- default: fo
5743
+ default: mo
5709
5744
  }, Symbol.toStringTag, { value: "Module" }));
5710
5745
  export {
5711
- Y as R,
5712
- Ta as U,
5713
- Yn as V,
5714
- Es as X,
5746
+ J as R,
5747
+ Ia as U,
5748
+ Kn as V,
5749
+ Bs as X,
5715
5750
  Q as _,
5716
- Ve as a,
5717
- lt as b,
5751
+ Le as a,
5752
+ dt as b,
5718
5753
  pe as c,
5719
- ce as d,
5720
- se as e,
5721
- vo as f,
5754
+ de as d,
5755
+ ee as e,
5756
+ $o as f,
5722
5757
  H as g,
5723
- Hr as h,
5724
- Gr as i,
5725
- Mn as j,
5726
- wn as k,
5727
- wo as l,
5758
+ Zr as h,
5759
+ Hr as i,
5760
+ Gn as j,
5761
+ vn as k,
5762
+ ko as l,
5728
5763
  B as m,
5729
- oi as n,
5730
- hi as o,
5731
- Ti as p,
5732
- Ai as q,
5733
- Xi as r,
5734
- fo as s,
5735
- yo as t,
5764
+ di as n,
5765
+ fi as o,
5766
+ Si as p,
5767
+ qi as q,
5768
+ Ji as r,
5769
+ mo as s,
5770
+ vo as t,
5736
5771
  Oe as u,
5737
- si as v
5772
+ ri as v
5738
5773
  };