@opengis/widgets 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- import { h as Y, defineComponent as C, mergeModels as J, useModel as se, ref as w, createElementBlock as a, openBlock as o, createElementVNode as t, createVNode as b, unref as y, withDirectives as O, vModelText as ve, createCommentVNode as x, createTextVNode as V, onMounted as oe, onUnmounted as ne, resolveComponent as ee, normalizeClass as _, createBlock as D, toDisplayString as v, Fragment as z, renderList as F, normalizeStyle as E, resolveDynamicComponent as S, withModifiers as G, computed as A, Teleport as ye, TransitionGroup as $e, withCtx as Ce, nextTick as Me, renderSlot as U, mergeProps as te, vShow as Le, vModelRadio as Q, vModelCheckbox as De } from "vue";
1
+ import { h as Y, defineComponent as I, mergeModels as J, useModel as le, ref as M, createElementBlock as r, openBlock as a, createElementVNode as e, createVNode as w, unref as _, withDirectives as U, vModelText as ye, createCommentVNode as $, createTextVNode as H, onMounted as re, onUnmounted as de, resolveComponent as ee, normalizeClass as D, createBlock as j, toDisplayString as k, Fragment as A, renderList as S, normalizeStyle as R, resolveDynamicComponent as N, withModifiers as K, computed as O, Teleport as be, TransitionGroup as Me, withCtx as Le, nextTick as De, renderSlot as G, vModelRadio as Q, vModelCheckbox as Te, mergeProps as te, vShow as Ie } from "vue";
2
2
  /**
3
3
  * @license lucide-vue-next v0.535.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
7
  */
8
- const re = (l) => l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Te = (l) => l.replace(
8
+ const me = (l) => l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ze = (l) => l.replace(
9
9
  /^([A-Z])|[\s-_]+(\w)/g,
10
- (i, n, e) => e ? e.toUpperCase() : n.toLowerCase()
10
+ (i, n, t) => t ? t.toUpperCase() : n.toLowerCase()
11
11
  ), je = (l) => {
12
- const i = Te(l);
12
+ const i = ze(l);
13
13
  return i.charAt(0).toUpperCase() + i.slice(1);
14
- }, Ie = (...l) => l.filter((i, n, e) => !!i && i.trim() !== "" && e.indexOf(i) === n).join(" ").trim();
14
+ }, Ve = (...l) => l.filter((i, n, t) => !!i && i.trim() !== "" && t.indexOf(i) === n).join(" ").trim();
15
15
  /**
16
16
  * @license lucide-vue-next v0.535.0 - ISC
17
17
  *
@@ -35,21 +35,21 @@ var Z = {
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
37
  */
