@opengis/form 0.0.16 → 0.0.18

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,4 +1,4 @@
1
- import { defineComponent as I, createElementBlock as u, openBlock as i, createCommentVNode as j, renderSlot as ve, createElementVNode as t, toDisplayString as E, normalizeProps as Ee, guardReactiveProps as Fe, createTextVNode as oe, computed as F, mergeModels as q, useModel as G, withDirectives as K, normalizeClass as B, unref as H, vModelText as ne, vModelCheckbox as Qe, createVNode as A, ref as $, createBlock as X, resolveDynamicComponent as xe, normalizeStyle as fe, withCtx as Me, withModifiers as ae, onMounted as ue, onBeforeUnmount as ut, watch as se, createStaticVNode as re, vModelRadio as Xe, Fragment as Q, renderList as Y, mergeProps as Ce, reactive as dt, vShow as De, inject as Se, resolveComponent as Pe, Transition as Ye, createApp as ct, h as pt, onUnmounted as et, nextTick as $e, Teleport as ft, provide as Ne } from "vue";
1
+ import { defineComponent as A, createElementBlock as u, openBlock as i, createCommentVNode as S, renderSlot as ve, createElementVNode as t, toDisplayString as E, normalizeProps as Ee, guardReactiveProps as Fe, createTextVNode as oe, computed as D, mergeModels as q, useModel as G, withDirectives as K, normalizeClass as B, unref as H, vModelText as ne, vModelCheckbox as Qe, createVNode as j, ref as $, createBlock as X, resolveDynamicComponent as xe, normalizeStyle as fe, withCtx as Me, withModifiers as re, onMounted as ue, onBeforeUnmount as ut, watch as se, createStaticVNode as ae, vModelRadio as Xe, Fragment as Q, renderList as Y, mergeProps as Ce, reactive as dt, vShow as De, inject as Se, resolveComponent as Pe, Transition as Ye, createApp as ct, h as pt, onUnmounted as et, nextTick as $e, Teleport as ft, provide as Ne } from "vue";
2
2
  import { notify as pe } from "@opengis/core";
3
3
  const vt = { class: "w-full relative" }, mt = {
4
4
  key: 0,
@@ -9,7 +9,7 @@ const vt = { class: "w-full relative" }, mt = {
9
9
  }, gt = {
10
10
  key: 1,
11
11
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
12
- }, bt = /* @__PURE__ */ I({
12
+ }, bt = /* @__PURE__ */ A({
13
13
  __name: "vs-layout-default",
14
14
  props: {
15
15
  ua: { default: "" },
@@ -21,10 +21,10 @@ const vt = { class: "w-full relative" }, mt = {
21
21
  return (e, l) => (i(), u("div", vt, [
22
22
  e.ua || e.label ? (i(), u("div", mt, [
23
23
  t("span", null, E(e.ua || e.label), 1),
24
- e.item?.rules?.includes("required") ? (i(), u("span", ht, "*")) : j("", !0)
25
- ])) : j("", !0),
24
+ e.item?.rules?.includes("required") ? (i(), u("span", ht, "*")) : S("", !0)
25
+ ])) : S("", !0),
26
26
  ve(e.$slots, "default", Ee(Fe(e.$attrs))),
27
- e.error ? (i(), u("span", gt, E(e.error), 1)) : j("", !0)
27
+ e.error ? (i(), u("span", gt, E(e.error), 1)) : S("", !0)
28
28
  ]));
29
29
  }
30
30
  }), yt = { class: "w-full relative flex flex-row items-center gap-2" }, xt = {
@@ -36,7 +36,7 @@ const vt = { class: "w-full relative" }, mt = {
36
36
  }, kt = {
37
37
  key: 1,
38
38
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
39
- }, _t = /* @__PURE__ */ I({
39
+ }, _t = /* @__PURE__ */ A({
40
40
  __name: "vs-layout-horizontal",
41
41
  props: {
42
42
  ua: { default: "" },
@@ -48,16 +48,16 @@ const vt = { class: "w-full relative" }, mt = {
48
48
  return (e, l) => (i(), u("div", yt, [
49
49
  e.item?.type !== "html" ? (i(), u("span", xt, [
50
50
  oe(E(e.ua || e.label) + " ", 1),
51
- e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), u("span", wt, "*")) : j("", !0)
52
- ])) : j("", !0),
51
+ e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), u("span", wt, "*")) : S("", !0)
52
+ ])) : S("", !0),
53
53
  ve(e.$slots, "default", Ee(Fe(e.$attrs))),
54
- e.error ? (i(), u("span", kt, E(e.error), 1)) : j("", !0)
54
+ e.error ? (i(), u("span", kt, E(e.error), 1)) : S("", !0)
55
55
  ]));
56
56
  }
