@opengis/form 0.0.63 → 0.0.65

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,15 +1,15 @@
1
- import { defineComponent as G, ref as w, onMounted as ye, onUnmounted as Qe, createElementBlock as u, openBlock as i, createCommentVNode as U, renderSlot as Le, createElementVNode as l, toDisplayString as W, mergeProps as Fe, computed as S, normalizeStyle as be, createTextVNode as ge, normalizeProps as at, guardReactiveProps as st, normalizeClass as T, mergeModels as ie, useModel as de, withDirectives as ne, unref as te, vModelText as he, vModelCheckbox as jt, createVNode as R, createBlock as me, resolveDynamicComponent as Oe, withCtx as Ee, withModifiers as $e, onBeforeUnmount as rt, watch as ue, createStaticVNode as xe, vModelRadio as Et, Fragment as re, renderList as fe, reactive as qt, vModelDynamic as Kt, vShow as it, inject as Ae, resolveComponent as xt, Transition as ut, nextTick as je, Teleport as It, getCurrentInstance as Wt, watchEffect as Zt, toRef as Jt, provide as wt } from "vue";
2
- import { notify as ce, VsModal as zt, modal as Yt } from "@opengis/core";
3
- const Xt = { class: "w-full relative" }, Qt = {
1
+ import { defineComponent as G, ref as w, onMounted as ye, onUnmounted as Xe, createElementBlock as u, openBlock as i, createCommentVNode as D, renderSlot as Me, createElementVNode as l, toDisplayString as K, mergeProps as Fe, computed as B, normalizeStyle as be, createTextVNode as he, normalizeProps as at, guardReactiveProps as st, normalizeClass as T, mergeModels as ie, useModel as de, withDirectives as ne, unref as le, vModelText as me, vModelCheckbox as Bt, createVNode as R, createBlock as ve, resolveDynamicComponent as Oe, withCtx as Ee, withModifiers as $e, onBeforeUnmount as rt, watch as ue, createStaticVNode as xe, vModelRadio as jt, Fragment as re, renderList as pe, reactive as Gt, vModelDynamic as qt, vShow as it, inject as Ae, resolveComponent as yt, Transition as ut, nextTick as je, Teleport as Et, getCurrentInstance as Kt, watchEffect as Wt, toRef as Zt, provide as xt } from "vue";
2
+ import { notify as ce, VsModal as It, modal as Jt } from "@opengis/core";
3
+ const Yt = { class: "w-full relative" }, Xt = {
4
4
  key: 0,
5
5
  class: "text-[14px] font-medium text-gray-900 mb-2"
6
- }, el = { class: "opacity-100" }, tl = {
6
+ }, Qt = { class: "opacity-100" }, el = {
7
7
  key: 0,
8
8
  class: "text-red-500 text-[14px]"
9
- }, ll = {
9
+ }, tl = {
10
10
  key: 1,
11
11
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
12
- }, ol = /* @__PURE__ */ G({
12
+ }, ll = /* @__PURE__ */ G({
13
13
  __name: "vs-layout-default",
14
14
  props: {
15
15
  ua: { default: "" },
@@ -29,26 +29,26 @@ const Xt = { class: "w-full relative" }, Qt = {
29
29
  };
30
30
  return ye(() => {
31
31
  e.value = localStorage.locale, window.addEventListener("storage", t);
32
- }), Qe(() => {
32
+ }), Xe(() => {
33
33
  window.removeEventListener("resize", t);
34
- }), (s, n) => (i(), u("div", Xt, [
35
- s.ua || s.label ? (i(), u("div", Qt, [
36
- l("span", el, W(s.item[e.value] || s.ua || s.label), 1),
37
- s.item?.rules?.includes("required") ? (i(), u("span", tl, "*")) : U("", !0)
38
- ])) : U("", !0),
39
- Le(s.$slots, "default", Fe(s.$attrs, {
34
+ }), (s, n) => (i(), u("div", Yt, [
35
+ s.ua || s.label ? (i(), u("div", Xt, [
36
+ l("span", Qt, K(s.item[e.value] || s.ua || s.label), 1),
37
+ s.item?.rules?.includes("required") ? (i(), u("span", el, "*")) : D("", !0)
38
+ ])) : D("", !0),
39
+ Me(s.$slots, "default", Fe(s.$attrs, {
40
40
  class: { "opacity-60": s.item.disabled }
41
41
  })),
42
- s.error ? (i(), u("span", ll, W(s.error), 1)) : U("", !0)
42
+ s.error ? (i(), u("span", tl, K(s.error), 1)) : D("", !0)
43
43
  ]));
44
44
  }
45
- }), nl = { class: "w-full relative flex flex-row items-center gap-2" }, al = {
45
+ }), ol = { class: "w-full relative flex flex-row items-center gap-2" }, nl = {
46
46
  key: 0,
47
47
  class: "text-red-500 text-[14px]"
48
- }, sl = {
48
+ }, al = {
49
49
  key: 1,
50
50
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
51
- }, rl = /* @__PURE__ */ G({
51
+ }, sl = /* @__PURE__ */ G({
52
52
  __name: "vs-layout-horizontal",
53
53
  props: {
54
54
  ua: { default: "" },
@@ -63,14 +63,14 @@ const Xt = { class: "w-full relative" }, Qt = {
63
63
  columns: { default: () => ({ container: 12, label: 3 }) }
64
64
  },
65
65
  setup(o) {
66
- const e = o, t = S(() => e.columns ?? { container: 12, label: 3 }), s = S(() => {
66
+ const e = o, t = B(() => e.columns ?? { container: 12, label: 3 }), s = B(() => {
67
67
  const { container: d, label: c } = t.value;
68
68
  return !d || d <= 0 ? 0 : Math.min(Math.max(c ?? 0, 0), d) / d;
69
- }), n = S(() => e.item?.type === "html" || s.value <= 0 ? !1 : !!(e.ua || e.label)), a = S(() => {
69
+ }), n = B(() => e.item?.type === "html" || s.value <= 0 ? !1 : !!(e.ua || e.label)), a = B(() => {
70
70
  if (!n.value) return {};
71
71
  const d = `${s.value * 100}%`;
72
72
  return { flexBasis: d, maxWidth: d };
73
- }), r = S(() => {
73
+ }), r = B(() => {
74
74
  const { container: d, label: c } = t.value;
75
75
  if (!d || d <= 0) return {};
76
76
  if (e.item?.type === "html") return { flexBasis: "100%", maxWidth: "100%" };
@@ -80,28 +80,28 @@ const Xt = { class: "w-full relative" }, Qt = {
80
80
  const p = `${f * 100}%`;
81
81
  return { flexBasis: p, maxWidth: p };
82
82
  });
83
- return (d, c) => (i(), u("div", nl, [
83
+ return (d, c) => (i(), u("div", ol, [
84
84
  n.value ? (i(), u("span", {
85
85
  key: 0,
86
86
  class: "text-sm text-gray-900 font-medium flex shrink-0",
87
87
  style: be(a.value)
88
88
  }, [
89
- ge(W(d.ua || d.label) + " ", 1),
90
- d.item?.rules?.includes("required") && (d.ua || d.label) ? (i(), u("span", al, "*")) : U("", !0)
91
- ], 4)) : U("", !0),
89
+ he(K(d.ua || d.label) + " ", 1),
90
+ d.item?.rules?.includes("required") && (d.ua || d.label) ? (i(), u("span", nl, "*")) : D("", !0)
91
+ ], 4)) : D("", !0),
92
92
  l("div", {
93
93
  class: "flex-1 min-w-0",
94
94
  style: be(r.value)
95
95
  }, [
96
- Le(d.$slots, "default", at(st(d.$attrs)))
96
+ Me(d.$slots, "default", at(st(d.$attrs)))
97
97
  ], 4),
98
- d.error ? (i(), u("span", sl, W(d.error), 1)) : U("", !0)
98
+ d.error ? (i(), u("span", al, K(d.error), 1)) : D("", !0)
99
99
  ]));
100
100
  }
101
- }), il = { class: "w-full relative" }, ul = {
101
+ }), rl = { class: "w-full relative" }, il = {
102
102
  key: 0,
103
103
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
104
- }, dl = /* @__PURE__ */ G({
104
+ }, ul = /* @__PURE__ */ G({
105
105
  __name: "vs-layout-inline",
106
106
  props: {
107
107
  ua: { default: "" },
@@ -116,24 +116,24 @@ const Xt = { class: "w-full relative" }, Qt = {
116
116
  columns: {}
117
117
  },
118
118
  setup(o) {
119
- return (e, t) => (i(), u("div", il, [
120
- Le(e.$slots, "default", at(st(e.$attrs))),
121
- e.error ? (i(), u("span", ul, W(e.error), 1)) : U("", !0)
119
+ return (e, t) => (i(), u("div", rl, [
120
+ Me(e.$slots, "default", at(st(e.$attrs))),
121
+ e.error ? (i(), u("span", il, K(e.error), 1)) : D("", !0)
122
122
  ]));
123
123
  }
124
- }), cl = { class: "flex-1 min-w-0" }, pl = {
124
+ }), dl = { class: "flex-1 min-w-0" }, cl = {
125
125
  key: 0,
126
126
  class: "text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"
127
- }, fl = { class: "truncate" }, vl = {
127
+ }, pl = { class: "truncate" }, fl = {
128
128
  key: 0,
129
129
  class: "text-red-500 text-[14px]"
130
- }, ml = {
130
+ }, vl = {
131
131
  key: 1,
132
132
  class: "text-xs text-slate-500 dark:text-slate-400"
133
- }, hl = { class: "w-full md:w-auto" }, gl = {
133
+ }, ml = { class: "w-full md:w-auto" }, hl = {
134
134
  key: 0,
135
135
  class: "mt-1 text-xs text-red-500"
136
- }, bl = /* @__PURE__ */ G({
136
+ }, gl = /* @__PURE__ */ G({
137
137
  __name: "vs-layout-settings",
138
138
  props: {
139
139
  ua: { default: "" },
@@ -149,8 +149,8 @@ const Xt = { class: "w-full relative" }, Qt = {
149
149
  },
150
150
  setup(o) {
151
151
  const e = o, t = w("uk");
152
- S(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
153
- const s = S(() => e.item?.description ?? ""), n = S(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), a = S(() => (typeof e.error == "string" ? e.error : "") ?? ""), r = (d) => {
152
+ B(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
153
+ const s = B(() => e.item?.description ?? ""), n = B(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), a = B(() => (typeof e.error == "string" ? e.error : "") ?? ""), r = (d) => {
154
154
  d.key === "locale" && (t.value = d.newValue ?? "uk");
155
155
  };
156
156
  return ye(() => {
@@ -159,7 +159,7 @@ const Xt = { class: "w-full relative" }, Qt = {
159
159
  } catch {
160
160
  }
161
161
  window.addEventListener("storage", r);
162
- }), Qe(() => {
162
+ }), Xe(() => {
163
163
  window.removeEventListener("storage", r);
164
164
  }), (d, c) => (i(), u("div", {
165
165
  class: T(["w-full relative", { "opacity-60": d.item?.disabled }])
@@ -167,35 +167,35 @@ const Xt = { class: "w-full relative" }, Qt = {
167
167
  l("div", {
168
168
  class: T(["gap-2 md:flex-row md:items-center md:justify-between", [["switcher", "native-select"].includes(d.item.type) ? "flex flex-col" : ""]])
169
169
  }, [
170
- l("div", cl, [
171
- d.ua || d.label ? (i(), u("p", pl, [
172
- l("span", fl, W(d.item[t.value] || d.ua || d.label), 1),
173
- n.value ? (i(), u("span", vl, "*")) : U("", !0)
174
- ])) : U("", !0),
175
- s.value ? (i(), u("p", ml, W(s.value), 1)) : U("", !0)
170
+ l("div", dl, [
171
+ d.ua || d.label ? (i(), u("p", cl, [
172
+ l("span", pl, K(d.item[t.value] || d.ua || d.label), 1),
173
+ n.value ? (i(), u("span", fl, "*")) : D("", !0)
174
+ ])) : D("", !0),
175
+ s.value ? (i(), u("p", vl, K(s.value), 1)) : D("", !0)
176
176
  ]),
177
- l("div", hl, [
178
- Le(d.$slots, "default", at(st(d.$attrs)))
177
+ l("div", ml, [
178
+ Me(d.$slots, "default", at(st(d.$attrs)))
179
179
  ])
180
180
  ], 2),
181
- a.value ? (i(), u("p", gl, W(a.value), 1)) : U("", !0)
181
+ a.value ? (i(), u("p", hl, K(a.value), 1)) : D("", !0)
182
182
  ], 2));
183
183
  }
184
- }), yl = {
185
- default: ol,
186
- horizontal: rl,
187
- inline: dl,
188
- settings: bl
184
+ }), bl = {
185
+ default: ll,
186
+ horizontal: sl,
187
+ inline: ul,
188
+ settings: gl
189
189
  };
190
190
  function Ce(o) {
191
191
  return {
192
- inputClass: S(() => {
192
+ inputClass: B(() => {
193
193
  const t = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
194
194
  return o?.size === "sm" ? `${t}h-[32px]` : `${t}h-[38px]`;
195
195
  })
196
196
  };
197
197
  }
198
- const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
198
+ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ G({
199
199
  __name: "vs-input-password",
200
200
  props: /* @__PURE__ */ ie({
201
201
  style: { default: () => ({}) },
@@ -217,15 +217,15 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
217
217
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
218
218
  placeholder: n.placeholder,
219
219
  disabled: n.disabled,
220
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t), { "!border-red-600": n.error }]]),
220
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": n.error }]]),
221
221
  style: {
222
222
  border: "1px solid #CFD9E0"
223
223
  }
224
- }, null, 10, xl)), [
225
- [he, s.value]
224
+ }, null, 10, yl)), [
225
+ [me, s.value]
226
226
  ]);
227
227
  }
228
- }), kl = ["placeholder", "disabled"], Xe = /* @__PURE__ */ G({
228
+ }), wl = ["placeholder", "disabled"], Ye = /* @__PURE__ */ G({
229
229
  __name: "vs-input-text",
230
230
  props: /* @__PURE__ */ ie({
231
231
  style: { default: () => ({}) },
@@ -247,15 +247,15 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
247
247
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
248
248
  placeholder: n.placeholder,
249
249
  disabled: n.disabled,
250
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t), { "!border-red-600": n.error }]]),
250
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": n.error }]]),
251
251
  style: {
252
252
  border: "1px solid #CFD9E0"
253
253
  }
254
- }, null, 10, kl)), [
255
- [he, s.value]
254
+ }, null, 10, wl)), [
255
+ [me, s.value]
256
256
  ]);
257
257
  }
258
- }), _l = ["placeholder", "min", "max"], $l = /* @__PURE__ */ G({
258
+ }), kl = ["placeholder", "min", "max"], _l = /* @__PURE__ */ G({
259
259
  __name: "vs-input-number",
260
260
  props: /* @__PURE__ */ ie({
261
261
  min: {},
@@ -279,22 +279,22 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
279
279
  step: "any",
280
280
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
281
281
  placeholder: n.placeholder,
282
- class: T(["py-1.5 px-3 block w-full bg-white", [te(t)]]),
282
+ class: T(["py-1.5 px-3 block w-full bg-white", [le(t)]]),
283
283
  style: {
284
284
  border: "1px solid #CFD9E0"
285
285
  },
286
286
  min: n.min,
287
287
  max: n.max
288
- }, null, 10, _l)), [
289
- [he, s.value]
288
+ }, null, 10, kl)), [
289
+ [me, s.value]
290
290
  ]);
291
291
  }
292
- }), Y = (o, e) => {
292
+ }), X = (o, e) => {
293
293
  const t = o.__vccOpts || o;
294
294
  for (const [s, n] of e)
295
295
  t[s] = n;
296
296
  return t;
297
- }, Cl = {}, Vl = {
297
+ }, $l = {}, Cl = {
298
298
  xmlns: "http://www.w3.org/2000/svg",
299
299
  viewBox: "0 0 24 24",
300
300
  fill: "none",
@@ -304,8 +304,8 @@ const xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ G({
304
304
  "stroke-linejoin": "round",
305
305
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
306
306
  };
307
- function Ml(o, e) {
308
- return i(), u("svg", Vl, e[0] || (e[0] = [
307
+ function Vl(o, e) {
308
+ return i(), u("svg", Cl, e[0] || (e[0] = [
309
309
  l("path", {
310
310
  stroke: "none",
311
311
  d: "M0 0h24v24H0z",
@@ -314,7 +314,7 @@ function Ml(o, e) {
314
314
  l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
315
315
  ]));
316
316
  }
317
- const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-center gap-[4px]" }, Bl = ["value", "id", "disabled"], jl = ["for"], El = { class: "text-[14px] text-gray-700 flex items-center dark:text-neutral-400" }, Il = /* @__PURE__ */ G({
317
+ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-center gap-[4px]" }, Sl = ["value", "id", "disabled"], Bl = ["for"], jl = { class: "text-[14px] text-gray-700 flex items-center dark:text-neutral-400" }, El = /* @__PURE__ */ G({
318
318
  __name: "vs-checkbox-default",
319
319
  props: {
320
320
  value: { default: "" },
@@ -327,11 +327,11 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
327
327
  },
328
328
  emits: ["update:modelValue"],
329
329
  setup(o, { emit: e }) {
330
- const t = e, s = o, n = S({
330
+ const t = e, s = o, n = B({
331
331
  get: () => s.modelValue,
332
332
  set: (a) => t("update:modelValue", a)
333
333
  });
334
- return (a, r) => (i(), u("div", Sl, [
334
+ return (a, r) => (i(), u("div", Ll, [
335
335
  ne(l("input", {
336
336
  type: "checkbox",
337
337
  value: a.value,
@@ -339,8 +339,8 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
339
339
  class: T(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": a.disabled }]),
340
340
  id: a.id,
341
341
  disabled: a.disabled
342
- }, null, 10, Bl), [
343
- [jt, n.value]
342
+ }, null, 10, Sl), [
343
+ [Bt, n.value]
344
344
  ]),
345
345
  l("label", {
346
346
  for: a.id,
@@ -349,23 +349,23 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
349
349
  l("div", {
350
350
  class: T(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [n.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
351
351
  }, [
352
- R(Ll, {
352
+ R(Ml, {
353
353
  height: "12",
354
354
  width: "12"
355
355
  })
356
356
  ], 2),
357
- l("span", El, [
358
- Le(a.$slots, "default", {}, () => [
359
- ge(W(a.label), 1)
357
+ l("span", jl, [
358
+ Me(a.$slots, "default", {}, () => [
359
+ he(K(a.label), 1)
360
360
  ])
361
361
  ])
362
- ], 10, jl)
362
+ ], 10, Bl)
363
363
  ]));
364
364
  }
365
- }), zl = ["name", "value", "disabled"], Al = { class: "flex items-center gap-[6px] text-[14px]" }, Tl = {
365
+ }), Il = ["name", "value", "disabled"], zl = { class: "flex items-center gap-[6px] text-[14px]" }, Al = {
366
366
  key: 0,
367
367
  class: "text-[16px]"
368
- }, Fl = ["src"], Ol = /* @__PURE__ */ G({
368
+ }, Tl = ["src"], Fl = /* @__PURE__ */ G({
369
369
  __name: "vs-checkbox-buttons",
370
370
  props: {
371
371
  value: { type: [String, Number, Boolean], default: "" },
@@ -379,12 +379,12 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
379
379
  },
380
380
  emits: ["update:modelValue"],
381
381
  setup(o, { emit: e }) {
382
- const t = o, s = e, n = S({
382
+ const t = o, s = e, n = B({
383
383
  get: () => t.modelValue,
384
384
  set: (d) => {
385
385
  s("update:modelValue", d);
386
386
  }
387
- }), a = S(() => Array.isArray(n.value) ? n.value.includes(t.value) : n.value === !0 || n.value === t.value), r = S(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
387
+ }), a = B(() => Array.isArray(n.value) ? n.value.includes(t.value) : n.value === !0 || n.value === t.value), r = B(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
388
388
  return (d, c) => (i(), u("label", {
389
389
  class: T(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [r.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
390
390
  }, [
@@ -395,30 +395,30 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
395
395
  value: d.value,
396
396
  "onUpdate:modelValue": c[0] || (c[0] = (f) => n.value = f),
397
397
  disabled: d.disabled
398
- }, null, 8, zl), [
399
- [jt, n.value]
398
+ }, null, 8, Il), [
399
+ [Bt, n.value]
400
400
  ]),
401
- l("span", Al, [
402
- d.icon || d.imgUrl ? (i(), u("span", Tl, [
401
+ l("span", zl, [
402
+ d.icon || d.imgUrl ? (i(), u("span", Al, [
403
403
  d.icon ? (i(), u("i", {
404
404
  key: 0,
405
405
  class: T(d.icon)
406
- }, null, 2)) : U("", !0),
406
+ }, null, 2)) : D("", !0),
407
407
  d.imgUrl ? (i(), u("img", {
408
408
  key: 1,
409
409
  src: d.imgUrl,
410
410
  width: "16",
411
411
  height: "16",
412
412
  alt: "icon"
413
- }, null, 8, Fl)) : U("", !0)
414
- ])) : U("", !0),
415
- Le(d.$slots, "default", {}, () => [
416
- ge(W(d.label), 1)
413
+ }, null, 8, Tl)) : D("", !0)
414
+ ])) : D("", !0),
415
+ Me(d.$slots, "default", {}, () => [
416
+ he(K(d.label), 1)
417
417
  ])
418
418
  ])
419
419
  ], 2));
420
420
  }
421
- }), Ul = { class: "flex items-center" }, ot = /* @__PURE__ */ G({
421
+ }), Ol = { class: "flex items-center" }, ot = /* @__PURE__ */ G({
422
422
  __name: "vs-input-checkbox-item",
423
423
  props: {
424
424
  value: { default: "" },
@@ -435,7 +435,7 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
435
435
  },
436
436
  emits: ["update:modelValue"],
437
437
  setup(o, { emit: e }) {
438
- const t = o, s = e, n = `radio-${Math.floor(Math.random() * 1e4)}`, a = S({
438
+ const t = o, s = e, n = `radio-${Math.floor(Math.random() * 1e4)}`, a = B({
439
439
  get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
440
440
  set: (d) => {
441
441
  if (Array.isArray(t.modelValue)) {
@@ -445,8 +445,8 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
445
445
  s("update:modelValue", d);
446
446
  }
447
447
  }), r = w(`vs-checkbox-${t.view || "default"}`);
448
- return (d, c) => (i(), u("div", Ul, [
449
- (i(), me(Oe(r.value === "vs-checkbox-buttons" ? te(Ol) : te(Il)), {
448
+ return (d, c) => (i(), u("div", Ol, [
449
+ (i(), ve(Oe(r.value === "vs-checkbox-buttons" ? le(Fl) : le(El)), {
450
450
  value: d.value,
451
451
  label: d.label,
452
452
  info: d.option?.info,
@@ -460,13 +460,13 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
460
460
  error: d.error
461
461
  }, {
462
462
  default: Ee(() => [
463
- ge(W(d.label), 1)
463
+ he(K(d.label), 1)
464
464
  ]),
465
465
  _: 1
466
466
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
467
467
  ]));
468
468
  }
469
- }), Dl = {}, Rl = {
469
+ }), Ul = {}, Dl = {
470
470
  xmlns: "http://www.w3.org/2000/svg",
471
471
  viewBox: "0 0 24 24",
472
472
  fill: "none",
@@ -476,8 +476,8 @@ const Ll = /* @__PURE__ */ Y(Cl, [["render", Ml]]), Sl = { class: "flex items-ce
476
476
  "stroke-linejoin": "round",
477
477
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
478
478
  };
479
- function Pl(o, e) {
480
- return i(), u("svg", Rl, e[0] || (e[0] = [
479
+ function Rl(o, e) {
480
+ return i(), u("svg", Dl, e[0] || (e[0] = [
481
481
  l("path", {
482
482
  stroke: "none",
483
483
  d: "M0 0h24v24H0z",
@@ -486,7 +486,7 @@ function Pl(o, e) {
486
486
  l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
487
487
  ]));
488
488
  }
489
- const Hl = /* @__PURE__ */ Y(Dl, [["render", Pl]]), Nl = {}, Gl = {
489
+ const Pl = /* @__PURE__ */ X(Ul, [["render", Rl]]), Hl = {}, Nl = {
490
490
  xmlns: "http://www.w3.org/2000/svg",
491
491
  viewBox: "0 0 24 24",
492
492
  fill: "none",
@@ -496,8 +496,8 @@ const Hl = /* @__PURE__ */ Y(Dl, [["render", Pl]]), Nl = {}, Gl = {
496
496
  "stroke-linejoin": "round",
497
497
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
498
498
  };
499
- function ql(o, e) {
500
- return i(), u("svg", Gl, e[0] || (e[0] = [
499
+ function Gl(o, e) {
500
+ return i(), u("svg", Nl, e[0] || (e[0] = [
501
501
  l("path", {
502
502
  stroke: "none",
503
503
  d: "M0 0h24v24H0z",
@@ -507,7 +507,7 @@ function ql(o, e) {
507
507
  l("path", { d: "M6 6l12 12" }, null, -1)
508
508
  ]));
509
509
  }
510
- const Kl = /* @__PURE__ */ Y(Nl, [["render", ql]]), Wl = {}, Zl = {
510
+ const ql = /* @__PURE__ */ X(Hl, [["render", Gl]]), Kl = {}, Wl = {
511
511
  xmlns: "http://www.w3.org/2000/svg",
512
512
  width: "24",
513
513
  height: "24",
@@ -518,8 +518,8 @@ const Kl = /* @__PURE__ */ Y(Nl, [["render", ql]]), Wl = {}, Zl = {
518
518
  "stroke-linecap": "round",
519
519
  "stroke-linejoin": "round"
520
520
  };
521
- function Jl(o, e) {
522
- return i(), u("svg", Zl, e[0] || (e[0] = [
521
+ function Zl(o, e) {
522
+ return i(), u("svg", Wl, e[0] || (e[0] = [
523
523
  l("path", {
524
524
  stroke: "none",
525
525
  d: "M0 0h24v24H0z",
@@ -530,13 +530,13 @@ function Jl(o, e) {
530
530
  l("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
531
531
  ]));
532
532
  }
533
- const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
533
+ const Jl = /* @__PURE__ */ X(Kl, [["render", Zl]]), Yl = {
534
534
  key: 0,
535
535
  class: "flex items-start gap-x-1"
536
- }, Ql = {
536
+ }, Xl = {
537
537
  key: 0,
538
538
  class: "text-red-500 text-[14px]"
539
- }, eo = ["title"], to = ["disabled"], At = /* @__PURE__ */ G({
539
+ }, Ql = ["title"], eo = ["disabled"], zt = /* @__PURE__ */ G({
540
540
  __name: "vs-input-switcher",
541
541
  props: /* @__PURE__ */ ie({
542
542
  rules: { default: () => [] },
@@ -558,14 +558,14 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
558
558
  emits: ["update:modelValue"],
559
559
  setup(o) {
560
560
  const e = o, t = de(o, "modelValue");
561
- return (s, n) => e.view === "checkbox" ? (i(), u("div", Xl, [
561
+ return (s, n) => e.view === "checkbox" ? (i(), u("div", Yl, [
562
562
  R(ot, {
563
563
  modelValue: t.value,
564
564
  "onUpdate:modelValue": n[0] || (n[0] = (a) => t.value = a),
565
565
  label: s.text,
566
566
  error: s.error || ""
567
567
  }, null, 8, ["modelValue", "label", "error"]),
568
- s.rules?.includes("required") ? (i(), u("span", Ql, "*")) : U("", !0),
568
+ s.rules?.includes("required") ? (i(), u("span", Xl, "*")) : D("", !0),
569
569
  s.i ? (i(), u("button", {
570
570
  key: 1,
571
571
  class: "cursor-pointer",
@@ -573,8 +573,8 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
573
573
  onClick: n[1] || (n[1] = $e(() => {
574
574
  }, ["prevent"]))
575
575
  }, [
576
- R(te(Yl), { class: "text-gray-500 w-[14px] h-[14px]" })
577
- ], 8, eo)) : U("", !0)
576
+ R(le(Jl), { class: "text-gray-500 w-[14px] h-[14px]" })
577
+ ], 8, Ql)) : D("", !0)
578
578
  ])) : (i(), u("button", {
579
579
  key: 1,
580
580
  type: "button",
@@ -586,9 +586,9 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
586
586
  "data-state": "checked",
587
587
  class: T(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
588
588
  }, null, 2)
589
- ], 10, to));
589
+ ], 10, eo));
590
590
  }
591
- }), lo = ["id", "innerHTML"], kt = /* @__PURE__ */ G({
591
+ }), to = ["id", "innerHTML"], wt = /* @__PURE__ */ G({
592
592
  __name: "vs-input-static",
593
593
  props: {
594
594
  text: { default: "" },
@@ -606,9 +606,9 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
606
606
  id: e.name,
607
607
  class: T(["text-gray-900", e.customClass]),
608
608
  innerHTML: e.html ? e.html : e.text
609
- }, null, 10, lo));
609
+ }, null, 10, to));
610
610
  }
611
- }), oo = ["placeholder", "disabled", "name"], no = /* @__PURE__ */ G({
611
+ }), lo = ["placeholder", "disabled", "name"], oo = /* @__PURE__ */ G({
612
612
  __name: "vs-input-mask",
613
613
  props: /* @__PURE__ */ ie({
614
614
  name: {},
@@ -665,13 +665,13 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
665
665
  placeholder: r.placeholder,
666
666
  disabled: r.disabled,
667
667
  name: r.name,
668
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t)]]),
668
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t)]]),
669
669
  style: {
670
670
  border: "1px solid #CFD9E0"
671
671
  }
672
- }, null, 10, oo));
672
+ }, null, 10, lo));
673
673
  }
674
- }), ao = { class: "relative w-full bg-white rounded-lg" }, so = ["placeholder", "disabled"], ro = /* @__PURE__ */ G({
674
+ }), no = { class: "relative w-full bg-white rounded-lg" }, ao = ["placeholder", "disabled"], so = /* @__PURE__ */ G({
675
675
  __name: "vs-input-email",
676
676
  props: /* @__PURE__ */ ie({
677
677
  style: { default: () => ({}) },
@@ -688,23 +688,23 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
688
688
  emits: ["update:modelValue"],
689
689
  setup(o) {
690
690
  const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
691
- return (n, a) => (i(), u("div", ao, [
691
+ return (n, a) => (i(), u("div", no, [
692
692
  a[1] || (a[1] = xe('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
693
693
  ne(l("input", {
694
694
  type: "email",
695
695
  "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r),
696
696
  placeholder: n.placeholder,
697
697
  disabled: n.disabled,
698
- class: T(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t), { "!border-red-600": n.error }]]),
698
+ class: T(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": n.error }]]),
699
699
  style: {
700
700
  border: "1px solid #CFD9E0"
701
701
  }
702
- }, null, 10, so), [
703
- [he, s.value]
702
+ }, null, 10, ao), [
703
+ [me, s.value]
704
704
  ])
705
705
  ]));
706
706
  }
707
- }), io = ["value", "disabled"], uo = { class: "text-[13px] text-gray-700" }, co = /* @__PURE__ */ G({
707
+ }), ro = ["value", "disabled"], io = { class: "text-[13px] text-gray-700" }, uo = /* @__PURE__ */ G({
708
708
  __name: "vs-input-radio-default",
709
709
  props: /* @__PURE__ */ ie({
710
710
  style: {},
@@ -732,8 +732,8 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
732
732
  value: t.value,
733
733
  disabled: t.disabled,
734
734
  class: "hidden"
735
- }, null, 8, io), [
736
- [Et, e.value]
735
+ }, null, 8, ro), [
736
+ [jt, e.value]
737
737
  ]),
738
738
  l("span", {
739
739
  class: T(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
@@ -744,12 +744,12 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
744
744
  e.value == t.value ? (i(), u("span", {
745
745
  key: 0,
746
746
  class: T(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
747
- }, null, 2)) : U("", !0)
747
+ }, null, 2)) : D("", !0)
748
748
  ], 2),
749
- l("span", uo, W(t.text), 1)
749
+ l("span", io, K(t.text), 1)
750
750
  ], 2));
751
751
  }
752
- }), po = ["value", "disabled"], fo = { class: "text-[13px] text-gray-700" }, vo = /* @__PURE__ */ G({
752
+ }), co = ["value", "disabled"], po = { class: "text-[13px] text-gray-700" }, fo = /* @__PURE__ */ G({
753
753
  __name: "vs-input-radio-buttons",
754
754
  props: /* @__PURE__ */ ie({
755
755
  style: {},
@@ -780,16 +780,16 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
780
780
  value: t.value,
781
781
  disabled: t.disabled,
782
782
  class: "hidden"
783
- }, null, 8, po), [
784
- [Et, e.value]
783
+ }, null, 8, co), [
784
+ [jt, e.value]
785
785
  ]),
786
- l("span", fo, W(t.text), 1)
786
+ l("span", po, K(t.text), 1)
787
787
  ], 2));
788
788
  }
789
- }), mo = {
790
- "vs-input-radio-default": co,
791
- "vs-input-radio-buttons": vo
792
- }, _t = /* @__PURE__ */ G({
789
+ }), vo = {
790
+ "vs-input-radio-default": uo,
791
+ "vs-input-radio-buttons": fo
792
+ }, kt = /* @__PURE__ */ G({
793
793
  __name: "vs-input-radio",
794
794
  props: /* @__PURE__ */ ie({
795
795
  options: {},
@@ -808,11 +808,11 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
808
808
  }),
809
809
  emits: ["update:modelValue"],
810
810
  setup(o) {
811
- const e = o, t = de(o, "modelValue"), s = S(() => mo[`vs-input-radio-${e.view}`]);
811
+ const e = o, t = de(o, "modelValue"), s = B(() => vo[`vs-input-radio-${e.view}`]);
812
812
  return (n, a) => (i(), u("div", {
813
813
  class: T([n.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
814
814
  }, [
815
- (i(!0), u(re, null, fe(n.options, (r) => (i(), me(Oe(s.value), Fe({
815
+ (i(!0), u(re, null, pe(n.options, (r) => (i(), ve(Oe(s.value), Fe({
816
816
  key: r?.id,
817
817
  text: r.text,
818
818
  value: r.id.toString(),
@@ -822,13 +822,13 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
822
822
  }, { ref_for: !0 }, n.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
823
823
  ], 2));
824
824
  }
825
- }), ho = {
825
+ }), mo = {
826
826
  key: 1,
827
827
  class: "w-full flex flex-col gap-4"
828
- }, go = {
828
+ }, ho = {
829
829
  key: 0,
830
830
  class: "text-sm font-medium text-muted-foreground my-2"
831
- }, bo = "Без категорії", yo = /* @__PURE__ */ G({
831
+ }, go = "Без категорії", bo = /* @__PURE__ */ G({
832
832
  __name: "vs-input-checkbox",
833
833
  props: {
834
834
  options: { default: () => [] },
@@ -849,10 +849,10 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
849
849
  },
850
850
  emits: ["update:modelValue"],
851
851
  setup(o, { emit: e }) {
852
- const t = o, s = e, n = w([]), a = qt({}), r = (m) => m?.value || m?.id || m?.text || m, d = (m) => m.text || String(m), c = (m) => `lg:col-span-${m || 12}`, f = S(() => [
852
+ const t = o, s = e, n = w([]), a = Gt({}), r = (m) => m?.value || m?.id || m?.text || m, d = (m) => m.text || String(m), c = (m) => `lg:col-span-${m || 12}`, f = B(() => [
853
853
  t.position === "vertical" ? "flex flex-col" : "",
854
854
  t.colSpan ? "grid" : "flex justify-start"
855
- ]), p = (m) => m == null || m === "" ? null : typeof m == "string" || typeof m == "number" ? m : String(m), v = S(() => {
855
+ ]), p = (m) => m == null || m === "" ? null : typeof m == "string" || typeof m == "number" ? m : String(m), v = B(() => {
856
856
  if (!t.group)
857
857
  return [];
858
858
  const m = /* @__PURE__ */ new Map();
@@ -869,7 +869,7 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
869
869
  const C = m.get(O) || [];
870
870
  if (!C.length)
871
871
  return null;
872
- const h = O === null ? "group-null" : `group-${String(O)}`, x = O === null ? bo : String(O);
872
+ const h = O === null ? "group-null" : `group-${String(O)}`, x = O === null ? go : String(O);
873
873
  return $.add(O), {
874
874
  key: h,
875
875
  label: x,
@@ -949,16 +949,16 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
949
949
  }
950
950
  });
951
951
  }
952
- }), (m, I) => t.group ? (i(), u("div", ho, [
953
- (i(!0), u(re, null, fe(v.value, ($) => (i(), u("div", {
952
+ }), (m, I) => t.group ? (i(), u("div", mo, [
953
+ (i(!0), u(re, null, pe(v.value, ($) => (i(), u("div", {
954
954
  key: $.key,
955
955
  class: "flex flex-col gap-2"
956
956
  }, [
957
- $.label ? (i(), u("span", go, W($.label), 1)) : U("", !0),
957
+ $.label ? (i(), u("span", ho, K($.label), 1)) : D("", !0),
958
958
  l("div", {
959
959
  class: T(["p-0 w-full gap-[12px]", f.value])
960
960
  }, [
961
- (i(!0), u(re, null, fe($.options, (A) => (i(), me(ot, {
961
+ (i(!0), u(re, null, pe($.options, (A) => (i(), ve(ot, {
962
962
  modelValue: a[r(A)],
963
963
  "onUpdate:modelValue": (E) => a[r(A)] = E,
964
964
  value: r(A),
@@ -977,7 +977,7 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
977
977
  key: 0,
978
978
  class: T(["p-0 w-full gap-[10px]", f.value])
979
979
  }, [
980
- (i(!0), u(re, null, fe(n.value, ($) => (i(), me(ot, {
980
+ (i(!0), u(re, null, pe(n.value, ($) => (i(), ve(ot, {
981
981
  modelValue: a[r($)],
982
982
  "onUpdate:modelValue": (A) => a[r($)] = A,
983
983
  value: r($),
@@ -992,7 +992,7 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
992
992
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
993
993
  ], 2));
994
994
  }
995
- }), xo = /* @__PURE__ */ Y(yo, [["__scopeId", "data-v-58e06c8a"]]), wo = ["type", "placeholder", "disabled"], ko = /* @__PURE__ */ G({
995
+ }), yo = /* @__PURE__ */ X(bo, [["__scopeId", "data-v-58e06c8a"]]), xo = ["type", "placeholder", "disabled"], wo = /* @__PURE__ */ G({
996
996
  __name: "vs-input-date1",
997
997
  props: {
998
998
  style: { default: () => ({}) },
@@ -1010,25 +1010,25 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
1010
1010
  function s(c) {
1011
1011
  return c ? t.mode === "datetime" ? (c.includes("T") ? c : null) || c + (c.includes(" ") ? "" : "T00:00") : c?.split(" ")[0] : null;
1012
1012
  }
1013
- const { inputClass: n } = Ce(t.style), a = e, r = S({
1013
+ const { inputClass: n } = Ce(t.style), a = e, r = B({
1014
1014
  get: () => s(t.modelValue),
1015
1015
  set: (c) => a("update:modelValue", c)
1016
- }), d = S(() => t.mode === "datetime" ? "datetime-local" : t.mode);
1016
+ }), d = B(() => t.mode === "datetime" ? "datetime-local" : t.mode);
1017
1017
  return (c, f) => ne((i(), u("input", {
1018
1018
  type: d.value,
1019
1019
  "onUpdate:modelValue": f[0] || (f[0] = (p) => r.value = p),
1020
1020
  placeholder: c.placeholder,
1021
1021
  disabled: c.disabled,
1022
1022
  ref: "date",
1023
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [c.modelValue ? "" : "text-opacity-50", te(n)].join(" ")]),
1023
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [c.modelValue ? "" : "text-opacity-50", le(n)].join(" ")]),
1024
1024
  style: {
1025
1025
  border: "1px solid #CFD9E0"
1026
1026
  }
1027
- }, null, 10, wo)), [
1028
- [Kt, r.value]
1027
+ }, null, 10, xo)), [
1028
+ [qt, r.value]
1029
1029
  ]);
1030
1030
  }
1031
- }), $t = async (o, e, t, s) => {
1031
+ }), _t = async (o, e, t, s) => {
1032
1032
  try {
1033
1033
  const n = new FormData();
1034
1034
  return n.append("unique", "true"), n.append("file", o), (await fetch(
@@ -1046,20 +1046,20 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
1046
1046
  position: "right-bottom"
1047
1047
  }), console.error("Сталась помилка завантаження файлу", n), null;
1048
1048
  }
1049
- }, _o = async (o) => {
1049
+ }, ko = async (o) => {
1050
1050
  try {
1051
1051
  return await fetch(`file/delete${o}`), !0;
1052
1052
  } catch (e) {
1053
1053
  return console.error(e), !1;
1054
1054
  }
1055
- }, Ct = async (o) => {
1055
+ }, $t = async (o) => {
1056
1056
  try {
1057
1057
  const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), s = e.headers["content-type"], n = new TextDecoder("utf-8").decode(t), a = new Blob([n], { type: s }), r = document.createElement("a");
1058
1058
  r.setAttribute("download", o), r.href = window.URL.createObjectURL(a), r.click();
1059
1059
  } catch (e) {
1060
1060
  console.error(e.message);
1061
1061
  }
1062
- }, $o = {}, Co = {
1062
+ }, _o = {}, $o = {
1063
1063
  xmlns: "http://www.w3.org/2000/svg",
1064
1064
  width: "24",
1065
1065
  height: "24",
@@ -1070,13 +1070,13 @@ const Yl = /* @__PURE__ */ Y(Wl, [["render", Jl]]), Xl = {
1070
1070
  "stroke-linecap": "round",
1071
1071
  "stroke-linejoin": "round"
1072
1072
  };
1073
- function Vo(o, e) {
1074
- return i(), u("svg", Co, e[0] || (e[0] = [
1073
+ function Co(o, e) {
1074
+ return i(), u("svg", $o, e[0] || (e[0] = [
1075
1075
  l("path", { d: "M5 12h14" }, null, -1),
1076
1076
  l("path", { d: "M12 5v14" }, null, -1)
1077
1077
  ]));
1078
1078
  }
1079
- const qe = /* @__PURE__ */ Y($o, [["render", Vo]]), Mo = {}, Lo = {
1079
+ const Ge = /* @__PURE__ */ X(_o, [["render", Co]]), Vo = {}, Mo = {
1080
1080
  xmlns: "http://www.w3.org/2000/svg",
1081
1081
  class: "icon icon-tabler icon-tabler-file-text",
1082
1082
  width: "44",
@@ -1088,12 +1088,12 @@ const qe = /* @__PURE__ */ Y($o, [["render", Vo]]), Mo = {}, Lo = {
1088
1088
  "stroke-linecap": "round",
1089
1089
  "stroke-linejoin": "round"
1090
1090
  };
1091
- function So(o, e, t, s, n, a) {
1092
- return i(), u("svg", Lo, e[0] || (e[0] = [
1091
+ function Lo(o, e, t, s, n, a) {
1092
+ return i(), u("svg", Mo, e[0] || (e[0] = [
1093
1093
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>', 6)
1094
1094
  ]));
1095
1095
  }
1096
- const Bo = /* @__PURE__ */ Y(Mo, [["render", So]]), jo = {}, Eo = {
1096
+ const So = /* @__PURE__ */ X(Vo, [["render", Lo]]), Bo = {}, jo = {
1097
1097
  xmlns: "http://www.w3.org/2000/svg",
1098
1098
  class: "icon icon-tabler icon-tabler-table",
1099
1099
  width: "44",
@@ -1105,8 +1105,8 @@ const Bo = /* @__PURE__ */ Y(Mo, [["render", So]]), jo = {}, Eo = {
1105
1105
  "stroke-linecap": "round",
1106
1106
  "stroke-linejoin": "round"
1107
1107
  };
1108
- function Io(o, e, t, s, n, a) {
1109
- return i(), u("svg", Eo, e[0] || (e[0] = [
1108
+ function Eo(o, e, t, s, n, a) {
1109
+ return i(), u("svg", jo, e[0] || (e[0] = [
1110
1110
  l("path", {
1111
1111
  stroke: "none",
1112
1112
  d: "M0 0h24v24H0z",
@@ -1133,7 +1133,7 @@ function Io(o, e, t, s, n, a) {
1133
1133
  }, null, -1)
1134
1134
  ]));
1135
1135
  }
1136
- const zo = /* @__PURE__ */ Y(jo, [["render", Io]]), Ao = {}, To = {
1136
+ const Io = /* @__PURE__ */ X(Bo, [["render", Eo]]), zo = {}, Ao = {
1137
1137
  xmlns: "http://www.w3.org/2000/svg",
1138
1138
  width: "24",
1139
1139
  height: "24",
@@ -1144,12 +1144,12 @@ const zo = /* @__PURE__ */ Y(jo, [["render", Io]]), Ao = {}, To = {
1144
1144
  "stroke-linecap": "round",
1145
1145
  "stroke-linejoin": "round"
1146
1146
  };
1147
- function Fo(o, e) {
1148
- return i(), u("svg", To, e[0] || (e[0] = [
1147
+ function To(o, e) {
1148
+ return i(), u("svg", Ao, e[0] || (e[0] = [
1149
1149
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>', 6)
1150
1150
  ]));
1151
1151
  }
1152
- const Tt = /* @__PURE__ */ Y(Ao, [["render", Fo]]), Oo = {}, Uo = {
1152
+ const At = /* @__PURE__ */ X(zo, [["render", To]]), Fo = {}, Oo = {
1153
1153
  xmlns: "http://www.w3.org/2000/svg",
1154
1154
  class: "icon icon-tabler icon-tabler-file-zip",
1155
1155
  width: "44",
@@ -1161,12 +1161,12 @@ const Tt = /* @__PURE__ */ Y(Ao, [["render", Fo]]), Oo = {}, Uo = {
1161
1161
  "stroke-linecap": "round",
1162
1162
  "stroke-linejoin": "round"
1163
1163
  };
1164
- function Do(o, e, t, s, n, a) {
1165
- return i(), u("svg", Uo, e[0] || (e[0] = [
1164
+ function Uo(o, e, t, s, n, a) {
1165
+ return i(), u("svg", Oo, e[0] || (e[0] = [
1166
1166
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>', 9)
1167
1167
  ]));
1168
1168
  }
1169
- const Ro = /* @__PURE__ */ Y(Oo, [["render", Do]]), Po = {}, Ho = {
1169
+ const Do = /* @__PURE__ */ X(Fo, [["render", Uo]]), Ro = {}, Po = {
1170
1170
  xmlns: "http://www.w3.org/2000/svg",
1171
1171
  class: "icon icon-tabler icon-tabler-file-code",
1172
1172
  width: "44",
@@ -1178,25 +1178,25 @@ const Ro = /* @__PURE__ */ Y(Oo, [["render", Do]]), Po = {}, Ho = {
1178
1178
  "stroke-linecap": "round",
1179
1179
  "stroke-linejoin": "round"
1180
1180
  };
1181
- function No(o, e, t, s, n, a) {
1182
- return i(), u("svg", Ho, e[0] || (e[0] = [
1181
+ function Ho(o, e, t, s, n, a) {
1182
+ return i(), u("svg", Po, e[0] || (e[0] = [
1183
1183
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
1184
1184
  ]));
1185
1185
  }
1186
- const Go = /* @__PURE__ */ Y(Po, [["render", No]]), qo = (o) => {
1186
+ const No = /* @__PURE__ */ X(Ro, [["render", Ho]]), Go = (o) => {
1187
1187
  if (!o) return "";
1188
1188
  const e = o?.split(".");
1189
1189
  return e[e.length - 1];
1190
- }, Ko = (o) => {
1191
- const e = qo(o), t = {
1190
+ }, qo = (o) => {
1191
+ const e = Go(o), t = {
1192
1192
  imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
1193
1193
  sheetsFormat: ["xls", "csv", "xlsx"],
1194
1194
  archivesFormat: ["zip", "rar"],
1195
1195
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
1196
1196
  documentsFormat: ["pdf"]
1197
1197
  };
1198
- return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? zo : t.textsFormat.includes(e) ? Go : t.documentsFormat.includes(e) ? Bo : t.archivesFormat.includes(e) ? Ro : Tt;
1199
- }, Wo = {}, Zo = {
1198
+ return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? Io : t.textsFormat.includes(e) ? No : t.documentsFormat.includes(e) ? So : t.archivesFormat.includes(e) ? Do : At;
1199
+ }, Ko = {}, Wo = {
1200
1200
  xmlns: "http://www.w3.org/2000/svg",
1201
1201
  width: "24",
1202
1202
  height: "24",
@@ -1208,12 +1208,12 @@ const Go = /* @__PURE__ */ Y(Po, [["render", No]]), qo = (o) => {
1208
1208
  "stroke-linejoin": "round",
1209
1209
  class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
1210
1210
  };
1211
- function Jo(o, e) {
1212
- return i(), u("svg", Zo, e[0] || (e[0] = [
1211
+ function Zo(o, e) {
1212
+ return i(), u("svg", Wo, e[0] || (e[0] = [
1213
1213
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
1214
1214
  ]));
1215
1215
  }
1216
- const et = /* @__PURE__ */ Y(Wo, [["render", Jo]]), Yo = {}, Xo = {
1216
+ const Qe = /* @__PURE__ */ X(Ko, [["render", Zo]]), Jo = {}, Yo = {
1217
1217
  xmlns: "http://www.w3.org/2000/svg",
1218
1218
  width: "24",
1219
1219
  height: "24",
@@ -1225,8 +1225,8 @@ const et = /* @__PURE__ */ Y(Wo, [["render", Jo]]), Yo = {}, Xo = {
1225
1225
  "stroke-linejoin": "round",
1226
1226
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1227
1227
  };
1228
- function Qo(o, e) {
1229
- return i(), u("svg", Xo, e[0] || (e[0] = [
1228
+ function Xo(o, e) {
1229
+ return i(), u("svg", Yo, e[0] || (e[0] = [
1230
1230
  l("path", {
1231
1231
  stroke: "none",
1232
1232
  d: "M0 0h24v24H0z",
@@ -1237,7 +1237,7 @@ function Qo(o, e) {
1237
1237
  l("path", { d: "M12 4l0 12" }, null, -1)
1238
1238
  ]));
1239
1239
  }
1240
- const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, tn = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, ln = /* @__PURE__ */ G({
1240
+ const Tt = /* @__PURE__ */ X(Jo, [["render", Xo]]), Qo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, en = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, tn = /* @__PURE__ */ G({
1241
1241
  __name: "vs-input-file-list-item",
1242
1242
  props: /* @__PURE__ */ ie({
1243
1243
  format: {},
@@ -1259,43 +1259,43 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1259
1259
  emits: ["update:value", "update:item"],
1260
1260
  setup(o) {
1261
1261
  const e = de(o, "value"), t = de(o, "item"), s = o;
1262
- return (n, a) => (i(), u("div", en, [
1263
- (i(), me(Oe(te(Ko)(t.value)), {
1262
+ return (n, a) => (i(), u("div", Qo, [
1263
+ (i(), ve(Oe(le(qo)(t.value)), {
1264
1264
  src: t.value,
1265
1265
  alt: "file",
1266
1266
  class: "w-full h-full object-cover cursor-pointer",
1267
- onClick: a[0] || (a[0] = (r) => te(Ct)(t.value))
1267
+ onClick: a[0] || (a[0] = (r) => le($t)(t.value))
1268
1268
  }, null, 8, ["src"])),
1269
- l("div", tn, [
1269
+ l("div", en, [
1270
1270
  l("button", {
1271
1271
  type: "button",
1272
1272
  onClick: a[1] || (a[1] = (r) => {
1273
- te(_o)(t.value), e.value = s.multiple ? e.value?.filter((d) => d !== t.value) : "";
1273
+ le(ko)(t.value), e.value = s.multiple ? e.value?.filter((d) => d !== t.value) : "";
1274
1274
  }),
1275
1275
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1276
1276
  }, [
1277
- R(et, { class: "w-4 h-4" })
1277
+ R(Qe, { class: "w-4 h-4" })
1278
1278
  ]),
1279
1279
  l("button", {
1280
1280
  type: "button",
1281
- onClick: a[2] || (a[2] = (r) => te(Ct)(t.value)),
1281
+ onClick: a[2] || (a[2] = (r) => le($t)(t.value)),
1282
1282
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
1283
1283
  }, [
1284
- R(Ft, { class: "w-4 h-4" })
1284
+ R(Tt, { class: "w-4 h-4" })
1285
1285
  ])
1286
1286
  ])
1287
1287
  ]));
1288
1288
  }
1289
- }), Vt = /* @__PURE__ */ Y(ln, [["__scopeId", "data-v-0ca886b3"]]), on = { class: "flex items-center gap-x-2" }, nn = ["multiple", "disabled"], an = {
1289
+ }), Ct = /* @__PURE__ */ X(tn, [["__scopeId", "data-v-0ca886b3"]]), ln = { class: "flex items-center gap-x-2" }, on = ["multiple", "disabled"], nn = {
1290
1290
  key: 1,
1291
1291
  class: "flex items-center flex-wrap gap-2"
1292
- }, sn = {
1292
+ }, an = {
1293
1293
  key: 1,
1294
1294
  class: "loader"
1295
- }, rn = {
1295
+ }, sn = {
1296
1296
  key: 1,
1297
1297
  class: "loader"
1298
- }, un = /* @__PURE__ */ G({
1298
+ }, rn = /* @__PURE__ */ G({
1299
1299
  __name: "vs-input-file",
1300
1300
  props: /* @__PURE__ */ ie({
1301
1301
  format: {},
@@ -1336,20 +1336,20 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1336
1336
  r.value = !0;
1337
1337
  try {
1338
1338
  if (t.multiple) {
1339
- const m = Array.from(v).map(async (E) => t.format && !E.name.endsWith(t.format) ? null : await $t(E, "1", "form", "table")), A = (await Promise.all(m)).filter((E) => E !== null).map((E) => E?.file_path).filter(Boolean);
1339
+ const m = Array.from(v).map(async (E) => t.format && !E.name.endsWith(t.format) ? null : await _t(E, "1", "form", "table")), A = (await Promise.all(m)).filter((E) => E !== null).map((E) => E?.file_path).filter(Boolean);
1340
1340
  s.value = [...s.value || [], ...A], n("change", s.value);
1341
1341
  } else {
1342
1342
  const m = v[0];
1343
1343
  if (t.format && !m.name.endsWith(t.format))
1344
1344
  return;
1345
- const I = await $t(m, "1", "form", "table");
1345
+ const I = await _t(m, "1", "form", "table");
1346
1346
  s.value = I?.file_path, n("change", s.value || "");
1347
1347
  }
1348
1348
  } finally {
1349
1349
  r.value = !1, a.value && (a.value.value = "");
1350
1350
  }
1351
1351
  };
1352
- return (p, v) => (i(), u("div", on, [
1352
+ return (p, v) => (i(), u("div", ln, [
1353
1353
  l("input", {
1354
1354
  class: "hidden",
1355
1355
  ref_key: "fileInput",
@@ -1358,15 +1358,15 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1358
1358
  multiple: p.multiple,
1359
1359
  onChange: f,
1360
1360
  disabled: r.value || p.disabled
1361
- }, null, 40, nn),
1362
- !p.multiple && s.value ? (i(), me(Vt, {
1361
+ }, null, 40, on),
1362
+ !p.multiple && s.value ? (i(), ve(Ct, {
1363
1363
  key: 0,
1364
1364
  item: s.value,
1365
1365
  "onUpdate:item": v[0] || (v[0] = (k) => s.value = k),
1366
1366
  value: s.value,
1367
1367
  "onUpdate:value": v[1] || (v[1] = (k) => s.value = k)
1368
- }, null, 8, ["item", "value"])) : p.multiple ? (i(), u("div", an, [
1369
- (i(!0), u(re, null, fe(s.value, (k, m) => (i(), me(Vt, {
1368
+ }, null, 8, ["item", "value"])) : p.multiple ? (i(), u("div", nn, [
1369
+ (i(!0), u(re, null, pe(s.value, (k, m) => (i(), ve(Ct, {
1370
1370
  multiple: p.multiple,
1371
1371
  key: m,
1372
1372
  value: s.value,
@@ -1380,31 +1380,31 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1380
1380
  p.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1381
1381
  ])
1382
1382
  }, [
1383
- r.value ? (i(), u("div", sn)) : (i(), me(qe, {
1383
+ r.value ? (i(), u("div", an)) : (i(), ve(Ge, {
1384
1384
  key: 0,
1385
1385
  class: "w-6 h-6"
1386
1386
  }))
1387
1387
  ], 2)
1388
- ])) : U("", !0),
1389
- p.multiple ? U("", !0) : (i(), u("div", {
1388
+ ])) : D("", !0),
1389
+ p.multiple ? D("", !0) : (i(), u("div", {
1390
1390
  key: 2,
1391
1391
  onClick: v[4] || (v[4] = (k) => a.value?.click()),
1392
1392
  class: T([p.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
1393
1393
  }, [
1394
- r.value ? (i(), u("div", rn)) : (i(), me(qe, {
1394
+ r.value ? (i(), u("div", sn)) : (i(), ve(Ge, {
1395
1395
  key: 0,
1396
1396
  class: "w-6 h-6"
1397
1397
  }))
1398
1398
  ], 2))
1399
1399
  ]));
1400
1400
  }
1401
- }), dn = /* @__PURE__ */ Y(un, [["__scopeId", "data-v-70ddd946"]]), cn = { class: "max-w-[55vw]" }, pn = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, fn = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, vn = { class: "px-[5px]" }, mn = { class: "" }, Ye = /* @__PURE__ */ G({
1401
+ }), un = /* @__PURE__ */ X(rn, [["__scopeId", "data-v-e613a523"]]), dn = { class: "max-w-[55vw]" }, cn = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, pn = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, fn = { class: "px-[5px]" }, vn = { class: "" }, Je = /* @__PURE__ */ G({
1402
1402
  __name: "vs-widget-file-info",
1403
1403
  props: {
1404
1404
  item: { default: null }
1405
1405
  },
1406
1406
  setup(o) {
1407
- const e = o, t = S(() => {
1407
+ const e = o, t = B(() => {
1408
1408
  try {
1409
1409
  return new Date(e.item.cdate).toLocaleDateString("uk-UA", {
1410
1410
  day: "2-digit",
@@ -1423,33 +1423,33 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1423
1423
  }
1424
1424
  return (n, a) => (i(), u(re, null, [
1425
1425
  a[1] || (a[1] = xe('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>', 1)),
1426
- l("div", cn, [
1427
- l("p", pn, W(n.item?.uploaded_name), 1),
1428
- l("p", fn, [
1429
- l("span", null, W(n.item?.username), 1),
1430
- ne(l("span", vn, "|", 512), [
1426
+ l("div", dn, [
1427
+ l("p", cn, K(n.item?.uploaded_name), 1),
1428
+ l("p", pn, [
1429
+ l("span", null, K(n.item?.username), 1),
1430
+ ne(l("span", fn, "|", 512), [
1431
1431
  [it, n.item?.username]
1432
1432
  ]),
1433
- l("span", null, W(t.value), 1),
1433
+ l("span", null, K(t.value), 1),
1434
1434
  a[0] || (a[0] = l("span", { class: "px-[5px]" }, "|", -1)),
1435
- l("span", mn, W(s(n.item?.size)), 1)
1435
+ l("span", vn, K(s(n.item?.size)), 1)
1436
1436
  ])
1437
1437
  ])
1438
1438
  ], 64));
1439
1439
  }
1440
- }), hn = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, gn = {
1440
+ }), mn = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, hn = {
1441
1441
  key: 0,
1442
1442
  class: "flex w-full gap-x-3 items-center"
1443
- }, bn = {
1443
+ }, gn = {
1444
1444
  key: 1,
1445
1445
  class: "flex gap-x-3 w-full items-center"
1446
- }, yn = {
1446
+ }, bn = {
1447
1447
  key: 2,
1448
1448
  class: "flex gap-x-3 w-full items-center"
1449
- }, xn = ["href"], wn = {
1449
+ }, yn = ["href"], xn = {
1450
1450
  key: 3,
1451
1451
  class: "flex gap-x-3 w-full items-center"
1452
- }, kn = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, _n = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, $n = { class: "inline-block" }, Cn = { class: "inline-block" }, Vn = /* @__PURE__ */ G({
1452
+ }, wn = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, kn = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, _n = { class: "inline-block" }, $n = { class: "inline-block" }, Cn = /* @__PURE__ */ G({
1453
1453
  __name: "vs-widget-file-item",
1454
1454
  props: {
1455
1455
  item: { default: null },
@@ -1491,48 +1491,48 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1491
1491
  function f(p) {
1492
1492
  (t.item.ext === "jpg" || t.item.ext === "png") && s("openLightbox", { item: t.item, index: p });
1493
1493
  }
1494
- return (p, v) => (i(), u("div", hn, [
1495
- p.item.ext === "jpg" || p.item.ext === "png" ? (i(), u("div", gn, [
1494
+ return (p, v) => (i(), u("div", mn, [
1495
+ p.item.ext === "jpg" || p.item.ext === "png" ? (i(), u("div", hn, [
1496
1496
  l("div", {
1497
1497
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
1498
1498
  onClick: v[0] || (v[0] = (k) => f(p.index))
1499
1499
  }, [
1500
- R(Ye, { item: p.item }, null, 8, ["item"])
1500
+ R(Je, { item: p.item }, null, 8, ["item"])
1501
1501
  ])
1502
- ])) : n(p.item) ? (i(), u("div", bn, [
1503
- R(Ye, { item: p.item }, null, 8, ["item"])
1504
- ])) : a(p.item) ? (i(), u("div", yn, [
1502
+ ])) : n(p.item) ? (i(), u("div", gn, [
1503
+ R(Je, { item: p.item }, null, 8, ["item"])
1504
+ ])) : a(p.item) ? (i(), u("div", bn, [
1505
1505
  l("a", {
1506
1506
  href: `/api/file-preview?id=${p.item.file_id}`,
1507
1507
  target: "_blank",
1508
1508
  class: "flex gap-x-3 w-full items-center"
1509
1509
  }, [
1510
- R(Ye, { item: p.item }, null, 8, ["item"])
1511
- ], 8, xn)
1512
- ])) : (i(), u("div", wn, [
1513
- R(Ye, { item: p.item }, null, 8, ["item"])
1510
+ R(Je, { item: p.item }, null, 8, ["item"])
1511
+ ], 8, yn)
1512
+ ])) : (i(), u("div", xn, [
1513
+ R(Je, { item: p.item }, null, 8, ["item"])
1514
1514
  ])),
1515
- l("div", kn, [
1516
- l("div", _n, [
1517
- l("div", $n, [
1515
+ l("div", wn, [
1516
+ l("div", kn, [
1517
+ l("div", _n, [
1518
1518
  l("button", {
1519
1519
  class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
1520
1520
  onClick: v[1] || (v[1] = (k) => r(p.item))
1521
1521
  }, [
1522
- R(Ft, {
1522
+ R(Tt, {
1523
1523
  height: "14",
1524
1524
  width: "14"
1525
1525
  })
1526
1526
  ])
1527
1527
  ]),
1528
1528
  v[3] || (v[3] = l("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
1529
- l("div", Cn, [
1529
+ l("div", $n, [
1530
1530
  l("button", {
1531
1531
  type: "button",
1532
1532
  class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
1533
1533
  onClick: v[2] || (v[2] = (k) => c())
1534
1534
  }, [
1535
- R(et, {
1535
+ R(Qe, {
1536
1536
  height: "14",
1537
1537
  width: "14"
1538
1538
  })
@@ -1542,7 +1542,7 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1542
1542
  ])
1543
1543
  ]));
1544
1544
  }
1545
- }), Mn = {}, Ln = {
1545
+ }), Vn = {}, Mn = {
1546
1546
  xmlns: "http://www.w3.org/2000/svg",
1547
1547
  width: "24",
1548
1548
  height: "24",
@@ -1554,8 +1554,8 @@ const Ft = /* @__PURE__ */ Y(Yo, [["render", Qo]]), en = { class: "h-[120px] w-[
1554
1554
  "stroke-linejoin": "round",
1555
1555
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1556
1556
  };
1557
- function Sn(o, e) {
1558
- return i(), u("svg", Ln, e[0] || (e[0] = [
1557
+ function Ln(o, e) {
1558
+ return i(), u("svg", Mn, e[0] || (e[0] = [
1559
1559
  l("path", {
1560
1560
  stroke: "none",
1561
1561
  d: "M0 0h24v24H0z",
@@ -1566,13 +1566,13 @@ function Sn(o, e) {
1566
1566
  l("path", { d: "M12 4l0 12" }, null, -1)
1567
1567
  ]));
1568
1568
  }
1569
- const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, En = { class: "flex w-full mb-[12px] items-center gap-x-2" }, In = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, zn = { class1: "ml-auto" }, An = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, Tn = {
1569
+ const Sn = /* @__PURE__ */ X(Vn, [["render", Ln]]), Bn = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, jn = { class: "flex w-full mb-[12px] items-center gap-x-2" }, En = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, In = { class1: "ml-auto" }, zn = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, An = {
1570
1570
  key: 0,
1571
1571
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
1572
- }, Fn = { class: "relative" }, On = {
1572
+ }, Tn = { class: "relative" }, Fn = {
1573
1573
  key: 1,
1574
1574
  class: "space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
1575
- }, Un = { key: 0 }, Dn = /* @__PURE__ */ G({
1575
+ }, On = { key: 0 }, Un = /* @__PURE__ */ G({
1576
1576
  __name: "vs-input-file-list",
1577
1577
  props: {
1578
1578
  id: { default: "" },
@@ -1587,7 +1587,7 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1587
1587
  },
1588
1588
  emits: ["update"],
1589
1589
  setup(o, { emit: e }) {
1590
- const t = o, s = Ae("form"), n = S(() => s.value.formId), a = w(!1), r = w(0), d = e, c = w(!1), f = w({}), p = w([]), v = w(""), k = S(() => Array.isArray(p.value) ? p.value.filter((C) => C.ext === "jpg" || C.ext === "png").map((C) => C?.file_path) : []), m = S(() => v.value === "" ? p.value : p.value.filter((C) => C?.uploaded_name?.includes(v.value))), I = (C) => {
1590
+ const t = o, s = Ae("form"), n = B(() => s.value.formId), a = w(!1), r = w(0), d = e, c = w(!1), f = w({}), p = w([]), v = w(""), k = B(() => Array.isArray(p.value) ? p.value.filter((C) => C.ext === "jpg" || C.ext === "png").map((C) => C?.file_path) : []), m = B(() => v.value === "" ? p.value : p.value.filter((C) => C?.uploaded_name?.includes(v.value))), I = (C) => {
1591
1591
  const h = k.value.findIndex((x) => x === C.item.file_path);
1592
1592
  h !== -1 && (a.value = !0, r.value = h);
1593
1593
  }, $ = async () => {
@@ -1603,18 +1603,18 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1603
1603
  const x = new FormData();
1604
1604
  x.append("file", h);
1605
1605
  try {
1606
- const B = `${t.prefix}/widget/file/${n.value}`, V = await fetch(B, { method: "POST", body: x });
1607
- return V.ok ? (d("update", "file-list"), h) : (ce({
1608
- type: V.status >= 400 && V.status < 500 ? "warning" : "error",
1606
+ const j = `${t.prefix}/widget/file/${n.value}`, M = await fetch(j, { method: "POST", body: x });
1607
+ return M.ok ? (d("update", "file-list"), h) : (ce({
1608
+ type: M.status >= 400 && M.status < 500 ? "warning" : "error",
1609
1609
  title: "Error",
1610
- message: `Error code: ${V.status}`
1610
+ message: `Error code: ${M.status}`
1611
1611
  }), null);
1612
- } catch (B) {
1612
+ } catch (j) {
1613
1613
  return ce({
1614
1614
  type: "error",
1615
1615
  title: "Error",
1616
- message: B.message || "Unknown error"
1617
- }), console.error(B), null;
1616
+ message: j.message || "Unknown error"
1617
+ }), console.error(j), null;
1618
1618
  }
1619
1619
  })
1620
1620
  ), await $();
@@ -1633,19 +1633,19 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1633
1633
  }), ye(() => {
1634
1634
  n.value && $();
1635
1635
  }), (C, h) => {
1636
- const x = xt("Lightbox"), B = xt("MessageBox");
1637
- return i(), u("div", jn, [
1638
- l("div", En, [
1639
- l("h2", In, " Файлів: " + W(p.value?.length), 1),
1640
- l("div", zn, [
1636
+ const x = yt("Lightbox"), j = yt("MessageBox");
1637
+ return i(), u("div", Bn, [
1638
+ l("div", jn, [
1639
+ l("h2", En, " Файлів: " + K(p.value?.length), 1),
1640
+ l("div", In, [
1641
1641
  l("label", null, [
1642
1642
  l("input", {
1643
1643
  type: "file",
1644
1644
  class: "hidden",
1645
- onChange: h[0] || (h[0] = (V) => A(V))
1645
+ onChange: h[0] || (h[0] = (M) => A(M))
1646
1646
  }, null, 32),
1647
- l("div", An, [
1648
- R(Bn, {
1647
+ l("div", zn, [
1648
+ R(Sn, {
1649
1649
  height: "16",
1650
1650
  width: "16"
1651
1651
  })
@@ -1653,9 +1653,9 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1653
1653
  ])
1654
1654
  ])
1655
1655
  ]),
1656
- p.value?.length > 4 ? (i(), u("div", Tn, [
1656
+ p.value?.length > 4 ? (i(), u("div", An, [
1657
1657
  l("div", null, [
1658
- l("div", Fn, [
1658
+ l("div", Tn, [
1659
1659
  h[8] || (h[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1660
1660
  l("svg", {
1661
1661
  class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
@@ -1679,12 +1679,12 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1679
1679
  ], -1)),
1680
1680
  ne(l("input", {
1681
1681
  type: "text",
1682
- "onUpdate:modelValue": h[1] || (h[1] = (V) => v.value = V),
1682
+ "onUpdate:modelValue": h[1] || (h[1] = (M) => v.value = M),
1683
1683
  class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
1684
1684
  placeholder: "Введіть назву файлу"
1685
1685
  }, null, 512), [
1686
1686
  [
1687
- he,
1687
+ me,
1688
1688
  v.value,
1689
1689
  void 0,
1690
1690
  { trim: !0 }
@@ -1692,37 +1692,37 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1692
1692
  ])
1693
1693
  ])
1694
1694
  ])
1695
- ])) : U("", !0),
1696
- p.value?.length ? (i(), u("div", On, [
1697
- (i(!0), u(re, null, fe(m.value, (V, P) => (i(), me(Vn, {
1695
+ ])) : D("", !0),
1696
+ p.value?.length ? (i(), u("div", Fn, [
1697
+ (i(!0), u(re, null, pe(m.value, (M, P) => (i(), ve(Cn, {
1698
1698
  key: P,
1699
1699
  prefix: C.prefix,
1700
- item: V,
1700
+ item: M,
1701
1701
  index: P,
1702
- onUpdate: h[2] || (h[2] = (ee) => C.$emit("update", "file-list")),
1703
- onOpenModal: h[3] || (h[3] = (ee) => O(ee)),
1704
- onOpenLightbox: h[4] || (h[4] = (ee) => I(ee))
1702
+ onUpdate: h[2] || (h[2] = (te) => C.$emit("update", "file-list")),
1703
+ onOpenModal: h[3] || (h[3] = (te) => O(te)),
1704
+ onOpenLightbox: h[4] || (h[4] = (te) => I(te))
1705
1705
  }, null, 8, ["prefix", "item", "index"]))), 128)),
1706
- m.value.length ? U("", !0) : (i(), u("div", Un, h[9] || (h[9] = [
1706
+ m.value.length ? D("", !0) : (i(), u("div", On, h[9] || (h[9] = [
1707
1707
  l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1708
1708
  ])))
1709
- ])) : U("", !0),
1709
+ ])) : D("", !0),
1710
1710
  R(x, {
1711
1711
  modelValue: a.value,
1712
- "onUpdate:modelValue": h[5] || (h[5] = (V) => a.value = V),
1712
+ "onUpdate:modelValue": h[5] || (h[5] = (M) => a.value = M),
1713
1713
  startIndex: r.value,
1714
- "onUpdate:index": h[6] || (h[6] = (V) => r.value = V),
1714
+ "onUpdate:index": h[6] || (h[6] = (M) => r.value = M),
1715
1715
  images: k.value
1716
1716
  }, null, 8, ["modelValue", "startIndex", "images"]),
1717
- R(B, Fe({
1717
+ R(j, Fe({
1718
1718
  modelValue: c.value,
1719
- "onUpdate:modelValue": h[7] || (h[7] = (V) => c.value = V),
1719
+ "onUpdate:modelValue": h[7] || (h[7] = (M) => c.value = M),
1720
1720
  onConfirm: f.value.confirm
1721
1721
  }, f.value), null, 16, ["modelValue", "onConfirm"])
1722
1722
  ]);
1723
1723
  };
1724
1724
  }
1725
- }), Rn = { class: "flex items-center justify-between" }, Pn = { class: "text-[16px] text-gray-900 font-medium" }, Hn = { class: "grid gap-3" }, Nn = /* @__PURE__ */ G({
1725
+ }), Dn = { class: "flex items-center justify-between" }, Rn = { class: "text-[16px] text-gray-900 font-medium" }, Pn = { class: "grid gap-3" }, Hn = /* @__PURE__ */ G({
1726
1726
  __name: "vs-container-switcher",
1727
1727
  props: {
1728
1728
  title: {
@@ -1746,9 +1746,9 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1746
1746
  t.value = s;
1747
1747
  }
1748
1748
  ), (s, n) => (i(), u("div", null, [
1749
- l("div", Rn, [
1750
- l("p", Pn, W(o.title), 1),
1751
- R(At, {
1749
+ l("div", Dn, [
1750
+ l("p", Rn, K(o.title), 1),
1751
+ R(zt, {
1752
1752
  modelValue: t.value,
1753
1753
  "onUpdate:modelValue": n[0] || (n[0] = (a) => t.value = a),
1754
1754
  style: be(o.style)
@@ -1756,8 +1756,8 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1756
1756
  ]),
1757
1757
  R(ut, { name: "slide-fade" }, {
1758
1758
  default: Ee(() => [
1759
- ne(l("div", Hn, [
1760
- Le(s.$slots, "default", {}, void 0, !0)
1759
+ ne(l("div", Pn, [
1760
+ Me(s.$slots, "default", {}, void 0, !0)
1761
1761
  ], 512), [
1762
1762
  [it, t.value]
1763
1763
  ])
@@ -1766,7 +1766,7 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1766
1766
  })
1767
1767
  ]));
1768
1768
  }
1769
- }), Gn = /* @__PURE__ */ Y(Nn, [["__scopeId", "data-v-90320b87"]]), qn = { class: "text-[16px] text-gray-900 font-medium" }, Kn = { class: "grid gap-3" }, Wn = /* @__PURE__ */ G({
1769
+ }), Nn = /* @__PURE__ */ X(Hn, [["__scopeId", "data-v-90320b87"]]), Gn = { class: "text-[16px] text-gray-900 font-medium" }, qn = { class: "grid gap-3" }, Kn = /* @__PURE__ */ G({
1770
1770
  __name: "vs-container-accordion",
1771
1771
  props: {
1772
1772
  title: {
@@ -1795,15 +1795,15 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1795
1795
  onClick: n[0] || (n[0] = (a) => t.value = !t.value),
1796
1796
  class: "flex items-center gap-2"
1797
1797
  }, [
1798
- R(te(Hl), {
1798
+ R(le(Pl), {
1799
1799
  class: T(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1800
1800
  }, null, 8, ["class"]),
1801
- l("span", qn, W(o.title), 1)
1801
+ l("span", Gn, K(o.title), 1)
1802
1802
  ]),
1803
1803
  R(ut, { name: "slide-fade" }, {
1804
1804
  default: Ee(() => [
1805
- ne(l("div", Kn, [
1806
- Le(s.$slots, "default", {}, void 0, !0)
1805
+ ne(l("div", qn, [
1806
+ Me(s.$slots, "default", {}, void 0, !0)
1807
1807
  ], 512), [
1808
1808
  [it, t.value]
1809
1809
  ])
@@ -1812,7 +1812,7 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1812
1812
  })
1813
1813
  ]));
1814
1814
  }
1815
- }), Zn = /* @__PURE__ */ Y(Wn, [["__scopeId", "data-v-590eff11"]]), Jn = { class: "flex items-center justify-between" }, Yn = /* @__PURE__ */ G({
1815
+ }), Wn = /* @__PURE__ */ X(Kn, [["__scopeId", "data-v-590eff11"]]), Zn = { class: "flex items-center justify-between" }, Jn = /* @__PURE__ */ G({
1816
1816
  __name: "vs-container-default",
1817
1817
  props: {
1818
1818
  title: {
@@ -1826,16 +1826,16 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1826
1826
  },
1827
1827
  setup(o) {
1828
1828
  return (e, t) => (i(), u("div", null, [
1829
- l("div", Jn, [
1830
- l("p", null, W(o.title), 1)
1829
+ l("div", Zn, [
1830
+ l("p", null, K(o.title), 1)
1831
1831
  ]),
1832
- Le(e.$slots, "default")
1832
+ Me(e.$slots, "default")
1833
1833
  ]));
1834
1834
  }
1835
- }), Xn = {
1836
- switcher: Gn,
1837
- accordion: Zn,
1838
- default: Yn
1835
+ }), Yn = {
1836
+ switcher: Nn,
1837
+ accordion: Wn,
1838
+ default: Jn
1839
1839
  }, _e = {
1840
1840
  Equal: "==",
1841
1841
  Inequal: "!=",
@@ -1849,37 +1849,37 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1849
1849
  Contain: "*",
1850
1850
  In: "in",
1851
1851
  NotIn: "not_in"
1852
- }, Qn = (o, e) => String(o) === String(e), ea = (o, e) => String(o) !== String(e), ta = (o, e) => o > e, la = (o, e) => o >= e, oa = (o, e) => o < e, na = (o, e) => o <= e, aa = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, sa = (o, e) => String(o).startsWith(String(e)), ra = (o, e) => String(o).endsWith(String(e)), ia = (o, e) => String(o).includes(String(e)), ua = (o, e) => Array.isArray(e) ? e.includes(o) : !1, da = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, Ot = (o, e) => {
1852
+ }, Xn = (o, e) => String(o) === String(e), Qn = (o, e) => String(o) !== String(e), ea = (o, e) => o > e, ta = (o, e) => o >= e, la = (o, e) => o < e, oa = (o, e) => o <= e, na = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, aa = (o, e) => String(o).startsWith(String(e)), sa = (o, e) => String(o).endsWith(String(e)), ra = (o, e) => String(o).includes(String(e)), ia = (o, e) => Array.isArray(e) ? e.includes(o) : !1, ua = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, Ft = (o, e) => {
1853
1853
  if (!e) return !0;
1854
1854
  switch (e?.[1]) {
1855
1855
  case _e.Equal:
1856
- return Qn(o, e?.[2]);
1856
+ return Xn(o, e?.[2]);
1857
1857
  case _e.Inequal:
1858
- return ea(o, e?.[2]);
1858
+ return Qn(o, e?.[2]);
1859
1859
  case _e.Higer:
1860
- return ta(o, e?.[2]);
1860
+ return ea(o, e?.[2]);
1861
1861
  case _e.HigerOrEqual:
1862
- return la(o, e?.[2]);
1862
+ return ta(o, e?.[2]);
1863
1863
  case _e.Lower:
1864
- return oa(o, e?.[2]);
1864
+ return la(o, e?.[2]);
1865
1865
  case _e.LowerOrEqual:
1866
- return na(o, e?.[2]);
1866
+ return oa(o, e?.[2]);
1867
1867
  case _e.Between:
1868
- return aa(o, e?.[2]);
1868
+ return na(o, e?.[2]);
1869
1869
  case _e.StartWith:
1870
- return sa(o, e?.[2]);
1870
+ return aa(o, e?.[2]);
1871
1871
  case _e.EndWith:
1872
- return ra(o, e?.[2]);
1872
+ return sa(o, e?.[2]);
1873
1873
  case _e.Contain:
1874
- return ia(o, e?.[2]);
1874
+ return ra(o, e?.[2]);
1875
1875
  case _e.In:
1876
- return ua(o, e?.[2]);
1876
+ return ia(o, e?.[2]);
1877
1877
  case _e.NotIn:
1878
- return da(o, e?.[2]);
1878
+ return ua(o, e?.[2]);
1879
1879
  default:
1880
1880
  return !0;
1881
1881
  }
1882
- }, ca = /* @__PURE__ */ G({
1882
+ }, da = /* @__PURE__ */ G({
1883
1883
  __name: "vs-input-container",
1884
1884
  props: {
1885
1885
  style: {
@@ -1904,12 +1904,12 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1904
1904
  }
1905
1905
  },
1906
1906
  setup(o) {
1907
- const e = o, t = Ae("values", w({})), s = Ae("form"), n = S(() => e.schema?.filter((d) => {
1907
+ const e = o, t = Ae("values", w({})), s = Ae("form"), n = B(() => e.schema?.filter((d) => {
1908
1908
  const c = d?.conditions;
1909
1909
  if (!c) return !0;
1910
1910
  const f = Array.isArray(c) ? c[0] : c, p = e.name ? t.value?.[e.name]?.[f] ?? t.value?.[f] : t.value?.[f];
1911
- return Ot(p, c);
1912
- })), a = S(() => Xn[e.view]), r = S(() => {
1911
+ return Ft(p, c);
1912
+ })), a = B(() => Yn[e.view]), r = B(() => {
1913
1913
  if (t.value || (t.value = {}), !e.name) return t.value;
1914
1914
  const d = t.value[e.name];
1915
1915
  if (d) return d;
@@ -1919,38 +1919,35 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1919
1919
  [e.name]: c
1920
1920
  }, c;
1921
1921
  });
1922
- return (d, c) => o.schema?.length ? (i(), me(Oe(a.value), {
1922
+ return (d, c) => o.schema?.length ? (i(), ve(Oe(a.value), {
1923
1923
  key: 0,
1924
1924
  title: o.title,
1925
1925
  style: be(o.style)
1926
1926
  }, {
1927
1927
  default: Ee(() => [
1928
- (i(!0), u(re, null, fe(n.value, (f) => (i(), me(Ut, Fe({
1928
+ (i(!0), u(re, null, pe(n.value, (f) => (i(), ve(Ot, Fe({
1929
1929
  key: f.name
1930
1930
  }, { ref_for: !0 }, f, {
1931
1931
  item: f,
1932
1932
  modelValue: r.value[f.name],
1933
1933
  "onUpdate:modelValue": (p) => r.value[f.name] = p,
1934
1934
  style: o.style,
1935
- error: te(s)?.errors?.[f.name]
1935
+ error: le(s)?.errors?.[f.name]
1936
1936
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
1937
1937
  ]),
1938
1938
  _: 1
1939
- }, 8, ["title", "style"])) : U("", !0);
1939
+ }, 8, ["title", "style"])) : D("", !0);
1940
1940
  }
1941
- }), pa = ["aria-expanded", "data-focus"], fa = {
1941
+ }), ca = ["aria-expanded", "data-focus"], pa = {
1942
1942
  key: 0,
1943
1943
  class: "flex flex-wrap items-center gap-1 max-h-20 overflow-y-auto min-w-0 flex-1"
1944
- }, va = { class: "flex items-center min-w-0" }, ma = ["title"], ha = ["innerHTML"], ga = ["onClick"], ba = { class: "flex-1 min-w-[2px]" }, ya = ["placeholder"], xa = ["title"], wa = ["innerHTML"], ka = {
1944
+ }, fa = { class: "flex items-center min-w-0" }, va = ["title"], ma = ["innerHTML"], ha = ["onClick"], ga = { class: "flex-1 min-w-[2px]" }, ba = ["placeholder"], ya = ["title"], xa = ["innerHTML"], wa = {
1945
1945
  key: 2,
1946
- class: "text-gray-500 truncate"
1947
- }, _a = {
1948
- key: 3,
1949
1946
  class: "flex-1 min-w-[2px]"
1950
- }, $a = ["placeholder"], Ca = { class: "flex items-center shrink-0" }, Va = ["disabled"], Ma = ["disabled", "title"], La = ["aria-disabled", "onClick"], Sa = ["innerHTML"], Ba = {
1947
+ }, ka = ["placeholder"], _a = { class: "flex items-center shrink-0" }, $a = ["disabled"], Ca = ["disabled", "title"], Va = ["aria-disabled", "onClick"], Ma = ["innerHTML"], La = {
1951
1948
  key: 1,
1952
1949
  class: "px-3 py-2 text-center text-gray-500"
1953
- }, ja = ["disabled"], Mt = /* @__PURE__ */ G({
1950
+ }, Sa = ["disabled"], Vt = /* @__PURE__ */ G({
1954
1951
  __name: "vs-input-select",
1955
1952
  props: {
1956
1953
  multiple: { type: Boolean, default: !1 },
@@ -1978,24 +1975,26 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
1978
1975
  },
1979
1976
  emits: ["change", "update:modelValue"],
1980
1977
  setup(o, { emit: e }) {
1981
- const t = o, s = e, n = S(() => t.multiple), a = S(() => t.disabled);
1978
+ const t = o, s = e, n = B(() => t.multiple), a = B(() => t.disabled);
1982
1979
  Ce(t.style);
1983
- const r = S({
1980
+ const r = B({
1984
1981
  get: () => t.modelValue,
1985
1982
  set: (g) => s("update:modelValue", g)
1986
1983
  });
1987
1984
  !r.value && t.defaultValue && (r.value = t.defaultValue);
1988
- const d = w(null), c = w(null), f = w(null), p = w(null), v = w(!1), k = w(!1), m = w(null), I = w([]), $ = w(-1), A = w([]), E = w(""), O = w(null), C = w("bottom"), h = w({}), x = w([]), B = S(() => {
1985
+ const d = w(null), c = w(null), f = w(null), p = w(null), v = w(!1), k = w(!1), m = w(null), I = w([]), $ = w(-1), A = w([]), E = w(""), O = w(null), C = w("bottom"), h = w({}), x = w([]), j = B(() => {
1989
1986
  if (!x.value.length) return [];
1990
1987
  const g = I.value, y = new Map(g.map((_) => [_.id?.toString(), _]));
1991
1988
  return x.value.map((_) => y.get(_?.toString())).filter((_) => !!_);
1992
- }), V = S(() => t.placeholder || "Select..."), P = S(() => H(m.value)), ee = S(() => n.value ? !x.value.length && E.value === "" : !P.value && E.value === ""), Q = S(() => a.value ? !1 : n.value ? x.value.length > 0 : !!r.value), j = (g) => n.value ? x.value.some((y) => y?.toString() === g?.toString()) : r.value?.toString() === g?.toString(), q = S(() => {
1989
+ }), M = B(() => t.placeholder || "Select..."), P = B(() => z(m.value));
1990
+ B(() => n.value ? !x.value.length && E.value === "" : !P.value && E.value === "");
1991
+ const te = B(() => a.value ? !1 : n.value ? x.value.length > 0 : !!r.value), Y = (g) => n.value ? x.value.some((y) => y?.toString() === g?.toString()) : r.value?.toString() === g?.toString(), S = B(() => {
1993
1992
  let g = I.value ?? [];
1994
1993
  if (!t.data && E.value.trim() !== "") {
1995
1994
  const y = E.value.toLowerCase();
1996
1995
  g = g.filter((_) => {
1997
- const K = H(_).toLowerCase(), se = _.text?.toLowerCase?.() || "";
1998
- return K.includes(y) || se.includes(y);
1996
+ const q = z(_).toLowerCase(), se = _.text?.toLowerCase?.() || "";
1997
+ return q.includes(y) || se.includes(y);
1999
1998
  });
2000
1999
  }
2001
2000
  if (n.value && x.value.length) {
@@ -2003,228 +2002,228 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2003
2002
  g = g.filter((_) => !y.has(_.id?.toString()));
2004
2003
  }
2005
2004
  return g;
2006
- }), X = Ae("values"), Z = /\{\{\s*([^}]+?)\s*\}\}/g, D = (g) => (g ? String(g) : "").replace(/<[^>]*>/g, "").trim(), F = S(() => t.slot ?? t?.optionTemplate ?? ""), z = (g) => {
2005
+ }), W = Ae("values"), ee = /\{\{\s*([^}]+?)\s*\}\}/g, Z = (g) => (g ? String(g) : "").replace(/<[^>]*>/g, "").trim(), U = B(() => t.slot ?? t?.optionTemplate ?? ""), F = (g) => {
2007
2006
  if (!g) return "";
2008
- const y = F.value;
2009
- return y ? y.replace(Z, (_, K) => {
2010
- const se = K.trim(), ve = g[se];
2011
- return ve != null ? String(ve) : "";
2007
+ const y = U.value;
2008
+ return y ? y.replace(ee, (_, q) => {
2009
+ const se = q.trim(), fe = g[se];
2010
+ return fe != null ? String(fe) : "";
2012
2011
  }) : g.text ?? "";
2013
- }, H = (g) => {
2012
+ }, z = (g) => {
2014
2013
  if (!g) return "";
2015
- if (!F.value) return g.text ?? "";
2016
- const _ = z(g);
2017
- return D(_) || g.text || "";
2018
- }, le = (g) => {
2019
- t.set && X?.value && Object.entries(t.set).forEach(([y, _]) => {
2014
+ if (!U.value) return g.text ?? "";
2015
+ const _ = F(g);
2016
+ return Z(_) || g.text || "";
2017
+ }, H = (g) => {
2018
+ t.set && W?.value && Object.entries(t.set).forEach(([y, _]) => {
2020
2019
  if (!y) return;
2021
- const K = g ? g[_] : null;
2022
- X.value[y] = K ?? null;
2020
+ const q = g ? g[_] : null;
2021
+ W.value[y] = q ?? null;
2023
2022
  });
2024
- }, pe = S(() => t.parent ? X?.value?.[t.parent]?.toString() ?? null : null), we = async (g) => {
2023
+ }, Q = B(() => t.parent ? W?.value?.[t.parent]?.toString() ?? null : null), ge = async (g) => {
2025
2024
  if (!t.data) {
2026
2025
  let y = t.options ?? [];
2027
2026
  if (g?.trim()) {
2028
2027
  const _ = g.toLowerCase();
2029
- y = y.filter((K) => {
2030
- const se = H(K).toLowerCase(), ve = K.text?.toLowerCase?.() || "";
2031
- return se.includes(_) || ve.includes(_);
2028
+ y = y.filter((q) => {
2029
+ const se = z(q).toLowerCase(), fe = q.text?.toLowerCase?.() || "";
2030
+ return se.includes(_) || fe.includes(_);
2032
2031
  });
2033
2032
  }
2034
2033
  return y;
2035
2034
  }
2036
2035
  try {
2037
- const y = t.host ?? "", _ = t.prefix ?? "api", K = t.api ?? `/${_}/suggest/${t.data}`, se = `${y}${K}`, ve = new URLSearchParams();
2038
- return ve.set("json", "1"), g && ve.set("key", g), pe.value !== void 0 && pe.value !== null && pe.value !== "" && ve.set("parent", pe.value), (await fetch(`${se}?${ve.toString()}`).then((ze) => ze.json()))?.data ?? [];
2036
+ const y = t.host ?? "", _ = t.prefix ?? "api", q = t.api ?? `/${_}/suggest/${t.data}`, se = `${y}${q}`, fe = new URLSearchParams();
2037
+ return fe.set("json", "1"), g && fe.set("key", g), Q.value !== void 0 && Q.value !== null && Q.value !== "" && fe.set("parent", Q.value), (await fetch(`${se}?${fe.toString()}`).then((ze) => ze.json()))?.data ?? [];
2039
2038
  } catch {
2040
2039
  return [];
2041
2040
  }
2042
- }, Ue = async () => {
2043
- t.data ? I.value = await we(E.value) : I.value = t.options ? [...t.options] : [];
2044
- }, We = async (g) => {
2041
+ }, we = async () => {
2042
+ t.data ? I.value = await ge(E.value) : I.value = t.options ? [...t.options] : [];
2043
+ }, Ke = async (g) => {
2045
2044
  if (g == null) return null;
2046
2045
  const y = I.value?.find((_) => _?.id?.toString() === String(g));
2047
2046
  if (y) return y;
2048
2047
  if (t.data)
2049
2048
  try {
2050
- const _ = t.host ?? "", K = t.prefix ?? "api", se = t.api ?? `/${K}/suggest/${t.data}`, ve = `${_}${se}`, ke = new URLSearchParams();
2051
- return ke.set("json", "1"), ke.set("val", String(g)), pe.value !== void 0 && pe.value !== null && pe.value !== "" && ke.set("parent", pe.value), ((await fetch(`${ve}?${ke.toString()}`).then((Pe) => Pe.json()))?.data ?? [])?.[0] ?? null;
2049
+ const _ = t.host ?? "", q = t.prefix ?? "api", se = t.api ?? `/${q}/suggest/${t.data}`, fe = `${_}${se}`, ke = new URLSearchParams();
2050
+ return ke.set("json", "1"), ke.set("val", String(g)), Q.value !== void 0 && Q.value !== null && Q.value !== "" && ke.set("parent", Q.value), ((await fetch(`${fe}?${ke.toString()}`).then((Re) => Re.json()))?.data ?? [])?.[0] ?? null;
2052
2051
  } catch {
2053
2052
  return null;
2054
2053
  }
2055
2054
  return null;
2056
- }, tt = async (g) => {
2057
- const y = new Set(I.value.map((K) => K.id?.toString())), _ = g.filter((K) => !y.has(K?.toString()));
2058
- _.length && await _.reduce(async (K, se) => {
2059
- await K;
2060
- const ve = await We(se);
2061
- ve && I.value.push(ve);
2055
+ }, et = async (g) => {
2056
+ const y = new Set(I.value.map((q) => q.id?.toString())), _ = g.filter((q) => !y.has(q?.toString()));
2057
+ _.length && await _.reduce(async (q, se) => {
2058
+ await q;
2059
+ const fe = await Ke(se);
2060
+ fe && I.value.push(fe);
2062
2061
  }, Promise.resolve());
2063
- }, De = async () => {
2064
- a.value || (v.value = !0, await Ue(), await je(() => {
2065
- Ve(), O.value?.focus(), q.value.length ? $.value = 0 : $.value = -1;
2062
+ }, Ue = async () => {
2063
+ a.value || (v.value = !0, await we(), await je(() => {
2064
+ Ve(), O.value?.focus(), S.value.length ? $.value = 0 : $.value = -1;
2066
2065
  }));
2067
- }, Se = () => {
2066
+ }, Le = () => {
2068
2067
  v.value = !1, $.value = -1;
2069
- }, Te = async (g) => {
2068
+ }, tt = async (g) => {
2070
2069
  if (a.value) return;
2071
- !v.value ? await De() : Se();
2072
- }, b = async () => {
2073
- v.value ? O.value?.focus() : await De();
2074
- }, M = () => {
2075
- n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null)), le(null), E.value = "", je(() => O.value?.focus());
2076
- }, J = (g) => {
2070
+ !v.value ? await Ue() : Le();
2071
+ }, Te = async () => {
2072
+ v.value ? O.value?.focus() : await Ue();
2073
+ }, b = () => {
2074
+ n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null)), H(null), E.value = "", je(() => O.value?.focus());
2075
+ }, V = (g) => {
2077
2076
  n.value && (x.value = x.value.filter((y) => y?.toString() !== g?.toString()), r.value = [...x.value], s("change", r.value), je(() => O.value?.focus()));
2077
+ }, J = (g) => {
2078
+ n.value ? (Y(g.id) || (x.value = [...x.value, g.id], r.value = [...x.value], s("change", r.value)), E.value = "", je(() => {
2079
+ O.value?.focus(), $.value = Math.min($.value, S.value.length - 1);
2080
+ }), H(null)) : (m.value = g, r.value = g.id, s("change", r.value), E.value = "", Le(), H(g));
2078
2081
  }, N = (g) => {
2079
- n.value ? (j(g.id) || (x.value = [...x.value, g.id], r.value = [...x.value], s("change", r.value)), E.value = "", je(() => {
2080
- O.value?.focus(), $.value = Math.min($.value, q.value.length - 1);
2081
- }), le(null)) : (m.value = g, r.value = g.id, s("change", r.value), E.value = "", Se(), le(g));
2082
- }, ae = (g) => {
2083
- j(g.id) || N(g);
2082
+ Y(g.id) || J(g);
2084
2083
  }, oe = (g, y) => {
2085
2084
  if (!g || !y) return;
2086
- const _ = g.offsetTop, K = _ + g.offsetHeight, se = y.scrollTop, ve = se + y.clientHeight;
2085
+ const _ = g.offsetTop, q = _ + g.offsetHeight, se = y.scrollTop, fe = se + y.clientHeight;
2087
2086
  let ke = y.scrollTop;
2088
- _ < se ? ke = _ - 80 : K > ve && (ke = K - y.clientHeight + 4);
2087
+ _ < se ? ke = _ - 80 : q > fe && (ke = q - y.clientHeight + 4);
2089
2088
  const ze = y;
2090
2089
  ze.scrollTop = ke;
2091
- }, Me = (g) => {
2090
+ }, ae = (g) => {
2092
2091
  let y = g.parentElement;
2093
2092
  for (; y; ) {
2094
2093
  if (y.classList.contains("ui-dialog__content"))
2095
2094
  return y;
2096
- const _ = window.getComputedStyle(y), K = _.overflow + _.overflowY + _.overflowX;
2097
- if (K.includes("auto") || K.includes("scroll") || y === document.body || y === document.documentElement)
2095
+ const _ = window.getComputedStyle(y), q = _.overflow + _.overflowY + _.overflowX;
2096
+ if (q.includes("auto") || q.includes("scroll") || y === document.body || y === document.documentElement)
2098
2097
  return y;
2099
2098
  y = y.parentElement;
2100
2099
  }
2101
2100
  return document.body;
2102
2101
  }, Ve = () => {
2103
2102
  if (!c.value) return;
2104
- const g = c.value.getBoundingClientRect(), y = window.innerHeight || document.documentElement.clientHeight, _ = window.innerWidth || document.documentElement.clientWidth, K = 8, se = 8, ve = t.maxHeight || 300, ke = y - g.bottom - se - K, ze = g.top - se - K, Re = ke >= ze, Pe = Math.max(_ - K * 2, 0);
2105
- let { width: He } = g;
2106
- Pe > 0 && He > Pe && (He = Pe);
2107
- let { left: Ne } = g;
2108
- Ne + He + K > _ && (Ne = _ - He - K), Ne = Math.max(Ne, K);
2109
- const Gt = Math.min(
2110
- ve,
2111
- Math.max(Re ? ke : ze, 50)
2103
+ const g = c.value.getBoundingClientRect(), y = window.innerHeight || document.documentElement.clientHeight, _ = window.innerWidth || document.documentElement.clientWidth, q = 8, se = 8, fe = t.maxHeight || 300, ke = y - g.bottom - se - q, ze = g.top - se - q, De = ke >= ze, Re = Math.max(_ - q * 2, 0);
2104
+ let { width: Pe } = g;
2105
+ Re > 0 && Pe > Re && (Pe = Re);
2106
+ let { left: He } = g;
2107
+ He + Pe + q > _ && (He = _ - Pe - q), He = Math.max(He, q);
2108
+ const Nt = Math.min(
2109
+ fe,
2110
+ Math.max(De ? ke : ze, 50)
2112
2111
  );
2113
- C.value = Re ? "bottom" : "top", h.value = {
2112
+ C.value = De ? "bottom" : "top", h.value = {
2114
2113
  position: "fixed",
2115
- left: `${Ne}px`,
2116
- width: `${He}px`,
2114
+ left: `${He}px`,
2115
+ width: `${Pe}px`,
2117
2116
  minWidth: "300px",
2118
- maxHeight: `${Gt}px`,
2119
- transform: Re ? "none" : "translateY(-100%)",
2120
- top: Re ? `${g.bottom + se}px` : `${g.top - se}px`
2117
+ maxHeight: `${Nt}px`,
2118
+ transform: De ? "none" : "translateY(-100%)",
2119
+ top: De ? `${g.bottom + se}px` : `${g.top - se}px`
2121
2120
  };
2122
2121
  }, Ie = async (g) => {
2123
- a.value || !v.value && (g.key === "ArrowDown" || g.key === "ArrowUp") && (g.preventDefault(), await De());
2124
- }, Be = (g) => {
2122
+ a.value || !v.value && (g.key === "ArrowDown" || g.key === "ArrowUp") && (g.preventDefault(), await Ue());
2123
+ }, Se = (g) => {
2125
2124
  if (!v.value) return;
2126
2125
  const { key: y } = g;
2127
2126
  if (y === "ArrowDown")
2128
- g.preventDefault(), $.value + 1 < q.value.length && ($.value += 1, oe(A.value[$.value], f.value));
2127
+ g.preventDefault(), $.value + 1 < S.value.length && ($.value += 1, oe(A.value[$.value], f.value));
2129
2128
  else if (y === "ArrowUp")
2130
2129
  g.preventDefault(), $.value > 0 && ($.value -= 1, oe(A.value[$.value], f.value));
2131
2130
  else if (y === "Enter") {
2132
2131
  g.preventDefault();
2133
- const _ = q.value[$.value];
2134
- _ && N(_), O.value?.blur();
2135
- } else y === "Escape" ? (g.preventDefault(), Se()) : y === "Backspace" ? n.value && E.value === "" && x.value.length && (x.value = x.value.slice(0, -1), r.value = [...x.value], s("change", r.value)) : y === "Home" ? ($.value = 0, oe(A.value[0], f.value)) : y === "End" ? ($.value = q.value.length - 1, oe(A.value[$.value], f.value)) : y === "Tab" && Se();
2136
- }, dt = () => {
2132
+ const _ = S.value[$.value];
2133
+ _ && J(_), O.value?.blur();
2134
+ } else y === "Escape" ? (g.preventDefault(), Le()) : y === "Backspace" ? n.value && E.value === "" && x.value.length && (x.value = x.value.slice(0, -1), r.value = [...x.value], s("change", r.value)) : y === "Home" ? ($.value = 0, oe(A.value[0], f.value)) : y === "End" ? ($.value = S.value.length - 1, oe(A.value[$.value], f.value)) : y === "Tab" && Le();
2135
+ }, Be = () => {
2137
2136
  a.value || (k.value = !0);
2138
- }, ct = () => {
2137
+ }, dt = () => {
2139
2138
  k.value = !1, E.value = "";
2139
+ }, ct = (g) => {
2140
+ g.key === "Escape" && v.value && Le();
2140
2141
  }, pt = (g) => {
2141
- g.key === "Escape" && v.value && Se();
2142
- }, ft = (g) => {
2143
2142
  const y = g.target;
2144
- d.value?.contains(y) || p.value?.contains(y) || Se();
2145
- }, vt = (g) => {
2143
+ d.value?.contains(y) || p.value?.contains(y) || Le();
2144
+ }, ft = (g) => {
2146
2145
  v.value && f.value && !f.value.contains(g.target) && Ve();
2147
- }, mt = () => {
2146
+ }, vt = () => {
2148
2147
  v.value && Ve();
2149
- }, ht = () => {
2148
+ }, mt = () => {
2150
2149
  v.value && Ve();
2151
2150
  };
2152
2151
  ue(() => t.options, (g) => {
2153
- g?.length && (I.value = [...g], Ze());
2152
+ g?.length && (I.value = [...g], We());
2154
2153
  }, { immediate: !0 });
2155
- async function Ze() {
2154
+ async function We() {
2156
2155
  if (n.value)
2157
- Array.isArray(r.value) ? x.value = [...r.value] : (x.value = r.value == null ? [] : [r.value], r.value = [...x.value]), t.data && x.value.length && (await tt(x.value), await je());
2156
+ Array.isArray(r.value) ? x.value = [...r.value] : (x.value = r.value == null ? [] : [r.value], r.value = [...x.value]), t.data && x.value.length && (await et(x.value), await je());
2158
2157
  else {
2159
2158
  if (Array.isArray(r.value)) {
2160
2159
  const g = r.value[0] ?? null;
2161
2160
  r.value = g ?? null;
2162
2161
  }
2163
- r.value != null && (m.value = await We(r.value)), le(m.value ?? null);
2162
+ r.value != null && (m.value = await Ke(r.value)), H(m.value ?? null);
2164
2163
  }
2165
2164
  }
2166
2165
  ue(r, () => {
2167
- Ze();
2166
+ We();
2168
2167
  }), ye(async () => {
2169
- addEventListener("keydown", pt), addEventListener("scroll", vt, !0), addEventListener("resize", mt), document.addEventListener("click", ft, !0), c.value && Me(c.value).addEventListener("scroll", ht, !0), t.options?.length && !t.data ? I.value = [...t.options] : t.data && (I.value = await we("")), await Ze(), yt.value = !1;
2170
- }), Qe(() => {
2171
- removeEventListener("keydown", pt), removeEventListener("scroll", vt, !0), removeEventListener("resize", mt), document.removeEventListener("click", ft, !0), c.value && Me(c.value).removeEventListener("scroll", ht, !0);
2168
+ addEventListener("keydown", ct), addEventListener("scroll", ft, !0), addEventListener("resize", vt), document.addEventListener("click", pt, !0), c.value && ae(c.value).addEventListener("scroll", mt, !0), t.options?.length && !t.data ? I.value = [...t.options] : t.data && (I.value = await ge("")), await We(), bt.value = !1;
2169
+ }), Xe(() => {
2170
+ removeEventListener("keydown", ct), removeEventListener("scroll", ft, !0), removeEventListener("resize", vt), document.removeEventListener("click", pt, !0), c.value && ae(c.value).removeEventListener("scroll", mt, !0);
2172
2171
  });
2173
- const Je = w(!1), lt = w({}), gt = w([]), bt = w(null);
2174
- async function Rt() {
2175
- if (!t.add?.token || bt?.value.validate())
2172
+ const Ze = w(!1), lt = w({}), ht = w([]), gt = w(null);
2173
+ async function Dt() {
2174
+ if (!t.add?.token || gt?.value.validate())
2176
2175
  return;
2177
2176
  const y = t.add.api ?? `/api/table/${t.add.token}`, { id: _ } = await fetch(y, {
2178
2177
  method: "POST",
2179
2178
  headers: { "Content-Type": "application/json" },
2180
2179
  body: JSON.stringify(lt.value)
2181
- }).then((K) => K.json());
2180
+ }).then((q) => q.json());
2182
2181
  if (!t.options?.length && t.data) {
2183
- const { data: K } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${_}`).then((se) => se.json());
2184
- m.value = K[0], I.value.push(K[0]), r.value = _;
2182
+ const { data: q } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${_}`).then((se) => se.json());
2183
+ m.value = q[0], I.value.push(q[0]), r.value = _;
2185
2184
  }
2186
- Je.value = !1, ce({ title: "Success!", message: "Object created." });
2185
+ Ze.value = !1, ce({ title: "Success!", message: "Object created." });
2187
2186
  }
2188
- async function Pt() {
2187
+ async function Rt() {
2189
2188
  if (!t.add) return null;
2190
2189
  const g = await fetch(`/api/template/form/${t.add.form}`).then((y) => y.json());
2191
- return gt.value = g.schema, Je.value = !0, null;
2190
+ return ht.value = g.schema, Ze.value = !0, null;
2192
2191
  }
2193
- function Ht(g, y = 200) {
2192
+ function Pt(g, y = 200) {
2194
2193
  let _;
2195
- return (...K) => {
2196
- _ && clearTimeout(_), _ = window.setTimeout(() => g(...K), y);
2194
+ return (...q) => {
2195
+ _ && clearTimeout(_), _ = window.setTimeout(() => g(...q), y);
2197
2196
  };
2198
2197
  }
2199
- const Nt = Ht(async (g) => {
2200
- I.value = await we(g);
2198
+ const Ht = Pt(async (g) => {
2199
+ I.value = await ge(g);
2201
2200
  }, 200);
2202
2201
  ue(E, (g) => {
2203
- t.data && Nt(g.trim());
2202
+ t.data && Ht(g.trim());
2204
2203
  }), ue(() => t.options, (g) => {
2205
- !t.data && g?.length && (I.value = [...g], Ze());
2204
+ !t.data && g?.length && (I.value = [...g], We());
2206
2205
  }, { immediate: !0 }), ue(() => t.parent ?? t.parentValue, () => {
2207
- t.data && Ue();
2206
+ t.data && we();
2208
2207
  });
2209
- const yt = w(!0);
2210
- return ue(pe, async () => {
2211
- t.data && (yt.value || (n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null))), await Ue());
2208
+ const bt = w(!0);
2209
+ return ue(Q, async () => {
2210
+ t.data && (bt.value || (n.value ? (x.value = [], r.value = [], s("change", [])) : (m.value = null, r.value = null, s("change", null))), await we());
2212
2211
  }), (g, y) => (i(), u(re, null, [
2213
- R(te(zt), {
2214
- visible: Je.value,
2215
- "onUpdate:visible": y[1] || (y[1] = (_) => Je.value = _),
2212
+ R(le(It), {
2213
+ visible: Ze.value,
2214
+ "onUpdate:visible": y[1] || (y[1] = (_) => Ze.value = _),
2216
2215
  title: "Додати",
2217
2216
  buttonText: "Додати",
2218
- onDone: Rt,
2217
+ onDone: Dt,
2219
2218
  teleport: g.teleport
2220
2219
  }, {
2221
2220
  default: Ee(() => [
2222
- R(Ke, {
2223
- schema: gt.value,
2221
+ R(qe, {
2222
+ schema: ht.value,
2224
2223
  modelValue: lt.value,
2225
2224
  "onUpdate:modelValue": y[0] || (y[0] = (_) => lt.value = _),
2226
2225
  ref_key: "addForm",
2227
- ref: bt
2226
+ ref: gt
2228
2227
  }, null, 8, ["schema", "modelValue"])
2229
2228
  ]),
2230
2229
  _: 1
@@ -2261,7 +2260,7 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2261
2260
  "aria-expanded": v.value,
2262
2261
  "aria-haspopup": "listbox",
2263
2262
  onKeydown: Ie,
2264
- onClick: b,
2263
+ onClick: Te,
2265
2264
  "data-focus": v.value || k.value ? "true" : "false"
2266
2265
  }, [
2267
2266
  l("div", {
@@ -2269,33 +2268,33 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2269
2268
  ref_key: "triggerRef",
2270
2269
  ref: c
2271
2270
  }, [
2272
- n.value ? (i(), u("div", fa, [
2273
- (i(!0), u(re, null, fe(B.value, (_) => (i(), u("div", {
2271
+ n.value ? (i(), u("div", pa, [
2272
+ (i(!0), u(re, null, pe(j.value, (_) => (i(), u("div", {
2274
2273
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border max-w-full",
2275
2274
  key: _.id
2276
2275
  }, [
2277
- l("div", va, [
2276
+ l("div", fa, [
2278
2277
  _?.color ? (i(), u("span", {
2279
2278
  key: 0,
2280
2279
  class: "w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",
2281
2280
  style: be({ backgroundColor: _?.color })
2282
- }, null, 4)) : U("", !0),
2281
+ }, null, 4)) : D("", !0),
2283
2282
  l("div", {
2284
2283
  class: "truncate text-gray-900 overflow-hidden max-w-[200px] px-0.5 py-[2px] pl-1.5",
2285
- title: H(_)
2284
+ title: z(_)
2286
2285
  }, [
2287
- F.value ? (i(), u("span", {
2286
+ U.value ? (i(), u("span", {
2288
2287
  key: 0,
2289
- innerHTML: z(_)
2290
- }, null, 8, ha)) : (i(), u(re, { key: 1 }, [
2291
- ge(W(_.text), 1)
2288
+ innerHTML: F(_)
2289
+ }, null, 8, ma)) : (i(), u(re, { key: 1 }, [
2290
+ he(K(_.text), 1)
2292
2291
  ], 64))
2293
- ], 8, ma)
2292
+ ], 8, va)
2294
2293
  ]),
2295
2294
  l("div", {
2296
2295
  role: "button",
2297
2296
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b] flex-shrink-0",
2298
- onClick: $e((K) => J(_.id), ["stop"])
2297
+ onClick: $e((q) => V(_.id), ["stop"])
2299
2298
  }, y[6] || (y[6] = [
2300
2299
  l("svg", {
2301
2300
  height: "14",
@@ -2307,9 +2306,9 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2307
2306
  }, [
2308
2307
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2309
2308
  ], -1)
2310
- ]), 8, ga)
2309
+ ]), 8, ha)
2311
2310
  ]))), 128)),
2312
- l("div", ba, [
2311
+ l("div", ga, [
2313
2312
  !a.value && g.search ? ne((i(), u("input", {
2314
2313
  key: 0,
2315
2314
  ref_key: "inputRef",
@@ -2322,14 +2321,14 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2322
2321
  type: "text",
2323
2322
  tabindex: "0",
2324
2323
  "aria-autocomplete": "list",
2325
- placeholder: x.value.length ? " " : V.value,
2324
+ placeholder: x.value.length ? " " : M.value,
2326
2325
  "onUpdate:modelValue": y[2] || (y[2] = (_) => E.value = _),
2327
- onFocus: dt,
2328
- onBlur: ct,
2329
- onKeydown: Be
2330
- }, null, 40, ya)), [
2331
- [he, E.value]
2332
- ]) : U("", !0)
2326
+ onFocus: Be,
2327
+ onBlur: dt,
2328
+ onKeydown: Se
2329
+ }, null, 40, ba)), [
2330
+ [me, E.value]
2331
+ ]) : D("", !0)
2333
2332
  ])
2334
2333
  ])) : !n.value && !k.value && P.value && E.value === "" ? (i(), u("div", {
2335
2334
  key: 1,
@@ -2340,18 +2339,17 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2340
2339
  key: 0,
2341
2340
  class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
2342
2341
  style: be({ backgroundColor: m.value?.color })
2343
- }, null, 4)) : U("", !0),
2344
- F.value ? (i(), u("span", {
2342
+ }, null, 4)) : D("", !0),
2343
+ U.value ? (i(), u("span", {
2345
2344
  key: 1,
2346
2345
  class: T({ "pl-5": m.value?.color }),
2347
- innerHTML: z(m.value)
2348
- }, null, 10, wa)) : (i(), u("span", {
2346
+ innerHTML: F(m.value)
2347
+ }, null, 10, xa)) : (i(), u("span", {
2349
2348
  key: 2,
2350
2349
  class: T({ "pl-5": m.value?.color })
2351
- }, W(m.value?.text), 3))
2352
- ], 8, xa)) : U("", !0),
2353
- ee.value ? (i(), u("div", ka, W(V.value), 1)) : U("", !0),
2354
- n.value ? U("", !0) : (i(), u("div", _a, [
2350
+ }, K(m.value?.text), 3))
2351
+ ], 8, ya)) : D("", !0),
2352
+ n.value ? D("", !0) : (i(), u("div", wa, [
2355
2353
  !a.value && g.search ? ne((i(), u("input", {
2356
2354
  key: 0,
2357
2355
  ref_key: "inputRef",
@@ -2366,22 +2364,22 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2366
2364
  "aria-autocomplete": "list",
2367
2365
  placeholder: k.value && !E.value?.length && P.value || " ",
2368
2366
  "onUpdate:modelValue": y[3] || (y[3] = (_) => E.value = _),
2369
- onFocus: dt,
2370
- onBlur: ct,
2371
- onKeydown: Be
2372
- }, null, 40, $a)), [
2373
- [he, E.value]
2374
- ]) : U("", !0)
2367
+ onFocus: Be,
2368
+ onBlur: dt,
2369
+ onKeydown: Se
2370
+ }, null, 40, ka)), [
2371
+ [me, E.value]
2372
+ ]) : D("", !0)
2375
2373
  ]))
2376
2374
  ], 512),
2377
- l("div", Ca, [
2378
- Q.value ? (i(), u("button", {
2375
+ l("div", _a, [
2376
+ te.value ? (i(), u("button", {
2379
2377
  key: 0,
2380
2378
  type: "button",
2381
2379
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2382
2380
  "aria-hidden": "true",
2383
2381
  disabled: a.value,
2384
- onClick: $e(M, ["stop"])
2382
+ onClick: $e(b, ["stop"])
2385
2383
  }, y[7] || (y[7] = [
2386
2384
  l("svg", {
2387
2385
  height: "20",
@@ -2391,14 +2389,14 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2391
2389
  }, [
2392
2390
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2393
2391
  ], -1)
2394
- ]), 8, Va)) : U("", !0),
2392
+ ]), 8, $a)) : D("", !0),
2395
2393
  y[9] || (y[9] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2396
2394
  l("button", {
2397
2395
  type: "button",
2398
2396
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2399
2397
  "aria-hidden": "true",
2400
2398
  disabled: a.value,
2401
- onClick: y[4] || (y[4] = $e((_) => Te(), ["stop"])),
2399
+ onClick: y[4] || (y[4] = $e((_) => tt(), ["stop"])),
2402
2400
  title: v.value ? "Закрити список" : "Відкрити список"
2403
2401
  }, y[8] || (y[8] = [
2404
2402
  l("svg", {
@@ -2409,10 +2407,10 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2409
2407
  }, [
2410
2408
  l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
2411
2409
  ], -1)
2412
- ]), 8, Ma)
2410
+ ]), 8, Ca)
2413
2411
  ])
2414
- ], 42, pa),
2415
- (i(), me(It, { to: "body" }, [
2412
+ ], 42, ca),
2413
+ (i(), ve(Et, { to: "body" }, [
2416
2414
  v.value ? (i(), u("div", {
2417
2415
  key: 0,
2418
2416
  ref_key: "dropdownRef",
@@ -2429,62 +2427,62 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2429
2427
  ref_key: "listRef",
2430
2428
  ref: f
2431
2429
  }, [
2432
- q.value.length ? (i(!0), u(re, { key: 0 }, fe(q.value, (_, K) => (i(), u("div", {
2430
+ S.value.length ? (i(!0), u(re, { key: 0 }, pe(S.value, (_, q) => (i(), u("div", {
2433
2431
  key: _.id,
2434
2432
  ref_for: !0,
2435
- ref: (se) => A.value[K] = se,
2433
+ ref: (se) => A.value[q] = se,
2436
2434
  class: T([
2437
2435
  "flex px-3 py-2 cursor-default select-none text-gray-900 ",
2438
- j(_.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
2439
- $.value === K && !j(_.id) ? "bg-blue-100" : ""
2436
+ Y(_.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
2437
+ $.value === q && !Y(_.id) ? "bg-blue-100" : ""
2440
2438
  ]),
2441
- "aria-disabled": j(_.id) ? "true" : "false",
2439
+ "aria-disabled": Y(_.id) ? "true" : "false",
2442
2440
  role: "option",
2443
2441
  tabindex: "-1",
2444
- onClick: (se) => ae(_)
2442
+ onClick: (se) => N(_)
2445
2443
  }, [
2446
2444
  _?.color ? (i(), u("span", {
2447
2445
  key: 0,
2448
2446
  class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2449
2447
  style: be({ backgroundColor: _?.color })
2450
- }, null, 4)) : U("", !0),
2448
+ }, null, 4)) : D("", !0),
2451
2449
  l("div", {
2452
2450
  class: T([
2453
2451
  "leading-[19px]",
2454
2452
  $.value === _.id ? "text-white" : "",
2455
2453
  // active style like react-select
2456
- ($.value === K, "")
2454
+ ($.value === q, "")
2457
2455
  ])
2458
2456
  }, [
2459
- F.value ? (i(), u("span", {
2457
+ U.value ? (i(), u("span", {
2460
2458
  key: 0,
2461
- innerHTML: z(_)
2462
- }, null, 8, Sa)) : (i(), u(re, { key: 1 }, [
2463
- ge(W(_.text), 1)
2459
+ innerHTML: F(_)
2460
+ }, null, 8, Ma)) : (i(), u(re, { key: 1 }, [
2461
+ he(K(_.text), 1)
2464
2462
  ], 64))
2465
2463
  ], 2)
2466
- ], 10, La))), 128)) : (i(), u("div", Ba, " No options "))
2464
+ ], 10, Va))), 128)) : (i(), u("div", La, " No options "))
2467
2465
  ], 4)
2468
- ], 4)) : U("", !0)
2466
+ ], 4)) : D("", !0)
2469
2467
  ]))
2470
2468
  ], 2),
2471
2469
  t.add ? (i(), u("button", {
2472
2470
  key: 0,
2473
- onClick: Pt,
2471
+ onClick: Rt,
2474
2472
  class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
2475
2473
  disabled: a.value,
2476
2474
  type: "button"
2477
2475
  }, [
2478
- R(qe, {
2476
+ R(Ge, {
2479
2477
  width: "16",
2480
2478
  height: "16"
2481
2479
  }),
2482
2480
  y[12] || (y[12] = l("span", null, "Додати", -1))
2483
- ], 8, ja)) : U("", !0)
2481
+ ], 8, Sa)) : D("", !0)
2484
2482
  ], 512)
2485
2483
  ], 64));
2486
2484
  }
2487
- }), Ea = ["placeholder", "disabled"], Ia = /* @__PURE__ */ G({
2485
+ }), Ba = ["placeholder", "disabled"], ja = /* @__PURE__ */ G({
2488
2486
  __name: "vs-input-textarea",
2489
2487
  props: /* @__PURE__ */ ie({
2490
2488
  style: { default: () => ({}) },
@@ -2506,15 +2504,15 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2506
2504
  placeholder: n.placeholder,
2507
2505
  disabled: n.disabled,
2508
2506
  row: "2",
2509
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [te(t)]]),
2507
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [le(t)]]),
2510
2508
  style: {
2511
2509
  border: "1px solid #CFD9E0"
2512
2510
  }
2513
- }, null, 10, Ea)), [
2514
- [he, s.value]
2511
+ }, null, 10, Ba)), [
2512
+ [me, s.value]
2515
2513
  ]);
2516
2514
  }
2517
- }), za = {}, Aa = {
2515
+ }), Ea = {}, Ia = {
2518
2516
  xmlns: "http://www.w3.org/2000/svg",
2519
2517
  viewBox: "0 0 24 24",
2520
2518
  fill: "none",
@@ -2524,8 +2522,8 @@ const Bn = /* @__PURE__ */ Y(Mn, [["render", Sn]]), jn = { class: "flex flex-col
2524
2522
  "stroke-linejoin": "round",
2525
2523
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
2526
2524
  };
2527
- function Ta(o, e) {
2528
- return i(), u("svg", Aa, e[0] || (e[0] = [
2525
+ function za(o, e) {
2526
+ return i(), u("svg", Ia, e[0] || (e[0] = [
2529
2527
  l("path", {
2530
2528
  stroke: "none",
2531
2529
  d: "M0 0h24v24H0z",
@@ -2535,7 +2533,7 @@ function Ta(o, e) {
2535
2533
  l("path", { d: "M21 21l-6 -6" }, null, -1)
2536
2534
  ]));
2537
2535
  }
2538
- const Fa = /* @__PURE__ */ Y(za, [["render", Ta]]), Oa = {}, Ua = {
2536
+ const Aa = /* @__PURE__ */ X(Ea, [["render", za]]), Ta = {}, Fa = {
2539
2537
  class: "flex-shrink-0 mt-0.5 size-3.5",
2540
2538
  xmlns: "http://www.w3.org/2000/svg",
2541
2539
  viewBox: "0 0 24 24",
@@ -2545,15 +2543,15 @@ const Fa = /* @__PURE__ */ Y(za, [["render", Ta]]), Oa = {}, Ua = {
2545
2543
  "stroke-linecap": "round",
2546
2544
  "stroke-linejoin": "round"
2547
2545
  };
2548
- function Da(o, e) {
2549
- return i(), u("svg", Ua, e[0] || (e[0] = [
2546
+ function Oa(o, e) {
2547
+ return i(), u("svg", Fa, e[0] || (e[0] = [
2550
2548
  l("path", { d: "m3 16 4 4 4-4" }, null, -1),
2551
2549
  l("path", { d: "M7 20V4" }, null, -1),
2552
2550
  l("path", { d: "m21 8-4-4-4 4" }, null, -1),
2553
2551
  l("path", { d: "M17 4v16" }, null, -1)
2554
2552
  ]));
2555
2553
  }
2556
- const Ra = /* @__PURE__ */ Y(Oa, [["render", Da]]), Pa = {}, Ha = {
2554
+ const Ua = /* @__PURE__ */ X(Ta, [["render", Oa]]), Da = {}, Ra = {
2557
2555
  xmlns: "http://www.w3.org/2000/svg",
2558
2556
  width: "14",
2559
2557
  height: "14",
@@ -2564,8 +2562,8 @@ const Ra = /* @__PURE__ */ Y(Oa, [["render", Da]]), Pa = {}, Ha = {
2564
2562
  "stroke-linecap": "round",
2565
2563
  "stroke-linejoin": "round"
2566
2564
  };
2567
- function Na(o, e) {
2568
- return i(), u("svg", Ha, e[0] || (e[0] = [
2565
+ function Pa(o, e) {
2566
+ return i(), u("svg", Ra, e[0] || (e[0] = [
2569
2567
  l("path", {
2570
2568
  stroke: "none",
2571
2569
  d: "M0 0h24v24H0z",
@@ -2576,7 +2574,7 @@ function Na(o, e) {
2576
2574
  l("path", { d: "M12 4l0 12" }, null, -1)
2577
2575
  ]));
2578
2576
  }
2579
- const Ga = /* @__PURE__ */ Y(Pa, [["render", Na]]), qa = {}, Ka = {
2577
+ const Ha = /* @__PURE__ */ X(Da, [["render", Pa]]), Na = {}, Ga = {
2580
2578
  xmlns: "http://www.w3.org/2000/svg",
2581
2579
  viewBox: "0 0 24 24",
2582
2580
  fill: "none",
@@ -2585,8 +2583,8 @@ const Ga = /* @__PURE__ */ Y(Pa, [["render", Na]]), qa = {}, Ka = {
2585
2583
  "stroke-linecap": "round",
2586
2584
  "stroke-linejoin": "round"
2587
2585
  };
2588
- function Wa(o, e) {
2589
- return i(), u("svg", Ka, e[0] || (e[0] = [
2586
+ function qa(o, e) {
2587
+ return i(), u("svg", Ga, e[0] || (e[0] = [
2590
2588
  l("path", {
2591
2589
  stroke: "none",
2592
2590
  d: "M0 0h24v24H0z",
@@ -2597,7 +2595,7 @@ function Wa(o, e) {
2597
2595
  l("path", { d: "M12 4l0 12" }, null, -1)
2598
2596
  ]));
2599
2597
  }
2600
- const Za = /* @__PURE__ */ Y(qa, [["render", Wa]]), Ja = {}, Ya = {
2598
+ const Ka = /* @__PURE__ */ X(Na, [["render", qa]]), Wa = {}, Za = {
2601
2599
  xmlns: "http://www.w3.org/2000/svg",
2602
2600
  viewBox: "0 0 24 24",
2603
2601
  fill: "none",
@@ -2606,22 +2604,22 @@ const Za = /* @__PURE__ */ Y(qa, [["render", Wa]]), Ja = {}, Ya = {
2606
2604
  "stroke-linecap": "round",
2607
2605
  "stroke-linejoin": "round"
2608
2606
  };
2609
- function Xa(o, e) {
2610
- return i(), u("svg", Ya, e[0] || (e[0] = [
2607
+ function Ja(o, e) {
2608
+ return i(), u("svg", Za, e[0] || (e[0] = [
2611
2609
  xe('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>', 6)
2612
2610
  ]));
2613
2611
  }
2614
- const Lt = /* @__PURE__ */ Y(Ja, [["render", Xa]]), Qa = {}, es = {
2612
+ const Mt = /* @__PURE__ */ X(Wa, [["render", Ja]]), Ya = {}, Xa = {
2615
2613
  viewBox: "0 0 178 90",
2616
2614
  fill: "none",
2617
2615
  xmlns: "http://www.w3.org/2000/svg"
2618
2616
  };
2619
- function ts(o, e) {
2620
- return i(), u("svg", es, e[0] || (e[0] = [
2617
+ function Qa(o, e) {
2618
+ return i(), u("svg", Xa, e[0] || (e[0] = [
2621
2619
  xe('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
2622
2620
  ]));
2623
2621
  }
2624
- const ls = /* @__PURE__ */ Y(Qa, [["render", ts]]), os = {}, ns = {
2622
+ const es = /* @__PURE__ */ X(Ya, [["render", Qa]]), ts = {}, ls = {
2625
2623
  xmlns: "http://www.w3.org/2000/svg",
2626
2624
  viewBox: "0 0 24 24",
2627
2625
  fill: "none",
@@ -2630,25 +2628,28 @@ const ls = /* @__PURE__ */ Y(Qa, [["render", ts]]), os = {}, ns = {
2630
2628
  "stroke-linecap": "round",
2631
2629
  "stroke-linejoin": "round"
2632
2630
  };
2633
- function as(o, e) {
2634
- return i(), u("svg", ns, e[0] || (e[0] = [
2631
+ function os(o, e) {
2632
+ return i(), u("svg", ls, e[0] || (e[0] = [
2635
2633
  l("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
2636
2634
  ]));
2637
2635
  }
2638
- const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable border rounded-xl w-full flex-grow" }, is = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, us = { class: "relative w-full" }, ds = { class: "table-wrapper flex gap-2" }, cs = { class: "vs-popover inline-block text-slate-700" }, ps = { class: "text-center" }, fs = { class: "" }, vs = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, ms = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, hs = { class: "text-sm items-center text-gray-800 flex gap-1" }, gs = { class: "w-full overflow-x-auto" }, bs = { class: "w-full table-auto caption-bottom text-sm" }, ys = { class: "[&_tr]:border-b" }, xs = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, ws = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, ks = {
2636
+ const ns = /* @__PURE__ */ X(ts, [["render", os]]), as = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ss = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, rs = { class: "relative w-full" }, is = { class: "table-wrapper flex gap-2" }, us = { class: "vs-popover inline-block text-slate-700" }, ds = { class: "text-center" }, cs = { class: "" }, ps = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, fs = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, vs = { class: "text-sm items-center text-gray-800 flex gap-1" }, ms = { class: "w-full overflow-x-auto" }, hs = { class: "w-full table-auto caption-bottom text-sm" }, gs = { class: "[&_tr]:border-b" }, bs = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, ys = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, xs = {
2639
2637
  key: 0,
2640
2638
  colspan: "100%",
2641
2639
  class: "text-center"
2642
- }, _s = { class: "w-full" }, $s = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Cs = ["onDragstart", "onDragover", "onDrop"], Vs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Ms = { class: "flex items-center justify-center" }, Ls = {
2640
+ }, ws = { class: "w-full" }, ks = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, _s = ["onDragstart", "onDragover", "onDrop"], $s = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Cs = { class: "flex items-center justify-center" }, Vs = {
2643
2641
  key: 0,
2644
2642
  class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"
2645
- }, Ss = { key: 0 }, Bs = ["src"], js = {
2643
+ }, Ms = { key: 0 }, Ls = ["src"], Ss = {
2646
2644
  key: 1,
2647
2645
  class: "rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"
2648
- }, Es = ["innerHTML"], Is = {
2646
+ }, Bs = ["innerHTML"], js = {
2649
2647
  key: 2,
2648
+ class: "line-clamp-2 rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"
2649
+ }, Es = {
2650
+ key: 3,
2650
2651
  class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors"
2651
- }, zs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, As = { class: "flex items-center justify-center gap-2" }, Ts = ["onClick"], Fs = ["onClick"], Os = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Us = /* @__PURE__ */ G({
2652
+ }, Is = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, zs = { class: "flex items-center justify-center gap-2" }, As = ["onClick"], Ts = ["onClick"], Fs = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Os = /* @__PURE__ */ G({
2652
2653
  __name: "vs-input-datatable",
2653
2654
  props: /* @__PURE__ */ ie({
2654
2655
  colModel: {},
@@ -2665,90 +2666,90 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2665
2666
  }),
2666
2667
  emits: ["update:modelValue"],
2667
2668
  setup(o) {
2668
- const e = o, t = de(o, "modelValue"), s = w({}), n = w(""), a = S(() => {
2669
+ const e = o, t = de(o, "modelValue"), s = w({}), n = w(""), a = B(() => {
2669
2670
  if (!n.value) return t.value ?? [];
2670
- const D = n.value.toLowerCase();
2671
+ const U = n.value.toLowerCase();
2671
2672
  return t.value.filter((F) => e.colModel?.some((z) => {
2672
2673
  const H = F[z.key];
2673
- return H ? Array.isArray(H) ? H.join(", ").toLowerCase().includes(D) : String(H).toLowerCase().includes(D) : !1;
2674
+ return H ? Array.isArray(H) ? H.join(", ").toLowerCase().includes(U) : String(H).toLowerCase().includes(U) : !1;
2674
2675
  }));
2675
- }), r = w(null), d = w(null), c = w(!1), f = w(null), p = w({ top: 0, left: 0 }), v = (D) => {
2676
- r.value = D;
2677
- }, k = (D) => {
2678
- d.value = D;
2679
- }, m = (D) => {
2680
- if (r.value === null || r.value === D) {
2676
+ }), r = w(null), d = w(null), c = w(!1), f = w(null), p = w({ top: 0, left: 0 }), v = (U) => {
2677
+ r.value = U;
2678
+ }, k = (U) => {
2679
+ d.value = U;
2680
+ }, m = (U) => {
2681
+ if (r.value === null || r.value === U) {
2681
2682
  r.value = null, d.value = null;
2682
2683
  return;
2683
2684
  }
2684
2685
  const F = [...t.value], [z] = F.splice(r.value, 1);
2685
- F.splice(D, 0, z), t.value = F, r.value = null, d.value = null;
2686
- }, I = (D) => {
2687
- const z = D.currentTarget.getBoundingClientRect();
2686
+ F.splice(U, 0, z), t.value = F, r.value = null, d.value = null;
2687
+ }, I = (U) => {
2688
+ const z = U.currentTarget.getBoundingClientRect();
2688
2689
  p.value = { top: z.bottom + window.scrollY, left: z.left + window.scrollX }, c.value = !c.value;
2689
2690
  }, $ = () => {
2690
2691
  f.value && f.value.click();
2691
- }, A = (D) => {
2692
- const F = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], z = D.toLowerCase();
2692
+ }, A = (U) => {
2693
+ const F = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], z = U.toLowerCase();
2693
2694
  return F.some((H) => z.endsWith(H));
2694
- }, E = (D) => {
2695
- const z = D.target.files?.[0];
2695
+ }, E = (U) => {
2696
+ const z = U.target.files?.[0];
2696
2697
  if (!z) return;
2697
2698
  const H = new FileReader();
2698
- H.onload = (le) => {
2699
+ H.onload = (Q) => {
2699
2700
  try {
2700
- const pe = le.target?.result;
2701
- if (typeof pe == "string") {
2702
- const we = JSON.parse(pe);
2701
+ const ge = Q.target?.result;
2702
+ if (typeof ge == "string") {
2703
+ const we = JSON.parse(ge);
2703
2704
  Array.isArray(we) && t.value.push(...we);
2704
2705
  }
2705
- } catch (pe) {
2706
- console.error("Error parsing file:", pe);
2706
+ } catch (ge) {
2707
+ console.error("Error parsing file:", ge);
2707
2708
  }
2708
2709
  }, H.readAsText(z);
2709
2710
  }, O = () => {
2710
- const D = JSON.stringify(t.value, null, 2), F = new Blob([D], { type: "application/json" }), z = URL.createObjectURL(F), H = document.createElement("a");
2711
+ const U = JSON.stringify(t.value, null, 2), F = new Blob([U], { type: "application/json" }), z = URL.createObjectURL(F), H = document.createElement("a");
2711
2712
  H.href = z, H.download = "data.json", H.click(), URL.revokeObjectURL(z);
2712
2713
  };
2713
2714
  ye(async () => {
2714
- const D = e.colModel?.filter((F) => F.data);
2715
- D?.length && Promise.all(D.map(async (F) => {
2715
+ const U = e.colModel?.filter((F) => F.data);
2716
+ U?.length && Promise.all(U.map(async (F) => {
2716
2717
  const H = await (await fetch(`/api/suggest/${F.data}`)).json();
2717
2718
  s.value[F.key] = H.data;
2718
2719
  }));
2719
2720
  });
2720
2721
  const C = w(""), h = w(!1);
2721
- let x = "edit", B = 0;
2722
- const V = w({}), P = w({});
2723
- async function ee() {
2724
- C.value = "Додати", h.value = !0, x = "add", V.value = {};
2722
+ let x = "edit", j = 0;
2723
+ const M = w({}), P = w({});
2724
+ async function te() {
2725
+ C.value = "Додати", h.value = !0, x = "add", M.value = {};
2725
2726
  }
2726
- function Q(D, F) {
2727
+ function Y(U, F) {
2727
2728
  const z = F.key || F.name;
2728
- return s.value[z] && D[z] ? s.value[z].find((H) => H.id.toString() === D[z].toString())?.text ?? D[z] : D[z] || "-";
2729
+ return s.value[z] && U[z] ? s.value[z].find((H) => H.id.toString() === U[z].toString())?.text ?? U[z] : U[z] || "-";
2729
2730
  }
2730
- async function j(D, F) {
2731
- C.value = "Редагувати", h.value = !0, x = "edit", B = F, V.value = { ...D };
2731
+ async function S(U, F) {
2732
+ C.value = "Редагувати", h.value = !0, x = "edit", j = F, M.value = { ...U };
2732
2733
  }
2733
- function q() {
2734
- const D = P.value.validate();
2735
- if (D) {
2736
- ce({ type: "warning", title: "Помилка валідації", message: Object.entries(D).map(([F, z]) => `${F}: ${z}`).join(`
2734
+ function W() {
2735
+ const U = P.value.validate();
2736
+ if (U) {
2737
+ ce({ type: "warning", title: "Помилка валідації", message: Object.entries(U).map(([F, z]) => `${F}: ${z}`).join(`
2737
2738
  `) });
2738
2739
  return;
2739
2740
  }
2740
- x === "add" ? Array.isArray(t.value) ? t.value = [...t.value, V.value] : t.value = [V.value] : t.value = t.value.map((F, z) => z === B ? V.value : F), h.value = !1;
2741
+ x === "add" ? Array.isArray(t.value) ? t.value = [...t.value, M.value] : t.value = [M.value] : t.value = t.value.map((F, z) => z === j ? M.value : F), h.value = !1;
2741
2742
  }
2742
- function X(D) {
2743
- t.value = t.value.filter((F, z) => z !== D);
2743
+ function ee(U) {
2744
+ t.value = t.value.filter((F, z) => z !== U);
2744
2745
  }
2745
2746
  function Z() {
2746
2747
  h.value = !1;
2747
2748
  }
2748
- return (D, F) => (i(), u("div", rs, [
2749
- l("div", is, [
2750
- l("div", us, [
2751
- R(Fa, {
2749
+ return (U, F) => (i(), u("div", as, [
2750
+ l("div", ss, [
2751
+ l("div", rs, [
2752
+ R(Aa, {
2752
2753
  width: "14",
2753
2754
  height: "14",
2754
2755
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
@@ -2759,10 +2760,10 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2759
2760
  placeholder: "Пошук",
2760
2761
  class: "py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"
2761
2762
  }, null, 512), [
2762
- [he, n.value]
2763
+ [me, n.value]
2763
2764
  ])
2764
2765
  ]),
2765
- l("div", ds, [
2766
+ l("div", is, [
2766
2767
  l("input", {
2767
2768
  ref_key: "fileInput",
2768
2769
  ref: f,
@@ -2771,14 +2772,14 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2771
2772
  accept: ".json",
2772
2773
  type: "file"
2773
2774
  }, null, 544),
2774
- l("div", cs, [
2775
- l("div", ps, [
2776
- l("div", fs, [
2775
+ l("div", us, [
2776
+ l("div", ds, [
2777
+ l("div", cs, [
2777
2778
  l("button", {
2778
2779
  onClick: I,
2779
2780
  class: "bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
2780
2781
  }, [
2781
- R(Ra, {
2782
+ R(Ua, {
2782
2783
  height: "16",
2783
2784
  width: "16"
2784
2785
  })
@@ -2787,152 +2788,152 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2787
2788
  ])
2788
2789
  ])
2789
2790
  ]),
2790
- (i(), me(It, { to: "body" }, [
2791
+ (i(), ve(Et, { to: "body" }, [
2791
2792
  c.value ? (i(), u("div", {
2792
2793
  key: 0,
2793
2794
  class: "text-slate-700 vsTailwind vs-popover__content bottom",
2794
2795
  style: be([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: p.value.top + "px", left: p.value.left + "px" }])
2795
2796
  }, [
2796
- l("div", vs, [
2797
- l("div", ms, [
2797
+ l("div", ps, [
2798
+ l("div", fs, [
2798
2799
  l("button", {
2799
2800
  onClick: $,
2800
2801
  class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2801
2802
  }, [
2802
- R(Ga, {
2803
+ R(Ha, {
2803
2804
  class: "text-black",
2804
2805
  width: "14",
2805
2806
  height: "14"
2806
2807
  }),
2807
- F[4] || (F[4] = ge(" Імпортувати "))
2808
+ F[4] || (F[4] = he(" Імпортувати ", -1))
2808
2809
  ]),
2809
2810
  l("button", {
2810
2811
  onClick: O,
2811
2812
  class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2812
2813
  }, [
2813
- l("span", hs, [
2814
- R(Za, {
2814
+ l("span", vs, [
2815
+ R(Ka, {
2815
2816
  class: "text-black",
2816
2817
  width: "14",
2817
2818
  height: "14"
2818
2819
  }),
2819
- F[5] || (F[5] = ge(" Експортувати "))
2820
+ F[5] || (F[5] = he(" Експортувати ", -1))
2820
2821
  ])
2821
2822
  ])
2822
2823
  ])
2823
2824
  ])
2824
- ], 4)) : U("", !0)
2825
+ ], 4)) : D("", !0)
2825
2826
  ])),
2826
2827
  l("button", {
2827
- onClick: ee,
2828
+ onClick: te,
2828
2829
  class: "text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
2829
2830
  }, [
2830
- R(qe),
2831
- F[6] || (F[6] = ge(" Додати "))
2831
+ R(Ge),
2832
+ F[6] || (F[6] = he(" Додати ", -1))
2832
2833
  ])
2833
2834
  ]),
2834
- l("div", gs, [
2835
- l("table", bs, [
2836
- l("thead", ys, [
2837
- l("tr", xs, [
2838
- l("th", ws, [
2839
- R(Lt, {
2835
+ l("div", ms, [
2836
+ l("table", hs, [
2837
+ l("thead", gs, [
2838
+ l("tr", bs, [
2839
+ l("th", ys, [
2840
+ R(Mt, {
2840
2841
  width: "24",
2841
2842
  height: "24",
2842
2843
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2843
2844
  })
2844
2845
  ]),
2845
- (i(!0), u(re, null, fe(D.colModel, (z) => (i(), u("th", {
2846
+ (i(!0), u(re, null, pe(U.colModel, (z) => (i(), u("th", {
2846
2847
  key: z.key,
2847
2848
  class: "h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"
2848
- }, W(z.ua || z.label), 1))), 128)),
2849
+ }, K(z.ua || z.label), 1))), 128)),
2849
2850
  F[7] || (F[7] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2850
2851
  ])
2851
2852
  ]),
2852
2853
  l("tbody", {
2853
2854
  class: T({ "[&_tr:last-child]:border-0": !d.value })
2854
2855
  }, [
2855
- a.value.length === 0 ? (i(), u("td", ks, [
2856
- l("div", _s, [
2857
- l("div", $s, [
2858
- R(ls, { class: "w-48 mx-auto" }),
2856
+ a.value.length === 0 ? (i(), u("td", xs, [
2857
+ l("div", ws, [
2858
+ l("div", ks, [
2859
+ R(es, { class: "w-48 mx-auto" }),
2859
2860
  F[8] || (F[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
2860
2861
  l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2861
2862
  l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2862
2863
  ], -1))
2863
2864
  ])
2864
2865
  ])
2865
- ])) : U("", !0),
2866
- (i(!0), u(re, null, fe(a.value, (z, H) => (i(), u("tr", {
2866
+ ])) : D("", !0),
2867
+ (i(!0), u(re, null, pe(a.value, (z, H) => (i(), u("tr", {
2867
2868
  key: z.id,
2868
2869
  class: T(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2869
2870
  "opacity-50": r.value === H,
2870
2871
  "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === H
2871
2872
  }]),
2872
2873
  draggable: "true",
2873
- onDragstart: (le) => v(H),
2874
- onDragover: $e((le) => k(H), ["prevent"]),
2875
- onDrop: (le) => m(H)
2874
+ onDragstart: (Q) => v(H),
2875
+ onDragover: $e((Q) => k(H), ["prevent"]),
2876
+ onDrop: (Q) => m(H)
2876
2877
  }, [
2877
- l("td", Vs, [
2878
- l("div", Ms, [
2879
- R(Lt, {
2878
+ l("td", $s, [
2879
+ l("div", Cs, [
2880
+ R(Mt, {
2880
2881
  width: "24",
2881
2882
  height: "24",
2882
2883
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2883
2884
  })
2884
2885
  ])
2885
2886
  ]),
2886
- (i(!0), u(re, null, fe(D.colModel, (le) => (i(), u("td", {
2887
- key: le.key,
2887
+ (i(!0), u(re, null, pe(U.colModel, (Q) => (i(), u("td", {
2888
+ key: Q.key,
2888
2889
  class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
2889
2890
  }, [
2890
- le.type === "file" ? (i(), u("div", Ls, [
2891
- A(Q(z, le)) ? (i(), u("div", Ss, [
2891
+ Q.type === "file" ? (i(), u("div", Vs, [
2892
+ A(Y(z, Q)) ? (i(), u("div", Ms, [
2892
2893
  l("img", {
2893
- src: Q(z, le),
2894
+ src: Y(z, Q),
2894
2895
  alt: "alt",
2895
2896
  width: "45",
2896
2897
  class: "rounded-md max-w-[45px] h-[45px] object-cover"
2897
- }, null, 8, Bs)
2898
- ])) : (i(), u("div", js, [
2899
- R(Tt, { class: "w-[25px] min-w-[25px] h-[25px]" })
2898
+ }, null, 8, Ls)
2899
+ ])) : (i(), u("div", Ss, [
2900
+ R(At, { class: "w-[25px] min-w-[25px] h-[25px]" })
2900
2901
  ]))
2901
- ])) : le.type === "tiptap-editor" ? (i(), u("div", {
2902
+ ])) : Q.type === "tiptap-editor" ? (i(), u("div", {
2902
2903
  key: 1,
2903
2904
  class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors",
2904
- innerHTML: Q(z, le)
2905
- }, null, 8, Es)) : (i(), u("div", Is, W(Q(z, le)), 1))
2905
+ innerHTML: Y(z, Q)
2906
+ }, null, 8, Bs)) : Q.type === "reference" ? (i(), u("div", js, K(Y(z, Q)), 1)) : (i(), u("div", Es, K(Y(z, Q)), 1))
2906
2907
  ]))), 128)),
2907
- l("td", zs, [
2908
- l("div", As, [
2908
+ l("td", Is, [
2909
+ l("div", zs, [
2909
2910
  l("button", {
2910
- onClick: (le) => j(z, H),
2911
+ onClick: (Q) => S(z, H),
2911
2912
  class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
2912
2913
  }, [
2913
- R(ss, {
2914
+ R(ns, {
2914
2915
  width: "24",
2915
2916
  height: "24",
2916
2917
  class: "w-3 h-3"
2917
2918
  })
2918
- ], 8, Ts),
2919
+ ], 8, As),
2919
2920
  l("button", {
2920
- onClick: (le) => X(H),
2921
+ onClick: (Q) => ee(H),
2921
2922
  class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
2922
2923
  }, [
2923
- R(et, {
2924
+ R(Qe, {
2924
2925
  width: "24",
2925
2926
  height: "24",
2926
2927
  class: "w-3 h-3"
2927
2928
  })
2928
- ], 8, Fs)
2929
+ ], 8, Ts)
2929
2930
  ])
2930
2931
  ])
2931
- ], 42, Cs))), 128))
2932
+ ], 42, _s))), 128))
2932
2933
  ], 2)
2933
2934
  ])
2934
2935
  ]),
2935
- R(te(zt), {
2936
+ R(le(It), {
2936
2937
  teleport: "#modal",
2937
2938
  visible: h.value,
2938
2939
  title: C.value,
@@ -2940,21 +2941,21 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2940
2941
  onClose: Z
2941
2942
  }, {
2942
2943
  default: Ee(() => [
2943
- R(Ke, {
2944
+ R(qe, {
2944
2945
  schema: e.colModel,
2945
- values: V.value,
2946
- "onUpdate:values": F[1] || (F[1] = (z) => V.value = z),
2946
+ values: M.value,
2947
+ "onUpdate:values": F[1] || (F[1] = (z) => M.value = z),
2947
2948
  form: P.value,
2948
2949
  "onUpdate:form": F[2] || (F[2] = (z) => P.value = z)
2949
2950
  }, null, 8, ["schema", "values", "form"]),
2950
- l("div", Os, [
2951
+ l("div", Fs, [
2951
2952
  l("button", {
2952
2953
  type: "button",
2953
2954
  onClick: F[3] || (F[3] = (z) => h.value = !1),
2954
2955
  class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
2955
2956
  }, " Скасувати "),
2956
2957
  l("button", {
2957
- onClick: q,
2958
+ onClick: W,
2958
2959
  type: "button",
2959
2960
  class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
2960
2961
  }, " Зберегти ")
@@ -2964,7 +2965,7 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
2964
2965
  }, 8, ["visible", "title"])
2965
2966
  ]));
2966
2967
  }
2967
- }), Ds = {
2968
+ }), Us = {
2968
2969
  draw: {
2969
2970
  toolbar: {
2970
2971
  actions: {
@@ -3072,33 +3073,33 @@ const ss = /* @__PURE__ */ Y(os, [["render", as]]), rs = { class: "vs-datatable
3072
3073
  }
3073
3074
  }
3074
3075
  };
3075
- function Ge(o) {
3076
+ function Ne(o) {
3076
3077
  return o ? o.type === "Polygon" ? {
3077
3078
  type: "MultiPolygon",
3078
3079
  coordinates: [o.coordinates]
3079
3080
  } : o.type === "Feature" ? {
3080
3081
  ...o,
3081
- geometry: Ge(o.geometry)
3082
+ geometry: Ne(o.geometry)
3082
3083
  } : o.type === "FeatureCollection" ? {
3083
3084
  ...o,
3084
- features: (o.features || []).map((e) => Ge(e)).filter(Boolean)
3085
+ features: (o.features || []).map((e) => Ne(e)).filter(Boolean)
3085
3086
  } : o : null;
3086
3087
  }
3087
- function Rs(o) {
3088
- return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Ge(o) : o.geom ? {
3088
+ function Ds(o) {
3089
+ return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Ne(o) : o.geom ? {
3089
3090
  type: "Feature",
3090
- geometry: Ge({
3091
+ geometry: Ne({
3091
3092
  type: o.geom.type,
3092
3093
  coordinates: o.geom.coordinates
3093
3094
  }),
3094
3095
  properties: {}
3095
3096
  } : o.type && o.coordinates ? {
3096
3097
  type: "Feature",
3097
- geometry: Ge(o),
3098
+ geometry: Ne(o),
3098
3099
  properties: {}
3099
3100
  } : null : null;
3100
3101
  }
3101
- const Ps = {}, Hs = {
3102
+ const Rs = {}, Ps = {
3102
3103
  xmlns: "http://www.w3.org/2000/svg",
3103
3104
  viewBox: "0 0 24 24",
3104
3105
  stroke: "currentColor",
@@ -3108,8 +3109,8 @@ const Ps = {}, Hs = {
3108
3109
  "stroke-linejoin": "round",
3109
3110
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
3110
3111
  };
3111
- function Ns(o, e) {
3112
- return i(), u("svg", Hs, e[0] || (e[0] = [
3112
+ function Hs(o, e) {
3113
+ return i(), u("svg", Ps, e[0] || (e[0] = [
3113
3114
  l("path", {
3114
3115
  stroke: "none",
3115
3116
  d: "M0 0h24v24H0z",
@@ -3119,7 +3120,7 @@ function Ns(o, e) {
3119
3120
  l("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
3120
3121
  ]));
3121
3122
  }
3122
- const Gs = /* @__PURE__ */ Y(Ps, [["render", Ns]]), qs = {}, Ks = {
3123
+ const Ns = /* @__PURE__ */ X(Rs, [["render", Hs]]), Gs = {}, qs = {
3123
3124
  xmlns: "http://www.w3.org/2000/svg",
3124
3125
  viewBox: "0 0 24 24",
3125
3126
  fill: "none",
@@ -3129,8 +3130,8 @@ const Gs = /* @__PURE__ */ Y(Ps, [["render", Ns]]), qs = {}, Ks = {
3129
3130
  "stroke-linejoin": "round",
3130
3131
  class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
3131
3132
  };
3132
- function Ws(o, e) {
3133
- return i(), u("svg", Ks, e[0] || (e[0] = [
3133
+ function Ks(o, e) {
3134
+ return i(), u("svg", qs, e[0] || (e[0] = [
3134
3135
  l("path", {
3135
3136
  stroke: "none",
3136
3137
  d: "M0 0h24v24H0z",
@@ -3141,7 +3142,7 @@ function Ws(o, e) {
3141
3142
  l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
3142
3143
  ]));
3143
3144
  }
3144
- const Zs = /* @__PURE__ */ Y(qs, [["render", Ws]]), Js = {}, Ys = {
3145
+ const Ws = /* @__PURE__ */ X(Gs, [["render", Ks]]), Zs = {}, Js = {
3145
3146
  xmlns: "http://www.w3.org/2000/svg",
3146
3147
  viewBox: "0 0 24 24",
3147
3148
  fill: "none",
@@ -3151,12 +3152,12 @@ const Zs = /* @__PURE__ */ Y(qs, [["render", Ws]]), Js = {}, Ys = {
3151
3152
  "stroke-linejoin": "round",
3152
3153
  class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
3153
3154
  };
3154
- function Xs(o, e) {
3155
- return i(), u("svg", Ys, e[0] || (e[0] = [
3155
+ function Ys(o, e) {
3156
+ return i(), u("svg", Js, e[0] || (e[0] = [
3156
3157
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>', 9)
3157
3158
  ]));
3158
3159
  }
3159
- const Qs = /* @__PURE__ */ Y(Js, [["render", Xs]]), er = {}, tr = {
3160
+ const Xs = /* @__PURE__ */ X(Zs, [["render", Ys]]), Qs = {}, er = {
3160
3161
  xmlns: "http://www.w3.org/2000/svg",
3161
3162
  viewBox: "0 0 24 24",
3162
3163
  fill: "none",
@@ -3166,12 +3167,12 @@ const Qs = /* @__PURE__ */ Y(Js, [["render", Xs]]), er = {}, tr = {
3166
3167
  "stroke-linejoin": "round",
3167
3168
  class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
3168
3169
  };
3169
- function lr(o, e) {
3170
- return i(), u("svg", tr, e[0] || (e[0] = [
3170
+ function tr(o, e) {
3171
+ return i(), u("svg", er, e[0] || (e[0] = [
3171
3172
  xe('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>', 9)
3172
3173
  ]));
3173
3174
  }
3174
- const or = /* @__PURE__ */ Y(er, [["render", lr]]), nr = {}, ar = {
3175
+ const lr = /* @__PURE__ */ X(Qs, [["render", tr]]), or = {}, nr = {
3175
3176
  version: "1.1",
3176
3177
  viewBox: "0 0 14 14",
3177
3178
  xmlns: "http://www.w3.org/2000/svg",
@@ -3179,8 +3180,8 @@ const or = /* @__PURE__ */ Y(er, [["render", lr]]), nr = {}, ar = {
3179
3180
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
3180
3181
  class: "fullscreen-icon"
3181
3182
  };
3182
- function sr(o, e) {
3183
- return i(), u("svg", ar, e[0] || (e[0] = [
3183
+ function ar(o, e) {
3184
+ return i(), u("svg", nr, e[0] || (e[0] = [
3184
3185
  l("title", null, null, -1),
3185
3186
  l("desc", null, null, -1),
3186
3187
  l("defs", null, null, -1),
@@ -3209,20 +3210,20 @@ function sr(o, e) {
3209
3210
  ], -1)
3210
3211
  ]));
3211
3212
  }
3212
- const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, ur = {
3213
+ const sr = /* @__PURE__ */ X(or, [["render", ar]]), rr = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, ir = {
3213
3214
  key: 0,
3214
3215
  class: "vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"
3215
- }, dr = ["onClick"], cr = { class: "relative flex-1 min-w-[140px]" }, pr = ["placeholder"], fr = "https://data.softpro.ua/api-user/gis-url-proxy", vr = "https://geo.rv.ua/api-user/dzk.api", mr = /* @__PURE__ */ G({
3216
+ }, ur = ["onClick"], dr = { class: "relative flex-1 min-w-[140px]" }, cr = ["placeholder"], pr = "https://data.softpro.ua/api-user/gis-url-proxy", fr = "https://geo.rv.ua/api-user/dzk.api", vr = /* @__PURE__ */ G({
3216
3217
  __name: "map-search",
3217
3218
  props: {
3218
3219
  config: {}
3219
3220
  },
3220
3221
  emits: ["goToCoordinates"],
3221
3222
  setup(o, { emit: e }) {
3222
- const t = o, s = e, n = ["here", "xy", "parcel"], a = S(() => {
3223
+ const t = o, s = e, n = ["here", "xy", "parcel"], a = B(() => {
3223
3224
  const h = t.config?.tools?.filter((x) => n.includes(x));
3224
3225
  return h && h.length ? h : n;
3225
- }), r = S(() => t.config?.placeholder?.trim() || "Пошук…"), d = w(a.value[0] ?? n[0]);
3226
+ }), r = B(() => t.config?.placeholder?.trim() || "Пошук…"), d = w(a.value[0] ?? n[0]);
3226
3227
  ue(a, (h) => {
3227
3228
  h.includes(d.value) || (d.value = h[0]);
3228
3229
  });
@@ -3249,47 +3250,47 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3249
3250
  function I(h) {
3250
3251
  const x = h.replace(/[,]+/g, " ").trim();
3251
3252
  if (!x) return null;
3252
- const B = x.split(/\s+/).filter(Boolean);
3253
- if (B.length < 2) return null;
3254
- const V = B.slice(0, 2).map(Number);
3255
- if (!V.every((Z) => Number.isFinite(Z))) return null;
3256
- let [P, ee] = V, Q = P, j = ee;
3257
- const q = (Z) => Math.abs(Z) <= 90, X = (Z) => Math.abs(Z) <= 180;
3258
- if (!q(Q) || !X(j))
3259
- if (q(j) && X(Q))
3260
- Q = ee, j = P;
3253
+ const j = x.split(/\s+/).filter(Boolean);
3254
+ if (j.length < 2) return null;
3255
+ const M = j.slice(0, 2).map(Number);
3256
+ if (!M.every((Z) => Number.isFinite(Z))) return null;
3257
+ let [P, te] = M, Y = P, S = te;
3258
+ const W = (Z) => Math.abs(Z) <= 90, ee = (Z) => Math.abs(Z) <= 180;
3259
+ if (!W(Y) || !ee(S))
3260
+ if (W(S) && ee(Y))
3261
+ Y = te, S = P;
3261
3262
  else
3262
3263
  return null;
3263
- return { lat: Q, lng: j };
3264
+ return { lat: Y, lng: S };
3264
3265
  }
3265
3266
  function $(h) {
3266
- return (h?.items || []).map((B, V) => ({
3267
- id: String(B?.id ?? V),
3268
- title: B?.title || B?.address?.label || "Знайдений обʼєкт",
3269
- lat: Number(B?.position?.lat),
3270
- lng: Number(B?.position?.lng)
3271
- })).filter((B) => Number.isFinite(B.lat) && Number.isFinite(B.lng));
3267
+ return (h?.items || []).map((j, M) => ({
3268
+ id: String(j?.id ?? M),
3269
+ title: j?.title || j?.address?.label || "Знайдений обʼєкт",
3270
+ lat: Number(j?.position?.lat),
3271
+ lng: Number(j?.position?.lng)
3272
+ })).filter((j) => Number.isFinite(j.lat) && Number.isFinite(j.lng));
3272
3273
  }
3273
3274
  function A(h) {
3274
3275
  const x = h?.result || h?.data || h;
3275
3276
  if (!x) return [];
3276
- const B = x.geom_centroid;
3277
- if (!B || !Array.isArray(B.coordinates)) return [];
3278
- const [V, P] = B.coordinates;
3279
- return !Number.isFinite(P) || !Number.isFinite(V) ? [] : [
3277
+ const j = x.geom_centroid;
3278
+ if (!j || !Array.isArray(j.coordinates)) return [];
3279
+ const [M, P] = j.coordinates;
3280
+ return !Number.isFinite(P) || !Number.isFinite(M) ? [] : [
3280
3281
  {
3281
3282
  id: "parcel",
3282
3283
  title: x.cadnum || x.cad_num || "Земельна ділянка",
3283
3284
  lat: P,
3284
- lng: V
3285
+ lng: M
3285
3286
  }
3286
3287
  ];
3287
3288
  }
3288
3289
  function E(h) {
3289
- const B = h.replace(/\s+/g, "").split(":");
3290
- if (B.length !== 4) return !1;
3291
- const V = [10, 2, 3, 4];
3292
- return B.every((P, ee) => P.length === V[ee] && /^\d+$/.test(P));
3290
+ const j = h.replace(/\s+/g, "").split(":");
3291
+ if (j.length !== 4) return !1;
3292
+ const M = [10, 2, 3, 4];
3293
+ return j.every((P, te) => P.length === M[te] && /^\d+$/.test(P));
3293
3294
  }
3294
3295
  function O(h) {
3295
3296
  s("goToCoordinates", [h.lat, h.lng]);
@@ -3307,7 +3308,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3307
3308
  return;
3308
3309
  }
3309
3310
  try {
3310
- const x = new URL(d.value === "here" ? fr : vr);
3311
+ const x = new URL(d.value === "here" ? pr : fr);
3311
3312
  if (d.value === "here")
3312
3313
  x.searchParams.set("searchtext", h);
3313
3314
  else {
@@ -3317,22 +3318,22 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3317
3318
  }
3318
3319
  x.searchParams.set("cad_num", h);
3319
3320
  }
3320
- const B = await fetch(x.toString());
3321
- if (!B.ok) throw new Error(`HTTP ${B.status}`);
3322
- const V = await B.json(), P = d.value === "here" ? $(V) : A(V);
3321
+ const j = await fetch(x.toString());
3322
+ if (!j.ok) throw new Error(`HTTP ${j.status}`);
3323
+ const M = await j.json(), P = d.value === "here" ? $(M) : A(M);
3323
3324
  if (!P.length)
3324
3325
  ce({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
3325
3326
  else {
3326
- const ee = P[0];
3327
- O(ee), c.value = "";
3327
+ const te = P[0];
3328
+ O(te), c.value = "";
3328
3329
  }
3329
3330
  } catch (x) {
3330
- const B = x?.message || "Помилка пошуку";
3331
- ce({ type: "error", title: "Пошук", message: B });
3331
+ const j = x?.message || "Помилка пошуку";
3332
+ ce({ type: "error", title: "Пошук", message: j });
3332
3333
  }
3333
3334
  }
3334
3335
  }
3335
- return (h, x) => (i(), u("div", ir, [
3336
+ return (h, x) => (i(), u("div", rr, [
3336
3337
  l("form", {
3337
3338
  class: "flex gap-2",
3338
3339
  onSubmit: $e(C, ["prevent"])
@@ -3346,9 +3347,9 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3346
3347
  l("button", {
3347
3348
  type: "button",
3348
3349
  class: "vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",
3349
- onClick: x[0] || (x[0] = (B) => f.value = !f.value)
3350
+ onClick: x[0] || (x[0] = (j) => f.value = !f.value)
3350
3351
  }, [
3351
- l("span", null, W(m(d.value)), 1),
3352
+ l("span", null, K(m(d.value)), 1),
3352
3353
  (i(), u("svg", {
3353
3354
  class: T(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": f.value }]),
3354
3355
  viewBox: "0 0 24 24",
@@ -3364,25 +3365,25 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3364
3365
  }, null, -1)
3365
3366
  ]), 2))
3366
3367
  ]),
3367
- f.value ? (i(), u("div", ur, [
3368
+ f.value ? (i(), u("div", ir, [
3368
3369
  l("ul", null, [
3369
- (i(!0), u(re, null, fe(a.value, (B) => (i(), u("li", {
3370
- key: B,
3370
+ (i(!0), u(re, null, pe(a.value, (j) => (i(), u("li", {
3371
+ key: j,
3371
3372
  class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
3372
- onClick: (V) => v(B)
3373
- }, W(m(B)), 9, dr))), 128))
3373
+ onClick: (M) => v(j)
3374
+ }, K(m(j)), 9, ur))), 128))
3374
3375
  ])
3375
- ])) : U("", !0)
3376
- ], 512)) : U("", !0),
3377
- l("div", cr, [
3376
+ ])) : D("", !0)
3377
+ ], 512)) : D("", !0),
3378
+ l("div", dr, [
3378
3379
  ne(l("input", {
3379
- "onUpdate:modelValue": x[1] || (x[1] = (B) => c.value = B),
3380
+ "onUpdate:modelValue": x[1] || (x[1] = (j) => c.value = j),
3380
3381
  placeholder: r.value,
3381
3382
  type: "text",
3382
3383
  class: "vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"
3383
- }, null, 8, pr), [
3384
+ }, null, 8, cr), [
3384
3385
  [
3385
- he,
3386
+ me,
3386
3387
  c.value,
3387
3388
  void 0,
3388
3389
  { trim: !0 }
@@ -3412,7 +3413,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3412
3413
  ], 32)
3413
3414
  ]));
3414
3415
  }
3415
- }), hr = /* @__PURE__ */ Y(mr, [["__scopeId", "data-v-3048520a"]]), gr = { class: "bg-white/30 p-1 rounded-md shadow" }, br = { class: "flex gap-2" }, yr = ["onClick", "title"], xr = ["src"], wr = /* @__PURE__ */ G({
3416
+ }), mr = /* @__PURE__ */ X(vr, [["__scopeId", "data-v-3048520a"]]), hr = { class: "bg-white/30 p-1 rounded-md shadow" }, gr = { class: "flex gap-2" }, br = ["onClick", "title"], yr = ["src"], xr = /* @__PURE__ */ G({
3416
3417
  __name: "map-layers",
3417
3418
  props: {
3418
3419
  basemaps: {}
@@ -3423,9 +3424,9 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3423
3424
  function a(r) {
3424
3425
  n("onLayerChange", r), s.value = r;
3425
3426
  }
3426
- return (r, d) => (i(), u("div", gr, [
3427
- l("div", br, [
3428
- (i(!0), u(re, null, fe(r.basemaps, (c, f) => (i(), u("div", {
3427
+ return (r, d) => (i(), u("div", hr, [
3428
+ l("div", gr, [
3429
+ (i(!0), u(re, null, pe(r.basemaps, (c, f) => (i(), u("div", {
3429
3430
  key: f,
3430
3431
  class: T(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": s.value === f }]),
3431
3432
  onClick: (p) => a(f),
@@ -3437,24 +3438,24 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3437
3438
  src: c.preview,
3438
3439
  alt: "",
3439
3440
  class: "w-10 h-10 object-cover"
3440
- }, null, 8, xr)
3441
- ], 10, yr))), 128))
3441
+ }, null, 8, yr)
3442
+ ], 10, br))), 128))
3442
3443
  ])
3443
3444
  ]));
3444
3445
  }
3445
- }), kr = {
3446
+ }), wr = {
3446
3447
  key: 0,
3447
3448
  class: "absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"
3448
- }, _r = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, $r = { class: "text-sm font-medium" }, Cr = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Vr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Mr = { class: "flex items-center gap-1" }, Lr = ["disabled"], Sr = { class: "absolute top-4 right-4 z-[1000]" }, Br = { class: "flex flex-col gap-[2px]" }, jr = ["aria-pressed"], Er = ["aria-pressed"], Ir = ["aria-pressed"], zr = ["aria-pressed"], Ar = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Tr = {
3449
+ }, kr = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, _r = { class: "text-sm font-medium" }, $r = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Cr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Vr = { class: "flex items-center gap-1" }, Mr = ["disabled"], Lr = { class: "absolute top-4 right-4 z-[1000]" }, Sr = { class: "flex flex-col gap-[2px]" }, Br = ["aria-pressed"], jr = ["aria-pressed"], Er = ["aria-pressed"], Ir = ["aria-pressed"], zr = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Ar = {
3449
3450
  key: 0,
3450
3451
  class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
3451
- }, Fr = { class: "mr-auto" }, Or = { class: "font-bold" }, Ur = { class: "flex items-center" }, Dr = { class: "text-xs mr-2" }, Rr = {
3452
+ }, Tr = { class: "mr-auto" }, Fr = { class: "font-bold" }, Or = { class: "flex items-center" }, Ur = { class: "text-xs mr-2" }, Dr = {
3452
3453
  key: 0,
3453
3454
  class: "text-xs"
3454
- }, Pr = {
3455
+ }, Rr = {
3455
3456
  key: 1,
3456
3457
  class: "text-xs"
3457
- }, Hr = /* @__PURE__ */ G({
3458
+ }, Pr = /* @__PURE__ */ G({
3458
3459
  __name: "vs-input-map",
3459
3460
  props: {
3460
3461
  tools: {},
@@ -3470,7 +3471,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3470
3471
  },
3471
3472
  emits: ["update:modelValue"],
3472
3473
  setup(o, { emit: e }) {
3473
- const t = Wt(), s = o, n = e, a = S(() => s.geomType ? s.geomType.map((b) => b.toLowerCase()).filter((b) => ["marker", "polyline", "polygon", "rectangle"].includes(b)) : ["marker", "polyline", "polygon", "rectangle"]), r = w(!1), d = w("");
3474
+ const t = Kt(), s = o, n = e, a = B(() => s.geomType ? s.geomType.map((b) => b.toLowerCase()).filter((b) => ["marker", "polyline", "polygon", "rectangle"].includes(b)) : ["marker", "polyline", "polygon", "rectangle"]), r = w(!1), d = w("");
3474
3475
  function c() {
3475
3476
  const b = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
3476
3477
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Використовуйте два пальці для зуму карти." : "Використовуйте Ctrl + прокрутка для зуму карти.";
@@ -3483,9 +3484,9 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3483
3484
  function A() {
3484
3485
  if (!s.handleZoom) return null;
3485
3486
  let b;
3486
- const M = (N) => {
3487
- const ae = N.ctrlKey || N.metaKey, oe = N.shiftKey;
3488
- if (!ae && !oe) {
3487
+ const V = (N) => {
3488
+ const oe = N.ctrlKey || N.metaKey, ae = N.shiftKey;
3489
+ if (!oe && !ae) {
3489
3490
  r.value = !0, d.value = c(), clearTimeout(b), b = window.setTimeout(() => {
3490
3491
  r.value = !1;
3491
3492
  }, 1e3);
@@ -3503,86 +3504,86 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3503
3504
  }
3504
3505
  r.value = !1;
3505
3506
  };
3506
- return f.value && (f.value.addEventListener("wheel", M, { passive: !1 }), f.value.addEventListener("touchstart", J, { passive: !0 })), p && p.on("wheel", (N) => {
3507
- const ae = N.originalEvent.ctrlKey || N.originalEvent.metaKey, oe = N.originalEvent.shiftKey;
3508
- !ae && !oe && (N.originalEvent.preventDefault(), N.originalEvent.stopPropagation());
3507
+ return f.value && (f.value.addEventListener("wheel", V, { passive: !1 }), f.value.addEventListener("touchstart", J, { passive: !0 })), p && p.on("wheel", (N) => {
3508
+ const oe = N.originalEvent.ctrlKey || N.originalEvent.metaKey, ae = N.originalEvent.shiftKey;
3509
+ !oe && !ae && (N.originalEvent.preventDefault(), N.originalEvent.stopPropagation());
3509
3510
  }), () => {
3510
- f.value && (f.value.removeEventListener("wheel", M), f.value.removeEventListener("touchstart", J)), p && p.off("wheel"), clearTimeout(b);
3511
+ f.value && (f.value.removeEventListener("wheel", V), f.value.removeEventListener("touchstart", J)), p && p.off("wheel"), clearTimeout(b);
3511
3512
  };
3512
3513
  }
3513
- const E = w(null), O = w(6), C = w(0), h = w(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), x = w(null), B = Se();
3514
- let V;
3514
+ const E = w(null), O = w(6), C = w(0), h = w(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), x = w(null), j = tt();
3515
+ let M;
3515
3516
  const P = w("topo100");
3516
- function ee(b) {
3517
+ function te(b) {
3517
3518
  return b ? b.type === "Polygon" ? {
3518
3519
  type: "MultiPolygon",
3519
3520
  coordinates: [b.coordinates]
3520
3521
  } : (b.type === "MultiPolygon", b) : null;
3521
3522
  }
3522
- function Q() {
3523
- return new Promise((b, M) => {
3523
+ function Y() {
3524
+ return new Promise((b, V) => {
3524
3525
  window.L && window.L.Draw && b(0);
3525
- const J = (ae) => {
3526
- if (Array.from(document.styleSheets).some((Ve) => Ve?.href?.includes(ae))) return;
3527
- const Me = document.createElement("link");
3528
- Me.rel = "stylesheet", Me.href = ae, document.head.appendChild(Me);
3529
- }, N = (ae) => new Promise((oe, Me) => {
3530
- const Ve = Array.from(document.scripts).find((Be) => Be.src === ae);
3531
- if (Ve) {
3532
- Ve.addEventListener("load", () => oe()), Ve.addEventListener("error", (Be) => Me(Be));
3526
+ const J = (oe) => {
3527
+ if (Array.from(document.styleSheets).some((Ie) => Ie?.href?.includes(oe))) return;
3528
+ const Ve = document.createElement("link");
3529
+ Ve.rel = "stylesheet", Ve.href = oe, document.head.appendChild(Ve);
3530
+ }, N = (oe) => new Promise((ae, Ve) => {
3531
+ const Ie = Array.from(document.scripts).find((Be) => Be.src === oe);
3532
+ if (Ie) {
3533
+ Ie.addEventListener("load", () => ae()), Ie.addEventListener("error", (Be) => Ve(Be));
3533
3534
  return;
3534
3535
  }
3535
- const Ie = document.createElement("script");
3536
- Ie.src = ae, Ie.async = !0, Ie.onload = () => oe(), Ie.onerror = (Be) => Me(Be), document.body.appendChild(Ie);
3536
+ const Se = document.createElement("script");
3537
+ Se.src = oe, Se.async = !0, Se.onload = () => ae(), Se.onerror = (Be) => Ve(Be), document.body.appendChild(Se);
3537
3538
  });
3538
- J("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), J("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(M);
3539
+ J("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), J("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(V);
3539
3540
  });
3540
3541
  }
3541
- function j() {
3542
- const b = v.toGeoJSON(), M = [];
3542
+ function S() {
3543
+ const b = v.toGeoJSON(), V = [];
3543
3544
  let J = null;
3544
- const N = (oe) => {
3545
- if (oe)
3546
- switch (oe.type) {
3545
+ const N = (ae) => {
3546
+ if (ae)
3547
+ switch (ae.type) {
3547
3548
  case "Point":
3548
- J = oe;
3549
+ J = ae;
3549
3550
  break;
3550
3551
  case "Polygon":
3551
- M.push(oe.coordinates);
3552
+ V.push(ae.coordinates);
3552
3553
  break;
3553
3554
  case "MultiPolygon":
3554
- M.push(...oe.coordinates);
3555
+ V.push(...ae.coordinates);
3555
3556
  break;
3556
3557
  case "GeometryCollection":
3557
- (oe.geometries || []).forEach(N);
3558
+ (ae.geometries || []).forEach(N);
3558
3559
  break;
3559
3560
  }
3560
3561
  };
3561
- (b?.features || []).forEach((oe) => N(oe.geometry));
3562
- const ae = J || (M.length ? { type: "MultiPolygon", coordinates: M } : null);
3563
- n("update:modelValue", ae ? ee(ae) : null), C.value = v.getLayers().length;
3562
+ (b?.features || []).forEach((ae) => N(ae.geometry));
3563
+ const oe = J || (V.length ? { type: "MultiPolygon", coordinates: V } : null);
3564
+ n("update:modelValue", oe ? te(oe) : null), C.value = v.getLayers().length;
3564
3565
  }
3565
- function q(b = 30) {
3566
- const M = v.getLayers();
3567
- if (!M.length) return;
3568
- const N = L.featureGroup(M).getBounds();
3566
+ function W(b = 30) {
3567
+ const V = v.getLayers();
3568
+ if (!V.length) return;
3569
+ const N = L.featureGroup(V).getBounds();
3569
3570
  N && N.isValid() && p.fitBounds(N, { padding: [b, b] });
3570
3571
  }
3571
- function X() {
3572
+ function ee() {
3572
3573
  I.value?.click();
3573
3574
  }
3574
3575
  const Z = w("");
3575
- function D(b) {
3576
+ function U(b) {
3576
3577
  return b instanceof L.Circle ? "Circle" : b instanceof L.Rectangle ? "Rectangle" : b instanceof L.Polygon && !(b instanceof L.Rectangle) ? "Polygon" : b instanceof L.Polyline && !(b instanceof L.Polygon) ? "Polyline" : b instanceof L.Marker ? "Point" : "Feature";
3577
3578
  }
3578
3579
  function F(b) {
3579
3580
  if (b instanceof L.Circle) {
3580
- const M = b.getRadius();
3581
- return Math.PI * (M * M) / 1e6;
3581
+ const V = b.getRadius();
3582
+ return Math.PI * (V * V) / 1e6;
3582
3583
  }
3583
3584
  if (b instanceof L.Polygon || b instanceof L.Rectangle)
3584
3585
  try {
3585
- const M = b.getLatLngs(), J = Array.isArray(M[0]) ? M[0] : M, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(J) : 0;
3586
+ const V = b.getLatLngs(), J = Array.isArray(V[0]) ? V[0] : V, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(J) : 0;
3586
3587
  return N ? N / 1e6 : 0;
3587
3588
  } catch {
3588
3589
  return null;
@@ -3598,50 +3599,50 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3598
3599
  x.value = null, C.value = 0;
3599
3600
  return;
3600
3601
  }
3601
- const M = b[b.length - 1], J = D(M), N = z(M), ae = F(M);
3602
+ const V = b[b.length - 1], J = U(V), N = z(V), oe = F(V);
3602
3603
  x.value = {
3603
3604
  type: J,
3604
3605
  center: N,
3605
- areaKm2: ae,
3606
- layer: M
3606
+ areaKm2: oe,
3607
+ layer: V
3607
3608
  }, C.value = b.length;
3608
3609
  }
3609
- function le() {
3610
+ function Q() {
3610
3611
  const b = x.value?.layer;
3611
3612
  b && (b instanceof L.Circle && b.getBounds ? p.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? p.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && p.setView(b.getLatLng(), Math.max(O.value, 14)));
3612
3613
  }
3613
- function pe() {
3614
+ function ge() {
3614
3615
  const b = x.value?.layer;
3615
- b && (v.removeLayer(b), j(), H());
3616
+ b && (v.removeLayer(b), S(), H());
3616
3617
  }
3617
3618
  ye(async () => {
3618
- document.addEventListener("wheel", $, { passive: !1 }), await Q(), L.drawLocal = Ds;
3619
+ document.addEventListener("wheel", $, { passive: !1 }), await Y(), L.drawLocal = Us;
3619
3620
  const b = s.handleZoom;
3620
3621
  p = L.map(f.value, {
3621
3622
  zoomControl: !1,
3622
3623
  scrollWheelZoom: !b
3623
3624
  }).setView(h.value, 10), setTimeout(() => {
3624
3625
  m = A();
3625
- }, 100), L.control.zoom({ position: "bottomright" }).addTo(p), P.value = Object.keys(B)[0], V = L.tileLayer(B[P.value].url, { maxZoom: 19, minZoom: 6 }).addTo(p), v = new L.FeatureGroup().addTo(p), p.on(L.Draw.Event.CREATED, (N) => {
3626
- const { layer: ae } = N;
3627
- v.clearLayers(), v.addLayer(ae), j(), H(), q(), Z.value = "";
3626
+ }, 100), L.control.zoom({ position: "bottomright" }).addTo(p), P.value = Object.keys(j)[0], M = L.tileLayer(j[P.value].url, { maxZoom: 19, minZoom: 6 }).addTo(p), v = new L.FeatureGroup().addTo(p), p.on(L.Draw.Event.CREATED, (N) => {
3627
+ const { layer: oe } = N;
3628
+ v.clearLayers(), v.addLayer(oe), S(), H(), W(), Z.value = "";
3628
3629
  }), p.on(L.Draw.Event.EDITED, () => {
3629
- j(), H(), q();
3630
+ S(), H(), W();
3630
3631
  }), p.on(L.Draw.Event.DELETED, () => {
3631
- j(), H(), q();
3632
+ S(), H(), W();
3632
3633
  });
3633
- let M = !1;
3634
+ let V = !1;
3634
3635
  p.on("mousemove", (N) => {
3635
- M || (p.invalidateSize(), M = !0), E.value = N.latlng;
3636
+ V || (p.invalidateSize(), V = !0), E.value = N.latlng;
3636
3637
  }), p.on("zoomend", () => {
3637
3638
  O.value = p.getZoom();
3638
3639
  });
3639
- const J = Rs(s.modelValue);
3640
+ const J = Ds(s.modelValue);
3640
3641
  if (J) {
3641
3642
  const N = [];
3642
- L.geoJSON(J).eachLayer((ae) => N.push(ae)), N.length && v.addLayer(N[0]), j(), H(), q();
3643
+ L.geoJSON(J).eachLayer((oe) => N.push(oe)), N.length && v.addLayer(N[0]), S(), H(), W();
3643
3644
  }
3644
- }), Qe(() => {
3645
+ }), Xe(() => {
3645
3646
  document.removeEventListener("wheel", $), m && m();
3646
3647
  });
3647
3648
  function we(b) {
@@ -3666,51 +3667,51 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3666
3667
  k && (k.enable(), Z.value = b);
3667
3668
  }
3668
3669
  }
3669
- function Ue() {
3670
- const b = v.toGeoJSON(), M = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), J = URL.createObjectURL(M), N = document.createElement("a");
3670
+ function Ke() {
3671
+ const b = v.toGeoJSON(), V = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), J = URL.createObjectURL(V), N = document.createElement("a");
3671
3672
  N.href = J, N.download = "data.geojson", N.click(), URL.revokeObjectURL(J);
3672
3673
  }
3673
- function We(b) {
3674
- const M = b.target, J = M.files?.[0];
3674
+ function et(b) {
3675
+ const V = b.target, J = V.files?.[0];
3675
3676
  if (!J) return;
3676
3677
  const N = new FileReader();
3677
3678
  N.onload = () => {
3678
3679
  if (typeof N.result == "string")
3679
3680
  try {
3680
- const ae = JSON.parse(N.result);
3681
- v.clearLayers(), ae && L.geoJSON({ type: "Feature", geometry: ae }).eachLayer((oe) => {
3682
- v.addLayer(oe);
3683
- }), j(), H(), q();
3681
+ const oe = JSON.parse(N.result);
3682
+ v.clearLayers(), oe && L.geoJSON({ type: "Feature", geometry: oe }).eachLayer((ae) => {
3683
+ v.addLayer(ae);
3684
+ }), S(), H(), W();
3684
3685
  } finally {
3685
- M.value = "";
3686
+ V.value = "";
3686
3687
  }
3687
3688
  }, N.readAsText(J);
3688
3689
  }
3689
- function tt(b) {
3690
- p && (V && p.removeLayer(V), V = L.tileLayer(B[b].url, { maxZoom: 19, minZoom: 6 }).addTo(p), P.value = b);
3690
+ function Ue(b) {
3691
+ p && (M && p.removeLayer(M), M = L.tileLayer(j[b].url, { maxZoom: 19, minZoom: 6 }).addTo(p), P.value = b);
3691
3692
  }
3692
- function De(b) {
3693
- const M = L.latLng(b[0], b[1]);
3694
- p.setView(M, 13);
3693
+ function Le(b) {
3694
+ const V = L.latLng(b[0], b[1]);
3695
+ p.setView(V, 13);
3695
3696
  }
3696
3697
  ue(
3697
3698
  () => s.modelValue,
3698
3699
  (b) => {
3699
- const M = ee(b);
3700
- if (b && M !== b) {
3701
- n("update:modelValue", M);
3700
+ const V = te(b);
3701
+ if (b && V !== b) {
3702
+ n("update:modelValue", V);
3702
3703
  return;
3703
3704
  }
3704
- v.clearLayers(), M && L.geoJSON({ type: "Feature", geometry: M }).eachLayer((J) => {
3705
+ v.clearLayers(), V && L.geoJSON({ type: "Feature", geometry: V }).eachLayer((J) => {
3705
3706
  v.addLayer(J), J.dragging?.enable(), J.dragging?.enabled(), J.on("dragend", (N) => {
3706
- const oe = N.target.getLatLng();
3707
- n("update:modelValue", { type: "Point", coordinates: [oe.lng, oe.lat] });
3707
+ const ae = N.target.getLatLng();
3708
+ n("update:modelValue", { type: "Point", coordinates: [ae.lng, ae.lat] });
3708
3709
  });
3709
- }), C.value = v.getLayers().length, H(), q();
3710
+ }), C.value = v.getLayers().length, H(), W();
3710
3711
  }
3711
3712
  );
3712
- function Se() {
3713
- return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((b, M) => Object.assign(b, { key: `b${M}`, preview: b.preview || b.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((b, M) => ({ ...b, [M.key]: M }), {}) : {
3713
+ function tt() {
3714
+ return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((b, V) => Object.assign(b, { key: `b${V}`, preview: b.preview || b.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((b, V) => ({ ...b, [V.key]: V }), {}) : {
3714
3715
  topo100: {
3715
3716
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
3716
3717
  preview: "https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"
@@ -3730,7 +3731,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3730
3731
  setTimeout(() => {
3731
3732
  p.invalidateSize();
3732
3733
  }, 50);
3733
- }), (b, M) => (i(), u("div", {
3734
+ }), (b, V) => (i(), u("div", {
3734
3735
  class: T(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: Te.value }])
3735
3736
  }, [
3736
3737
  l("div", {
@@ -3748,143 +3749,143 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3748
3749
  "leave-to-class": "opacity-0"
3749
3750
  }, {
3750
3751
  default: Ee(() => [
3751
- r.value && s.handleZoom ? (i(), u("div", kr, [
3752
- l("div", _r, [
3753
- l("p", $r, W(d.value), 1)
3752
+ r.value && s.handleZoom ? (i(), u("div", wr, [
3753
+ l("div", kr, [
3754
+ l("p", _r, K(d.value), 1)
3754
3755
  ])
3755
- ])) : U("", !0)
3756
+ ])) : D("", !0)
3756
3757
  ]),
3757
3758
  _: 1
3758
3759
  }),
3759
- l("div", Cr, [
3760
- R(hr, { onGoToCoordinates: De }),
3761
- l("div", Vr, [
3762
- l("div", Mr, [
3760
+ l("div", $r, [
3761
+ R(mr, { onGoToCoordinates: Le }),
3762
+ l("div", Cr, [
3763
+ l("div", Vr, [
3763
3764
  l("button", {
3764
3765
  type: "button",
3765
3766
  class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition",
3766
- onClick: X
3767
+ onClick: ee
3767
3768
  }, "Import"),
3768
3769
  l("button", {
3769
3770
  type: "button",
3770
3771
  class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200 disabled:hover:bg-gray-100 disabled:hover:text-gray-400",
3771
- onClick: Ue,
3772
+ onClick: Ke,
3772
3773
  disabled: C.value === 0
3773
- }, "Export", 8, Lr)
3774
+ }, "Export", 8, Mr)
3774
3775
  ]),
3775
3776
  l("input", {
3776
3777
  ref_key: "importRef",
3777
3778
  ref: I,
3778
3779
  type: "file",
3779
- onChange: We,
3780
+ onChange: et,
3780
3781
  accept: ".json,.geojson",
3781
3782
  class: "hidden"
3782
3783
  }, null, 544)
3783
3784
  ])
3784
3785
  ]),
3785
- l("div", Sr, [
3786
- l("div", Br, [
3786
+ l("div", Lr, [
3787
+ l("div", Sr, [
3787
3788
  a.value.includes("marker") ? (i(), u("button", {
3788
3789
  key: 0,
3789
3790
  class: T(["vs-btn", { "vs-active": Z.value === "marker" }]),
3790
3791
  "aria-pressed": Z.value === "marker",
3791
3792
  title: "Point (P)",
3792
3793
  "aria-label": "Draw point",
3793
- onClick: M[0] || (M[0] = (J) => we("marker"))
3794
+ onClick: V[0] || (V[0] = (J) => we("marker"))
3794
3795
  }, [
3795
- R(Gs)
3796
- ], 10, jr)) : U("", !0),
3796
+ R(Ns)
3797
+ ], 10, Br)) : D("", !0),
3797
3798
  a.value.includes("polyline") ? (i(), u("button", {
3798
3799
  key: 1,
3799
3800
  class: T(["vs-btn", { "vs-active": Z.value === "polyline" }]),
3800
3801
  "aria-pressed": Z.value === "polyline",
3801
3802
  title: "Line (L)",
3802
3803
  "aria-label": "Draw polyline",
3803
- onClick: M[1] || (M[1] = (J) => we("polyline"))
3804
+ onClick: V[1] || (V[1] = (J) => we("polyline"))
3804
3805
  }, [
3805
- R(Zs)
3806
- ], 10, Er)) : U("", !0),
3806
+ R(Ws)
3807
+ ], 10, jr)) : D("", !0),
3807
3808
  a.value.includes("polygon") ? (i(), u("button", {
3808
3809
  key: 2,
3809
3810
  class: T(["vs-btn", { "vs-active": Z.value === "polygon" }]),
3810
3811
  "aria-pressed": Z.value === "polygon",
3811
3812
  title: "Polygon (G)",
3812
3813
  "aria-label": "Draw polygon",
3813
- onClick: M[2] || (M[2] = (J) => we("polygon"))
3814
+ onClick: V[2] || (V[2] = (J) => we("polygon"))
3814
3815
  }, [
3815
- R(Qs)
3816
- ], 10, Ir)) : U("", !0),
3816
+ R(Xs)
3817
+ ], 10, Er)) : D("", !0),
3817
3818
  a.value.includes("rectangle") ? (i(), u("button", {
3818
3819
  key: 3,
3819
3820
  class: T(["vs-btn", { "vs-active": Z.value === "rectangle" }]),
3820
3821
  "aria-pressed": Z.value === "rectangle",
3821
3822
  title: "Rectangle (R)",
3822
3823
  "aria-label": "Draw rectangle",
3823
- onClick: M[3] || (M[3] = (J) => we("rectangle"))
3824
+ onClick: V[3] || (V[3] = (J) => we("rectangle"))
3824
3825
  }, [
3825
- R(or)
3826
- ], 10, zr)) : U("", !0),
3826
+ R(lr)
3827
+ ], 10, Ir)) : D("", !0),
3827
3828
  l("button", {
3828
3829
  class: "vs-btn mt-5",
3829
- onClick: M[4] || (M[4] = (J) => {
3830
+ onClick: V[4] || (V[4] = (J) => {
3830
3831
  Te.value = !Te.value;
3831
3832
  }),
3832
3833
  title: "Full Screen",
3833
3834
  "aria-label": "Full Screen"
3834
3835
  }, [
3835
- R(rr, { style: { width: "12px", height: "12px" } })
3836
+ R(sr, { style: { width: "12px", height: "12px" } })
3836
3837
  ])
3837
3838
  ])
3838
3839
  ]),
3839
3840
  l("div", {
3840
3841
  class: T(["absolute left-4 z-[1000]", x.value ? "bottom-8" : "bottom-4"])
3841
3842
  }, [
3842
- R(wr, {
3843
- basemaps: te(B),
3844
- onOnLayerChange: tt
3843
+ R(xr, {
3844
+ basemaps: le(j),
3845
+ onOnLayerChange: Ue
3845
3846
  }, null, 8, ["basemaps"])
3846
3847
  ], 2),
3847
- l("div", Ar, [
3848
- x.value ? (i(), u("div", Tr, [
3849
- l("div", Fr, [
3850
- M[7] || (M[7] = ge(" Тип: ")),
3851
- l("span", Or, W(x.value.type), 1)
3848
+ l("div", zr, [
3849
+ x.value ? (i(), u("div", Ar, [
3850
+ l("div", Tr, [
3851
+ V[7] || (V[7] = he(" Тип: ", -1)),
3852
+ l("span", Fr, K(x.value.type), 1)
3852
3853
  ]),
3853
- l("div", Ur, [
3854
- l("div", Dr, [
3855
- M[8] || (M[8] = ge(" Центр: ")),
3856
- l("b", null, W(x.value.center.lat.toFixed(5)) + ", " + W(x.value.center.lng.toFixed(5)), 1)
3854
+ l("div", Or, [
3855
+ l("div", Ur, [
3856
+ V[8] || (V[8] = he(" Центр: ", -1)),
3857
+ l("b", null, K(x.value.center.lat.toFixed(5)) + ", " + K(x.value.center.lng.toFixed(5)), 1)
3857
3858
  ]),
3858
- x.value.areaKm2 !== null ? (i(), u("div", Rr, [
3859
- M[9] || (M[9] = ge(" Площа: ")),
3860
- l("b", null, W(x.value.areaKm2.toFixed(1)) + "км²", 1)
3861
- ])) : (i(), u("div", Pr, M[10] || (M[10] = [
3862
- ge(" Площа: "),
3859
+ x.value.areaKm2 !== null ? (i(), u("div", Dr, [
3860
+ V[9] || (V[9] = he(" Площа: ", -1)),
3861
+ l("b", null, K(x.value.areaKm2.toFixed(1)) + "км²", 1)
3862
+ ])) : (i(), u("div", Rr, V[10] || (V[10] = [
3863
+ he(" Площа: ", -1),
3863
3864
  l("b", null, "—", -1)
3864
3865
  ]))),
3865
3866
  l("button", {
3866
3867
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
3867
3868
  title: "Наблизити",
3868
- onClick: M[5] || (M[5] = (J) => le())
3869
- }, M[11] || (M[11] = [
3869
+ onClick: V[5] || (V[5] = (J) => Q())
3870
+ }, V[11] || (V[11] = [
3870
3871
  xe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-77633b64><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-77633b64></path><path d="M7 10l6 0" data-v-77633b64></path><path d="M10 7l0 6" data-v-77633b64></path><path d="M21 21l-6 -6" data-v-77633b64></path></svg>', 1)
3871
3872
  ])),
3872
3873
  l("button", {
3873
3874
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
3874
3875
  title: "Видалити",
3875
- onClick: M[6] || (M[6] = (J) => pe())
3876
+ onClick: V[6] || (V[6] = (J) => ge())
3876
3877
  }, [
3877
- R(et, { class: "w-3 h-3" })
3878
+ R(Qe, { class: "w-3 h-3" })
3878
3879
  ])
3879
3880
  ])
3880
- ])) : U("", !0)
3881
+ ])) : D("", !0)
3881
3882
  ])
3882
3883
  ], 2));
3883
3884
  }
3884
- }), Nr = /* @__PURE__ */ Y(Hr, [["__scopeId", "data-v-77633b64"]]), Gr = ["data-focus"], qr = { class: "flex items-center" }, Kr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Wr = ["onClick", "aria-label"], Zr = {
3885
+ }), Hr = /* @__PURE__ */ X(Pr, [["__scopeId", "data-v-77633b64"]]), Nr = ["data-focus"], Gr = { class: "flex items-center" }, qr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Kr = ["onClick", "aria-label"], Wr = {
3885
3886
  key: 0,
3886
3887
  class: "absolute text-gray-500 truncate pl-2"
3887
- }, Jr = { class: "flex-1 min-w-[2px]" }, Yr = ["placeholder"], Xr = { class: "flex items-center shrink-0" }, Qr = ["disabled"], ei = /* @__PURE__ */ G({
3888
+ }, Zr = { class: "flex-1 min-w-[2px]" }, Jr = ["placeholder"], Yr = { class: "flex items-center shrink-0" }, Xr = ["disabled"], Qr = /* @__PURE__ */ G({
3888
3889
  __name: "vs-input-tag",
3889
3890
  props: /* @__PURE__ */ ie({
3890
3891
  unique: { type: Boolean, default: !0 },
@@ -3903,32 +3904,32 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3903
3904
  setup(o, { emit: e }) {
3904
3905
  const t = o, s = e;
3905
3906
  Ce(t.style);
3906
- const n = w(null), a = w(null), r = w(null), d = w(!1), c = w(""), f = de(o, "modelValue"), p = S(() => t.placeholder || "Add tag…"), v = S(() => f.value?.length === 0 && c.value === ""), k = S(() => !t.disabled && f.value?.length > 0), m = S(() => t.disabled), I = async () => {
3907
+ const n = w(null), a = w(null), r = w(null), d = w(!1), c = w(""), f = de(o, "modelValue"), p = B(() => t.placeholder || "Add tag…"), v = B(() => f.value?.length === 0 && c.value === ""), k = B(() => !t.disabled && f.value?.length > 0), m = B(() => t.disabled), I = async () => {
3907
3908
  m.value || await je(() => r.value?.focus());
3908
- }, $ = (B) => {
3909
- const V = B.trim();
3910
- V !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [V] : t.unique ? f.value.includes(V) || (f.value = [...f.value, V]) : f.value = [...f.value, V], c.value = "");
3909
+ }, $ = (j) => {
3910
+ const M = j.trim();
3911
+ M !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [M] : t.unique ? f.value.includes(M) || (f.value = [...f.value, M]) : f.value = [...f.value, M], c.value = "");
3911
3912
  }, A = () => {
3912
- const B = c.value;
3913
- B.trim() !== "" && $(B), c.value = "";
3914
- }, E = (B) => {
3915
- const V = f.value.slice();
3916
- V.splice(B, 1), s("update:modelValue", V);
3913
+ const j = c.value;
3914
+ j.trim() !== "" && $(j), c.value = "";
3915
+ }, E = (j) => {
3916
+ const M = f.value.slice();
3917
+ M.splice(j, 1), s("update:modelValue", M);
3917
3918
  }, O = () => {
3918
3919
  s("update:modelValue", []);
3919
3920
  }, C = () => {
3920
3921
  m.value || (d.value = !0);
3921
3922
  }, h = () => {
3922
3923
  d.value = !1, !m.value && A();
3923
- }, x = (B) => {
3924
- const { key: V } = B;
3925
- V === "Enter" ? (B.preventDefault(), A()) : V === "Backspace" && c.value === "" && f.value.length > 0 && E(f.value.length - 1);
3924
+ }, x = (j) => {
3925
+ const { key: M } = j;
3926
+ M === "Enter" ? (j.preventDefault(), A()) : M === "Backspace" && c.value === "" && f.value.length > 0 && E(f.value.length - 1);
3926
3927
  };
3927
- return (B, V) => (i(), u("div", {
3928
+ return (j, M) => (i(), u("div", {
3928
3929
  class: "flex gap-1 w-full",
3929
3930
  ref_key: "root",
3930
3931
  ref: n,
3931
- onClick: V[1] || (V[1] = $e(() => {
3932
+ onClick: M[1] || (M[1] = $e(() => {
3932
3933
  }, ["stop"]))
3933
3934
  }, [
3934
3935
  l("div", {
@@ -3951,19 +3952,19 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3951
3952
  ref_key: "chipsRef",
3952
3953
  ref: a
3953
3954
  }, [
3954
- (i(!0), u(re, null, fe(f.value, (P, ee) => (i(), u("div", {
3955
- key: ee,
3955
+ (i(!0), u(re, null, pe(f.value, (P, te) => (i(), u("div", {
3956
+ key: te,
3956
3957
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
3957
3958
  }, [
3958
- l("div", qr, [
3959
- l("div", Kr, W(P), 1)
3959
+ l("div", Gr, [
3960
+ l("div", qr, K(P), 1)
3960
3961
  ]),
3961
3962
  l("div", {
3962
3963
  role: "button",
3963
3964
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
3964
- onClick: $e((Q) => E(ee), ["stop"]),
3965
+ onClick: $e((Y) => E(te), ["stop"]),
3965
3966
  "aria-label": `Remove ${P}`
3966
- }, V[2] || (V[2] = [
3967
+ }, M[2] || (M[2] = [
3967
3968
  l("svg", {
3968
3969
  height: "14",
3969
3970
  width: "14",
@@ -3974,11 +3975,11 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3974
3975
  }, [
3975
3976
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3976
3977
  ], -1)
3977
- ]), 8, Wr)
3978
+ ]), 8, Kr)
3978
3979
  ]))), 128)),
3979
- v.value ? (i(), u("div", Zr, W(p.value), 1)) : U("", !0),
3980
- l("div", Jr, [
3981
- m.value ? U("", !0) : ne((i(), u("input", {
3980
+ v.value ? (i(), u("div", Wr, K(p.value), 1)) : D("", !0),
3981
+ l("div", Zr, [
3982
+ m.value ? D("", !0) : ne((i(), u("input", {
3982
3983
  key: 0,
3983
3984
  ref_key: "inputRef",
3984
3985
  ref: r,
@@ -3990,17 +3991,17 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
3990
3991
  type: "text",
3991
3992
  tabindex: "0",
3992
3993
  "aria-label": "Add tag",
3993
- "onUpdate:modelValue": V[0] || (V[0] = (P) => c.value = P),
3994
+ "onUpdate:modelValue": M[0] || (M[0] = (P) => c.value = P),
3994
3995
  onFocus: C,
3995
3996
  onBlur: h,
3996
3997
  onKeydown: x,
3997
3998
  placeholder: f.value && f.value.length ? "" : void 0
3998
- }, null, 40, Yr)), [
3999
- [he, c.value]
3999
+ }, null, 40, Jr)), [
4000
+ [me, c.value]
4000
4001
  ])
4001
4002
  ])
4002
4003
  ], 512),
4003
- l("div", Xr, [
4004
+ l("div", Yr, [
4004
4005
  k.value ? (i(), u("button", {
4005
4006
  key: 0,
4006
4007
  type: "button",
@@ -4008,7 +4009,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4008
4009
  "aria-label": "Clear all tags",
4009
4010
  disabled: m.value,
4010
4011
  onClick: $e(O, ["stop"])
4011
- }, V[3] || (V[3] = [
4012
+ }, M[3] || (M[3] = [
4012
4013
  l("svg", {
4013
4014
  height: "20",
4014
4015
  width: "20",
@@ -4017,13 +4018,13 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4017
4018
  }, [
4018
4019
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
4019
4020
  ], -1)
4020
- ]), 8, Qr)) : U("", !0)
4021
+ ]), 8, Xr)) : D("", !0)
4021
4022
  ])
4022
- ], 10, Gr)
4023
+ ], 10, Nr)
4023
4024
  ], 2)
4024
4025
  ], 512));
4025
4026
  }
4026
- }), ti = { class: "relative flex gap-1 bg-white w-full" }, li = ["disabled", "placeholder"], oi = /* @__PURE__ */ G({
4027
+ }), ei = { class: "relative flex gap-1 bg-white w-full" }, ti = ["disabled", "placeholder"], li = /* @__PURE__ */ G({
4027
4028
  __name: "vs-input-slug",
4028
4029
  props: /* @__PURE__ */ ie({
4029
4030
  disabled: { type: Boolean },
@@ -4082,15 +4083,15 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4082
4083
  const r = e?.value?.[t.parent || ""]?.toString(), d = n(r);
4083
4084
  s.value = d.toString();
4084
4085
  };
4085
- return (r, d) => (i(), u("div", ti, [
4086
+ return (r, d) => (i(), u("div", ei, [
4086
4087
  ne(l("input", {
4087
4088
  ref: "vsText",
4088
4089
  disabled: r.disabled,
4089
4090
  placeholder: r.placeholder,
4090
4091
  "onUpdate:modelValue": d[0] || (d[0] = (c) => s.value = c),
4091
4092
  class: "block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
4092
- }, null, 8, li), [
4093
- [he, s.value]
4093
+ }, null, 8, ti), [
4094
+ [me, s.value]
4094
4095
  ]),
4095
4096
  l("button", {
4096
4097
  class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",
@@ -4098,7 +4099,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4098
4099
  }, " Gen ")
4099
4100
  ]));
4100
4101
  }
4101
- }), ni = /* @__PURE__ */ Y(oi, [["__scopeId", "data-v-b0eba370"]]), ai = { class: "relative flex gap-1 bg-white w-full" }, si = ["disabled", "placeholder"], ri = ["disabled"], ii = { key: 0 }, ui = { key: 1 }, di = /* @__PURE__ */ G({
4102
+ }), oi = /* @__PURE__ */ X(li, [["__scopeId", "data-v-b0eba370"]]), ni = { class: "relative flex gap-1 bg-white w-full" }, ai = ["disabled", "placeholder"], si = ["disabled"], ri = { key: 0 }, ii = { key: 1 }, ui = /* @__PURE__ */ G({
4102
4103
  __name: "vs-input-codegen",
4103
4104
  props: /* @__PURE__ */ ie({
4104
4105
  table: {},
@@ -4119,7 +4120,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4119
4120
  }),
4120
4121
  emits: ["update:modelValue"],
4121
4122
  setup(o) {
4122
- const e = o, t = de(o, "modelValue"), s = w(!1), n = S(() => e.init !== !1), a = S(() => !!e.table && !!e.code), r = () => {
4123
+ const e = o, t = de(o, "modelValue"), s = w(!1), n = B(() => e.init !== !1), a = B(() => !!e.table && !!e.code), r = () => {
4123
4124
  if (!a.value) return "";
4124
4125
  const f = encodeURIComponent(String(e.table)), p = encodeURIComponent(String(e.code));
4125
4126
  return `/api/code-gen/${f}/${p}`;
@@ -4145,31 +4146,31 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4145
4146
  () => {
4146
4147
  c();
4147
4148
  }
4148
- ), (f, p) => (i(), u("div", ai, [
4149
+ ), (f, p) => (i(), u("div", ni, [
4149
4150
  ne(l("input", {
4150
4151
  disabled: f.disabled,
4151
4152
  placeholder: f.placeholder,
4152
4153
  "onUpdate:modelValue": p[0] || (p[0] = (v) => t.value = v),
4153
4154
  class: "block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
4154
- }, null, 8, si), [
4155
- [he, t.value]
4155
+ }, null, 8, ai), [
4156
+ [me, t.value]
4156
4157
  ]),
4157
4158
  l("button", {
4158
4159
  class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed",
4159
4160
  disabled: s.value || f.disabled || !a.value,
4160
4161
  onClick: d
4161
4162
  }, [
4162
- s.value ? (i(), u("span", ui, "...")) : (i(), u("span", ii, "Gen"))
4163
- ], 8, ri)
4163
+ s.value ? (i(), u("span", ii, "...")) : (i(), u("span", ri, "Gen"))
4164
+ ], 8, si)
4164
4165
  ]));
4165
4166
  }
4166
- }), ci = /* @__PURE__ */ Y(di, [["__scopeId", "data-v-6ee5237d"]]), pi = { class: "w-full" }, fi = {
4167
+ }), di = /* @__PURE__ */ X(ui, [["__scopeId", "data-v-6ee5237d"]]), ci = { class: "w-full" }, pi = {
4167
4168
  ref: "sortableContainer",
4168
4169
  class: "flex flex-col gap-1"
4169
- }, vi = ["onDragstart", "onDrop"], mi = { class: "w-1/3" }, hi = { class: "w-2/3" }, gi = ["onClick"], bi = {
4170
+ }, fi = ["onDragstart", "onDrop"], vi = { class: "w-1/3" }, mi = { class: "w-2/3" }, hi = ["onClick"], gi = {
4170
4171
  key: 0,
4171
4172
  class: "text-[14px] text-gray-700"
4172
- }, yi = { class: "mt-2 w-full flex items-center" }, xi = ["disabled"], wi = /* @__PURE__ */ G({
4173
+ }, bi = { class: "mt-2 w-full flex items-center" }, yi = ["disabled"], xi = /* @__PURE__ */ G({
4173
4174
  __name: "vs-input-key-value",
4174
4175
  props: {
4175
4176
  parent: {},
@@ -4196,7 +4197,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4196
4197
  const E = c.value.splice(f.value, 1)[0];
4197
4198
  c.value.splice(A, 0, E), f.value = null;
4198
4199
  }
4199
- const m = S(
4200
+ const m = B(
4200
4201
  () => c.value.some((A) => A.key && !A.value || !A.key && A.value)
4201
4202
  ), I = () => {
4202
4203
  c.value.push({ id: t("key-value-"), key: "", value: "" });
@@ -4219,9 +4220,9 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4219
4220
  }), a("update:modelValue", E);
4220
4221
  },
4221
4222
  { deep: !0 }
4222
- ), (A, E) => (i(), u("div", pi, [
4223
- l("div", fi, [
4224
- (i(!0), u(re, null, fe(c.value, (O, C) => (i(), u("div", {
4223
+ ), (A, E) => (i(), u("div", ci, [
4224
+ l("div", pi, [
4225
+ (i(!0), u(re, null, pe(c.value, (O, C) => (i(), u("div", {
4225
4226
  key: O.id,
4226
4227
  class: T(["flex items-center gap-2 w-full", { "opacity-50": f.value === C }]),
4227
4228
  draggable: "true",
@@ -4231,15 +4232,15 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4231
4232
  onDrop: (h) => k(C)
4232
4233
  }, [
4233
4234
  E[1] || (E[1] = xe('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>', 1)),
4234
- l("div", mi, [
4235
- R(Xe, {
4235
+ l("div", vi, [
4236
+ R(Ye, {
4236
4237
  modelValue: O.key,
4237
4238
  "onUpdate:modelValue": (h) => O.key = h,
4238
4239
  placeholder: "Ключ"
4239
4240
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
4240
4241
  ]),
4241
- l("div", hi, [
4242
- R(Xe, {
4242
+ l("div", mi, [
4243
+ R(Ye, {
4243
4244
  modelValue: O.value,
4244
4245
  "onUpdate:modelValue": (h) => O.value = h,
4245
4246
  placeholder: "Значення"
@@ -4249,31 +4250,31 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4249
4250
  onClick: (h) => $(O.id),
4250
4251
  class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
4251
4252
  }, [
4252
- R(te(Kl), {
4253
+ R(le(ql), {
4253
4254
  height: "16",
4254
4255
  width: "16"
4255
4256
  })
4256
- ], 8, gi)
4257
- ], 42, vi))), 128))
4257
+ ], 8, hi)
4258
+ ], 42, fi))), 128))
4258
4259
  ], 512),
4259
- c.value.length ? U("", !0) : (i(), u("span", bi, " Дані для відображення відсутні ")),
4260
- l("div", yi, [
4260
+ c.value.length ? D("", !0) : (i(), u("span", gi, " Дані для відображення відсутні ")),
4261
+ l("div", bi, [
4261
4262
  l("button", {
4262
4263
  type: "button",
4263
4264
  onClick: I,
4264
4265
  disabled: m.value,
4265
4266
  class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
4266
4267
  }, [
4267
- R(qe, {
4268
+ R(Ge, {
4268
4269
  height: "14",
4269
4270
  width: "14"
4270
4271
  }),
4271
- ge(" " + W(te(r)), 1)
4272
- ], 8, xi)
4272
+ he(" " + K(le(r)), 1)
4273
+ ], 8, yi)
4273
4274
  ])
4274
4275
  ]));
4275
4276
  }
4276
- }), ki = /* @__PURE__ */ Y(wi, [["__scopeId", "data-v-a0f7fbfc"]]), _i = { class: "flex items-center gap-2 w-full" }, $i = ["disabled"], Ci = /* @__PURE__ */ G({
4277
+ }), wi = /* @__PURE__ */ X(xi, [["__scopeId", "data-v-a0f7fbfc"]]), ki = { class: "flex items-center gap-2 w-full" }, _i = ["disabled"], $i = /* @__PURE__ */ G({
4277
4278
  __name: "vs-input-color",
4278
4279
  props: {
4279
4280
  style: { default: () => ({}) },
@@ -4286,30 +4287,30 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4286
4287
  },
4287
4288
  emits: ["update:modelValue"],
4288
4289
  setup(o, { emit: e }) {
4289
- const t = o, { inputClass: s } = Ce(t.style), n = e, a = S({
4290
+ const t = o, { inputClass: s } = Ce(t.style), n = e, a = B({
4290
4291
  get: () => t.modelValue || "#000000",
4291
4292
  set: (r) => n("update:modelValue", r)
4292
4293
  });
4293
- return (r, d) => (i(), u("div", _i, [
4294
+ return (r, d) => (i(), u("div", ki, [
4294
4295
  ne(l("input", {
4295
4296
  type: "color",
4296
4297
  "onUpdate:modelValue": d[0] || (d[0] = (c) => a.value = c),
4297
4298
  disabled: r.disabled,
4298
4299
  ref: "color",
4299
- class: T(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", te(s)].join(" ")]),
4300
+ class: T(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", le(s)].join(" ")]),
4300
4301
  style: { border: "1px solid #CFD9E0" }
4301
- }, null, 10, $i), [
4302
- [he, a.value]
4302
+ }, null, 10, _i), [
4303
+ [me, a.value]
4303
4304
  ]),
4304
4305
  ne(l("input", {
4305
4306
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
4306
4307
  "onUpdate:modelValue": d[1] || (d[1] = (c) => a.value = c)
4307
4308
  }, null, 512), [
4308
- [he, a.value]
4309
+ [me, a.value]
4309
4310
  ])
4310
4311
  ]));
4311
4312
  }
4312
- }), Vi = { class: "flex items-center gap-2 w-full" }, Mi = ["min", "max", "step", "disabled"], Li = /* @__PURE__ */ G({
4313
+ }), Ci = { class: "flex items-center gap-2 w-full" }, Vi = ["min", "max", "step", "disabled"], Mi = /* @__PURE__ */ G({
4313
4314
  __name: "vs-input-range",
4314
4315
  props: {
4315
4316
  style: { default: () => ({}) },
@@ -4325,11 +4326,11 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4325
4326
  },
4326
4327
  emits: ["update:modelValue"],
4327
4328
  setup(o, { emit: e }) {
4328
- const t = o, { inputClass: s } = Ce(t.style), n = e, a = S({
4329
+ const t = o, { inputClass: s } = Ce(t.style), n = e, a = B({
4329
4330
  get: () => Number(t.modelValue ?? t.min),
4330
4331
  set: (r) => n("update:modelValue", Number(r))
4331
4332
  });
4332
- return (r, d) => (i(), u("div", Vi, [
4333
+ return (r, d) => (i(), u("div", Ci, [
4333
4334
  ne(l("input", {
4334
4335
  type: "range",
4335
4336
  "onUpdate:modelValue": d[0] || (d[0] = (c) => a.value = c),
@@ -4338,20 +4339,20 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4338
4339
  step: r.step,
4339
4340
  disabled: r.disabled,
4340
4341
  ref: "range",
4341
- class: T(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", te(s)].join(" ")])
4342
- }, null, 10, Mi), [
4343
- [he, a.value]
4342
+ class: T(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", le(s)].join(" ")])
4343
+ }, null, 10, Vi), [
4344
+ [me, a.value]
4344
4345
  ]),
4345
4346
  ne(l("input", {
4346
4347
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
4347
4348
  type: "number",
4348
4349
  "onUpdate:modelValue": d[1] || (d[1] = (c) => a.value = c)
4349
4350
  }, null, 512), [
4350
- [he, a.value]
4351
+ [me, a.value]
4351
4352
  ])
4352
4353
  ]));
4353
4354
  }
4354
- }), Si = ["type", "value", "onInput", "placeholder", "disabled"], Bi = /* @__PURE__ */ G({
4355
+ }), Li = ["type", "value", "onInput", "placeholder", "disabled"], Si = /* @__PURE__ */ G({
4355
4356
  __name: "vs-input-array",
4356
4357
  props: /* @__PURE__ */ ie({
4357
4358
  count: { default: 1 },
@@ -4371,7 +4372,7 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4371
4372
  emits: ["update:modelValue"],
4372
4373
  setup(o) {
4373
4374
  const e = o, { inputClass: t } = Ce(e.style), s = de(o, "modelValue");
4374
- Zt(() => {
4375
+ Wt(() => {
4375
4376
  const a = s.value?.length ?? 0;
4376
4377
  a < e.count && (s.value = [
4377
4378
  ...s.value ?? [],
@@ -4385,49 +4386,49 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4385
4386
  return (a, r) => (i(), u("div", {
4386
4387
  class: T(["grid gap-2", `grid-cols-${a.limit}`])
4387
4388
  }, [
4388
- (i(!0), u(re, null, fe(a.count, (d) => (i(), u("input", {
4389
+ (i(!0), u(re, null, pe(a.count, (d) => (i(), u("input", {
4389
4390
  type: a.inputType,
4390
4391
  value: s.value?.[d - 1] ?? "",
4391
4392
  onInput: (c) => n(c, d - 1),
4392
4393
  placeholder: a.placeholder,
4393
4394
  disabled: a.disabled,
4394
- class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [te(t), { "!border-red-600": a.error }]]),
4395
+ class: T(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [le(t), { "!border-red-600": a.error }]]),
4395
4396
  style: {
4396
4397
  border: "1px solid #CFD9E0"
4397
4398
  }
4398
- }, null, 42, Si))), 256))
4399
+ }, null, 42, Li))), 256))
4399
4400
  ], 2));
4400
4401
  }
4401
- }), ji = {
4402
- VsInputText: Xe,
4403
- VsInputRadio: _t,
4404
- "vs-input-text": Xe,
4405
- "vs-input-password": wl,
4406
- "vs-input-textarea": Ia,
4407
- "vs-input-mask": no,
4408
- "vs-input-number": $l,
4409
- "vs-input-radio": _t,
4410
- "vs-input-select": Mt,
4411
- "vs-input-switcher": At,
4412
- "vs-input-static": kt,
4413
- "vs-input-container": ca,
4414
- "vs-input-date": ko,
4415
- "vs-input-checkbox": xo,
4416
- "vs-input-file": dn,
4417
- "vs-input-html": kt,
4418
- "vs-input-email": ro,
4419
- "vs-input-datatable": Us,
4420
- "vs-input-map": Nr,
4421
- "vs-input-file-list": Dn,
4422
- "vs-input-tags": ei,
4423
- "vs-input-slug": ni,
4424
- "vs-input-codegen": ci,
4425
- "vs-input-key-value": ki,
4426
- "vs-input-range": Li,
4427
- "vs-input-color": Ci,
4428
- "vs-input-native-select": Mt,
4429
- "vs-input-array": Bi
4430
- }, Ei = /* @__PURE__ */ G({
4402
+ }), Bi = {
4403
+ VsInputText: Ye,
4404
+ VsInputRadio: kt,
4405
+ "vs-input-text": Ye,
4406
+ "vs-input-password": xl,
4407
+ "vs-input-textarea": ja,
4408
+ "vs-input-mask": oo,
4409
+ "vs-input-number": _l,
4410
+ "vs-input-radio": kt,
4411
+ "vs-input-select": Vt,
4412
+ "vs-input-switcher": zt,
4413
+ "vs-input-static": wt,
4414
+ "vs-input-container": da,
4415
+ "vs-input-date": wo,
4416
+ "vs-input-checkbox": yo,
4417
+ "vs-input-file": un,
4418
+ "vs-input-html": wt,
4419
+ "vs-input-email": so,
4420
+ "vs-input-datatable": Os,
4421
+ "vs-input-map": Hr,
4422
+ "vs-input-file-list": Un,
4423
+ "vs-input-tags": Qr,
4424
+ "vs-input-slug": oi,
4425
+ "vs-input-codegen": di,
4426
+ "vs-input-key-value": wi,
4427
+ "vs-input-range": Mi,
4428
+ "vs-input-color": $i,
4429
+ "vs-input-native-select": Vt,
4430
+ "vs-input-array": Si
4431
+ }, ji = /* @__PURE__ */ G({
4431
4432
  __name: "behavior",
4432
4433
  props: {
4433
4434
  api: {},
@@ -4457,12 +4458,12 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4457
4458
  return (n, a) => (i(), u("button", {
4458
4459
  onClick: s,
4459
4460
  class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
4460
- }, W(n.button), 1));
4461
+ }, K(n.button), 1));
4461
4462
  }
4462
- }), Ii = { class: "flex flex-col gap-1 w-full" }, zi = {
4463
+ }), Ei = { class: "flex flex-col gap-1 w-full" }, Ii = {
4463
4464
  key: 0,
4464
4465
  class: "text-sm text-gray-500"
4465
- }, Ut = /* @__PURE__ */ G({
4466
+ }, Ot = /* @__PURE__ */ G({
4466
4467
  __name: "vs-compact-form-layout",
4467
4468
  props: /* @__PURE__ */ ie({
4468
4469
  item: { default: {} },
@@ -4477,18 +4478,18 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4477
4478
  }),
4478
4479
  emits: ["update:modelValue"],
4479
4480
  setup(o) {
4480
- const e = o, t = de(o, "modelValue"), s = S(() => yl[`${e.layout}`]), n = S(() => ji?.[`vs-input-${e.item.type}`]), a = S(() => {
4481
- const d = te(n);
4481
+ const e = o, t = de(o, "modelValue"), s = B(() => bl[`${e.layout}`]), n = B(() => Bi?.[`vs-input-${e.item.type}`]), a = B(() => {
4482
+ const d = le(n);
4482
4483
  if (!d) return /* @__PURE__ */ new Set();
4483
4484
  const c = d.props ?? d.__vccOpts?.props;
4484
4485
  if (!c) return /* @__PURE__ */ new Set();
4485
4486
  const f = Array.isArray(c) ? c : Object.keys(c);
4486
4487
  return new Set(f);
4487
- }), r = S(() => {
4488
+ }), r = B(() => {
4488
4489
  const d = e.item ?? {}, c = a.value;
4489
4490
  return c.size ? Object.fromEntries(Object.entries(d).filter(([f]) => c.has(f))) : {};
4490
4491
  });
4491
- return (d, c) => (i(), me(Oe(s.value), {
4492
+ return (d, c) => (i(), ve(Oe(s.value), {
4492
4493
  ua: e.item.ua,
4493
4494
  error: e.error || "",
4494
4495
  item: d.item,
@@ -4499,20 +4500,20 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4499
4500
  l("div", {
4500
4501
  class: T(["flex w-full", `${e.item.type}-component`])
4501
4502
  }, [
4502
- l("div", Ii, [
4503
- (i(), me(Oe(n.value), Fe(r.value, {
4503
+ l("div", Ei, [
4504
+ (i(), ve(Oe(n.value), Fe(r.value, {
4504
4505
  modelValue: t.value,
4505
4506
  "onUpdate:modelValue": c[0] || (c[0] = (f) => t.value = f)
4506
4507
  }), null, 16, ["modelValue"])),
4507
- d.item.description && e.layout !== "settings" ? (i(), u("p", zi, W(d.item.description), 1)) : U("", !0)
4508
+ d.item.description && e.layout !== "settings" ? (i(), u("p", Ii, K(d.item.description), 1)) : D("", !0)
4508
4509
  ]),
4509
- d.item.behavior?.api && d.item.behavior?.button ? (i(), me(Ei, Fe({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : U("", !0)
4510
+ d.item.behavior?.api && d.item.behavior?.button ? (i(), ve(ji, Fe({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : D("", !0)
4510
4511
  ], 2)
4511
4512
  ]),
4512
4513
  _: 1
4513
4514
  }, 8, ["ua", "error", "item", "columns", "label"]));
4514
4515
  }
4515
- }), Ai = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, Ti = { class: "vs-compact-form-navigation__rail mt-[6px]" }, Fi = ["onClick"], Oi = /* @__PURE__ */ G({
4516
+ }), zi = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, Ai = { class: "vs-compact-form-navigation__rail mt-[6px]" }, Ti = ["onClick"], Fi = /* @__PURE__ */ G({
4516
4517
  __name: "vs-compact-form-navigation",
4517
4518
  props: {
4518
4519
  target: {},
@@ -4522,176 +4523,176 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4522
4523
  width: { default: 400 }
4523
4524
  },
4524
4525
  setup(o, { expose: e }) {
4525
- const t = o, s = w([]), n = w(""), a = w(""), r = S(() => !!t.enabled), d = S(() => [
4526
+ const t = o, s = w([]), n = w(""), a = w(""), r = B(() => !!t.enabled), d = B(() => [
4526
4527
  "vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]",
4527
4528
  "sticky top-0 self-start shrink-0",
4528
4529
  "max-h-full min-h-0 overflow-y-auto"
4529
- ]), c = S(() => {
4530
- const j = t.width;
4531
- if (j == null) return {};
4532
- const q = typeof j == "number" ? `${j}px` : `${j}`;
4533
- return { width: q, minWidth: q };
4530
+ ]), c = B(() => {
4531
+ const S = t.width;
4532
+ if (S == null) return {};
4533
+ const W = typeof S == "number" ? `${S}px` : `${S}`;
4534
+ return { width: W, minWidth: W };
4534
4535
  });
4535
4536
  let f = null, p = 0, v = 0, k = null, m = null, I = null;
4536
- const $ = () => ee(), A = () => O();
4537
+ const $ = () => te(), A = () => O();
4537
4538
  ue(
4538
4539
  () => t.target,
4539
- async (j) => {
4540
- if (B(), !j) {
4540
+ async (S) => {
4541
+ if (j(), !S) {
4541
4542
  k = null, s.value = [], n.value = "";
4542
4543
  return;
4543
4544
  }
4544
- k = j, r.value && (await je(), x(j), O());
4545
+ k = S, r.value && (await je(), x(S), O());
4545
4546
  },
4546
4547
  { immediate: !0 }
4547
4548
  ), ue(
4548
4549
  () => t.scrollContainer,
4549
- (j) => {
4550
+ (S) => {
4550
4551
  if (!r.value) {
4551
- m = j ?? null;
4552
+ m = S ?? null;
4552
4553
  return;
4553
4554
  }
4554
- E(j ?? null), je(() => O());
4555
+ E(S ?? null), je(() => O());
4555
4556
  },
4556
4557
  { immediate: !0 }
4557
4558
  ), ye(() => {
4558
4559
  t.scrollContainer || E(null), O();
4559
4560
  }), rt(() => {
4560
- B(), E(null, !0), k = null, typeof window < "u" && (p && window.cancelAnimationFrame(p), v && window.cancelAnimationFrame(v));
4561
+ j(), E(null, !0), k = null, typeof window < "u" && (p && window.cancelAnimationFrame(p), v && window.cancelAnimationFrame(v));
4561
4562
  });
4562
- function E(j, q = !1) {
4563
- if (I && (I(), I = null), q) {
4563
+ function E(S, W = !1) {
4564
+ if (I && (I(), I = null), W) {
4564
4565
  m = null;
4565
4566
  return;
4566
4567
  }
4567
- if (m = j ?? null, typeof window > "u") return;
4568
- const X = j ?? window, Z = window;
4569
- X.addEventListener("scroll", $, { passive: !0 }), Z.addEventListener("resize", A), I = () => {
4570
- X.removeEventListener("scroll", $), Z.removeEventListener("resize", A);
4568
+ if (m = S ?? null, typeof window > "u") return;
4569
+ const ee = S ?? window, Z = window;
4570
+ ee.addEventListener("scroll", $, { passive: !0 }), Z.addEventListener("resize", A), I = () => {
4571
+ ee.removeEventListener("scroll", $), Z.removeEventListener("resize", A);
4571
4572
  };
4572
4573
  }
4573
4574
  function O() {
4574
4575
  if (!r.value || !k) return;
4575
4576
  p && typeof window < "u" && window.cancelAnimationFrame(p);
4576
- const j = () => {
4577
+ const S = () => {
4577
4578
  C(), p = 0;
4578
4579
  };
4579
- typeof window > "u" ? j() : p = window.requestAnimationFrame(j);
4580
+ typeof window > "u" ? S() : p = window.requestAnimationFrame(S);
4580
4581
  }
4581
4582
  function C() {
4582
4583
  if (!r.value || !k) return;
4583
- const j = Array.from(k.querySelectorAll("h1, h2")), q = /* @__PURE__ */ new Set(), X = [];
4584
- j.forEach((Z, D) => {
4584
+ const S = Array.from(k.querySelectorAll("h1, h2")), W = /* @__PURE__ */ new Set(), ee = [];
4585
+ S.forEach((Z, U) => {
4585
4586
  const F = Z.textContent?.trim() ?? "";
4586
4587
  if (!F) return;
4587
4588
  let z = (Z.getAttribute("id") ?? "").trim();
4588
- z || (z = h(F) || `heading-${D + 1}`);
4589
- let H = z, le = 1;
4590
- for (; q.has(H); )
4591
- H = `${z}-${le += 1}`;
4592
- Z.id !== H && Object.assign(Z, { id: H }), q.add(H), X.push({
4589
+ z || (z = h(F) || `heading-${U + 1}`);
4590
+ let H = z, Q = 1;
4591
+ for (; W.has(H); )
4592
+ H = `${z}-${Q += 1}`;
4593
+ Z.id !== H && Object.assign(Z, { id: H }), W.add(H), ee.push({
4593
4594
  id: H,
4594
4595
  text: F,
4595
4596
  level: Z.tagName.toLowerCase() === "h1" ? 1 : 2
4596
4597
  });
4597
- }), s.value = X, X.length || (n.value = ""), P();
4598
+ }), s.value = ee, ee.length || (n.value = ""), P();
4598
4599
  }
4599
- function h(j) {
4600
- return j.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
4600
+ function h(S) {
4601
+ return S.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
4601
4602
  }
4602
- function x(j) {
4603
- !j || !r.value || typeof MutationObserver > "u" || (B(), f = new MutationObserver(() => O()), f.observe(j, { childList: !0, subtree: !0 }));
4603
+ function x(S) {
4604
+ !S || !r.value || typeof MutationObserver > "u" || (j(), f = new MutationObserver(() => O()), f.observe(S, { childList: !0, subtree: !0 }));
4604
4605
  }
4605
- function B() {
4606
+ function j() {
4606
4607
  f && (f.disconnect(), f = null);
4607
4608
  }
4608
- function V(j) {
4609
- const q = m;
4610
- if (!q)
4611
- return typeof window > "u" ? j.offsetTop : j.getBoundingClientRect().top + window.scrollY;
4612
- const X = j.getBoundingClientRect(), Z = q.getBoundingClientRect();
4613
- return X.top - Z.top + q.scrollTop;
4609
+ function M(S) {
4610
+ const W = m;
4611
+ if (!W)
4612
+ return typeof window > "u" ? S.offsetTop : S.getBoundingClientRect().top + window.scrollY;
4613
+ const ee = S.getBoundingClientRect(), Z = W.getBoundingClientRect();
4614
+ return ee.top - Z.top + W.scrollTop;
4614
4615
  }
4615
4616
  function P() {
4616
4617
  if (!r.value || !s.value.length) return;
4617
- const j = m, q = (j ? j.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), X = (j ? j.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), Z = q + X;
4618
- let D = null;
4618
+ const S = m, W = (S ? S.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), ee = (S ? S.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), Z = W + ee;
4619
+ let U = null;
4619
4620
  for (let z = 0; z < s.value.length; z += 1) {
4620
- const H = s.value[z], le = document.getElementById(H.id);
4621
- if (le) {
4622
- const pe = V(le);
4623
- pe + le.offsetHeight > q && pe < Z && (D = H.id);
4621
+ const H = s.value[z], Q = document.getElementById(H.id);
4622
+ if (Q) {
4623
+ const ge = M(Q);
4624
+ ge + Q.offsetHeight > W && ge < Z && (U = H.id);
4624
4625
  }
4625
4626
  }
4626
- !D && a.value && (D = a.value), D && (a.value = D);
4627
- const F = j ? j.scrollHeight - j.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
4628
- q + 5 >= F && (D = s.value[s.value.length - 1].id), D && (n.value = D);
4627
+ !U && a.value && (U = a.value), U && (a.value = U);
4628
+ const F = S ? S.scrollHeight - S.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
4629
+ W + 5 >= F && (U = s.value[s.value.length - 1].id), U && (n.value = U);
4629
4630
  }
4630
- function ee() {
4631
+ function te() {
4631
4632
  r.value && (v && window.cancelAnimationFrame(v), v = window.requestAnimationFrame(() => {
4632
4633
  P(), v = 0;
4633
4634
  }));
4634
4635
  }
4635
- function Q(j) {
4636
+ function Y(S) {
4636
4637
  if (!r.value) return;
4637
- const q = document.getElementById(j);
4638
- if (!q) return;
4639
- const X = m, Z = Math.max(0, V(q));
4640
- X ? X.scrollTo({ top: Z, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: Z, behavior: "smooth" });
4638
+ const W = document.getElementById(S);
4639
+ if (!W) return;
4640
+ const ee = m, Z = Math.max(0, M(W));
4641
+ ee ? ee.scrollTo({ top: Z, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: Z, behavior: "smooth" });
4641
4642
  }
4642
- return e({ refresh: O }), (j, q) => r.value && s.value.length ? (i(), u("div", {
4643
+ return e({ refresh: O }), (S, W) => r.value && s.value.length ? (i(), u("div", {
4643
4644
  key: 0,
4644
4645
  class: T(d.value),
4645
4646
  style: be(c.value)
4646
4647
  }, [
4647
- l("h2", Ai, W(j.title), 1),
4648
- l("div", Ti, [
4649
- (i(!0), u(re, null, fe(s.value, (X) => (i(), u("div", {
4650
- key: X.id,
4648
+ l("h2", zi, K(S.title), 1),
4649
+ l("div", Ai, [
4650
+ (i(!0), u(re, null, pe(s.value, (ee) => (i(), u("div", {
4651
+ key: ee.id,
4651
4652
  class: T([
4652
4653
  "vs-compact-form-navigation__item relative",
4653
- X.level === 2 ? "vs-compact-form-navigation__item--nested" : "",
4654
- X.id === n.value ? "vs-compact-form-navigation__item--active" : ""
4654
+ ee.level === 2 ? "vs-compact-form-navigation__item--nested" : "",
4655
+ ee.id === n.value ? "vs-compact-form-navigation__item--active" : ""
4655
4656
  ])
4656
4657
  }, [
4657
4658
  l("button", {
4658
4659
  type: "button",
4659
- onClick: (Z) => Q(X.id),
4660
+ onClick: (Z) => Y(ee.id),
4660
4661
  class: T([
4661
4662
  "vs-compact-form-navigation__button flex gap-x-3 py-[6px] pr-3 text-sm duration-200 hover:text-gray-800",
4662
- X.level === 2 ? "pl-[15px]" : "pl-[18px]",
4663
- X.id === n.value ? "text-gray-800" : "text-gray-500"
4663
+ ee.level === 2 ? "pl-[15px]" : "pl-[18px]",
4664
+ ee.id === n.value ? "text-gray-800" : "text-gray-500"
4664
4665
  ])
4665
4666
  }, [
4666
- l("span", null, W(X.text), 1)
4667
- ], 10, Fi)
4667
+ l("span", null, K(ee.text), 1)
4668
+ ], 10, Ti)
4668
4669
  ], 2))), 128))
4669
4670
  ])
4670
- ], 6)) : U("", !0);
4671
+ ], 6)) : D("", !0);
4671
4672
  }
4672
- }), Ui = /* @__PURE__ */ Y(Oi, [["__scopeId", "data-v-1584a562"]]), Dt = {
4673
+ }), Oi = /* @__PURE__ */ X(Fi, [["__scopeId", "data-v-1584a562"]]), Ut = {
4673
4674
  required: "Це поле є обов’язковим",
4674
4675
  email: "Неправильний email"
4675
- }, Di = (o) => o ? !1 : Dt.required, Ri = (o) => {
4676
+ }, Ui = (o) => o ? !1 : Ut.required, Di = (o) => {
4676
4677
  const e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
4677
- return o ? e.test(o) ? !1 : Dt.email : !1;
4678
- }, Pi = (o, e) => {
4678
+ return o ? e.test(o) ? !1 : Ut.email : !1;
4679
+ }, Ri = (o, e) => {
4679
4680
  const t = e.pattern ?? e.regexp;
4680
4681
  return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
4681
- }, Hi = (o, e) => !1, Ni = (o, e) => {
4682
+ }, Pi = (o, e) => !1, Hi = (o, e) => {
4682
4683
  switch (typeof e == "string" ? e : e.type) {
4683
4684
  case "required":
4684
- return Di(o);
4685
+ return Ui(o);
4685
4686
  case "email":
4686
- return Ri(o);
4687
+ return Di(o);
4687
4688
  case "regexp":
4688
- return Pi(o, e);
4689
+ return Ri(o, e);
4689
4690
  case "custom":
4690
- return Hi();
4691
+ return Pi();
4691
4692
  default:
4692
4693
  return !1;
4693
4694
  }
4694
- }, Gi = {
4695
+ }, Ni = {
4695
4696
  autocomplete: "select",
4696
4697
  combobox: "select",
4697
4698
  datepicker: "date",
@@ -4704,16 +4705,16 @@ const rr = /* @__PURE__ */ Y(nr, [["render", sr]]), ir = { class: "map-search-wi
4704
4705
  dropzone: "file"
4705
4706
  // mask: 'text',
4706
4707
  };
4707
- function St(o) {
4708
+ function Lt(o) {
4708
4709
  const e = o.toLowerCase();
4709
- return Gi[e] || e;
4710
+ return Ni[e] || e;
4710
4711
  }
4711
4712
  function nt(o, e = !1) {
4712
4713
  if (Array.isArray(o)) {
4713
4714
  const s = [];
4714
4715
  return o.forEach((n) => {
4715
4716
  const a = { ...n };
4716
- a.name = (n.name || n.id || n.key || "").toString(), a.type = St(n.type), a.label = n.label || n.ua, a.rules = n.rules || n.validators, a.type === "email" && !a.rules && (a.rules = ["email"]), n.data && (a.api = `/api/suggest/${n.data}`), a.disabled = e || a.disabled, Array.isArray(a.schema) && (a.schema = nt(a.schema, a.disabled)), s.push(a);
4717
+ a.name = (n.name || n.id || n.key || "").toString(), a.type = Lt(n.type), a.label = n.label || n.ua, a.rules = n.rules || n.validators, a.type === "email" && !a.rules && (a.rules = ["email"]), n.data && (a.api = `/api/suggest/${n.data}`), a.disabled = e || a.disabled, Array.isArray(a.schema) && (a.schema = nt(a.schema, a.disabled)), s.push(a);
4717
4718
  }), s;
4718
4719
  }
4719
4720
  const t = [];
@@ -4721,7 +4722,7 @@ function nt(o, e = !1) {
4721
4722
  const n = {
4722
4723
  name: s[0],
4723
4724
  ...s[1],
4724
- type: St(s[1].type),
4725
+ type: Lt(s[1].type),
4725
4726
  label: s[1].label || s[1].ua,
4726
4727
  rules: s[1].rules || s[1].validators,
4727
4728
  disabled: e
@@ -4729,8 +4730,8 @@ function nt(o, e = !1) {
4729
4730
  n.type === "email" && !n.rules && (n.rules = ["email"]), s[1].type.includes("list") && (n.multiple = !0), !n.api && s[1].data && (n.api = `/api/suggest/${s[1].data}`), Array.isArray(n.schema) && (n.schema = nt(n.schema, n.disabled)), t.push(n);
4730
4731
  }), t;
4731
4732
  }
4732
- function qi(o, e, t = !1) {
4733
- const s = S(() => nt(
4733
+ function Gi(o, e, t = !1) {
4734
+ const s = B(() => nt(
4734
4735
  (Array.isArray(e), e),
4735
4736
  typeof t == "boolean" ? t : t.value
4736
4737
  )), n = w({});
@@ -4738,7 +4739,7 @@ function qi(o, e, t = !1) {
4738
4739
  const p = f?.conditions;
4739
4740
  if (!p) return !0;
4740
4741
  const v = Array.isArray(p) ? p[0] : p, k = o?.value?.[v];
4741
- return Ot(k, p);
4742
+ return Ft(k, p);
4742
4743
  }
4743
4744
  const r = (f = s.value, p = !0) => (f.forEach((v) => {
4744
4745
  if (v.rules) {
@@ -4748,12 +4749,12 @@ function qi(o, e, t = !1) {
4748
4749
  }
4749
4750
  let k = !1, m = null;
4750
4751
  v.rules.forEach((I) => {
4751
- const $ = Ni(o.value[v.name], I);
4752
+ const $ = Hi(o.value[v.name], I);
4752
4753
  $ && (k = !0, !m && typeof $ == "string" && (m = $));
4753
4754
  }), k && m ? n.value[v.name] = m : delete n.value[v.name];
4754
4755
  }
4755
4756
  v.schema && r(v.schema, !1);
4756
- }), p && Object.values(n.value).some(Boolean) ? n.value : null), d = S(() => s.value?.filter((f) => f.hidden !== !0 && a(f)));
4757
+ }), p && Object.values(n.value).some(Boolean) ? n.value : null), d = B(() => s.value?.filter((f) => f.hidden !== !0 && a(f)));
4757
4758
  return {
4758
4759
  errors: n,
4759
4760
  validate: r,
@@ -4763,12 +4764,12 @@ function qi(o, e, t = !1) {
4763
4764
  visibleSchema: d
4764
4765
  };
4765
4766
  }
4766
- const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4767
+ const qi = { class: "flex w-full h-full min-h-0 gap-6" }, Ki = {
4767
4768
  key: 0,
4768
4769
  "data-orientation": "horizontal",
4769
4770
  role: "none",
4770
4771
  class: "mt-1 shrink-0 h-[1px] w-full bg-slate-100 dark:bg-slate-600"
4771
- }, Ke = /* @__PURE__ */ G({
4772
+ }, qe = /* @__PURE__ */ G({
4772
4773
  __name: "vs-compact-form",
4773
4774
  props: /* @__PURE__ */ ie({
4774
4775
  schema: { default: () => [] },
@@ -4793,7 +4794,7 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4793
4794
  validate: c,
4794
4795
  reset: f,
4795
4796
  visibleSchema: p
4796
- } = qi(r, n.schema, Jt(n, "disabled")), v = w(null), k = w(null), m = S(() => n.navigation), I = S(() => n.navWidth), $ = S(() => n.style?.columns), A = Object.freeze({ container: 12, label: 3 }), E = S(() => n.columns ?? $.value ?? A), O = S(() => n.columns != null || $.value != null), C = S(() => O.value ? "horizontal" : n.layout), h = (P) => P?.columns ? "horizontal" : C.value, x = (P) => P?.columns ?? E.value, B = () => {
4797
+ } = Gi(r, n.schema, Zt(n, "disabled")), v = w(null), k = w(null), m = B(() => n.navigation), I = B(() => n.navWidth), $ = B(() => n.style?.columns), A = Object.freeze({ container: 12, label: 3 }), E = B(() => n.columns ?? $.value ?? A), O = B(() => n.columns != null || $.value != null), C = B(() => O.value ? "horizontal" : n.layout), h = (P) => P?.columns ? "horizontal" : C.value, x = (P) => P?.columns ?? E.value, j = () => {
4797
4798
  s("update:modelValue", r.value), c(), s("handle-submit", r.value);
4798
4799
  };
4799
4800
  e({
@@ -4809,13 +4810,13 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4809
4810
  formId: n.formId
4810
4811
  };
4811
4812
  });
4812
- function V(P, ee) {
4813
- if (P === ee) return !0;
4814
- if (typeof P != "object" || typeof ee != "object" || !P || !ee) return !1;
4815
- const Q = Object.keys(P), j = Object.keys(ee);
4816
- return Q.length !== j.length ? !1 : Q.every((q) => P[q] === ee[q]);
4813
+ function M(P, te) {
4814
+ if (P === te) return !0;
4815
+ if (typeof P != "object" || typeof te != "object" || !P || !te) return !1;
4816
+ const Y = Object.keys(P), S = Object.keys(te);
4817
+ return Y.length !== S.length ? !1 : Y.every((W) => P[W] === te[W]);
4817
4818
  }
4818
- return wt("form", a), wt("values", r), (P, ee) => (i(), u("div", Ki, [
4819
+ return xt("form", a), xt("values", r), (P, te) => (i(), u("div", qi, [
4819
4820
  l("div", {
4820
4821
  class: "flex-1 min-h-0 overflow-y-auto overflow-x-visible",
4821
4822
  ref_key: "formScrollContainer",
@@ -4824,30 +4825,30 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4824
4825
  l("form", {
4825
4826
  ref_key: "formRef",
4826
4827
  ref: v,
4827
- onSubmit: $e(B, ["prevent"]),
4828
+ onSubmit: $e(j, ["prevent"]),
4828
4829
  class: T(["grid grid-cols-12 p-1", C.value === "default" ? "gap-6" : "gap-4"])
4829
4830
  }, [
4830
- (i(!0), u(re, null, fe(te(p), (Q, j) => (i(), u("div", {
4831
- key: Q.name,
4832
- class: T(h(Q) === "horizontal" ? "col-span-12" : `col-span-${Q.col || 12}`)
4831
+ (i(!0), u(re, null, pe(le(p), (Y, S) => (i(), u("div", {
4832
+ key: Y.name,
4833
+ class: T(h(Y) === "horizontal" ? "col-span-12" : `col-span-${Y.col || 12}`)
4833
4834
  }, [
4834
- R(Ut, {
4835
+ R(Ot, {
4835
4836
  style: be(P.style),
4836
- item: Q,
4837
- layout: h(Q),
4838
- columns: x(Q),
4839
- "model-value": r.value[Q.name],
4840
- "onUpdate:modelValue": (q) => {
4841
- const X = r.value[Q.name];
4842
- V(X, q) || (r.value[Q.name] = q);
4837
+ item: Y,
4838
+ layout: h(Y),
4839
+ columns: x(Y),
4840
+ "model-value": r.value[Y.name],
4841
+ "onUpdate:modelValue": (W) => {
4842
+ const ee = r.value[Y.name];
4843
+ M(ee, W) || (r.value[Y.name] = W);
4843
4844
  },
4844
- error: te(d)[Q.name]
4845
+ error: le(d)[Y.name]
4845
4846
  }, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
4846
- h(Q) === "settings" && j + 1 !== te(p).length ? (i(), u("div", Wi)) : U("", !0)
4847
+ h(Y) === "settings" && S + 1 !== le(p).length ? (i(), u("div", Ki)) : D("", !0)
4847
4848
  ], 2))), 128))
4848
4849
  ], 34)
4849
4850
  ], 512),
4850
- R(Ui, {
4851
+ R(Oi, {
4851
4852
  target: v.value,
4852
4853
  "scroll-container": k.value,
4853
4854
  enabled: m.value,
@@ -4855,7 +4856,7 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4855
4856
  }, null, 8, ["target", "scroll-container", "enabled", "width"])
4856
4857
  ]));
4857
4858
  }
4858
- }), Zi = { class: "relative" }, Ji = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, Yi = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Xi = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Qi = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, eu = { class: "p-4 mim-h-0 h-full overflow-auto" }, tu = /* @__PURE__ */ G({
4859
+ }), Wi = { class: "relative" }, Zi = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, Ji = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Yi = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Xi = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Qi = { class: "p-4 mim-h-0 h-full overflow-auto" }, eu = /* @__PURE__ */ G({
4859
4860
  __name: "modal-edit",
4860
4861
  props: {
4861
4862
  schema: {},
@@ -4951,11 +4952,11 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4951
4952
  message: v.message || "Unexpected error"
4952
4953
  }), console.error(v);
4953
4954
  }
4954
- }), (v, k) => (i(), u("div", Zi, [
4955
- l("div", Ji, [
4956
- l("div", Yi, [
4957
- l("div", Xi, [
4958
- l("h3", Qi, W(c.value === "add" ? "Додати" : "Змінити"), 1),
4955
+ }), (v, k) => (i(), u("div", Wi, [
4956
+ l("div", Zi, [
4957
+ l("div", Ji, [
4958
+ l("div", Yi, [
4959
+ l("h3", Xi, K(c.value === "add" ? "Додати" : "Змінити"), 1),
4959
4960
  l("button", {
4960
4961
  onClick: p,
4961
4962
  type: "button",
@@ -4979,15 +4980,15 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
4979
4980
  ], -1)
4980
4981
  ]))
4981
4982
  ]),
4982
- l("div", eu, [
4983
- n.value ? (i(), me(Ke, {
4983
+ l("div", Qi, [
4984
+ n.value ? (i(), ve(qe, {
4984
4985
  key: 0,
4985
4986
  schema: n.value,
4986
4987
  values: a.value,
4987
4988
  "onUpdate:values": k[0] || (k[0] = (m) => a.value = m),
4988
4989
  form: r.value,
4989
4990
  "onUpdate:form": k[1] || (k[1] = (m) => r.value = m)
4990
- }, null, 8, ["schema", "values", "form"])) : U("", !0)
4991
+ }, null, 8, ["schema", "values", "form"])) : D("", !0)
4991
4992
  ]),
4992
4993
  l("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
4993
4994
  l("button", {
@@ -5005,14 +5006,14 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
5005
5006
  ])
5006
5007
  ]));
5007
5008
  }
5008
- }), Bt = (o = { mode: "edit", schema: null }) => new Promise((e) => {
5009
- const { close: t } = Yt({
5009
+ }), St = (o = { mode: "edit", schema: null }) => new Promise((e) => {
5010
+ const { close: t } = Jt({
5010
5011
  title: o.mode === "add" ? "Додати" : "Редагувати",
5011
5012
  template: "",
5012
5013
  visible: !0,
5013
5014
  size: "medium",
5014
5015
  closeClickBack: !0,
5015
- content: tu,
5016
+ content: eu,
5016
5017
  contentProps: {
5017
5018
  ...o,
5018
5019
  onClose: () => {
@@ -5024,37 +5025,37 @@ const Ki = { class: "flex w-full h-full min-h-0 gap-6" }, Wi = {
5024
5025
  }
5025
5026
  });
5026
5027
  });
5027
- Ke.install = function(e) {
5028
- e.component("VForm", Ke), Object.assign(e.config.globalProperties, {
5029
- $form: Bt
5030
- }), e.provide("form", Bt), window.v3plugin || (window.v3plugin = {});
5028
+ qe.install = function(e) {
5029
+ e.component("VForm", qe), Object.assign(e.config.globalProperties, {
5030
+ $form: St
5031
+ }), e.provide("form", St), window.v3plugin || (window.v3plugin = {});
5031
5032
  };
5032
5033
  export {
5033
- tu as ModalEdit,
5034
- Ke as VForm,
5035
- Bi as VsInputArray,
5036
- xo as VsInputCheckbox,
5037
- ci as VsInputCodegen,
5038
- Ci as VsInputColor,
5039
- ca as VsInputContainer,
5040
- ko as VsInputDate,
5041
- ro as VsInputEmail,
5042
- dn as VsInputFile,
5043
- Dn as VsInputFileList,
5044
- ki as VsInputKeyValue,
5045
- no as VsInputMask,
5046
- $l as VsInputNumber,
5047
- _t as VsInputRadio,
5048
- Li as VsInputRange,
5049
- Mt as VsInputSelect,
5050
- ni as VsInputSlug,
5051
- kt as VsInputStatic,
5052
- At as VsInputSwitcher,
5053
- ei as VsInputTag,
5054
- Xe as VsInputText,
5055
- Ia as VsInputTextarea,
5056
- Ke as default,
5057
- ji as inputs,
5058
- Us as vsInputDatatable,
5059
- Nr as vsInputMap
5034
+ eu as ModalEdit,
5035
+ qe as VForm,
5036
+ Si as VsInputArray,
5037
+ yo as VsInputCheckbox,
5038
+ di as VsInputCodegen,
5039
+ $i as VsInputColor,
5040
+ da as VsInputContainer,
5041
+ wo as VsInputDate,
5042
+ so as VsInputEmail,
5043
+ un as VsInputFile,
5044
+ Un as VsInputFileList,
5045
+ wi as VsInputKeyValue,
5046
+ oo as VsInputMask,
5047
+ _l as VsInputNumber,
5048
+ kt as VsInputRadio,
5049
+ Mi as VsInputRange,
5050
+ Vt as VsInputSelect,
5051
+ oi as VsInputSlug,
5052
+ wt as VsInputStatic,
5053
+ zt as VsInputSwitcher,
5054
+ Qr as VsInputTag,
5055
+ Ye as VsInputText,
5056
+ ja as VsInputTextarea,
5057
+ qe as default,
5058
+ Bi as inputs,
5059
+ Os as vsInputDatatable,
5060
+ Hr as vsInputMap
5060
5061
  };