38
- const Ve = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: e, iconNode: s, name: f, class: p, ...g }, { slots: u }) => Y(
38
+ const Fe = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: t, iconNode: s, name: f, class: o, ...m }, { slots: v }) => Y(
39
39
  "svg",
40
40
  {
41
41
  ...Z,
42
42
  width: l || Z.width,
43
43
  height: l || Z.height,
44
- stroke: e || Z.stroke,
44
+ stroke: t || Z.stroke,
45
45
  "stroke-width": n ? Number(i) * 24 / Number(l) : i,
46
- class: Ie(
46
+ class: Ve(
47
47
  "lucide",
48
- ...f ? [`lucide-${re(je(f))}-icon`, `lucide-${re(f)}`] : ["lucide-icon"]
48
+ ...f ? [`lucide-${me(je(f))}-icon`, `lucide-${me(f)}`] : ["lucide-icon"]
49
49
  ),
50
- ...g
50
+ ...m
51
51
  },
52
- [...s.map((m) => Y(...m)), ...u.default ? [u.default()] : []]
52
+ [...s.map((g) => Y(...g)), ...v.default ? [v.default()] : []]
53
53
  );
54
54
  /**
55
55
  * @license lucide-vue-next v0.535.0 - ISC
@@ -57,14 +57,14 @@ const Ve = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: e, ico
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
59
  */
60
- const $ = (l, i) => (n, { slots: e }) => Y(
61
- Ve,
60
+ const T = (l, i) => (n, { slots: t }) => Y(
61
+ Fe,
62
62
  {
63
63
  ...n,
64
64
  iconNode: i,
65
65
  name: l
66
66
  },
67
- e
67
+ t
68
68
  );
69
69
  /**
70
70
  * @license lucide-vue-next v0.535.0 - ISC
@@ -72,7 +72,7 @@ const $ = (l, i) => (n, { slots: e }) => Y(
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
74
  */
75
- const ze = $("archive", [
75
+ const He = T("archive", [
76
76
  ["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
77
77
  ["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
78
78
  ["path", { d: "M10 12h4", key: "a56b0p" }]
@@ -83,7 +83,7 @@ const ze = $("archive", [
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
85
  */
86
- const Fe = $("arrow-right", [
86
+ const Ae = T("arrow-right", [
87
87
  ["path", { d: "M5 12h14", key: "1ays0h" }],
88
88
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
89
89
  ]);
@@ -93,7 +93,7 @@ const Fe = $("arrow-right", [
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
95
  */
96
- const Ae = $("circle-check-big", [
96
+ const Se = T("circle-check-big", [
97
97
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
98
98
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
99
99
  ]);
@@ -103,7 +103,7 @@ const Ae = $("circle-check-big", [
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
105
  */
106
- const ie = $("download", [
106
+ const ce = T("download", [
107
107
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
108
108
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
109
109
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
@@ -114,7 +114,7 @@ const ie = $("download", [
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
116
  */
117
- const He = $("ellipsis", [
117
+ const Ee = T("ellipsis", [
118
118
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
119
119
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
120
120
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
@@ -125,7 +125,7 @@ const He = $("ellipsis", [
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
127
  */
128
- const W = $("file-text", [
128
+ const q = T("file-text", [
129
129
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
130
130
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
131
131
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
@@ -138,7 +138,7 @@ const W = $("file-text", [
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
140
  */
141
- const Se = $("file", [
141
+ const Oe = T("file", [
142
142
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
143
143
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
144
144
  ]);
@@ -148,7 +148,7 @@ const Se = $("file", [
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
150
  */
151
- const Ee = $("grid-3x3", [
151
+ const Be = T("grid-3x3", [
152
152
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
153
153
  ["path", { d: "M3 9h18", key: "1pudct" }],
154
154
  ["path", { d: "M3 15h18", key: "5xshup" }],
@@ -161,7 +161,7 @@ const Ee = $("grid-3x3", [
161
161
  * This source code is licensed under the ISC license.
162
162
  * See the LICENSE file in the root directory of this source tree.
163
163
  */
164
- const Oe = $("heart", [
164
+ const Ne = T("heart", [
165
165
  [
166
166
  "path",
167
167
  {
@@ -176,7 +176,7 @@ const Oe = $("heart", [
176
176
  * This source code is licensed under the ISC license.
177
177
  * See the LICENSE file in the root directory of this source tree.
178
178
  */
179
- const Be = $("history", [
179
+ const Re = T("history", [
180
180
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
181
181
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
182
182
  ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
@@ -187,7 +187,7 @@ const Be = $("history", [
187
187
  * This source code is licensed under the ISC license.
188
188
  * See the LICENSE file in the root directory of this source tree.
189
189
  */
190
- const de = $("image", [
190
+ const ge = T("image", [
191
191
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
192
192
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
193
193
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
@@ -198,7 +198,7 @@ const de = $("image", [
198
198
  * This source code is licensed under the ISC license.
199
199
  * See the LICENSE file in the root directory of this source tree.
200
200
  */
201
- const Re = $("list", [
201
+ const Ue = T("list", [
202
202
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
203
203
  ["path", { d: "M3 18h.01", key: "1tta3j" }],
204
204
  ["path", { d: "M3 6h.01", key: "1rqtza" }],
@@ -212,7 +212,7 @@ const Re = $("list", [
212
212
  * This source code is licensed under the ISC license.
213
213
  * See the LICENSE file in the root directory of this source tree.
214
214
  */
215
- const Ne = $("plus", [
215
+ const Pe = T("plus", [
216
216
  ["path", { d: "M5 12h14", key: "1ays0h" }],
217
217
  ["path", { d: "M12 5v14", key: "s699le" }]
218
218
  ]);
@@ -222,7 +222,7 @@ const Ne = $("plus", [
222
222
  * This source code is licensed under the ISC license.
223
223
  * See the LICENSE file in the root directory of this source tree.
224
224
  */
225
- const Ue = $("reply", [
225
+ const We = T("reply", [
226
226
  ["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4", key: "5vmcpk" }],
227
227
  ["path", { d: "m9 17-5-5 5-5", key: "nvlc11" }]
228
228
  ]);
@@ -232,7 +232,7 @@ const Ue = $("reply", [
232
232
  * This source code is licensed under the ISC license.
233
233
  * See the LICENSE file in the root directory of this source tree.
234
234
  */
235
- const be = $("send", [
235
+ const xe = T("send", [
236
236
  [
237
237
  "path",
238
238
  {
@@ -248,7 +248,7 @@ const be = $("send", [
248
248
  * This source code is licensed under the ISC license.
249
249
  * See the LICENSE file in the root directory of this source tree.
250
250
  */
251
- const We = $("share", [
251
+ const Ge = T("share", [
252
252
  ["path", { d: "M12 2v13", key: "1km8f5" }],
253
253
  ["path", { d: "m16 6-4-4-4 4", key: "13yo43" }],
254
254
  ["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }]
@@ -259,7 +259,7 @@ const We = $("share", [
259
259
  * This source code is licensed under the ISC license.
260
260
  * See the LICENSE file in the root directory of this source tree.
261
261
  */
262
- const Ge = $("sheet", [
262
+ const qe = T("sheet", [
263
263
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
264
264
  ["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }],
265
265
  ["line", { x1: "3", x2: "21", y1: "15", y2: "15", key: "o2sbyz" }],
@@ -272,7 +272,7 @@ const Ge = $("sheet", [
272
272
  * This source code is licensed under the ISC license.
273
273
  * See the LICENSE file in the root directory of this source tree.
274
274
  */
275
- const qe = $("square-pen", [
275
+ const Ke = T("square-pen", [
276
276
  ["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
277
277
  [
278
278
  "path",
@@ -288,7 +288,7 @@ const qe = $("square-pen", [
288
288
  * This source code is licensed under the ISC license.
289
289
  * See the LICENSE file in the root directory of this source tree.
290
290
  */
291
- const le = $("trash-2", [
291
+ const ue = T("trash-2", [
292
292
  ["path", { d: "M10 11v6", key: "nco0om" }],
293
293
  ["path", { d: "M14 11v6", key: "outv1u" }],
294
294
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
@@ -301,7 +301,7 @@ const le = $("trash-2", [
301
301
  * This source code is licensed under the ISC license.
302
302
  * See the LICENSE file in the root directory of this source tree.
303
303
  */
304
- const Pe = $("user-check", [
304
+ const Ze = T("user-check", [
305
305
  ["path", { d: "m16 11 2 2 4-4", key: "9rsbq5" }],
306
306
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
307
307
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
@@ -312,7 +312,7 @@ const Pe = $("user-check", [
312
312
  * This source code is licensed under the ISC license.
313
313
  * See the LICENSE file in the root directory of this source tree.
314
314
  */
315
- const ae = $("user", [
315
+ const pe = T("user", [
316
316
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
317
317
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
318
318
  ]);
@@ -322,7 +322,7 @@ const ae = $("user", [
322
322
  * This source code is licensed under the ISC license.
323
323
  * See the LICENSE file in the root directory of this source tree.
324
324
  */
325
- const Ke = $("video", [
325
+ const Je = T("video", [
326
326
  [
327
327
  "path",
328
328
  {
@@ -338,10 +338,10 @@ const Ke = $("video", [
338
338
  * This source code is licensed under the ISC license.
339
339
  * See the LICENSE file in the root directory of this source tree.
340
340
  */
341
- const X = $("x", [
341
+ const X = T("x", [
342
342
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
343
343
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
344
- ]), Ze = { class: "border-t pt-3 mt-4" }, Je = { class: "flex gap-2" }, Xe = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Qe = { class: "flex-1 space-y-2" }, Ye = { class: "flex justify-between items-center" }, et = { class: "flex gap-2" }, tt = ["disabled"], xe = /* @__PURE__ */ C({
344
+ ]), Xe = { class: "border-t pt-3 mt-4" }, Qe = { class: "flex gap-2" }, Ye = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, et = { class: "flex-1 space-y-2" }, tt = { class: "flex justify-between items-center" }, st = { class: "flex gap-2" }, ot = ["disabled"], ke = /* @__PURE__ */ I({
345
345
  __name: "CommentInputZone",
346
346
  props: {
347
347
  isReply: { type: Boolean, required: !1, default: !1 },
@@ -349,51 +349,51 @@ const X = $("x", [
349
349
  },
350
350
  emits: /* @__PURE__ */ J(["sendComment"], ["update:isReply"]),
351
351
  setup(l, { emit: i }) {
352
- const n = se(l, "isReply"), e = w(""), s = i, f = () => {
353
- e.value.trim() && (s("sendComment", e.value), e.value = "");
354
- }, p = (g) => {
355
- (g.ctrlKey || g.metaKey) && g.key === "Enter" && (g.preventDefault(), f());
352
+ const n = le(l, "isReply"), t = M(""), s = i, f = () => {
353
+ t.value.trim() && (s("sendComment", t.value), t.value = "");
354
+ }, o = (m) => {
355
+ (m.ctrlKey || m.metaKey) && m.key === "Enter" && (m.preventDefault(), f());
356
356
  };
357
- return (g, u) => (o(), a("div", Ze, [
358
- t("div", Je, [
359
- t("span", Xe, [
360
- b(y(ae), { class: "h-3 w-3 text-gray-500" })
357
+ return (m, v) => (a(), r("div", Xe, [
358
+ e("div", Qe, [
359
+ e("span", Ye, [
360
+ w(_(pe), { class: "h-3 w-3 text-gray-500" })
361
361
  ]),
362
- t("div", Qe, [
363
- O(t("textarea", {
364
- "onUpdate:modelValue": u[0] || (u[0] = (m) => e.value = m),
365
- onKeydown: p,
362
+ e("div", et, [
363
+ U(e("textarea", {
364
+ "onUpdate:modelValue": v[0] || (v[0] = (g) => t.value = g),
365
+ onKeydown: o,
366
366
  placeholder: "Add a comment...",
367
367
  class: "w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"
368
368
  }, null, 544), [
369
- [ve, e.value]
369
+ [ye, t.value]
370
370
  ]),
371
- t("div", Ye, [
372
- u[4] || (u[4] = t("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
373
- t("div", et, [
374
- n.value ? (o(), a("button", {
371
+ e("div", tt, [
372
+ v[4] || (v[4] = e("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
373
+ e("div", st, [
374
+ n.value ? (a(), r("button", {
375
375
  key: 0,
376
376
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
377
- onClick: u[1] || (u[1] = (m) => n.value = !1)
377
+ onClick: v[1] || (v[1] = (g) => n.value = !1)
378
378
  }, [
379
- b(y(X), { class: "h-3 w-3" }),
380
- u[2] || (u[2] = V(" Cancel ", -1))
381
- ])) : x("", !0),
382
- t("button", {
379
+ w(_(X), { class: "h-3 w-3" }),
380
+ v[2] || (v[2] = H(" Cancel ", -1))
381
+ ])) : $("", !0),
382
+ e("button", {
383
383
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
384
- disabled: !e.value.trim(),
384
+ disabled: !t.value.trim(),
385
385
  onClick: f
386
386
  }, [
387
- b(y(be), { class: "h-3 w-3 mr-1" }),
388
- u[3] || (u[3] = V(" Send ", -1))
389
- ], 8, tt)
387
+ w(_(xe), { class: "h-3 w-3 mr-1" }),
388
+ v[3] || (v[3] = H(" Send ", -1))
389
+ ], 8, ot)
390
390
  ])
391
391
  ])
392
392
  ])
393
393
  ])
394
394
  ]));
395
395
  }
396
- }), st = { class: "z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto" }, ot = /* @__PURE__ */ C({
396
+ }), nt = { class: "z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto" }, it = /* @__PURE__ */ I({
397
397
  __name: "CommentDetails",
398
398
  props: {
399
399
  showMoreOptions: { type: Boolean, required: !0, default: !1 },
@@ -401,50 +401,50 @@ const X = $("x", [
401
401
  },
402
402
  emits: /* @__PURE__ */ J(["edit", "delete"], ["update:showMoreOptions"]),
403
403
  setup(l, { emit: i }) {
404
- const n = i, e = se(l, "showMoreOptions"), s = w(), f = w(!0), p = async (m) => {
405
- e.value && s.value && !s.value.contains(m.target) && !f.value && (e.value = !1), f.value = !1;
406
- }, g = () => {
407
- e.value = !1, n("edit");
408
- }, u = () => {
409
- e.value = !1, n("delete");
404
+ const n = i, t = le(l, "showMoreOptions"), s = M(), f = M(!0), o = async (g) => {
405
+ t.value && s.value && !s.value.contains(g.target) && !f.value && (t.value = !1), f.value = !1;
406
+ }, m = () => {
407
+ t.value = !1, n("edit");
408
+ }, v = () => {
409
+ t.value = !1, n("delete");
410
410
  };
411
- return oe(() => {
412
- document.addEventListener("click", p);
413
- }), ne(() => {
414
- document.removeEventListener("click", p);
415
- }), (m, r) => (o(), a("div", {
411
+ return re(() => {
412
+ document.addEventListener("click", o);
413
+ }), de(() => {
414
+ document.removeEventListener("click", o);
415
+ }), (g, d) => (a(), r("div", {
416
416
  class: "absolute bg-white left-0 top-full transform min-w-max z-50",
417
417
  ref_key: "moreOptionsRef",
418
418
  ref: s
419
419
  }, [
420
- t("div", st, [
421
- t("div", {
420
+ e("div", nt, [
421
+ e("div", {
422
422
  class: "relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",
423
- onClick: g
423
+ onClick: m
424
424
  }, [
425
- b(y(qe), { class: "h-3 w-3 mr-2" }),
426
- r[0] || (r[0] = V(" Edit ", -1))
425
+ w(_(Ke), { class: "h-3 w-3 mr-2" }),
426
+ d[0] || (d[0] = H(" Edit ", -1))
427
427
  ]),
428
- t("div", {
428
+ e("div", {
429
429
  class: "relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",
430
- onClick: u
430
+ onClick: v
431
431
  }, [
432
- b(y(le), { class: "h-3 w-3 mr-2" }),
433
- r[1] || (r[1] = V(" Delete ", -1))
432
+ w(_(ue), { class: "h-3 w-3 mr-2" }),
433
+ d[1] || (d[1] = H(" Delete ", -1))
434
434
  ])
435
435
  ])
436
436
  ], 512));
437
437
  }
438
- }), nt = { class: "space-y-2" }, it = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, lt = { class: "flex-1 min-w-0 space-y-1 relative" }, at = { class: "flex items-center gap-2" }, rt = { class: "font-medium text-xs" }, dt = { class: "text-xs text-gray-500" }, ct = {
438
+ }), at = { class: "space-y-2" }, lt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, rt = { class: "flex-1 min-w-0 space-y-1 relative" }, dt = { class: "flex items-center gap-2" }, ct = { class: "font-medium text-xs" }, ut = { class: "text-xs text-gray-500" }, pt = {
439
439
  key: 0,
440
440
  class: "text-xs text-gray-700 leading-relaxed"
441
- }, ut = { class: "flex justify-between text-xs" }, pt = { class: "flex items-center gap-2" }, mt = {
441
+ }, mt = { class: "flex justify-between text-xs" }, gt = { class: "flex items-center gap-2" }, ht = {
442
442
  key: 0,
443
443
  class: "flex gap-2"
444
- }, gt = ["disabled"], ht = {
444
+ }, ft = ["disabled"], vt = {
445
445
  key: 0,
446
446
  class: "ml-8 space-y-1 border-l-2 border-gray-100 pl-3"
447
- }, ft = /* @__PURE__ */ C({
447
+ }, yt = /* @__PURE__ */ I({
448
448
  __name: "CommentItem",
449
449
  props: {
450
450
  comment: {},
@@ -452,120 +452,120 @@ const X = $("x", [
452
452
  },
453
453
  emits: ["like", "reply", "edit", "delete"],
454
454
  setup(l, { emit: i }) {
455
- const n = i, e = l, s = w(e.comment.text), f = w("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), p = w("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"), g = w(!1), u = w(!1), m = w(!1), r = w(!1), h = (d) => {
456
- const c = /* @__PURE__ */ new Date(), T = Math.floor(
457
- (c.getTime() - d.getTime()) / (1e3 * 60 * 60)
455
+ const n = i, t = l, s = M(t.comment.text), f = M("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), o = M("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"), m = M(!1), v = M(!1), g = M(!1), d = M(!1), y = (c) => {
456
+ const h = /* @__PURE__ */ new Date(), F = Math.floor(
457
+ (h.getTime() - c.getTime()) / (1e3 * 60 * 60)
458
458
  );
459
- return T < 1 ? `${Math.floor(
460
- (c.getTime() - d.getTime()) / 6e4
461
- )}m` : T < 24 ? `${T}h` : `${Math.floor(T / 24)}d`;
462
- }, I = () => {
463
- r.value = !r.value, r.value ? n("like", e.comment.id, "add") : n("like", e.comment.id, "delete");
464
- }, H = () => {
465
- n("edit", e.comment.id, s.value), m.value = !1;
466
- }, R = (d, c) => {
467
- n("like", d, c);
468
- }, M = (d, c) => {
469
- n("edit", d, c);
459
+ return F < 1 ? `${Math.floor(
460
+ (h.getTime() - c.getTime()) / 6e4
461
+ )}m` : F < 24 ? `${F}h` : `${Math.floor(F / 24)}d`;
462
+ }, p = () => {
463
+ d.value = !d.value, d.value ? n("like", t.comment.id, "add") : n("like", t.comment.id, "delete");
464
+ }, b = () => {
465
+ n("edit", t.comment.id, s.value), g.value = !1;
466
+ }, W = (c, h) => {
467
+ n("like", c, h);
468
+ }, V = (c, h) => {
469
+ n("edit", c, h);
470
470
  };
471
- return (d, c) => {
472
- const T = ee("CommentItem", !0);
473
- return o(), a("div", nt, [
474
- t("div", {
475
- class: _(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", m.value ? "bg-gray-50" : ""])
471
+ return (c, h) => {
472
+ const F = ee("CommentItem", !0);
473
+ return a(), r("div", at, [
474
+ e("div", {
475
+ class: D(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", g.value ? "bg-gray-50" : ""])
476
476
  }, [
477
- t("span", it, [
478
- b(y(ae), { class: "h-3 w-3 text-gray-500" })
477
+ e("span", lt, [
478
+ w(_(pe), { class: "h-3 w-3 text-gray-500" })
479
479
  ]),
480
- t("div", lt, [
481
- t("div", at, [
482
- t("span", rt, v(d.comment?.author), 1),
483
- t("span", dt, v(h(d.comment?.createdAt)), 1)
480
+ e("div", rt, [
481
+ e("div", dt, [
482
+ e("span", ct, k(c.comment?.author), 1),
483
+ e("span", ut, k(y(c.comment?.createdAt)), 1)
484
484
  ]),
485
- m.value ? O((o(), a("textarea", {
485
+ g.value ? U((a(), r("textarea", {
486
486
  key: 1,
487
- "onUpdate:modelValue": c[0] || (c[0] = (k) => s.value = k),
488
- class: _(m.value ? p.value : f.value)
487
+ "onUpdate:modelValue": h[0] || (h[0] = (C) => s.value = C),
488
+ class: D(g.value ? o.value : f.value)
489
489
  }, null, 2)), [
490
- [ve, s.value]
491
- ]) : (o(), a("p", ct, v(d.comment?.text), 1)),
492
- t("div", ut, [
493
- t("div", pt, [
494
- t("button", {
495
- class: _(["flex items-center gap-1", r.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
496
- onClick: c[1] || (c[1] = (k) => I())
490
+ [ye, s.value]
491
+ ]) : (a(), r("p", pt, k(c.comment?.text), 1)),
492
+ e("div", mt, [
493
+ e("div", gt, [
494
+ e("button", {
495
+ class: D(["flex items-center gap-1", d.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
496
+ onClick: h[1] || (h[1] = (C) => p())
497
497
  }, [
498
- b(y(Oe), {
499
- class: _(["h-3 w-3", r.value ? "fill-blue-600" : ""])
498
+ w(_(Ne), {
499
+ class: D(["h-3 w-3", d.value ? "fill-blue-600" : ""])
500
500
  }, null, 8, ["class"]),
501
- V(" " + v(d.comment?.likes), 1)
501
+ H(" " + k(c.comment?.likes), 1)
502
502
  ], 2),
503
- d.isInside ? x("", !0) : (o(), a("button", {
503
+ c.isInside ? $("", !0) : (a(), r("button", {
504
504
  key: 0,
505
505
  class: "text-gray-500 hover:text-blue-600 transition-colors",
506
- onClick: c[2] || (c[2] = (k) => u.value = !0)
506
+ onClick: h[2] || (h[2] = (C) => v.value = !0)
507
507
  }, [
508
- b(y(Ue), { class: "h-3 w-3" })
508
+ w(_(We), { class: "h-3 w-3" })
509
509
  ])),
510
- t("button", {
510
+ e("button", {
511
511
  class: "text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",
512
512
  type: "button",
513
- onClick: c[3] || (c[3] = (k) => g.value = !0)
513
+ onClick: h[3] || (h[3] = (C) => m.value = !0)
514
514
  }, [
515
- b(y(He), { class: "h-3 w-3" })
515
+ w(_(Ee), { class: "h-3 w-3" })
516
516
  ])
517
517
  ]),
518
- m.value ? (o(), a("div", mt, [
519
- t("button", {
518
+ g.value ? (a(), r("div", ht, [
519
+ e("button", {
520
520
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
521
- onClick: c[4] || (c[4] = (k) => m.value = !1)
521
+ onClick: h[4] || (h[4] = (C) => g.value = !1)
522
522
  }, [
523
- b(y(X), { class: "h-3 w-3" }),
524
- c[11] || (c[11] = V(" Cancel ", -1))
523
+ w(_(X), { class: "h-3 w-3" }),
524
+ h[11] || (h[11] = H(" Cancel ", -1))
525
525
  ]),
526
- t("button", {
526
+ e("button", {
527
527
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
528
528
  disabled: !s.value.trim(),
529
- onClick: c[5] || (c[5] = (k) => H())
529
+ onClick: h[5] || (h[5] = (C) => b())
530
530
  }, [
531
- b(y(be), { class: "h-3 w-3 mr-1" }),
532
- c[12] || (c[12] = V(" Send ", -1))
533
- ], 8, gt)
534
- ])) : x("", !0)
531
+ w(_(xe), { class: "h-3 w-3 mr-1" }),
532
+ h[12] || (h[12] = H(" Send ", -1))
533
+ ], 8, ft)
534
+ ])) : $("", !0)
535
535
  ])
536
536
  ]),
537
- g.value ? (o(), D(ot, {
537
+ m.value ? (a(), j(it, {
538
538
  key: 0,
539
- showMoreOptions: g.value,
540
- "onUpdate:showMoreOptions": c[6] || (c[6] = (k) => g.value = k),
541
- onEdit: c[7] || (c[7] = (k) => m.value = !0),
542
- onDelete: c[8] || (c[8] = (k) => d.$emit("delete", d.comment?.id)),
543
- comment: d.comment
544
- }, null, 8, ["showMoreOptions", "comment"])) : x("", !0)
539
+ showMoreOptions: m.value,
540
+ "onUpdate:showMoreOptions": h[6] || (h[6] = (C) => m.value = C),
541
+ onEdit: h[7] || (h[7] = (C) => g.value = !0),
542
+ onDelete: h[8] || (h[8] = (C) => c.$emit("delete", c.comment?.id)),
543
+ comment: c.comment
544
+ }, null, 8, ["showMoreOptions", "comment"])) : $("", !0)
545
545
  ], 2),
546
- d.isInside ? x("", !0) : (o(), a("div", ht, [
547
- (o(!0), a(z, null, F(d.comment?.replies, (k) => (o(), D(T, {
548
- key: k.id,
549
- comment: k,
546
+ c.isInside ? $("", !0) : (a(), r("div", vt, [
547
+ (a(!0), r(A, null, S(c.comment?.replies, (C) => (a(), j(F, {
548
+ key: C.id,
549
+ comment: C,
550
550
  isInside: !0,
551
- onDelete: (j) => d.$emit("delete", k.id),
552
- onLike: R,
553
- onEdit: M
551
+ onDelete: (x) => c.$emit("delete", C.id),
552
+ onLike: W,
553
+ onEdit: V
554
554
  }, null, 8, ["comment", "onDelete"]))), 128)),
555
- u.value && !d.isInside ? (o(), D(xe, {
555
+ v.value && !c.isInside ? (a(), j(ke, {
556
556
  key: 0,
557
- onSendComment: c[9] || (c[9] = (k) => d.$emit("reply", d.comment?.id, k)),
558
- isReply: u.value,
559
- "onUpdate:isReply": c[10] || (c[10] = (k) => u.value = k)
560
- }, null, 8, ["isReply"])) : x("", !0)
557
+ onSendComment: h[9] || (h[9] = (C) => c.$emit("reply", c.comment?.id, C)),
558
+ isReply: v.value,
559
+ "onUpdate:isReply": h[10] || (h[10] = (C) => v.value = C)
560
+ }, null, 8, ["isReply"])) : $("", !0)
561
561
  ]))
562
562
  ]);
563
563
  };
564
564
  }
565
- }), vt = ["id"], yt = {
565
+ }), bt = ["id"], xt = {
566
566
  key: 0,
567
567
  class: "text-xl font-semibold text-gray-900 mb-4"
568
- }, ce = /* @__PURE__ */ C({
568
+ }, se = /* @__PURE__ */ I({
569
569
  __name: "CommentsWidget",
570
570
  props: {
571
571
  title: {},
@@ -582,78 +582,78 @@ const X = $("x", [
582
582
  },
583
583
  emits: ["add", "reply", "like", "delete", "edit"],
584
584
  setup(l, { emit: i }) {
585
- const n = l, e = i, s = (m) => {
586
- n?.onAddComment?.(m), e("add", m);
587
- }, f = (m, r) => {
588
- n?.onLike?.(m, r), e("like", m, r);
589
- }, p = (m, r) => {
590
- n.onReply?.(m, r), e("reply", m, r);
591
- }, g = (m, r) => {
592
- n.onEdit?.(m, r), e("edit", m, r);
593
- }, u = (m) => {
594
- n.onDelete?.(m), e("delete", m);
585
+ const n = l, t = i, s = (g) => {
586
+ n?.onAddComment?.(g), t("add", g);
587
+ }, f = (g, d) => {
588
+ n?.onLike?.(g, d), t("like", g, d);
589
+ }, o = (g, d) => {
590
+ n.onReply?.(g, d), t("reply", g, d);
591
+ }, m = (g, d) => {
592
+ n.onEdit?.(g, d), t("edit", g, d);
593
+ }, v = (g) => {
594
+ n.onDelete?.(g), t("delete", g);
595
595
  };
596
- return (m, r) => (o(), a("div", {
597
- class: _(["mx-auto font-sans", m.className]),
598
- id: m.id,
599
- style: E(m.style)
596
+ return (g, d) => (a(), r("div", {
597
+ class: D(["mx-auto font-sans", g.className]),
598
+ id: g.id,
599
+ style: R(g.style)
600
600
  }, [
601
- m.title ? (o(), a("h3", yt, v(m.title), 1)) : x("", !0),
602
- t("div", {
603
- class: _([m.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
604
- style: E({ maxHeight: m.maxHeight + "px" })
601
+ g.title ? (a(), r("h3", xt, k(g.title), 1)) : $("", !0),
602
+ e("div", {
603
+ class: D([g.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
604
+ style: R({ maxHeight: g.maxHeight + "px" })
605
605
  }, [
606
- (o(!0), a(z, null, F(m.comments, (h) => (o(), D(ft, {
607
- key: h.id,
608
- comment: h,
609
- onReply: p,
606
+ (a(!0), r(A, null, S(g.comments, (y) => (a(), j(yt, {
607
+ key: y.id,
608
+ comment: y,
609
+ onReply: o,
610
610
  onLike: f,
611
- onDelete: r[0] || (r[0] = (I) => u(I)),
612
- onEdit: g
611
+ onDelete: d[0] || (d[0] = (p) => v(p)),
612
+ onEdit: m
613
613
  }, null, 8, ["comment"]))), 128))
614
614
  ], 6),
615
- b(xe, {
616
- onSendComment: r[1] || (r[1] = (h) => s(h))
615
+ w(ke, {
616
+ onSendComment: d[1] || (d[1] = (y) => s(y))
617
617
  })
618
- ], 14, vt));
618
+ ], 14, bt));
619
619
  }
620
- }), ue = /* @__PURE__ */ new Map([
620
+ }), he = /* @__PURE__ */ new Map([
621
621
  ["file", {
622
622
  name: "File",
623
623
  color: "bg-green-100 text-green-700 border-green-200",
624
- icon: W
624
+ icon: q
625
625
  }],
626
626
  ["post", {
627
627
  name: "Post",
628
628
  color: "bg-blue-100 text-blue-700 border-blue-200",
629
- icon: Ge
629
+ icon: qe
630
630
  }],
631
631
  ["user", {
632
632
  name: "User",
633
633
  color: "bg-purple-100 text-purple-700 border-purple-200",
634
- icon: Pe
634
+ icon: Ze
635
635
  }],
636
636
  ["custom", {
637
637
  name: "Custom",
638
638
  color: "bg-gray-100 text-gray-700 border-gray-200",
639
- icon: Be
639
+ icon: Re
640
640
  }]
641
- ]), bt = { class: "mx-auto font-sans" }, xt = {
641
+ ]), kt = { class: "mx-auto font-sans" }, _t = {
642
642
  key: 0,
643
643
  class: "text-xl font-semibold text-gray-900 mb-4"
644
- }, kt = { class: "relative" }, wt = { class: "space-y-3" }, _t = { class: "flex-1 min-w-0 pb-2" }, $t = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Ct = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Mt = { class: "font-medium text-xs" }, Lt = { class: "text-xs text-gray-500" }, Dt = { class: "space-y-1" }, Tt = { class: "text-xs text-gray-700" }, jt = { class: "capitalize mr-1" }, It = {
644
+ }, wt = { class: "relative" }, $t = { class: "space-y-3" }, Ct = { class: "flex-1 min-w-0 pb-2" }, Mt = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Lt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Dt = { class: "font-medium text-xs" }, Tt = { class: "text-xs text-gray-500" }, It = { class: "space-y-1" }, zt = { class: "text-xs text-gray-700" }, jt = { class: "capitalize mr-1" }, Vt = {
645
645
  key: 0,
646
646
  class: "inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"
647
- }, Vt = {
647
+ }, Ft = {
648
648
  key: 0,
649
649
  class: "flex items-center gap-1 text-xs"
650
- }, zt = {
650
+ }, Ht = {
651
651
  key: 0,
652
652
  class: "bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"
653
- }, Ft = {
653
+ }, At = {
654
654
  key: 2,
655
655
  class: "bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"
656
- }, pe = /* @__PURE__ */ C({
656
+ }, oe = /* @__PURE__ */ I({
657
657
  __name: "HistoryWidget",
658
658
  props: {
659
659
  data: {},
@@ -664,45 +664,56 @@ const X = $("x", [
664
664
  style: {}
665
665
  },
666
666
  setup(l) {
667
- return (i, n) => (o(), a("div", bt, [
668
- i.title ? (o(), a("h3", xt, v(i.title), 1)) : x("", !0),
669
- t("div", {
670
- class: _(i.maxHeight ? "overflow-y-auto" : ""),
671
- style: E({ maxHeight: i.maxHeight + "px" })
667
+ const i = l, n = M(i.data ?? []);
668
+ n.value.length === 0 && i.id && t(), console.log(i);
669
+ async function t() {
670
+ const s = await fetch(`/api/widget/history/${i.id}`);
671
+ if (!s.ok)
672
+ return { data: [] };
673
+ const f = await s.json();
674
+ f.rows.forEach((o) => {
675
+ o.timestamp = new Date(o.cdate), o.id = o.entity_id, o.entityType = o.entity_type, o.entityId = o.entity_id, o.action = o.change_type, o.userId = o.change_user_id, o.userName = o.username, o.timestamp = new Date(o.cdate), o.description = o.username, o.status = o.username;
676
+ }), n.value = f.rows;
677
+ }
678
+ return (s, f) => (a(), r("div", kt, [
679
+ s.title ? (a(), r("h3", _t, k(s.title), 1)) : $("", !0),
680
+ e("div", {
681
+ class: D(s.maxHeight ? "overflow-y-auto" : ""),
682
+ style: R({ maxHeight: s.maxHeight + "px" })
672
683
  }, [
673
- t("div", kt, [
674
- n[0] || (n[0] = t("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
675
- t("div", wt, [
676
- (o(!0), a(z, null, F(i.data, (e) => (o(), a("div", {
684
+ e("div", wt, [
685
+ f[0] || (f[0] = e("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
686
+ e("div", $t, [
687
+ (a(!0), r(A, null, S(n.value, (o) => (a(), r("div", {
677
688
  class: "relative flex items-start gap-2",
678
- key: e?.id
689
+ key: o?.id
679
690
  }, [
680
- t("div", {
681
- class: _(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${y(ue).get(e?.entityType)?.color}`)
691
+ e("div", {
692
+ class: D(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${_(he).get(o?.entityType)?.color}`)
682
693
  }, [
683
- (o(), D(S(y(ue).get(e?.entityType)?.icon), { class: "h-3 w-3" }))
694
+ (a(), j(N(_(he).get(o?.entityType)?.icon), { class: "h-3 w-3" }))
684
695
  ], 2),
685
- t("div", _t, [
686
- t("div", $t, [
687
- t("span", Ct, [
688
- b(y(ae), { class: "h-3 w-3 text-gray-500" })
696
+ e("div", Ct, [
697
+ e("div", Mt, [
698
+ e("span", Lt, [
699
+ w(_(pe), { class: "h-3 w-3 text-gray-500" })
689
700
  ]),
690
- t("span", Mt, v(e?.userName), 1),
691
- t("span", Lt, v(e?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
701
+ e("span", Dt, k(o?.userName), 1),
702
+ e("span", Tt, k(o?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
692
703
  ]),
693
- t("div", Dt, [
694
- t("div", Tt, [
695
- t("span", jt, v(e?.action), 1),
696
- e?.entityId ? (o(), a("span", It, v(e?.entityId), 1)) : x("", !0)
704
+ e("div", It, [
705
+ e("div", zt, [
706
+ e("span", jt, k(o?.action), 1),
707
+ o?.entityId ? (a(), r("span", Vt, k(o?.entityId), 1)) : $("", !0)
697
708
  ]),
698
- e?.changes?.[e?.entityId] ? (o(), a("div", Vt, [
699
- e?.changes?.[e?.entityId]?.old ? (o(), a("span", zt, v(e?.changes?.[e?.entityId]?.old), 1)) : x("", !0),
700
- e?.changes?.[e?.entityId]?.old && e?.changes?.[e?.entityId]?.new ? (o(), D(y(Fe), {
709
+ o?.changes?.[o?.entityId] ? (a(), r("div", Ft, [
710
+ o?.changes?.[o?.entityId]?.old ? (a(), r("span", Ht, k(o?.changes?.[o?.entityId]?.old), 1)) : $("", !0),
711
+ o?.changes?.[o?.entityId]?.old && o?.changes?.[o?.entityId]?.new ? (a(), j(_(Ae), {
701
712
  key: 1,
702
713
  class: "h-2 w-2 text-gray-400"
703
- })) : x("", !0),
704
- e?.changes?.[e?.entityId]?.new ? (o(), a("span", Ft, v(e?.changes?.[e?.entityId]?.new), 1)) : x("", !0)
705
- ])) : x("", !0)
714
+ })) : $("", !0),
715
+ o?.changes?.[o?.entityId]?.new ? (a(), r("span", At, k(o?.changes?.[o?.entityId]?.new), 1)) : $("", !0)
716
+ ])) : $("", !0)
706
717
  ])
707
718
  ])
708
719
  ]))), 128))
@@ -711,10 +722,10 @@ const X = $("x", [
711
722
  ], 6)
712
723
  ]));
713
724
  }
714
- }), At = {
725
+ }), St = {
715
726
  key: 0,
716
727
  class: "text-xl font-semibold"
717
- }, Ht = { class: "flex gap-1" }, St = { class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer" }, Et = /* @__PURE__ */ C({
728
+ }, Et = { class: "flex gap-1" }, Ot = { class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer" }, Bt = /* @__PURE__ */ I({
718
729
  __name: "FileHeader",
719
730
  props: /* @__PURE__ */ J({
720
731
  title: {}
@@ -724,89 +735,89 @@ const X = $("x", [
724
735
  }),
725
736
  emits: /* @__PURE__ */ J(["onAddFile"], ["update:modelValue"]),
726
737
  setup(l) {
727
- const i = se(l, "modelValue"), n = {
738
+ const i = le(l, "modelValue"), n = {
728
739
  active: "bg-blue-100 text-black hover:bg-blue-100",
729
740
  inactive: "bg-white text-black hover:bg-blue-100"
730
741
  };
731
- return (e, s) => (o(), a("div", {
732
- class: _(["flex flex-col sm:flex-row gap-3 mb-4", e.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
742
+ return (t, s) => (a(), r("div", {
743
+ class: D(["flex flex-col sm:flex-row gap-3 mb-4", t.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
733
744
  }, [
734
- e.title ? (o(), a("h3", At, v(e.title), 1)) : x("", !0),
735
- t("div", Ht, [
736
- t("button", {
737
- class: _(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", i.value === "list" ? n.active : n.inactive]),
745
+ t.title ? (a(), r("h3", St, k(t.title), 1)) : $("", !0),
746
+ e("div", Et, [
747
+ e("button", {
748
+ class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", i.value === "list" ? n.active : n.inactive]),
738
749
  onClick: s[0] || (s[0] = (f) => i.value = "list")
739
750
  }, [
740
- b(y(Re), { class: "h-4 w-4" })
751
+ w(_(Ue), { class: "h-4 w-4" })
741
752
  ], 2),
742
- t("button", {
743
- class: _(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", i.value === "grid" ? n.active : n.inactive]),
753
+ e("button", {
754
+ class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", i.value === "grid" ? n.active : n.inactive]),
744
755
  onClick: s[1] || (s[1] = (f) => i.value = "grid")
745
756
  }, [
746
- b(y(Ee), { class: "h-4 w-4" })
757
+ w(_(Be), { class: "h-4 w-4" })
747
758
  ], 2),
748
- t("label", null, [
749
- t("input", {
759
+ e("label", null, [
760
+ e("input", {
750
761
  type: "file",
751
762
  class: "hidden",
752
- onChange: s[2] || (s[2] = (f) => e.$emit("onAddFile", f))
763
+ onChange: s[2] || (s[2] = (f) => t.$emit("onAddFile", f))
753
764
  }, null, 32),
754
- t("div", St, [
755
- b(y(Ne), { class: "h-4 w-4" }),
756
- s[3] || (s[3] = V(" Додати файл ", -1))
765
+ e("div", Ot, [
766
+ w(_(Pe), { class: "h-4 w-4" }),
767
+ s[3] || (s[3] = H(" Додати файл ", -1))
757
768
  ])
758
769
  ])
759
770
  ])
760
771
  ], 2));
761
772
  }
762
- }), me = {
773
+ }), fe = {
763
774
  pdf: {
764
775
  color: "bg-red-100 text-red-700 border-red-200",
765
- icon: W,
776
+ icon: q,
766
777
  label: "PDF"
767
778
  },
768
779
  sketch: {
769
780
  color: "bg-gray-100 text-gray-700 border-gray-200",
770
- icon: Se,
781
+ icon: Oe,
771
782
  label: "SKETCH"
772
783
  },
773
784
  mp4: {
774
785
  color: "bg-purple-100 text-purple-700 border-purple-200",
775
- icon: Ke,
786
+ icon: Je,
776
787
  label: "VIDEO"
777
788
  },
778
789
  docx: {
779
790
  color: "bg-blue-100 text-blue-700 border-blue-200",
780
- icon: W,
791
+ icon: q,
781
792
  label: "DOC"
782
793
  },
783
794
  zip: {
784
795
  color: "bg-orange-100 text-orange-700 border-orange-200",
785
- icon: ze,
796
+ icon: He,
786
797
  label: "ARCHIVE"
787
798
  },
788
799
  png: {
789
800
  color: "bg-green-100 text-green-700 border-green-200",
790
- icon: de,
801
+ icon: ge,
791
802
  label: "IMAGE"
792
803
  },
793
804
  jpg: {
794
805
  color: "bg-green-100 text-green-700 border-green-200",
795
- icon: de,
806
+ icon: ge,
796
807
  label: "IMAGE"
797
808
  },
798
809
  xlsx: {
799
810
  color: "bg-emerald-100 text-emerald-700 border-emerald-200",
800
- icon: W,
811
+ icon: q,
801
812
  label: "EXCEL"
802
813
  },
803
814
  pptx: {
804
815
  color: "bg-amber-100 text-amber-700 border-amber-200",
805
- icon: W,
816
+ icon: q,
806
817
  label: "PPT"
807
818
  }
808
819
  };
809
- function ke(l, i = "en") {
820
+ function _e(l, i = "en") {
810
821
  const n = {
811
822
  month: "short",
812
823
  day: "numeric"
@@ -815,325 +826,370 @@ function ke(l, i = "en") {
815
826
  }
816
827
  function we(l) {
817
828
  if (l === 0) return "0 B";
818
- const i = 1024, n = ["B", "KB", "MB", "GB", "TB"], e = Math.floor(Math.log(l) / Math.log(i));
819
- return `${parseFloat((l / Math.pow(i, e)).toFixed(1))} ${n[e]}`;
829
+ const i = 1024, n = ["B", "KB", "MB", "GB", "TB"], t = Math.floor(Math.log(l) / Math.log(i));
830
+ return `${parseFloat((l / Math.pow(i, t)).toFixed(1))} ${n[t]}`;
820
831
  }
821
- const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = { class: "flex items-center gap-2" }, Ut = { class: "font-medium text-xs truncate hover:text-blue-600 cursor-pointer" }, Wt = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, Gt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, qt = { class: "flex items-center gap-1" }, Pt = ["onClick"], Kt = ["onClick"], Zt = /* @__PURE__ */ C({
832
+ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = { class: "flex items-center gap-2" }, Wt = { class: "font-medium text-xs truncate hover:text-blue-600 cursor-pointer" }, Gt = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, qt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, Kt = { class: "flex items-center gap-1" }, Zt = ["onClick"], Jt = ["onClick"], Xt = /* @__PURE__ */ I({
822
833
  __name: "FileList",
823
834
  props: {
824
835
  files: {}
825
836
  },
826
837
  emits: ["delete", "download", "openLightbox"],
827
838
  setup(l) {
828
- return (i, n) => (o(), a("div", Ot, [
829
- (o(!0), a(z, null, F(i.files, (e) => (o(), a("div", {
839
+ return (i, n) => (a(), r("div", Nt, [
840
+ (a(!0), r(A, null, S(i.files, (t) => (a(), r("div", {
830
841
  class: "flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",
831
- key: e.id,
832
- onClick: G((s) => i.$emit("openLightbox", e), ["stop"])
842
+ key: t.id,
843
+ onClick: K((s) => i.$emit("openLightbox", t), ["stop"])
833
844
  }, [
834
- t("div", {
835
- class: _(["p-1 rounded", y(me)[e?.ext]?.color])
845
+ e("div", {
846
+ class: D(["p-1 rounded", _(fe)[t?.ext]?.color])
836
847
  }, [
837
- (o(), D(S(y(me)[e?.ext]?.icon), { class: "h-3 w-3" }))
848
+ (a(), j(N(_(fe)[t?.ext]?.icon), { class: "h-3 w-3" }))
838
849
  ], 2),
839
- t("div", {
850
+ e("div", {
840
851
  class: "flex-1 min-w-0",
841
- onClick: (s) => i.$emit("openLightbox", e)
852
+ onClick: (s) => i.$emit("openLightbox", t)
842
853
  }, [
843
- t("div", Nt, [
844
- t("span", Ut, v(e?.uploaded_name || e?.name), 1)
854
+ e("div", Pt, [
855
+ e("span", Wt, k(t?.uploaded_name || t?.name), 1)
845
856
  ])
846
- ], 8, Rt),
847
- t("div", Wt, v(y(we)(e.size)), 1),
848
- t("div", Gt, v(y(ke)(e.createdAt)), 1),
849
- t("div", qt, [
850
- t("button", {
851
- onClick: G((s) => i.$emit("download", e), ["stop"]),
857
+ ], 8, Ut),
858
+ e("div", Gt, k(_(we)(t.size)), 1),
859
+ e("div", qt, k(_(_e)(t.createdAt)), 1),
860
+ e("div", Kt, [
861
+ e("button", {
862
+ onClick: K((s) => i.$emit("download", t), ["stop"]),
852
863
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"
853
864
  }, [
854
- b(y(ie), { class: "h-3 w-3" })
855
- ], 8, Pt),
856
- t("button", {
865
+ w(_(ce), { class: "h-3 w-3" })
866
+ ], 8, Zt),
867
+ e("button", {
857
868
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",
858
- onClick: G((s) => i.$emit("delete", s, e?.file_id), ["stop"])
869
+ onClick: K((s) => i.$emit("delete", s, t?.file_id), ["stop"])
859
870
  }, [
860
- b(y(le), { class: "h-3 w-3" })
861
- ], 8, Kt)
871
+ w(_(ue), { class: "h-3 w-3" })
872
+ ], 8, Jt)
862
873
  ])
863
- ], 8, Bt))), 128))
874
+ ], 8, Rt))), 128))
864
875
  ]));
865
876
  }
866
- }), Jt = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, Xt = ["onClick"], Qt = { class: "space-y-2" }, Yt = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, es = ["src"], ts = { class: "space-y-1" }, ss = ["title"], os = { class: "text-xs text-gray-500 text-left" }, ns = { class: "absolute top-2 right-1 flex items-center gap-1" }, is = ["onClick"], ls = ["onClick"], as = /* @__PURE__ */ C({
877
+ }), Qt = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, Yt = ["onClick"], es = { class: "space-y-2" }, ts = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, ss = ["src"], os = { class: "space-y-1" }, ns = ["title"], is = { class: "text-xs text-gray-500 text-left" }, as = { class: "absolute top-2 right-1 flex items-center gap-1" }, ls = ["onClick"], rs = ["onClick"], ds = /* @__PURE__ */ I({
867
878
  __name: "FileGrid",
868
879
  props: {
869
880
  files: {}
870
881
  },
871
882
  emits: ["delete", "download", "openLightbox"],
872
883
  setup(l) {
873
- return (i, n) => (o(), a("div", Jt, [
874
- (o(!0), a(z, null, F(i.files, (e) => (o(), a("div", {
875
- key: e.id,
876
- onClick: G((s) => i.$emit("openLightbox", e), ["stop"]),
884
+ return (i, n) => (a(), r("div", Qt, [
885
+ (a(!0), r(A, null, S(i.files, (t) => (a(), r("div", {
886
+ key: t.id,
887
+ onClick: K((s) => i.$emit("openLightbox", t), ["stop"]),
877
888
  class: "group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"
878
889
  }, [
879
- t("div", Qt, [
880
- t("div", Yt, [
881
- e.ext === "png" || e.ext === "jpg" || e.ext === "jpeg" || e.ext === "gif" || e.ext === "svg" || e.ext === "webp" ? (o(), a("img", {
890
+ e("div", es, [
891
+ e("div", ts, [
892
+ t.ext === "png" || t.ext === "jpg" || t.ext === "jpeg" || t.ext === "gif" || t.ext === "svg" || t.ext === "webp" ? (a(), r("img", {
882
893
  key: 0,
883
- src: `/file/resize?filepath=${e?.file_path}&w=500`,
894
+ src: `/file/resize?filepath=${t?.file_path}&w=500`,
884
895
  alt: "file",
885
896
  class: "w-full h-full object-cover"
886
- }, null, 8, es)) : (o(), D(y(W), {
897
+ }, null, 8, ss)) : (a(), j(_(q), {
887
898
  key: 1,
888
899
  class: "h-10 w-10 text-gray-500"
889
900
  }))
890
901
  ]),
891
- t("div", ts, [
892
- t("h3", {
902
+ e("div", os, [
903
+ e("h3", {
893
904
  class: "font-medium text-xs leading-tight text-left",
894
- title: e.uploaded_name || e.name
895
- }, v(e.uploaded_name || e.name), 9, ss),
896
- t("p", os, v(y(ke)(e.createdAt)) + ", " + v(y(we)(e.size)), 1)
905
+ title: t.uploaded_name || t.name
906
+ }, k(t.uploaded_name || t.name), 9, ns),
907
+ e("p", is, k(_(_e)(t.createdAt)) + ", " + k(_(we)(t.size)), 1)
897
908
  ])
898
909
  ]),
899
- t("div", ns, [
900
- t("button", {
901
- onClick: G((s) => i.$emit("download", e), ["stop"]),
910
+ e("div", as, [
911
+ e("button", {
912
+ onClick: K((s) => i.$emit("download", t), ["stop"]),
902
913
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"
903
914
  }, [
904
- b(y(ie), { class: "h-3 w-3" })
905
- ], 8, is),
906
- t("a", {
915
+ w(_(ce), { class: "h-3 w-3" })
916
+ ], 8, ls),
917
+ e("a", {
907
918
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",
908
- onClick: G((s) => i.$emit("delete", s, e?.file_id), ["stop"])
919
+ onClick: K((s) => i.$emit("delete", s, t?.file_id), ["stop"])
909
920
  }, [
910
- b(y(le), { class: "h-3 w-3" })
911
- ], 8, ls)
921
+ w(_(ue), { class: "h-3 w-3" })
922
+ ], 8, rs)
912
923
  ])
913
- ], 8, Xt))), 128))
924
+ ], 8, Yt))), 128))
914
925
  ]));
915
926
  }
916
- }), rs = { class: "mx-auto font-sans" }, ds = { key: 1 }, ge = /* @__PURE__ */ C({
927
+ }), cs = { class: "mx-auto font-sans" }, us = { key: 1 }, ne = /* @__PURE__ */ I({
917
928
  __name: "FilesWidget",
918
929
  props: {
919
930
  title: {},
920
931
  view: {},
921
- files: {},
932
+ files: { default: () => [] },
922
933
  maxHeight: {},
923
- onAddFile: { type: Function }
934
+ onAddFile: {},
935
+ id: {},
936
+ className: {},
937
+ style: {},
938
+ onDelete: {}
924
939
  },
925
940
  emits: ["delete", "add", "openLightbox"],
926
941
  setup(l, { emit: i }) {
927
- const n = l, e = w(!1), s = w(null), f = w(!1), p = w(0), g = i, u = (d, c) => {
928
- s.value = c, e.value = !0;
929
- }, m = () => {
930
- s.value && (H(s.value), s.value = null, e.value = !1);
931
- }, r = A(() => Array.isArray(n.files) ? n.files.map((d) => d?.file_path) : []), h = (d) => {
932
- const c = r.value.findIndex((T) => T === d.file_path);
933
- c !== -1 && (f.value = !0, p.value = c);
934
- }, I = (d) => {
935
- n.onAddFile && n.onAddFile(d), g("add", d);
936
- }, H = (d) => {
937
- g("delete", d);
938
- }, R = (d) => {
939
- const c = document.createElement("a");
940
- c.setAttribute("download", d?.uploaded_name || d?.name), c.href = d?.file_path || d?.path, c.click();
941
- }, M = w("list");
942
- return (d, c) => {
943
- const T = ee("MessageBox"), k = ee("Lightbox");
944
- return o(), a(z, null, [
945
- t("div", rs, [
946
- b(Et, {
947
- modelValue: M.value,
948
- "onUpdate:modelValue": c[0] || (c[0] = (j) => M.value = j),
942
+ const n = l, t = M(!1), s = M(null), f = M(!1), o = M(0), m = M(n.files ?? []), v = i;
943
+ m.value.length === 0 && h();
944
+ const g = (x, u) => {
945
+ s.value = u, t.value = !0;
946
+ }, d = () => {
947
+ s.value && (W(s.value), s.value = null, t.value = !1);
948
+ }, y = O(() => Array.isArray(m.value) ? m.value.map((x) => x?.file_path) : []), p = (x) => {
949
+ const u = y.value.findIndex((E) => E === x.file_path);
950
+ u !== -1 && (f.value = !0, o.value = u);
951
+ }, b = (x) => {
952
+ n.onAddFile ? n.onAddFile(x) : F(x), v("add", x);
953
+ }, W = (x) => {
954
+ n.onDelete ? n.onDelete(x) : C(x), v("delete", x);
955
+ }, V = (x) => {
956
+ const u = document.createElement("a");
957
+ u.setAttribute("download", x?.uploaded_name || x?.name), u.href = x?.file_path || x?.path, u.click();
958
+ }, c = M("list");
959
+ async function h() {
960
+ if (!n.id)
961
+ return;
962
+ const x = await fetch(`/api/widget/file/${n.id}`).then((u) => u.json());
963
+ x.rows.forEach((u) => {
964
+ u.timestamp = new Date(u.cdate), u.id = u.entity_id, u.entityType = u.entity_type, u.entityId = u.entity_id, u.entityType = u.entity_type, u.action = u.change_type, u.userId = u.change_user_id, u.userName = u.username, u.timestamp = new Date(u.cdate), u.description = u.username, u.status = u.username;
965
+ }), m.value = x.rows;
966
+ }
967
+ const F = async (x) => {
968
+ if (!(!x.target || !x.target.files || x.target.files.length === 0))
969
+ try {
970
+ await Promise.all(
971
+ Array.from(x.target.files).map(async (u) => {
972
+ const E = new FormData();
973
+ E.append("file", u);
974
+ const B = `/api/widget/file/${n.id}`, z = await fetch(B, {
975
+ method: "POST",
976
+ body: E
977
+ });
978
+ if (!z.ok)
979
+ throw new Error(`HTTP error! status: ${z.status}`);
980
+ return u;
981
+ })
982
+ ), await h();
983
+ } catch (u) {
984
+ console.error("Помилка при завантаженні файлів:", u);
985
+ }
986
+ }, C = async (x) => {
987
+ try {
988
+ await fetch(
989
+ `/api/widget/file/${n.id}/${x}`,
990
+ {
991
+ method: "DELETE"
992
+ }
993
+ ), await h();
994
+ } catch (u) {
995
+ console.error(u);
996
+ }
997
+ };
998
+ return (x, u) => {
999
+ const E = ee("MessageBox"), B = ee("Lightbox");
1000
+ return a(), r(A, null, [
1001
+ e("div", cs, [
1002
+ w(Bt, {
1003
+ modelValue: c.value,
1004
+ "onUpdate:modelValue": u[0] || (u[0] = (z) => c.value = z),
949
1005
  title: n.title,
950
- onOnAddFile: c[1] || (c[1] = (j) => I(j))
1006
+ onOnAddFile: u[1] || (u[1] = (z) => b(z))
951
1007
  }, null, 8, ["modelValue", "title"]),
952
- n.files.length > 0 ? (o(), a("div", {
1008
+ m.value.length > 0 ? (a(), r("div", {
953
1009
  key: 0,
954
- class: _(d.maxHeight ? "overflow-y-auto" : ""),
955
- style: E({ maxHeight: d.maxHeight + "px" })
1010
+ class: D(x.maxHeight ? "overflow-y-auto" : ""),
1011
+ style: R({ maxHeight: x.maxHeight + "px" })
956
1012
  }, [
957
- M.value === "list" ? (o(), D(Zt, {
1013
+ c.value === "list" ? (a(), j(Xt, {
958
1014
  key: 0,
959
- onDelete: u,
960
- onDownload: R,
961
- onOpenLightbox: c[2] || (c[2] = (j) => h(j)),
962
- files: n.files
963
- }, null, 8, ["files"])) : x("", !0),
964
- M.value === "grid" ? (o(), D(as, {
1015
+ onDelete: g,
1016
+ onDownload: V,
1017
+ onOpenLightbox: u[2] || (u[2] = (z) => p(z)),
1018
+ files: m.value
1019
+ }, null, 8, ["files"])) : $("", !0),
1020
+ c.value === "grid" ? (a(), j(ds, {
965
1021
  key: 1,
966
- onDelete: u,
967
- onDownload: R,
968
- onOpenLightbox: c[3] || (c[3] = (j) => h(j)),
969
- files: n.files
970
- }, null, 8, ["files"])) : x("", !0)
971
- ], 6)) : (o(), a("div", ds, c[6] || (c[6] = [
972
- t("div", { class: "flex items-center justify-center h-full" }, [
973
- t("p", { class: "text-gray-500 leading-[3]" }, "Файлів не знайдено")
1022
+ onDelete: g,
1023
+ onDownload: V,
1024
+ onOpenLightbox: u[3] || (u[3] = (z) => p(z)),
1025
+ files: m.value
1026
+ }, null, 8, ["files"])) : $("", !0)
1027
+ ], 6)) : (a(), r("div", us, u[6] || (u[6] = [
1028
+ e("div", { class: "flex items-center justify-center h-full" }, [
1029
+ e("p", { class: "text-gray-500 leading-[3]" }, "Файлів не знайдено")
974
1030
  ], -1)
975
1031
  ])))
976
1032
  ]),
977
- b(T, {
978
- modelValue: e.value,
979
- "onUpdate:modelValue": c[4] || (c[4] = (j) => e.value = j),
980
- onConfirm: m,
1033
+ w(E, {
1034
+ modelValue: t.value,
1035
+ "onUpdate:modelValue": u[4] || (u[4] = (z) => t.value = z),
1036
+ onConfirm: d,
981
1037
  title: "Ви впевнені?",
982
1038
  message: "Ви впевнені, що хочете видалити цей файл?",
983
1039
  confirmButtonText: "Так, я впевнена/ий",
984
1040
  cancelButtonText: "Скасувати"
985
1041
  }, null, 8, ["modelValue"]),
986
- b(k, {
1042
+ w(B, {
987
1043
  modelValue: f.value,
988
- "onUpdate:modelValue": c[5] || (c[5] = (j) => f.value = j),
989
- images: r.value,
990
- "start-index": p.value
1044
+ "onUpdate:modelValue": u[5] || (u[5] = (z) => f.value = z),
1045
+ images: y.value,
1046
+ "start-index": o.value
991
1047
  }, null, 8, ["modelValue", "images", "start-index"])
992
1048
  ], 64);
993
1049
  };
994
1050
  }
995
- }), cs = ["onClick"], us = /* @__PURE__ */ C({
1051
+ }), ps = ["onClick"], ms = /* @__PURE__ */ I({
996
1052
  __name: "CopyNotification",
997
1053
  setup(l, { expose: i }) {
998
- const n = w([]);
999
- let e = 1;
1054
+ const n = M([]);
1055
+ let t = 1;
1000
1056
  const s = () => {
1001
1057
  if (n.value.length >= 10) {
1002
- const g = n.value[0];
1003
- clearTimeout(g.timer), n.value.shift();
1058
+ const m = n.value[0];
1059
+ clearTimeout(m.timer), n.value.shift();
1004
1060
  }
1005
- const p = {
1006
- id: e++,
1061
+ const o = {
1062
+ id: t++,
1007
1063
  timer: setTimeout(() => {
1008
- f(p.id);
1064
+ f(o.id);
1009
1065
  }, 1500)
1010
1066
  };
1011
- n.value.push(p);
1012
- }, f = (p) => {
1013
- const g = n.value.findIndex((u) => u.id === p);
1014
- if (g !== -1) {
1015
- const u = n.value[g];
1016
- clearTimeout(u.timer), n.value.splice(g, 1);
1067
+ n.value.push(o);
1068
+ }, f = (o) => {
1069
+ const m = n.value.findIndex((v) => v.id === o);
1070
+ if (m !== -1) {
1071
+ const v = n.value[m];
1072
+ clearTimeout(v.timer), n.value.splice(m, 1);
1017
1073
  }
1018
1074
  };
1019
1075
  return i({
1020
1076
  addNotification: s
1021
- }), ne(() => {
1022
- n.value.forEach((p) => {
1023
- clearTimeout(p.timer);
1077
+ }), de(() => {
1078
+ n.value.forEach((o) => {
1079
+ clearTimeout(o.timer);
1024
1080
  });
1025
- }), (p, g) => (o(), D(ye, { to: "body" }, [
1026
- b($e, {
1081
+ }), (o, m) => (a(), j(be, { to: "body" }, [
1082
+ w(Me, {
1027
1083
  name: "notification",
1028
1084
  tag: "div",
1029
1085
  class: "fixed top-4 right-4 z-50 space-y-2"
1030
1086
  }, {
1031
- default: Ce(() => [
1032
- (o(!0), a(z, null, F(n.value, (u) => (o(), a("div", {
1033
- key: u.id,
1087
+ default: Le(() => [
1088
+ (a(!0), r(A, null, S(n.value, (v) => (a(), r("div", {
1089
+ key: v.id,
1034
1090
  class: "bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"
1035
1091
  }, [
1036
- b(y(Ae), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
1037
- g[0] || (g[0] = t("div", { class: "flex-1" }, [
1038
- t("p", { class: "font-medium text-sm" }, "Ссылка скопирована!"),
1039
- t("p", { class: "text-xs text-green-100 opacity-90" }, "Файл добавлен в буфер обмена")
1092
+ w(_(Se), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
1093
+ m[0] || (m[0] = e("div", { class: "flex-1" }, [
1094
+ e("p", { class: "font-medium text-sm" }, "Ссылка скопирована!"),
1095
+ e("p", { class: "text-xs text-green-100 opacity-90" }, "Файл добавлен в буфер обмена")
1040
1096
  ], -1)),
1041
- t("button", {
1042
- onClick: (m) => f(u.id),
1097
+ e("button", {
1098
+ onClick: (g) => f(v.id),
1043
1099
  class: "text-green-100 hover:text-white transition-colors flex-shrink-0"
1044
1100
  }, [
1045
- b(y(X), { class: "h-4 w-4" })
1046
- ], 8, cs)
1101
+ w(_(X), { class: "h-4 w-4" })
1102
+ ], 8, ps)
1047
1103
  ]))), 128))
1048
1104
  ]),
1049
1105
  _: 1
1050
1106
  })
1051
1107
  ]));
1052
1108
  }
1053
- }), B = (l, i) => {
1109
+ }), P = (l, i) => {
1054
1110
  const n = l.__vccOpts || l;
1055
- for (const [e, s] of i)
1056
- n[e] = s;
1111
+ for (const [t, s] of i)
1112
+ n[t] = s;
1057
1113
  return n;
1058
- }, _e = /* @__PURE__ */ B(us, [["__scopeId", "data-v-55903525"]]), ps = { class: "fixed inset-0 z-50 bg-black/80" }, ms = { class: "fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0" }, gs = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, hs = { class: "flex items-center justify-between" }, fs = { class: "flex items-center gap-2" }, vs = { class: "tracking-tight text-base font-medium" }, ys = { class: "p-4 pt-0" }, bs = { class: "flex flex-col items-center" }, xs = ["src", "alt"], ks = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, ws = { class: "mt-3 flex gap-2" }, _s = /* @__PURE__ */ C({
1114
+ }, $e = /* @__PURE__ */ P(ms, [["__scopeId", "data-v-55903525"]]), gs = { class: "fixed inset-0 z-50 bg-black/80" }, hs = { class: "fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0" }, fs = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, vs = { class: "flex items-center justify-between" }, ys = { class: "flex items-center gap-2" }, bs = { class: "tracking-tight text-base font-medium" }, xs = { class: "p-4 pt-0" }, ks = { class: "flex flex-col items-center" }, _s = ["src", "alt"], ws = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, $s = { class: "mt-3 flex gap-2" }, Cs = /* @__PURE__ */ I({
1059
1115
  __name: "GalleryModal",
1060
1116
  props: {
1061
1117
  item: {}
1062
1118
  },
1063
1119
  emits: ["close"],
1064
1120
  setup(l) {
1065
- const i = w(), n = (p) => new Date(p).toLocaleDateString("uk-UA", {
1121
+ const i = M(), n = (o) => new Date(o).toLocaleDateString("uk-UA", {
1066
1122
  day: "2-digit",
1067
1123
  month: "2-digit",
1068
1124
  year: "numeric"
1069
- }), e = (p) => p >= 1024 * 1024 * 1024 ? (p / (1024 * 1024 * 1024)).toFixed(2) + " GB" : p >= 1024 * 1024 ? (p / (1024 * 1024)).toFixed(2) + " MB" : p >= 1024 ? (p / 1024).toFixed(2) + " KB" : p + " B", s = (p) => {
1070
- navigator.clipboard.writeText(p), i.value?.addNotification();
1071
- }, f = async (p, g) => {
1125
+ }), t = (o) => o >= 1024 * 1024 * 1024 ? (o / (1024 * 1024 * 1024)).toFixed(2) + " GB" : o >= 1024 * 1024 ? (o / (1024 * 1024)).toFixed(2) + " MB" : o >= 1024 ? (o / 1024).toFixed(2) + " KB" : o + " B", s = (o) => {
1126
+ navigator.clipboard.writeText(o), i.value?.addNotification();
1127
+ }, f = async (o, m) => {
1072
1128
  try {
1073
- const m = await (await fetch(p)).blob(), r = window.URL.createObjectURL(m), h = document.createElement("a");
1074
- h.href = r, h.download = g, document.body.appendChild(h), h.click(), window.URL.revokeObjectURL(r), document.body.removeChild(h);
1075
- } catch (u) {
1076
- console.error("Download failed:", u), alert("Download failed. Please try opening the image in a new tab.");
1129
+ const g = await (await fetch(o)).blob(), d = window.URL.createObjectURL(g), y = document.createElement("a");
1130
+ y.href = d, y.download = m, document.body.appendChild(y), y.click(), window.URL.revokeObjectURL(d), document.body.removeChild(y);
1131
+ } catch (v) {
1132
+ console.error("Download failed:", v), alert("Download failed. Please try opening the image in a new tab.");
1077
1133
  }
1078
1134
  };
1079
- return (p, g) => (o(), a("div", ps, [
1080
- t("div", ms, [
1081
- t("div", gs, [
1082
- t("div", hs, [
1083
- t("div", fs, [
1084
- t("h2", vs, v(p.item.name), 1)
1135
+ return (o, m) => (a(), r("div", gs, [
1136
+ e("div", hs, [
1137
+ e("div", fs, [
1138
+ e("div", vs, [
1139
+ e("div", ys, [
1140
+ e("h2", bs, k(o.item.name), 1)
1085
1141
  ])
1086
1142
  ])
1087
1143
  ]),
1088
- t("div", ys, [
1089
- t("div", bs, [
1090
- t("img", {
1091
- src: p.item.path,
1092
- alt: p.item.name,
1144
+ e("div", xs, [
1145
+ e("div", ks, [
1146
+ e("img", {
1147
+ src: o.item.path,
1148
+ alt: o.item.name,
1093
1149
  class: "max-w-full max-h-[60vh] object-contain rounded border"
1094
- }, null, 8, xs),
1095
- t("div", ks, [
1096
- t("span", null, "Size: " + v(e(p.item.size)), 1),
1097
- g[3] || (g[3] = t("span", null, "•", -1)),
1098
- t("span", null, "Date: " + v(n(p.item.createdAt)), 1)
1150
+ }, null, 8, _s),
1151
+ e("div", ws, [
1152
+ e("span", null, "Size: " + k(t(o.item.size)), 1),
1153
+ m[3] || (m[3] = e("span", null, "•", -1)),
1154
+ e("span", null, "Date: " + k(n(o.item.createdAt)), 1)
1099
1155
  ]),
1100
- t("div", ws, [
1101
- t("button", {
1102
- onClick: g[0] || (g[0] = (u) => f(p.item.path, p.item.name)),
1156
+ e("div", $s, [
1157
+ e("button", {
1158
+ onClick: m[0] || (m[0] = (v) => f(o.item.path, o.item.name)),
1103
1159
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"
1104
1160
  }, [
1105
- b(y(ie), { class: "h-3 w-3 mr-1" }),
1106
- g[4] || (g[4] = V(" Download ", -1))
1161
+ w(_(ce), { class: "h-3 w-3 mr-1" }),
1162
+ m[4] || (m[4] = H(" Download ", -1))
1107
1163
  ]),
1108
- t("button", {
1109
- onClick: g[1] || (g[1] = (u) => s(p.item.path)),
1164
+ e("button", {
1165
+ onClick: m[1] || (m[1] = (v) => s(o.item.path)),
1110
1166
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"
1111
1167
  }, [
1112
- b(y(We), { class: "h-3 w-3 mr-1" }),
1113
- g[5] || (g[5] = V(" Share ", -1))
1168
+ w(_(Ge), { class: "h-3 w-3 mr-1" }),
1169
+ m[5] || (m[5] = H(" Share ", -1))
1114
1170
  ])
1115
1171
  ])
1116
1172
  ])
1117
1173
  ]),
1118
- t("button", {
1174
+ e("button", {
1119
1175
  type: "button",
1120
- onClick: g[2] || (g[2] = (u) => p.$emit("close")),
1176
+ onClick: m[2] || (m[2] = (v) => o.$emit("close")),
1121
1177
  class: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
1122
1178
  }, [
1123
- b(y(X), { class: "h-4 w-4" }),
1124
- g[6] || (g[6] = t("span", { class: "sr-only" }, "Close", -1))
1179
+ w(_(X), { class: "h-4 w-4" }),
1180
+ m[6] || (m[6] = e("span", { class: "sr-only" }, "Close", -1))
1125
1181
  ])
1126
1182
  ]),
1127
- b(_e, {
1183
+ w($e, {
1128
1184
  ref_key: "copyNotificationRef",
1129
1185
  ref: i
1130
1186
  }, null, 512)
1131
1187
  ]));
1132
1188
  }
1133
- }), $s = {
1189
+ }), Ms = {
1134
1190
  key: 0,
1135
1191
  class: "text-xl font-semibold text-gray-900 mb-4"
1136
- }, Cs = ["onClick"], Ms = ["src", "alt"], he = /* @__PURE__ */ C({
1192
+ }, Ls = ["onClick"], Ds = ["src", "alt"], ie = /* @__PURE__ */ I({
1137
1193
  __name: "GalleryWidget",
1138
1194
  props: {
1139
1195
  title: {},
@@ -1145,262 +1201,127 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
1145
1201
  style: {}
1146
1202
  },
1147
1203
  setup(l) {
1148
- const i = l, n = w(!1), e = w(null), s = w(), f = w(0);
1149
- let p = null;
1150
- const g = A(() => {
1151
- const r = i.columns || 4;
1152
- return f.value >= 1440 ? r : f.value >= 1024 ? Math.max(1, r - 1) : f.value >= 768 ? Math.max(1, r - 2) : f.value >= 640 ? Math.max(1, r - 3) : 1;
1153
- }), u = () => {
1204
+ const i = l, n = M(!1), t = M(null), s = M(), f = M(0);
1205
+ let o = null;
1206
+ const m = O(() => {
1207
+ const d = i.columns || 4;
1208
+ return f.value >= 1440 ? d : f.value >= 1024 ? Math.max(1, d - 1) : f.value >= 768 ? Math.max(1, d - 2) : f.value >= 640 ? Math.max(1, d - 3) : 1;
1209
+ }), v = () => {
1154
1210
  s.value && (f.value = s.value.offsetWidth);
1155
1211
  };
1156
- oe(() => {
1157
- Me(() => {
1158
- s.value && (p = new ResizeObserver((r) => {
1159
- for (const h of r)
1160
- h.target === s.value && (f.value = h.contentRect.width);
1161
- }), p.observe(s.value), u());
1212
+ re(() => {
1213
+ De(() => {
1214
+ s.value && (o = new ResizeObserver((d) => {
1215
+ for (const y of d)
1216
+ y.target === s.value && (f.value = y.contentRect.width);
1217
+ }), o.observe(s.value), v());
1162
1218
  });
1163
- }), ne(() => {
1164
- p && p.disconnect();
1219
+ }), de(() => {
1220
+ o && o.disconnect();
1165
1221
  });
1166
- const m = (r) => {
1167
- e.value = r, n.value = !0;
1222
+ const g = (d) => {
1223
+ t.value = d, n.value = !0;
1168
1224
  };
1169
- return (r, h) => (o(), a("div", {
1225
+ return (d, y) => (a(), r("div", {
1170
1226
  class: "w-full mx-auto font-sans",
1171
1227
  ref_key: "containerRef",
1172
1228
  ref: s
1173
1229
  }, [
1174
- r.title ? (o(), a("h3", $s, v(r.title), 1)) : x("", !0),
1175
- t("div", {
1176
- class: _(r.maxHeight ? "overflow-y-auto" : ""),
1177
- style: E({ maxHeight: r.maxHeight + "px" })
1230
+ d.title ? (a(), r("h3", Ms, k(d.title), 1)) : $("", !0),
1231
+ e("div", {
1232
+ class: D(d.maxHeight ? "overflow-y-auto" : ""),
1233
+ style: R({ maxHeight: d.maxHeight + "px" })
1178
1234
  }, [
1179
- t("div", {
1180
- style: E({ columns: g.value + " auto", gap: "12px" }),
1235
+ e("div", {
1236
+ style: R({ columns: m.value + " auto", gap: "12px" }),
1181
1237
  class: "space-y-3"
1182
1238
  }, [
1183
- (o(!0), a(z, null, F(r.items, (I) => (o(), a("div", {
1184
- key: I.id,
1185
- onClick: (H) => m(I),
1239
+ (a(!0), r(A, null, S(d.items, (p) => (a(), r("div", {
1240
+ key: p.id,
1241
+ onClick: (b) => g(p),
1186
1242
  class: "group relative break-inside-avoid bg-gray-200 rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-all mb-3"
1187
1243
  }, [
1188
- t("img", {
1189
- src: I.path,
1190
- alt: I.name,
1244
+ e("img", {
1245
+ src: p.path,
1246
+ alt: p.name,
1191
1247
  class: "w-full h-auto min-h-40 rounded-md object-contain"
1192
- }, null, 8, Ms),
1193
- h[1] || (h[1] = t("div", { class: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-12" }, [
1194
- t("h3", { class: "text-white font-medium text-base leading-tight mb-1" }, "Mountain Landscape"),
1195
- t("p", { class: "text-white/90 text-sm" }, "2.4 MB")
1248
+ }, null, 8, Ds),
1249
+ y[1] || (y[1] = e("div", { class: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-12" }, [
1250
+ e("h3", { class: "text-white font-medium text-base leading-tight mb-1" }, "Mountain Landscape"),
1251
+ e("p", { class: "text-white/90 text-sm" }, "2.4 MB")
1196
1252
  ], -1)),
1197
- h[2] || (h[2] = t("div", { class: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200" }, null, -1))
1198
- ], 8, Cs))), 128))
1253
+ y[2] || (y[2] = e("div", { class: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200" }, null, -1))
1254
+ ], 8, Ls))), 128))
1199
1255
  ], 4)
1200
1256
  ], 6),
1201
- (o(), D(ye, { to: "body" }, [
1202
- n.value && e.value ? (o(), D(_s, {
1257
+ (a(), j(be, { to: "body" }, [
1258
+ n.value && t.value ? (a(), j(Cs, {
1203
1259
  key: 0,
1204
- item: e.value,
1205
- onClose: h[0] || (h[0] = (I) => n.value = !1)
1206
- }, null, 8, ["item"])) : x("", !0)
1260
+ item: t.value,
1261
+ onClose: y[0] || (y[0] = (p) => n.value = !1)
1262
+ }, null, 8, ["item"])) : $("", !0)
1207
1263
  ]))
1208
1264
  ], 512));
1209
1265
  }
1210
- }), Ls = {
1211
- key: 0,
1212
- class: "overflow-hidden"
1213
- }, Ds = { class: "flex border-b border-gray-200 bg-gray-50" }, Ts = ["onClick"], js = { class: "p-4" }, Is = ["innerHTML"], Vs = {
1214
- key: 1,
1215
- class: "p-4"
1216
- }, zs = { class: "grid grid-cols-12 gap-4" }, Fs = {
1217
- key: 0,
1218
- class: "mb-4 pb-2 border-b border-gray-200"
1219
- }, As = { class: "text-lg font-semibold text-gray-900" }, Hs = ["innerHTML"], Ss = /* @__PURE__ */ C({
1220
- __name: "Card",
1221
- props: {
1222
- panels: { default: () => [] },
1223
- data: { default: () => ({}) },
1224
- view: { default: "plain" },
1225
- id: {},
1226
- className: {},
1227
- style: {}
1228
- },
1229
- setup(l) {
1230
- const i = l, n = w(0), e = A(() => i.panels && i.panels.length > 0 ? i.panels : i.data && Array.isArray(i.data) ? i.data.filter((m) => m.type === "tabs")[0]?.items || [] : []), s = A(() => i.panels && i.panels.length > 0 ? i.panels : i.data && Array.isArray(i.data) ? i.data : []), f = A(() => ({
1231
- [`view-${i.view}`]: !0
1232
- })), p = (u) => {
1233
- const m = {};
1234
- return u.count && (m.count = u.count), u.col && (m.col = u.col), i.data && u.name && Object.assign(m, i.data[u.name]), m;
1235
- }, g = (u) => u.width ? {
1236
- gridColumn: `span ${u.width}`
1237
- } : {};
1238
- return (u, m) => (o(), a("div", {
1239
- class: _(["bg-white rounded-lg shadow-sm border border-gray-200", f.value])
1240
- }, [
1241
- u.view === "tab" ? (o(), a("div", Ls, [
1242
- t("div", Ds, [
1243
- (o(!0), a(z, null, F(e.value, (r, h) => (o(), a("button", {
1244
- key: r.name || h,
1245
- onClick: (I) => n.value = h,
1246
- class: _([
1247
- "px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
1248
- { "text-blue-600 bg-white border-b-2 border-blue-600": n.value === h }
1249
- ])
1250
- }, v(r.title || r.label || r.name || `Tab ${h + 1}`), 11, Ts))), 128))
1251
- ]),
1252
- t("div", js, [
1253
- (o(!0), a(z, null, F(e.value, (r, h) => O((o(), a("div", {
1254
- key: r.name || h,
1255
- class: _([
1256
- "min-h-[400px] w-full",
1257
- `col-span-${r.col || 12}`
1258
- ])
1259
- }, [
1260
- r.html ? (o(), a("div", {
1261
- key: 0,
1262
- innerHTML: r.html,
1263
- class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1264
- }, null, 8, Is)) : u.$slots[`tab-${h}`] ? U(u.$slots, `tab-${h}`, {
1265
- key: 1,
1266
- item: r,
1267
- data: u.data
1268
- }) : r.component ? (o(), D(S(r.component), te({
1269
- key: 2,
1270
- ref_for: !0
1271
- }, p(r), { class: "w-full h-full" }), null, 16)) : U(u.$slots, r.slot || `tab-${h}`, {
1272
- key: 3,
1273
- item: r,
1274
- data: u.data
1275
- })
1276
- ], 2)), [
1277
- [Le, n.value === h]
1278
- ])), 128))
1279
- ])
1280
- ])) : (o(), a("div", Vs, [
1281
- t("div", zs, [
1282
- (o(!0), a(z, null, F(s.value, (r, h) => (o(), a("div", {
1283
- key: r.name || h,
1284
- class: _([
1285
- "bg-gray-50 rounded-lg p-4 min-h-[300px]",
1286
- `col-span-${r.col || 12}`
1287
- ]),
1288
- style: E(g(r))
1289
- }, [
1290
- r.title || r.label ? (o(), a("div", Fs, [
1291
- t("h3", As, v(r.title || r.label), 1)
1292
- ])) : x("", !0),
1293
- r.html ? (o(), a("div", {
1294
- key: 1,
1295
- innerHTML: r.html,
1296
- class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1297
- }, null, 8, Hs)) : u.$slots[`panel-${h}`] ? U(u.$slots, `panel-${h}`, {
1298
- key: 2,
1299
- item: r,
1300
- data: u.data
1301
- }) : r.component ? (o(), D(S(r.component), te({
1302
- key: 3,
1303
- ref_for: !0
1304
- }, p(r), { class: "w-full h-full" }), null, 16)) : U(u.$slots, r.slot || `panel-${h}`, {
1305
- key: 4,
1306
- item: r,
1307
- data: u.data
1308
- })
1309
- ], 6))), 128))
1310
- ])
1311
- ]))
1312
- ], 2));
1313
- }
1314
- }), Es = ["innerHTML"], Os = /* @__PURE__ */ C({
1315
- __name: "CardItem",
1316
- props: {
1317
- name: {},
1318
- label: {},
1319
- component: {},
1320
- slot: {},
1321
- col: { default: 12 },
1322
- html: {},
1323
- title: {},
1324
- id: {},
1325
- className: {},
1326
- style: {}
1327
- },
1328
- setup(l) {
1329
- const i = l, n = A(() => ({
1330
- [`col-span-${i.col}`]: !0
1331
- })), e = A(() => {
1332
- const s = {};
1333
- return s.col && (s.col = s.col), s;
1334
- });
1335
- return (s, f) => (o(), a("div", {
1336
- class: _(["w-full", n.value])
1337
- }, [
1338
- s.html ? (o(), a("div", {
1339
- key: 0,
1340
- innerHTML: s.html,
1341
- class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1342
- }, null, 8, Es)) : s.component ? (o(), D(S(s.component), te({ key: 1 }, e.value, { class: "w-full" }), null, 16)) : U(s.$slots, "default", { key: 2 })
1343
- ], 2));
1344
- }
1345
- }), Bs = { class: "text-value" }, Rs = { class: "text-sm text-gray-900" }, Ns = /* @__PURE__ */ C({
1266
+ }), Ts = { class: "text-value" }, Is = { class: "text-sm text-gray-900" }, zs = /* @__PURE__ */ I({
1346
1267
  __name: "TextValue",
1347
1268
  props: {
1348
1269
  item: {}
1349
1270
  },
1350
1271
  setup(l) {
1351
- const i = l, n = A(() => {
1352
- const e = i.item.value;
1353
- return typeof e == "boolean" ? e ? "Так" : "Ні" : e == null ? "—" : String(e);
1272
+ const i = l, n = O(() => {
1273
+ const t = i.item.value;
1274
+ return typeof t == "boolean" ? t ? "Так" : "Ні" : t == null ? "—" : String(t);
1354
1275
  });
1355
- return (e, s) => (o(), a("div", Bs, [
1356
- t("span", Rs, v(n.value), 1)
1276
+ return (t, s) => (a(), r("div", Ts, [
1277
+ e("span", Is, k(n.value), 1)
1357
1278
  ]));
1358
1279
  }
1359
- }), Us = /* @__PURE__ */ B(Ns, [["__scopeId", "data-v-c14550b7"]]), Ws = { class: "link-value" }, Gs = ["href"], qs = /* @__PURE__ */ C({
1280
+ }), js = /* @__PURE__ */ P(zs, [["__scopeId", "data-v-c14550b7"]]), Vs = { class: "link-value" }, Fs = ["href"], Hs = /* @__PURE__ */ I({
1360
1281
  __name: "LinkValue",
1361
1282
  props: {
1362
1283
  item: {}
1363
1284
  },
1364
1285
  setup(l) {
1365
- const i = l, n = A(() => {
1366
- const e = String(i.item.value);
1286
+ const i = l, n = O(() => {
1287
+ const t = String(i.item.value);
1367
1288
  try {
1368
- const s = new URL(e);
1289
+ const s = new URL(t);
1369
1290
  return s.hostname + s.pathname;
1370
1291
  } catch {
1371
- return e;
1292
+ return t;
1372
1293
  }
1373
1294
  });
1374
- return (e, s) => (o(), a("div", Ws, [
1375
- t("a", {
1376
- href: String(e.item.value),
1295
+ return (t, s) => (a(), r("div", Vs, [
1296
+ e("a", {
1297
+ href: String(t.item.value),
1377
1298
  target: "_blank",
1378
1299
  rel: "noopener noreferrer",
1379
1300
  class: "text-blue-600 hover:text-blue-800 underline text-sm"
1380
1301
  }, [
1381
- V(v(n.value) + " ", 1),
1382
- s[0] || (s[0] = t("i", { class: "fas fa-external-link-alt ml-1 text-xs" }, null, -1))
1383
- ], 8, Gs)
1302
+ H(k(n.value) + " ", 1),
1303
+ s[0] || (s[0] = e("i", { class: "fas fa-external-link-alt ml-1 text-xs" }, null, -1))
1304
+ ], 8, Fs)
1384
1305
  ]));
1385
1306
  }
1386
- }), Ps = /* @__PURE__ */ B(qs, [["__scopeId", "data-v-e6eb07a6"]]), Ks = { class: "date-value" }, Zs = { class: "text-sm text-gray-900" }, Js = /* @__PURE__ */ C({
1307
+ }), As = /* @__PURE__ */ P(Hs, [["__scopeId", "data-v-e6eb07a6"]]), Ss = { class: "date-value" }, Es = { class: "text-sm text-gray-900" }, Os = /* @__PURE__ */ I({
1387
1308
  __name: "DateValue",
1388
1309
  props: {
1389
1310
  item: {}
1390
1311
  },
1391
1312
  setup(l) {
1392
- const i = l, n = A(() => {
1393
- const e = i.item.value;
1394
- if (e instanceof Date)
1395
- return e.toLocaleDateString("uk-UA", {
1313
+ const i = l, n = O(() => {
1314
+ const t = i.item.value;
1315
+ if (t instanceof Date)
1316
+ return t.toLocaleDateString("uk-UA", {
1396
1317
  year: "numeric",
1397
1318
  month: "long",
1398
1319
  day: "numeric",
1399
1320
  hour: "2-digit",
1400
1321
  minute: "2-digit"
1401
1322
  });
1402
- if (typeof e == "string") {
1403
- const s = new Date(e);
1323
+ if (typeof t == "string") {
1324
+ const s = new Date(t);
1404
1325
  if (!isNaN(s.getTime()))
1405
1326
  return s.toLocaleDateString("uk-UA", {
1406
1327
  year: "numeric",
@@ -1410,22 +1331,22 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
1410
1331
  minute: "2-digit"
1411
1332
  });
1412
1333
  }
1413
- return String(e);
1334
+ return String(t);
1414
1335
  });
1415
- return (e, s) => (o(), a("div", Ks, [
1416
- t("span", Zs, v(n.value), 1)
1336
+ return (t, s) => (a(), r("div", Ss, [
1337
+ e("span", Es, k(n.value), 1)
1417
1338
  ]));
1418
1339
  }
1419
- }), Xs = /* @__PURE__ */ B(Js, [["__scopeId", "data-v-b9600618"]]), Qs = { class: "status-value" }, Ys = {
1340
+ }), Bs = /* @__PURE__ */ P(Os, [["__scopeId", "data-v-b9600618"]]), Ns = { class: "status-value" }, Rs = {
1420
1341
  key: 0,
1421
1342
  class: "mr-1"
1422
- }, eo = /* @__PURE__ */ C({
1343
+ }, Us = /* @__PURE__ */ I({
1423
1344
  __name: "StatusValue",
1424
1345
  props: {
1425
1346
  item: {}
1426
1347
  },
1427
1348
  setup(l) {
1428
- const i = l, n = A(() => {
1349
+ const i = l, n = O(() => {
1429
1350
  switch (String(i.item.value).toLowerCase()) {
1430
1351
  case "active":
1431
1352
  case "активний":
@@ -1448,7 +1369,7 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
1448
1369
  default:
1449
1370
  return "bg-blue-100 text-blue-800";
1450
1371
  }
1451
- }), e = A(() => {
1372
+ }), t = O(() => {
1452
1373
  switch (String(i.item.value).toLowerCase()) {
1453
1374
  case "active":
1454
1375
  case "активний":
@@ -1472,50 +1393,50 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
1472
1393
  return "fas fa-info-circle";
1473
1394
  }
1474
1395
  });
1475
- return (s, f) => (o(), a("div", Qs, [
1476
- t("span", {
1477
- class: _(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", n.value])
1396
+ return (s, f) => (a(), r("div", Ns, [
1397
+ e("span", {
1398
+ class: D(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", n.value])
1478
1399
  }, [
1479
- e.value ? (o(), a("span", Ys, [
1480
- t("i", {
1481
- class: _(e.value)
1400
+ t.value ? (a(), r("span", Rs, [
1401
+ e("i", {
1402
+ class: D(t.value)
1482
1403
  }, null, 2)
1483
- ])) : x("", !0),
1484
- V(" " + v(String(s.item.value)), 1)
1404
+ ])) : $("", !0),
1405
+ H(" " + k(String(s.item.value)), 1)
1485
1406
  ], 2)
1486
1407
  ]));
1487
1408
  }
1488
- }), to = /* @__PURE__ */ B(eo, [["__scopeId", "data-v-c72e0b01"]]), so = { class: "custom-value" }, oo = { class: "text-sm text-gray-900" }, no = /* @__PURE__ */ C({
1409
+ }), Ps = /* @__PURE__ */ P(Us, [["__scopeId", "data-v-c72e0b01"]]), Ws = { class: "custom-value" }, Gs = { class: "text-sm text-gray-900" }, qs = /* @__PURE__ */ I({
1489
1410
  __name: "CustomValue",
1490
1411
  props: {
1491
1412
  item: {}
1492
1413
  },
1493
1414
  setup(l) {
1494
- return (i, n) => (o(), a("div", so, [
1495
- U(i.$slots, "default", {
1415
+ return (i, n) => (a(), r("div", Ws, [
1416
+ G(i.$slots, "default", {
1496
1417
  item: i.item,
1497
1418
  value: i.item.value
1498
1419
  }, () => [
1499
- t("span", oo, v(String(i.item.value)), 1)
1420
+ e("span", Gs, k(String(i.item.value)), 1)
1500
1421
  ], !0)
1501
1422
  ]));
1502
1423
  }
1503
- }), io = /* @__PURE__ */ B(no, [["__scopeId", "data-v-11a73810"]]), lo = ["id"], ao = {
1424
+ }), Ks = /* @__PURE__ */ P(qs, [["__scopeId", "data-v-11a73810"]]), Zs = ["id"], Js = {
1504
1425
  key: 0,
1505
1426
  class: "text-xl font-semibold text-gray-900 mb-4"
1506
- }, ro = {
1427
+ }, Xs = {
1507
1428
  key: 1,
1508
1429
  class: "overflow-x-auto"
1509
- }, co = { class: "min-w-full divide-y divide-gray-200" }, uo = { class: "bg-white divide-y divide-gray-200" }, po = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, mo = { class: "flex items-center gap-2" }, go = ["title"], ho = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, fo = {
1430
+ }, Qs = { class: "min-w-full divide-y divide-gray-200" }, Ys = { class: "bg-white divide-y divide-gray-200" }, eo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, to = { class: "flex items-center gap-2" }, so = ["title"], oo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, no = {
1510
1431
  key: 2,
1511
1432
  class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
1512
- }, vo = { class: "flex items-start gap-3" }, yo = {
1433
+ }, io = { class: "flex items-start gap-3" }, ao = {
1513
1434
  key: 0,
1514
1435
  class: "flex-shrink-0"
1515
- }, bo = { class: "flex-1 min-w-0" }, xo = { class: "flex items-center gap-2 mb-2" }, ko = { class: "text-sm font-medium text-gray-900" }, wo = ["title"], _o = {
1436
+ }, lo = { class: "flex-1 min-w-0" }, ro = { class: "flex items-center gap-2 mb-2" }, co = { class: "text-sm font-medium text-gray-900" }, uo = ["title"], po = {
1516
1437
  key: 3,
1517
1438
  class: "overflow-x-auto"
1518
- }, $o = { class: "min-w-full divide-y divide-gray-200" }, Co = { class: "bg-white divide-y divide-gray-200" }, Mo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, Lo = { class: "flex items-center gap-2" }, Do = ["title"], To = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, jo = /* @__PURE__ */ C({
1439
+ }, mo = { class: "min-w-full divide-y divide-gray-200" }, go = { class: "bg-white divide-y divide-gray-200" }, ho = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, fo = { class: "flex items-center gap-2" }, vo = ["title"], yo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, bo = /* @__PURE__ */ I({
1519
1440
  __name: "DescriptionListWidget",
1520
1441
  props: {
1521
1442
  title: {},
@@ -1529,109 +1450,109 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
1529
1450
  const i = (n) => {
1530
1451
  switch (n.type) {
1531
1452
  case "link":
1532
- return Ps;
1453
+ return As;
1533
1454
  case "date":
1534
- return Xs;
1455
+ return Bs;
1535
1456
  case "status":
1536
- return to;
1457
+ return Ps;
1537
1458
  case "custom":
1538
- return io;
1459
+ return Ks;
1539
1460
  default:
1540
- return Us;
1461
+ return js;
1541
1462
  }
1542
1463
  };
1543
- return (n, e) => (o(), a("div", {
1544
- class: _(["description-list-widget", n.className]),
1464
+ return (n, t) => (a(), r("div", {
1465
+ class: D(["description-list-widget", n.className]),
1545
1466
  id: n.id,
1546
- style: E(n.style)
1467
+ style: R(n.style)
1547
1468
  }, [
1548
- n.title ? (o(), a("h3", ao, v(n.title), 1)) : x("", !0),
1549
- n.view === "table" ? (o(), a("div", ro, [
1550
- t("table", co, [
1551
- t("tbody", uo, [
1552
- (o(!0), a(z, null, F(n.items, (s) => (o(), a("tr", {
1469
+ n.title ? (a(), r("h3", Js, k(n.title), 1)) : $("", !0),
1470
+ n.view === "table" ? (a(), r("div", Xs, [
1471
+ e("table", Qs, [
1472
+ e("tbody", Ys, [
1473
+ (a(!0), r(A, null, S(n.items, (s) => (a(), r("tr", {
1553
1474
  key: s.id || s.label
1554
1475
  }, [
1555
- t("td", po, [
1556
- t("div", mo, [
1557
- s.icon ? (o(), a("i", {
1476
+ e("td", eo, [
1477
+ e("div", to, [
1478
+ s.icon ? (a(), r("i", {
1558
1479
  key: 0,
1559
- class: _([s.icon, "text-gray-500"])
1560
- }, null, 2)) : x("", !0),
1561
- V(" " + v(s.label) + " ", 1),
1562
- s.tooltip ? (o(), a("span", {
1480
+ class: D([s.icon, "text-gray-500"])
1481
+ }, null, 2)) : $("", !0),
1482
+ H(" " + k(s.label) + " ", 1),
1483
+ s.tooltip ? (a(), r("span", {
1563
1484
  key: 1,
1564
1485
  class: "text-gray-400 cursor-help",
1565
1486
  title: s.tooltip
1566
- }, e[0] || (e[0] = [
1567
- t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1568
- ]), 8, go)) : x("", !0)
1487
+ }, t[0] || (t[0] = [
1488
+ e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1489
+ ]), 8, so)) : $("", !0)
1569
1490
  ])
1570
1491
  ]),
1571
- t("td", ho, [
1572
- (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1492
+ e("td", oo, [
1493
+ (a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
1573
1494
  ])
1574
1495
  ]))), 128))
1575
1496
  ])
1576
1497
  ])
1577
- ])) : n.view === "grid" ? (o(), a("div", fo, [
1578
- (o(!0), a(z, null, F(n.items, (s) => (o(), a("div", {
1498
+ ])) : n.view === "grid" ? (a(), r("div", no, [
1499
+ (a(!0), r(A, null, S(n.items, (s) => (a(), r("div", {
1579
1500
  key: s.id || s.label,
1580
1501
  class: "description-item-card bg-white border border-gray-200 rounded-lg p-4"
1581
1502
  }, [
1582
- t("div", vo, [
1583
- s.icon ? (o(), a("div", yo, [
1584
- t("i", {
1585
- class: _([s.icon, "text-gray-500 text-lg"])
1503
+ e("div", io, [
1504
+ s.icon ? (a(), r("div", ao, [
1505
+ e("i", {
1506
+ class: D([s.icon, "text-gray-500 text-lg"])
1586
1507
  }, null, 2)
1587
- ])) : x("", !0),
1588
- t("div", bo, [
1589
- t("div", xo, [
1590
- t("h4", ko, v(s.label), 1),
1591
- s.tooltip ? (o(), a("span", {
1508
+ ])) : $("", !0),
1509
+ e("div", lo, [
1510
+ e("div", ro, [
1511
+ e("h4", co, k(s.label), 1),
1512
+ s.tooltip ? (a(), r("span", {
1592
1513
  key: 0,
1593
1514
  class: "text-gray-400 cursor-help",
1594
1515
  title: s.tooltip
1595
- }, e[1] || (e[1] = [
1596
- t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1597
- ]), 8, wo)) : x("", !0)
1516
+ }, t[1] || (t[1] = [
1517
+ e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1518
+ ]), 8, uo)) : $("", !0)
1598
1519
  ]),
1599
- (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1520
+ (a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
1600
1521
  ])
1601
1522
  ])
1602
1523
  ]))), 128))
1603
- ])) : (o(), a("div", _o, [
1604
- t("table", $o, [
1605
- t("tbody", Co, [
1606
- (o(!0), a(z, null, F(n.items, (s) => (o(), a("tr", {
1524
+ ])) : (a(), r("div", po, [
1525
+ e("table", mo, [
1526
+ e("tbody", go, [
1527
+ (a(!0), r(A, null, S(n.items, (s) => (a(), r("tr", {
1607
1528
  key: s.id || s.label
1608
1529
  }, [
1609
- t("td", Mo, [
1610
- t("div", Lo, [
1611
- s.icon ? (o(), a("i", {
1530
+ e("td", ho, [
1531
+ e("div", fo, [
1532
+ s.icon ? (a(), r("i", {
1612
1533
  key: 0,
1613
- class: _([s.icon, "text-gray-500"])
1614
- }, null, 2)) : x("", !0),
1615
- V(" " + v(s.label) + " ", 1),
1616
- s.tooltip ? (o(), a("span", {
1534
+ class: D([s.icon, "text-gray-500"])
1535
+ }, null, 2)) : $("", !0),
1536
+ H(" " + k(s.label) + " ", 1),
1537
+ s.tooltip ? (a(), r("span", {
1617
1538
  key: 1,
1618
1539
  class: "text-gray-400 cursor-help",
1619
1540
  title: s.tooltip
1620
- }, e[2] || (e[2] = [
1621
- t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1622
- ]), 8, Do)) : x("", !0)
1541
+ }, t[2] || (t[2] = [
1542
+ e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1543
+ ]), 8, vo)) : $("", !0)
1623
1544
  ])
1624
1545
  ]),
1625
- t("td", To, [
1626
- (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1546
+ e("td", yo, [
1547
+ (a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
1627
1548
  ])
1628
1549
  ]))), 128))
1629
1550
  ])
1630
1551
  ])
1631
1552
  ]))
1632
- ], 14, lo));
1553
+ ], 14, Zs));
1633
1554
  }
1634
- }), Io = /* @__PURE__ */ B(jo, [["__scopeId", "data-v-36d43e50"]]), Vo = {
1555
+ }), Ce = /* @__PURE__ */ P(bo, [["__scopeId", "data-v-36d43e50"]]), xo = {
1635
1556
  draw: {
1636
1557
  toolbar: {
1637
1558
  actions: {
@@ -1739,7 +1660,7 @@ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = {
1739
1660
  }
1740
1661
  }
1741
1662
  };
1742
- function zo(l) {
1663
+ function ko(l) {
1743
1664
  return l ? l.type === "FeatureCollection" || l.type === "Feature" ? l : l.geom ? {
1744
1665
  type: "Feature",
1745
1666
  geometry: {
@@ -1753,17 +1674,20 @@ function zo(l) {
1753
1674
  properties: {}
1754
1675
  } : null : null;
1755
1676
  }
1756
- const Fo = { class: "relative" }, Ao = {
1677
+ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
1757
1678
  key: 1,
1758
1679
  class: "bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"
1759
- }, Ho = { class: "flex items-center justify-between p-2 border-b" }, So = { class: "p-2 border-b" }, Eo = { class: "flex items-center" }, Oo = { class: "flex items-center" }, Bo = { class: "flex items-center" }, Ro = { class: "p-2" }, No = { class: "flex items-center" }, fe = /* @__PURE__ */ C({
1680
+ }, $o = { class: "flex items-center justify-between p-2 border-b" }, Co = { class: "p-2 border-b" }, Mo = { class: "flex items-center" }, Lo = { class: "flex items-center" }, Do = { class: "flex items-center" }, To = { class: "p-2" }, Io = { class: "flex items-center" }, ae = /* @__PURE__ */ I({
1760
1681
  __name: "MapWidget",
1761
1682
  props: {
1762
- data: {}
1683
+ geom: {},
1684
+ id: {},
1685
+ className: {},
1686
+ style: {}
1763
1687
  },
1764
1688
  setup(l) {
1765
- const i = l, n = w(null);
1766
- let e, s;
1689
+ const i = l, n = M(null);
1690
+ let t, s;
1767
1691
  const f = {
1768
1692
  topo100: {
1769
1693
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"
@@ -1774,69 +1698,69 @@ const Fo = { class: "relative" }, Ao = {
1774
1698
  osmb: {
1775
1699
  url: "https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"
1776
1700
  }
1777
- }, p = w("topo100");
1778
- let g;
1779
- const u = w(!0), m = w(!1);
1780
- function r() {
1781
- return new Promise((M, d) => {
1782
- if (window.L && window.L.Draw) return M(0);
1783
- const c = (k) => {
1784
- if (Array.from(document.styleSheets).some((q) => q?.href?.includes(k))) return;
1785
- const N = document.createElement("link");
1786
- N.rel = "stylesheet", N.href = k, document.head.appendChild(N);
1787
- }, T = (k) => new Promise((j, N) => {
1788
- const q = Array.from(document.scripts).find((K) => K.src === k);
1789
- if (q) {
1790
- q.addEventListener("load", () => j()), q.addEventListener("error", (K) => N(K));
1701
+ }, o = M("topo100");
1702
+ let m;
1703
+ const v = M(!0), g = M(!1);
1704
+ function d() {
1705
+ return new Promise((V, c) => {
1706
+ if (window.L && window.L.Draw) return V(0);
1707
+ const h = (C) => {
1708
+ if (Array.from(document.styleSheets).some((E) => E?.href?.includes(C))) return;
1709
+ const u = document.createElement("link");
1710
+ u.rel = "stylesheet", u.href = C, document.head.appendChild(u);
1711
+ }, F = (C) => new Promise((x, u) => {
1712
+ const E = Array.from(document.scripts).find((z) => z.src === C);
1713
+ if (E) {
1714
+ E.addEventListener("load", () => x()), E.addEventListener("error", (z) => u(z));
1791
1715
  return;
1792
1716
  }
1793
- const P = document.createElement("script");
1794
- P.src = k, P.async = !0, P.onload = () => j(), P.onerror = (K) => N(K), document.body.appendChild(P);
1717
+ const B = document.createElement("script");
1718
+ B.src = C, B.async = !0, B.onload = () => x(), B.onerror = (z) => u(z), document.body.appendChild(B);
1795
1719
  });
1796
- c("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), c("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), T("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => T("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => M(0)).catch(d);
1720
+ h("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), h("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), F("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => F("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => V(0)).catch(c);
1797
1721
  });
1798
1722
  }
1799
- oe(async () => {
1800
- await r(), L.drawLocal = Vo, e = L.map(n.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(e), g = L.tileLayer(f.topo100.url, { maxZoom: 19 }).addTo(e), p.value = "topo100", s = new L.FeatureGroup().addTo(e);
1801
- const M = zo(i.data);
1802
- if (M) {
1803
- const d = [];
1804
- L.geoJSON(M).eachLayer((c) => d.push(c)), d.length && s.addLayer(d[0]), s.toGeoJSON(), h();
1723
+ re(async () => {
1724
+ await d(), L.drawLocal = xo, t = L.map(n.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(t), m = L.tileLayer(f.topo100.url, { maxZoom: 19 }).addTo(t), o.value = "topo100", s = new L.FeatureGroup().addTo(t);
1725
+ const V = ko(i.geom);
1726
+ if (V) {
1727
+ const c = [];
1728
+ L.geoJSON(V).eachLayer((h) => c.push(h)), c.length && s.addLayer(c[0]), s.toGeoJSON(), y();
1805
1729
  }
1806
1730
  });
1807
- function h(M = 30) {
1808
- const d = s.getLayers();
1809
- if (!d.length) return;
1810
- const T = L.featureGroup(d).getBounds();
1811
- T && T.isValid() && e.fitBounds(T, { padding: [M, M] });
1731
+ function y(V = 30) {
1732
+ const c = s.getLayers();
1733
+ if (!c.length) return;
1734
+ const F = L.featureGroup(c).getBounds();
1735
+ F && F.isValid() && t.fitBounds(F, { padding: [V, V] });
1812
1736
  }
1813
- function I(M) {
1814
- g && g.removeFrom(e);
1815
- const d = f[M];
1816
- g = L.tileLayer(d.url, d.options || {}).addTo(e), p.value = M;
1737
+ function p(V) {
1738
+ m && m.removeFrom(t);
1739
+ const c = f[V];
1740
+ m = L.tileLayer(c.url, c.options || {}).addTo(t), o.value = V;
1817
1741
  }
1818
- function H() {
1819
- I(p.value);
1742
+ function b() {
1743
+ p(o.value);
1820
1744
  }
1821
- function R() {
1822
- s && (u.value ? s.addTo(e) : s.removeFrom(e));
1745
+ function W() {
1746
+ s && (v.value ? s.addTo(t) : s.removeFrom(t));
1823
1747
  }
1824
- return (M, d) => (o(), a("div", Fo, [
1825
- t("div", {
1748
+ return (V, c) => (a(), r("div", _o, [
1749
+ e("div", {
1826
1750
  ref_key: "mapContainer",
1827
1751
  ref: n,
1828
- class: "w-full h-[350px]"
1752
+ class: "w-full h-full"
1829
1753
  }, null, 512),
1830
- m.value ? x("", !0) : (o(), a("div", {
1754
+ g.value ? $("", !0) : (a(), r("div", {
1831
1755
  key: 0,
1832
- onClick: d[0] || (d[0] = (c) => m.value = !0),
1756
+ onClick: c[0] || (c[0] = (h) => g.value = !0),
1833
1757
  class: "z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"
1834
1758
  }, " Шари ")),
1835
- m.value ? (o(), a("div", Ao, [
1836
- t("div", Ho, [
1837
- d[7] || (d[7] = t("div", null, "Шари", -1)),
1838
- (o(), a("svg", {
1839
- onClick: d[1] || (d[1] = (c) => m.value = !1),
1759
+ g.value ? (a(), r("div", wo, [
1760
+ e("div", $o, [
1761
+ c[7] || (c[7] = e("div", null, "Шари", -1)),
1762
+ (a(), r("svg", {
1763
+ onClick: c[1] || (c[1] = (h) => g.value = !1),
1840
1764
  xmlns: "http://www.w3.org/2000/svg",
1841
1765
  viewBox: "0 0 24 24",
1842
1766
  fill: "none",
@@ -1845,89 +1769,254 @@ const Fo = { class: "relative" }, Ao = {
1845
1769
  "stroke-linecap": "round",
1846
1770
  "stroke-linejoin": "round",
1847
1771
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"
1848
- }, d[6] || (d[6] = [
1849
- t("path", {
1772
+ }, c[6] || (c[6] = [
1773
+ e("path", {
1850
1774
  stroke: "none",
1851
1775
  d: "M0 0h24v24H0z",
1852
1776
  fill: "none"
1853
1777
  }, null, -1),
1854
- t("path", { d: "M18 6l-12 12" }, null, -1),
1855
- t("path", { d: "M6 6l12 12" }, null, -1)
1778
+ e("path", { d: "M18 6l-12 12" }, null, -1),
1779
+ e("path", { d: "M6 6l12 12" }, null, -1)
1856
1780
  ])))
1857
1781
  ]),
1858
- t("div", So, [
1859
- t("div", null, [
1860
- t("label", Eo, [
1861
- O(t("input", {
1782
+ e("div", Co, [
1783
+ e("div", null, [
1784
+ e("label", Mo, [
1785
+ U(e("input", {
1862
1786
  type: "radio",
1863
1787
  name: "base-layer",
1864
1788
  value: "topo100",
1865
- "onUpdate:modelValue": d[2] || (d[2] = (c) => p.value = c),
1866
- onChange: H
1789
+ "onUpdate:modelValue": c[2] || (c[2] = (h) => o.value = h),
1790
+ onChange: b
1867
1791
  }, null, 544), [
1868
- [Q, p.value]
1792
+ [Q, o.value]
1869
1793
  ]),
1870
- d[8] || (d[8] = t("span", { class: "ml-2" }, "Карта України", -1))
1794
+ c[8] || (c[8] = e("span", { class: "ml-2" }, "Карта України", -1))
1871
1795
  ])
1872
1796
  ]),
1873
- t("div", null, [
1874
- t("label", Oo, [
1875
- O(t("input", {
1797
+ e("div", null, [
1798
+ e("label", Lo, [
1799
+ U(e("input", {
1876
1800
  type: "radio",
1877
1801
  name: "base-layer",
1878
1802
  value: "orto10",
1879
- "onUpdate:modelValue": d[3] || (d[3] = (c) => p.value = c),
1880
- onChange: H
1803
+ "onUpdate:modelValue": c[3] || (c[3] = (h) => o.value = h),
1804
+ onChange: b
1881
1805
  }, null, 544), [
1882
- [Q, p.value]
1806
+ [Q, o.value]
1883
1807
  ]),
1884
- d[9] || (d[9] = t("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
1808
+ c[9] || (c[9] = e("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
1885
1809
  ])
1886
1810
  ]),
1887
- t("div", null, [
1888
- t("label", Bo, [
1889
- O(t("input", {
1811
+ e("div", null, [
1812
+ e("label", Do, [
1813
+ U(e("input", {
1890
1814
  type: "radio",
1891
1815
  name: "base-layer",
1892
1816
  value: "osmb",
1893
- "onUpdate:modelValue": d[4] || (d[4] = (c) => p.value = c),
1894
- onChange: H
1817
+ "onUpdate:modelValue": c[4] || (c[4] = (h) => o.value = h),
1818
+ onChange: b
1895
1819
  }, null, 544), [
1896
- [Q, p.value]
1820
+ [Q, o.value]
1897
1821
  ]),
1898
- d[10] || (d[10] = t("span", { class: "ml-2" }, "Open Street Map", -1))
1822
+ c[10] || (c[10] = e("span", { class: "ml-2" }, "Open Street Map", -1))
1899
1823
  ])
1900
1824
  ])
1901
1825
  ]),
1902
- t("div", Ro, [
1903
- t("label", No, [
1904
- O(t("input", {
1826
+ e("div", To, [
1827
+ e("label", Io, [
1828
+ U(e("input", {
1905
1829
  type: "checkbox",
1906
- "onUpdate:modelValue": d[5] || (d[5] = (c) => u.value = c),
1907
- onChange: R
1830
+ "onUpdate:modelValue": c[5] || (c[5] = (h) => v.value = h),
1831
+ onChange: W
1908
1832
  }, null, 544), [
1909
- [De, u.value]
1833
+ [Te, v.value]
1910
1834
  ]),
1911
- d[11] || (d[11] = t("span", { class: "ml-2" }, " Показати геометрію ", -1))
1835
+ c[11] || (c[11] = e("span", { class: "ml-2" }, " Показати геометрію ", -1))
1912
1836
  ])
1913
1837
  ])
1914
- ])) : x("", !0)
1838
+ ])) : $("", !0)
1915
1839
  ]));
1916
1840
  }
1917
- }), Wo = {
1918
- install: (l) => {
1919
- l.component("vs-widget-file", ge), l.component("vs-widget-comments", ce), l.component("vs-widget-history", pe), l.component("vs-widget-gallery", he), l.component("vs-widget-map", fe), l.component("CommentsWidget", ce), l.component("HistoryWidget", pe), l.component("GalleryWidget", he), l.component("FilesWidget", ge), l.component("MapWidget", fe), l.component("Card", Ss), l.component("CardItem", Os), l.component("DescriptionListWidget", Io), l.component("CopyNotification", _e);
1841
+ }), zo = {
1842
+ "vs-widget-map": ae,
1843
+ "vs-widget-comments": se,
1844
+ "vs-widget-history": oe,
1845
+ "vs-widget-gallery": ie,
1846
+ "vs-widget-file": ne,
1847
+ "vs-widget-list": Ce
1848
+ }, jo = {
1849
+ key: 0,
1850
+ class: "overflow-hidden"
1851
+ }, Vo = { class: "flex border-b border-gray-200 bg-gray-50" }, Fo = ["onClick"], Ho = { class: "p-1" }, Ao = ["innerHTML"], So = {
1852
+ key: 1,
1853
+ class: "p-1"
1854
+ }, Eo = { class: "grid grid-cols-12 gap-4" }, Oo = {
1855
+ key: 0,
1856
+ class: "mb-4 pb-2 border-b border-gray-200"
1857
+ }, Bo = { class: "text-lg font-semibold text-gray-900" }, No = ["innerHTML"], ve = /* @__PURE__ */ I({
1858
+ __name: "Card",
1859
+ props: {
1860
+ panels: { default: () => [] },
1861
+ data: { default: () => ({}) },
1862
+ view: { default: "plain" },
1863
+ classWrapper: { default: "" },
1864
+ classPanel: {},
1865
+ normalizeTabs: { type: Boolean, default: !1 },
1866
+ id: {},
1867
+ className: {},
1868
+ style: {}
1869
+ },
1870
+ setup(l) {
1871
+ const i = l, n = M(0);
1872
+ function t(d) {
1873
+ return zo[d] || d;
1874
+ }
1875
+ function s(d) {
1876
+ const y = [];
1877
+ for (const p of d) {
1878
+ if (!p?.items) {
1879
+ y.push(p);
1880
+ continue;
1881
+ }
1882
+ if (p.items.length === 1) {
1883
+ let b = p.items[0];
1884
+ delete p.items, b = { ...p, ...b }, y.push(b);
1885
+ } else {
1886
+ const b = p;
1887
+ b.component = "Card", p.type && (b.view = p.type.includes("tab") ? "tab" : "plain"), b.panels = p.items, b.data = i.data, b.normalizeTabs = !1, y.push(b);
1888
+ }
1889
+ }
1890
+ return y;
1891
+ }
1892
+ const f = O(() => i.panels && i.panels.length > 0 ? i.normalizeTabs ? s(i.panels) : i.panels : i.data && Array.isArray(i.data) ? i.data.filter((y) => y.type === "tabs")[0]?.items || [] : []), o = O(() => i.panels && i.panels.length > 0 ? i.normalizeTabs ? s(i.panels) : i.panels : i.data && Array.isArray(i.data) ? i.data : []), m = O(() => ({
1893
+ [`view-${i.view}`]: !0
1894
+ })), v = (d) => {
1895
+ const y = i.data ? { ...i.data } : {};
1896
+ return d.count && (y.count = d.count), d.col && (y.col = d.col), y;
1897
+ }, g = (d) => d.width ? {
1898
+ gridColumn: `span ${d.width}`
1899
+ } : {};
1900
+ return (d, y) => (a(), r("div", {
1901
+ class: D(m.value + d.classWrapper)
1902
+ }, [
1903
+ d.view === "tab" ? (a(), r("div", jo, [
1904
+ e("div", Vo, [
1905
+ (a(!0), r(A, null, S(f.value, (p, b) => (a(), r("button", {
1906
+ key: p.name || b,
1907
+ onClick: (W) => n.value = b,
1908
+ class: D([
1909
+ "px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
1910
+ { "text-blue-600 bg-white border-b-2 border-blue-600": n.value === b }
1911
+ ])
1912
+ }, k(p.title || p.label || p.name || `Tab ${b + 1}`), 11, Fo))), 128))
1913
+ ]),
1914
+ e("div", Ho, [
1915
+ (a(!0), r(A, null, S(f.value, (p, b) => U((a(), r("div", {
1916
+ key: p.name || b,
1917
+ class: D([
1918
+ d.classPanel || "w-full border-gray-100",
1919
+ `col-span-${p.col || 12}`
1920
+ ])
1921
+ }, [
1922
+ p.html ? (a(), r("div", {
1923
+ key: 0,
1924
+ innerHTML: p.html,
1925
+ class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1926
+ }, null, 8, Ao)) : d.$slots[`tab-${b}`] ? G(d.$slots, `tab-${b}`, {
1927
+ key: 1,
1928
+ item: p,
1929
+ data: d.data
1930
+ }) : p.component ? (a(), j(N(p.component), te({
1931
+ key: 2,
1932
+ ref_for: !0
1933
+ }, p.component === "Card" ? p : v(p), { class: "w-full h-full" }), null, 16)) : G(d.$slots, p.slot || `tab-${b}`, {
1934
+ key: 3,
1935
+ item: p,
1936
+ data: d.data
1937
+ })
1938
+ ], 2)), [
1939
+ [Ie, n.value === b]
1940
+ ])), 128))
1941
+ ])
1942
+ ])) : (a(), r("div", So, [
1943
+ e("div", Eo, [
1944
+ (a(!0), r(A, null, S(o.value, (p, b) => (a(), r("div", {
1945
+ key: p.name || b,
1946
+ class: D([
1947
+ d.classPanel || "bg-gray-50 rounded-lg p-4 border-gray-100",
1948
+ `col-span-${p.col || 12}`
1949
+ ]),
1950
+ style: R(g(p))
1951
+ }, [
1952
+ p.title || p.label ? (a(), r("div", Oo, [
1953
+ e("h3", Bo, k(p.title || p.label), 1)
1954
+ ])) : $("", !0),
1955
+ p.html ? (a(), r("div", {
1956
+ key: 1,
1957
+ innerHTML: p.html,
1958
+ class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1959
+ }, null, 8, No)) : d.$slots[`panel-${b}`] ? G(d.$slots, `panel-${b}`, {
1960
+ key: 2,
1961
+ item: p,
1962
+ data: d.data
1963
+ }) : p.component ? (a(), j(N(t(p.component)), te({
1964
+ key: 3,
1965
+ ref_for: !0
1966
+ }, p.component === "Card" ? p : v(p), { class: "w-full h-full" }), null, 16)) : G(d.$slots, p.slot || `panel-${b}`, {
1967
+ key: 4,
1968
+ item: p,
1969
+ data: d.data
1970
+ })
1971
+ ], 6))), 128))
1972
+ ])
1973
+ ]))
1974
+ ], 2));
1975
+ }
1976
+ }), Ro = ["innerHTML"], Uo = /* @__PURE__ */ I({
1977
+ __name: "CardItem",
1978
+ props: {
1979
+ name: {},
1980
+ label: {},
1981
+ component: {},
1982
+ slot: {},
1983
+ col: { default: 12 },
1984
+ html: {},
1985
+ title: {},
1986
+ id: {},
1987
+ className: {},
1988
+ style: {}
1989
+ },
1990
+ setup(l) {
1991
+ const i = l, n = O(() => ({
1992
+ [`col-span-${i.col}`]: !0
1993
+ })), t = O(() => {
1994
+ const s = {};
1995
+ return s.col && (s.col = s.col), s;
1996
+ });
1997
+ return (s, f) => (a(), r("div", {
1998
+ class: D(["w-full", n.value])
1999
+ }, [
2000
+ s.html ? (a(), r("div", {
2001
+ key: 0,
2002
+ innerHTML: s.html,
2003
+ class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
2004
+ }, null, 8, Ro)) : s.component ? (a(), j(N(s.component), te({ key: 1 }, t.value, { class: "w-full" }), null, 16)) : G(s.$slots, "default", { key: 2 })
2005
+ ], 2));
1920
2006
  }
2007
+ });
2008
+ ve.install = function(l) {
2009
+ l.component("vs-widget-file", ne), l.component("vs-widget-comments", se), l.component("vs-widget-history", oe), l.component("vs-widget-gallery", ie), l.component("vs-widget-map", ae), l.component("CommentsWidget", se), l.component("HistoryWidget", oe), l.component("GalleryWidget", ie), l.component("FilesWidget", ne), l.component("MapWidget", ae), l.component("Card", ve), l.component("CardItem", Uo), l.component("DescriptionListWidget", Ce), l.component("CopyNotification", $e);
1921
2010
  };
1922
2011
  export {
1923
- Ss as Card,
1924
- Os as CardItem,
1925
- ce as CommentsWidget,
1926
- _e as CopyNotification,
1927
- Io as DescriptionListWidget,
1928
- ge as FilesWidget,
1929
- he as GalleryWidget,
1930
- pe as HistoryWidget,
1931
- fe as MapWidget,
1932
- Wo as default
2012
+ ve as Card,
2013
+ Uo as CardItem,
2014
+ se as CommentsWidget,
2015
+ $e as CopyNotification,
2016
+ Ce as DescriptionListWidget,
2017
+ ne as FilesWidget,
2018
+ ie as GalleryWidget,
2019
+ oe as HistoryWidget,
2020
+ ae as MapWidget,
2021
+ ve as default
1933
2022
  };