57
57
  }), $t = { class: "w-full relative" }, Ct = {
58
58
  key: 0,
59
59
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
60
- }, Vt = /* @__PURE__ */ I({
60
+ }, Vt = /* @__PURE__ */ A({
61
61
  __name: "vs-layout-inline",
62
62
  props: {
63
63
  ua: { default: "" },
@@ -68,7 +68,7 @@ const vt = { class: "w-full relative" }, mt = {
68
68
  setup(o) {
69
69
  return (e, l) => (i(), u("div", $t, [
70
70
  ve(e.$slots, "default", Ee(Fe(e.$attrs))),
71
- e.error ? (i(), u("span", Ct, E(e.error), 1)) : j("", !0)
71
+ e.error ? (i(), u("span", Ct, E(e.error), 1)) : S("", !0)
72
72
  ]));
73
73
  }
74
74
  }), Mt = {
@@ -78,13 +78,13 @@ const vt = { class: "w-full relative" }, mt = {
78
78
  };
79
79
  function me(o) {
80
80
  return {
81
- inputClass: F(() => {
81
+ inputClass: D(() => {
82
82
  const l = `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 `;
83
83
  return o?.size === "sm" ? `${l}h-[32px]` : `${l}h-[38px]`;
84
84
  })
85
85
  };
86
86
  }
87
- const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
87
+ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
88
88
  __name: "vs-input-text",
89
89
  props: /* @__PURE__ */ q({
90
90
  style: { default: () => ({}) },
@@ -101,12 +101,12 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
101
101
  emits: ["update:modelValue"],
102
102
  setup(o) {
103
103
  const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
104
- return (a, r) => K((i(), u("input", {
104
+ return (r, a) => K((i(), u("input", {
105
105
  type: "text",
106
- "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
107
- placeholder: a.placeholder,
108
- disabled: a.disabled,
109
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": a.error }]]),
106
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
107
+ placeholder: r.placeholder,
108
+ disabled: r.disabled,
109
+ class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": r.error }]]),
110
110
  style: {
111
111
  border: "1px solid #CFD9E0"
112
112
  }
@@ -114,7 +114,7 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
114
114
  [ne, n.value]
115
115
  ]);
116
116
  }
117
- }), Bt = ["placeholder"], St = /* @__PURE__ */ I({
117
+ }), Bt = ["placeholder"], St = /* @__PURE__ */ A({
118
118
  __name: "vs-input-number",
119
119
  props: /* @__PURE__ */ q({
120
120
  style: { default: () => ({}) },
@@ -131,11 +131,11 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
131
131
  emits: ["update:modelValue"],
132
132
  setup(o) {
133
133
  const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
134
- return (a, r) => K((i(), u("input", {
134
+ return (r, a) => K((i(), u("input", {
135
135
  type: "number",
136
136
  step: "any",
137
- "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
138
- placeholder: a.placeholder,
137
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
138
+ placeholder: r.placeholder,
139
139
  class: B(["py-1.5 px-3 block w-full", [H(l)]]),
140
140
  style: {
141
141
  border: "1px solid #CFD9E0"
@@ -146,10 +146,10 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
146
146
  }
147
147
  }), R = (o, e) => {
148
148
  const l = o.__vccOpts || o;
149
- for (const [n, a] of e)
150
- l[n] = a;
149
+ for (const [n, r] of e)
150
+ l[n] = r;
151
151
  return l;
152
- }, jt = {}, At = {
152
+ }, jt = {}, It = {
153
153
  xmlns: "http://www.w3.org/2000/svg",
154
154
  viewBox: "0 0 24 24",
155
155
  fill: "none",
@@ -159,8 +159,8 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
159
159
  "stroke-linejoin": "round",
160
160
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
161
161
  };
162
- function It(o, e) {
163
- return i(), u("svg", At, e[0] || (e[0] = [
162
+ function At(o, e) {
163
+ return i(), u("svg", It, e[0] || (e[0] = [
164
164
  t("path", {
165
165
  stroke: "none",
166
166
  d: "M0 0h24v24H0z",
@@ -169,7 +169,7 @@ function It(o, e) {
169
169
  t("path", { d: "M5 12l5 5l10 -10" }, null, -1)
170
170
  ]));
171
171
  }
172
- const zt = /* @__PURE__ */ R(jt, [["render", It]]), Ot = { class: "flex items-center gap-[4px]" }, Et = ["value", "id", "disabled"], Ft = ["for"], Dt = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Ut = /* @__PURE__ */ I({
172
+ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-center gap-[4px]" }, Et = ["value", "id", "disabled"], Ft = ["for"], Dt = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Ut = /* @__PURE__ */ A({
173
173
  __name: "vs-checkbox-default",
174
174
  props: {
175
175
  value: { default: "" },
@@ -182,45 +182,45 @@ const zt = /* @__PURE__ */ R(jt, [["render", It]]), Ot = { class: "flex items-ce
182
182
  },
183
183
  emits: ["update:modelValue"],
184
184
  setup(o, { emit: e }) {
185
- const l = e, n = o, a = F({
185
+ const l = e, n = o, r = D({
186
186
  get: () => n.modelValue,
187
- set: (r) => l("update:modelValue", r)
187
+ set: (a) => l("update:modelValue", a)
188
188
  });
189
- return (r, s) => (i(), u("div", Ot, [
189
+ return (a, s) => (i(), u("div", Ot, [
190
190
  K(t("input", {
191
191
  type: "checkbox",
192
- value: r.value,
193
- "onUpdate:modelValue": s[0] || (s[0] = (d) => a.value = d),
194
- class: B(["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": r.disabled }]),
195
- id: r.id,
196
- disabled: r.disabled
192
+ value: a.value,
193
+ "onUpdate:modelValue": s[0] || (s[0] = (d) => r.value = d),
194
+ class: B(["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 }]),
195
+ id: a.id,
196
+ disabled: a.disabled
197
197
  }, null, 10, Et), [
198
- [Qe, a.value]
198
+ [Qe, r.value]
199
199
  ]),
200
200
  t("label", {
201
- for: r.id,
202
- class: B(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": r.disabled }])
201
+ for: a.id,
202
+ class: B(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": a.disabled }])
203
203
  }, [
204
204
  t("div", {
205
- class: B(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [a.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", r.error ? "border-red-600" : ""]])
205
+ class: B(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [r.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
206
206
  }, [
207
- A(zt, {
207
+ j(zt, {
208
208
  height: "12",
209
209
  width: "12"
210
210
  })
211
211
  ], 2),
212
212
  t("span", Dt, [
213
- ve(r.$slots, "default", {}, () => [
214
- oe(E(r.label), 1)
213
+ ve(a.$slots, "default", {}, () => [
214
+ oe(E(a.label), 1)
215
215
  ])
216
216
  ])
217
217
  ], 10, Ft)
218
218
  ]));
219
219
  }
220
- }), Rt = ["name", "value", "disabled"], Tt = { class: "flex items-center gap-[6px] text-[14px]" }, Pt = {
220
+ }), Tt = ["name", "value", "disabled"], Rt = { class: "flex items-center gap-[6px] text-[14px]" }, Pt = {
221
221
  key: 0,
222
222
  class: "text-[16px]"
223
- }, Nt = ["src"], Ht = /* @__PURE__ */ I({
223
+ }, Nt = ["src"], Ht = /* @__PURE__ */ A({
224
224
  __name: "vs-checkbox-buttons",
225
225
  props: {
226
226
  value: { type: [String, Number, Boolean], default: "" },
@@ -234,46 +234,46 @@ const zt = /* @__PURE__ */ R(jt, [["render", It]]), Ot = { class: "flex items-ce
234
234
  },
235
235
  emits: ["update:modelValue"],
236
236
  setup(o, { emit: e }) {
237
- const l = o, n = e, a = F({
237
+ const l = o, n = e, r = D({
238
238
  get: () => l.modelValue,
239
239
  set: (d) => {
240
240
  n("update:modelValue", d);
241
241
  }
242
- }), r = F(() => Array.isArray(a.value) ? a.value.includes(l.value) : a.value === !0 || a.value === l.value), s = F(() => l.style?.size === "xs" ? "p-1.5 text-xs" : l.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
242
+ }), a = D(() => Array.isArray(r.value) ? r.value.includes(l.value) : r.value === !0 || r.value === l.value), s = D(() => l.style?.size === "xs" ? "p-1.5 text-xs" : l.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
243
243
  return (d, p) => (i(), u("label", {
244
- class: B(["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", [s.value, r.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
244
+ class: B(["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", [s.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
245
245
  }, [
246
246
  K(t("input", {
247
247
  type: "checkbox",
248
248
  class: "hidden",
249
249
  name: d.id,
250
250
  value: d.value,
251
- "onUpdate:modelValue": p[0] || (p[0] = (v) => a.value = v),
251
+ "onUpdate:modelValue": p[0] || (p[0] = (f) => r.value = f),
252
252
  disabled: d.disabled
253
- }, null, 8, Rt), [
254
- [Qe, a.value]
253
+ }, null, 8, Tt), [
254
+ [Qe, r.value]
255
255
  ]),
256
- t("span", Tt, [
256
+ t("span", Rt, [
257
257
  d.icon || d.imgUrl ? (i(), u("span", Pt, [
258
258
  d.icon ? (i(), u("i", {
259
259
  key: 0,
260
260
  class: B(d.icon)
261
- }, null, 2)) : j("", !0),
261
+ }, null, 2)) : S("", !0),
262
262
  d.imgUrl ? (i(), u("img", {
263
263
  key: 1,
264
264
  src: d.imgUrl,
265
265
  width: "16",
266
266
  height: "16",
267
267
  alt: "icon"
268
- }, null, 8, Nt)) : j("", !0)
269
- ])) : j("", !0),
268
+ }, null, 8, Nt)) : S("", !0)
269
+ ])) : S("", !0),
270
270
  ve(d.$slots, "default", {}, () => [
271
271
  oe(E(d.label), 1)
272
272
  ])
273
273
  ])
274
274
  ], 2));
275
275
  }
276
- }), qt = { class: "flex items-center" }, tt = /* @__PURE__ */ I({
276
+ }), qt = { class: "flex items-center" }, tt = /* @__PURE__ */ A({
277
277
  __name: "vs-input-checkbox-item",
278
278
  props: {
279
279
  value: { default: "" },
@@ -290,12 +290,12 @@ const zt = /* @__PURE__ */ R(jt, [["render", It]]), Ot = { class: "flex items-ce
290
290
  },
291
291
  emits: ["update:modelValue"],
292
292
  setup(o, { emit: e }) {
293
- const l = o, n = e, a = `radio-${Math.floor(Math.random() * 1e4)}`, r = F({
293
+ const l = o, n = e, r = `radio-${Math.floor(Math.random() * 1e4)}`, a = D({
294
294
  get: () => Array.isArray(l.modelValue) ? Array.isArray(l.modelValue) && l.modelValue.includes(l.value) : l.modelValue,
295
295
  set: (d) => {
296
296
  if (Array.isArray(l.modelValue)) {
297
297
  let p = [...l.modelValue];
298
- d ? p.includes(l.value) || p.push(l.value) : p = p.filter((v) => v !== l.value), n("update:modelValue", p);
298
+ d ? p.includes(l.value) || p.push(l.value) : p = p.filter((f) => f !== l.value), n("update:modelValue", p);
299
299
  } else
300
300
  n("update:modelValue", d);
301
301
  }
@@ -306,9 +306,9 @@ const zt = /* @__PURE__ */ R(jt, [["render", It]]), Ot = { class: "flex items-ce
306
306
  label: d.label,
307
307
  info: d.option?.info,
308
308
  disabled: d.disabled,
309
- modelValue: r.value,
310
- "onUpdate:modelValue": p[0] || (p[0] = (v) => r.value = v),
311
- id: a,
309
+ modelValue: a.value,
310
+ "onUpdate:modelValue": p[0] || (p[0] = (f) => a.value = f),
311
+ id: r,
312
312
  icon: d.icon,
313
313
  imgUrl: d.imgUrl,
314
314
  style: fe(d.style),
@@ -370,7 +370,7 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
370
370
  }, tl = {
371
371
  key: 0,
372
372
  class: "text-red-500 text-[14px]"
373
- }, ll = ["title"], ol = ["disabled"], lt = /* @__PURE__ */ I({
373
+ }, ll = ["title"], ol = ["disabled"], lt = /* @__PURE__ */ A({
374
374
  __name: "vs-input-switcher",
375
375
  props: /* @__PURE__ */ q({
376
376
  rules: { default: () => [] },
@@ -392,29 +392,29 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
392
392
  emits: ["update:modelValue"],
393
393
  setup(o) {
394
394
  const e = o, l = G(o, "modelValue");
395
- return (n, a) => e.view === "checkbox" ? (i(), u("div", el, [
396
- A(tt, {
395
+ return (n, r) => e.view === "checkbox" ? (i(), u("div", el, [
396
+ j(tt, {
397
397
  modelValue: l.value,
398
- "onUpdate:modelValue": a[0] || (a[0] = (r) => l.value = r),
398
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
399
399
  label: n.text,
400
400
  error: n.error || ""
401
401
  }, null, 8, ["modelValue", "label", "error"]),
402
- n.rules?.includes("required") ? (i(), u("span", tl, "*")) : j("", !0),
402
+ n.rules?.includes("required") ? (i(), u("span", tl, "*")) : S("", !0),
403
403
  n.i ? (i(), u("button", {
404
404
  key: 1,
405
405
  class: "cursor-pointer",
406
406
  title: n.i,
407
- onClick: a[1] || (a[1] = ae(() => {
407
+ onClick: r[1] || (r[1] = re(() => {
408
408
  }, ["prevent"]))
409
409
  }, [
410
- A(H(Yt), { class: "text-gray-500 w-[14px] h-[14px]" })
411
- ], 8, ll)) : j("", !0)
410
+ j(H(Yt), { class: "text-gray-500 w-[14px] h-[14px]" })
411
+ ], 8, ll)) : S("", !0)
412
412
  ])) : (i(), u("button", {
413
413
  key: 1,
414
414
  type: "button",
415
415
  class: B(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [l.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
416
416
  disabled: n.disabled,
417
- onClick: a[2] || (a[2] = (r) => l.value = !l.value)
417
+ onClick: r[2] || (r[2] = (a) => l.value = !l.value)
418
418
  }, [
419
419
  t("span", {
420
420
  "data-state": "checked",
@@ -422,7 +422,7 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
422
422
  }, null, 2)
423
423
  ], 10, ol));
424
424
  }
425
- }), rl = ["innerHTML"], qe = /* @__PURE__ */ I({
425
+ }), al = ["innerHTML"], qe = /* @__PURE__ */ A({
426
426
  __name: "vs-input-static",
427
427
  props: {
428
428
  text: { default: "" },
@@ -439,9 +439,9 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
439
439
  return (e, l) => (i(), u("div", {
440
440
  class: B(e.customClass),
441
441
  innerHTML: e.html ? e.html : e.text
442
- }, null, 10, rl));
442
+ }, null, 10, al));
443
443
  }
444
- }), al = ["placeholder", "disabled", "name"], sl = /* @__PURE__ */ I({
444
+ }), rl = ["placeholder", "disabled", "name"], sl = /* @__PURE__ */ A({
445
445
  __name: "vs-input-mask",
446
446
  props: /* @__PURE__ */ q({
447
447
  name: {},
@@ -459,12 +459,12 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
459
459
  }),
460
460
  emits: ["update:modelValue"],
461
461
  setup(o) {
462
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue"), a = $(null);
463
- let r = null;
462
+ const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue"), r = $(null);
463
+ let a = null;
464
464
  return ue(async () => {
465
- if (a.value) {
465
+ if (r.value) {
466
466
  const { default: s } = await import("./index-W-qQIppj.js");
467
- r = s(a.value, {
467
+ a = s(r.value, {
468
468
  mask: e.mask || "",
469
469
  definitions: {
470
470
  9: /[0-9]/,
@@ -473,16 +473,16 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
473
473
  },
474
474
  lazy: !1,
475
475
  placeholderChar: e.placeholder
476
- }), r.on("accept", () => {
477
- n.value = e.unmask ? r.unmaskedValue : r.value;
478
- }), r.on("complete", () => {
479
- n.value = e.unmask ? r.unmaskedValue : r.value;
480
- }), r.value = n.value ?? "";
476
+ }), a.on("accept", () => {
477
+ n.value = e.unmask ? a.unmaskedValue : a.value;
478
+ }), a.on("complete", () => {
479
+ n.value = e.unmask ? a.unmaskedValue : a.value;
480
+ }), a.value = n.value ?? "";
481
481
  }
482
482
  }), ut(() => {
483
- r?.destroy();
483
+ a?.destroy();
484
484
  }), se(() => e.mask, (s) => {
485
- r && r.updateOptions({
485
+ a && a.updateOptions({
486
486
  mask: s,
487
487
  definitions: {
488
488
  9: /[0-9]/,
@@ -491,11 +491,11 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
491
491
  }
492
492
  });
493
493
  }), se(n, (s) => {
494
- r && r.unmaskedValue !== s && (r.value = s || "");
494
+ a && a.unmaskedValue !== s && (a.value = s || "");
495
495
  }), (s, d) => (i(), u("input", {
496
496
  type: "text",
497
497
  ref_key: "inputEl",
498
- ref: a,
498
+ ref: r,
499
499
  placeholder: s.placeholder,
500
500
  disabled: s.disabled,
501
501
  name: s.name,
@@ -503,9 +503,9 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
503
503
  style: {
504
504
  border: "1px solid #CFD9E0"
505
505
  }
506
- }, null, 10, al));
506
+ }, null, 10, rl));
507
507
  }
508
- }), nl = { class: "relative w-full bg-white rounded-lg" }, il = ["placeholder", "disabled"], ul = /* @__PURE__ */ I({
508
+ }), nl = { class: "relative w-full bg-white rounded-lg" }, il = ["placeholder", "disabled"], ul = /* @__PURE__ */ A({
509
509
  __name: "vs-input-email",
510
510
  props: /* @__PURE__ */ q({
511
511
  style: { default: () => ({}) },
@@ -522,14 +522,14 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
522
522
  emits: ["update:modelValue"],
523
523
  setup(o) {
524
524
  const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
525
- return (a, r) => (i(), u("div", nl, [
526
- r[1] || (r[1] = re('<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)),
525
+ return (r, a) => (i(), u("div", nl, [
526
+ a[1] || (a[1] = ae('<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)),
527
527
  K(t("input", {
528
528
  type: "email",
529
- "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
530
- placeholder: a.placeholder,
531
- disabled: a.disabled,
532
- class: B(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": a.error }]]),
529
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
530
+ placeholder: r.placeholder,
531
+ disabled: r.disabled,
532
+ class: B(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": r.error }]]),
533
533
  style: {
534
534
  border: "1px solid #CFD9E0"
535
535
  }
@@ -538,7 +538,7 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
538
538
  ])
539
539
  ]));
540
540
  }
541
- }), dl = ["value", "disabled"], cl = { class: "text-[13px] text-gray-700" }, pl = /* @__PURE__ */ I({
541
+ }), dl = ["value", "disabled"], cl = { class: "text-[13px] text-gray-700" }, pl = /* @__PURE__ */ A({
542
542
  __name: "vs-input-radio-default",
543
543
  props: /* @__PURE__ */ q({
544
544
  style: {},
@@ -561,7 +561,7 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
561
561
  class: B(["flex items-center gap-0", [l.customClass]])
562
562
  }, [
563
563
  K(t("input", {
564
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.value = a),
564
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
565
565
  type: "radio",
566
566
  value: l.value,
567
567
  disabled: l.disabled,
@@ -578,12 +578,12 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
578
578
  e.value == l.value ? (i(), u("span", {
579
579
  key: 0,
580
580
  class: B(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${l.style?.primaryColor || "blue"}-500`]])
581
- }, null, 2)) : j("", !0)
581
+ }, null, 2)) : S("", !0)
582
582
  ], 2),
583
583
  t("span", cl, E(l.text), 1)
584
584
  ], 2));
585
585
  }
586
- }), fl = ["value", "disabled"], vl = { class: "text-[13px] text-gray-700" }, ml = /* @__PURE__ */ I({
586
+ }), fl = ["value", "disabled"], vl = { class: "text-[13px] text-gray-700" }, ml = /* @__PURE__ */ A({
587
587
  __name: "vs-input-radio-buttons",
588
588
  props: /* @__PURE__ */ q({
589
589
  style: {},
@@ -609,7 +609,7 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
609
609
  ]])
610
610
  }, [
611
611
  K(t("input", {
612
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.value = a),
612
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
613
613
  type: "radio",
614
614
  value: l.value,
615
615
  disabled: l.disabled,
@@ -623,7 +623,7 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
623
623
  }), hl = {
624
624
  "vs-input-radio-default": pl,
625
625
  "vs-input-radio-buttons": ml
626
- }, Ge = /* @__PURE__ */ I({
626
+ }, Ge = /* @__PURE__ */ A({
627
627
  __name: "vs-input-radio",
628
628
  props: /* @__PURE__ */ q({
629
629
  options: {},
@@ -642,21 +642,21 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
642
642
  }),
643
643
  emits: ["update:modelValue"],
644
644
  setup(o) {
645
- const e = o, l = G(o, "modelValue"), n = F(() => hl[`vs-input-radio-${e.view}`]);
646
- return (a, r) => (i(), u("div", {
647
- class: B([a.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
645
+ const e = o, l = G(o, "modelValue"), n = D(() => hl[`vs-input-radio-${e.view}`]);
646
+ return (r, a) => (i(), u("div", {
647
+ class: B([r.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
648
648
  }, [
649
- (i(!0), u(Q, null, Y(a.options, (s) => (i(), X(xe(n.value), Ce({
649
+ (i(!0), u(Q, null, Y(r.options, (s) => (i(), X(xe(n.value), Ce({
650
650
  key: s?.id,
651
651
  text: s.text,
652
652
  value: s.id.toString(),
653
653
  checked: l.value === s.id,
654
654
  modelValue: l.value,
655
- "onUpdate:modelValue": r[0] || (r[0] = (d) => l.value = d)
656
- }, { ref_for: !0 }, a.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
655
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => l.value = d)
656
+ }, { ref_for: !0 }, r.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
657
657
  ], 2));
658
658
  }
659
- }), gl = /* @__PURE__ */ I({
659
+ }), gl = /* @__PURE__ */ A({
660
660
  __name: "vs-input-checkbox",
661
661
  props: {
662
662
  options: { default: () => [] },
@@ -675,10 +675,10 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
675
675
  },
676
676
  emits: ["update:modelValue"],
677
677
  setup(o, { emit: e }) {
678
- const l = o, n = e, a = $([]), r = dt({}), s = (c) => c?.value || c?.id || c?.text || c, d = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, v = async () => {
678
+ const l = o, n = e, r = $([]), a = dt({}), s = (c) => c?.value || c?.id || c?.text || c, d = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, f = async () => {
679
679
  try {
680
680
  const c = await fetch(`/api/suggest/${l.data}`).then((g) => g.json());
681
- a.value = c?.data || c;
681
+ r.value = c?.data || c;
682
682
  } catch (c) {
683
683
  console.error(c);
684
684
  }
@@ -686,78 +686,78 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
686
686
  return se(
687
687
  () => l.modelValue,
688
688
  (c) => {
689
- if (typeof c == "boolean" && a.value.length === 1) {
690
- const g = s(a.value[0]);
691
- r[g] = c;
689
+ if (typeof c == "boolean" && r.value.length === 1) {
690
+ const g = s(r.value[0]);
691
+ a[g] = c;
692
692
  } else if (Array.isArray(c)) {
693
693
  const g = new Set(c);
694
- a.value.forEach((f) => {
695
- if (!f.disabled) {
696
- const M = s(f);
697
- r[M] = g.has(M);
694
+ r.value.forEach((v) => {
695
+ if (!v.disabled) {
696
+ const M = s(v);
697
+ a[M] = g.has(M);
698
698
  }
699
699
  });
700
700
  }
701
701
  },
702
702
  { immediate: !0 }
703
703
  ), se(
704
- r,
704
+ a,
705
705
  () => {
706
- if (!a.value.length) {
706
+ if (!r.value.length) {
707
707
  n("update:modelValue", null);
708
708
  return;
709
709
  }
710
- const c = Object.entries(r).filter(([, g]) => g).map(([g]) => g);
710
+ const c = Object.entries(a).filter(([, g]) => g).map(([g]) => g);
711
711
  n("update:modelValue", c.length === 0 ? null : c);
712
712
  },
713
713
  { deep: !0 }
714
714
  ), ue(() => {
715
715
  if (l.data)
716
- v().then(() => {
717
- if (typeof l.modelValue == "boolean" && a.value.length === 1) {
718
- const c = s(a.value[0]);
719
- r[c] = l.modelValue;
716
+ f().then(() => {
717
+ if (typeof l.modelValue == "boolean" && r.value.length === 1) {
718
+ const c = s(r.value[0]);
719
+ a[c] = l.modelValue;
720
720
  } else if (Array.isArray(l.modelValue)) {
721
721
  const c = new Set(l.modelValue);
722
- a.value.forEach((g) => {
722
+ r.value.forEach((g) => {
723
723
  if (!g.disabled) {
724
- const f = s(g);
725
- r[f] = c.has(f);
724
+ const v = s(g);
725
+ a[v] = c.has(v);
726
726
  }
727
727
  });
728
728
  }
729
729
  });
730
- else if (a.value = l.options, typeof l.modelValue == "boolean" && a.value.length === 1) {
731
- const c = s(a.value[0]);
732
- r[c] = l.modelValue;
730
+ else if (r.value = l.options, typeof l.modelValue == "boolean" && r.value.length === 1) {
731
+ const c = s(r.value[0]);
732
+ a[c] = l.modelValue;
733
733
  } else if (Array.isArray(l.modelValue)) {
734
734
  const c = new Set(l.modelValue);
735
- a.value.forEach((g) => {
735
+ r.value.forEach((g) => {
736
736
  if (!g.disabled) {
737
- const f = s(g);
738
- r[f] = c.has(f);
737
+ const v = s(g);
738
+ a[v] = c.has(v);
739
739
  }
740
740
  });
741
741
  }
742
742
  }), (c, g) => (i(), u("div", {
743
743
  class: B(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
744
744
  }, [
745
- (i(!0), u(Q, null, Y(a.value, (f) => (i(), X(tt, {
746
- modelValue: r[s(f)],
747
- "onUpdate:modelValue": (M) => r[s(f)] = M,
748
- value: s(f),
745
+ (i(!0), u(Q, null, Y(r.value, (v) => (i(), X(tt, {
746
+ modelValue: a[s(v)],
747
+ "onUpdate:modelValue": (M) => a[s(v)] = M,
748
+ value: s(v),
749
749
  class: B(p(c.colSpan)),
750
- disabled: f.disabled,
751
- label: d(f),
752
- key: s(f),
753
- icon: f?.icon,
754
- imgUrl: f?.imgUrl,
755
- option: f,
750
+ disabled: v.disabled,
751
+ label: d(v),
752
+ key: s(v),
753
+ icon: v?.icon,
754
+ imgUrl: v?.imgUrl,
755
+ option: v,
756
756
  view: c.view
757
757
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
758
758
  ], 2));
759
759
  }
760
- }), bl = /* @__PURE__ */ R(gl, [["__scopeId", "data-v-54f9e19c"]]), yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ I({
760
+ }), bl = /* @__PURE__ */ R(gl, [["__scopeId", "data-v-54f9e19c"]]), yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ A({
761
761
  __name: "vs-input-date1",
762
762
  props: /* @__PURE__ */ q({
763
763
  style: { default: () => ({}) },
@@ -774,11 +774,11 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
774
774
  emits: ["update:modelValue"],
775
775
  setup(o) {
776
776
  const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
777
- return (a, r) => K((i(), u("input", {
777
+ return (r, a) => K((i(), u("input", {
778
778
  type: "date",
779
- "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
780
- placeholder: a.placeholder,
781
- disabled: a.disabled,
779
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
780
+ placeholder: r.placeholder,
781
+ disabled: r.disabled,
782
782
  class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l)]]),
783
783
  style: {
784
784
  border: "1px solid #CFD9E0"
@@ -789,21 +789,21 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
789
789
  }
790
790
  }), wl = async (o, e, l, n) => {
791
791
  try {
792
- const a = new FormData();
793
- return a.append("unique", "true"), a.append("file", o), (await fetch(
792
+ const r = new FormData();
793
+ return r.append("unique", "true"), r.append("file", o), (await fetch(
794
794
  `/file/upload/uploads?id=${e || ""}&form=${l || ""}&table=${n || ""}`,
795
795
  {
796
796
  method: "POST",
797
- body: a
797
+ body: r
798
798
  }
799
799
  ).then((s) => s.json()))?.result;
800
- } catch (a) {
800
+ } catch (r) {
801
801
  return pe({
802
802
  type: "error",
803
803
  title: "Помилка!",
804
804
  message: "Сталась помилка під час завантаження файлу",
805
805
  position: "right-bottom"
806
- }), console.error("Сталась помилка завантаження файлу", a), null;
806
+ }), console.error("Сталась помилка завантаження файлу", r), null;
807
807
  }
808
808
  }, kl = async (o) => {
809
809
  try {
@@ -813,8 +813,8 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
813
813
  }
814
814
  }, Je = async (o) => {
815
815
  try {
816
- const e = await fetch(`file/download/files/uploads${o}`), l = await e.arrayBuffer(), n = e.headers["content-type"], a = new TextDecoder("utf-8").decode(l), r = new Blob([a], { type: n }), s = document.createElement("a");
817
- s.setAttribute("download", o), s.href = window.URL.createObjectURL(r), s.click();
816
+ const e = await fetch(`file/download/files/uploads${o}`), l = await e.arrayBuffer(), n = e.headers["content-type"], r = new TextDecoder("utf-8").decode(l), a = new Blob([r], { type: n }), s = document.createElement("a");
817
+ s.setAttribute("download", o), s.href = window.URL.createObjectURL(a), s.click();
818
818
  } catch (e) {
819
819
  console.error(e.message);
820
820
  }
@@ -847,9 +847,9 @@ const je = /* @__PURE__ */ R(_l, [["render", Cl]]), Vl = {}, Ml = {
847
847
  "stroke-linecap": "round",
848
848
  "stroke-linejoin": "round"
849
849
  };
850
- function Ll(o, e, l, n, a, r) {
850
+ function Ll(o, e, l, n, r, a) {
851
851
  return i(), u("svg", Ml, e[0] || (e[0] = [
852
- re('<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)
852
+ ae('<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)
853
853
  ]));
854
854
  }
855
855
  const Bl = /* @__PURE__ */ R(Vl, [["render", Ll]]), Sl = {}, jl = {
@@ -864,7 +864,7 @@ const Bl = /* @__PURE__ */ R(Vl, [["render", Ll]]), Sl = {}, jl = {
864
864
  "stroke-linecap": "round",
865
865
  "stroke-linejoin": "round"
866
866
  };
867
- function Al(o, e, l, n, a, r) {
867
+ function Il(o, e, l, n, r, a) {
868
868
  return i(), u("svg", jl, e[0] || (e[0] = [
869
869
  t("path", {
870
870
  stroke: "none",
@@ -892,7 +892,7 @@ function Al(o, e, l, n, a, r) {
892
892
  }, null, -1)
893
893
  ]));
894
894
  }
895
- const Il = /* @__PURE__ */ R(Sl, [["render", Al]]), zl = {}, Ol = {
895
+ const Al = /* @__PURE__ */ R(Sl, [["render", Il]]), zl = {}, Ol = {
896
896
  xmlns: "http://www.w3.org/2000/svg",
897
897
  width: "24",
898
898
  height: "24",
@@ -904,9 +904,9 @@ const Il = /* @__PURE__ */ R(Sl, [["render", Al]]), zl = {}, Ol = {
904
904
  "stroke-linejoin": "round",
905
905
  class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
906
906
  };
907
- function El(o, e, l, n, a, r) {
907
+ function El(o, e, l, n, r, a) {
908
908
  return i(), u("svg", Ol, e[0] || (e[0] = [
909
- re('<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="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
909
+ ae('<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="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
910
910
  ]));
911
911
  }
912
912
  const Fl = /* @__PURE__ */ R(zl, [["render", El]]), Dl = {}, Ul = {
@@ -921,12 +921,12 @@ const Fl = /* @__PURE__ */ R(zl, [["render", El]]), Dl = {}, Ul = {
921
921
  "stroke-linecap": "round",
922
922
  "stroke-linejoin": "round"
923
923
  };
924
- function Rl(o, e, l, n, a, r) {
924
+ function Tl(o, e, l, n, r, a) {
925
925
  return i(), u("svg", Ul, e[0] || (e[0] = [
926
- re('<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)
926
+ ae('<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)
927
927
  ]));
928
928
  }
929
- const Tl = /* @__PURE__ */ R(Dl, [["render", Rl]]), Pl = {}, Nl = {
929
+ const Rl = /* @__PURE__ */ R(Dl, [["render", Tl]]), Pl = {}, Nl = {
930
930
  xmlns: "http://www.w3.org/2000/svg",
931
931
  class: "icon icon-tabler icon-tabler-file-code",
932
932
  width: "44",
@@ -938,9 +938,9 @@ const Tl = /* @__PURE__ */ R(Dl, [["render", Rl]]), Pl = {}, Nl = {
938
938
  "stroke-linecap": "round",
939
939
  "stroke-linejoin": "round"
940
940
  };
941
- function Hl(o, e, l, n, a, r) {
941
+ function Hl(o, e, l, n, r, a) {
942
942
  return i(), u("svg", Nl, e[0] || (e[0] = [
943
- re('<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)
943
+ ae('<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)
944
944
  ]));
945
945
  }
946
946
  const ql = /* @__PURE__ */ R(Pl, [["render", Hl]]), Gl = (o) => {
@@ -955,7 +955,7 @@ const ql = /* @__PURE__ */ R(Pl, [["render", Hl]]), Gl = (o) => {
955
955
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
956
956
  documentsFormat: ["pdf"]
957
957
  };
958
- return l.imageFormat.includes(e) ? "img" : l.sheetsFormat.includes(e) ? Il : l.textsFormat.includes(e) ? ql : l.documentsFormat.includes(e) ? Bl : l.archivesFormat.includes(e) ? Tl : Fl;
958
+ return l.imageFormat.includes(e) ? "img" : l.sheetsFormat.includes(e) ? Al : l.textsFormat.includes(e) ? ql : l.documentsFormat.includes(e) ? Bl : l.archivesFormat.includes(e) ? Rl : Fl;
959
959
  }, Kl = {}, Zl = {
960
960
  xmlns: "http://www.w3.org/2000/svg",
961
961
  width: "24",
@@ -970,10 +970,10 @@ const ql = /* @__PURE__ */ R(Pl, [["render", Hl]]), Gl = (o) => {
970
970
  };
971
971
  function Wl(o, e) {
972
972
  return i(), u("svg", Zl, e[0] || (e[0] = [
973
- re('<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)
973
+ ae('<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)
974
974
  ]));
975
975
  }
976
- const Ae = /* @__PURE__ */ R(Kl, [["render", Wl]]), Ql = {}, Xl = {
976
+ const Ie = /* @__PURE__ */ R(Kl, [["render", Wl]]), Ql = {}, Xl = {
977
977
  xmlns: "http://www.w3.org/2000/svg",
978
978
  width: "24",
979
979
  height: "24",
@@ -997,7 +997,7 @@ function Yl(o, e) {
997
997
  t("path", { d: "M12 4l0 12" }, null, -1)
998
998
  ]));
999
999
  }
1000
- const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, to = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, lo = /* @__PURE__ */ I({
1000
+ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, to = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, lo = /* @__PURE__ */ A({
1001
1001
  __name: "vs-input-file-list-item",
1002
1002
  props: /* @__PURE__ */ q({
1003
1003
  format: {},
@@ -1018,37 +1018,37 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1018
1018
  emits: ["update:value", "update:item"],
1019
1019
  setup(o) {
1020
1020
  const e = G(o, "value"), l = G(o, "item"), n = o;
1021
- return (a, r) => (i(), u("div", eo, [
1021
+ return (r, a) => (i(), u("div", eo, [
1022
1022
  (i(), X(xe(H(Jl)(l.value)), {
1023
1023
  src: l.value,
1024
1024
  alt: "file",
1025
1025
  class: "w-full h-full object-cover cursor-pointer",
1026
- onClick: r[0] || (r[0] = (s) => H(Je)(l.value))
1026
+ onClick: a[0] || (a[0] = (s) => H(Je)(l.value))
1027
1027
  }, null, 8, ["src"])),
1028
1028
  t("div", to, [
1029
1029
  t("button", {
1030
1030
  type: "button",
1031
- onClick: r[1] || (r[1] = (s) => {
1031
+ onClick: a[1] || (a[1] = (s) => {
1032
1032
  H(kl)(l.value), e.value = n.multiple ? e.value?.filter((d) => d !== l.value) : "";
1033
1033
  }),
1034
1034
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1035
1035
  }, [
1036
- A(Ae, { class: "w-4 h-4" })
1036
+ j(Ie, { class: "w-4 h-4" })
1037
1037
  ]),
1038
1038
  t("button", {
1039
1039
  type: "button",
1040
- onClick: r[2] || (r[2] = (s) => H(Je)(l.value)),
1040
+ onClick: a[2] || (a[2] = (s) => H(Je)(l.value)),
1041
1041
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
1042
1042
  }, [
1043
- A(ot, { class: "w-4 h-4" })
1043
+ j(ot, { class: "w-4 h-4" })
1044
1044
  ])
1045
1045
  ])
1046
1046
  ]));
1047
1047
  }
1048
- }), Ke = /* @__PURE__ */ R(lo, [["__scopeId", "data-v-0ca886b3"]]), oo = { class: "flex items-center gap-x-2" }, ro = {
1048
+ }), Ke = /* @__PURE__ */ R(lo, [["__scopeId", "data-v-0ca886b3"]]), oo = { class: "flex items-center gap-x-2" }, ao = {
1049
1049
  key: 1,
1050
1050
  class: "flex items-center flex-wrap gap-2"
1051
- }, ao = /* @__PURE__ */ I({
1051
+ }, ro = /* @__PURE__ */ A({
1052
1052
  __name: "vs-input-file",
1053
1053
  props: /* @__PURE__ */ q({
1054
1054
  format: {},
@@ -1066,10 +1066,10 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1066
1066
  }),
1067
1067
  emits: ["update:modelValue"],
1068
1068
  setup(o) {
1069
- const e = o, l = G(o, "modelValue"), n = $(null), a = (s) => Array.isArray(l.value) && l.value[s] || "", r = async (s) => {
1069
+ const e = o, l = G(o, "modelValue"), n = $(null), r = (s) => Array.isArray(l.value) && l.value[s] || "", a = async (s) => {
1070
1070
  if (e.format) {
1071
- const v = s.target.files?.[0];
1072
- if (!v || !v.name.endsWith(e.format))
1071
+ const f = s.target.files?.[0];
1072
+ if (!f || !f.name.endsWith(e.format))
1073
1073
  return;
1074
1074
  }
1075
1075
  const d = s.target.files?.[0];
@@ -1083,7 +1083,7 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1083
1083
  ref_key: "fileInput",
1084
1084
  ref: n,
1085
1085
  type: "file",
1086
- onChange: r
1086
+ onChange: a
1087
1087
  }, null, 544),
1088
1088
  !s.multiple && l.value ? (i(), X(Ke, {
1089
1089
  key: 0,
@@ -1091,13 +1091,13 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1091
1091
  "onUpdate:item": d[0] || (d[0] = (p) => l.value = p),
1092
1092
  value: l.value,
1093
1093
  "onUpdate:value": d[1] || (d[1] = (p) => l.value = p)
1094
- }, null, 8, ["item", "value"])) : s.multiple ? (i(), u("div", ro, [
1095
- (i(!0), u(Q, null, Y(l.value, (p, v) => (i(), X(Ke, {
1094
+ }, null, 8, ["item", "value"])) : s.multiple ? (i(), u("div", ao, [
1095
+ (i(!0), u(Q, null, Y(l.value, (p, f) => (i(), X(Ke, {
1096
1096
  multiple: s.multiple,
1097
- key: v,
1097
+ key: f,
1098
1098
  value: l.value,
1099
1099
  "onUpdate:value": d[2] || (d[2] = (c) => l.value = c),
1100
- item: a(v)
1100
+ item: r(f)
1101
1101
  }, null, 8, ["multiple", "value", "item"]))), 128)),
1102
1102
  t("div", {
1103
1103
  onClick: d[3] || (d[3] = (p) => !s.disabled && n.value?.click()),
@@ -1106,25 +1106,25 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1106
1106
  s.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1107
1107
  ])
1108
1108
  }, [
1109
- A(je, { class: "w-6 h-6" })
1109
+ j(je, { class: "w-6 h-6" })
1110
1110
  ], 2)
1111
- ])) : j("", !0),
1112
- s.multiple ? j("", !0) : (i(), u("div", {
1111
+ ])) : S("", !0),
1112
+ s.multiple ? S("", !0) : (i(), u("div", {
1113
1113
  key: 2,
1114
1114
  onClick: d[4] || (d[4] = (p) => n.value?.click()),
1115
1115
  class: B([s.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "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"])
1116
1116
  }, [
1117
- A(je, { class: "w-6 h-6" })
1117
+ j(je, { class: "w-6 h-6" })
1118
1118
  ], 2))
1119
1119
  ]));
1120
1120
  }
1121
- }), so = { class: "max-w-[55vw]" }, no = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, io = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, uo = { class: "px-[5px]" }, co = { class: "" }, Be = /* @__PURE__ */ I({
1121
+ }), so = { class: "max-w-[55vw]" }, no = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, io = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, uo = { class: "px-[5px]" }, co = { class: "" }, Be = /* @__PURE__ */ A({
1122
1122
  __name: "vs-widget-file-info",
1123
1123
  props: {
1124
1124
  item: { default: null }
1125
1125
  },
1126
1126
  setup(o) {
1127
- const e = o, l = F(() => {
1127
+ const e = o, l = D(() => {
1128
1128
  try {
1129
1129
  return new Date(e.item.cdate).toLocaleDateString("uk-UA", {
1130
1130
  day: "2-digit",
@@ -1135,24 +1135,24 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1135
1135
  return "";
1136
1136
  }
1137
1137
  });
1138
- function n(a) {
1139
- if (a < 1024)
1140
- return `${a} B`;
1141
- const r = a / 1024;
1142
- return r < 1024 ? `${r.toFixed(2)} KB` : `${(r / 1024).toFixed(2)} MB`;
1138
+ function n(r) {
1139
+ if (r < 1024)
1140
+ return `${r} B`;
1141
+ const a = r / 1024;
1142
+ return a < 1024 ? `${a.toFixed(2)} KB` : `${(a / 1024).toFixed(2)} MB`;
1143
1143
  }
1144
- return (a, r) => (i(), u(Q, null, [
1145
- r[1] || (r[1] = re('<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)),
1144
+ return (r, a) => (i(), u(Q, null, [
1145
+ a[1] || (a[1] = ae('<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)),
1146
1146
  t("div", so, [
1147
- t("p", no, E(a.item?.uploaded_name), 1),
1147
+ t("p", no, E(r.item?.uploaded_name), 1),
1148
1148
  t("p", io, [
1149
- t("span", null, E(a.item?.username), 1),
1149
+ t("span", null, E(r.item?.username), 1),
1150
1150
  K(t("span", uo, "|", 512), [
1151
- [De, a.item?.username]
1151
+ [De, r.item?.username]
1152
1152
  ]),
1153
1153
  t("span", null, E(l.value), 1),
1154
- r[0] || (r[0] = t("span", { class: "px-[5px]" }, "|", -1)),
1155
- t("span", co, E(n(a.item?.size)), 1)
1154
+ a[0] || (a[0] = t("span", { class: "px-[5px]" }, "|", -1)),
1155
+ t("span", co, E(n(r.item?.size)), 1)
1156
1156
  ])
1157
1157
  ])
1158
1158
  ], 64));
@@ -1169,7 +1169,7 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1169
1169
  }, ho = ["href"], go = {
1170
1170
  key: 3,
1171
1171
  class: "flex gap-x-3 w-full items-center"
1172
- }, bo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, yo = { 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" }, xo = { class: "inline-block" }, wo = { class: "inline-block" }, ko = /* @__PURE__ */ I({
1172
+ }, bo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, yo = { 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" }, xo = { class: "inline-block" }, wo = { class: "inline-block" }, ko = /* @__PURE__ */ A({
1173
1173
  __name: "vs-widget-file-item",
1174
1174
  props: {
1175
1175
  item: { default: null },
@@ -1179,10 +1179,10 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1179
1179
  emits: ["update", "openModal", "openLightbox"],
1180
1180
  setup(o, { emit: e }) {
1181
1181
  const l = o, n = e;
1182
- function a(c) {
1182
+ function r(c) {
1183
1183
  return ["pdf", "json"].includes(c.ext);
1184
1184
  }
1185
- function r(c) {
1185
+ function a(c) {
1186
1186
  return ["ppt", "pptx", "doc", "docx", "xls", "xlsx"].includes(c.ext);
1187
1187
  }
1188
1188
  function s(c) {
@@ -1208,38 +1208,38 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1208
1208
  updateListOnConfirm: !0
1209
1209
  });
1210
1210
  }
1211
- function v(c) {
1211
+ function f(c) {
1212
1212
  (l.item.ext === "jpg" || l.item.ext === "png") && n("openLightbox", { item: l.item, index: c });
1213
1213
  }
1214
1214
  return (c, g) => (i(), u("div", po, [
1215
1215
  c.item.ext === "jpg" || c.item.ext === "png" ? (i(), u("div", fo, [
1216
1216
  t("div", {
1217
1217
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
1218
- onClick: g[0] || (g[0] = (f) => v(c.index))
1218
+ onClick: g[0] || (g[0] = (v) => f(c.index))
1219
1219
  }, [
1220
- A(Be, { item: c.item }, null, 8, ["item"])
1220
+ j(Be, { item: c.item }, null, 8, ["item"])
1221
1221
  ])
1222
- ])) : a(c.item) ? (i(), u("div", vo, [
1223
- A(Be, { item: c.item }, null, 8, ["item"])
1224
- ])) : r(c.item) ? (i(), u("div", mo, [
1222
+ ])) : r(c.item) ? (i(), u("div", vo, [
1223
+ j(Be, { item: c.item }, null, 8, ["item"])
1224
+ ])) : a(c.item) ? (i(), u("div", mo, [
1225
1225
  t("a", {
1226
1226
  href: `/api/file-preview?id=${c.item.file_id}`,
1227
1227
  target: "_blank",
1228
1228
  class: "flex gap-x-3 w-full items-center"
1229
1229
  }, [
1230
- A(Be, { item: c.item }, null, 8, ["item"])
1230
+ j(Be, { item: c.item }, null, 8, ["item"])
1231
1231
  ], 8, ho)
1232
1232
  ])) : (i(), u("div", go, [
1233
- A(Be, { item: c.item }, null, 8, ["item"])
1233
+ j(Be, { item: c.item }, null, 8, ["item"])
1234
1234
  ])),
1235
1235
  t("div", bo, [
1236
1236
  t("div", yo, [
1237
1237
  t("div", xo, [
1238
1238
  t("button", {
1239
1239
  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",
1240
- onClick: g[1] || (g[1] = (f) => s(c.item))
1240
+ onClick: g[1] || (g[1] = (v) => s(c.item))
1241
1241
  }, [
1242
- A(ot, {
1242
+ j(ot, {
1243
1243
  height: "14",
1244
1244
  width: "14"
1245
1245
  })
@@ -1250,9 +1250,9 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1250
1250
  t("button", {
1251
1251
  type: "button",
1252
1252
  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",
1253
- onClick: g[2] || (g[2] = (f) => p())
1253
+ onClick: g[2] || (g[2] = (v) => p())
1254
1254
  }, [
1255
- A(Ae, {
1255
+ j(Ie, {
1256
1256
  height: "14",
1257
1257
  width: "14"
1258
1258
  })
@@ -1286,13 +1286,13 @@ function Co(o, e) {
1286
1286
  t("path", { d: "M12 4l0 12" }, null, -1)
1287
1287
  ]));
1288
1288
  }
1289
- const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Lo = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Bo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, So = { class1: "ml-auto" }, jo = { 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" }, Ao = {
1289
+ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Lo = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Bo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, So = { class1: "ml-auto" }, jo = { 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" }, Io = {
1290
1290
  key: 0,
1291
1291
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
1292
- }, Io = { class: "relative" }, zo = {
1292
+ }, Ao = { class: "relative" }, zo = {
1293
1293
  key: 1,
1294
1294
  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"
1295
- }, Oo = { key: 0 }, Eo = /* @__PURE__ */ I({
1295
+ }, Oo = { key: 0 }, Eo = /* @__PURE__ */ A({
1296
1296
  __name: "vs-input-file-list",
1297
1297
  props: {
1298
1298
  id: { default: "" },
@@ -1307,43 +1307,43 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1307
1307
  },
1308
1308
  emits: ["update"],
1309
1309
  setup(o, { emit: e }) {
1310
- const l = o, n = Se("form"), a = F(() => n.value.formId), r = $(!1), s = $(0), d = e, p = $(!1), v = $({}), c = $([]), g = $(""), f = F(() => Array.isArray(c.value) ? c.value.filter((x) => x.ext === "jpg" || x.ext === "png").map((x) => x?.file_path) : []), M = F(() => g.value === "" ? c.value : c.value.filter((x) => x?.uploaded_name?.includes(g.value))), S = (x) => {
1311
- const h = f.value.findIndex((J) => J === x.item.file_path);
1312
- h !== -1 && (r.value = !0, s.value = h);
1313
- }, T = async () => {
1310
+ const l = o, n = Se("form"), r = D(() => n.value.formId), a = $(!1), s = $(0), d = e, p = $(!1), f = $({}), c = $([]), g = $(""), v = D(() => Array.isArray(c.value) ? c.value.filter((x) => x.ext === "jpg" || x.ext === "png").map((x) => x?.file_path) : []), M = D(() => g.value === "" ? c.value : c.value.filter((x) => x?.uploaded_name?.includes(g.value))), I = (x) => {
1311
+ const h = v.value.findIndex((J) => J === x.item.file_path);
1312
+ h !== -1 && (a.value = !0, s.value = h);
1313
+ }, F = async () => {
1314
1314
  try {
1315
- const x = await fetch(`${l.prefix}/widget/file/${a.value}`).then((h) => h.json());
1315
+ const x = await fetch(`${l.prefix}/widget/file/${r.value}`).then((h) => h.json());
1316
1316
  c.value = x?.rows;
1317
1317
  } catch (x) {
1318
1318
  console.error(x);
1319
1319
  }
1320
- }, D = async (x) => {
1320
+ }, U = async (x) => {
1321
1321
  await Promise.all(
1322
1322
  Array.from(x.target.files).map(async (h) => {
1323
1323
  const J = new FormData();
1324
1324
  J.append("file", h);
1325
1325
  try {
1326
- const C = `${l.prefix}/widget/file/${a.value}`;
1326
+ const C = `${l.prefix}/widget/file/${r.value}`;
1327
1327
  return await fetch(C, { method: "POST", body: J }), d("update", "file-list"), h;
1328
1328
  } catch (C) {
1329
1329
  return console.error(C), null;
1330
1330
  }
1331
1331
  })
1332
- ), await T();
1332
+ ), await F();
1333
1333
  }, P = (x) => {
1334
1334
  const h = { ...x };
1335
1335
  return x.cancel || (h.cancel = () => {
1336
1336
  p.value = !1;
1337
1337
  }), x.updateListOnConfirm && (h.confirm = async () => {
1338
- await x.confirm(), p.value = !1, T();
1338
+ await x.confirm(), p.value = !1, F();
1339
1339
  }), h;
1340
1340
  }, _ = (x) => {
1341
- v.value = P(x), p.value = !0;
1341
+ f.value = P(x), p.value = !0;
1342
1342
  };
1343
- return se(a, (x) => {
1344
- x && T();
1343
+ return se(r, (x) => {
1344
+ x && F();
1345
1345
  }), ue(() => {
1346
- a.value && T();
1346
+ r.value && F();
1347
1347
  }), (x, h) => {
1348
1348
  const J = Pe("Lightbox"), C = Pe("MessageBox");
1349
1349
  return i(), u("div", Mo, [
@@ -1354,10 +1354,10 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1354
1354
  t("input", {
1355
1355
  type: "file",
1356
1356
  class: "hidden",
1357
- onChange: h[0] || (h[0] = (m) => D(m))
1357
+ onChange: h[0] || (h[0] = (m) => U(m))
1358
1358
  }, null, 32),
1359
1359
  t("div", jo, [
1360
- A(Vo, {
1360
+ j(Vo, {
1361
1361
  height: "16",
1362
1362
  width: "16"
1363
1363
  })
@@ -1365,9 +1365,9 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1365
1365
  ])
1366
1366
  ])
1367
1367
  ]),
1368
- c.value?.length > 4 ? (i(), u("div", Ao, [
1368
+ c.value?.length > 4 ? (i(), u("div", Io, [
1369
1369
  t("div", null, [
1370
- t("div", Io, [
1370
+ t("div", Ao, [
1371
1371
  h[8] || (h[8] = t("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1372
1372
  t("svg", {
1373
1373
  class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
@@ -1404,7 +1404,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1404
1404
  ])
1405
1405
  ])
1406
1406
  ])
1407
- ])) : j("", !0),
1407
+ ])) : S("", !0),
1408
1408
  c.value?.length ? (i(), u("div", zo, [
1409
1409
  (i(!0), u(Q, null, Y(M.value, (m, V) => (i(), X(ko, {
1410
1410
  key: V,
@@ -1413,28 +1413,28 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1413
1413
  index: V,
1414
1414
  onUpdate: h[2] || (h[2] = (z) => x.$emit("update", "file-list")),
1415
1415
  onOpenModal: h[3] || (h[3] = (z) => _(z)),
1416
- onOpenLightbox: h[4] || (h[4] = (z) => S(z))
1416
+ onOpenLightbox: h[4] || (h[4] = (z) => I(z))
1417
1417
  }, null, 8, ["prefix", "item", "index"]))), 128)),
1418
- M.value.length ? j("", !0) : (i(), u("div", Oo, h[9] || (h[9] = [
1418
+ M.value.length ? S("", !0) : (i(), u("div", Oo, h[9] || (h[9] = [
1419
1419
  t("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1420
1420
  ])))
1421
- ])) : j("", !0),
1422
- A(J, {
1423
- modelValue: r.value,
1424
- "onUpdate:modelValue": h[5] || (h[5] = (m) => r.value = m),
1421
+ ])) : S("", !0),
1422
+ j(J, {
1423
+ modelValue: a.value,
1424
+ "onUpdate:modelValue": h[5] || (h[5] = (m) => a.value = m),
1425
1425
  startIndex: s.value,
1426
1426
  "onUpdate:index": h[6] || (h[6] = (m) => s.value = m),
1427
- images: f.value
1427
+ images: v.value
1428
1428
  }, null, 8, ["modelValue", "startIndex", "images"]),
1429
- A(C, Ce({
1429
+ j(C, Ce({
1430
1430
  modelValue: p.value,
1431
1431
  "onUpdate:modelValue": h[7] || (h[7] = (m) => p.value = m),
1432
- onConfirm: v.value.confirm
1433
- }, v.value), null, 16, ["modelValue", "onConfirm"])
1432
+ onConfirm: f.value.confirm
1433
+ }, f.value), null, 16, ["modelValue", "onConfirm"])
1434
1434
  ]);
1435
1435
  };
1436
1436
  }
1437
- }), Fo = { class: "flex items-center justify-between" }, Do = { class: "text-[16px] text-gray-900 font-medium" }, Uo = { class: "grid gap-3" }, Ro = /* @__PURE__ */ I({
1437
+ }), Fo = { class: "flex items-center justify-between" }, Do = { class: "text-[16px] text-gray-900 font-medium" }, Uo = { class: "grid gap-3" }, To = /* @__PURE__ */ A({
1438
1438
  __name: "vs-container-switcher",
1439
1439
  props: {
1440
1440
  title: {
@@ -1457,16 +1457,16 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1457
1457
  (n) => {
1458
1458
  l.value = n;
1459
1459
  }
1460
- ), (n, a) => (i(), u("div", null, [
1460
+ ), (n, r) => (i(), u("div", null, [
1461
1461
  t("div", Fo, [
1462
1462
  t("p", Do, E(o.title), 1),
1463
- A(lt, {
1463
+ j(lt, {
1464
1464
  modelValue: l.value,
1465
- "onUpdate:modelValue": a[0] || (a[0] = (r) => l.value = r),
1465
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
1466
1466
  style: fe(o.style)
1467
1467
  }, null, 8, ["modelValue", "style"])
1468
1468
  ]),
1469
- A(Ye, { name: "slide-fade" }, {
1469
+ j(Ye, { name: "slide-fade" }, {
1470
1470
  default: Me(() => [
1471
1471
  K(t("div", Uo, [
1472
1472
  ve(n.$slots, "default", {}, void 0, !0)
@@ -1478,7 +1478,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1478
1478
  })
1479
1479
  ]));
1480
1480
  }
1481
- }), To = /* @__PURE__ */ R(Ro, [["__scopeId", "data-v-90320b87"]]), Po = { class: "text-[16px] text-gray-900 font-medium" }, No = { class: "grid gap-3" }, Ho = /* @__PURE__ */ I({
1481
+ }), Ro = /* @__PURE__ */ R(To, [["__scopeId", "data-v-90320b87"]]), Po = { class: "text-[16px] text-gray-900 font-medium" }, No = { class: "grid gap-3" }, Ho = /* @__PURE__ */ A({
1482
1482
  __name: "vs-container-accordion",
1483
1483
  props: {
1484
1484
  title: {
@@ -1501,18 +1501,18 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1501
1501
  (n) => {
1502
1502
  l.value = n;
1503
1503
  }
1504
- ), (n, a) => (i(), u("div", null, [
1504
+ ), (n, r) => (i(), u("div", null, [
1505
1505
  t("button", {
1506
1506
  type: "button",
1507
- onClick: a[0] || (a[0] = (r) => l.value = !l.value),
1507
+ onClick: r[0] || (r[0] = (a) => l.value = !l.value),
1508
1508
  class: "flex items-center gap-2"
1509
1509
  }, [
1510
- A(H(Zt), {
1510
+ j(H(Zt), {
1511
1511
  class: B(["h-4 w-4 duration-300", [l.value ? "-rotate-180" : ""]])
1512
1512
  }, null, 8, ["class"]),
1513
1513
  t("span", Po, E(o.title), 1)
1514
1514
  ]),
1515
- A(Ye, { name: "slide-fade" }, {
1515
+ j(Ye, { name: "slide-fade" }, {
1516
1516
  default: Me(() => [
1517
1517
  K(t("div", No, [
1518
1518
  ve(n.$slots, "default", {}, void 0, !0)
@@ -1524,7 +1524,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1524
1524
  })
1525
1525
  ]));
1526
1526
  }
1527
- }), qo = /* @__PURE__ */ R(Ho, [["__scopeId", "data-v-590eff11"]]), Go = { class: "flex items-center justify-between" }, Jo = /* @__PURE__ */ I({
1527
+ }), qo = /* @__PURE__ */ R(Ho, [["__scopeId", "data-v-590eff11"]]), Go = { class: "flex items-center justify-between" }, Jo = /* @__PURE__ */ A({
1528
1528
  __name: "vs-container-default",
1529
1529
  props: {
1530
1530
  title: {
@@ -1545,7 +1545,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1545
1545
  ]));
1546
1546
  }
1547
1547
  }), Ko = {
1548
- switcher: To,
1548
+ switcher: Ro,
1549
1549
  accordion: qo,
1550
1550
  default: Jo
1551
1551
  }, le = {
@@ -1561,7 +1561,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1561
1561
  Contain: "*",
1562
1562
  In: "in",
1563
1563
  NotIn: "not_in"
1564
- }, Zo = (o, e) => String(o) === String(e), Wo = (o, e) => String(o) !== String(e), Qo = (o, e) => o > e, Xo = (o, e) => o >= e, Yo = (o, e) => o < e, er = (o, e) => o <= e, tr = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, lr = (o, e) => String(o).startsWith(String(e)), or = (o, e) => String(o).endsWith(String(e)), rr = (o, e) => String(o).includes(String(e)), ar = (o, e) => Array.isArray(e) ? e.includes(o) : !1, sr = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, rt = (o, e) => {
1564
+ }, Zo = (o, e) => String(o) === String(e), Wo = (o, e) => String(o) !== String(e), Qo = (o, e) => o > e, Xo = (o, e) => o >= e, Yo = (o, e) => o < e, ea = (o, e) => o <= e, ta = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, la = (o, e) => String(o).startsWith(String(e)), oa = (o, e) => String(o).endsWith(String(e)), aa = (o, e) => String(o).includes(String(e)), ra = (o, e) => Array.isArray(e) ? e.includes(o) : !1, sa = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, at = (o, e) => {
1565
1565
  if (!e) return !0;
1566
1566
  switch (e?.[1]) {
1567
1567
  case le.Equal:
@@ -1575,23 +1575,23 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1575
1575
  case le.Lower:
1576
1576
  return Yo(o, e?.[2]);
1577
1577
  case le.LowerOrEqual:
1578
- return er(o, e?.[2]);
1578
+ return ea(o, e?.[2]);
1579
1579
  case le.Between:
1580
- return tr(o, e?.[2]);
1580
+ return ta(o, e?.[2]);
1581
1581
  case le.StartWith:
1582
- return lr(o, e?.[2]);
1582
+ return la(o, e?.[2]);
1583
1583
  case le.EndWith:
1584
- return or(o, e?.[2]);
1584
+ return oa(o, e?.[2]);
1585
1585
  case le.Contain:
1586
- return rr(o, e?.[2]);
1586
+ return aa(o, e?.[2]);
1587
1587
  case le.In:
1588
- return ar(o, e?.[2]);
1588
+ return ra(o, e?.[2]);
1589
1589
  case le.NotIn:
1590
- return sr(o, e?.[2]);
1590
+ return sa(o, e?.[2]);
1591
1591
  default:
1592
1592
  return !0;
1593
1593
  }
1594
- }, nr = /* @__PURE__ */ I({
1594
+ }, na = /* @__PURE__ */ A({
1595
1595
  __name: "vs-input-container",
1596
1596
  props: {
1597
1597
  style: {
@@ -1612,32 +1612,32 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1612
1612
  }
1613
1613
  },
1614
1614
  setup(o) {
1615
- const e = o, l = Se("formValues", { default: {} }), n = Se("form"), a = F(() => e.schema?.filter((s) => {
1615
+ const e = o, l = Se("formValues", { default: {} }), n = Se("form"), r = D(() => e.schema?.filter((s) => {
1616
1616
  const d = s?.conditions;
1617
1617
  if (!d) return !0;
1618
- const p = Array.isArray(d) ? d[0] : d, v = l?.value?.[p];
1619
- return rt(v, d);
1620
- })), r = F(() => Ko[e.view]);
1621
- return (s, d) => o.schema?.length ? (i(), X(xe(r.value), {
1618
+ const p = Array.isArray(d) ? d[0] : d, f = l?.value?.[p];
1619
+ return at(f, d);
1620
+ })), a = D(() => Ko[e.view]);
1621
+ return (s, d) => o.schema?.length ? (i(), X(xe(a.value), {
1622
1622
  key: 0,
1623
1623
  title: o.title,
1624
1624
  style: fe(o.style)
1625
1625
  }, {
1626
1626
  default: Me(() => [
1627
- (i(!0), u(Q, null, Y(a.value, (p) => (i(), X(at, Ce({
1627
+ (i(!0), u(Q, null, Y(r.value, (p) => (i(), X(rt, Ce({
1628
1628
  key: p.name
1629
1629
  }, { ref_for: !0 }, p, {
1630
1630
  item: p,
1631
1631
  modelValue: H(l)[p.name],
1632
- "onUpdate:modelValue": (v) => H(l)[p.name] = v,
1632
+ "onUpdate:modelValue": (f) => H(l)[p.name] = f,
1633
1633
  style: o.style,
1634
1634
  error: H(n)?.errors?.[p.name]
1635
1635
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
1636
1636
  ]),
1637
1637
  _: 1
1638
- }, 8, ["title", "style"])) : j("", !0);
1638
+ }, 8, ["title", "style"])) : S("", !0);
1639
1639
  }
1640
- }), ir = { class: "relative" }, ur = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, dr = { 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" }, cr = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, pr = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, fr = { class: "p-4 mim-h-0 h-full overflow-auto" }, vr = /* @__PURE__ */ I({
1640
+ }), ia = { class: "relative" }, ua = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, da = { 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" }, ca = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, pa = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, fa = { class: "p-4 mim-h-0 h-full overflow-auto" }, va = /* @__PURE__ */ A({
1641
1641
  __name: "modal-edit",
1642
1642
  props: {
1643
1643
  schema: {},
@@ -1648,50 +1648,50 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1648
1648
  },
1649
1649
  emits: ["close", "save", "edit"],
1650
1650
  setup(o, { emit: e }) {
1651
- const l = o, n = e, a = $(l.schema), r = $(l.defaultValue ? JSON.parse(JSON.stringify(l.defaultValue)) : {}), s = $({}), d = $(), p = $(l.mode);
1652
- async function v() {
1651
+ const l = o, n = e, r = $(l.schema), a = $(l.defaultValue ? JSON.parse(JSON.stringify(l.defaultValue)) : {}), s = $({}), d = $(), p = $(l.mode);
1652
+ async function f() {
1653
1653
  const g = s.value.validate();
1654
1654
  if (g) {
1655
- pe({ type: "warning", title: "Помилка валідації", message: Object.entries(g).map(([f, M]) => `${f}: ${M}`).join(`
1655
+ pe({ type: "warning", title: "Помилка валідації", message: Object.entries(g).map(([v, M]) => `${v}: ${M}`).join(`
1656
1656
  `) });
1657
1657
  return;
1658
1658
  }
1659
1659
  if (d.value)
1660
1660
  try {
1661
- const f = await fetch(`/api/table/${d.value}`, {
1661
+ const v = await fetch(`/api/table/${d.value}`, {
1662
1662
  method: p.value === "add" ? "POST" : "PUT",
1663
1663
  headers: {
1664
1664
  "Content-Type": "application/json"
1665
1665
  },
1666
- body: JSON.stringify(r.value)
1666
+ body: JSON.stringify(a.value)
1667
1667
  });
1668
- if (f.ok)
1669
- await f.json(), pe({
1668
+ if (v.ok)
1669
+ await v.json(), pe({
1670
1670
  type: "success",
1671
1671
  title: "Успішно",
1672
1672
  message: `Дані успішно ${p.value === "add" ? "збережено" : "оновлено"}`
1673
- }), n("save", r.value);
1674
- else if (f.status === 400) {
1675
- const M = await f.json().catch(() => ({}));
1673
+ }), n("save", a.value);
1674
+ else if (v.status === 400) {
1675
+ const M = await v.json().catch(() => ({}));
1676
1676
  pe({
1677
1677
  type: "warning",
1678
1678
  title: "Помилка валідації",
1679
1679
  message: M.message || "Некоректні дані (400)"
1680
1680
  });
1681
- } else f.status === 500 ? pe({
1681
+ } else v.status === 500 ? pe({
1682
1682
  type: "error",
1683
1683
  title: "Серверна помилка",
1684
1684
  message: "Виникла помилка на сервері (500)"
1685
1685
  }) : pe({
1686
1686
  type: "error",
1687
1687
  title: "Помилка",
1688
- message: `Статус: ${f.status}`
1688
+ message: `Статус: ${v.status}`
1689
1689
  });
1690
- } catch (f) {
1690
+ } catch (v) {
1691
1691
  pe({
1692
1692
  type: "error",
1693
1693
  title: "Помилка з’єднання",
1694
- message: f.message || "Не вдалося виконати запит"
1694
+ message: v.message || "Не вдалося виконати запит"
1695
1695
  });
1696
1696
  }
1697
1697
  }
@@ -1700,23 +1700,23 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1700
1700
  }
1701
1701
  return ue(async () => {
1702
1702
  if (l.form) {
1703
- const g = await fetch(`/api/template/form/${l.form}`).then((f) => f.json());
1704
- a.value = g.schema, d.value = g.token;
1703
+ const g = await fetch(`/api/template/form/${l.form}`).then((v) => v.json());
1704
+ r.value = g.schema, d.value = g.token;
1705
1705
  } else if (l.token) {
1706
1706
  d.value = l.token;
1707
- const g = await fetch(`/api/form/${d.value}`).then((f) => f.json());
1708
- a.value = g.schema, g.data ? r.value = g.data : p.value = "add";
1707
+ const g = await fetch(`/api/form/${d.value}`).then((v) => v.json());
1708
+ r.value = g.schema, g.data ? a.value = g.data : p.value = "add";
1709
1709
  }
1710
- }), (g, f) => (i(), u("div", ir, [
1711
- t("div", ur, [
1712
- t("div", dr, [
1713
- t("div", cr, [
1714
- t("h3", pr, E(p.value === "add" ? "Додати" : "Змінити"), 1),
1710
+ }), (g, v) => (i(), u("div", ia, [
1711
+ t("div", ua, [
1712
+ t("div", da, [
1713
+ t("div", ca, [
1714
+ t("h3", pa, E(p.value === "add" ? "Додати" : "Змінити"), 1),
1715
1715
  t("button", {
1716
1716
  onClick: c,
1717
1717
  type: "button",
1718
1718
  class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
1719
- }, f[2] || (f[2] = [
1719
+ }, v[2] || (v[2] = [
1720
1720
  t("span", { class: "sr-only" }, "Close", -1),
1721
1721
  t("svg", {
1722
1722
  class: "flex-shrink-0 w-4 h-4",
@@ -1735,15 +1735,15 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1735
1735
  ], -1)
1736
1736
  ]))
1737
1737
  ]),
1738
- t("div", fr, [
1739
- a.value ? (i(), X(Oe, {
1738
+ t("div", fa, [
1739
+ r.value ? (i(), X(Oe, {
1740
1740
  key: 0,
1741
- schema: a.value,
1742
- values: r.value,
1743
- "onUpdate:values": f[0] || (f[0] = (M) => r.value = M),
1741
+ schema: r.value,
1742
+ values: a.value,
1743
+ "onUpdate:values": v[0] || (v[0] = (M) => a.value = M),
1744
1744
  form: s.value,
1745
- "onUpdate:form": f[1] || (f[1] = (M) => s.value = M)
1746
- }, null, 8, ["schema", "values", "form"])) : j("", !0)
1745
+ "onUpdate:form": v[1] || (v[1] = (M) => s.value = M)
1746
+ }, null, 8, ["schema", "values", "form"])) : S("", !0)
1747
1747
  ]),
1748
1748
  t("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" }, [
1749
1749
  t("button", {
@@ -1752,7 +1752,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1752
1752
  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"
1753
1753
  }, " Скасувати "),
1754
1754
  t("button", {
1755
- onClick: v,
1755
+ onClick: f,
1756
1756
  type: "button",
1757
1757
  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"
1758
1758
  }, " Зберегти ")
@@ -1769,37 +1769,37 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1769
1769
  }
1770
1770
  const n = document.createElement("div");
1771
1771
  l.appendChild(n);
1772
- function a() {
1773
- r.unmount(), n.remove();
1772
+ function r() {
1773
+ a.unmount(), n.remove();
1774
1774
  }
1775
- const r = ct({
1775
+ const a = ct({
1776
1776
  render() {
1777
- return pt(vr, {
1777
+ return pt(va, {
1778
1778
  ...o,
1779
1779
  onClose: () => {
1780
- e(null), a();
1780
+ e(null), r();
1781
1781
  },
1782
1782
  onSave: (s) => {
1783
- e(s), a();
1783
+ e(s), r();
1784
1784
  }
1785
1785
  });
1786
1786
  }
1787
1787
  });
1788
- r.mount(n);
1789
- }), mr = ["aria-expanded", "data-focus"], hr = { class: "flex items-center" }, gr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, br = ["onClick"], yr = {
1788
+ a.mount(n);
1789
+ }), ma = ["aria-expanded", "data-focus"], ha = { class: "flex items-center" }, ga = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, ba = ["onClick"], ya = {
1790
1790
  key: 1,
1791
1791
  class: /* @__PURE__ */ B(["flex items-center absolute truncate text-gray-900"])
1792
- }, xr = {
1792
+ }, xa = {
1793
1793
  key: 2,
1794
1794
  class: "absolute text-gray-500 truncate"
1795
- }, wr = { class: "flex-1 min-w-[2px]" }, kr = ["placeholder"], _r = { class: "flex items-center shrink-0" }, $r = ["disabled"], Cr = ["disabled"], Vr = {
1795
+ }, wa = { class: "flex-1 min-w-[2px]" }, ka = ["placeholder"], _a = { class: "flex items-center shrink-0" }, $a = ["disabled"], Ca = ["disabled"], Va = {
1796
1796
  key: 0,
1797
1797
  class: "absolute z-10 w-full mt-2 rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]",
1798
1798
  role: "listbox"
1799
- }, Mr = ["aria-disabled", "onClick"], Lr = {
1799
+ }, Ma = ["aria-disabled", "onClick"], La = {
1800
1800
  key: 1,
1801
1801
  class: "px-3 py-2 text-center text-gray-500"
1802
- }, Br = ["disabled"], Sr = /* @__PURE__ */ I({
1802
+ }, Ba = ["disabled"], Sa = /* @__PURE__ */ A({
1803
1803
  __name: "vs-input-select",
1804
1804
  props: /* @__PURE__ */ q({
1805
1805
  multiple: { type: Boolean, default: !1 },
@@ -1826,19 +1826,19 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1826
1826
  }),
1827
1827
  emits: /* @__PURE__ */ q(["change"], ["update:modelValue"]),
1828
1828
  setup(o, { emit: e }) {
1829
- const l = o, n = e, a = F(() => l.multiple), r = F(() => l.disabled);
1829
+ const l = o, n = e, r = D(() => l.multiple), a = D(() => l.disabled);
1830
1830
  me(l.style);
1831
- const s = G(o, "modelValue"), d = $(null), p = $(null), v = $(null), c = $(!1), g = $(!1), f = $(null), M = $([]), S = $(-1), T = $([]), D = $(""), P = $(null), _ = $([]), x = F(() => {
1831
+ const s = G(o, "modelValue"), d = $(null), p = $(null), f = $(null), c = $(!1), g = $(!1), v = $(null), M = $([]), I = $(-1), F = $([]), U = $(""), P = $(null), _ = $([]), x = D(() => {
1832
1832
  if (!_.value.length) return [];
1833
1833
  const k = new Map(M.value.map((w) => [w.id?.toString(), w]));
1834
1834
  return _.value.map((w) => k.get(w?.toString())).filter((w) => !!w);
1835
- }), h = F(() => l.placeholder || "Select..."), J = F(() => a.value ? !_.value.length && D.value === "" : !f.value?.text && D.value === ""), C = F(() => r.value ? !1 : a.value ? _.value.length > 0 : !!s.value), m = (k) => a.value ? _.value.some((w) => w?.toString() === k?.toString()) : s.value?.toString?.() === k?.toString?.(), V = F(() => {
1835
+ }), h = D(() => l.placeholder || "Select..."), J = D(() => r.value ? !_.value.length && U.value === "" : !v.value?.text && U.value === ""), C = D(() => a.value ? !1 : r.value ? _.value.length > 0 : !!s.value), m = (k) => r.value ? _.value.some((w) => w?.toString() === k?.toString()) : s.value?.toString?.() === k?.toString?.(), V = D(() => {
1836
1836
  let k = M.value ?? [];
1837
- if (D.value.trim() !== "") {
1838
- const w = D.value.toLowerCase();
1837
+ if (U.value.trim() !== "") {
1838
+ const w = U.value.toLowerCase();
1839
1839
  k = k.filter((O) => O.text?.toLowerCase?.().includes(w));
1840
1840
  }
1841
- if (a.value && _.value.length) {
1841
+ if (r.value && _.value.length) {
1842
1842
  const w = new Set(_.value.map((O) => O?.toString()));
1843
1843
  k = k.filter((O) => !w.has(O.id?.toString()));
1844
1844
  }
@@ -1852,7 +1852,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1852
1852
  return [];
1853
1853
  }
1854
1854
  }, Z = async () => {
1855
- l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z(D.value));
1855
+ l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z(U.value));
1856
1856
  }, te = async (k) => {
1857
1857
  if (k == null) return null;
1858
1858
  const w = M.value?.find((W) => W?.id?.toString() === String(k));
@@ -1865,26 +1865,26 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1865
1865
  Le && M.value.push(Le);
1866
1866
  }, Promise.resolve());
1867
1867
  }, we = async () => {
1868
- r.value || (c.value = !0, await Z(), await $e(() => {
1869
- P.value?.focus(), V.value.length ? S.value = 0 : S.value = -1;
1868
+ a.value || (c.value = !0, await Z(), await $e(() => {
1869
+ P.value?.focus(), V.value.length ? I.value = 0 : I.value = -1;
1870
1870
  }));
1871
1871
  }, ie = () => {
1872
- c.value = !1, S.value = -1;
1873
- }, Ie = async (k) => {
1874
- if (r.value) return;
1872
+ c.value = !1, I.value = -1;
1873
+ }, Ae = async (k) => {
1874
+ if (a.value) return;
1875
1875
  !c.value ? await we() : ie();
1876
1876
  }, ke = async () => {
1877
1877
  c.value ? P.value?.focus() : await we();
1878
1878
  }, b = () => {
1879
- a.value ? (_.value = [], s.value = [], n("change", [])) : (f.value = null, s.value = null, n("change", null)), D.value = "", $e(() => P.value?.focus());
1879
+ r.value ? (_.value = [], s.value = [], n("change", [])) : (v.value = null, s.value = null, n("change", null)), U.value = "", $e(() => P.value?.focus());
1880
1880
  }, y = (k) => {
1881
- a.value && (_.value = _.value.filter((w) => w?.toString() !== k?.toString()), s.value = [..._.value], n("change", s.value), $e(() => P.value?.focus()));
1882
- }, U = (k) => {
1883
- a.value ? (m(k.id) || (_.value = [..._.value, k.id], s.value = [..._.value], n("change", s.value)), D.value = "", $e(() => {
1884
- P.value?.focus(), S.value = Math.min(S.value, V.value.length - 1);
1885
- })) : (f.value = k, s.value = k.id, n("change", s.value), D.value = "", ie());
1881
+ r.value && (_.value = _.value.filter((w) => w?.toString() !== k?.toString()), s.value = [..._.value], n("change", s.value), $e(() => P.value?.focus()));
1882
+ }, T = (k) => {
1883
+ r.value ? (m(k.id) || (_.value = [..._.value, k.id], s.value = [..._.value], n("change", s.value)), U.value = "", $e(() => {
1884
+ P.value?.focus(), I.value = Math.min(I.value, V.value.length - 1);
1885
+ })) : (v.value = k, s.value = k.id, n("change", s.value), U.value = "", ie());
1886
1886
  }, N = (k) => {
1887
- m(k.id) || U(k);
1887
+ m(k.id) || T(k);
1888
1888
  }, ee = (k, w) => {
1889
1889
  if (!k || !w) return;
1890
1890
  const O = k.offsetTop, W = O + k.offsetHeight, be = w.scrollTop, Le = be + w.clientHeight;
@@ -1893,50 +1893,50 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1893
1893
  const it = w;
1894
1894
  it.scrollTop = ze;
1895
1895
  }, _e = async (k) => {
1896
- r.value || !c.value && (k.key === "ArrowDown" || k.key === "ArrowUp") && (k.preventDefault(), await we());
1896
+ a.value || !c.value && (k.key === "ArrowDown" || k.key === "ArrowUp") && (k.preventDefault(), await we());
1897
1897
  }, de = (k) => {
1898
1898
  if (!c.value) return;
1899
1899
  const { key: w } = k;
1900
1900
  if (w === "ArrowDown")
1901
- k.preventDefault(), S.value + 1 < V.value.length && (S.value += 1, ee(T.value[S.value], v.value));
1901
+ k.preventDefault(), I.value + 1 < V.value.length && (I.value += 1, ee(F.value[I.value], f.value));
1902
1902
  else if (w === "ArrowUp")
1903
- k.preventDefault(), S.value > 0 && (S.value -= 1, ee(T.value[S.value], v.value));
1903
+ k.preventDefault(), I.value > 0 && (I.value -= 1, ee(F.value[I.value], f.value));
1904
1904
  else if (w === "Enter") {
1905
1905
  k.preventDefault();
1906
- const O = V.value[S.value];
1907
- O && U(O);
1908
- } else w === "Escape" ? (k.preventDefault(), ie()) : w === "Backspace" ? a.value && D.value === "" && _.value.length && (_.value = _.value.slice(0, -1), s.value = [..._.value], n("change", s.value)) : w === "Home" ? (S.value = 0, ee(T.value[0], v.value)) : w === "End" ? (S.value = V.value.length - 1, ee(T.value[S.value], v.value)) : w === "Tab" && ie();
1906
+ const O = V.value[I.value];
1907
+ O && T(O);
1908
+ } else w === "Escape" ? (k.preventDefault(), ie()) : w === "Backspace" ? r.value && U.value === "" && _.value.length && (_.value = _.value.slice(0, -1), s.value = [..._.value], n("change", s.value)) : w === "Home" ? (I.value = 0, ee(F.value[0], f.value)) : w === "End" ? (I.value = V.value.length - 1, ee(F.value[I.value], f.value)) : w === "Tab" && ie();
1909
1909
  }, he = () => {
1910
- r.value || (g.value = !0);
1910
+ a.value || (g.value = !0);
1911
1911
  }, ge = () => {
1912
- g.value = !1, D.value = "";
1912
+ g.value = !1, U.value = "";
1913
1913
  }, ce = (k) => {
1914
1914
  k.key === "Escape" && c.value && ie();
1915
1915
  }, Ue = (k) => {
1916
1916
  d.value && (d.value.contains(k.target) || ie());
1917
- }, Re = (k) => {
1918
- c.value && v.value && !v.value.contains(k.target) && ie();
1917
+ }, Te = (k) => {
1918
+ c.value && f.value && !f.value.contains(k.target) && ie();
1919
1919
  };
1920
1920
  se(() => l.options, (k) => {
1921
1921
  k?.length && (M.value = [...k]);
1922
1922
  }, { immediate: !0 });
1923
- const Te = async () => {
1924
- if (a.value)
1923
+ const Re = async () => {
1924
+ if (r.value)
1925
1925
  Array.isArray(s.value) ? _.value = [...s.value] : (_.value = s.value == null ? [] : [s.value], s.value = [..._.value]), !l.options?.length && l.data && await ye(_.value);
1926
1926
  else {
1927
1927
  if (Array.isArray(s.value)) {
1928
1928
  const k = s.value[0] ?? null;
1929
1929
  s.value = k ?? null;
1930
1930
  }
1931
- f.value = await te(s.value);
1931
+ v.value = await te(s.value);
1932
1932
  }
1933
1933
  };
1934
1934
  se(s, () => {
1935
- Te();
1935
+ Re();
1936
1936
  }), ue(async () => {
1937
- addEventListener("keydown", ce), addEventListener("scroll", Re, !0), document.addEventListener("click", Ue, !0), l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z("")), await Te();
1937
+ addEventListener("keydown", ce), addEventListener("scroll", Te, !0), document.addEventListener("click", Ue, !0), l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z("")), await Re();
1938
1938
  }), et(() => {
1939
- removeEventListener("keydown", ce), removeEventListener("scroll", Re, !0), document.removeEventListener("click", Ue, !0);
1939
+ removeEventListener("keydown", ce), removeEventListener("scroll", Te, !0), document.removeEventListener("click", Ue, !0);
1940
1940
  });
1941
1941
  async function nt() {
1942
1942
  if (!l.add) return;
@@ -1945,13 +1945,13 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1945
1945
  method: "POST",
1946
1946
  headers: { "Content-Type": "application/json" },
1947
1947
  body: JSON.stringify(k)
1948
- }).then((w) => w.json()), !l.options?.length && l.data && (M.value = await z(D.value)));
1948
+ }).then((w) => w.json()), !l.options?.length && l.data && (M.value = await z(U.value)));
1949
1949
  }
1950
1950
  return (k, w) => (i(), u("div", {
1951
1951
  class: "flex gap-1 w-full",
1952
1952
  ref_key: "selectRoot",
1953
1953
  ref: d,
1954
- onClick: w[2] || (w[2] = ae(() => {
1954
+ onClick: w[2] || (w[2] = re(() => {
1955
1955
  }, ["stop"]))
1956
1956
  }, [
1957
1957
  t("div", {
@@ -1973,7 +1973,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1973
1973
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
1974
1974
  "border-gray-300 hover:border-gray-400",
1975
1975
  c.value || g.value ? "border-blue-500 ring-1 ring-blue-500" : "",
1976
- r.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
1976
+ a.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
1977
1977
  ]),
1978
1978
  role: "combobox",
1979
1979
  "aria-expanded": c.value,
@@ -1987,22 +1987,22 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1987
1987
  ref_key: "triggerRef",
1988
1988
  ref: p
1989
1989
  }, [
1990
- a.value && _.value.length ? (i(!0), u(Q, { key: 0 }, Y(x.value, (O) => (i(), u("div", {
1990
+ r.value && _.value.length ? (i(!0), u(Q, { key: 0 }, Y(x.value, (O) => (i(), u("div", {
1991
1991
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
1992
1992
  key: O.id
1993
1993
  }, [
1994
- t("div", hr, [
1994
+ t("div", ha, [
1995
1995
  O?.color ? (i(), u("span", {
1996
1996
  key: 0,
1997
1997
  class: "w-[16px] h-[16px] rounded-md block ml-1.5",
1998
1998
  style: fe({ backgroundColor: O?.color })
1999
- }, null, 4)) : j("", !0),
2000
- t("div", gr, E(O.text), 1)
1999
+ }, null, 4)) : S("", !0),
2000
+ t("div", ga, E(O.text), 1)
2001
2001
  ]),
2002
2002
  t("div", {
2003
2003
  role: "button",
2004
2004
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
2005
- onClick: ae((W) => y(O.id), ["stop"])
2005
+ onClick: re((W) => y(O.id), ["stop"])
2006
2006
  }, w[3] || (w[3] = [
2007
2007
  t("svg", {
2008
2008
  height: "14",
@@ -2014,18 +2014,18 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2014
2014
  }, [
2015
2015
  t("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" })
2016
2016
  ], -1)
2017
- ]), 8, br)
2018
- ]))), 128)) : !a.value && f.value?.text && D.value === "" ? (i(), u("div", yr, [
2019
- f.value?.color ? (i(), u("span", {
2017
+ ]), 8, ba)
2018
+ ]))), 128)) : !r.value && v.value?.text && U.value === "" ? (i(), u("div", ya, [
2019
+ v.value?.color ? (i(), u("span", {
2020
2020
  key: 0,
2021
2021
  class: "w-[14px] h-[14px] rounded-md block mr-1 mt-0.5",
2022
- style: fe({ backgroundColor: f.value?.color })
2023
- }, null, 4)) : j("", !0),
2024
- oe(" " + E(f.value.text), 1)
2025
- ])) : j("", !0),
2026
- J.value ? (i(), u("div", xr, E(h.value), 1)) : j("", !0),
2027
- t("div", wr, [
2028
- !r.value && k.search ? K((i(), u("input", {
2022
+ style: fe({ backgroundColor: v.value?.color })
2023
+ }, null, 4)) : S("", !0),
2024
+ oe(" " + E(v.value.text), 1)
2025
+ ])) : S("", !0),
2026
+ J.value ? (i(), u("div", xa, E(h.value), 1)) : S("", !0),
2027
+ t("div", wa, [
2028
+ !a.value && k.search ? K((i(), u("input", {
2029
2029
  key: 0,
2030
2030
  ref_key: "inputRef",
2031
2031
  ref: P,
@@ -2037,24 +2037,24 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2037
2037
  type: "text",
2038
2038
  tabindex: "0",
2039
2039
  "aria-autocomplete": "list",
2040
- placeholder: a.value && _.value.length ? "" : void 0,
2041
- "onUpdate:modelValue": w[0] || (w[0] = (O) => D.value = O),
2040
+ placeholder: r.value && _.value.length ? "" : void 0,
2041
+ "onUpdate:modelValue": w[0] || (w[0] = (O) => U.value = O),
2042
2042
  onFocus: he,
2043
2043
  onBlur: ge,
2044
2044
  onKeydown: de
2045
- }, null, 40, kr)), [
2046
- [ne, D.value]
2047
- ]) : j("", !0)
2045
+ }, null, 40, ka)), [
2046
+ [ne, U.value]
2047
+ ]) : S("", !0)
2048
2048
  ])
2049
2049
  ], 512),
2050
- t("div", _r, [
2050
+ t("div", _a, [
2051
2051
  C.value ? (i(), u("button", {
2052
2052
  key: 0,
2053
2053
  type: "button",
2054
2054
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2055
2055
  "aria-hidden": "true",
2056
- disabled: r.value,
2057
- onClick: ae(b, ["stop"])
2056
+ disabled: a.value,
2057
+ onClick: re(b, ["stop"])
2058
2058
  }, w[4] || (w[4] = [
2059
2059
  t("svg", {
2060
2060
  height: "20",
@@ -2064,14 +2064,14 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2064
2064
  }, [
2065
2065
  t("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" })
2066
2066
  ], -1)
2067
- ]), 8, $r)) : j("", !0),
2067
+ ]), 8, $a)) : S("", !0),
2068
2068
  w[6] || (w[6] = t("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2069
2069
  t("button", {
2070
2070
  type: "button",
2071
2071
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2072
2072
  "aria-hidden": "true",
2073
- disabled: r.value,
2074
- onClick: w[1] || (w[1] = ae((O) => Ie(), ["stop"]))
2073
+ disabled: a.value,
2074
+ onClick: w[1] || (w[1] = re((O) => Ae(), ["stop"]))
2075
2075
  }, w[5] || (w[5] = [
2076
2076
  t("svg", {
2077
2077
  height: "20",
@@ -2081,19 +2081,19 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2081
2081
  }, [
2082
2082
  t("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" })
2083
2083
  ], -1)
2084
- ]), 8, Cr)
2084
+ ]), 8, Ca)
2085
2085
  ])
2086
- ], 42, mr),
2087
- c.value ? (i(), u("div", Vr, [
2086
+ ], 42, ma),
2087
+ c.value ? (i(), u("div", Va, [
2088
2088
  t("div", {
2089
2089
  class: "max-h-[300px] overflow-y-auto py-1",
2090
2090
  ref_key: "listRef",
2091
- ref: v
2091
+ ref: f
2092
2092
  }, [
2093
2093
  V.value.length ? (i(!0), u(Q, { key: 0 }, Y(V.value, (O, W) => (i(), u("div", {
2094
2094
  key: O.id,
2095
2095
  ref_for: !0,
2096
- ref: (be) => T.value[W] = be,
2096
+ ref: (be) => F.value[W] = be,
2097
2097
  class: B([
2098
2098
  "flex px-3 py-2 cursor-default select-none hover:bg-blue-300",
2099
2099
  m(O.id) ? "text-white bg-blue-500" : "text-gray-900 bg-white"
@@ -2107,35 +2107,35 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2107
2107
  key: 0,
2108
2108
  class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2109
2109
  style: fe({ backgroundColor: O?.color })
2110
- }, null, 4)) : j("", !0),
2110
+ }, null, 4)) : S("", !0),
2111
2111
  t("div", {
2112
2112
  class: B([
2113
2113
  "leading-[19px]",
2114
- S.value === O.id ? "text-white" : "",
2114
+ I.value === O.id ? "text-white" : "",
2115
2115
  // active style like react-select
2116
- (S.value === W, "")
2116
+ (I.value === W, "")
2117
2117
  ])
2118
2118
  }, E(O.text), 3)
2119
- ], 10, Mr))), 128)) : (i(), u("div", Lr, " No options "))
2119
+ ], 10, Ma))), 128)) : (i(), u("div", La, " No options "))
2120
2120
  ], 512)
2121
- ])) : j("", !0)
2121
+ ])) : S("", !0)
2122
2122
  ], 2),
2123
2123
  l.add ? (i(), u("button", {
2124
2124
  key: 0,
2125
2125
  onClick: nt,
2126
2126
  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",
2127
- disabled: r.value,
2127
+ disabled: a.value,
2128
2128
  type: "button"
2129
2129
  }, [
2130
- A(je, {
2130
+ j(je, {
2131
2131
  width: "16",
2132
2132
  height: "16"
2133
2133
  }),
2134
2134
  w[9] || (w[9] = t("span", null, "Додати", -1))
2135
- ], 8, Br)) : j("", !0)
2135
+ ], 8, Ba)) : S("", !0)
2136
2136
  ], 512));
2137
2137
  }
2138
- }), jr = ["placeholder", "disabled"], Ar = /* @__PURE__ */ I({
2138
+ }), ja = ["placeholder", "disabled"], Ia = /* @__PURE__ */ A({
2139
2139
  __name: "vs-input-textarea",
2140
2140
  props: /* @__PURE__ */ q({
2141
2141
  style: { default: () => ({}) },
@@ -2152,20 +2152,20 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2152
2152
  emits: ["update:modelValue"],
2153
2153
  setup(o) {
2154
2154
  const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
2155
- return (a, r) => K((i(), u("textarea", {
2156
- "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
2157
- placeholder: a.placeholder,
2158
- disabled: a.disabled,
2155
+ return (r, a) => K((i(), u("textarea", {
2156
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
2157
+ placeholder: r.placeholder,
2158
+ disabled: r.disabled,
2159
2159
  row: "2",
2160
2160
  class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [H(l)]]),
2161
2161
  style: {
2162
2162
  border: "1px solid #CFD9E0"
2163
2163
  }
2164
- }, null, 10, jr)), [
2164
+ }, null, 10, ja)), [
2165
2165
  [ne, n.value]
2166
2166
  ]);
2167
2167
  }
2168
- }), Ir = {}, zr = {
2168
+ }), Aa = {}, za = {
2169
2169
  xmlns: "http://www.w3.org/2000/svg",
2170
2170
  viewBox: "0 0 24 24",
2171
2171
  fill: "none",
@@ -2175,8 +2175,8 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2175
2175
  "stroke-linejoin": "round",
2176
2176
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
2177
2177
  };
2178
- function Or(o, e) {
2179
- return i(), u("svg", zr, e[0] || (e[0] = [
2178
+ function Oa(o, e) {
2179
+ return i(), u("svg", za, e[0] || (e[0] = [
2180
2180
  t("path", {
2181
2181
  stroke: "none",
2182
2182
  d: "M0 0h24v24H0z",
@@ -2186,7 +2186,7 @@ function Or(o, e) {
2186
2186
  t("path", { d: "M21 21l-6 -6" }, null, -1)
2187
2187
  ]));
2188
2188
  }
2189
- const Er = /* @__PURE__ */ R(Ir, [["render", Or]]), Fr = {}, Dr = {
2189
+ const Ea = /* @__PURE__ */ R(Aa, [["render", Oa]]), Fa = {}, Da = {
2190
2190
  class: "flex-shrink-0 mt-0.5 size-3.5",
2191
2191
  xmlns: "http://www.w3.org/2000/svg",
2192
2192
  viewBox: "0 0 24 24",
@@ -2196,15 +2196,15 @@ const Er = /* @__PURE__ */ R(Ir, [["render", Or]]), Fr = {}, Dr = {
2196
2196
  "stroke-linecap": "round",
2197
2197
  "stroke-linejoin": "round"
2198
2198
  };
2199
- function Ur(o, e) {
2200
- return i(), u("svg", Dr, e[0] || (e[0] = [
2199
+ function Ua(o, e) {
2200
+ return i(), u("svg", Da, e[0] || (e[0] = [
2201
2201
  t("path", { d: "m3 16 4 4 4-4" }, null, -1),
2202
2202
  t("path", { d: "M7 20V4" }, null, -1),
2203
2203
  t("path", { d: "m21 8-4-4-4 4" }, null, -1),
2204
2204
  t("path", { d: "M17 4v16" }, null, -1)
2205
2205
  ]));
2206
2206
  }
2207
- const Rr = /* @__PURE__ */ R(Fr, [["render", Ur]]), Tr = {}, Pr = {
2207
+ const Ta = /* @__PURE__ */ R(Fa, [["render", Ua]]), Ra = {}, Pa = {
2208
2208
  xmlns: "http://www.w3.org/2000/svg",
2209
2209
  width: "14",
2210
2210
  height: "14",
@@ -2215,8 +2215,8 @@ const Rr = /* @__PURE__ */ R(Fr, [["render", Ur]]), Tr = {}, Pr = {
2215
2215
  "stroke-linecap": "round",
2216
2216
  "stroke-linejoin": "round"
2217
2217
  };
2218
- function Nr(o, e) {
2219
- return i(), u("svg", Pr, e[0] || (e[0] = [
2218
+ function Na(o, e) {
2219
+ return i(), u("svg", Pa, e[0] || (e[0] = [
2220
2220
  t("path", {
2221
2221
  stroke: "none",
2222
2222
  d: "M0 0h24v24H0z",
@@ -2227,7 +2227,7 @@ function Nr(o, e) {
2227
2227
  t("path", { d: "M12 4l0 12" }, null, -1)
2228
2228
  ]));
2229
2229
  }
2230
- const Hr = /* @__PURE__ */ R(Tr, [["render", Nr]]), qr = {}, Gr = {
2230
+ const Ha = /* @__PURE__ */ R(Ra, [["render", Na]]), qa = {}, Ga = {
2231
2231
  xmlns: "http://www.w3.org/2000/svg",
2232
2232
  viewBox: "0 0 24 24",
2233
2233
  fill: "none",
@@ -2236,8 +2236,8 @@ const Hr = /* @__PURE__ */ R(Tr, [["render", Nr]]), qr = {}, Gr = {
2236
2236
  "stroke-linecap": "round",
2237
2237
  "stroke-linejoin": "round"
2238
2238
  };
2239
- function Jr(o, e) {
2240
- return i(), u("svg", Gr, e[0] || (e[0] = [
2239
+ function Ja(o, e) {
2240
+ return i(), u("svg", Ga, e[0] || (e[0] = [
2241
2241
  t("path", {
2242
2242
  stroke: "none",
2243
2243
  d: "M0 0h24v24H0z",
@@ -2248,7 +2248,7 @@ function Jr(o, e) {
2248
2248
  t("path", { d: "M12 4l0 12" }, null, -1)
2249
2249
  ]));
2250
2250
  }
2251
- const Kr = /* @__PURE__ */ R(qr, [["render", Jr]]), Zr = {}, Wr = {
2251
+ const Ka = /* @__PURE__ */ R(qa, [["render", Ja]]), Za = {}, Wa = {
2252
2252
  xmlns: "http://www.w3.org/2000/svg",
2253
2253
  viewBox: "0 0 24 24",
2254
2254
  fill: "none",
@@ -2257,22 +2257,22 @@ const Kr = /* @__PURE__ */ R(qr, [["render", Jr]]), Zr = {}, Wr = {
2257
2257
  "stroke-linecap": "round",
2258
2258
  "stroke-linejoin": "round"
2259
2259
  };
2260
- function Qr(o, e) {
2261
- return i(), u("svg", Wr, e[0] || (e[0] = [
2262
- re('<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)
2260
+ function Qa(o, e) {
2261
+ return i(), u("svg", Wa, e[0] || (e[0] = [
2262
+ ae('<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)
2263
2263
  ]));
2264
2264
  }
2265
- const Ze = /* @__PURE__ */ R(Zr, [["render", Qr]]), Xr = {}, Yr = {
2265
+ const Ze = /* @__PURE__ */ R(Za, [["render", Qa]]), Xa = {}, Ya = {
2266
2266
  viewBox: "0 0 178 90",
2267
2267
  fill: "none",
2268
2268
  xmlns: "http://www.w3.org/2000/svg"
2269
2269
  };
2270
- function ea(o, e) {
2271
- return i(), u("svg", Yr, e[0] || (e[0] = [
2272
- re('<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)
2270
+ function er(o, e) {
2271
+ return i(), u("svg", Ya, e[0] || (e[0] = [
2272
+ ae('<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)
2273
2273
  ]));
2274
2274
  }
2275
- const ta = /* @__PURE__ */ R(Xr, [["render", ea]]), la = {}, oa = {
2275
+ const tr = /* @__PURE__ */ R(Xa, [["render", er]]), lr = {}, or = {
2276
2276
  xmlns: "http://www.w3.org/2000/svg",
2277
2277
  viewBox: "0 0 24 24",
2278
2278
  fill: "none",
@@ -2281,16 +2281,16 @@ const ta = /* @__PURE__ */ R(Xr, [["render", ea]]), la = {}, oa = {
2281
2281
  "stroke-linecap": "round",
2282
2282
  "stroke-linejoin": "round"
2283
2283
  };
2284
- function ra(o, e) {
2285
- return i(), u("svg", oa, e[0] || (e[0] = [
2284
+ function ar(o, e) {
2285
+ return i(), u("svg", or, e[0] || (e[0] = [
2286
2286
  t("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)
2287
2287
  ]));
2288
2288
  }
2289
- const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable border rounded-xl w-full flex-grow" }, na = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ia = { class: "relative w-full" }, ua = { class: "table-wrapper flex gap-2" }, da = { class: "vs-popover inline-block text-slate-700" }, ca = { class: "text-center" }, pa = { class: "" }, fa = { class: "py-2 px-4 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" }, va = { class: "flex flex-col p-[2px] gap-[2px] w-[140px]" }, ma = { class: "text-sm items-center text-gray-800 flex gap-1" }, ha = { class: "w-full overflow-x-auto" }, ga = { class: "w-full table-auto caption-bottom text-sm" }, ba = { class: "[&_tr]:border-b" }, ya = { 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" }, xa = { 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" }, wa = {
2289
+ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable border rounded-xl w-full flex-grow" }, nr = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ir = { class: "relative w-full" }, ur = { class: "table-wrapper flex gap-2" }, dr = { class: "vs-popover inline-block text-slate-700" }, cr = { class: "text-center" }, pr = { class: "" }, fr = { 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" }, vr = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, mr = { class: "text-sm items-center text-gray-800 flex gap-1" }, hr = { class: "w-full overflow-x-auto" }, gr = { class: "w-full table-auto caption-bottom text-sm" }, br = { class: "[&_tr]:border-b" }, yr = { 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" }, xr = { 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" }, wr = {
2290
2290
  key: 0,
2291
2291
  colspan: "100%",
2292
2292
  class: "text-center"
2293
- }, ka = { class: "w-full" }, _a = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, $a = ["onDragstart", "onDragover", "onDrop"], Ca = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Va = { class: "flex items-center justify-center" }, Ma = { 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" }, La = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Ba = { class: "flex items-center justify-center gap-2" }, Sa = ["onClick"], ja = ["onClick"], Aa = /* @__PURE__ */ I({
2293
+ }, kr = { class: "w-full" }, _r = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, $r = ["onDragstart", "onDragover", "onDrop"], Cr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Vr = { class: "flex items-center justify-center" }, Mr = { 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" }, Lr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Br = { class: "flex items-center justify-center gap-2" }, Sr = ["onClick"], jr = ["onClick"], Ir = /* @__PURE__ */ A({
2294
2294
  __name: "vs-input-datatable",
2295
2295
  props: /* @__PURE__ */ q({
2296
2296
  colModel: {},
@@ -2307,16 +2307,16 @@ const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable
2307
2307
  }),
2308
2308
  emits: ["update:modelValue"],
2309
2309
  setup(o) {
2310
- const e = o, l = G(o, "modelValue"), n = $({}), a = $(""), r = F(() => {
2311
- if (!a.value) return l.value ?? [];
2312
- const C = a.value.toLowerCase();
2310
+ const e = o, l = G(o, "modelValue"), n = $({}), r = $(""), a = D(() => {
2311
+ if (!r.value) return l.value ?? [];
2312
+ const C = r.value.toLowerCase();
2313
2313
  return l.value.filter((m) => e.colModel?.some((V) => {
2314
2314
  const z = m[V.key];
2315
2315
  return z ? Array.isArray(z) ? z.join(", ").toLowerCase().includes(C) : String(z).toLowerCase().includes(C) : !1;
2316
2316
  }));
2317
- }), s = $(null), d = $(null), p = $(!1), v = $(null), c = $({ top: 0, left: 0 }), g = (C) => {
2317
+ }), s = $(null), d = $(null), p = $(!1), f = $(null), c = $({ top: 0, left: 0 }), g = (C) => {
2318
2318
  s.value = C;
2319
- }, f = (C) => {
2319
+ }, v = (C) => {
2320
2320
  d.value = C;
2321
2321
  }, M = (C) => {
2322
2322
  if (s.value === null || s.value === C) {
@@ -2325,12 +2325,12 @@ const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable
2325
2325
  }
2326
2326
  const m = [...l.value], [V] = m.splice(s.value, 1);
2327
2327
  m.splice(C, 0, V), l.value = m, s.value = null, d.value = null;
2328
- }, S = (C) => {
2328
+ }, I = (C) => {
2329
2329
  const V = C.currentTarget.getBoundingClientRect();
2330
2330
  c.value = { top: V.bottom + window.scrollY, left: V.left + window.scrollX }, p.value = !p.value;
2331
- }, T = () => {
2332
- v.value && v.value.click();
2333
- }, D = (C) => {
2331
+ }, F = () => {
2332
+ f.value && f.value.click();
2333
+ }, U = (C) => {
2334
2334
  const V = C.target.files?.[0];
2335
2335
  if (!V) return;
2336
2336
  const z = new FileReader();
@@ -2376,40 +2376,40 @@ const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable
2376
2376
  function J(C) {
2377
2377
  l.value = l.value.filter((m, V) => V !== C);
2378
2378
  }
2379
- return (C, m) => (i(), u("div", sa, [
2380
- t("div", na, [
2381
- t("div", ia, [
2382
- A(Er, {
2379
+ return (C, m) => (i(), u("div", sr, [
2380
+ t("div", nr, [
2381
+ t("div", ir, [
2382
+ j(Ea, {
2383
2383
  width: "14",
2384
2384
  height: "14",
2385
2385
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
2386
2386
  }),
2387
2387
  K(t("input", {
2388
2388
  type: "text",
2389
- "onUpdate:modelValue": m[0] || (m[0] = (V) => a.value = V),
2389
+ "onUpdate:modelValue": m[0] || (m[0] = (V) => r.value = V),
2390
2390
  placeholder: "Пошук",
2391
2391
  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"
2392
2392
  }, null, 512), [
2393
- [ne, a.value]
2393
+ [ne, r.value]
2394
2394
  ])
2395
2395
  ]),
2396
- t("div", ua, [
2396
+ t("div", ur, [
2397
2397
  t("input", {
2398
2398
  ref_key: "fileInput",
2399
- ref: v,
2400
- onChange: D,
2399
+ ref: f,
2400
+ onChange: U,
2401
2401
  class: "hidden",
2402
2402
  accept: ".json",
2403
2403
  type: "file"
2404
2404
  }, null, 544),
2405
- t("div", da, [
2406
- t("div", ca, [
2407
- t("div", pa, [
2405
+ t("div", dr, [
2406
+ t("div", cr, [
2407
+ t("div", pr, [
2408
2408
  t("button", {
2409
- onClick: S,
2409
+ onClick: I,
2410
2410
  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"
2411
2411
  }, [
2412
- A(Rr, {
2412
+ j(Ta, {
2413
2413
  height: "16",
2414
2414
  width: "16"
2415
2415
  })
@@ -2424,50 +2424,50 @@ const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable
2424
2424
  class: "text-slate-700 vsTailwind vs-popover__content bottom",
2425
2425
  style: fe([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
2426
2426
  }, [
2427
- t("div", fa, [
2428
- t("div", va, [
2427
+ t("div", fr, [
2428
+ t("div", vr, [
2429
2429
  t("button", {
2430
- onClick: T,
2431
- class: "text-slate-700 flex items-center gap-1 px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100"
2430
+ onClick: F,
2431
+ class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2432
2432
  }, [
2433
- A(Hr, {
2433
+ j(Ha, {
2434
2434
  class: "text-black",
2435
2435
  width: "14",
2436
2436
  height: "14"
2437
2437
  }),
2438
- m[1] || (m[1] = oe(" Імпортувати ", -1))
2438
+ m[1] || (m[1] = oe(" Імпортувати "))
2439
2439
  ]),
2440
2440
  t("button", {
2441
2441
  onClick: P,
2442
- class: "text-slate-700 flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100"
2442
+ class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2443
2443
  }, [
2444
- t("span", ma, [
2445
- A(Kr, {
2444
+ t("span", mr, [
2445
+ j(Ka, {
2446
2446
  class: "text-black",
2447
2447
  width: "14",
2448
2448
  height: "14"
2449
2449
  }),
2450
- m[2] || (m[2] = oe(" Експортувати ", -1))
2450
+ m[2] || (m[2] = oe(" Експортувати "))
2451
2451
  ])
2452
2452
  ])
2453
2453
  ])
2454
2454
  ])
2455
- ], 4)) : j("", !0)
2455
+ ], 4)) : S("", !0)
2456
2456
  ])),
2457
2457
  t("button", {
2458
2458
  onClick: _,
2459
2459
  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"
2460
2460
  }, [
2461
- A(je),
2462
- m[3] || (m[3] = oe(" Додати ", -1))
2461
+ j(je),
2462
+ m[3] || (m[3] = oe(" Додати "))
2463
2463
  ])
2464
2464
  ]),
2465
- t("div", ha, [
2466
- t("table", ga, [
2467
- t("thead", ba, [
2468
- t("tr", ya, [
2469
- t("th", xa, [
2470
- A(Ze, {
2465
+ t("div", hr, [
2466
+ t("table", gr, [
2467
+ t("thead", br, [
2468
+ t("tr", yr, [
2469
+ t("th", xr, [
2470
+ j(Ze, {
2471
2471
  width: "24",
2472
2472
  height: "24",
2473
2473
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
@@ -2476,25 +2476,25 @@ const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable
2476
2476
  (i(!0), u(Q, null, Y(C.colModel, (V) => (i(), u("th", {
2477
2477
  key: V.key,
2478
2478
  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]"
2479
- }, E(V.ua), 1))), 128)),
2479
+ }, E(V.ua || V.label), 1))), 128)),
2480
2480
  m[4] || (m[4] = t("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))
2481
2481
  ])
2482
2482
  ]),
2483
2483
  t("tbody", {
2484
2484
  class: B({ "[&_tr:last-child]:border-0": !d.value })
2485
2485
  }, [
2486
- r.value.length === 0 ? (i(), u("td", wa, [
2487
- t("div", ka, [
2488
- t("div", _a, [
2489
- A(ta, { class: "w-48 mx-auto" }),
2486
+ a.value.length === 0 ? (i(), u("td", wr, [
2487
+ t("div", kr, [
2488
+ t("div", _r, [
2489
+ j(tr, { class: "w-48 mx-auto" }),
2490
2490
  m[5] || (m[5] = t("div", { class: "max-w-sm mx-auto mt-6" }, [
2491
2491
  t("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2492
2492
  t("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2493
2493
  ], -1))
2494
2494
  ])
2495
2495
  ])
2496
- ])) : j("", !0),
2497
- (i(!0), u(Q, null, Y(r.value, (V, z) => (i(), u("tr", {
2496
+ ])) : S("", !0),
2497
+ (i(!0), u(Q, null, Y(a.value, (V, z) => (i(), u("tr", {
2498
2498
  key: V.id,
2499
2499
  class: B(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2500
2500
  "opacity-50": s.value === z,
@@ -2502,12 +2502,12 @@ const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable
2502
2502
  }]),
2503
2503
  draggable: "true",
2504
2504
  onDragstart: (Z) => g(z),
2505
- onDragover: ae((Z) => f(z), ["prevent"]),
2505
+ onDragover: re((Z) => v(z), ["prevent"]),
2506
2506
  onDrop: (Z) => M(z)
2507
2507
  }, [
2508
- t("td", Ca, [
2509
- t("div", Va, [
2510
- A(Ze, {
2508
+ t("td", Cr, [
2509
+ t("div", Vr, [
2510
+ j(Ze, {
2511
2511
  width: "24",
2512
2512
  height: "24",
2513
2513
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
@@ -2518,39 +2518,39 @@ const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable
2518
2518
  key: Z.key,
2519
2519
  class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
2520
2520
  }, [
2521
- t("div", Ma, E(x(V, Z)), 1)
2521
+ t("div", Mr, E(x(V, Z)), 1)
2522
2522
  ]))), 128)),
2523
- t("td", La, [
2524
- t("div", Ba, [
2523
+ t("td", Lr, [
2524
+ t("div", Br, [
2525
2525
  t("button", {
2526
2526
  onClick: (Z) => h(V, z),
2527
2527
  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"
2528
2528
  }, [
2529
- A(aa, {
2529
+ j(rr, {
2530
2530
  width: "24",
2531
2531
  height: "24",
2532
2532
  class: "w-3 h-3"
2533
2533
  })
2534
- ], 8, Sa),
2534
+ ], 8, Sr),
2535
2535
  t("button", {
2536
2536
  onClick: (Z) => J(z),
2537
2537
  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"
2538
2538
  }, [
2539
- A(Ae, {
2539
+ j(Ie, {
2540
2540
  width: "24",
2541
2541
  height: "24",
2542
2542
  class: "w-3 h-3"
2543
2543
  })
2544
- ], 8, ja)
2544
+ ], 8, jr)
2545
2545
  ])
2546
2546
  ])
2547
- ], 42, $a))), 128))
2547
+ ], 42, $r))), 128))
2548
2548
  ], 2)
2549
2549
  ])
2550
2550
  ])
2551
2551
  ]));
2552
2552
  }
2553
- }), Ia = {
2553
+ }), Ar = {
2554
2554
  draw: {
2555
2555
  toolbar: {
2556
2556
  actions: {
@@ -2658,7 +2658,7 @@ const aa = /* @__PURE__ */ R(la, [["render", ra]]), sa = { class: "vs-datatable
2658
2658
  }
2659
2659
  }
2660
2660
  };
2661
- function za(o) {
2661
+ function zr(o) {
2662
2662
  return o ? o.type === "FeatureCollection" || o.type === "Feature" ? o : o.geom ? {
2663
2663
  type: "Feature",
2664
2664
  geometry: {
@@ -2672,7 +2672,7 @@ function za(o) {
2672
2672
  properties: {}
2673
2673
  } : null : null;
2674
2674
  }
2675
- const Oa = {}, Ea = {
2675
+ const Or = {}, Er = {
2676
2676
  xmlns: "http://www.w3.org/2000/svg",
2677
2677
  viewBox: "0 0 24 24",
2678
2678
  stroke: "currentColor",
@@ -2682,8 +2682,8 @@ const Oa = {}, Ea = {
2682
2682
  "stroke-linejoin": "round",
2683
2683
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
2684
2684
  };
2685
- function Fa(o, e) {
2686
- return i(), u("svg", Ea, e[0] || (e[0] = [
2685
+ function Fr(o, e) {
2686
+ return i(), u("svg", Er, e[0] || (e[0] = [
2687
2687
  t("path", {
2688
2688
  stroke: "none",
2689
2689
  d: "M0 0h24v24H0z",
@@ -2693,7 +2693,7 @@ function Fa(o, e) {
2693
2693
  t("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)
2694
2694
  ]));
2695
2695
  }
2696
- const Da = /* @__PURE__ */ R(Oa, [["render", Fa]]), Ua = {}, Ra = {
2696
+ const Dr = /* @__PURE__ */ R(Or, [["render", Fr]]), Ur = {}, Tr = {
2697
2697
  xmlns: "http://www.w3.org/2000/svg",
2698
2698
  viewBox: "0 0 24 24",
2699
2699
  fill: "none",
@@ -2703,8 +2703,8 @@ const Da = /* @__PURE__ */ R(Oa, [["render", Fa]]), Ua = {}, Ra = {
2703
2703
  "stroke-linejoin": "round",
2704
2704
  class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
2705
2705
  };
2706
- function Ta(o, e) {
2707
- return i(), u("svg", Ra, e[0] || (e[0] = [
2706
+ function Rr(o, e) {
2707
+ return i(), u("svg", Tr, e[0] || (e[0] = [
2708
2708
  t("path", {
2709
2709
  stroke: "none",
2710
2710
  d: "M0 0h24v24H0z",
@@ -2715,7 +2715,7 @@ function Ta(o, e) {
2715
2715
  t("path", { d: "M7.5 16.5l9 -9" }, null, -1)
2716
2716
  ]));
2717
2717
  }
2718
- const Pa = /* @__PURE__ */ R(Ua, [["render", Ta]]), Na = {}, Ha = {
2718
+ const Pr = /* @__PURE__ */ R(Ur, [["render", Rr]]), Nr = {}, Hr = {
2719
2719
  xmlns: "http://www.w3.org/2000/svg",
2720
2720
  viewBox: "0 0 24 24",
2721
2721
  fill: "none",
@@ -2725,12 +2725,12 @@ const Pa = /* @__PURE__ */ R(Ua, [["render", Ta]]), Na = {}, Ha = {
2725
2725
  "stroke-linejoin": "round",
2726
2726
  class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
2727
2727
  };
2728
- function qa(o, e) {
2729
- return i(), u("svg", Ha, e[0] || (e[0] = [
2730
- re('<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)
2728
+ function qr(o, e) {
2729
+ return i(), u("svg", Hr, e[0] || (e[0] = [
2730
+ ae('<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)
2731
2731
  ]));
2732
2732
  }
2733
- const Ga = /* @__PURE__ */ R(Na, [["render", qa]]), Ja = {}, Ka = {
2733
+ const Gr = /* @__PURE__ */ R(Nr, [["render", qr]]), Jr = {}, Kr = {
2734
2734
  xmlns: "http://www.w3.org/2000/svg",
2735
2735
  viewBox: "0 0 24 24",
2736
2736
  fill: "none",
@@ -2740,12 +2740,12 @@ const Ga = /* @__PURE__ */ R(Na, [["render", qa]]), Ja = {}, Ka = {
2740
2740
  "stroke-linejoin": "round",
2741
2741
  class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
2742
2742
  };
2743
- function Za(o, e) {
2744
- return i(), u("svg", Ka, e[0] || (e[0] = [
2745
- re('<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)
2743
+ function Zr(o, e) {
2744
+ return i(), u("svg", Kr, e[0] || (e[0] = [
2745
+ ae('<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)
2746
2746
  ]));
2747
2747
  }
2748
- const Wa = /* @__PURE__ */ R(Ja, [["render", Za]]), Qa = {}, Xa = {
2748
+ const Wr = /* @__PURE__ */ R(Jr, [["render", Zr]]), Qr = {}, Xr = {
2749
2749
  version: "1.1",
2750
2750
  viewBox: "0 0 14 14",
2751
2751
  xmlns: "http://www.w3.org/2000/svg",
@@ -2753,8 +2753,8 @@ const Wa = /* @__PURE__ */ R(Ja, [["render", Za]]), Qa = {}, Xa = {
2753
2753
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
2754
2754
  class: "fullscreen-icon"
2755
2755
  };
2756
- function Ya(o, e) {
2757
- return i(), u("svg", Xa, e[0] || (e[0] = [
2756
+ function Yr(o, e) {
2757
+ return i(), u("svg", Xr, e[0] || (e[0] = [
2758
2758
  t("title", null, null, -1),
2759
2759
  t("desc", null, null, -1),
2760
2760
  t("defs", null, null, -1),
@@ -2783,7 +2783,7 @@ function Ya(o, e) {
2783
2783
  ], -1)
2784
2784
  ]));
2785
2785
  }
2786
- const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__search" }, ls = { class: "map-search__input" }, os = { class: "flex flex-nowrap relative" }, rs = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, as = { class: "flex items-center w-full" }, ss = { class: "max-w-[90%] truncate" }, ns = {
2786
+ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__search" }, ls = { class: "map-search__input" }, os = { class: "flex flex-nowrap relative" }, as = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, rs = { class: "flex items-center w-full" }, ss = { class: "max-w-[90%] truncate" }, ns = {
2787
2787
  key: 0,
2788
2788
  class: "absolute z-[3100] mt-0.5 left-0 right-0"
2789
2789
  }, is = { class: "form-autocomplete__wrapper mt-[10px] z-50 w-full min-w-36 max-h-72 p-0 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-900 top-full opened" }, us = { class: "form-autocomplete__list vsTailwind px-2 pb-2 pt-0 max-h-200 relative [&::-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 dark:bg-neutral-900" }, ds = ["onClick"], cs = { class: "flex justify-between items-center w-full" }, ps = { class: "flex items-center" }, fs = {
@@ -2806,51 +2806,51 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2806
2806
  }, xs = {
2807
2807
  key: 2,
2808
2808
  class: "px-3 py-2 text-xs text-gray-400"
2809
- }, ws = /* @__PURE__ */ I({
2809
+ }, ws = /* @__PURE__ */ A({
2810
2810
  __name: "map-search",
2811
2811
  props: {
2812
2812
  placeholder: { default: "50, 30" }
2813
2813
  },
2814
2814
  emits: ["goToCoordinates"],
2815
2815
  setup(o, { emit: e }) {
2816
- const l = e, n = $(!1), a = $("coordinates"), r = $(""), s = $([]), d = $(!1), p = $(!1);
2817
- let v;
2816
+ const l = e, n = $(!1), r = $("coordinates"), a = $(""), s = $([]), d = $(!1), p = $(!1);
2817
+ let f;
2818
2818
  const c = [
2819
2819
  { value: "coordinates", label: "Пошук по кординатам" },
2820
2820
  { value: "atu", label: "АТУ" },
2821
2821
  { value: "address", label: "Адресса" },
2822
2822
  { value: "search_here", label: "Пошук HERE" }
2823
- ], g = F(() => c.find((_) => _.value === a.value)?.label ?? "АТУ");
2824
- function f(_) {
2825
- a.value = _.value, n.value = !1, r.value = "", r.value && T();
2823
+ ], g = D(() => c.find((_) => _.value === r.value)?.label ?? "АТУ");
2824
+ function v(_) {
2825
+ r.value = _.value, n.value = !1, a.value = "", a.value && F();
2826
2826
  }
2827
2827
  function M(_) {
2828
2828
  _.target.closest(".map-search__input") || (n.value = !1);
2829
2829
  }
2830
2830
  ue(() => document.addEventListener("click", M)), et(() => document.removeEventListener("click", M));
2831
- async function S(_) {
2831
+ async function I(_) {
2832
2832
  let x;
2833
- a.value === "atu" ? x = "/api/suggest/atu.nsdi.ato_level" : a.value === "address" ? x = "/api/suggest/map.address_id" : a.value === "search_here" && (x = "/api/gis-url-proxy");
2833
+ r.value === "atu" ? x = "/api/suggest/atu.nsdi.ato_level" : r.value === "address" ? x = "/api/suggest/map.address_id" : r.value === "search_here" && (x = "/api/gis-url-proxy");
2834
2834
  const h = new URL(x || "");
2835
- return a.value === "search_here" ? h.searchParams.set("searchtext", _) : (a.value === "atu" || a.value === "address") && h.searchParams.set("key", _), h.searchParams.set("limit", "20"), h.searchParams.set("q", _), (await fetch(h.toString())).json();
2835
+ return r.value === "search_here" ? h.searchParams.set("searchtext", _) : (r.value === "atu" || r.value === "address") && h.searchParams.set("key", _), h.searchParams.set("limit", "20"), h.searchParams.set("q", _), (await fetch(h.toString())).json();
2836
2836
  }
2837
- function T() {
2838
- if (d.value = !0, p.value = !0, a.value === "coordinates") {
2839
- const _ = r.value.trim().split(",");
2837
+ function F() {
2838
+ if (d.value = !0, p.value = !0, r.value === "coordinates") {
2839
+ const _ = a.value.trim().split(",");
2840
2840
  if (_.length === 2) {
2841
2841
  const x = parseFloat(_[0]), h = parseFloat(_[1]);
2842
2842
  !Number.isNaN(x) && !Number.isNaN(h) && l("goToCoordinates", [x, h]);
2843
2843
  }
2844
2844
  return;
2845
2845
  }
2846
- v && window.clearTimeout(v), v = window.setTimeout(async () => {
2847
- const _ = r.value.trim();
2846
+ f && window.clearTimeout(f), f = window.setTimeout(async () => {
2847
+ const _ = a.value.trim();
2848
2848
  if (!_) {
2849
2849
  s.value = [], p.value = !1;
2850
2850
  return;
2851
2851
  }
2852
2852
  try {
2853
- const x = await S(_);
2853
+ const x = await I(_);
2854
2854
  s.value = Array.isArray(x.features) ? x.features : [];
2855
2855
  } catch {
2856
2856
  s.value = [];
@@ -2859,8 +2859,8 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2859
2859
  }
2860
2860
  }, 300);
2861
2861
  }
2862
- function D() {
2863
- r.value = "", s.value = [], d.value = !1, p.value = !1;
2862
+ function U() {
2863
+ a.value = "", s.value = [], d.value = !1, p.value = !1;
2864
2864
  }
2865
2865
  function P(_) {
2866
2866
  l("goToCoordinates", _), d.value = !1, p.value = !1, s.value = [];
@@ -2868,13 +2868,13 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2868
2868
  return (_, x) => (i(), u("div", ts, [
2869
2869
  t("div", ls, [
2870
2870
  t("div", os, [
2871
- t("div", rs, [
2871
+ t("div", as, [
2872
2872
  t("button", {
2873
2873
  type: "button",
2874
2874
  onClick: x[0] || (x[0] = (h) => n.value = !n.value),
2875
2875
  class: "h-[40px] relative px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:outline-none focus:ring-1 focus:ring-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200"
2876
2876
  }, [
2877
- t("div", as, [
2877
+ t("div", rs, [
2878
2878
  t("span", ss, E(g.value), 1)
2879
2879
  ]),
2880
2880
  x[3] || (x[3] = t("svg", {
@@ -2896,7 +2896,7 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2896
2896
  t("div", is, [
2897
2897
  t("div", us, [
2898
2898
  (i(), u(Q, null, Y(c, (h) => t("div", {
2899
- onClick: (J) => f(h),
2899
+ onClick: (J) => v(h),
2900
2900
  key: h.value,
2901
2901
  class: "form-autocomplete__item cursor-pointer hs-selected:bg-stone-100 dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800 cursor-default"
2902
2902
  }, [
@@ -2904,14 +2904,14 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2904
2904
  t("div", ps, [
2905
2905
  t("div", null, E(h.label), 1)
2906
2906
  ]),
2907
- h.value === a.value ? (i(), u("svg", fs, x[4] || (x[4] = [
2907
+ h.value === r.value ? (i(), u("svg", fs, x[4] || (x[4] = [
2908
2908
  t("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2909
- ]))) : j("", !0)
2909
+ ]))) : S("", !0)
2910
2910
  ])
2911
2911
  ], 8, ds)), 64))
2912
2912
  ])
2913
2913
  ])
2914
- ])) : j("", !0)
2914
+ ])) : S("", !0)
2915
2915
  ]),
2916
2916
  t("div", vs, [
2917
2917
  t("div", ms, [
@@ -2940,17 +2940,17 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2940
2940
  ], -1)),
2941
2941
  K(t("input", {
2942
2942
  type: "text",
2943
- "onUpdate:modelValue": x[1] || (x[1] = (h) => r.value = h),
2944
- onInput: T,
2943
+ "onUpdate:modelValue": x[1] || (x[1] = (h) => a.value = h),
2944
+ onInput: F,
2945
2945
  onFocus: x[2] || (x[2] = (h) => d.value = !0),
2946
2946
  placeholder: "Пошук...",
2947
2947
  class: "bg-white h-[38px] text-sm py-2 px-3 ps-9 pe-8 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
2948
2948
  }, null, 544), [
2949
- [ne, r.value]
2949
+ [ne, a.value]
2950
2950
  ]),
2951
- r.value ? (i(), u("button", {
2951
+ a.value ? (i(), u("button", {
2952
2952
  key: 0,
2953
- onClick: D,
2953
+ onClick: U,
2954
2954
  class: "absolute right-2 bottom-1/2 translate-y-1/2 text-gray-500 hover:text-red-500",
2955
2955
  "aria-label": "Очистити",
2956
2956
  type: "button"
@@ -2969,8 +2969,8 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2969
2969
  "stroke-linejoin": "round"
2970
2970
  })
2971
2971
  ], -1)
2972
- ]))) : j("", !0),
2973
- d.value && a.value !== "coordinates" ? (i(), u("div", hs, [
2972
+ ]))) : S("", !0),
2973
+ d.value && r.value !== "coordinates" ? (i(), u("div", hs, [
2974
2974
  s.value.length ? (i(), u("ul", gs, [
2975
2975
  (i(!0), u(Q, null, Y(s.value, (h) => (i(), u("li", {
2976
2976
  key: h.properties.place_id,
@@ -2978,14 +2978,14 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2978
2978
  class: "px-3 py-2 text-sm cursor-pointer hover:bg-gray-100"
2979
2979
  }, E(h.properties.display_name), 9, bs))), 128))
2980
2980
  ])) : p.value ? (i(), u("div", ys, "Шукаю…")) : (i(), u("div", xs, "Нічого не знайдено"))
2981
- ])) : j("", !0)
2981
+ ])) : S("", !0)
2982
2982
  ])
2983
2983
  ])
2984
2984
  ])
2985
2985
  ])
2986
2986
  ]));
2987
2987
  }
2988
- }), ks = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, _s = { class: "flex gap-2" }, $s = ["onClick", "title"], Cs = ["src"], Vs = /* @__PURE__ */ I({
2988
+ }), ks = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, _s = { class: "flex gap-2" }, $s = ["onClick", "title"], Cs = ["src"], Vs = /* @__PURE__ */ A({
2989
2989
  __name: "map-layers",
2990
2990
  props: {
2991
2991
  basemaps: {},
@@ -2993,17 +2993,17 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
2993
2993
  },
2994
2994
  emits: ["onLayerChange"],
2995
2995
  setup(o, { emit: e }) {
2996
- const n = $(o.defaultLayer ?? ""), a = e;
2997
- function r(s) {
2998
- a("onLayerChange", s), n.value = s;
2996
+ const n = $(o.defaultLayer ?? ""), r = e;
2997
+ function a(s) {
2998
+ r("onLayerChange", s), n.value = s;
2999
2999
  }
3000
3000
  return (s, d) => (i(), u("div", ks, [
3001
3001
  t("div", _s, [
3002
- (i(!0), u(Q, null, Y(s.basemaps, (p, v) => (i(), u("div", {
3003
- key: v,
3004
- class: B(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === v }]),
3005
- onClick: (c) => r(v),
3006
- title: v,
3002
+ (i(!0), u(Q, null, Y(s.basemaps, (p, f) => (i(), u("div", {
3003
+ key: f,
3004
+ class: B(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === f }]),
3005
+ onClick: (c) => a(f),
3006
+ title: f,
3007
3007
  role: "button",
3008
3008
  tabindex: "0"
3009
3009
  }, [
@@ -3016,16 +3016,16 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3016
3016
  ])
3017
3017
  ]));
3018
3018
  }
3019
- }), Ms = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Ls = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Bs = { class: "flex items-center gap-1" }, Ss = ["disabled"], js = { class: "absolute top-4 right-4 z-[1000]" }, As = { class: "flex flex-col gap-[2px]" }, Is = ["aria-pressed"], zs = ["aria-pressed"], Os = ["aria-pressed"], Es = ["aria-pressed"], Fs = { 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" }, Ds = {
3019
+ }), Ms = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Ls = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Bs = { class: "flex items-center gap-1" }, Ss = ["disabled"], js = { class: "absolute top-4 right-4 z-[1000]" }, Is = { class: "flex flex-col gap-[2px]" }, As = ["aria-pressed"], zs = ["aria-pressed"], Os = ["aria-pressed"], Es = ["aria-pressed"], Fs = { 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" }, Ds = {
3020
3020
  key: 0,
3021
3021
  class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
3022
- }, Us = { class: "mr-auto" }, Rs = { class: "font-bold" }, Ts = { class: "flex items-center" }, Ps = { class: "text-xs mr-2" }, Ns = {
3022
+ }, Us = { class: "mr-auto" }, Ts = { class: "font-bold" }, Rs = { class: "flex items-center" }, Ps = { class: "text-xs mr-2" }, Ns = {
3023
3023
  key: 0,
3024
3024
  class: "text-xs"
3025
3025
  }, Hs = {
3026
3026
  key: 1,
3027
3027
  class: "text-xs"
3028
- }, qs = /* @__PURE__ */ I({
3028
+ }, qs = /* @__PURE__ */ A({
3029
3029
  __name: "vs-input-map",
3030
3030
  props: {
3031
3031
  style: {},
@@ -3038,9 +3038,9 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3038
3038
  },
3039
3039
  emits: ["update:modelValue"],
3040
3040
  setup(o, { emit: e }) {
3041
- const l = o, n = e, a = $(null);
3042
- let r, s, d;
3043
- const p = $(null), v = $(null), c = $(6), g = $(0), f = $(null), M = {
3041
+ const l = o, n = e, r = $(null);
3042
+ let a, s, d;
3043
+ const p = $(null), f = $(null), c = $(6), g = $(0), v = $(null), M = {
3044
3044
  topo100: {
3045
3045
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
3046
3046
  preview: "https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"
@@ -3054,12 +3054,12 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3054
3054
  preview: "https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"
3055
3055
  }
3056
3056
  };
3057
- let S;
3058
- const T = $("topo100");
3059
- function D() {
3057
+ let I;
3058
+ const F = $("topo100");
3059
+ function U() {
3060
3060
  return new Promise((b, y) => {
3061
3061
  window.L && window.L.Draw && b(0);
3062
- const U = (ee) => {
3062
+ const T = (ee) => {
3063
3063
  if (Array.from(document.styleSheets).some((he) => he?.href?.includes(ee))) return;
3064
3064
  const de = document.createElement("link");
3065
3065
  de.rel = "stylesheet", de.href = ee, document.head.appendChild(de);
@@ -3072,7 +3072,7 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3072
3072
  const ge = document.createElement("script");
3073
3073
  ge.src = ee, ge.async = !0, ge.onload = () => _e(), ge.onerror = (ce) => de(ce), document.body.appendChild(ge);
3074
3074
  });
3075
- U("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), U("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(y);
3075
+ T("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), T("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(y);
3076
3076
  });
3077
3077
  }
3078
3078
  function P() {
@@ -3084,7 +3084,7 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3084
3084
  const y = s.getLayers();
3085
3085
  if (!y.length) return;
3086
3086
  const N = L.featureGroup(y).getBounds();
3087
- N && N.isValid() && r.fitBounds(N, { padding: [b, b] });
3087
+ N && N.isValid() && a.fitBounds(N, { padding: [b, b] });
3088
3088
  }
3089
3089
  function x() {
3090
3090
  p.value?.click();
@@ -3100,7 +3100,7 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3100
3100
  }
3101
3101
  if (b instanceof L.Polygon || b instanceof L.Rectangle)
3102
3102
  try {
3103
- const y = b.getLatLngs(), U = Array.isArray(y[0]) ? y[0] : y, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(U) : 0;
3103
+ const y = b.getLatLngs(), T = Array.isArray(y[0]) ? y[0] : y, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(T) : 0;
3104
3104
  return N ? N / 1e6 : 0;
3105
3105
  } catch {
3106
3106
  return null;
@@ -3108,97 +3108,97 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3108
3108
  return null;
3109
3109
  }
3110
3110
  function m(b) {
3111
- return b instanceof L.Circle ? b.getLatLng() : b.getBounds ? b.getBounds().getCenter() : b.getLatLng ? b.getLatLng() : r.getCenter();
3111
+ return b instanceof L.Circle ? b.getLatLng() : b.getBounds ? b.getBounds().getCenter() : b.getLatLng ? b.getLatLng() : a.getCenter();
3112
3112
  }
3113
3113
  function V() {
3114
3114
  const b = s.getLayers();
3115
3115
  if (!b.length) {
3116
- f.value = null, g.value = 0;
3116
+ v.value = null, g.value = 0;
3117
3117
  return;
3118
3118
  }
3119
- const y = b[b.length - 1], U = J(y), N = m(y), ee = C(y);
3120
- f.value = {
3121
- type: U,
3119
+ const y = b[b.length - 1], T = J(y), N = m(y), ee = C(y);
3120
+ v.value = {
3121
+ type: T,
3122
3122
  center: N,
3123
3123
  areaKm2: ee,
3124
3124
  layer: y
3125
3125
  }, g.value = b.length;
3126
3126
  }
3127
3127
  function z() {
3128
- const b = f.value?.layer;
3129
- b && (b instanceof L.Circle && b.getBounds ? r.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? r.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && r.setView(b.getLatLng(), Math.max(c.value, 14)));
3128
+ const b = v.value?.layer;
3129
+ b && (b instanceof L.Circle && b.getBounds ? a.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? a.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && a.setView(b.getLatLng(), Math.max(c.value, 14)));
3130
3130
  }
3131
3131
  function Z() {
3132
- const b = f.value?.layer;
3132
+ const b = v.value?.layer;
3133
3133
  b && (s.removeLayer(b), P(), V());
3134
3134
  }
3135
3135
  ue(async () => {
3136
- await D(), L.drawLocal = Ia, r = L.map(a.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(r), S = L.tileLayer(M.topo100.url, { maxZoom: 19, minZoom: 6 }).addTo(r), T.value = "topo100", s = new L.FeatureGroup().addTo(r), r.on(L.Draw.Event.CREATED, (y) => {
3137
- const { layer: U } = y;
3138
- s.clearLayers(), s.addLayer(U), P(), V(), _(), h.value = "";
3139
- }), r.on(L.Draw.Event.EDITED, () => {
3136
+ await U(), L.drawLocal = Ar, a = L.map(r.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(a), I = L.tileLayer(M.topo100.url, { maxZoom: 19, minZoom: 6 }).addTo(a), F.value = "topo100", s = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (y) => {
3137
+ const { layer: T } = y;
3138
+ s.clearLayers(), s.addLayer(T), P(), V(), _(), h.value = "";
3139
+ }), a.on(L.Draw.Event.EDITED, () => {
3140
3140
  P(), V(), _();
3141
- }), r.on(L.Draw.Event.DELETED, () => {
3141
+ }), a.on(L.Draw.Event.DELETED, () => {
3142
3142
  P(), V(), _();
3143
- }), r.on("mousemove", (y) => {
3144
- v.value = y.latlng;
3145
- }), r.on("zoomend", () => {
3146
- c.value = r.getZoom();
3143
+ }), a.on("mousemove", (y) => {
3144
+ f.value = y.latlng;
3145
+ }), a.on("zoomend", () => {
3146
+ c.value = a.getZoom();
3147
3147
  });
3148
- const b = za(l.modelValue);
3148
+ const b = zr(l.modelValue);
3149
3149
  if (b) {
3150
3150
  const y = [];
3151
- L.geoJSON(b).eachLayer((U) => y.push(U)), y.length && s.addLayer(y[0]), P(), V(), _();
3151
+ L.geoJSON(b).eachLayer((T) => y.push(T)), y.length && s.addLayer(y[0]), P(), V(), _();
3152
3152
  }
3153
3153
  });
3154
3154
  function te(b) {
3155
- if (r) {
3155
+ if (a) {
3156
3156
  switch (d && d.disable(), b) {
3157
3157
  case "marker":
3158
- d = new L.Draw.Marker(r);
3158
+ d = new L.Draw.Marker(a);
3159
3159
  break;
3160
3160
  case "polyline":
3161
- d = new L.Draw.Polyline(r);
3161
+ d = new L.Draw.Polyline(a);
3162
3162
  break;
3163
3163
  case "polygon":
3164
- d = new L.Draw.Polygon(r);
3164
+ d = new L.Draw.Polygon(a);
3165
3165
  break;
3166
3166
  case "rectangle":
3167
- d = new L.Draw.Rectangle(r);
3167
+ d = new L.Draw.Rectangle(a);
3168
3168
  break;
3169
3169
  default:
3170
- d = new L.Draw.Rectangle(r);
3170
+ d = new L.Draw.Rectangle(a);
3171
3171
  break;
3172
3172
  }
3173
3173
  d && (d.enable(), h.value = b);
3174
3174
  }
3175
3175
  }
3176
3176
  function ye() {
3177
- const b = s.toGeoJSON(), y = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), U = URL.createObjectURL(y), N = document.createElement("a");
3178
- N.href = U, N.download = "data.geojson", N.click(), URL.revokeObjectURL(U);
3177
+ const b = s.toGeoJSON(), y = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), T = URL.createObjectURL(y), N = document.createElement("a");
3178
+ N.href = T, N.download = "data.geojson", N.click(), URL.revokeObjectURL(T);
3179
3179
  }
3180
3180
  function we(b) {
3181
3181
  const y = b.target.files?.[0];
3182
3182
  if (!y) return;
3183
- const U = new FileReader();
3184
- U.onload = () => {
3185
- if (typeof U.result == "string")
3183
+ const T = new FileReader();
3184
+ T.onload = () => {
3185
+ if (typeof T.result == "string")
3186
3186
  try {
3187
- const N = JSON.parse(U.result);
3187
+ const N = JSON.parse(T.result);
3188
3188
  s.clearLayers(), N && L.geoJSON({ type: "Feature", geometry: N }).eachLayer((ee) => {
3189
3189
  s.addLayer(ee);
3190
3190
  }), P(), V(), _();
3191
3191
  } finally {
3192
3192
  b.target.value = "";
3193
3193
  }
3194
- }, U.readAsText(y);
3194
+ }, T.readAsText(y);
3195
3195
  }
3196
3196
  function ie(b) {
3197
- r && (S && r.removeLayer(S), S = L.tileLayer(M[b].url, { maxZoom: 19, minZoom: 6 }).addTo(r), T.value = b);
3197
+ a && (I && a.removeLayer(I), I = L.tileLayer(M[b].url, { maxZoom: 19, minZoom: 6 }).addTo(a), F.value = b);
3198
3198
  }
3199
- function Ie(b) {
3199
+ function Ae(b) {
3200
3200
  const y = L.latLng(b[0], b[1]);
3201
- r.setView(y, 13);
3201
+ a.setView(y, 13);
3202
3202
  }
3203
3203
  se(
3204
3204
  () => l.modelValue,
@@ -3214,11 +3214,11 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3214
3214
  }, [
3215
3215
  t("div", {
3216
3216
  ref_key: "mapContainer",
3217
- ref: a,
3217
+ ref: r,
3218
3218
  class: "w-full h-full"
3219
3219
  }, null, 512),
3220
3220
  t("div", Ms, [
3221
- A(ws, { onGoToCoordinates: Ie }),
3221
+ j(ws, { onGoToCoordinates: Ae }),
3222
3222
  t("div", Ls, [
3223
3223
  t("div", Bs, [
3224
3224
  t("button", {
@@ -3244,101 +3244,101 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3244
3244
  ])
3245
3245
  ]),
3246
3246
  t("div", js, [
3247
- t("div", As, [
3247
+ t("div", Is, [
3248
3248
  t("button", {
3249
3249
  class: B(["vs-btn", { "vs-active": h.value === "marker" }]),
3250
3250
  "aria-pressed": h.value === "marker",
3251
3251
  title: "Point (P)",
3252
3252
  "aria-label": "Draw point",
3253
- onClick: y[0] || (y[0] = (U) => te("marker"))
3253
+ onClick: y[0] || (y[0] = (T) => te("marker"))
3254
3254
  }, [
3255
- A(Da)
3256
- ], 10, Is),
3255
+ j(Dr)
3256
+ ], 10, As),
3257
3257
  t("button", {
3258
3258
  class: B(["vs-btn", { "vs-active": h.value === "polyline" }]),
3259
3259
  "aria-pressed": h.value === "polyline",
3260
3260
  title: "Line (L)",
3261
3261
  "aria-label": "Draw polyline",
3262
- onClick: y[1] || (y[1] = (U) => te("polyline"))
3262
+ onClick: y[1] || (y[1] = (T) => te("polyline"))
3263
3263
  }, [
3264
- A(Pa)
3264
+ j(Pr)
3265
3265
  ], 10, zs),
3266
3266
  t("button", {
3267
3267
  class: B(["vs-btn", { "vs-active": h.value === "polygon" }]),
3268
3268
  "aria-pressed": h.value === "polygon",
3269
3269
  title: "Polygon (G)",
3270
3270
  "aria-label": "Draw polygon",
3271
- onClick: y[2] || (y[2] = (U) => te("polygon"))
3271
+ onClick: y[2] || (y[2] = (T) => te("polygon"))
3272
3272
  }, [
3273
- A(Ga)
3273
+ j(Gr)
3274
3274
  ], 10, Os),
3275
3275
  t("button", {
3276
3276
  class: B(["vs-btn", { "vs-active": h.value === "rectangle" }]),
3277
3277
  "aria-pressed": h.value === "rectangle",
3278
3278
  title: "Rectangle (R)",
3279
3279
  "aria-label": "Draw rectangle",
3280
- onClick: y[3] || (y[3] = (U) => te("rectangle"))
3280
+ onClick: y[3] || (y[3] = (T) => te("rectangle"))
3281
3281
  }, [
3282
- A(Wa)
3282
+ j(Wr)
3283
3283
  ], 10, Es),
3284
3284
  t("button", {
3285
3285
  class: "vs-btn",
3286
- onClick: y[4] || (y[4] = (U) => ke.value = !ke.value)
3286
+ onClick: y[4] || (y[4] = (T) => ke.value = !ke.value)
3287
3287
  }, [
3288
- A(es, { style: { width: "12px", height: "12px" } })
3288
+ j(es, { style: { width: "12px", height: "12px" } })
3289
3289
  ])
3290
3290
  ])
3291
3291
  ]),
3292
3292
  t("div", {
3293
- class: B(["absolute left-4 z-[1000]", f.value ? "bottom-8" : "bottom-4"])
3293
+ class: B(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
3294
3294
  }, [
3295
- A(Vs, {
3295
+ j(Vs, {
3296
3296
  basemaps: M,
3297
3297
  "default-layer": "topo100",
3298
3298
  onOnLayerChange: ie
3299
3299
  })
3300
3300
  ], 2),
3301
3301
  t("div", Fs, [
3302
- f.value ? (i(), u("div", Ds, [
3302
+ v.value ? (i(), u("div", Ds, [
3303
3303
  t("div", Us, [
3304
- y[7] || (y[7] = oe(" Тип: ", -1)),
3305
- t("span", Rs, E(f.value.type), 1)
3304
+ y[7] || (y[7] = oe(" Тип: ")),
3305
+ t("span", Ts, E(v.value.type), 1)
3306
3306
  ]),
3307
- t("div", Ts, [
3307
+ t("div", Rs, [
3308
3308
  t("div", Ps, [
3309
- y[8] || (y[8] = oe(" Центр: ", -1)),
3310
- t("b", null, E(f.value.center.lat.toFixed(5)) + ", " + E(f.value.center.lng.toFixed(5)), 1)
3309
+ y[8] || (y[8] = oe(" Центр: ")),
3310
+ t("b", null, E(v.value.center.lat.toFixed(5)) + ", " + E(v.value.center.lng.toFixed(5)), 1)
3311
3311
  ]),
3312
- f.value.areaKm2 !== null ? (i(), u("div", Ns, [
3313
- y[9] || (y[9] = oe(" Площа: ", -1)),
3314
- t("b", null, E(f.value.areaKm2.toFixed(1)) + "км²", 1)
3312
+ v.value.areaKm2 !== null ? (i(), u("div", Ns, [
3313
+ y[9] || (y[9] = oe(" Площа: ")),
3314
+ t("b", null, E(v.value.areaKm2.toFixed(1)) + "км²", 1)
3315
3315
  ])) : (i(), u("div", Hs, y[10] || (y[10] = [
3316
- oe(" Площа: ", -1),
3316
+ oe(" Площа: "),
3317
3317
  t("b", null, "—", -1)
3318
3318
  ]))),
3319
3319
  t("button", {
3320
3320
  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",
3321
3321
  title: "Наблизити",
3322
- onClick: y[5] || (y[5] = (U) => z())
3322
+ onClick: y[5] || (y[5] = (T) => z())
3323
3323
  }, y[11] || (y[11] = [
3324
- re('<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-d73d6cfa><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-d73d6cfa></path><path d="M7 10l6 0" data-v-d73d6cfa></path><path d="M10 7l0 6" data-v-d73d6cfa></path><path d="M21 21l-6 -6" data-v-d73d6cfa></path></svg>', 1)
3324
+ ae('<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-d73d6cfa><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-d73d6cfa></path><path d="M7 10l6 0" data-v-d73d6cfa></path><path d="M10 7l0 6" data-v-d73d6cfa></path><path d="M21 21l-6 -6" data-v-d73d6cfa></path></svg>', 1)
3325
3325
  ])),
3326
3326
  t("button", {
3327
3327
  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",
3328
3328
  title: "Видалити",
3329
- onClick: y[6] || (y[6] = (U) => Z())
3329
+ onClick: y[6] || (y[6] = (T) => Z())
3330
3330
  }, [
3331
- A(Ae, { class: "w-3 h-3" })
3331
+ j(Ie, { class: "w-3 h-3" })
3332
3332
  ])
3333
3333
  ])
3334
- ])) : j("", !0)
3334
+ ])) : S("", !0)
3335
3335
  ])
3336
3336
  ], 2));
3337
3337
  }
3338
3338
  }), Gs = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-d73d6cfa"]]), Js = ["data-focus"], Ks = { class: "flex items-center" }, Zs = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Ws = ["onClick", "aria-label"], Qs = {
3339
3339
  key: 0,
3340
3340
  class: "absolute text-gray-500 truncate pl-2"
3341
- }, Xs = { class: "flex-1 min-w-[2px]" }, Ys = ["placeholder"], en = { class: "flex items-center shrink-0" }, tn = ["disabled"], ln = /* @__PURE__ */ I({
3341
+ }, Xs = { class: "flex-1 min-w-[2px]" }, Ys = ["placeholder"], en = { class: "flex items-center shrink-0" }, tn = ["disabled"], ln = /* @__PURE__ */ A({
3342
3342
  __name: "vs-input-tag",
3343
3343
  props: /* @__PURE__ */ q({
3344
3344
  unique: { type: Boolean, default: !0 },
@@ -3357,16 +3357,16 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3357
3357
  setup(o, { emit: e }) {
3358
3358
  const l = o, n = e;
3359
3359
  me(l.style);
3360
- const a = $(null), r = $(null), s = $(null), d = $(!1), p = $(""), v = G(o, "modelValue"), c = F(() => l.placeholder || "Add tag…"), g = F(() => v.value?.length === 0 && p.value === ""), f = F(() => !l.disabled && v.value?.length > 0), M = F(() => l.disabled), S = async () => {
3360
+ const r = $(null), a = $(null), s = $(null), d = $(!1), p = $(""), f = G(o, "modelValue"), c = D(() => l.placeholder || "Add tag…"), g = D(() => f.value?.length === 0 && p.value === ""), v = D(() => !l.disabled && f.value?.length > 0), M = D(() => l.disabled), I = async () => {
3361
3361
  M.value || await $e(() => s.value?.focus());
3362
- }, T = (C) => {
3362
+ }, F = (C) => {
3363
3363
  const m = C.trim();
3364
- m !== "" && (!v.value || !Array.isArray(v.value) ? v.value = [m] : l.unique ? v.value.includes(m) || (v.value = [...v.value, m]) : v.value = [...v.value, m], p.value = "");
3365
- }, D = () => {
3364
+ m !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [m] : l.unique ? f.value.includes(m) || (f.value = [...f.value, m]) : f.value = [...f.value, m], p.value = "");
3365
+ }, U = () => {
3366
3366
  const C = p.value;
3367
- C.trim() !== "" && T(C), p.value = "";
3367
+ C.trim() !== "" && F(C), p.value = "";
3368
3368
  }, P = (C) => {
3369
- const m = v.value.slice();
3369
+ const m = f.value.slice();
3370
3370
  m.splice(C, 1), n("update:modelValue", m);
3371
3371
  }, _ = () => {
3372
3372
  n("update:modelValue", []);
@@ -3376,13 +3376,13 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3376
3376
  d.value = !1;
3377
3377
  }, J = (C) => {
3378
3378
  const { key: m } = C;
3379
- m === "Enter" ? (C.preventDefault(), D()) : m === "Backspace" && p.value === "" && v.value.length > 0 && P(v.value.length - 1);
3379
+ m === "Enter" ? (C.preventDefault(), U()) : m === "Backspace" && p.value === "" && f.value.length > 0 && P(f.value.length - 1);
3380
3380
  };
3381
3381
  return (C, m) => (i(), u("div", {
3382
3382
  class: "flex gap-1 w-full",
3383
3383
  ref_key: "root",
3384
- ref: a,
3385
- onClick: m[1] || (m[1] = ae(() => {
3384
+ ref: r,
3385
+ onClick: m[1] || (m[1] = re(() => {
3386
3386
  }, ["stop"]))
3387
3387
  }, [
3388
3388
  t("div", {
@@ -3398,14 +3398,14 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3398
3398
  M.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
3399
3399
  ]),
3400
3400
  "data-focus": d.value ? "true" : "false",
3401
- onClick: S
3401
+ onClick: I
3402
3402
  }, [
3403
3403
  t("div", {
3404
3404
  class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
3405
3405
  ref_key: "chipsRef",
3406
- ref: r
3406
+ ref: a
3407
3407
  }, [
3408
- (i(!0), u(Q, null, Y(v.value, (V, z) => (i(), u("div", {
3408
+ (i(!0), u(Q, null, Y(f.value, (V, z) => (i(), u("div", {
3409
3409
  key: z,
3410
3410
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
3411
3411
  }, [
@@ -3415,7 +3415,7 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3415
3415
  t("div", {
3416
3416
  role: "button",
3417
3417
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
3418
- onClick: ae((Z) => P(z), ["stop"]),
3418
+ onClick: re((Z) => P(z), ["stop"]),
3419
3419
  "aria-label": `Remove ${V}`
3420
3420
  }, m[2] || (m[2] = [
3421
3421
  t("svg", {
@@ -3430,9 +3430,9 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3430
3430
  ], -1)
3431
3431
  ]), 8, Ws)
3432
3432
  ]))), 128)),
3433
- g.value ? (i(), u("div", Qs, E(c.value), 1)) : j("", !0),
3433
+ g.value ? (i(), u("div", Qs, E(c.value), 1)) : S("", !0),
3434
3434
  t("div", Xs, [
3435
- M.value ? j("", !0) : K((i(), u("input", {
3435
+ M.value ? S("", !0) : K((i(), u("input", {
3436
3436
  key: 0,
3437
3437
  ref_key: "inputRef",
3438
3438
  ref: s,
@@ -3448,20 +3448,20 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3448
3448
  onFocus: x,
3449
3449
  onBlur: h,
3450
3450
  onKeydown: J,
3451
- placeholder: v.value && v.value.length ? "" : void 0
3451
+ placeholder: f.value && f.value.length ? "" : void 0
3452
3452
  }, null, 40, Ys)), [
3453
3453
  [ne, p.value]
3454
3454
  ])
3455
3455
  ])
3456
3456
  ], 512),
3457
3457
  t("div", en, [
3458
- f.value ? (i(), u("button", {
3458
+ v.value ? (i(), u("button", {
3459
3459
  key: 0,
3460
3460
  type: "button",
3461
3461
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
3462
3462
  "aria-label": "Clear all tags",
3463
3463
  disabled: M.value,
3464
- onClick: ae(_, ["stop"])
3464
+ onClick: re(_, ["stop"])
3465
3465
  }, m[3] || (m[3] = [
3466
3466
  t("svg", {
3467
3467
  height: "20",
@@ -3471,7 +3471,7 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3471
3471
  }, [
3472
3472
  t("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" })
3473
3473
  ], -1)
3474
- ]), 8, tn)) : j("", !0)
3474
+ ]), 8, tn)) : S("", !0)
3475
3475
  ])
3476
3476
  ], 10, Js)
3477
3477
  ], 2)
@@ -3481,24 +3481,24 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3481
3481
  VsInputText: He,
3482
3482
  VsInputRadio: Ge,
3483
3483
  "vs-input-text": He,
3484
- "vs-input-textarea": Ar,
3484
+ "vs-input-textarea": Ia,
3485
3485
  "vs-input-mask": sl,
3486
3486
  "vs-input-number": St,
3487
3487
  "vs-input-radio": Ge,
3488
- "vs-input-select": Sr,
3488
+ "vs-input-select": Sa,
3489
3489
  "vs-input-switcher": lt,
3490
3490
  "vs-input-static": qe,
3491
- "vs-input-container": nr,
3491
+ "vs-input-container": na,
3492
3492
  "vs-input-date": xl,
3493
3493
  "vs-input-checkbox": bl,
3494
- "vs-input-file": ao,
3494
+ "vs-input-file": ro,
3495
3495
  "vs-input-html": qe,
3496
3496
  "vs-input-email": ul,
3497
- "vs-input-datatable": Aa,
3497
+ "vs-input-datatable": Ir,
3498
3498
  "vs-input-map": Gs,
3499
3499
  "vs-input-file-list": Eo,
3500
3500
  "vs-input-tag": ln
3501
- }, rn = /* @__PURE__ */ I({
3501
+ }, an = /* @__PURE__ */ A({
3502
3502
  __name: "behavior",
3503
3503
  props: {
3504
3504
  api: {},
@@ -3512,25 +3512,25 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3512
3512
  async function n() {
3513
3513
  try {
3514
3514
  if (!e.api) return;
3515
- const a = e.api.replace("{{value}}", e.value), r = await fetch(a);
3516
- if (!r.ok) {
3515
+ const r = e.api.replace("{{value}}", e.value), a = await fetch(r);
3516
+ if (!a.ok) {
3517
3517
  pe({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3518
3518
  return;
3519
3519
  }
3520
- const s = await r.json();
3520
+ const s = await a.json();
3521
3521
  if (!e.set || !l) return;
3522
3522
  for (const [d, p] of Object.entries(e.set))
3523
3523
  l.value[d] = s.result[p];
3524
- } catch (a) {
3525
- console.error(e.error, a);
3524
+ } catch (r) {
3525
+ console.error(e.error, r);
3526
3526
  }
3527
3527
  }
3528
- return (a, r) => (i(), u("button", {
3528
+ return (r, a) => (i(), u("button", {
3529
3529
  onClick: n,
3530
3530
  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"
3531
- }, E(a.button), 1));
3531
+ }, E(r.button), 1));
3532
3532
  }
3533
- }), an = { class: "flex w-full" }, at = /* @__PURE__ */ I({
3533
+ }), rn = { class: "flex w-full" }, rt = /* @__PURE__ */ A({
3534
3534
  __name: "vs-compact-form-layout",
3535
3535
  props: /* @__PURE__ */ q({
3536
3536
  item: { default: {} },
@@ -3544,16 +3544,16 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3544
3544
  }),
3545
3545
  emits: ["update:modelValue"],
3546
3546
  setup(o) {
3547
- const e = o, l = G(o, "modelValue"), n = F(() => Mt[`${e.layout}`]), a = F(() => on?.[`vs-input-${e.item.type}`]), r = F(() => {
3548
- const d = H(a);
3547
+ const e = o, l = G(o, "modelValue"), n = D(() => Mt[`${e.layout}`]), r = D(() => on?.[`vs-input-${e.item.type}`]), a = D(() => {
3548
+ const d = H(r);
3549
3549
  if (!d) return /* @__PURE__ */ new Set();
3550
3550
  const p = d.props ?? d.__vccOpts?.props;
3551
3551
  if (!p) return /* @__PURE__ */ new Set();
3552
- const v = Array.isArray(p) ? p : Object.keys(p);
3553
- return new Set(v);
3554
- }), s = F(() => {
3555
- const d = e.item ?? {}, p = r.value;
3556
- return p.size ? Object.fromEntries(Object.entries(d).filter(([v]) => p.has(v))) : {};
3552
+ const f = Array.isArray(p) ? p : Object.keys(p);
3553
+ return new Set(f);
3554
+ }), s = D(() => {
3555
+ const d = e.item ?? {}, p = a.value;
3556
+ return p.size ? Object.fromEntries(Object.entries(d).filter(([f]) => p.has(f))) : {};
3557
3557
  });
3558
3558
  return (d, p) => (i(), X(xe(n.value), {
3559
3559
  ua: e.item.ua,
@@ -3562,12 +3562,12 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3562
3562
  label: e.item.label
3563
3563
  }, {
3564
3564
  default: Me(() => [
3565
- t("div", an, [
3566
- (i(), X(xe(a.value), Ce(s.value, {
3565
+ t("div", rn, [
3566
+ (i(), X(xe(r.value), Ce(s.value, {
3567
3567
  modelValue: l.value,
3568
- "onUpdate:modelValue": p[0] || (p[0] = (v) => l.value = v)
3568
+ "onUpdate:modelValue": p[0] || (p[0] = (f) => l.value = f)
3569
3569
  }), null, 16, ["modelValue"])),
3570
- d.item.behavior ? (i(), X(rn, Ce({ key: 0 }, d.item.behavior, { value: l.value }), null, 16, ["value"])) : j("", !0)
3570
+ d.item.behavior ? (i(), X(an, Ce({ key: 0 }, d.item.behavior, { value: l.value }), null, 16, ["value"])) : S("", !0)
3571
3571
  ])
3572
3572
  ]),
3573
3573
  _: 1
@@ -3600,6 +3600,7 @@ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "form-geom__se
3600
3600
  html: "static",
3601
3601
  geom: "map",
3602
3602
  filelist: "file-list",
3603
+ datalist: "datatable",
3603
3604
  file: "file"
3604
3605
  // mask: 'text',
3605
3606
  };
@@ -3611,8 +3612,8 @@ function fn(o) {
3611
3612
  if (Array.isArray(o)) {
3612
3613
  const l = [];
3613
3614
  return o.forEach((n) => {
3614
- const a = { ...n };
3615
- a.name = (n.name || n.id || n.key).toString(), a.type = We(n.type), a.label = n.label || n.ua, a.rules = n.rules || n.validators, n.data && (a.api = `/api/suggest/${n.data}`), l.push(a);
3615
+ const r = { ...n };
3616
+ r.name = (n.name || n.id || n.key || "").toString(), r.type = We(n.type), r.label = n.label || n.ua, r.rules = n.rules || n.validators, n.data && (r.api = `/api/suggest/${n.data}`), l.push(r);
3616
3617
  }), l;
3617
3618
  }
3618
3619
  const e = [];
@@ -3629,39 +3630,40 @@ function fn(o) {
3629
3630
  }
3630
3631
  function vn(o, e) {
3631
3632
  const l = fn(e), n = $({});
3632
- function a(p) {
3633
- const v = p?.conditions;
3634
- if (!v) return !0;
3635
- const c = Array.isArray(v) ? v[0] : v, g = o?.value?.[c];
3636
- return rt(g, v);
3633
+ function r(p) {
3634
+ const f = p?.conditions;
3635
+ if (!f) return !0;
3636
+ const c = Array.isArray(f) ? f[0] : f, g = o?.value?.[c];
3637
+ return at(g, f);
3637
3638
  }
3638
- const r = (p = l, v = !0) => (p.forEach((c) => {
3639
+ const a = (p = l, f = !0) => (p.forEach((c) => {
3639
3640
  if (c.rules) {
3640
- if (!a(c)) {
3641
+ if (!r(c)) {
3641
3642
  delete n.value[c.name];
3642
3643
  return;
3643
3644
  }
3644
3645
  c.rules.forEach((g) => {
3645
- const f = cn(o.value[c.name], g);
3646
- f ? n.value[c.name] = f : delete n.value[c.name];
3646
+ const v = cn(o.value[c.name], g);
3647
+ v ? n.value[c.name] = v : delete n.value[c.name];
3647
3648
  });
3648
3649
  }
3649
- c.schema && r(c.schema, !1);
3650
- }), v && Object.values(n.value).some(Boolean) ? n.value : null), s = F(() => l?.filter((p) => a(p)));
3650
+ c.schema && a(c.schema, !1);
3651
+ }), f && Object.values(n.value).some(Boolean) ? n.value : null), s = D(() => l?.filter((p) => r(p)));
3651
3652
  return {
3652
3653
  errors: n,
3653
- validate: r,
3654
+ validate: a,
3654
3655
  reset: () => {
3655
3656
  o.value = {}, n.value = {};
3656
3657
  },
3657
3658
  visibleSchema: s
3658
3659
  };
3659
3660
  }
3660
- const Oe = /* @__PURE__ */ I({
3661
+ const Oe = /* @__PURE__ */ A({
3661
3662
  __name: "vs-compact-form",
3662
3663
  props: /* @__PURE__ */ q({
3663
3664
  schema: { default: () => [] },
3664
3665
  style: { default: () => ({}) },
3666
+ modelValue: {},
3665
3667
  layout: { default: () => "default" },
3666
3668
  formId: { default: () => "" }
3667
3669
  }, {
@@ -3670,41 +3672,45 @@ const Oe = /* @__PURE__ */ I({
3670
3672
  values: { default: () => ({}) },
3671
3673
  valuesModifiers: {}
3672
3674
  }),
3673
- emits: /* @__PURE__ */ q(["handle-submit"], ["update:form", "update:values"]),
3674
- setup(o, { emit: e }) {
3675
- const l = e, n = o, a = G(o, "form"), r = G(o, "values"), {
3676
- errors: s,
3677
- validate: d,
3678
- reset: p,
3679
- visibleSchema: v
3680
- } = vn(r, n.schema), c = () => {
3681
- d(), l("handle-submit", r.value);
3675
+ emits: /* @__PURE__ */ q(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
3676
+ setup(o, { expose: e, emit: l }) {
3677
+ const n = l, r = o, a = G(o, "form"), s = G(o, "values"), {
3678
+ errors: d,
3679
+ validate: p,
3680
+ reset: f,
3681
+ visibleSchema: c
3682
+ } = vn(s, r.schema), g = () => {
3683
+ n("update:modelValue", s.value), p(), n("handle-submit", s.value);
3682
3684
  };
3683
- ue(() => {
3684
- a.value.value = r.value, a.value.errors = s.value, a.value.reset = p, a.value.validate = d, a.value.formId = n.formId;
3685
+ e({
3686
+ validate: p,
3687
+ reset: f,
3688
+ errors: d
3689
+ }), ue(() => {
3690
+ r.modelValue && (s.value = r.modelValue), a.value.value = s.value, a.value.errors = d.value, a.value.reset = f, a.value.validate = p, a.value.formId = r.formId;
3685
3691
  });
3686
- function g(f, M) {
3687
- if (f === M) return !0;
3688
- if (typeof f != "object" || typeof M != "object" || !f || !M) return !1;
3689
- const S = Object.keys(f), T = Object.keys(M);
3690
- return S.length !== T.length ? !1 : S.every((D) => f[D] === M[D]);
3692
+ function v(M, I) {
3693
+ if (M === I) return !0;
3694
+ if (typeof M != "object" || typeof I != "object" || !M || !I) return !1;
3695
+ const F = Object.keys(M), U = Object.keys(I);
3696
+ return F.length !== U.length ? !1 : F.every((P) => M[P] === I[P]);
3691
3697
  }
3692
- return Ne("form", a), Ne("values", r), (f, M) => (i(), u("form", {
3693
- onSubmit: ae(c, ["prevent"]),
3694
- class: B(["grid grid-cols-12", f.layout === "default" ? "gap-6" : "gap-4"])
3698
+ return Ne("form", a), Ne("values", s), (M, I) => (i(), u("form", {
3699
+ onSubmit: re(g, ["prevent"]),
3700
+ class: B(["grid grid-cols-12", M.layout === "default" ? "gap-6" : "gap-4"])
3695
3701
  }, [
3696
- (i(!0), u(Q, null, Y(H(v), (S) => (i(), X(at, {
3697
- key: S.name,
3698
- class: B(f.layout === "horizontal" ? "col-span-12" : `col-span-${S.col || 12} `),
3699
- style: fe(f.style),
3700
- item: S,
3701
- layout: f.layout,
3702
- "model-value": r.value[S.name],
3703
- "onUpdate:modelValue": (T) => {
3704
- const D = r.value[S.name];
3705
- g(D, T) || (r.value[S.name] = T);
3702
+ (i(!0), u(Q, null, Y(H(c), (F) => (i(), X(rt, {
3703
+ key: F.name,
3704
+ class: B(M.layout === "horizontal" ? "col-span-12" : `col-span-${F.col || 12} `),
3705
+ style: fe(M.style),
3706
+ item: F,
3707
+ layout: M.layout,
3708
+ "model-value": s.value[F.name],
3709
+ "onUpdate:modelValue": (U) => {
3710
+ const P = s.value[F.name];
3711
+ v(P, U) || (s.value[F.name] = U);
3706
3712
  },
3707
- error: H(s)[S.name]
3713
+ error: H(d)[F.name]
3708
3714
  }, null, 8, ["class", "style", "item", "layout", "model-value", "onUpdate:modelValue", "error"]))), 128))
3709
3715
  ], 34));
3710
3716
  }
@@ -3715,9 +3721,25 @@ Oe.install = function(e) {
3715
3721
  }), e.provide("form", Ve), window.v3plugin || (window.v3plugin = {}), window.v3plugin.$form = e.config.globalProperties.$form;
3716
3722
  };
3717
3723
  export {
3718
- vr as ModalEdit,
3724
+ va as ModalEdit,
3719
3725
  Oe as VForm,
3726
+ bl as VsInputCheckbox,
3727
+ na as VsInputContainer,
3728
+ xl as VsInputDate,
3729
+ ul as VsInputEmail,
3730
+ ro as VsInputFile,
3731
+ Eo as VsInputFileList,
3732
+ sl as VsInputMask,
3733
+ St as VsInputNumber,
3734
+ Ge as VsInputRadio,
3735
+ Sa as VsInputSelect,
3736
+ qe as VsInputStatic,
3737
+ lt as VsInputSwitcher,
3738
+ ln as VsInputTag,
3720
3739
  He as VsInputText,
3740
+ Ia as VsInputTextarea,
3721
3741
  Oe as default,
3722
- on as inputs
3742
+ on as inputs,
3743
+ Ir as vsInputDatatable,
3744
+ Gs as vsInputMap
3723
3745
  };