@opengis/form 0.0.20 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { defineComponent as A, ref as k, onMounted as ne, onUnmounted as Fe, createElementBlock as u, openBlock as i, createCommentVNode as B, renderSlot as he, createElementVNode as l, toDisplayString as E, normalizeProps as Oe, guardReactiveProps as De, createTextVNode as oe, computed as O, mergeModels as K, useModel as Z, withDirectives as G, normalizeClass as S, unref as q, vModelText as ie, vModelCheckbox as Xe, createVNode as j, createBlock as X, resolveDynamicComponent as we, normalizeStyle as me, withCtx as Le, withModifiers as re, onBeforeUnmount as ut, watch as se, createStaticVNode as ae, vModelRadio as Ye, Fragment as Q, renderList as Y, mergeProps as Ve, reactive as dt, vShow as Ue, inject as Be, resolveComponent as Ne, Transition as et, createApp as ct, h as pt, resolveDirective as ft, nextTick as Ce, Teleport as vt, provide as He } from "vue";
2
- import { notify as ve } from "@opengis/core";
3
- const mt = { class: "w-full relative" }, ht = {
1
+ import { defineComponent as O, ref as x, onMounted as ue, onUnmounted as Ee, createElementBlock as u, openBlock as i, normalizeClass as V, createCommentVNode as j, renderSlot as ge, createElementVNode as l, toDisplayString as F, normalizeProps as Fe, guardReactiveProps as De, createTextVNode as se, computed as D, mergeModels as Q, useModel as X, withDirectives as K, unref as J, vModelText as de, vModelCheckbox as Ye, createVNode as B, createBlock as te, resolveDynamicComponent as _e, normalizeStyle as he, withCtx as $e, withModifiers as ne, onBeforeUnmount as dt, watch as ie, createStaticVNode as re, vModelRadio as et, Fragment as ee, renderList as le, mergeProps as Le, reactive as ct, vShow as Ue, inject as Be, resolveComponent as Ne, Transition as tt, nextTick as Me, Teleport as pt, provide as He } from "vue";
2
+ import { notify as pe, modal as ft, TooltipDirective as qe, VsModal as vt } from "@opengis/core";
3
+ const mt = {
4
4
  key: 0,
5
5
  class: "text-[14px] font-medium text-gray-900 mb-2"
6
- }, gt = {
6
+ }, ht = { class: "opacity-100" }, gt = {
7
7
  key: 0,
8
8
  class: "text-red-500 text-[14px]"
9
9
  }, bt = {
10
10
  key: 1,
11
11
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
12
- }, yt = /* @__PURE__ */ A({
12
+ }, yt = /* @__PURE__ */ O({
13
13
  __name: "vs-layout-default",
14
14
  props: {
15
15
  ua: { default: "" },
@@ -23,21 +23,23 @@ const mt = { class: "w-full relative" }, ht = {
23
23
  label: { default: "" }
24
24
  },
25
25
  setup(o) {
26
- const e = k("uk"), t = (n) => {
26
+ const e = x("uk"), t = (n) => {
27
27
  n.detail.key === "locale" && (e.value = n.detail.newValue);
28
28
  };
29
- return ne(() => {
29
+ return ue(() => {
30
30
  e.value = localStorage.locale, window.addEventListener("storage", t);
31
- }), Fe(() => {
31
+ }), Ee(() => {
32
32
  window.removeEventListener("resize", t);
33
- }), (n, r) => (i(), u("div", mt, [
34
- n.ua || n.label ? (i(), u("div", ht, [
35
- l("span", null, E(n.item[e.value] || n.ua || n.label), 1),
36
- n.item?.rules?.includes("required") ? (i(), u("span", gt, "*")) : B("", !0)
37
- ])) : B("", !0),
38
- he(n.$slots, "default", Oe(De(n.$attrs))),
39
- n.error ? (i(), u("span", bt, E(n.error), 1)) : B("", !0)
40
- ]));
33
+ }), (n, s) => (i(), u("div", {
34
+ class: V(["w-full relative", { "opacity-60": n.item.disabled }])
35
+ }, [
36
+ n.ua || n.label ? (i(), u("div", mt, [
37
+ l("span", ht, F(n.item[e.value] || n.ua || n.label), 1),
38
+ n.item?.rules?.includes("required") ? (i(), u("span", gt, "*")) : j("", !0)
39
+ ])) : j("", !0),
40
+ ge(n.$slots, "default", Fe(De(n.$attrs))),
41
+ n.error ? (i(), u("span", bt, F(n.error), 1)) : j("", !0)
42
+ ], 2));
41
43
  }
42
44
  }), xt = { class: "w-full relative flex flex-row items-center gap-2" }, wt = {
43
45
  key: 0,
@@ -48,7 +50,7 @@ const mt = { class: "w-full relative" }, ht = {
48
50
  }, _t = {
49
51
  key: 1,
50
52
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
51
- }, $t = /* @__PURE__ */ A({
53
+ }, $t = /* @__PURE__ */ O({
52
54
  __name: "vs-layout-horizontal",
53
55
  props: {
54
56
  ua: { default: "" },
@@ -64,17 +66,17 @@ const mt = { class: "w-full relative" }, ht = {
64
66
  setup(o) {
65
67
  return (e, t) => (i(), u("div", xt, [
66
68
  e.item?.type !== "html" ? (i(), u("span", wt, [
67
- oe(E(e.ua || e.label) + " ", 1),
68
- e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), u("span", kt, "*")) : B("", !0)
69
- ])) : B("", !0),
70
- he(e.$slots, "default", Oe(De(e.$attrs))),
71
- e.error ? (i(), u("span", _t, E(e.error), 1)) : B("", !0)
69
+ se(F(e.ua || e.label) + " ", 1),
70
+ e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), u("span", kt, "*")) : j("", !0)
71
+ ])) : j("", !0),
72
+ ge(e.$slots, "default", Fe(De(e.$attrs))),
73
+ e.error ? (i(), u("span", _t, F(e.error), 1)) : j("", !0)
72
74
  ]));
73
75
  }
74
76
  }), Ct = { class: "w-full relative" }, Vt = {
75
77
  key: 0,
76
78
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
77
- }, Mt = /* @__PURE__ */ A({
79
+ }, Mt = /* @__PURE__ */ O({
78
80
  __name: "vs-layout-inline",
79
81
  props: {
80
82
  ua: { default: "" },
@@ -89,8 +91,8 @@ const mt = { class: "w-full relative" }, ht = {
89
91
  },
90
92
  setup(o) {
91
93
  return (e, t) => (i(), u("div", Ct, [
92
- he(e.$slots, "default", Oe(De(e.$attrs))),
93
- e.error ? (i(), u("span", Vt, E(e.error), 1)) : B("", !0)
94
+ ge(e.$slots, "default", Fe(De(e.$attrs))),
95
+ e.error ? (i(), u("span", Vt, F(e.error), 1)) : j("", !0)
94
96
  ]));
95
97
  }
96
98
  }), Lt = {
@@ -98,17 +100,17 @@ const mt = { class: "w-full relative" }, ht = {
98
100
  horizontal: $t,
99
101
  inline: Mt
100
102
  };
101
- function ge(o) {
103
+ function be(o) {
102
104
  return {
103
- inputClass: O(() => {
105
+ inputClass: D(() => {
104
106
  const t = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
105
107
  return o?.size === "sm" ? `${t}h-[32px]` : `${t}h-[38px]`;
106
108
  })
107
109
  };
108
110
  }
109
- const St = ["placeholder", "disabled"], qe = /* @__PURE__ */ A({
111
+ const St = ["placeholder", "disabled"], Ge = /* @__PURE__ */ O({
110
112
  __name: "vs-input-text",
111
- props: /* @__PURE__ */ K({
113
+ props: /* @__PURE__ */ Q({
112
114
  style: { default: () => ({}) },
113
115
  customClass: { default: "" },
114
116
  disabled: { type: Boolean, default: !1 },
@@ -122,23 +124,23 @@ const St = ["placeholder", "disabled"], qe = /* @__PURE__ */ A({
122
124
  }),
123
125
  emits: ["update:modelValue"],
124
126
  setup(o) {
125
- const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue");
126
- return (r, a) => G((i(), u("input", {
127
+ const e = o, { inputClass: t } = be(e.style), n = X(o, "modelValue");
128
+ return (s, a) => K((i(), u("input", {
127
129
  type: "text",
128
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
129
- placeholder: r.placeholder,
130
- disabled: r.disabled,
131
- class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [q(t), { "!border-red-600": r.error }]]),
130
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
131
+ placeholder: s.placeholder,
132
+ disabled: s.disabled,
133
+ class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [J(t), { "!border-red-600": s.error }]]),
132
134
  style: {
133
135
  border: "1px solid #CFD9E0"
134
136
  }
135
137
  }, null, 10, St)), [
136
- [ie, n.value]
138
+ [de, n.value]
137
139
  ]);
138
140
  }
139
- }), Bt = ["placeholder"], jt = /* @__PURE__ */ A({
141
+ }), Bt = ["placeholder"], jt = /* @__PURE__ */ O({
140
142
  __name: "vs-input-number",
141
- props: /* @__PURE__ */ K({
143
+ props: /* @__PURE__ */ Q({
142
144
  style: { default: () => ({}) },
143
145
  customClass: {},
144
146
  disabled: { type: Boolean },
@@ -152,26 +154,26 @@ const St = ["placeholder", "disabled"], qe = /* @__PURE__ */ A({
152
154
  }),
153
155
  emits: ["update:modelValue"],
154
156
  setup(o) {
155
- const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue");
156
- return (r, a) => G((i(), u("input", {
157
+ const e = o, { inputClass: t } = be(e.style), n = X(o, "modelValue");
158
+ return (s, a) => K((i(), u("input", {
157
159
  type: "number",
158
160
  step: "any",
159
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
160
- placeholder: r.placeholder,
161
- class: S(["py-1.5 px-3 block w-full", [q(t)]]),
161
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
162
+ placeholder: s.placeholder,
163
+ class: V(["py-1.5 px-3 block w-full", [J(t)]]),
162
164
  style: {
163
165
  border: "1px solid #CFD9E0"
164
166
  }
165
167
  }, null, 10, Bt)), [
166
- [ie, n.value]
168
+ [de, n.value]
167
169
  ]);
168
170
  }
169
171
  }), R = (o, e) => {
170
172
  const t = o.__vccOpts || o;
171
- for (const [n, r] of e)
172
- t[n] = r;
173
+ for (const [n, s] of e)
174
+ t[n] = s;
173
175
  return t;
174
- }, It = {}, At = {
176
+ }, It = {}, zt = {
175
177
  xmlns: "http://www.w3.org/2000/svg",
176
178
  viewBox: "0 0 24 24",
177
179
  fill: "none",
@@ -181,8 +183,8 @@ const St = ["placeholder", "disabled"], qe = /* @__PURE__ */ A({
181
183
  "stroke-linejoin": "round",
182
184
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
183
185
  };
184
- function zt(o, e) {
185
- return i(), u("svg", At, e[0] || (e[0] = [
186
+ function At(o, e) {
187
+ return i(), u("svg", zt, e[0] || (e[0] = [
186
188
  l("path", {
187
189
  stroke: "none",
188
190
  d: "M0 0h24v24H0z",
@@ -191,7 +193,7 @@ function zt(o, e) {
191
193
  l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
192
194
  ]));
193
195
  }
194
- const Et = /* @__PURE__ */ R(It, [["render", zt]]), Ft = { class: "flex items-center gap-[4px]" }, Ot = ["value", "id", "disabled"], Dt = ["for"], Ut = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Tt = /* @__PURE__ */ A({
196
+ const Ot = /* @__PURE__ */ R(It, [["render", At]]), Et = { class: "flex items-center gap-[4px]" }, Ft = ["value", "id", "disabled"], Dt = ["for"], Ut = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Tt = /* @__PURE__ */ O({
195
197
  __name: "vs-checkbox-default",
196
198
  props: {
197
199
  value: { default: "" },
@@ -204,36 +206,36 @@ const Et = /* @__PURE__ */ R(It, [["render", zt]]), Ft = { class: "flex items-ce
204
206
  },
205
207
  emits: ["update:modelValue"],
206
208
  setup(o, { emit: e }) {
207
- const t = e, n = o, r = O({
209
+ const t = e, n = o, s = D({
208
210
  get: () => n.modelValue,
209
211
  set: (a) => t("update:modelValue", a)
210
212
  });
211
- return (a, s) => (i(), u("div", Ft, [
212
- G(l("input", {
213
+ return (a, r) => (i(), u("div", Et, [
214
+ K(l("input", {
213
215
  type: "checkbox",
214
216
  value: a.value,
215
- "onUpdate:modelValue": s[0] || (s[0] = (d) => r.value = d),
216
- class: S(["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 }]),
217
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => s.value = d),
218
+ class: V(["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 }]),
217
219
  id: a.id,
218
220
  disabled: a.disabled
219
- }, null, 10, Ot), [
220
- [Xe, r.value]
221
+ }, null, 10, Ft), [
222
+ [Ye, s.value]
221
223
  ]),
222
224
  l("label", {
223
225
  for: a.id,
224
- class: S(["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 }])
226
+ class: V(["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 }])
225
227
  }, [
226
228
  l("div", {
227
- class: S(["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" : ""]])
229
+ class: V(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [s.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
228
230
  }, [
229
- j(Et, {
231
+ B(Ot, {
230
232
  height: "12",
231
233
  width: "12"
232
234
  })
233
235
  ], 2),
234
236
  l("span", Ut, [
235
- he(a.$slots, "default", {}, () => [
236
- oe(E(a.label), 1)
237
+ ge(a.$slots, "default", {}, () => [
238
+ se(F(a.label), 1)
237
239
  ])
238
240
  ])
239
241
  ], 10, Dt)
@@ -242,7 +244,7 @@ const Et = /* @__PURE__ */ R(It, [["render", zt]]), Ft = { class: "flex items-ce
242
244
  }), Rt = ["name", "value", "disabled"], Pt = { class: "flex items-center gap-[6px] text-[14px]" }, Nt = {
243
245
  key: 0,
244
246
  class: "text-[16px]"
245
- }, Ht = ["src"], qt = /* @__PURE__ */ A({
247
+ }, Ht = ["src"], qt = /* @__PURE__ */ O({
246
248
  __name: "vs-checkbox-buttons",
247
249
  props: {
248
250
  value: { type: [String, Number, Boolean], default: "" },
@@ -256,46 +258,46 @@ const Et = /* @__PURE__ */ R(It, [["render", zt]]), Ft = { class: "flex items-ce
256
258
  },
257
259
  emits: ["update:modelValue"],
258
260
  setup(o, { emit: e }) {
259
- const t = o, n = e, r = O({
261
+ const t = o, n = e, s = D({
260
262
  get: () => t.modelValue,
261
263
  set: (d) => {
262
264
  n("update:modelValue", d);
263
265
  }
264
- }), a = O(() => Array.isArray(r.value) ? r.value.includes(t.value) : r.value === !0 || r.value === t.value), s = O(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
266
+ }), a = D(() => Array.isArray(s.value) ? s.value.includes(t.value) : s.value === !0 || s.value === t.value), r = D(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
265
267
  return (d, p) => (i(), u("label", {
266
- class: S(["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"]])
268
+ class: V(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [r.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
267
269
  }, [
268
- G(l("input", {
270
+ K(l("input", {
269
271
  type: "checkbox",
270
272
  class: "hidden",
271
273
  name: d.id,
272
274
  value: d.value,
273
- "onUpdate:modelValue": p[0] || (p[0] = (f) => r.value = f),
275
+ "onUpdate:modelValue": p[0] || (p[0] = (f) => s.value = f),
274
276
  disabled: d.disabled
275
277
  }, null, 8, Rt), [
276
- [Xe, r.value]
278
+ [Ye, s.value]
277
279
  ]),
278
280
  l("span", Pt, [
279
281
  d.icon || d.imgUrl ? (i(), u("span", Nt, [
280
282
  d.icon ? (i(), u("i", {
281
283
  key: 0,
282
- class: S(d.icon)
283
- }, null, 2)) : B("", !0),
284
+ class: V(d.icon)
285
+ }, null, 2)) : j("", !0),
284
286
  d.imgUrl ? (i(), u("img", {
285
287
  key: 1,
286
288
  src: d.imgUrl,
287
289
  width: "16",
288
290
  height: "16",
289
291
  alt: "icon"
290
- }, null, 8, Ht)) : B("", !0)
291
- ])) : B("", !0),
292
- he(d.$slots, "default", {}, () => [
293
- oe(E(d.label), 1)
292
+ }, null, 8, Ht)) : j("", !0)
293
+ ])) : j("", !0),
294
+ ge(d.$slots, "default", {}, () => [
295
+ se(F(d.label), 1)
294
296
  ])
295
297
  ])
296
298
  ], 2));
297
299
  }
298
- }), Gt = { class: "flex items-center" }, tt = /* @__PURE__ */ A({
300
+ }), Gt = { class: "flex items-center" }, lt = /* @__PURE__ */ O({
299
301
  __name: "vs-input-checkbox-item",
300
302
  props: {
301
303
  value: { default: "" },
@@ -312,7 +314,7 @@ const Et = /* @__PURE__ */ R(It, [["render", zt]]), Ft = { class: "flex items-ce
312
314
  },
313
315
  emits: ["update:modelValue"],
314
316
  setup(o, { emit: e }) {
315
- const t = o, n = e, r = `radio-${Math.floor(Math.random() * 1e4)}`, a = O({
317
+ const t = o, n = e, s = `radio-${Math.floor(Math.random() * 1e4)}`, a = D({
316
318
  get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
317
319
  set: (d) => {
318
320
  if (Array.isArray(t.modelValue)) {
@@ -321,23 +323,23 @@ const Et = /* @__PURE__ */ R(It, [["render", zt]]), Ft = { class: "flex items-ce
321
323
  } else
322
324
  n("update:modelValue", d);
323
325
  }
324
- }), s = k(`vs-checkbox-${t.view || "default"}`);
326
+ }), r = x(`vs-checkbox-${t.view || "default"}`);
325
327
  return (d, p) => (i(), u("div", Gt, [
326
- (i(), X(we(s.value === "vs-checkbox-buttons" ? q(qt) : q(Tt)), {
328
+ (i(), te(_e(r.value === "vs-checkbox-buttons" ? J(qt) : J(Tt)), {
327
329
  value: d.value,
328
330
  label: d.label,
329
331
  info: d.option?.info,
330
332
  disabled: d.disabled,
331
333
  modelValue: a.value,
332
334
  "onUpdate:modelValue": p[0] || (p[0] = (f) => a.value = f),
333
- id: r,
335
+ id: s,
334
336
  icon: d.icon,
335
337
  imgUrl: d.imgUrl,
336
- style: me(d.style),
338
+ style: he(d.style),
337
339
  error: d.error
338
340
  }, {
339
- default: Le(() => [
340
- oe(E(d.label), 1)
341
+ default: $e(() => [
342
+ se(F(d.label), 1)
341
343
  ]),
342
344
  _: 1
343
345
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
@@ -392,9 +394,9 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
392
394
  }, ll = {
393
395
  key: 0,
394
396
  class: "text-red-500 text-[14px]"
395
- }, ol = ["title"], al = ["disabled"], lt = /* @__PURE__ */ A({
397
+ }, ol = ["title"], al = ["disabled"], ot = /* @__PURE__ */ O({
396
398
  __name: "vs-input-switcher",
397
- props: /* @__PURE__ */ K({
399
+ props: /* @__PURE__ */ Q({
398
400
  rules: { default: () => [] },
399
401
  view: { default: "checkbox" },
400
402
  label: { default: "" },
@@ -413,38 +415,38 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
413
415
  }),
414
416
  emits: ["update:modelValue"],
415
417
  setup(o) {
416
- const e = o, t = Z(o, "modelValue");
417
- return (n, r) => e.view === "checkbox" ? (i(), u("div", tl, [
418
- j(tt, {
418
+ const e = o, t = X(o, "modelValue");
419
+ return (n, s) => e.view === "checkbox" ? (i(), u("div", tl, [
420
+ B(lt, {
419
421
  modelValue: t.value,
420
- "onUpdate:modelValue": r[0] || (r[0] = (a) => t.value = a),
422
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => t.value = a),
421
423
  label: n.text,
422
424
  error: n.error || ""
423
425
  }, null, 8, ["modelValue", "label", "error"]),
424
- n.rules?.includes("required") ? (i(), u("span", ll, "*")) : B("", !0),
426
+ n.rules?.includes("required") ? (i(), u("span", ll, "*")) : j("", !0),
425
427
  n.i ? (i(), u("button", {
426
428
  key: 1,
427
429
  class: "cursor-pointer",
428
430
  title: n.i,
429
- onClick: r[1] || (r[1] = re(() => {
431
+ onClick: s[1] || (s[1] = ne(() => {
430
432
  }, ["prevent"]))
431
433
  }, [
432
- j(q(el), { class: "text-gray-500 w-[14px] h-[14px]" })
433
- ], 8, ol)) : B("", !0)
434
+ B(J(el), { class: "text-gray-500 w-[14px] h-[14px]" })
435
+ ], 8, ol)) : j("", !0)
434
436
  ])) : (i(), u("button", {
435
437
  key: 1,
436
438
  type: "button",
437
- class: S(["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", [t.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
439
+ class: V(["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", [t.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
438
440
  disabled: n.disabled,
439
- onClick: r[2] || (r[2] = (a) => t.value = !t.value)
441
+ onClick: s[2] || (s[2] = (a) => t.value = !t.value)
440
442
  }, [
441
443
  l("span", {
442
444
  "data-state": "checked",
443
- class: S(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
445
+ class: V(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
444
446
  }, null, 2)
445
447
  ], 10, al));
446
448
  }
447
- }), rl = ["innerHTML"], Ge = /* @__PURE__ */ A({
449
+ }), sl = ["innerHTML"], Je = /* @__PURE__ */ O({
448
450
  __name: "vs-input-static",
449
451
  props: {
450
452
  text: { default: "" },
@@ -459,13 +461,13 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
459
461
  },
460
462
  setup(o) {
461
463
  return (e, t) => (i(), u("div", {
462
- class: S(e.customClass),
464
+ class: V(e.customClass),
463
465
  innerHTML: e.html ? e.html : e.text
464
- }, null, 10, rl));
466
+ }, null, 10, sl));
465
467
  }
466
- }), sl = ["placeholder", "disabled", "name"], nl = /* @__PURE__ */ A({
468
+ }), rl = ["placeholder", "disabled", "name"], nl = /* @__PURE__ */ O({
467
469
  __name: "vs-input-mask",
468
- props: /* @__PURE__ */ K({
470
+ props: /* @__PURE__ */ Q({
469
471
  name: {},
470
472
  mask: { default: "" },
471
473
  unmask: { type: Boolean, default: !1 },
@@ -481,55 +483,54 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
481
483
  }),
482
484
  emits: ["update:modelValue"],
483
485
  setup(o) {
484
- const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue"), r = k(null);
486
+ const e = o, { inputClass: t } = be(e.style), n = X(o, "modelValue"), s = x(null);
485
487
  let a = null;
486
- return ne(async () => {
487
- if (r.value) {
488
- const { default: s } = await import("./index-W-qQIppj.js");
489
- a = s(r.value, {
488
+ return ue(async () => {
489
+ if (s.value) {
490
+ const { default: r } = await import("./index-W-qQIppj.js");
491
+ a = r(s.value, {
490
492
  mask: e.mask || "",
491
493
  definitions: {
492
494
  9: /[0-9]/,
493
495
  A: /[a-zA-Z]/,
494
496
  "*": /[a-zA-Z0-9]/
495
497
  },
496
- lazy: !1,
497
- placeholderChar: e.placeholder
498
+ lazy: !1
498
499
  }), a.on("accept", () => {
499
500
  n.value = e.unmask ? a.unmaskedValue : a.value;
500
501
  }), a.on("complete", () => {
501
502
  n.value = e.unmask ? a.unmaskedValue : a.value;
502
503
  }), a.value = n.value ?? "";
503
504
  }
504
- }), ut(() => {
505
+ }), dt(() => {
505
506
  a?.destroy();
506
- }), se(() => e.mask, (s) => {
507
+ }), ie(() => e.mask, (r) => {
507
508
  a && a.updateOptions({
508
- mask: s,
509
+ mask: r,
509
510
  definitions: {
510
511
  9: /[0-9]/,
511
512
  A: /[a-zA-Z]/,
512
513
  "*": /[a-zA-Z0-9]/
513
514
  }
514
515
  });
515
- }), se(n, (s) => {
516
- a && a.unmaskedValue !== s && (a.value = s || "");
517
- }), (s, d) => (i(), u("input", {
516
+ }), ie(n, (r) => {
517
+ a && a.unmaskedValue !== r && (a.value = r || "");
518
+ }), (r, d) => (i(), u("input", {
518
519
  type: "text",
519
520
  ref_key: "inputEl",
520
- ref: r,
521
- placeholder: s.placeholder,
522
- disabled: s.disabled,
523
- name: s.name,
524
- class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [q(t)]]),
521
+ ref: s,
522
+ placeholder: r.placeholder,
523
+ disabled: r.disabled,
524
+ name: r.name,
525
+ class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [J(t)]]),
525
526
  style: {
526
527
  border: "1px solid #CFD9E0"
527
528
  }
528
- }, null, 10, sl));
529
+ }, null, 10, rl));
529
530
  }
530
- }), il = { class: "relative w-full bg-white rounded-lg" }, ul = ["placeholder", "disabled"], dl = /* @__PURE__ */ A({
531
+ }), il = { class: "relative w-full bg-white rounded-lg" }, ul = ["placeholder", "disabled"], dl = /* @__PURE__ */ O({
531
532
  __name: "vs-input-email",
532
- props: /* @__PURE__ */ K({
533
+ props: /* @__PURE__ */ Q({
533
534
  style: { default: () => ({}) },
534
535
  customClass: { default: "" },
535
536
  disabled: { type: Boolean, default: !1 },
@@ -543,26 +544,26 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
543
544
  }),
544
545
  emits: ["update:modelValue"],
545
546
  setup(o) {
546
- const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue");
547
- return (r, a) => (i(), u("div", il, [
548
- 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)),
549
- G(l("input", {
547
+ const e = o, { inputClass: t } = be(e.style), n = X(o, "modelValue");
548
+ return (s, a) => (i(), u("div", il, [
549
+ a[1] || (a[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)),
550
+ K(l("input", {
550
551
  type: "email",
551
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
552
- placeholder: r.placeholder,
553
- disabled: r.disabled,
554
- class: S(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [q(t), { "!border-red-600": r.error }]]),
552
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
553
+ placeholder: s.placeholder,
554
+ disabled: s.disabled,
555
+ class: V(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [J(t), { "!border-red-600": s.error }]]),
555
556
  style: {
556
557
  border: "1px solid #CFD9E0"
557
558
  }
558
559
  }, null, 10, ul), [
559
- [ie, n.value]
560
+ [de, n.value]
560
561
  ])
561
562
  ]));
562
563
  }
563
- }), cl = ["value", "disabled"], pl = { class: "text-[13px] text-gray-700" }, fl = /* @__PURE__ */ A({
564
+ }), cl = ["value", "disabled"], pl = { class: "text-[13px] text-gray-700" }, fl = /* @__PURE__ */ O({
564
565
  __name: "vs-input-radio-default",
565
- props: /* @__PURE__ */ K({
566
+ props: /* @__PURE__ */ Q({
566
567
  style: {},
567
568
  customClass: { default: "" },
568
569
  disabled: { type: Boolean, default: !1 },
@@ -578,36 +579,36 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
578
579
  }),
579
580
  emits: ["update:modelValue"],
580
581
  setup(o) {
581
- const e = Z(o, "modelValue");
582
+ const e = X(o, "modelValue");
582
583
  return (t, n) => (i(), u("label", {
583
- class: S(["flex items-center gap-0", [t.customClass]])
584
+ class: V(["flex items-center gap-0", [t.customClass]])
584
585
  }, [
585
- G(l("input", {
586
- "onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
586
+ K(l("input", {
587
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => e.value = s),
587
588
  type: "radio",
588
589
  value: t.value,
589
590
  disabled: t.disabled,
590
591
  class: "hidden"
591
592
  }, null, 8, cl), [
592
- [Ye, e.value]
593
+ [et, e.value]
593
594
  ]),
594
595
  l("span", {
595
- class: S(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
596
+ class: V(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
596
597
  `border-${t.style?.primaryColor || "blue"}-500`,
597
598
  t.disabled ? "opacity-50 cursor-not-allowed" : ""
598
599
  ]])
599
600
  }, [
600
601
  e.value == t.value ? (i(), u("span", {
601
602
  key: 0,
602
- class: S(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
603
- }, null, 2)) : B("", !0)
603
+ class: V(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
604
+ }, null, 2)) : j("", !0)
604
605
  ], 2),
605
- l("span", pl, E(t.text), 1)
606
+ l("span", pl, F(t.text), 1)
606
607
  ], 2));
607
608
  }
608
- }), vl = ["value", "disabled"], ml = { class: "text-[13px] text-gray-700" }, hl = /* @__PURE__ */ A({
609
+ }), vl = ["value", "disabled"], ml = { class: "text-[13px] text-gray-700" }, hl = /* @__PURE__ */ O({
609
610
  __name: "vs-input-radio-buttons",
610
- props: /* @__PURE__ */ K({
611
+ props: /* @__PURE__ */ Q({
611
612
  style: {},
612
613
  customClass: { default: "" },
613
614
  disabled: { type: Boolean, default: !1 },
@@ -623,31 +624,31 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
623
624
  }),
624
625
  emits: ["update:modelValue"],
625
626
  setup(o) {
626
- const e = Z(o, "modelValue");
627
+ const e = X(o, "modelValue");
627
628
  return (t, n) => (i(), u("label", {
628
- class: S(["flex items-center border rounded-lg px-2 py-1", [
629
+ class: V(["flex items-center border rounded-lg px-2 py-1", [
629
630
  e.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
630
631
  t.customClass
631
632
  ]])
632
633
  }, [
633
- G(l("input", {
634
- "onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
634
+ K(l("input", {
635
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => e.value = s),
635
636
  type: "radio",
636
637
  value: t.value,
637
638
  disabled: t.disabled,
638
639
  class: "hidden"
639
640
  }, null, 8, vl), [
640
- [Ye, e.value]
641
+ [et, e.value]
641
642
  ]),
642
- l("span", ml, E(t.text), 1)
643
+ l("span", ml, F(t.text), 1)
643
644
  ], 2));
644
645
  }
645
646
  }), gl = {
646
647
  "vs-input-radio-default": fl,
647
648
  "vs-input-radio-buttons": hl
648
- }, Je = /* @__PURE__ */ A({
649
+ }, Ke = /* @__PURE__ */ O({
649
650
  __name: "vs-input-radio",
650
- props: /* @__PURE__ */ K({
651
+ props: /* @__PURE__ */ Q({
651
652
  options: {},
652
653
  position: { default: "vertical" },
653
654
  view: { default: "default" },
@@ -664,21 +665,21 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
664
665
  }),
665
666
  emits: ["update:modelValue"],
666
667
  setup(o) {
667
- const e = o, t = Z(o, "modelValue"), n = O(() => gl[`vs-input-radio-${e.view}`]);
668
- return (r, a) => (i(), u("div", {
669
- class: S([r.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
668
+ const e = o, t = X(o, "modelValue"), n = D(() => gl[`vs-input-radio-${e.view}`]);
669
+ return (s, a) => (i(), u("div", {
670
+ class: V([s.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
670
671
  }, [
671
- (i(!0), u(Q, null, Y(r.options, (s) => (i(), X(we(n.value), Ve({
672
- key: s?.id,
673
- text: s.text,
674
- value: s.id.toString(),
675
- checked: t.value === s.id,
672
+ (i(!0), u(ee, null, le(s.options, (r) => (i(), te(_e(n.value), Le({
673
+ key: r?.id,
674
+ text: r.text,
675
+ value: r.id.toString(),
676
+ checked: t.value === r.id,
676
677
  modelValue: t.value,
677
678
  "onUpdate:modelValue": a[0] || (a[0] = (d) => t.value = d)
678
- }, { ref_for: !0 }, r.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
679
+ }, { ref_for: !0 }, s.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
679
680
  ], 2));
680
681
  }
681
- }), bl = /* @__PURE__ */ A({
682
+ }), bl = /* @__PURE__ */ O({
682
683
  __name: "vs-input-checkbox",
683
684
  props: {
684
685
  options: { default: () => [] },
@@ -697,81 +698,81 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
697
698
  },
698
699
  emits: ["update:modelValue"],
699
700
  setup(o, { emit: e }) {
700
- const t = o, n = e, r = k([]), 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 () => {
701
+ const t = o, n = e, s = x([]), a = ct({}), r = (c) => c?.value || c?.id || c?.text || c, d = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, f = async () => {
701
702
  try {
702
703
  const c = await fetch(`/api/suggest/${t.data}`).then((g) => g.json());
703
- r.value = c?.data || c;
704
+ s.value = c?.data || c;
704
705
  } catch (c) {
705
706
  console.error(c);
706
707
  }
707
708
  };
708
- return se(
709
+ return ie(
709
710
  () => t.modelValue,
710
711
  (c) => {
711
- if (typeof c == "boolean" && r.value.length === 1) {
712
- const g = s(r.value[0]);
712
+ if (typeof c == "boolean" && s.value.length === 1) {
713
+ const g = r(s.value[0]);
713
714
  a[g] = c;
714
715
  } else if (Array.isArray(c)) {
715
716
  const g = new Set(c);
716
- r.value.forEach((v) => {
717
+ s.value.forEach((v) => {
717
718
  if (!v.disabled) {
718
- const M = s(v);
719
- a[M] = g.has(M);
719
+ const C = r(v);
720
+ a[C] = g.has(C);
720
721
  }
721
722
  });
722
723
  }
723
724
  },
724
725
  { immediate: !0 }
725
- ), se(
726
+ ), ie(
726
727
  a,
727
728
  () => {
728
- if (!r.value.length) {
729
+ if (!s.value.length) {
729
730
  n("update:modelValue", null);
730
731
  return;
731
732
  }
732
733
  const c = Object.entries(a).filter(([, g]) => g).map(([g]) => g);
733
- n("update:modelValue", c.length === 0 ? null : c);
734
+ n("update:modelValue", c.length === 0 ? [] : c);
734
735
  },
735
736
  { deep: !0 }
736
- ), ne(() => {
737
+ ), ue(() => {
737
738
  if (t.data)
738
739
  f().then(() => {
739
- if (typeof t.modelValue == "boolean" && r.value.length === 1) {
740
- const c = s(r.value[0]);
740
+ if (typeof t.modelValue == "boolean" && s.value.length === 1) {
741
+ const c = r(s.value[0]);
741
742
  a[c] = t.modelValue;
742
743
  } else if (Array.isArray(t.modelValue)) {
743
744
  const c = new Set(t.modelValue);
744
- r.value.forEach((g) => {
745
+ s.value.forEach((g) => {
745
746
  if (!g.disabled) {
746
- const v = s(g);
747
+ const v = r(g);
747
748
  a[v] = c.has(v);
748
749
  }
749
750
  });
750
751
  }
751
752
  });
752
- else if (r.value = t.options, typeof t.modelValue == "boolean" && r.value.length === 1) {
753
- const c = s(r.value[0]);
753
+ else if (s.value = t.options, typeof t.modelValue == "boolean" && s.value.length === 1) {
754
+ const c = r(s.value[0]);
754
755
  a[c] = t.modelValue;
755
756
  } else if (Array.isArray(t.modelValue)) {
756
757
  const c = new Set(t.modelValue);
757
- r.value.forEach((g) => {
758
+ s.value.forEach((g) => {
758
759
  if (!g.disabled) {
759
- const v = s(g);
760
+ const v = r(g);
760
761
  a[v] = c.has(v);
761
762
  }
762
763
  });
763
764
  }
764
765
  }), (c, g) => (i(), u("div", {
765
- class: S(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
766
+ class: V(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
766
767
  }, [
767
- (i(!0), u(Q, null, Y(r.value, (v) => (i(), X(tt, {
768
- modelValue: a[s(v)],
769
- "onUpdate:modelValue": (M) => a[s(v)] = M,
770
- value: s(v),
771
- class: S(p(c.colSpan)),
768
+ (i(!0), u(ee, null, le(s.value, (v) => (i(), te(lt, {
769
+ modelValue: a[r(v)],
770
+ "onUpdate:modelValue": (C) => a[r(v)] = C,
771
+ value: r(v),
772
+ class: V(p(c.colSpan)),
772
773
  disabled: v.disabled,
773
774
  label: d(v),
774
- key: s(v),
775
+ key: r(v),
775
776
  icon: v?.icon,
776
777
  imgUrl: v?.imgUrl,
777
778
  option: v,
@@ -779,7 +780,7 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
779
780
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
780
781
  ], 2));
781
782
  }
782
- }), yl = /* @__PURE__ */ R(bl, [["__scopeId", "data-v-54f9e19c"]]), xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ A({
783
+ }), yl = /* @__PURE__ */ R(bl, [["__scopeId", "data-v-91f3584a"]]), xl = ["placeholder", "disabled"], wl = /* @__PURE__ */ O({
783
784
  __name: "vs-input-date1",
784
785
  props: {
785
786
  style: { default: () => ({}) },
@@ -792,41 +793,41 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
792
793
  },
793
794
  emits: ["update:modelValue"],
794
795
  setup(o, { emit: e }) {
795
- const t = o, { inputClass: n } = ge(t.style), r = e, a = O({
796
+ const t = o, { inputClass: n } = be(t.style), s = e, a = D({
796
797
  get: () => t.modelValue?.split(" ")[0],
797
- set: (s) => r("update:modelValue", s)
798
+ set: (r) => s("update:modelValue", r)
798
799
  });
799
- return (s, d) => G((i(), u("input", {
800
+ return (r, d) => K((i(), u("input", {
800
801
  type: "date",
801
802
  "onUpdate:modelValue": d[0] || (d[0] = (p) => a.value = p),
802
- placeholder: s.placeholder,
803
- disabled: s.disabled,
803
+ placeholder: r.placeholder,
804
+ disabled: r.disabled,
804
805
  ref: "date",
805
- class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [s.modelValue ? "" : "text-opacity-50", q(n)].join(" ")]),
806
+ class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [r.modelValue ? "" : "text-opacity-50", J(n)].join(" ")]),
806
807
  style: {
807
808
  border: "1px solid #CFD9E0"
808
809
  }
809
810
  }, null, 10, xl)), [
810
- [ie, a.value]
811
+ [de, a.value]
811
812
  ]);
812
813
  }
813
814
  }), kl = async (o, e, t, n) => {
814
815
  try {
815
- const r = new FormData();
816
- return r.append("unique", "true"), r.append("file", o), (await fetch(
816
+ const s = new FormData();
817
+ return s.append("unique", "true"), s.append("file", o), (await fetch(
817
818
  `/file/upload/uploads?id=${e || ""}&form=${t || ""}&table=${n || ""}`,
818
819
  {
819
820
  method: "POST",
820
- body: r
821
+ body: s
821
822
  }
822
- ).then((s) => s.json()))?.result;
823
- } catch (r) {
824
- return ve({
823
+ ).then((r) => r.json()))?.result;
824
+ } catch (s) {
825
+ return pe({
825
826
  type: "error",
826
827
  title: "Помилка!",
827
828
  message: "Сталась помилка під час завантаження файлу",
828
829
  position: "right-bottom"
829
- }), console.error("Сталась помилка завантаження файлу", r), null;
830
+ }), console.error("Сталась помилка завантаження файлу", s), null;
830
831
  }
831
832
  }, _l = async (o) => {
832
833
  try {
@@ -834,10 +835,10 @@ const el = /* @__PURE__ */ R(Qt, [["render", Yt]]), tl = {
834
835
  } catch (e) {
835
836
  return console.error(e), !1;
836
837
  }
837
- }, Ke = async (o) => {
838
+ }, Ze = async (o) => {
838
839
  try {
839
- const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), n = e.headers["content-type"], r = new TextDecoder("utf-8").decode(t), a = new Blob([r], { type: n }), s = document.createElement("a");
840
- s.setAttribute("download", o), s.href = window.URL.createObjectURL(a), s.click();
840
+ const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), n = e.headers["content-type"], s = new TextDecoder("utf-8").decode(t), a = new Blob([s], { type: n }), r = document.createElement("a");
841
+ r.setAttribute("download", o), r.href = window.URL.createObjectURL(a), r.click();
841
842
  } catch (e) {
842
843
  console.error(e.message);
843
844
  }
@@ -870,9 +871,9 @@ const je = /* @__PURE__ */ R($l, [["render", Vl]]), Ml = {}, Ll = {
870
871
  "stroke-linecap": "round",
871
872
  "stroke-linejoin": "round"
872
873
  };
873
- function Sl(o, e, t, n, r, a) {
874
+ function Sl(o, e, t, n, s, a) {
874
875
  return i(), u("svg", Ll, e[0] || (e[0] = [
875
- 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)
876
+ 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)
876
877
  ]));
877
878
  }
878
879
  const Bl = /* @__PURE__ */ R(Ml, [["render", Sl]]), jl = {}, Il = {
@@ -887,7 +888,7 @@ const Bl = /* @__PURE__ */ R(Ml, [["render", Sl]]), jl = {}, Il = {
887
888
  "stroke-linecap": "round",
888
889
  "stroke-linejoin": "round"
889
890
  };
890
- function Al(o, e, t, n, r, a) {
891
+ function zl(o, e, t, n, s, a) {
891
892
  return i(), u("svg", Il, e[0] || (e[0] = [
892
893
  l("path", {
893
894
  stroke: "none",
@@ -915,7 +916,7 @@ function Al(o, e, t, n, r, a) {
915
916
  }, null, -1)
916
917
  ]));
917
918
  }
918
- const zl = /* @__PURE__ */ R(jl, [["render", Al]]), El = {}, Fl = {
919
+ const Al = /* @__PURE__ */ R(jl, [["render", zl]]), Ol = {}, El = {
919
920
  xmlns: "http://www.w3.org/2000/svg",
920
921
  width: "24",
921
922
  height: "24",
@@ -927,12 +928,12 @@ const zl = /* @__PURE__ */ R(jl, [["render", Al]]), El = {}, Fl = {
927
928
  "stroke-linejoin": "round",
928
929
  class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
929
930
  };
930
- function Ol(o, e, t, n, r, a) {
931
- return i(), u("svg", Fl, e[0] || (e[0] = [
932
- 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)
931
+ function Fl(o, e, t, n, s, a) {
932
+ return i(), u("svg", El, e[0] || (e[0] = [
933
+ 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)
933
934
  ]));
934
935
  }
935
- const Dl = /* @__PURE__ */ R(El, [["render", Ol]]), Ul = {}, Tl = {
936
+ const Dl = /* @__PURE__ */ R(Ol, [["render", Fl]]), Ul = {}, Tl = {
936
937
  xmlns: "http://www.w3.org/2000/svg",
937
938
  class: "icon icon-tabler icon-tabler-file-zip",
938
939
  width: "44",
@@ -944,9 +945,9 @@ const Dl = /* @__PURE__ */ R(El, [["render", Ol]]), Ul = {}, Tl = {
944
945
  "stroke-linecap": "round",
945
946
  "stroke-linejoin": "round"
946
947
  };
947
- function Rl(o, e, t, n, r, a) {
948
+ function Rl(o, e, t, n, s, a) {
948
949
  return i(), u("svg", Tl, e[0] || (e[0] = [
949
- 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)
950
+ 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)
950
951
  ]));
951
952
  }
952
953
  const Pl = /* @__PURE__ */ R(Ul, [["render", Rl]]), Nl = {}, Hl = {
@@ -961,9 +962,9 @@ const Pl = /* @__PURE__ */ R(Ul, [["render", Rl]]), Nl = {}, Hl = {
961
962
  "stroke-linecap": "round",
962
963
  "stroke-linejoin": "round"
963
964
  };
964
- function ql(o, e, t, n, r, a) {
965
+ function ql(o, e, t, n, s, a) {
965
966
  return i(), u("svg", Hl, e[0] || (e[0] = [
966
- 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)
967
+ 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)
967
968
  ]));
968
969
  }
969
970
  const Gl = /* @__PURE__ */ R(Nl, [["render", ql]]), Jl = (o) => {
@@ -978,7 +979,7 @@ const Gl = /* @__PURE__ */ R(Nl, [["render", ql]]), Jl = (o) => {
978
979
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
979
980
  documentsFormat: ["pdf"]
980
981
  };
981
- return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? zl : t.textsFormat.includes(e) ? Gl : t.documentsFormat.includes(e) ? Bl : t.archivesFormat.includes(e) ? Pl : Dl;
982
+ return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? Al : t.textsFormat.includes(e) ? Gl : t.documentsFormat.includes(e) ? Bl : t.archivesFormat.includes(e) ? Pl : Dl;
982
983
  }, Zl = {}, Wl = {
983
984
  xmlns: "http://www.w3.org/2000/svg",
984
985
  width: "24",
@@ -993,10 +994,10 @@ const Gl = /* @__PURE__ */ R(Nl, [["render", ql]]), Jl = (o) => {
993
994
  };
994
995
  function Ql(o, e) {
995
996
  return i(), u("svg", Wl, e[0] || (e[0] = [
996
- 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)
997
+ 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)
997
998
  ]));
998
999
  }
999
- const Ie = /* @__PURE__ */ R(Zl, [["render", Ql]]), Xl = {}, Yl = {
1000
+ const ze = /* @__PURE__ */ R(Zl, [["render", Ql]]), Xl = {}, Yl = {
1000
1001
  xmlns: "http://www.w3.org/2000/svg",
1001
1002
  width: "24",
1002
1003
  height: "24",
@@ -1020,9 +1021,9 @@ function eo(o, e) {
1020
1021
  l("path", { d: "M12 4l0 12" }, null, -1)
1021
1022
  ]));
1022
1023
  }
1023
- const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, lo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, oo = /* @__PURE__ */ A({
1024
+ const at = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, lo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, oo = /* @__PURE__ */ O({
1024
1025
  __name: "vs-input-file-list-item",
1025
- props: /* @__PURE__ */ K({
1026
+ props: /* @__PURE__ */ Q({
1026
1027
  format: {},
1027
1028
  multiple: { type: Boolean },
1028
1029
  style: {},
@@ -1040,40 +1041,40 @@ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[
1040
1041
  }),
1041
1042
  emits: ["update:value", "update:item"],
1042
1043
  setup(o) {
1043
- const e = Z(o, "value"), t = Z(o, "item"), n = o;
1044
- return (r, a) => (i(), u("div", to, [
1045
- (i(), X(we(q(Kl)(t.value)), {
1044
+ const e = X(o, "value"), t = X(o, "item"), n = o;
1045
+ return (s, a) => (i(), u("div", to, [
1046
+ (i(), te(_e(J(Kl)(t.value)), {
1046
1047
  src: t.value,
1047
1048
  alt: "file",
1048
1049
  class: "w-full h-full object-cover cursor-pointer",
1049
- onClick: a[0] || (a[0] = (s) => q(Ke)(t.value))
1050
+ onClick: a[0] || (a[0] = (r) => J(Ze)(t.value))
1050
1051
  }, null, 8, ["src"])),
1051
1052
  l("div", lo, [
1052
1053
  l("button", {
1053
1054
  type: "button",
1054
- onClick: a[1] || (a[1] = (s) => {
1055
- q(_l)(t.value), e.value = n.multiple ? e.value?.filter((d) => d !== t.value) : "";
1055
+ onClick: a[1] || (a[1] = (r) => {
1056
+ J(_l)(t.value), e.value = n.multiple ? e.value?.filter((d) => d !== t.value) : "";
1056
1057
  }),
1057
1058
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1058
1059
  }, [
1059
- j(Ie, { class: "w-4 h-4" })
1060
+ B(ze, { class: "w-4 h-4" })
1060
1061
  ]),
1061
1062
  l("button", {
1062
1063
  type: "button",
1063
- onClick: a[2] || (a[2] = (s) => q(Ke)(t.value)),
1064
+ onClick: a[2] || (a[2] = (r) => J(Ze)(t.value)),
1064
1065
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
1065
1066
  }, [
1066
- j(ot, { class: "w-4 h-4" })
1067
+ B(at, { class: "w-4 h-4" })
1067
1068
  ])
1068
1069
  ])
1069
1070
  ]));
1070
1071
  }
1071
- }), Ze = /* @__PURE__ */ R(oo, [["__scopeId", "data-v-0ca886b3"]]), ao = { class: "flex items-center gap-x-2" }, ro = {
1072
+ }), We = /* @__PURE__ */ R(oo, [["__scopeId", "data-v-0ca886b3"]]), ao = { class: "flex items-center gap-x-2" }, so = {
1072
1073
  key: 1,
1073
1074
  class: "flex items-center flex-wrap gap-2"
1074
- }, so = /* @__PURE__ */ A({
1075
+ }, ro = /* @__PURE__ */ O({
1075
1076
  __name: "vs-input-file",
1076
- props: /* @__PURE__ */ K({
1077
+ props: /* @__PURE__ */ Q({
1077
1078
  format: {},
1078
1079
  multiple: { type: Boolean },
1079
1080
  style: {},
@@ -1089,18 +1090,18 @@ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[
1089
1090
  }),
1090
1091
  emits: ["update:modelValue"],
1091
1092
  setup(o) {
1092
- const e = o, t = Z(o, "modelValue"), n = k(null), r = (s) => Array.isArray(t.value) && t.value[s] || "", a = async (s) => {
1093
+ const e = o, t = X(o, "modelValue"), n = x(null), s = (r) => Array.isArray(t.value) && t.value[r] || "", a = async (r) => {
1093
1094
  if (e.format) {
1094
- const f = s.target.files?.[0];
1095
+ const f = r.target.files?.[0];
1095
1096
  if (!f || !f.name.endsWith(e.format))
1096
1097
  return;
1097
1098
  }
1098
- const d = s.target.files?.[0];
1099
+ const d = r.target.files?.[0];
1099
1100
  if (!d) return;
1100
1101
  const p = await kl(d, "1", "form", "table");
1101
1102
  t.value = e.multiple ? [...t.value || [], p?.file_path] : p?.file_path;
1102
1103
  };
1103
- return (s, d) => (i(), u("div", ao, [
1104
+ return (r, d) => (i(), u("div", ao, [
1104
1105
  l("input", {
1105
1106
  class: "hidden",
1106
1107
  ref_key: "fileInput",
@@ -1108,46 +1109,46 @@ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[
1108
1109
  type: "file",
1109
1110
  onChange: a
1110
1111
  }, null, 544),
1111
- !s.multiple && t.value ? (i(), X(Ze, {
1112
+ !r.multiple && t.value ? (i(), te(We, {
1112
1113
  key: 0,
1113
1114
  item: t.value,
1114
1115
  "onUpdate:item": d[0] || (d[0] = (p) => t.value = p),
1115
1116
  value: t.value,
1116
1117
  "onUpdate:value": d[1] || (d[1] = (p) => t.value = p)
1117
- }, null, 8, ["item", "value"])) : s.multiple ? (i(), u("div", ro, [
1118
- (i(!0), u(Q, null, Y(t.value, (p, f) => (i(), X(Ze, {
1119
- multiple: s.multiple,
1118
+ }, null, 8, ["item", "value"])) : r.multiple ? (i(), u("div", so, [
1119
+ (i(!0), u(ee, null, le(t.value, (p, f) => (i(), te(We, {
1120
+ multiple: r.multiple,
1120
1121
  key: f,
1121
1122
  value: t.value,
1122
1123
  "onUpdate:value": d[2] || (d[2] = (c) => t.value = c),
1123
- item: r(f)
1124
+ item: s(f)
1124
1125
  }, null, 8, ["multiple", "value", "item"]))), 128)),
1125
1126
  l("div", {
1126
- onClick: d[3] || (d[3] = (p) => !s.disabled && n.value?.click()),
1127
- class: S([
1127
+ onClick: d[3] || (d[3] = (p) => !r.disabled && n.value?.click()),
1128
+ class: V([
1128
1129
  "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",
1129
- s.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1130
+ r.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1130
1131
  ])
1131
1132
  }, [
1132
- j(je, { class: "w-6 h-6" })
1133
+ B(je, { class: "w-6 h-6" })
1133
1134
  ], 2)
1134
- ])) : B("", !0),
1135
- s.multiple ? B("", !0) : (i(), u("div", {
1135
+ ])) : j("", !0),
1136
+ r.multiple ? j("", !0) : (i(), u("div", {
1136
1137
  key: 2,
1137
1138
  onClick: d[4] || (d[4] = (p) => n.value?.click()),
1138
- class: S([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"])
1139
+ class: V([r.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"])
1139
1140
  }, [
1140
- j(je, { class: "w-6 h-6" })
1141
+ B(je, { class: "w-6 h-6" })
1141
1142
  ], 2))
1142
1143
  ]));
1143
1144
  }
1144
- }), no = { class: "max-w-[55vw]" }, io = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, uo = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, co = { class: "px-[5px]" }, po = { class: "" }, Se = /* @__PURE__ */ A({
1145
+ }), no = { class: "max-w-[55vw]" }, io = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, uo = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, co = { class: "px-[5px]" }, po = { class: "" }, Se = /* @__PURE__ */ O({
1145
1146
  __name: "vs-widget-file-info",
1146
1147
  props: {
1147
1148
  item: { default: null }
1148
1149
  },
1149
1150
  setup(o) {
1150
- const e = o, t = O(() => {
1151
+ const e = o, t = D(() => {
1151
1152
  try {
1152
1153
  return new Date(e.item.cdate).toLocaleDateString("uk-UA", {
1153
1154
  day: "2-digit",
@@ -1158,24 +1159,24 @@ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[
1158
1159
  return "";
1159
1160
  }
1160
1161
  });
1161
- function n(r) {
1162
- if (r < 1024)
1163
- return `${r} B`;
1164
- const a = r / 1024;
1162
+ function n(s) {
1163
+ if (s < 1024)
1164
+ return `${s} B`;
1165
+ const a = s / 1024;
1165
1166
  return a < 1024 ? `${a.toFixed(2)} KB` : `${(a / 1024).toFixed(2)} MB`;
1166
1167
  }
1167
- return (r, a) => (i(), u(Q, null, [
1168
- 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)),
1168
+ return (s, a) => (i(), u(ee, null, [
1169
+ a[1] || (a[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)),
1169
1170
  l("div", no, [
1170
- l("p", io, E(r.item?.uploaded_name), 1),
1171
+ l("p", io, F(s.item?.uploaded_name), 1),
1171
1172
  l("p", uo, [
1172
- l("span", null, E(r.item?.username), 1),
1173
- G(l("span", co, "|", 512), [
1174
- [Ue, r.item?.username]
1173
+ l("span", null, F(s.item?.username), 1),
1174
+ K(l("span", co, "|", 512), [
1175
+ [Ue, s.item?.username]
1175
1176
  ]),
1176
- l("span", null, E(t.value), 1),
1177
+ l("span", null, F(t.value), 1),
1177
1178
  a[0] || (a[0] = l("span", { class: "px-[5px]" }, "|", -1)),
1178
- l("span", po, E(n(r.item?.size)), 1)
1179
+ l("span", po, F(n(s.item?.size)), 1)
1179
1180
  ])
1180
1181
  ])
1181
1182
  ], 64));
@@ -1192,7 +1193,7 @@ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[
1192
1193
  }, go = ["href"], bo = {
1193
1194
  key: 3,
1194
1195
  class: "flex gap-x-3 w-full items-center"
1195
- }, yo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, xo = { 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" }, wo = { class: "inline-block" }, ko = { class: "inline-block" }, _o = /* @__PURE__ */ A({
1196
+ }, yo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, xo = { 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" }, wo = { class: "inline-block" }, ko = { class: "inline-block" }, _o = /* @__PURE__ */ O({
1196
1197
  __name: "vs-widget-file-item",
1197
1198
  props: {
1198
1199
  item: { default: null },
@@ -1202,13 +1203,13 @@ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[
1202
1203
  emits: ["update", "openModal", "openLightbox"],
1203
1204
  setup(o, { emit: e }) {
1204
1205
  const t = o, n = e;
1205
- function r(c) {
1206
+ function s(c) {
1206
1207
  return ["pdf", "json"].includes(c.ext);
1207
1208
  }
1208
1209
  function a(c) {
1209
1210
  return ["ppt", "pptx", "doc", "docx", "xls", "xlsx"].includes(c.ext);
1210
1211
  }
1211
- function s(c) {
1212
+ function r(c) {
1212
1213
  const g = document.createElement("a");
1213
1214
  g.setAttribute("download", c?.uploaded_name), g.href = c?.file_path, g.click();
1214
1215
  }
@@ -1240,29 +1241,29 @@ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[
1240
1241
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
1241
1242
  onClick: g[0] || (g[0] = (v) => f(c.index))
1242
1243
  }, [
1243
- j(Se, { item: c.item }, null, 8, ["item"])
1244
+ B(Se, { item: c.item }, null, 8, ["item"])
1244
1245
  ])
1245
- ])) : r(c.item) ? (i(), u("div", mo, [
1246
- j(Se, { item: c.item }, null, 8, ["item"])
1246
+ ])) : s(c.item) ? (i(), u("div", mo, [
1247
+ B(Se, { item: c.item }, null, 8, ["item"])
1247
1248
  ])) : a(c.item) ? (i(), u("div", ho, [
1248
1249
  l("a", {
1249
1250
  href: `/api/file-preview?id=${c.item.file_id}`,
1250
1251
  target: "_blank",
1251
1252
  class: "flex gap-x-3 w-full items-center"
1252
1253
  }, [
1253
- j(Se, { item: c.item }, null, 8, ["item"])
1254
+ B(Se, { item: c.item }, null, 8, ["item"])
1254
1255
  ], 8, go)
1255
1256
  ])) : (i(), u("div", bo, [
1256
- j(Se, { item: c.item }, null, 8, ["item"])
1257
+ B(Se, { item: c.item }, null, 8, ["item"])
1257
1258
  ])),
1258
1259
  l("div", yo, [
1259
1260
  l("div", xo, [
1260
1261
  l("div", wo, [
1261
1262
  l("button", {
1262
1263
  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",
1263
- onClick: g[1] || (g[1] = (v) => s(c.item))
1264
+ onClick: g[1] || (g[1] = (v) => r(c.item))
1264
1265
  }, [
1265
- j(ot, {
1266
+ B(at, {
1266
1267
  height: "14",
1267
1268
  width: "14"
1268
1269
  })
@@ -1275,7 +1276,7 @@ const ot = /* @__PURE__ */ R(Xl, [["render", eo]]), to = { class: "h-[120px] w-[
1275
1276
  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",
1276
1277
  onClick: g[2] || (g[2] = (v) => p())
1277
1278
  }, [
1278
- j(Ie, {
1279
+ B(ze, {
1279
1280
  height: "14",
1280
1281
  width: "14"
1281
1282
  })
@@ -1309,13 +1310,13 @@ function Vo(o, e) {
1309
1310
  l("path", { d: "M12 4l0 12" }, null, -1)
1310
1311
  ]));
1311
1312
  }
1312
- const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, So = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Bo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, jo = { class1: "ml-auto" }, Io = { 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 = {
1313
+ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, So = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Bo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, jo = { class1: "ml-auto" }, Io = { 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" }, zo = {
1313
1314
  key: 0,
1314
1315
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
1315
- }, zo = { class: "relative" }, Eo = {
1316
+ }, Ao = { class: "relative" }, Oo = {
1316
1317
  key: 1,
1317
1318
  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"
1318
- }, Fo = { key: 0 }, Oo = /* @__PURE__ */ A({
1319
+ }, Eo = { key: 0 }, Fo = /* @__PURE__ */ O({
1319
1320
  __name: "vs-input-file-list",
1320
1321
  props: {
1321
1322
  id: { default: "" },
@@ -1330,57 +1331,57 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1330
1331
  },
1331
1332
  emits: ["update"],
1332
1333
  setup(o, { emit: e }) {
1333
- const t = o, n = Be("form"), r = O(() => n.value.formId), a = k(!1), s = k(0), d = e, p = k(!1), f = k({}), c = k([]), g = k(""), v = O(() => Array.isArray(c.value) ? c.value.filter((x) => x.ext === "jpg" || x.ext === "png").map((x) => x?.file_path) : []), M = O(() => g.value === "" ? c.value : c.value.filter((x) => x?.uploaded_name?.includes(g.value))), I = (x) => {
1334
- const h = v.value.findIndex((J) => J === x.item.file_path);
1335
- h !== -1 && (a.value = !0, s.value = h);
1336
- }, D = async () => {
1334
+ const t = o, n = Be("form"), s = D(() => n.value.formId), a = x(!1), r = x(0), d = e, p = x(!1), f = x({}), c = x([]), g = x(""), v = D(() => Array.isArray(c.value) ? c.value.filter((b) => b.ext === "jpg" || b.ext === "png").map((b) => b?.file_path) : []), C = D(() => g.value === "" ? c.value : c.value.filter((b) => b?.uploaded_name?.includes(g.value))), z = (b) => {
1335
+ const h = v.value.findIndex((Z) => Z === b.item.file_path);
1336
+ h !== -1 && (a.value = !0, r.value = h);
1337
+ }, U = async () => {
1337
1338
  try {
1338
- const x = await fetch(`${t.prefix}/widget/file/${r.value}`).then((h) => h.json());
1339
- c.value = x?.rows;
1340
- } catch (x) {
1341
- console.error(x);
1339
+ const b = await fetch(`${t.prefix}/widget/file/${s.value}`).then((h) => h.json());
1340
+ c.value = b?.rows;
1341
+ } catch (b) {
1342
+ console.error(b);
1342
1343
  }
1343
- }, T = async (x) => {
1344
+ }, T = async (b) => {
1344
1345
  await Promise.all(
1345
- Array.from(x.target.files).map(async (h) => {
1346
- const J = new FormData();
1347
- J.append("file", h);
1346
+ Array.from(b.target.files).map(async (h) => {
1347
+ const Z = new FormData();
1348
+ Z.append("file", h);
1348
1349
  try {
1349
- const C = `${t.prefix}/widget/file/${r.value}`;
1350
- return await fetch(C, { method: "POST", body: J }), d("update", "file-list"), h;
1351
- } catch (C) {
1352
- return console.error(C), null;
1350
+ const P = `${t.prefix}/widget/file/${s.value}`;
1351
+ return await fetch(P, { method: "POST", body: Z }), d("update", "file-list"), h;
1352
+ } catch (P) {
1353
+ return console.error(P), null;
1353
1354
  }
1354
1355
  })
1355
- ), await D();
1356
- }, P = (x) => {
1357
- const h = { ...x };
1358
- return x.cancel || (h.cancel = () => {
1356
+ ), await U();
1357
+ }, N = (b) => {
1358
+ const h = { ...b };
1359
+ return b.cancel || (h.cancel = () => {
1359
1360
  p.value = !1;
1360
- }), x.updateListOnConfirm && (h.confirm = async () => {
1361
- await x.confirm(), p.value = !1, D();
1361
+ }), b.updateListOnConfirm && (h.confirm = async () => {
1362
+ await b.confirm(), p.value = !1, U();
1362
1363
  }), h;
1363
- }, _ = (x) => {
1364
- f.value = P(x), p.value = !0;
1364
+ }, _ = (b) => {
1365
+ f.value = N(b), p.value = !0;
1365
1366
  };
1366
- return se(r, (x) => {
1367
- x && D();
1368
- }), ne(() => {
1369
- r.value && D();
1370
- }), (x, h) => {
1371
- const J = Ne("Lightbox"), C = Ne("MessageBox");
1367
+ return ie(s, (b) => {
1368
+ b && U();
1369
+ }), ue(() => {
1370
+ s.value && U();
1371
+ }), (b, h) => {
1372
+ const Z = Ne("Lightbox"), P = Ne("MessageBox");
1372
1373
  return i(), u("div", Lo, [
1373
1374
  l("div", So, [
1374
- l("h2", Bo, " Файлів: " + E(c.value?.length), 1),
1375
+ l("h2", Bo, " Файлів: " + F(c.value?.length), 1),
1375
1376
  l("div", jo, [
1376
1377
  l("label", null, [
1377
1378
  l("input", {
1378
1379
  type: "file",
1379
1380
  class: "hidden",
1380
- onChange: h[0] || (h[0] = (m) => T(m))
1381
+ onChange: h[0] || (h[0] = (M) => T(M))
1381
1382
  }, null, 32),
1382
1383
  l("div", Io, [
1383
- j(Mo, {
1384
+ B(Mo, {
1384
1385
  height: "16",
1385
1386
  width: "16"
1386
1387
  })
@@ -1388,9 +1389,9 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1388
1389
  ])
1389
1390
  ])
1390
1391
  ]),
1391
- c.value?.length > 4 ? (i(), u("div", Ao, [
1392
+ c.value?.length > 4 ? (i(), u("div", zo, [
1392
1393
  l("div", null, [
1393
- l("div", zo, [
1394
+ l("div", Ao, [
1394
1395
  h[8] || (h[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1395
1396
  l("svg", {
1396
1397
  class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
@@ -1412,14 +1413,14 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1412
1413
  l("path", { d: "m21 21-4.3-4.3" })
1413
1414
  ])
1414
1415
  ], -1)),
1415
- G(l("input", {
1416
+ K(l("input", {
1416
1417
  type: "text",
1417
- "onUpdate:modelValue": h[1] || (h[1] = (m) => g.value = m),
1418
+ "onUpdate:modelValue": h[1] || (h[1] = (M) => g.value = M),
1418
1419
  class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
1419
1420
  placeholder: "Введіть назву файлу"
1420
1421
  }, null, 512), [
1421
1422
  [
1422
- ie,
1423
+ de,
1423
1424
  g.value,
1424
1425
  void 0,
1425
1426
  { trim: !0 }
@@ -1427,37 +1428,37 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1427
1428
  ])
1428
1429
  ])
1429
1430
  ])
1430
- ])) : B("", !0),
1431
- c.value?.length ? (i(), u("div", Eo, [
1432
- (i(!0), u(Q, null, Y(M.value, (m, V) => (i(), X(_o, {
1433
- key: V,
1434
- prefix: x.prefix,
1435
- item: m,
1436
- index: V,
1437
- onUpdate: h[2] || (h[2] = (z) => x.$emit("update", "file-list")),
1438
- onOpenModal: h[3] || (h[3] = (z) => _(z)),
1439
- onOpenLightbox: h[4] || (h[4] = (z) => I(z))
1431
+ ])) : j("", !0),
1432
+ c.value?.length ? (i(), u("div", Oo, [
1433
+ (i(!0), u(ee, null, le(C.value, (M, H) => (i(), te(_o, {
1434
+ key: H,
1435
+ prefix: b.prefix,
1436
+ item: M,
1437
+ index: H,
1438
+ onUpdate: h[2] || (h[2] = (Y) => b.$emit("update", "file-list")),
1439
+ onOpenModal: h[3] || (h[3] = (Y) => _(Y)),
1440
+ onOpenLightbox: h[4] || (h[4] = (Y) => z(Y))
1440
1441
  }, null, 8, ["prefix", "item", "index"]))), 128)),
1441
- M.value.length ? B("", !0) : (i(), u("div", Fo, h[9] || (h[9] = [
1442
+ C.value.length ? j("", !0) : (i(), u("div", Eo, h[9] || (h[9] = [
1442
1443
  l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1443
1444
  ])))
1444
- ])) : B("", !0),
1445
- j(J, {
1445
+ ])) : j("", !0),
1446
+ B(Z, {
1446
1447
  modelValue: a.value,
1447
- "onUpdate:modelValue": h[5] || (h[5] = (m) => a.value = m),
1448
- startIndex: s.value,
1449
- "onUpdate:index": h[6] || (h[6] = (m) => s.value = m),
1448
+ "onUpdate:modelValue": h[5] || (h[5] = (M) => a.value = M),
1449
+ startIndex: r.value,
1450
+ "onUpdate:index": h[6] || (h[6] = (M) => r.value = M),
1450
1451
  images: v.value
1451
1452
  }, null, 8, ["modelValue", "startIndex", "images"]),
1452
- j(C, Ve({
1453
+ B(P, Le({
1453
1454
  modelValue: p.value,
1454
- "onUpdate:modelValue": h[7] || (h[7] = (m) => p.value = m),
1455
+ "onUpdate:modelValue": h[7] || (h[7] = (M) => p.value = M),
1455
1456
  onConfirm: f.value.confirm
1456
1457
  }, f.value), null, 16, ["modelValue", "onConfirm"])
1457
1458
  ]);
1458
1459
  };
1459
1460
  }
1460
- }), Do = { class: "flex items-center justify-between" }, Uo = { class: "text-[16px] text-gray-900 font-medium" }, To = { class: "grid gap-3" }, Ro = /* @__PURE__ */ A({
1461
+ }), Do = { class: "flex items-center justify-between" }, Uo = { class: "text-[16px] text-gray-900 font-medium" }, To = { class: "grid gap-3" }, Ro = /* @__PURE__ */ O({
1461
1462
  __name: "vs-container-switcher",
1462
1463
  props: {
1463
1464
  title: {
@@ -1474,25 +1475,25 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1474
1475
  }
1475
1476
  },
1476
1477
  setup(o) {
1477
- const e = o, t = k(e.isOpen);
1478
- return se(
1478
+ const e = o, t = x(e.isOpen);
1479
+ return ie(
1479
1480
  () => e.isOpen,
1480
1481
  (n) => {
1481
1482
  t.value = n;
1482
1483
  }
1483
- ), (n, r) => (i(), u("div", null, [
1484
+ ), (n, s) => (i(), u("div", null, [
1484
1485
  l("div", Do, [
1485
- l("p", Uo, E(o.title), 1),
1486
- j(lt, {
1486
+ l("p", Uo, F(o.title), 1),
1487
+ B(ot, {
1487
1488
  modelValue: t.value,
1488
- "onUpdate:modelValue": r[0] || (r[0] = (a) => t.value = a),
1489
- style: me(o.style)
1489
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => t.value = a),
1490
+ style: he(o.style)
1490
1491
  }, null, 8, ["modelValue", "style"])
1491
1492
  ]),
1492
- j(et, { name: "slide-fade" }, {
1493
- default: Le(() => [
1494
- G(l("div", To, [
1495
- he(n.$slots, "default", {}, void 0, !0)
1493
+ B(tt, { name: "slide-fade" }, {
1494
+ default: $e(() => [
1495
+ K(l("div", To, [
1496
+ ge(n.$slots, "default", {}, void 0, !0)
1496
1497
  ], 512), [
1497
1498
  [Ue, t.value]
1498
1499
  ])
@@ -1501,7 +1502,7 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1501
1502
  })
1502
1503
  ]));
1503
1504
  }
1504
- }), Po = /* @__PURE__ */ R(Ro, [["__scopeId", "data-v-90320b87"]]), No = { class: "text-[16px] text-gray-900 font-medium" }, Ho = { class: "grid gap-3" }, qo = /* @__PURE__ */ A({
1505
+ }), Po = /* @__PURE__ */ R(Ro, [["__scopeId", "data-v-90320b87"]]), No = { class: "text-[16px] text-gray-900 font-medium" }, Ho = { class: "grid gap-3" }, qo = /* @__PURE__ */ O({
1505
1506
  __name: "vs-container-accordion",
1506
1507
  props: {
1507
1508
  title: {
@@ -1518,27 +1519,27 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1518
1519
  }
1519
1520
  },
1520
1521
  setup(o) {
1521
- const e = o, t = k(e.isOpen);
1522
- return se(
1522
+ const e = o, t = x(e.isOpen);
1523
+ return ie(
1523
1524
  () => e.isOpen,
1524
1525
  (n) => {
1525
1526
  t.value = n;
1526
1527
  }
1527
- ), (n, r) => (i(), u("div", null, [
1528
+ ), (n, s) => (i(), u("div", null, [
1528
1529
  l("button", {
1529
1530
  type: "button",
1530
- onClick: r[0] || (r[0] = (a) => t.value = !t.value),
1531
+ onClick: s[0] || (s[0] = (a) => t.value = !t.value),
1531
1532
  class: "flex items-center gap-2"
1532
1533
  }, [
1533
- j(q(Wt), {
1534
- class: S(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1534
+ B(J(Wt), {
1535
+ class: V(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1535
1536
  }, null, 8, ["class"]),
1536
- l("span", No, E(o.title), 1)
1537
+ l("span", No, F(o.title), 1)
1537
1538
  ]),
1538
- j(et, { name: "slide-fade" }, {
1539
- default: Le(() => [
1540
- G(l("div", Ho, [
1541
- he(n.$slots, "default", {}, void 0, !0)
1539
+ B(tt, { name: "slide-fade" }, {
1540
+ default: $e(() => [
1541
+ K(l("div", Ho, [
1542
+ ge(n.$slots, "default", {}, void 0, !0)
1542
1543
  ], 512), [
1543
1544
  [Ue, t.value]
1544
1545
  ])
@@ -1547,7 +1548,7 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1547
1548
  })
1548
1549
  ]));
1549
1550
  }
1550
- }), Go = /* @__PURE__ */ R(qo, [["__scopeId", "data-v-590eff11"]]), Jo = { class: "flex items-center justify-between" }, Ko = /* @__PURE__ */ A({
1551
+ }), Go = /* @__PURE__ */ R(qo, [["__scopeId", "data-v-590eff11"]]), Jo = { class: "flex items-center justify-between" }, Ko = /* @__PURE__ */ O({
1551
1552
  __name: "vs-container-default",
1552
1553
  props: {
1553
1554
  title: {
@@ -1562,16 +1563,16 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1562
1563
  setup(o) {
1563
1564
  return (e, t) => (i(), u("div", null, [
1564
1565
  l("div", Jo, [
1565
- l("p", null, E(o.title), 1)
1566
+ l("p", null, F(o.title), 1)
1566
1567
  ]),
1567
- he(e.$slots, "default")
1568
+ ge(e.$slots, "default")
1568
1569
  ]));
1569
1570
  }
1570
1571
  }), Zo = {
1571
1572
  switcher: Po,
1572
1573
  accordion: Go,
1573
1574
  default: Ko
1574
- }, le = {
1575
+ }, ae = {
1575
1576
  Equal: "==",
1576
1577
  Inequal: "!=",
1577
1578
  Higer: ">",
@@ -1584,37 +1585,37 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1584
1585
  Contain: "*",
1585
1586
  In: "in",
1586
1587
  NotIn: "not_in"
1587
- }, Wo = (o, e) => String(o) === String(e), Qo = (o, e) => String(o) !== String(e), Xo = (o, e) => o > e, Yo = (o, e) => o >= e, ea = (o, e) => o < e, ta = (o, e) => o <= e, la = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, oa = (o, e) => String(o).startsWith(String(e)), aa = (o, e) => String(o).endsWith(String(e)), ra = (o, e) => String(o).includes(String(e)), sa = (o, e) => Array.isArray(e) ? e.includes(o) : !1, na = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, at = (o, e) => {
1588
+ }, Wo = (o, e) => String(o) === String(e), Qo = (o, e) => String(o) !== String(e), Xo = (o, e) => o > e, Yo = (o, e) => o >= e, ea = (o, e) => o < e, ta = (o, e) => o <= e, la = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, oa = (o, e) => String(o).startsWith(String(e)), aa = (o, e) => String(o).endsWith(String(e)), sa = (o, e) => String(o).includes(String(e)), ra = (o, e) => Array.isArray(e) ? e.includes(o) : !1, na = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, st = (o, e) => {
1588
1589
  if (!e) return !0;
1589
1590
  switch (e?.[1]) {
1590
- case le.Equal:
1591
+ case ae.Equal:
1591
1592
  return Wo(o, e?.[2]);
1592
- case le.Inequal:
1593
+ case ae.Inequal:
1593
1594
  return Qo(o, e?.[2]);
1594
- case le.Higer:
1595
+ case ae.Higer:
1595
1596
  return Xo(o, e?.[2]);
1596
- case le.HigerOrEqual:
1597
+ case ae.HigerOrEqual:
1597
1598
  return Yo(o, e?.[2]);
1598
- case le.Lower:
1599
+ case ae.Lower:
1599
1600
  return ea(o, e?.[2]);
1600
- case le.LowerOrEqual:
1601
+ case ae.LowerOrEqual:
1601
1602
  return ta(o, e?.[2]);
1602
- case le.Between:
1603
+ case ae.Between:
1603
1604
  return la(o, e?.[2]);
1604
- case le.StartWith:
1605
+ case ae.StartWith:
1605
1606
  return oa(o, e?.[2]);
1606
- case le.EndWith:
1607
+ case ae.EndWith:
1607
1608
  return aa(o, e?.[2]);
1608
- case le.Contain:
1609
- return ra(o, e?.[2]);
1610
- case le.In:
1609
+ case ae.Contain:
1611
1610
  return sa(o, e?.[2]);
1612
- case le.NotIn:
1611
+ case ae.In:
1612
+ return ra(o, e?.[2]);
1613
+ case ae.NotIn:
1613
1614
  return na(o, e?.[2]);
1614
1615
  default:
1615
1616
  return !0;
1616
1617
  }
1617
- }, ia = /* @__PURE__ */ A({
1618
+ }, ia = /* @__PURE__ */ O({
1618
1619
  __name: "vs-input-container",
1619
1620
  props: {
1620
1621
  style: {
@@ -1635,32 +1636,32 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1635
1636
  }
1636
1637
  },
1637
1638
  setup(o) {
1638
- const e = o, t = Be("formValues", { default: {} }), n = Be("form"), r = O(() => e.schema?.filter((s) => {
1639
- const d = s?.conditions;
1639
+ const e = o, t = Be("formValues", { default: {} }), n = Be("form"), s = D(() => e.schema?.filter((r) => {
1640
+ const d = r?.conditions;
1640
1641
  if (!d) return !0;
1641
1642
  const p = Array.isArray(d) ? d[0] : d, f = t?.value?.[p];
1642
- return at(f, d);
1643
- })), a = O(() => Zo[e.view]);
1644
- return (s, d) => o.schema?.length ? (i(), X(we(a.value), {
1643
+ return st(f, d);
1644
+ })), a = D(() => Zo[e.view]);
1645
+ return (r, d) => o.schema?.length ? (i(), te(_e(a.value), {
1645
1646
  key: 0,
1646
1647
  title: o.title,
1647
- style: me(o.style)
1648
+ style: he(o.style)
1648
1649
  }, {
1649
- default: Le(() => [
1650
- (i(!0), u(Q, null, Y(r.value, (p) => (i(), X(rt, Ve({
1650
+ default: $e(() => [
1651
+ (i(!0), u(ee, null, le(s.value, (p) => (i(), te(rt, Le({
1651
1652
  key: p.name
1652
1653
  }, { ref_for: !0 }, p, {
1653
1654
  item: p,
1654
- modelValue: q(t)[p.name],
1655
- "onUpdate:modelValue": (f) => q(t)[p.name] = f,
1655
+ modelValue: J(t)[p.name],
1656
+ "onUpdate:modelValue": (f) => J(t)[p.name] = f,
1656
1657
  style: o.style,
1657
- error: q(n)?.errors?.[p.name]
1658
+ error: J(n)?.errors?.[p.name]
1658
1659
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
1659
1660
  ]),
1660
1661
  _: 1
1661
- }, 8, ["title", "style"])) : B("", !0);
1662
+ }, 8, ["title", "style"])) : j("", !0);
1662
1663
  }
1663
- }), ua = { class: "relative" }, da = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, ca = { 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" }, pa = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, fa = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, va = { class: "p-4 mim-h-0 h-full overflow-auto" }, ma = /* @__PURE__ */ A({
1664
+ }), ua = { class: "relative" }, da = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, ca = { 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" }, pa = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, fa = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, va = { class: "p-4 mim-h-0 h-full overflow-auto" }, ma = /* @__PURE__ */ O({
1664
1665
  __name: "modal-edit",
1665
1666
  props: {
1666
1667
  schema: {},
@@ -1671,11 +1672,11 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1671
1672
  },
1672
1673
  emits: ["close", "save", "edit"],
1673
1674
  setup(o, { emit: e }) {
1674
- const t = o, n = e, r = k(t.schema), a = k(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), s = k({}), d = k(), p = k(t.mode);
1675
+ const t = o, n = e, s = x(t.schema), a = x(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), r = x({}), d = x(), p = x(t.mode);
1675
1676
  async function f() {
1676
- const g = s.value.validate();
1677
+ const g = r.value.validate();
1677
1678
  if (g) {
1678
- ve({ type: "warning", title: "Помилка валідації", message: Object.entries(g).map(([v, M]) => `${v}: ${M}`).join(`
1679
+ pe({ type: "warning", title: "Помилка валідації", message: Object.entries(g).map(([v, C]) => `${v}: ${C}`).join(`
1679
1680
  `) });
1680
1681
  return;
1681
1682
  }
@@ -1689,29 +1690,29 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1689
1690
  body: JSON.stringify(a.value)
1690
1691
  });
1691
1692
  if (v.ok)
1692
- await v.json(), ve({
1693
+ await v.json(), pe({
1693
1694
  type: "success",
1694
1695
  title: "Успішно",
1695
1696
  message: `Дані успішно ${p.value === "add" ? "збережено" : "оновлено"}`
1696
1697
  }), n("save", a.value);
1697
1698
  else if (v.status === 400) {
1698
- const M = await v.json().catch(() => ({}));
1699
- ve({
1699
+ const C = await v.json().catch(() => ({}));
1700
+ pe({
1700
1701
  type: "warning",
1701
1702
  title: "Помилка валідації",
1702
- message: M.message || "Некоректні дані (400)"
1703
+ message: C.message || "Некоректні дані (400)"
1703
1704
  });
1704
- } else v.status === 500 ? ve({
1705
+ } else v.status === 500 ? pe({
1705
1706
  type: "error",
1706
1707
  title: "Серверна помилка",
1707
1708
  message: "Виникла помилка на сервері (500)"
1708
- }) : ve({
1709
+ }) : pe({
1709
1710
  type: "error",
1710
1711
  title: "Помилка",
1711
1712
  message: `Статус: ${v.status}`
1712
1713
  });
1713
1714
  } catch (v) {
1714
- ve({
1715
+ pe({
1715
1716
  type: "error",
1716
1717
  title: "Помилка з’єднання",
1717
1718
  message: v.message || "Не вдалося виконати запит"
@@ -1721,20 +1722,20 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1721
1722
  function c() {
1722
1723
  n("close");
1723
1724
  }
1724
- return ne(async () => {
1725
+ return ue(async () => {
1725
1726
  if (t.form) {
1726
1727
  const g = await fetch(`/api/template/form/${t.form}`).then((v) => v.json());
1727
- r.value = g.schema, d.value = g.token;
1728
+ s.value = g.schema, d.value = g.token;
1728
1729
  } else if (t.token) {
1729
1730
  d.value = t.token;
1730
1731
  const g = await fetch(`/api/form/${d.value}`).then((v) => v.json());
1731
- r.value = g.schema, g.data ? a.value = g.data : p.value = "add";
1732
+ s.value = g.schema, g.data ? a.value = g.data : p.value = "add";
1732
1733
  }
1733
1734
  }), (g, v) => (i(), u("div", ua, [
1734
1735
  l("div", da, [
1735
1736
  l("div", ca, [
1736
1737
  l("div", pa, [
1737
- l("h3", fa, E(p.value === "add" ? "Додати" : "Змінити"), 1),
1738
+ l("h3", fa, F(p.value === "add" ? "Додати" : "Змінити"), 1),
1738
1739
  l("button", {
1739
1740
  onClick: c,
1740
1741
  type: "button",
@@ -1759,14 +1760,14 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1759
1760
  ]))
1760
1761
  ]),
1761
1762
  l("div", va, [
1762
- r.value ? (i(), X(Ee, {
1763
+ s.value ? (i(), te(Ie, {
1763
1764
  key: 0,
1764
- schema: r.value,
1765
+ schema: s.value,
1765
1766
  values: a.value,
1766
- "onUpdate:values": v[0] || (v[0] = (M) => a.value = M),
1767
- form: s.value,
1768
- "onUpdate:form": v[1] || (v[1] = (M) => s.value = M)
1769
- }, null, 8, ["schema", "values", "form"])) : B("", !0)
1767
+ "onUpdate:values": v[0] || (v[0] = (C) => a.value = C),
1768
+ form: r.value,
1769
+ "onUpdate:form": v[1] || (v[1] = (C) => r.value = C)
1770
+ }, null, 8, ["schema", "values", "form"])) : j("", !0)
1770
1771
  ]),
1771
1772
  l("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
1772
1773
  l("button", {
@@ -1784,31 +1785,24 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1784
1785
  ])
1785
1786
  ]));
1786
1787
  }
1787
- }), Me = (o = { mode: "edit", schema: null }) => new Promise((e) => {
1788
- const t = document.querySelector("body");
1789
- if (!t) {
1790
- console.error('Modal root element with id "#modal" not found!');
1791
- return;
1792
- }
1793
- const n = document.createElement("div");
1794
- t.appendChild(n);
1795
- function r() {
1796
- a.unmount(), n.remove();
1797
- }
1798
- const a = ct({
1799
- render() {
1800
- return pt(ma, {
1801
- ...o,
1802
- onClose: () => {
1803
- e(null), r();
1804
- },
1805
- onSave: (s) => {
1806
- e(s), r();
1807
- }
1808
- });
1788
+ }), Oe = (o = { mode: "edit", schema: null }) => new Promise((e) => {
1789
+ const { close: t } = ft({
1790
+ title: o.mode === "add" ? "Додати" : "Редагувати",
1791
+ template: "",
1792
+ visible: !0,
1793
+ size: "medium",
1794
+ closeClickBack: !0,
1795
+ content: ma,
1796
+ contentProps: {
1797
+ ...o,
1798
+ onClose: () => {
1799
+ e(null), t();
1800
+ },
1801
+ onSave: (n) => {
1802
+ e(n), t();
1803
+ }
1809
1804
  }
1810
1805
  });
1811
- a.mount(n);
1812
1806
  }), ha = ["aria-expanded", "data-focus"], ga = { class: "flex items-center" }, ba = { class: "truncate text-gray-900 overflow-hidden" }, ya = ["onClick"], xa = ["title"], wa = {
1813
1807
  key: 2,
1814
1808
  class: "text-gray-500 truncate"
@@ -1819,7 +1813,7 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1819
1813
  }, La = ["aria-disabled", "onClick"], Sa = {
1820
1814
  key: 1,
1821
1815
  class: "px-3 py-2 text-center text-gray-500"
1822
- }, Ba = ["disabled"], ja = /* @__PURE__ */ A({
1816
+ }, Ba = ["disabled"], ja = /* @__PURE__ */ O({
1823
1817
  __name: "vs-input-select",
1824
1818
  props: {
1825
1819
  multiple: { type: Boolean, default: !1 },
@@ -1843,338 +1837,336 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
1843
1837
  },
1844
1838
  emits: ["change", "update:modelValue"],
1845
1839
  setup(o, { emit: e }) {
1846
- const t = o, n = e, r = O(() => t.multiple), a = O(() => t.disabled);
1847
- ge(t.style);
1848
- const s = O({
1840
+ const t = o, n = e, s = D(() => t.multiple), a = D(() => t.disabled);
1841
+ be(t.style);
1842
+ const r = D({
1849
1843
  get: () => t.modelValue,
1850
- set: (y) => n("update:modelValue", y)
1844
+ set: (w) => n("update:modelValue", w)
1851
1845
  });
1852
- !s.value && t.defaultValue && (s.value = t.defaultValue);
1853
- const d = k(null), p = k(null), f = k(null), c = k(!1), g = k(!1), v = k(null), M = k([]), I = k(-1), D = k([]), T = k(""), P = k(null), _ = k([]), x = O(() => {
1846
+ !r.value && t.defaultValue && (r.value = t.defaultValue);
1847
+ const d = x(null), p = x(null), f = x(null), c = x(!1), g = x(!1), v = x(null), C = x([]), z = x(-1), U = x([]), T = x(""), N = x(null), _ = x([]), b = D(() => {
1854
1848
  if (!_.value.length) return [];
1855
- const y = new Map(M.value.map((w) => [w.id?.toString(), w]));
1856
- return _.value.map((w) => y.get(w?.toString())).filter((w) => !!w);
1857
- }), h = O(() => t.placeholder || "Select..."), J = O(() => r.value ? !_.value.length && T.value === "" : !v.value?.text && T.value === ""), C = O(() => a.value ? !1 : r.value ? _.value.length > 0 : !!s.value), m = (y) => r.value ? _.value.some((w) => w?.toString() === y?.toString()) : s.value?.toString?.() === y?.toString?.(), V = O(() => {
1858
- let y = M.value ?? [];
1849
+ const w = new Map(C.value.map((k) => [k.id?.toString(), k]));
1850
+ return _.value.map((k) => w.get(k?.toString())).filter((k) => !!k);
1851
+ }), h = D(() => t.placeholder || "Select..."), Z = D(() => s.value ? !_.value.length && T.value === "" : !v.value?.text && T.value === ""), P = D(() => a.value ? !1 : s.value ? _.value.length > 0 : !!r.value), M = (w) => s.value ? _.value.some((k) => k?.toString() === w?.toString()) : r.value?.toString() === w?.toString(), H = D(() => {
1852
+ let w = C.value ?? [];
1859
1853
  if (T.value.trim() !== "") {
1860
- const w = T.value.toLowerCase();
1861
- y = y.filter((H) => H.text?.toLowerCase?.().includes(w));
1854
+ const k = T.value.toLowerCase();
1855
+ w = w.filter((A) => A.text?.toLowerCase?.().includes(k));
1862
1856
  }
1863
- if (r.value && _.value.length) {
1864
- const w = new Set(_.value.map((H) => H?.toString()));
1865
- y = y.filter((H) => !w.has(H.id?.toString()));
1857
+ if (s.value && _.value.length) {
1858
+ const k = new Set(_.value.map((A) => A?.toString()));
1859
+ w = w.filter((A) => !k.has(A.id?.toString()));
1866
1860
  }
1867
- return y;
1868
- }), z = async (y) => {
1861
+ return w;
1862
+ }), Y = async (w) => {
1869
1863
  if (!t.data) return [];
1870
1864
  try {
1871
- const w = t.api ? t.api : `/suggest/${t.data}`, H = "?json=1", U = y ? `&val=${encodeURIComponent(y)}` : "";
1872
- return (await fetch(w.concat(H, U)).then((ce) => ce.json())).data ?? [];
1865
+ const k = t.api ? t.api : `/suggest/${t.data}`, A = "?json=1", W = w ? `&val=${encodeURIComponent(w)}` : "";
1866
+ return (await fetch(k.concat(A, W)).then((ke) => ke.json())).data ?? [];
1873
1867
  } catch {
1874
1868
  return [];
1875
1869
  }
1876
- }, W = async () => {
1877
- t.options?.length ? M.value = [...t.options] : t.data && (M.value = await z(T.value));
1878
- }, te = async (y) => {
1879
- if (y == null) return null;
1880
- const w = M.value?.find((U) => U?.id?.toString() === String(y));
1881
- return w || ((await z(String(y)))?.[0] ?? null);
1882
- }, xe = async (y) => {
1883
- const w = new Set(M.value.map((U) => U.id?.toString())), H = y.filter((U) => !w.has(U?.toString()));
1884
- H.length && await H.reduce(async (U, de) => {
1885
- await U;
1886
- const ce = await te(de);
1887
- ce && M.value.push(ce);
1870
+ }, we = async () => {
1871
+ t.options?.length ? C.value = [...t.options] : t.data && (C.value = await Y(T.value));
1872
+ }, ce = async (w) => {
1873
+ if (w == null) return null;
1874
+ const k = C.value?.find((W) => W?.id?.toString() === String(w));
1875
+ return k || ((await Y(String(w)))?.[0] ?? null);
1876
+ }, Ce = async (w) => {
1877
+ const k = new Set(C.value.map((W) => W.id?.toString())), A = w.filter((W) => !k.has(W?.toString()));
1878
+ A.length && await A.reduce(async (W, me) => {
1879
+ await W;
1880
+ const ke = await ce(me);
1881
+ ke && C.value.push(ke);
1888
1882
  }, Promise.resolve());
1889
- }, ke = async () => {
1890
- a.value || (c.value = !0, await W(), await Ce(() => {
1891
- P.value?.focus(), V.value.length ? I.value = 0 : I.value = -1;
1883
+ }, I = async () => {
1884
+ a.value || (c.value = !0, await we(), await Me(() => {
1885
+ N.value?.focus(), H.value.length ? z.value = 0 : z.value = -1;
1892
1886
  }));
1893
- }, ue = () => {
1894
- c.value = !1, I.value = -1;
1895
- }, Ae = async (y) => {
1887
+ }, $ = () => {
1888
+ c.value = !1, z.value = -1;
1889
+ }, S = async (w) => {
1896
1890
  if (a.value) return;
1897
- !c.value ? await ke() : ue();
1898
- }, _e = async () => {
1899
- c.value ? P.value?.focus() : await ke();
1900
- }, b = () => {
1901
- r.value ? (_.value = [], s.value = [], n("change", [])) : (v.value = null, s.value = null, n("change", null)), T.value = "", Ce(() => P.value?.focus());
1902
- }, $ = (y) => {
1903
- r.value && (_.value = _.value.filter((w) => w?.toString() !== y?.toString()), s.value = [..._.value], n("change", s.value), Ce(() => P.value?.focus()));
1904
- }, F = (y) => {
1905
- r.value ? (m(y.id) || (_.value = [..._.value, y.id], s.value = [..._.value], n("change", s.value)), T.value = "", Ce(() => {
1906
- P.value?.focus(), I.value = Math.min(I.value, V.value.length - 1);
1907
- })) : (v.value = y, s.value = y.id, n("change", s.value), T.value = "", ue());
1908
- }, N = (y) => {
1909
- m(y.id) || F(y);
1910
- }, ee = (y, w) => {
1911
- if (!y || !w) return;
1912
- const H = y.offsetTop, U = H + y.offsetHeight, de = w.scrollTop, ce = de + w.clientHeight;
1913
- let ze = w.scrollTop;
1914
- H < de ? ze = H - 80 : U > ce && (ze = U - w.clientHeight + 4);
1915
- const it = w;
1916
- it.scrollTop = ze;
1917
- }, $e = async (y) => {
1918
- a.value || !c.value && (y.key === "ArrowDown" || y.key === "ArrowUp") && (y.preventDefault(), await ke());
1919
- }, pe = (y) => {
1891
+ !c.value ? await I() : $();
1892
+ }, q = async () => {
1893
+ c.value ? N.value?.focus() : await I();
1894
+ }, m = () => {
1895
+ s.value ? (_.value = [], r.value = [], n("change", [])) : (v.value = null, r.value = null, n("change", null)), T.value = "", Me(() => N.value?.focus());
1896
+ }, y = (w) => {
1897
+ s.value && (_.value = _.value.filter((k) => k?.toString() !== w?.toString()), r.value = [..._.value], n("change", r.value), Me(() => N.value?.focus()));
1898
+ }, E = (w) => {
1899
+ s.value ? (M(w.id) || (_.value = [..._.value, w.id], r.value = [..._.value], n("change", r.value)), T.value = "", Me(() => {
1900
+ N.value?.focus(), z.value = Math.min(z.value, H.value.length - 1);
1901
+ })) : (v.value = w, r.value = w.id, n("change", r.value), T.value = "", $());
1902
+ }, G = (w) => {
1903
+ M(w.id) || E(w);
1904
+ }, oe = (w, k) => {
1905
+ if (!w || !k) return;
1906
+ const A = w.offsetTop, W = A + w.offsetHeight, me = k.scrollTop, ke = me + k.clientHeight;
1907
+ let Ae = k.scrollTop;
1908
+ A < me ? Ae = A - 80 : W > ke && (Ae = W - k.clientHeight + 4);
1909
+ const ut = k;
1910
+ ut.scrollTop = Ae;
1911
+ }, Ve = async (w) => {
1912
+ a.value || !c.value && (w.key === "ArrowDown" || w.key === "ArrowUp") && (w.preventDefault(), await I());
1913
+ }, fe = (w) => {
1920
1914
  if (!c.value) return;
1921
- const { key: w } = y;
1922
- if (w === "ArrowDown")
1923
- y.preventDefault(), I.value + 1 < V.value.length && (I.value += 1, ee(D.value[I.value], f.value));
1924
- else if (w === "ArrowUp")
1925
- y.preventDefault(), I.value > 0 && (I.value -= 1, ee(D.value[I.value], f.value));
1926
- else if (w === "Enter") {
1927
- y.preventDefault();
1928
- const H = V.value[I.value];
1929
- H && F(H);
1930
- } else w === "Escape" ? (y.preventDefault(), ue()) : w === "Backspace" ? r.value && T.value === "" && _.value.length && (_.value = _.value.slice(0, -1), s.value = [..._.value], n("change", s.value)) : w === "Home" ? (I.value = 0, ee(D.value[0], f.value)) : w === "End" ? (I.value = V.value.length - 1, ee(D.value[I.value], f.value)) : w === "Tab" && ue();
1931
- }, be = () => {
1932
- a.value || (g.value = !0);
1915
+ const { key: k } = w;
1916
+ if (k === "ArrowDown")
1917
+ w.preventDefault(), z.value + 1 < H.value.length && (z.value += 1, oe(U.value[z.value], f.value));
1918
+ else if (k === "ArrowUp")
1919
+ w.preventDefault(), z.value > 0 && (z.value -= 1, oe(U.value[z.value], f.value));
1920
+ else if (k === "Enter") {
1921
+ w.preventDefault();
1922
+ const A = H.value[z.value];
1923
+ A && E(A);
1924
+ } else k === "Escape" ? (w.preventDefault(), $()) : k === "Backspace" ? s.value && T.value === "" && _.value.length && (_.value = _.value.slice(0, -1), r.value = [..._.value], n("change", r.value)) : k === "Home" ? (z.value = 0, oe(U.value[0], f.value)) : k === "End" ? (z.value = H.value.length - 1, oe(U.value[z.value], f.value)) : k === "Tab" && $();
1933
1925
  }, ye = () => {
1926
+ a.value || (g.value = !0);
1927
+ }, xe = () => {
1934
1928
  g.value = !1, T.value = "";
1935
- }, fe = (y) => {
1936
- y.key === "Escape" && c.value && ue();
1937
- }, Te = (y) => {
1938
- d.value && (d.value.contains(y.target) || ue());
1939
- }, Re = (y) => {
1940
- c.value && f.value && !f.value.contains(y.target) && ue();
1929
+ }, ve = (w) => {
1930
+ w.key === "Escape" && c.value && $();
1931
+ }, Te = (w) => {
1932
+ d.value && (d.value.contains(w.target) || $());
1933
+ }, Re = (w) => {
1934
+ c.value && f.value && !f.value.contains(w.target) && $();
1941
1935
  };
1942
- se(() => t.options, (y) => {
1943
- y?.length && (M.value = [...y]);
1936
+ ie(() => t.options, (w) => {
1937
+ w?.length && (C.value = [...w]);
1944
1938
  }, { immediate: !0 });
1945
1939
  const Pe = async () => {
1946
- if (r.value)
1947
- Array.isArray(s.value) ? _.value = [...s.value] : (_.value = s.value == null ? [] : [s.value], s.value = [..._.value]), !t.options?.length && t.data && await xe(_.value);
1940
+ if (s.value)
1941
+ Array.isArray(r.value) ? _.value = [...r.value] : (_.value = r.value == null ? [] : [r.value], r.value = [..._.value]), !t.options?.length && t.data && await Ce(_.value);
1948
1942
  else {
1949
- if (Array.isArray(s.value)) {
1950
- const y = s.value[0] ?? null;
1951
- s.value = y ?? null;
1943
+ if (Array.isArray(r.value)) {
1944
+ const w = r.value[0] ?? null;
1945
+ r.value = w ?? null;
1952
1946
  }
1953
- v.value = await te(s.value);
1947
+ v.value = await ce(r.value);
1954
1948
  }
1955
1949
  };
1956
- se(s, () => {
1950
+ ie(r, () => {
1957
1951
  Pe();
1958
- }), ne(async () => {
1959
- addEventListener("keydown", fe), addEventListener("scroll", Re, !0), document.addEventListener("click", Te, !0), t.options?.length ? M.value = [...t.options] : t.data && (M.value = await z("")), await Pe();
1960
- }), Fe(() => {
1961
- removeEventListener("keydown", fe), removeEventListener("scroll", Re, !0), document.removeEventListener("click", Te, !0);
1952
+ }), ue(async () => {
1953
+ addEventListener("keydown", ve), addEventListener("scroll", Re, !0), document.addEventListener("click", Te, !0), t.options?.length ? C.value = [...t.options] : t.data && (C.value = await Y("")), await Pe();
1954
+ }), Ee(() => {
1955
+ removeEventListener("keydown", ve), removeEventListener("scroll", Re, !0), document.removeEventListener("click", Te, !0);
1962
1956
  });
1963
- async function nt() {
1957
+ async function it() {
1964
1958
  if (!t.add) return;
1965
- const y = await Me({ form: t.add.form, mode: "add" });
1966
- y && (await fetch(`/api/table/${t.add.token}`, {
1959
+ const w = await Oe({ form: t.add.form, mode: "add" });
1960
+ w && (await fetch(`/api/table/${t.add.token}`, {
1967
1961
  method: "POST",
1968
1962
  headers: { "Content-Type": "application/json" },
1969
- body: JSON.stringify(y)
1970
- }).then((w) => w.json()), !t.options?.length && t.data && (M.value = await z(T.value)));
1963
+ body: JSON.stringify(w)
1964
+ }).then((k) => k.json()), !t.options?.length && t.data && (C.value = await Y(T.value)));
1971
1965
  }
1972
- return (y, w) => {
1973
- const H = ft("tooltip");
1974
- return i(), u("div", {
1975
- class: "flex gap-1 w-full",
1976
- ref_key: "selectRoot",
1977
- ref: d,
1978
- onClick: w[2] || (w[2] = re(() => {
1979
- }, ["stop"]))
1966
+ return (w, k) => (i(), u("div", {
1967
+ class: "flex gap-1 w-full",
1968
+ ref_key: "selectRoot",
1969
+ ref: d,
1970
+ onClick: k[2] || (k[2] = ne(() => {
1971
+ }, ["stop"]))
1972
+ }, [
1973
+ l("div", {
1974
+ class: V(["relative w-full font-sans", t.customClass])
1980
1975
  }, [
1976
+ k[7] || (k[7] = l("span", {
1977
+ id: "react-select-live-region",
1978
+ class: "sr-only"
1979
+ }, null, -1)),
1980
+ k[8] || (k[8] = l("span", {
1981
+ "aria-live": "polite",
1982
+ "aria-atomic": "false",
1983
+ "aria-relevant": "additions text",
1984
+ role: "log",
1985
+ class: "sr-only"
1986
+ }, null, -1)),
1981
1987
  l("div", {
1982
- class: S(["relative w-full font-sans", t.customClass])
1988
+ class: V([
1989
+ "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
1990
+ "border-gray-300 hover:border-gray-400",
1991
+ c.value || g.value ? "border-blue-500 ring-1 ring-blue-500" : "",
1992
+ a.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
1993
+ ]),
1994
+ role: "combobox",
1995
+ "aria-expanded": c.value,
1996
+ "aria-haspopup": "listbox",
1997
+ onKeydown: Ve,
1998
+ onClick: q,
1999
+ "data-focus": c.value || g.value ? "true" : "false"
1983
2000
  }, [
1984
- w[7] || (w[7] = l("span", {
1985
- id: "react-select-live-region",
1986
- class: "sr-only"
1987
- }, null, -1)),
1988
- w[8] || (w[8] = l("span", {
1989
- "aria-live": "polite",
1990
- "aria-atomic": "false",
1991
- "aria-relevant": "additions text",
1992
- role: "log",
1993
- class: "sr-only"
1994
- }, null, -1)),
1995
2001
  l("div", {
1996
- class: S([
1997
- "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
1998
- "border-gray-300 hover:border-gray-400",
1999
- c.value || g.value ? "border-blue-500 ring-1 ring-blue-500" : "",
2000
- a.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
2001
- ]),
2002
- role: "combobox",
2003
- "aria-expanded": c.value,
2004
- "aria-haspopup": "listbox",
2005
- onKeydown: $e,
2006
- onClick: _e,
2007
- "data-focus": c.value || g.value ? "true" : "false"
2002
+ class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
2003
+ ref_key: "triggerRef",
2004
+ ref: p
2008
2005
  }, [
2009
- l("div", {
2010
- class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
2011
- ref_key: "triggerRef",
2012
- ref: p
2006
+ s.value && _.value.length ? (i(!0), u(ee, { key: 0 }, le(b.value, (A) => (i(), u("div", {
2007
+ class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
2008
+ key: A.id
2013
2009
  }, [
2014
- r.value && _.value.length ? (i(!0), u(Q, { key: 0 }, Y(x.value, (U) => (i(), u("div", {
2015
- class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
2016
- key: U.id
2017
- }, [
2018
- l("div", ga, [
2019
- U?.color ? (i(), u("span", {
2020
- key: 0,
2021
- class: "w-[16px] h-[16px] rounded-md block ml-1.5",
2022
- style: me({ backgroundColor: U?.color })
2023
- }, null, 4)) : B("", !0),
2024
- G((i(), u("div", ba, [
2025
- oe(E(U.text), 1)
2026
- ])), [
2027
- [H, U.text]
2028
- ])
2029
- ]),
2030
- l("div", {
2031
- role: "button",
2032
- class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
2033
- onClick: re((de) => $(U.id), ["stop"])
2034
- }, w[3] || (w[3] = [
2035
- l("svg", {
2036
- height: "14",
2037
- width: "14",
2038
- viewBox: "0 0 20 20",
2039
- "aria-hidden": "true",
2040
- focusable: "false",
2041
- class: "inline-block fill-current stroke-current leading-none stroke-0"
2042
- }, [
2043
- l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2044
- ], -1)
2045
- ]), 8, ya)
2046
- ]))), 128)) : !r.value && !g.value && v.value?.text && T.value === "" ? G((i(), u("div", {
2047
- key: 1,
2048
- class: S(["truncate text-gray-900"]),
2049
- title: v.value.text
2050
- }, [
2051
- v.value?.color ? (i(), u("span", {
2010
+ l("div", ga, [
2011
+ A?.color ? (i(), u("span", {
2052
2012
  key: 0,
2053
- class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
2054
- style: me({ backgroundColor: v.value?.color })
2055
- }, null, 4)) : B("", !0),
2056
- l("span", {
2057
- class: S({ "pl-5": v.value?.color })
2058
- }, E(v.value.text), 3)
2059
- ], 8, xa)), [
2060
- [H, v.value.text]
2061
- ]) : B("", !0),
2062
- J.value ? (i(), u("div", wa, E(h.value), 1)) : B("", !0),
2063
- l("div", ka, [
2064
- !a.value && y.search ? G((i(), u("input", {
2065
- key: 0,
2066
- ref_key: "inputRef",
2067
- ref: P,
2068
- class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
2069
- autocapitalize: "none",
2070
- autocomplete: "off",
2071
- autocorrect: "off",
2072
- spellcheck: "false",
2073
- type: "text",
2074
- tabindex: "0",
2075
- "aria-autocomplete": "list",
2076
- placeholder: (r.value && _.value.length ? " " : null) || (g.value && !T.value?.length ? v.value?.text : " "),
2077
- "onUpdate:modelValue": w[0] || (w[0] = (U) => T.value = U),
2078
- onFocus: be,
2079
- onBlur: ye,
2080
- onKeydown: pe
2081
- }, null, 40, _a)), [
2082
- [ie, T.value]
2083
- ]) : B("", !0)
2084
- ])
2085
- ], 512),
2086
- l("div", $a, [
2087
- C.value ? (i(), u("button", {
2088
- key: 0,
2089
- type: "button",
2090
- class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2091
- "aria-hidden": "true",
2092
- disabled: a.value,
2093
- onClick: re(b, ["stop"])
2094
- }, w[4] || (w[4] = [
2013
+ class: "w-[16px] h-[16px] rounded-md block ml-1.5",
2014
+ style: he({ backgroundColor: A?.color })
2015
+ }, null, 4)) : j("", !0),
2016
+ K((i(), u("div", ba, [
2017
+ se(F(A.text), 1)
2018
+ ])), [
2019
+ [J(qe), A.text]
2020
+ ])
2021
+ ]),
2022
+ l("div", {
2023
+ role: "button",
2024
+ class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
2025
+ onClick: ne((W) => y(A.id), ["stop"])
2026
+ }, k[3] || (k[3] = [
2095
2027
  l("svg", {
2096
- height: "20",
2097
- width: "20",
2028
+ height: "14",
2029
+ width: "14",
2098
2030
  viewBox: "0 0 20 20",
2099
- class: "fill-current"
2031
+ "aria-hidden": "true",
2032
+ focusable: "false",
2033
+ class: "inline-block fill-current stroke-current leading-none stroke-0"
2100
2034
  }, [
2101
2035
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2102
2036
  ], -1)
2103
- ]), 8, Ca)) : B("", !0),
2104
- w[6] || (w[6] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2105
- l("button", {
2106
- type: "button",
2107
- class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2108
- "aria-hidden": "true",
2109
- disabled: a.value,
2110
- onClick: w[1] || (w[1] = re((U) => Ae(), ["stop"]))
2111
- }, w[5] || (w[5] = [
2112
- l("svg", {
2113
- height: "20",
2114
- width: "20",
2115
- viewBox: "0 0 20 20",
2116
- class: "fill-current"
2117
- }, [
2118
- l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
2119
- ], -1)
2120
- ]), 8, Va)
2121
- ])
2122
- ], 42, ha),
2123
- c.value ? (i(), u("div", Ma, [
2124
- l("div", {
2125
- class: "max-h-[300px] overflow-y-auto py-1",
2126
- ref_key: "listRef",
2127
- ref: f
2037
+ ]), 8, ya)
2038
+ ]))), 128)) : !s.value && !g.value && v.value?.text && T.value === "" ? K((i(), u("div", {
2039
+ key: 1,
2040
+ class: V(["truncate text-gray-900"]),
2041
+ title: v.value.text
2128
2042
  }, [
2129
- V.value.length ? (i(!0), u(Q, { key: 0 }, Y(V.value, (U, de) => (i(), u("div", {
2130
- key: U.id,
2131
- ref_for: !0,
2132
- ref: (ce) => D.value[de] = ce,
2133
- class: S([
2134
- "flex px-3 py-2 cursor-default select-none hover:bg-blue-300",
2135
- m(U.id) ? "text-white bg-blue-500" : "text-gray-900 bg-white"
2136
- ]),
2137
- "aria-disabled": m(U.id) ? "true" : "false",
2138
- role: "option",
2139
- tabindex: "-1",
2140
- onClick: (ce) => N(U)
2043
+ v.value?.color ? (i(), u("span", {
2044
+ key: 0,
2045
+ class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
2046
+ style: he({ backgroundColor: v.value?.color })
2047
+ }, null, 4)) : j("", !0),
2048
+ l("span", {
2049
+ class: V({ "pl-5": v.value?.color })
2050
+ }, F(v.value.text), 3)
2051
+ ], 8, xa)), [
2052
+ [J(qe), v.value.text]
2053
+ ]) : j("", !0),
2054
+ Z.value ? (i(), u("div", wa, F(h.value), 1)) : j("", !0),
2055
+ l("div", ka, [
2056
+ !a.value && w.search ? K((i(), u("input", {
2057
+ key: 0,
2058
+ ref_key: "inputRef",
2059
+ ref: N,
2060
+ class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
2061
+ autocapitalize: "none",
2062
+ autocomplete: "off",
2063
+ autocorrect: "off",
2064
+ spellcheck: "false",
2065
+ type: "text",
2066
+ tabindex: "0",
2067
+ "aria-autocomplete": "list",
2068
+ placeholder: (s.value && _.value.length ? " " : null) || (g.value && !T.value?.length ? v.value?.text : " "),
2069
+ "onUpdate:modelValue": k[0] || (k[0] = (A) => T.value = A),
2070
+ onFocus: ye,
2071
+ onBlur: xe,
2072
+ onKeydown: fe
2073
+ }, null, 40, _a)), [
2074
+ [de, T.value]
2075
+ ]) : j("", !0)
2076
+ ])
2077
+ ], 512),
2078
+ l("div", $a, [
2079
+ P.value ? (i(), u("button", {
2080
+ key: 0,
2081
+ type: "button",
2082
+ class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2083
+ "aria-hidden": "true",
2084
+ disabled: a.value,
2085
+ onClick: ne(m, ["stop"])
2086
+ }, k[4] || (k[4] = [
2087
+ l("svg", {
2088
+ height: "20",
2089
+ width: "20",
2090
+ viewBox: "0 0 20 20",
2091
+ class: "fill-current"
2141
2092
  }, [
2142
- U?.color ? (i(), u("span", {
2143
- key: 0,
2144
- class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2145
- style: me({ backgroundColor: U?.color })
2146
- }, null, 4)) : B("", !0),
2147
- l("div", {
2148
- class: S([
2149
- "leading-[19px]",
2150
- I.value === U.id ? "text-white" : "",
2151
- // active style like react-select
2152
- (I.value === de, "")
2153
- ])
2154
- }, E(U.text), 3)
2155
- ], 10, La))), 128)) : (i(), u("div", Sa, " No options "))
2156
- ], 512)
2157
- ])) : B("", !0)
2158
- ], 2),
2159
- t.add ? (i(), u("button", {
2160
- key: 0,
2161
- onClick: nt,
2162
- 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",
2163
- disabled: a.value,
2164
- type: "button"
2165
- }, [
2166
- j(je, {
2167
- width: "16",
2168
- height: "16"
2169
- }),
2170
- w[9] || (w[9] = l("span", null, "Додати", -1))
2171
- ], 8, Ba)) : B("", !0)
2172
- ], 512);
2173
- };
2093
+ l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2094
+ ], -1)
2095
+ ]), 8, Ca)) : j("", !0),
2096
+ k[6] || (k[6] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2097
+ l("button", {
2098
+ type: "button",
2099
+ class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2100
+ "aria-hidden": "true",
2101
+ disabled: a.value,
2102
+ onClick: k[1] || (k[1] = ne((A) => S(), ["stop"]))
2103
+ }, k[5] || (k[5] = [
2104
+ l("svg", {
2105
+ height: "20",
2106
+ width: "20",
2107
+ viewBox: "0 0 20 20",
2108
+ class: "fill-current"
2109
+ }, [
2110
+ l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
2111
+ ], -1)
2112
+ ]), 8, Va)
2113
+ ])
2114
+ ], 42, ha),
2115
+ c.value ? (i(), u("div", Ma, [
2116
+ l("div", {
2117
+ class: "max-h-[300px] overflow-y-auto py-1",
2118
+ ref_key: "listRef",
2119
+ ref: f
2120
+ }, [
2121
+ H.value.length ? (i(!0), u(ee, { key: 0 }, le(H.value, (A, W) => (i(), u("div", {
2122
+ key: A.id,
2123
+ ref_for: !0,
2124
+ ref: (me) => U.value[W] = me,
2125
+ class: V([
2126
+ "flex px-3 py-2 cursor-default select-none hover:bg-blue-300",
2127
+ z.value === W ? "bg-blue-300" : "",
2128
+ M(A.id) ? "text-white bg-blue-500" : "text-gray-900 bg-white"
2129
+ ]),
2130
+ "aria-disabled": M(A.id) ? "true" : "false",
2131
+ role: "option",
2132
+ tabindex: "-1",
2133
+ onClick: (me) => G(A)
2134
+ }, [
2135
+ A?.color ? (i(), u("span", {
2136
+ key: 0,
2137
+ class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2138
+ style: he({ backgroundColor: A?.color })
2139
+ }, null, 4)) : j("", !0),
2140
+ l("div", {
2141
+ class: V([
2142
+ "leading-[19px]",
2143
+ z.value === A.id ? "text-white" : "",
2144
+ // active style like react-select
2145
+ (z.value === W, "")
2146
+ ])
2147
+ }, F(A.text), 3)
2148
+ ], 10, La))), 128)) : (i(), u("div", Sa, " No options "))
2149
+ ], 512)
2150
+ ])) : j("", !0)
2151
+ ], 2),
2152
+ t.add ? (i(), u("button", {
2153
+ key: 0,
2154
+ onClick: it,
2155
+ 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",
2156
+ disabled: a.value,
2157
+ type: "button"
2158
+ }, [
2159
+ B(je, {
2160
+ width: "16",
2161
+ height: "16"
2162
+ }),
2163
+ k[9] || (k[9] = l("span", null, "Додати", -1))
2164
+ ], 8, Ba)) : j("", !0)
2165
+ ], 512));
2174
2166
  }
2175
- }), Ia = ["placeholder", "disabled"], Aa = /* @__PURE__ */ A({
2167
+ }), Ia = ["placeholder", "disabled"], za = /* @__PURE__ */ O({
2176
2168
  __name: "vs-input-textarea",
2177
- props: /* @__PURE__ */ K({
2169
+ props: /* @__PURE__ */ Q({
2178
2170
  style: { default: () => ({}) },
2179
2171
  customClass: { default: "" },
2180
2172
  disabled: { type: Boolean, default: !1 },
@@ -2188,21 +2180,21 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
2188
2180
  }),
2189
2181
  emits: ["update:modelValue"],
2190
2182
  setup(o) {
2191
- const e = o, { inputClass: t } = ge(e.style), n = Z(o, "modelValue");
2192
- return (r, a) => G((i(), u("textarea", {
2193
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
2194
- placeholder: r.placeholder,
2195
- disabled: r.disabled,
2183
+ const e = o, { inputClass: t } = be(e.style), n = X(o, "modelValue");
2184
+ return (s, a) => K((i(), u("textarea", {
2185
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
2186
+ placeholder: s.placeholder,
2187
+ disabled: s.disabled,
2196
2188
  row: "2",
2197
- class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [q(t)]]),
2189
+ class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [J(t)]]),
2198
2190
  style: {
2199
2191
  border: "1px solid #CFD9E0"
2200
2192
  }
2201
2193
  }, null, 10, Ia)), [
2202
- [ie, n.value]
2194
+ [de, n.value]
2203
2195
  ]);
2204
2196
  }
2205
- }), za = {}, Ea = {
2197
+ }), Aa = {}, Oa = {
2206
2198
  xmlns: "http://www.w3.org/2000/svg",
2207
2199
  viewBox: "0 0 24 24",
2208
2200
  fill: "none",
@@ -2212,8 +2204,8 @@ const Mo = /* @__PURE__ */ R($o, [["render", Vo]]), Lo = { class: "flex flex-col
2212
2204
  "stroke-linejoin": "round",
2213
2205
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
2214
2206
  };
2215
- function Fa(o, e) {
2216
- return i(), u("svg", Ea, e[0] || (e[0] = [
2207
+ function Ea(o, e) {
2208
+ return i(), u("svg", Oa, e[0] || (e[0] = [
2217
2209
  l("path", {
2218
2210
  stroke: "none",
2219
2211
  d: "M0 0h24v24H0z",
@@ -2223,7 +2215,7 @@ function Fa(o, e) {
2223
2215
  l("path", { d: "M21 21l-6 -6" }, null, -1)
2224
2216
  ]));
2225
2217
  }
2226
- const Oa = /* @__PURE__ */ R(za, [["render", Fa]]), Da = {}, Ua = {
2218
+ const Fa = /* @__PURE__ */ R(Aa, [["render", Ea]]), Da = {}, Ua = {
2227
2219
  class: "flex-shrink-0 mt-0.5 size-3.5",
2228
2220
  xmlns: "http://www.w3.org/2000/svg",
2229
2221
  viewBox: "0 0 24 24",
@@ -2296,20 +2288,20 @@ const Za = /* @__PURE__ */ R(Ga, [["render", Ka]]), Wa = {}, Qa = {
2296
2288
  };
2297
2289
  function Xa(o, e) {
2298
2290
  return i(), u("svg", Qa, e[0] || (e[0] = [
2299
- 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)
2291
+ 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)
2300
2292
  ]));
2301
2293
  }
2302
- const We = /* @__PURE__ */ R(Wa, [["render", Xa]]), Ya = {}, er = {
2294
+ const Qe = /* @__PURE__ */ R(Wa, [["render", Xa]]), Ya = {}, es = {
2303
2295
  viewBox: "0 0 178 90",
2304
2296
  fill: "none",
2305
2297
  xmlns: "http://www.w3.org/2000/svg"
2306
2298
  };
2307
- function tr(o, e) {
2308
- return i(), u("svg", er, e[0] || (e[0] = [
2309
- 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)
2299
+ function ts(o, e) {
2300
+ return i(), u("svg", es, e[0] || (e[0] = [
2301
+ 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)
2310
2302
  ]));
2311
2303
  }
2312
- const lr = /* @__PURE__ */ R(Ya, [["render", tr]]), or = {}, ar = {
2304
+ const ls = /* @__PURE__ */ R(Ya, [["render", ts]]), os = {}, as = {
2313
2305
  xmlns: "http://www.w3.org/2000/svg",
2314
2306
  viewBox: "0 0 24 24",
2315
2307
  fill: "none",
@@ -2318,18 +2310,18 @@ const lr = /* @__PURE__ */ R(Ya, [["render", tr]]), or = {}, ar = {
2318
2310
  "stroke-linecap": "round",
2319
2311
  "stroke-linejoin": "round"
2320
2312
  };
2321
- function rr(o, e) {
2322
- return i(), u("svg", ar, e[0] || (e[0] = [
2313
+ function ss(o, e) {
2314
+ return i(), u("svg", as, e[0] || (e[0] = [
2323
2315
  l("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
2324
2316
  ]));
2325
2317
  }
2326
- const sr = /* @__PURE__ */ R(or, [["render", rr]]), nr = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ir = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ur = { class: "relative w-full" }, dr = { class: "table-wrapper flex gap-2" }, cr = { class: "vs-popover inline-block text-slate-700" }, pr = { class: "text-center" }, fr = { class: "" }, vr = { 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" }, mr = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, hr = { class: "text-sm items-center text-gray-800 flex gap-1" }, gr = { class: "w-full overflow-x-auto" }, br = { class: "w-full table-auto caption-bottom text-sm" }, yr = { class: "[&_tr]:border-b" }, xr = { 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" }, wr = { 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" }, kr = {
2318
+ const rs = /* @__PURE__ */ R(os, [["render", ss]]), ns = { class: "vs-datatable border rounded-xl w-full flex-grow" }, is = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, us = { class: "relative w-full" }, ds = { class: "table-wrapper flex gap-2" }, cs = { class: "vs-popover inline-block text-slate-700" }, ps = { class: "text-center" }, fs = { class: "" }, vs = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, ms = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, hs = { class: "text-sm items-center text-gray-800 flex gap-1" }, gs = { class: "w-full overflow-x-auto" }, bs = { class: "w-full table-auto caption-bottom text-sm" }, ys = { class: "[&_tr]:border-b" }, xs = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, ws = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, ks = {
2327
2319
  key: 0,
2328
2320
  colspan: "100%",
2329
2321
  class: "text-center"
2330
- }, _r = { class: "w-full" }, $r = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Cr = ["onDragstart", "onDragover", "onDrop"], Vr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Mr = { class: "flex items-center justify-center" }, Lr = { 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" }, Sr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Br = { class: "flex items-center justify-center gap-2" }, jr = ["onClick"], Ir = ["onClick"], Ar = /* @__PURE__ */ A({
2322
+ }, _s = { class: "w-full" }, $s = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Cs = ["onDragstart", "onDragover", "onDrop"], Vs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Ms = { class: "flex items-center justify-center" }, Ls = { 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" }, Ss = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Bs = { class: "flex items-center justify-center gap-2" }, js = ["onClick"], Is = ["onClick"], zs = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, As = /* @__PURE__ */ O({
2331
2323
  __name: "vs-input-datatable",
2332
- props: /* @__PURE__ */ K({
2324
+ props: /* @__PURE__ */ Q({
2333
2325
  colModel: {},
2334
2326
  style: {},
2335
2327
  customClass: {},
@@ -2344,93 +2336,96 @@ const sr = /* @__PURE__ */ R(or, [["render", rr]]), nr = { class: "vs-datatable
2344
2336
  }),
2345
2337
  emits: ["update:modelValue"],
2346
2338
  setup(o) {
2347
- const e = o, t = Z(o, "modelValue"), n = k({}), r = k(""), a = O(() => {
2348
- if (!r.value) return t.value ?? [];
2349
- const C = r.value.toLowerCase();
2350
- return t.value.filter((m) => e.colModel?.some((V) => {
2351
- const z = m[V.key];
2352
- return z ? Array.isArray(z) ? z.join(", ").toLowerCase().includes(C) : String(z).toLowerCase().includes(C) : !1;
2339
+ const e = o, t = X(o, "modelValue"), n = x({}), s = x(""), a = D(() => {
2340
+ if (!s.value) return t.value ?? [];
2341
+ const I = s.value.toLowerCase();
2342
+ return t.value.filter(($) => e.colModel?.some((S) => {
2343
+ const q = $[S.key];
2344
+ return q ? Array.isArray(q) ? q.join(", ").toLowerCase().includes(I) : String(q).toLowerCase().includes(I) : !1;
2353
2345
  }));
2354
- }), s = k(null), d = k(null), p = k(!1), f = k(null), c = k({ top: 0, left: 0 }), g = (C) => {
2355
- s.value = C;
2356
- }, v = (C) => {
2357
- d.value = C;
2358
- }, M = (C) => {
2359
- if (s.value === null || s.value === C) {
2360
- s.value = null, d.value = null;
2346
+ }), r = x(null), d = x(null), p = x(!1), f = x(null), c = x({ top: 0, left: 0 }), g = (I) => {
2347
+ r.value = I;
2348
+ }, v = (I) => {
2349
+ d.value = I;
2350
+ }, C = (I) => {
2351
+ if (r.value === null || r.value === I) {
2352
+ r.value = null, d.value = null;
2361
2353
  return;
2362
2354
  }
2363
- const m = [...t.value], [V] = m.splice(s.value, 1);
2364
- m.splice(C, 0, V), t.value = m, s.value = null, d.value = null;
2365
- }, I = (C) => {
2366
- const V = C.currentTarget.getBoundingClientRect();
2367
- c.value = { top: V.bottom + window.scrollY, left: V.left + window.scrollX }, p.value = !p.value;
2368
- }, D = () => {
2355
+ const $ = [...t.value], [S] = $.splice(r.value, 1);
2356
+ $.splice(I, 0, S), t.value = $, r.value = null, d.value = null;
2357
+ }, z = (I) => {
2358
+ const S = I.currentTarget.getBoundingClientRect();
2359
+ c.value = { top: S.bottom + window.scrollY, left: S.left + window.scrollX }, p.value = !p.value;
2360
+ }, U = () => {
2369
2361
  f.value && f.value.click();
2370
- }, T = (C) => {
2371
- const V = C.target.files?.[0];
2372
- if (!V) return;
2373
- const z = new FileReader();
2374
- z.onload = (W) => {
2362
+ }, T = (I) => {
2363
+ const S = I.target.files?.[0];
2364
+ if (!S) return;
2365
+ const q = new FileReader();
2366
+ q.onload = (m) => {
2375
2367
  try {
2376
- const te = W.target?.result;
2377
- if (typeof te == "string") {
2378
- const xe = JSON.parse(te);
2379
- Array.isArray(xe) && t.value.push(...xe);
2368
+ const y = m.target?.result;
2369
+ if (typeof y == "string") {
2370
+ const E = JSON.parse(y);
2371
+ Array.isArray(E) && t.value.push(...E);
2380
2372
  }
2381
- } catch (te) {
2382
- console.error("Error parsing file:", te);
2373
+ } catch (y) {
2374
+ console.error("Error parsing file:", y);
2383
2375
  }
2384
- }, z.readAsText(V);
2385
- }, P = () => {
2386
- const C = JSON.stringify(t.value, null, 2), m = new Blob([C], { type: "application/json" }), V = URL.createObjectURL(m), z = document.createElement("a");
2387
- z.href = V, z.download = "data.json", z.click(), URL.revokeObjectURL(V);
2376
+ }, q.readAsText(S);
2377
+ }, N = () => {
2378
+ const I = JSON.stringify(t.value, null, 2), $ = new Blob([I], { type: "application/json" }), S = URL.createObjectURL($), q = document.createElement("a");
2379
+ q.href = S, q.download = "data.json", q.click(), URL.revokeObjectURL(S);
2388
2380
  };
2389
- ne(async () => {
2390
- const C = e.colModel?.filter((m) => m.data);
2391
- C?.length && Promise.all(C.map(async (m) => {
2392
- n.value[m.key] = await fetch(`/api/suggest/${m.data}`).then((V) => V.json());
2381
+ ue(async () => {
2382
+ const I = e.colModel?.filter(($) => $.data);
2383
+ I?.length && Promise.all(I.map(async ($) => {
2384
+ n.value[$.key] = await fetch(`/api/suggest/${$.data}`).then((S) => S.json());
2393
2385
  }));
2394
2386
  });
2395
- async function _() {
2396
- const C = await Me({
2397
- schema: e.colModel,
2398
- mode: "add"
2399
- });
2400
- C && (Array.isArray(t.value) ? t.value = [...t.value, C] : t.value = [C]);
2387
+ const _ = x(""), b = x(!1);
2388
+ let h = "edit", Z = 0;
2389
+ const P = x({}), M = x({});
2390
+ async function H() {
2391
+ _.value = "Додати", b.value = !0, h = "add", P.value = {};
2401
2392
  }
2402
- function x(C, m) {
2403
- return n.value[m.key] && C[m.key] ? n.value[m.key].find((V) => V.id.toString() === C[m.key].toString())?.text ?? C[m.key] : C[m.key] || "-";
2393
+ function Y(I, $) {
2394
+ return n.value[$.key] && I[$.key] ? n.value[$.key].find((S) => S.id.toString() === I[$.key].toString())?.text ?? I[$.key] : I[$.key] || "-";
2404
2395
  }
2405
- async function h(C, m) {
2406
- const V = await Me({
2407
- schema: e.colModel,
2408
- mode: "add",
2409
- defaultValue: C
2410
- });
2411
- V && (t.value = t.value.map((z, W) => W === m ? V : z));
2396
+ async function we(I, $) {
2397
+ _.value = "Редагувати", b.value = !0, h = "edit", Z = $, P.value = { ...I };
2398
+ }
2399
+ function ce() {
2400
+ const I = M.value.validate();
2401
+ if (I) {
2402
+ pe({ type: "warning", title: "Помилка валідації", message: Object.entries(I).map(([$, S]) => `${$}: ${S}`).join(`
2403
+ `) });
2404
+ return;
2405
+ }
2406
+ h === "add" ? Array.isArray(t.value) ? t.value = [...t.value, P.value] : t.value = [P.value] : t.value = t.value.map(($, S) => S === Z ? P.value : $), b.value = !1;
2412
2407
  }
2413
- function J(C) {
2414
- t.value = t.value.filter((m, V) => V !== C);
2408
+ function Ce(I) {
2409
+ t.value = t.value.filter(($, S) => S !== I);
2415
2410
  }
2416
- return (C, m) => (i(), u("div", nr, [
2417
- l("div", ir, [
2418
- l("div", ur, [
2419
- j(Oa, {
2411
+ return (I, $) => (i(), u("div", ns, [
2412
+ l("div", is, [
2413
+ l("div", us, [
2414
+ B(Fa, {
2420
2415
  width: "14",
2421
2416
  height: "14",
2422
2417
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
2423
2418
  }),
2424
- G(l("input", {
2419
+ K(l("input", {
2425
2420
  type: "text",
2426
- "onUpdate:modelValue": m[0] || (m[0] = (V) => r.value = V),
2421
+ "onUpdate:modelValue": $[0] || ($[0] = (S) => s.value = S),
2427
2422
  placeholder: "Пошук",
2428
2423
  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"
2429
2424
  }, null, 512), [
2430
- [ie, r.value]
2425
+ [de, s.value]
2431
2426
  ])
2432
2427
  ]),
2433
- l("div", dr, [
2428
+ l("div", ds, [
2434
2429
  l("input", {
2435
2430
  ref_key: "fileInput",
2436
2431
  ref: f,
@@ -2439,14 +2434,14 @@ const sr = /* @__PURE__ */ R(or, [["render", rr]]), nr = { class: "vs-datatable
2439
2434
  accept: ".json",
2440
2435
  type: "file"
2441
2436
  }, null, 544),
2442
- l("div", cr, [
2443
- l("div", pr, [
2444
- l("div", fr, [
2437
+ l("div", cs, [
2438
+ l("div", ps, [
2439
+ l("div", fs, [
2445
2440
  l("button", {
2446
- onClick: I,
2441
+ onClick: z,
2447
2442
  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"
2448
2443
  }, [
2449
- j(Ra, {
2444
+ B(Ra, {
2450
2445
  height: "16",
2451
2446
  width: "16"
2452
2447
  })
@@ -2455,139 +2450,167 @@ const sr = /* @__PURE__ */ R(or, [["render", rr]]), nr = { class: "vs-datatable
2455
2450
  ])
2456
2451
  ])
2457
2452
  ]),
2458
- (i(), X(vt, { to: "body" }, [
2453
+ (i(), te(pt, { to: "body" }, [
2459
2454
  p.value ? (i(), u("div", {
2460
2455
  key: 0,
2461
2456
  class: "text-slate-700 vsTailwind vs-popover__content bottom",
2462
- style: me([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
2457
+ style: he([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
2463
2458
  }, [
2464
- l("div", vr, [
2465
- l("div", mr, [
2459
+ l("div", vs, [
2460
+ l("div", ms, [
2466
2461
  l("button", {
2467
- onClick: D,
2462
+ onClick: U,
2468
2463
  class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2469
2464
  }, [
2470
- j(qa, {
2465
+ B(qa, {
2471
2466
  class: "text-black",
2472
2467
  width: "14",
2473
2468
  height: "14"
2474
2469
  }),
2475
- m[1] || (m[1] = oe(" Імпортувати ", -1))
2470
+ $[4] || ($[4] = se(" Імпортувати "))
2476
2471
  ]),
2477
2472
  l("button", {
2478
- onClick: P,
2473
+ onClick: N,
2479
2474
  class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2480
2475
  }, [
2481
- l("span", hr, [
2482
- j(Za, {
2476
+ l("span", hs, [
2477
+ B(Za, {
2483
2478
  class: "text-black",
2484
2479
  width: "14",
2485
2480
  height: "14"
2486
2481
  }),
2487
- m[2] || (m[2] = oe(" Експортувати ", -1))
2482
+ $[5] || ($[5] = se(" Експортувати "))
2488
2483
  ])
2489
2484
  ])
2490
2485
  ])
2491
2486
  ])
2492
- ], 4)) : B("", !0)
2487
+ ], 4)) : j("", !0)
2493
2488
  ])),
2494
2489
  l("button", {
2495
- onClick: _,
2490
+ onClick: H,
2496
2491
  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"
2497
2492
  }, [
2498
- j(je),
2499
- m[3] || (m[3] = oe(" Додати ", -1))
2493
+ B(je),
2494
+ $[6] || ($[6] = se(" Додати "))
2500
2495
  ])
2501
2496
  ]),
2502
- l("div", gr, [
2503
- l("table", br, [
2504
- l("thead", yr, [
2505
- l("tr", xr, [
2506
- l("th", wr, [
2507
- j(We, {
2497
+ l("div", gs, [
2498
+ l("table", bs, [
2499
+ l("thead", ys, [
2500
+ l("tr", xs, [
2501
+ l("th", ws, [
2502
+ B(Qe, {
2508
2503
  width: "24",
2509
2504
  height: "24",
2510
2505
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2511
2506
  })
2512
2507
  ]),
2513
- (i(!0), u(Q, null, Y(C.colModel, (V) => (i(), u("th", {
2514
- key: V.key,
2508
+ (i(!0), u(ee, null, le(I.colModel, (S) => (i(), u("th", {
2509
+ key: S.key,
2515
2510
  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]"
2516
- }, E(V.ua || V.label), 1))), 128)),
2517
- m[4] || (m[4] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2511
+ }, F(S.ua || S.label), 1))), 128)),
2512
+ $[7] || ($[7] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2518
2513
  ])
2519
2514
  ]),
2520
2515
  l("tbody", {
2521
- class: S({ "[&_tr:last-child]:border-0": !d.value })
2516
+ class: V({ "[&_tr:last-child]:border-0": !d.value })
2522
2517
  }, [
2523
- a.value.length === 0 ? (i(), u("td", kr, [
2524
- l("div", _r, [
2525
- l("div", $r, [
2526
- j(lr, { class: "w-48 mx-auto" }),
2527
- m[5] || (m[5] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
2518
+ a.value.length === 0 ? (i(), u("td", ks, [
2519
+ l("div", _s, [
2520
+ l("div", $s, [
2521
+ B(ls, { class: "w-48 mx-auto" }),
2522
+ $[8] || ($[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
2528
2523
  l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2529
2524
  l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2530
2525
  ], -1))
2531
2526
  ])
2532
2527
  ])
2533
- ])) : B("", !0),
2534
- (i(!0), u(Q, null, Y(a.value, (V, z) => (i(), u("tr", {
2535
- key: V.id,
2536
- class: S(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2537
- "opacity-50": s.value === z,
2538
- "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === z
2528
+ ])) : j("", !0),
2529
+ (i(!0), u(ee, null, le(a.value, (S, q) => (i(), u("tr", {
2530
+ key: S.id,
2531
+ class: V(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2532
+ "opacity-50": r.value === q,
2533
+ "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === q
2539
2534
  }]),
2540
2535
  draggable: "true",
2541
- onDragstart: (W) => g(z),
2542
- onDragover: re((W) => v(z), ["prevent"]),
2543
- onDrop: (W) => M(z)
2536
+ onDragstart: (m) => g(q),
2537
+ onDragover: ne((m) => v(q), ["prevent"]),
2538
+ onDrop: (m) => C(q)
2544
2539
  }, [
2545
- l("td", Vr, [
2546
- l("div", Mr, [
2547
- j(We, {
2540
+ l("td", Vs, [
2541
+ l("div", Ms, [
2542
+ B(Qe, {
2548
2543
  width: "24",
2549
2544
  height: "24",
2550
2545
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2551
2546
  })
2552
2547
  ])
2553
2548
  ]),
2554
- (i(!0), u(Q, null, Y(C.colModel, (W) => (i(), u("td", {
2555
- key: W.key,
2549
+ (i(!0), u(ee, null, le(I.colModel, (m) => (i(), u("td", {
2550
+ key: m.key,
2556
2551
  class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
2557
2552
  }, [
2558
- l("div", Lr, E(x(V, W)), 1)
2553
+ l("div", Ls, F(Y(S, m)), 1)
2559
2554
  ]))), 128)),
2560
- l("td", Sr, [
2561
- l("div", Br, [
2555
+ l("td", Ss, [
2556
+ l("div", Bs, [
2562
2557
  l("button", {
2563
- onClick: (W) => h(V, z),
2558
+ onClick: (m) => we(S, q),
2564
2559
  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"
2565
2560
  }, [
2566
- j(sr, {
2561
+ B(rs, {
2567
2562
  width: "24",
2568
2563
  height: "24",
2569
2564
  class: "w-3 h-3"
2570
2565
  })
2571
- ], 8, jr),
2566
+ ], 8, js),
2572
2567
  l("button", {
2573
- onClick: (W) => J(z),
2568
+ onClick: (m) => Ce(q),
2574
2569
  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"
2575
2570
  }, [
2576
- j(Ie, {
2571
+ B(ze, {
2577
2572
  width: "24",
2578
2573
  height: "24",
2579
2574
  class: "w-3 h-3"
2580
2575
  })
2581
- ], 8, Ir)
2576
+ ], 8, Is)
2582
2577
  ])
2583
2578
  ])
2584
- ], 42, Cr))), 128))
2579
+ ], 42, Cs))), 128))
2585
2580
  ], 2)
2586
2581
  ])
2587
- ])
2582
+ ]),
2583
+ B(J(vt), {
2584
+ visible: b.value,
2585
+ title: _.value,
2586
+ size: "lg"
2587
+ }, {
2588
+ default: $e(() => [
2589
+ B(Ie, {
2590
+ schema: e.colModel,
2591
+ values: P.value,
2592
+ "onUpdate:values": $[1] || ($[1] = (S) => P.value = S),
2593
+ form: M.value,
2594
+ "onUpdate:form": $[2] || ($[2] = (S) => M.value = S)
2595
+ }, null, 8, ["schema", "values", "form"]),
2596
+ l("div", zs, [
2597
+ l("button", {
2598
+ type: "button",
2599
+ onClick: $[3] || ($[3] = (S) => b.value = !1),
2600
+ 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"
2601
+ }, " Скасувати "),
2602
+ l("button", {
2603
+ onClick: ce,
2604
+ type: "button",
2605
+ 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"
2606
+ }, " Зберегти ")
2607
+ ])
2608
+ ]),
2609
+ _: 1
2610
+ }, 8, ["visible", "title"])
2588
2611
  ]));
2589
2612
  }
2590
- }), zr = {
2613
+ }), Os = {
2591
2614
  draw: {
2592
2615
  toolbar: {
2593
2616
  actions: {
@@ -2695,7 +2718,7 @@ const sr = /* @__PURE__ */ R(or, [["render", rr]]), nr = { class: "vs-datatable
2695
2718
  }
2696
2719
  }
2697
2720
  };
2698
- function Er(o) {
2721
+ function Es(o) {
2699
2722
  return o ? o.type === "FeatureCollection" || o.type === "Feature" ? o : o.geom ? {
2700
2723
  type: "Feature",
2701
2724
  geometry: {
@@ -2709,7 +2732,7 @@ function Er(o) {
2709
2732
  properties: {}
2710
2733
  } : null : null;
2711
2734
  }
2712
- const Fr = {}, Or = {
2735
+ const Fs = {}, Ds = {
2713
2736
  xmlns: "http://www.w3.org/2000/svg",
2714
2737
  viewBox: "0 0 24 24",
2715
2738
  stroke: "currentColor",
@@ -2719,8 +2742,8 @@ const Fr = {}, Or = {
2719
2742
  "stroke-linejoin": "round",
2720
2743
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
2721
2744
  };
2722
- function Dr(o, e) {
2723
- return i(), u("svg", Or, e[0] || (e[0] = [
2745
+ function Us(o, e) {
2746
+ return i(), u("svg", Ds, e[0] || (e[0] = [
2724
2747
  l("path", {
2725
2748
  stroke: "none",
2726
2749
  d: "M0 0h24v24H0z",
@@ -2730,7 +2753,7 @@ function Dr(o, e) {
2730
2753
  l("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
2731
2754
  ]));
2732
2755
  }
2733
- const Ur = /* @__PURE__ */ R(Fr, [["render", Dr]]), Tr = {}, Rr = {
2756
+ const Ts = /* @__PURE__ */ R(Fs, [["render", Us]]), Rs = {}, Ps = {
2734
2757
  xmlns: "http://www.w3.org/2000/svg",
2735
2758
  viewBox: "0 0 24 24",
2736
2759
  fill: "none",
@@ -2740,8 +2763,8 @@ const Ur = /* @__PURE__ */ R(Fr, [["render", Dr]]), Tr = {}, Rr = {
2740
2763
  "stroke-linejoin": "round",
2741
2764
  class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
2742
2765
  };
2743
- function Pr(o, e) {
2744
- return i(), u("svg", Rr, e[0] || (e[0] = [
2766
+ function Ns(o, e) {
2767
+ return i(), u("svg", Ps, e[0] || (e[0] = [
2745
2768
  l("path", {
2746
2769
  stroke: "none",
2747
2770
  d: "M0 0h24v24H0z",
@@ -2752,7 +2775,7 @@ function Pr(o, e) {
2752
2775
  l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
2753
2776
  ]));
2754
2777
  }
2755
- const Nr = /* @__PURE__ */ R(Tr, [["render", Pr]]), Hr = {}, qr = {
2778
+ const Hs = /* @__PURE__ */ R(Rs, [["render", Ns]]), qs = {}, Gs = {
2756
2779
  xmlns: "http://www.w3.org/2000/svg",
2757
2780
  viewBox: "0 0 24 24",
2758
2781
  fill: "none",
@@ -2762,12 +2785,12 @@ const Nr = /* @__PURE__ */ R(Tr, [["render", Pr]]), Hr = {}, qr = {
2762
2785
  "stroke-linejoin": "round",
2763
2786
  class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
2764
2787
  };
2765
- function Gr(o, e) {
2766
- return i(), u("svg", qr, e[0] || (e[0] = [
2767
- 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)
2788
+ function Js(o, e) {
2789
+ return i(), u("svg", Gs, e[0] || (e[0] = [
2790
+ 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)
2768
2791
  ]));
2769
2792
  }
2770
- const Jr = /* @__PURE__ */ R(Hr, [["render", Gr]]), Kr = {}, Zr = {
2793
+ const Ks = /* @__PURE__ */ R(qs, [["render", Js]]), Zs = {}, Ws = {
2771
2794
  xmlns: "http://www.w3.org/2000/svg",
2772
2795
  viewBox: "0 0 24 24",
2773
2796
  fill: "none",
@@ -2777,12 +2800,12 @@ const Jr = /* @__PURE__ */ R(Hr, [["render", Gr]]), Kr = {}, Zr = {
2777
2800
  "stroke-linejoin": "round",
2778
2801
  class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
2779
2802
  };
2780
- function Wr(o, e) {
2781
- return i(), u("svg", Zr, e[0] || (e[0] = [
2782
- 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)
2803
+ function Qs(o, e) {
2804
+ return i(), u("svg", Ws, e[0] || (e[0] = [
2805
+ 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)
2783
2806
  ]));
2784
2807
  }
2785
- const Qr = /* @__PURE__ */ R(Kr, [["render", Wr]]), Xr = {}, Yr = {
2808
+ const Xs = /* @__PURE__ */ R(Zs, [["render", Qs]]), Ys = {}, er = {
2786
2809
  version: "1.1",
2787
2810
  viewBox: "0 0 14 14",
2788
2811
  xmlns: "http://www.w3.org/2000/svg",
@@ -2790,8 +2813,8 @@ const Qr = /* @__PURE__ */ R(Kr, [["render", Wr]]), Xr = {}, Yr = {
2790
2813
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
2791
2814
  class: "fullscreen-icon"
2792
2815
  };
2793
- function es(o, e) {
2794
- return i(), u("svg", Yr, e[0] || (e[0] = [
2816
+ function tr(o, e) {
2817
+ return i(), u("svg", er, e[0] || (e[0] = [
2795
2818
  l("title", null, null, -1),
2796
2819
  l("desc", null, null, -1),
2797
2820
  l("defs", null, null, -1),
@@ -2820,10 +2843,10 @@ function es(o, e) {
2820
2843
  ], -1)
2821
2844
  ]));
2822
2845
  }
2823
- const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__search" }, os = { class: "map-search__input" }, as = { class: "flex flex-nowrap relative" }, rs = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, ss = { class: "flex items-center w-full" }, ns = { class: "max-w-[90%] truncate" }, is = {
2846
+ const lr = /* @__PURE__ */ R(Ys, [["render", tr]]), or = { class: "form-geom__search" }, ar = { class: "map-search__input" }, sr = { class: "flex flex-nowrap relative" }, rr = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, nr = { class: "flex items-center w-full" }, ir = { class: "max-w-[90%] truncate" }, ur = {
2824
2847
  key: 0,
2825
2848
  class: "absolute z-[3100] mt-0.5 left-0 right-0"
2826
- }, us = { 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" }, ds = { 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" }, cs = ["onClick"], ps = { class: "flex justify-between items-center w-full" }, fs = { class: "flex items-center" }, vs = {
2849
+ }, dr = { 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" }, cr = { 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" }, pr = ["onClick"], fr = { class: "flex justify-between items-center w-full" }, vr = { class: "flex items-center" }, mr = {
2827
2850
  key: 0,
2828
2851
  class: "flex-shrink-0 w-3.5 h-3.5 text-blue-600",
2829
2852
  width: "24",
@@ -2834,87 +2857,87 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
2834
2857
  "stroke-width": "2",
2835
2858
  "stroke-linecap": "round",
2836
2859
  "stroke-linejoin": "round"
2837
- }, ms = { class: "relative w-full" }, hs = { class: "vs-form-text relative bg-white rounded-lg" }, gs = {
2860
+ }, hr = { class: "relative w-full" }, gr = { class: "vs-form-text relative bg-white rounded-lg" }, br = {
2838
2861
  key: 1,
2839
2862
  class: "absolute left-0 right-0 top-full z-[3200] bg-white border border-gray-200 rounded-b-lg shadow-lg max-h-72 overflow-auto"
2840
- }, bs = { key: 0 }, ys = ["onClick"], xs = {
2863
+ }, yr = { key: 0 }, xr = ["onClick"], wr = {
2841
2864
  key: 1,
2842
2865
  class: "px-3 py-2 text-xs text-gray-500"
2843
- }, ws = {
2866
+ }, kr = {
2844
2867
  key: 2,
2845
2868
  class: "px-3 py-2 text-xs text-gray-400"
2846
- }, ks = /* @__PURE__ */ A({
2869
+ }, _r = /* @__PURE__ */ O({
2847
2870
  __name: "map-search",
2848
2871
  props: {
2849
2872
  placeholder: { default: "50, 30" }
2850
2873
  },
2851
2874
  emits: ["goToCoordinates"],
2852
2875
  setup(o, { emit: e }) {
2853
- const t = e, n = k(!1), r = k("coordinates"), a = k(""), s = k([]), d = k(!1), p = k(!1);
2876
+ const t = e, n = x(!1), s = x("coordinates"), a = x(""), r = x([]), d = x(!1), p = x(!1);
2854
2877
  let f;
2855
2878
  const c = [
2856
2879
  { value: "coordinates", label: "Пошук по кординатам" },
2857
2880
  { value: "atu", label: "АТУ" },
2858
2881
  { value: "address", label: "Адресса" },
2859
2882
  { value: "search_here", label: "Пошук HERE" }
2860
- ], g = O(() => c.find((_) => _.value === r.value)?.label ?? "АТУ");
2883
+ ], g = D(() => c.find((_) => _.value === s.value)?.label ?? "АТУ");
2861
2884
  function v(_) {
2862
- r.value = _.value, n.value = !1, a.value = "", a.value && D();
2885
+ s.value = _.value, n.value = !1, a.value = "", a.value && U();
2863
2886
  }
2864
- function M(_) {
2887
+ function C(_) {
2865
2888
  _.target.closest(".map-search__input") || (n.value = !1);
2866
2889
  }
2867
- ne(() => document.addEventListener("click", M)), Fe(() => document.removeEventListener("click", M));
2868
- async function I(_) {
2869
- let x;
2870
- 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");
2871
- const h = new URL(x || "");
2872
- 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();
2890
+ ue(() => document.addEventListener("click", C)), Ee(() => document.removeEventListener("click", C));
2891
+ async function z(_) {
2892
+ let b;
2893
+ s.value === "atu" ? b = "/api/suggest/atu.nsdi.ato_level" : s.value === "address" ? b = "/api/suggest/map.address_id" : s.value === "search_here" && (b = "/api/gis-url-proxy");
2894
+ const h = new URL(b || "");
2895
+ return s.value === "search_here" ? h.searchParams.set("searchtext", _) : (s.value === "atu" || s.value === "address") && h.searchParams.set("key", _), h.searchParams.set("limit", "20"), h.searchParams.set("q", _), (await fetch(h.toString())).json();
2873
2896
  }
2874
- function D() {
2875
- if (d.value = !0, p.value = !0, r.value === "coordinates") {
2897
+ function U() {
2898
+ if (d.value = !0, p.value = !0, s.value === "coordinates") {
2876
2899
  const _ = a.value.trim().split(",");
2877
2900
  if (_.length === 2) {
2878
- const x = parseFloat(_[0]), h = parseFloat(_[1]);
2879
- !Number.isNaN(x) && !Number.isNaN(h) && t("goToCoordinates", [x, h]);
2901
+ const b = parseFloat(_[0]), h = parseFloat(_[1]);
2902
+ !Number.isNaN(b) && !Number.isNaN(h) && t("goToCoordinates", [b, h]);
2880
2903
  }
2881
2904
  return;
2882
2905
  }
2883
2906
  f && window.clearTimeout(f), f = window.setTimeout(async () => {
2884
2907
  const _ = a.value.trim();
2885
2908
  if (!_) {
2886
- s.value = [], p.value = !1;
2909
+ r.value = [], p.value = !1;
2887
2910
  return;
2888
2911
  }
2889
2912
  try {
2890
- const x = await I(_);
2891
- s.value = Array.isArray(x.features) ? x.features : [];
2913
+ const b = await z(_);
2914
+ r.value = Array.isArray(b.features) ? b.features : [];
2892
2915
  } catch {
2893
- s.value = [];
2916
+ r.value = [];
2894
2917
  } finally {
2895
2918
  p.value = !1;
2896
2919
  }
2897
2920
  }, 300);
2898
2921
  }
2899
2922
  function T() {
2900
- a.value = "", s.value = [], d.value = !1, p.value = !1;
2923
+ a.value = "", r.value = [], d.value = !1, p.value = !1;
2901
2924
  }
2902
- function P(_) {
2903
- t("goToCoordinates", _), d.value = !1, p.value = !1, s.value = [];
2925
+ function N(_) {
2926
+ t("goToCoordinates", _), d.value = !1, p.value = !1, r.value = [];
2904
2927
  }
2905
- return (_, x) => (i(), u("div", ls, [
2906
- l("div", os, [
2907
- l("div", as, [
2908
- l("div", rs, [
2928
+ return (_, b) => (i(), u("div", or, [
2929
+ l("div", ar, [
2930
+ l("div", sr, [
2931
+ l("div", rr, [
2909
2932
  l("button", {
2910
2933
  type: "button",
2911
- onClick: x[0] || (x[0] = (h) => n.value = !n.value),
2934
+ onClick: b[0] || (b[0] = (h) => n.value = !n.value),
2912
2935
  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"
2913
2936
  }, [
2914
- l("div", ss, [
2915
- l("span", ns, E(g.value), 1)
2937
+ l("div", nr, [
2938
+ l("span", ir, F(g.value), 1)
2916
2939
  ]),
2917
- x[3] || (x[3] = l("svg", {
2940
+ b[3] || (b[3] = l("svg", {
2918
2941
  class: "stroke-gray-500 absolute right-3 translate-y-1/2 bottom-1/2",
2919
2942
  width: "15",
2920
2943
  height: "15",
@@ -2929,30 +2952,30 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
2929
2952
  })
2930
2953
  ], -1))
2931
2954
  ]),
2932
- n.value ? (i(), u("div", is, [
2933
- l("div", us, [
2934
- l("div", ds, [
2935
- (i(), u(Q, null, Y(c, (h) => l("div", {
2936
- onClick: (J) => v(h),
2955
+ n.value ? (i(), u("div", ur, [
2956
+ l("div", dr, [
2957
+ l("div", cr, [
2958
+ (i(), u(ee, null, le(c, (h) => l("div", {
2959
+ onClick: (Z) => v(h),
2937
2960
  key: h.value,
2938
2961
  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"
2939
2962
  }, [
2940
- l("div", ps, [
2941
- l("div", fs, [
2942
- l("div", null, E(h.label), 1)
2963
+ l("div", fr, [
2964
+ l("div", vr, [
2965
+ l("div", null, F(h.label), 1)
2943
2966
  ]),
2944
- h.value === r.value ? (i(), u("svg", vs, x[4] || (x[4] = [
2967
+ h.value === s.value ? (i(), u("svg", mr, b[4] || (b[4] = [
2945
2968
  l("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2946
- ]))) : B("", !0)
2969
+ ]))) : j("", !0)
2947
2970
  ])
2948
- ], 8, cs)), 64))
2971
+ ], 8, pr)), 64))
2949
2972
  ])
2950
2973
  ])
2951
- ])) : B("", !0)
2974
+ ])) : j("", !0)
2952
2975
  ]),
2953
- l("div", ms, [
2954
- l("div", hs, [
2955
- x[6] || (x[6] = l("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
2976
+ l("div", hr, [
2977
+ l("div", gr, [
2978
+ b[6] || (b[6] = l("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
2956
2979
  l("svg", {
2957
2980
  width: "16",
2958
2981
  height: "16",
@@ -2975,15 +2998,15 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
2975
2998
  })
2976
2999
  ])
2977
3000
  ], -1)),
2978
- G(l("input", {
3001
+ K(l("input", {
2979
3002
  type: "text",
2980
- "onUpdate:modelValue": x[1] || (x[1] = (h) => a.value = h),
2981
- onInput: D,
2982
- onFocus: x[2] || (x[2] = (h) => d.value = !0),
3003
+ "onUpdate:modelValue": b[1] || (b[1] = (h) => a.value = h),
3004
+ onInput: U,
3005
+ onFocus: b[2] || (b[2] = (h) => d.value = !0),
2983
3006
  placeholder: "lat, lng ex. 50, 30",
2984
3007
  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"
2985
3008
  }, null, 544), [
2986
- [ie, a.value]
3009
+ [de, a.value]
2987
3010
  ]),
2988
3011
  a.value ? (i(), u("button", {
2989
3012
  key: 0,
@@ -2991,7 +3014,7 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
2991
3014
  class: "absolute right-2 bottom-1/2 translate-y-1/2 text-gray-500 hover:text-red-500",
2992
3015
  "aria-label": "Очистити",
2993
3016
  type: "button"
2994
- }, x[5] || (x[5] = [
3017
+ }, b[5] || (b[5] = [
2995
3018
  l("svg", {
2996
3019
  width: "15",
2997
3020
  height: "15",
@@ -3006,23 +3029,23 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3006
3029
  "stroke-linejoin": "round"
3007
3030
  })
3008
3031
  ], -1)
3009
- ]))) : B("", !0),
3010
- d.value && r.value !== "coordinates" ? (i(), u("div", gs, [
3011
- s.value.length ? (i(), u("ul", bs, [
3012
- (i(!0), u(Q, null, Y(s.value, (h) => (i(), u("li", {
3032
+ ]))) : j("", !0),
3033
+ d.value && s.value !== "coordinates" ? (i(), u("div", br, [
3034
+ r.value.length ? (i(), u("ul", yr, [
3035
+ (i(!0), u(ee, null, le(r.value, (h) => (i(), u("li", {
3013
3036
  key: h.properties.place_id,
3014
- onClick: (J) => P(h),
3037
+ onClick: (Z) => N(h),
3015
3038
  class: "px-3 py-2 text-sm cursor-pointer hover:bg-gray-100"
3016
- }, E(h.properties.display_name), 9, ys))), 128))
3017
- ])) : p.value ? (i(), u("div", xs, "Шукаю…")) : (i(), u("div", ws, "Нічого не знайдено"))
3018
- ])) : B("", !0)
3039
+ }, F(h.properties.display_name), 9, xr))), 128))
3040
+ ])) : p.value ? (i(), u("div", wr, "Шукаю…")) : (i(), u("div", kr, "Нічого не знайдено"))
3041
+ ])) : j("", !0)
3019
3042
  ])
3020
3043
  ])
3021
3044
  ])
3022
3045
  ])
3023
3046
  ]));
3024
3047
  }
3025
- }), _s = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, $s = { class: "flex gap-2" }, Cs = ["onClick", "title"], Vs = ["src"], Ms = /* @__PURE__ */ A({
3048
+ }), $r = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, Cr = { class: "flex gap-2" }, Vr = ["onClick", "title"], Mr = ["src"], Lr = /* @__PURE__ */ O({
3026
3049
  __name: "map-layers",
3027
3050
  props: {
3028
3051
  basemaps: {},
@@ -3030,15 +3053,15 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3030
3053
  },
3031
3054
  emits: ["onLayerChange"],
3032
3055
  setup(o, { emit: e }) {
3033
- const n = k(o.defaultLayer ?? ""), r = e;
3034
- function a(s) {
3035
- r("onLayerChange", s), n.value = s;
3056
+ const n = x(o.defaultLayer ?? ""), s = e;
3057
+ function a(r) {
3058
+ s("onLayerChange", r), n.value = r;
3036
3059
  }
3037
- return (s, d) => (i(), u("div", _s, [
3038
- l("div", $s, [
3039
- (i(!0), u(Q, null, Y(s.basemaps, (p, f) => (i(), u("div", {
3060
+ return (r, d) => (i(), u("div", $r, [
3061
+ l("div", Cr, [
3062
+ (i(!0), u(ee, null, le(r.basemaps, (p, f) => (i(), u("div", {
3040
3063
  key: f,
3041
- class: S(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === f }]),
3064
+ class: V(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === f }]),
3042
3065
  onClick: (c) => a(f),
3043
3066
  title: f,
3044
3067
  role: "button",
@@ -3048,21 +3071,21 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3048
3071
  src: p.preview,
3049
3072
  alt: "",
3050
3073
  class: "w-14 h-14 object-cover"
3051
- }, null, 8, Vs)
3052
- ], 10, Cs))), 128))
3074
+ }, null, 8, Mr)
3075
+ ], 10, Vr))), 128))
3053
3076
  ])
3054
3077
  ]));
3055
3078
  }
3056
- }), Ls = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Ss = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Bs = { class: "flex items-center gap-1" }, js = ["disabled"], Is = { class: "absolute top-4 right-4 z-[1000]" }, As = { class: "flex flex-col gap-[2px]" }, zs = ["aria-pressed"], Es = ["aria-pressed"], Fs = ["aria-pressed"], Os = ["aria-pressed"], Ds = { 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" }, Us = {
3079
+ }), Sr = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Br = { class: "form-geom__panel flex gap-1 items-start mt-2" }, jr = { class: "flex items-center gap-1" }, Ir = ["disabled"], zr = { class: "absolute top-4 right-4 z-[1000]" }, Ar = { class: "flex flex-col gap-[2px]" }, Or = ["aria-pressed"], Er = ["aria-pressed"], Fr = ["aria-pressed"], Dr = ["aria-pressed"], Ur = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Tr = {
3057
3080
  key: 0,
3058
3081
  class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
3059
- }, Ts = { class: "mr-auto" }, Rs = { class: "font-bold" }, Ps = { class: "flex items-center" }, Ns = { class: "text-xs mr-2" }, Hs = {
3082
+ }, Rr = { class: "mr-auto" }, Pr = { class: "font-bold" }, Nr = { class: "flex items-center" }, Hr = { class: "text-xs mr-2" }, qr = {
3060
3083
  key: 0,
3061
3084
  class: "text-xs"
3062
- }, qs = {
3085
+ }, Gr = {
3063
3086
  key: 1,
3064
3087
  class: "text-xs"
3065
- }, Gs = /* @__PURE__ */ A({
3088
+ }, Jr = /* @__PURE__ */ O({
3066
3089
  __name: "vs-input-map",
3067
3090
  props: {
3068
3091
  tools: {},
@@ -3076,11 +3099,9 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3076
3099
  },
3077
3100
  emits: ["update:modelValue"],
3078
3101
  setup(o, { emit: e }) {
3079
- const t = o;
3080
- console.log(t);
3081
- const n = e, r = k(null);
3082
- let a, s, d;
3083
- const p = k(null), f = k(null), c = k(6), g = k(0), v = k(null), M = {
3102
+ const t = o, n = e, s = x(null);
3103
+ let a, r, d;
3104
+ const p = x(null), f = x(null), c = x(6), g = x(0), v = x(null), C = {
3084
3105
  topo100: {
3085
3106
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
3086
3107
  preview: "https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"
@@ -3094,108 +3115,108 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3094
3115
  preview: "https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"
3095
3116
  }
3096
3117
  };
3097
- let I;
3098
- const D = k("topo100");
3118
+ let z;
3119
+ const U = x("topo100");
3099
3120
  function T() {
3100
- return new Promise((b, $) => {
3101
- window.L && window.L.Draw && b(0);
3102
- const F = (ee) => {
3103
- if (Array.from(document.styleSheets).some((be) => be?.href?.includes(ee))) return;
3104
- const pe = document.createElement("link");
3105
- pe.rel = "stylesheet", pe.href = ee, document.head.appendChild(pe);
3106
- }, N = (ee) => new Promise(($e, pe) => {
3107
- const be = Array.from(document.scripts).find((fe) => fe.src === ee);
3108
- if (be) {
3109
- be.addEventListener("load", () => $e()), be.addEventListener("error", (fe) => pe(fe));
3121
+ return new Promise((m, y) => {
3122
+ window.L && window.L.Draw && m(0);
3123
+ const E = (oe) => {
3124
+ if (Array.from(document.styleSheets).some((ye) => ye?.href?.includes(oe))) return;
3125
+ const fe = document.createElement("link");
3126
+ fe.rel = "stylesheet", fe.href = oe, document.head.appendChild(fe);
3127
+ }, G = (oe) => new Promise((Ve, fe) => {
3128
+ const ye = Array.from(document.scripts).find((ve) => ve.src === oe);
3129
+ if (ye) {
3130
+ ye.addEventListener("load", () => Ve()), ye.addEventListener("error", (ve) => fe(ve));
3110
3131
  return;
3111
3132
  }
3112
- const ye = document.createElement("script");
3113
- ye.src = ee, ye.async = !0, ye.onload = () => $e(), ye.onerror = (fe) => pe(fe), document.body.appendChild(ye);
3133
+ const xe = document.createElement("script");
3134
+ xe.src = oe, xe.async = !0, xe.onload = () => Ve(), xe.onerror = (ve) => fe(ve), document.body.appendChild(xe);
3114
3135
  });
3115
- F("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), F("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($);
3136
+ E("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), E("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), G("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => G("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => m(0)).catch(y);
3116
3137
  });
3117
3138
  }
3118
- function P() {
3119
- const b = s.toGeoJSON();
3120
- let $ = null;
3121
- b?.features?.length && ($ = b.features[0].geometry), n("update:modelValue", $), g.value = s.getLayers().length;
3139
+ function N() {
3140
+ const m = r.toGeoJSON();
3141
+ let y = null;
3142
+ m?.features?.length && (y = m.features[0].geometry), n("update:modelValue", y), g.value = r.getLayers().length;
3122
3143
  }
3123
- function _(b = 30) {
3124
- const $ = s.getLayers();
3125
- if (!$.length) return;
3126
- const N = L.featureGroup($).getBounds();
3127
- N && N.isValid() && a.fitBounds(N, { padding: [b, b] });
3144
+ function _(m = 30) {
3145
+ const y = r.getLayers();
3146
+ if (!y.length) return;
3147
+ const G = L.featureGroup(y).getBounds();
3148
+ G && G.isValid() && a.fitBounds(G, { padding: [m, m] });
3128
3149
  }
3129
- function x() {
3150
+ function b() {
3130
3151
  p.value?.click();
3131
3152
  }
3132
- const h = k("");
3133
- function J(b) {
3134
- return b instanceof L.Circle ? "Circle" : b instanceof L.Rectangle ? "Rectangle" : b instanceof L.Polygon && !(b instanceof L.Rectangle) ? "Polygon" : b instanceof L.Polyline && !(b instanceof L.Polygon) ? "Polyline" : b instanceof L.Marker ? "Point" : "Feature";
3153
+ const h = x("");
3154
+ function Z(m) {
3155
+ return m instanceof L.Circle ? "Circle" : m instanceof L.Rectangle ? "Rectangle" : m instanceof L.Polygon && !(m instanceof L.Rectangle) ? "Polygon" : m instanceof L.Polyline && !(m instanceof L.Polygon) ? "Polyline" : m instanceof L.Marker ? "Point" : "Feature";
3135
3156
  }
3136
- function C(b) {
3137
- if (b instanceof L.Circle) {
3138
- const $ = b.getRadius();
3139
- return Math.PI * ($ * $) / 1e6;
3157
+ function P(m) {
3158
+ if (m instanceof L.Circle) {
3159
+ const y = m.getRadius();
3160
+ return Math.PI * (y * y) / 1e6;
3140
3161
  }
3141
- if (b instanceof L.Polygon || b instanceof L.Rectangle)
3162
+ if (m instanceof L.Polygon || m instanceof L.Rectangle)
3142
3163
  try {
3143
- const $ = b.getLatLngs(), F = Array.isArray($[0]) ? $[0] : $, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(F) : 0;
3144
- return N ? N / 1e6 : 0;
3164
+ const y = m.getLatLngs(), E = Array.isArray(y[0]) ? y[0] : y, G = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(E) : 0;
3165
+ return G ? G / 1e6 : 0;
3145
3166
  } catch {
3146
3167
  return null;
3147
3168
  }
3148
3169
  return null;
3149
3170
  }
3150
- function m(b) {
3151
- return b instanceof L.Circle ? b.getLatLng() : b.getBounds ? b.getBounds().getCenter() : b.getLatLng ? b.getLatLng() : a.getCenter();
3171
+ function M(m) {
3172
+ return m instanceof L.Circle ? m.getLatLng() : m.getBounds ? m.getBounds().getCenter() : m.getLatLng ? m.getLatLng() : a.getCenter();
3152
3173
  }
3153
- function V() {
3154
- const b = s.getLayers();
3155
- if (!b.length) {
3174
+ function H() {
3175
+ const m = r.getLayers();
3176
+ if (!m.length) {
3156
3177
  v.value = null, g.value = 0;
3157
3178
  return;
3158
3179
  }
3159
- const $ = b[b.length - 1], F = J($), N = m($), ee = C($);
3180
+ const y = m[m.length - 1], E = Z(y), G = M(y), oe = P(y);
3160
3181
  v.value = {
3161
- type: F,
3162
- center: N,
3163
- areaKm2: ee,
3164
- layer: $
3165
- }, g.value = b.length;
3182
+ type: E,
3183
+ center: G,
3184
+ areaKm2: oe,
3185
+ layer: y
3186
+ }, g.value = m.length;
3166
3187
  }
3167
- function z() {
3168
- const b = v.value?.layer;
3169
- 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)));
3188
+ function Y() {
3189
+ const m = v.value?.layer;
3190
+ m && (m instanceof L.Circle && m.getBounds ? a.fitBounds(m.getBounds(), { padding: [30, 30] }) : m.getBounds ? a.fitBounds(m.getBounds(), { padding: [30, 30] }) : m.getLatLng && a.setView(m.getLatLng(), Math.max(c.value, 14)));
3170
3191
  }
3171
- function W() {
3172
- const b = v.value?.layer;
3173
- b && (s.removeLayer(b), P(), V());
3192
+ function we() {
3193
+ const m = v.value?.layer;
3194
+ m && (r.removeLayer(m), N(), H());
3174
3195
  }
3175
- ne(async () => {
3176
- await T(), L.drawLocal = zr, 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), D.value = "topo100", s = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (F) => {
3177
- const { layer: N } = F;
3178
- s.clearLayers(), s.addLayer(N), P(), V(), _(), h.value = "";
3196
+ ue(async () => {
3197
+ await T(), L.drawLocal = Os, a = L.map(s.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(a), z = L.tileLayer(C.topo100.url, { maxZoom: 19, minZoom: 6 }).addTo(a), U.value = "topo100", r = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (E) => {
3198
+ const { layer: G } = E;
3199
+ r.clearLayers(), r.addLayer(G), N(), H(), _(), h.value = "";
3179
3200
  }), a.on(L.Draw.Event.EDITED, () => {
3180
- P(), V(), _();
3201
+ N(), H(), _();
3181
3202
  }), a.on(L.Draw.Event.DELETED, () => {
3182
- P(), V(), _();
3203
+ N(), H(), _();
3183
3204
  });
3184
- let b = !1;
3185
- a.on("mousemove", (F) => {
3186
- b || (a.invalidateSize(), b = !0), f.value = F.latlng;
3205
+ let m = !1;
3206
+ a.on("mousemove", (E) => {
3207
+ m || (a.invalidateSize(), m = !0), f.value = E.latlng;
3187
3208
  }), a.on("zoomend", () => {
3188
3209
  c.value = a.getZoom();
3189
3210
  });
3190
- const $ = Er(t.modelValue);
3191
- if ($) {
3192
- const F = [];
3193
- L.geoJSON($).eachLayer((N) => F.push(N)), F.length && s.addLayer(F[0]), P(), V(), _();
3211
+ const y = Es(t.modelValue);
3212
+ if (y) {
3213
+ const E = [];
3214
+ L.geoJSON(y).eachLayer((G) => E.push(G)), E.length && r.addLayer(E[0]), N(), H(), _();
3194
3215
  }
3195
3216
  });
3196
- function te(b) {
3217
+ function ce(m) {
3197
3218
  if (a) {
3198
- switch (d && d.disable(), b) {
3219
+ switch (d && d.disable(), m) {
3199
3220
  case "marker":
3200
3221
  d = new L.Draw.Marker(a);
3201
3222
  break;
@@ -3212,179 +3233,179 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3212
3233
  d = new L.Draw.Rectangle(a);
3213
3234
  break;
3214
3235
  }
3215
- d && (d.enable(), h.value = b);
3236
+ d && (d.enable(), h.value = m);
3216
3237
  }
3217
3238
  }
3218
- function xe() {
3219
- const b = s.toGeoJSON(), $ = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), F = URL.createObjectURL($), N = document.createElement("a");
3220
- N.href = F, N.download = "data.geojson", N.click(), URL.revokeObjectURL(F);
3239
+ function Ce() {
3240
+ const m = r.toGeoJSON(), y = new Blob([JSON.stringify(m, null, 2)], { type: "application/json" }), E = URL.createObjectURL(y), G = document.createElement("a");
3241
+ G.href = E, G.download = "data.geojson", G.click(), URL.revokeObjectURL(E);
3221
3242
  }
3222
- function ke(b) {
3223
- const $ = b.target.files?.[0];
3224
- if (!$) return;
3225
- const F = new FileReader();
3226
- F.onload = () => {
3227
- if (typeof F.result == "string")
3243
+ function I(m) {
3244
+ const y = m.target.files?.[0];
3245
+ if (!y) return;
3246
+ const E = new FileReader();
3247
+ E.onload = () => {
3248
+ if (typeof E.result == "string")
3228
3249
  try {
3229
- const N = JSON.parse(F.result);
3230
- s.clearLayers(), N && L.geoJSON({ type: "Feature", geometry: N }).eachLayer((ee) => {
3231
- s.addLayer(ee);
3232
- }), P(), V(), _();
3250
+ const G = JSON.parse(E.result);
3251
+ r.clearLayers(), G && L.geoJSON({ type: "Feature", geometry: G }).eachLayer((oe) => {
3252
+ r.addLayer(oe);
3253
+ }), N(), H(), _();
3233
3254
  } finally {
3234
- b.target.value = "";
3255
+ m.target.value = "";
3235
3256
  }
3236
- }, F.readAsText($);
3257
+ }, E.readAsText(y);
3237
3258
  }
3238
- function ue(b) {
3239
- a && (I && a.removeLayer(I), I = L.tileLayer(M[b].url, { maxZoom: 19, minZoom: 6 }).addTo(a), D.value = b);
3259
+ function $(m) {
3260
+ a && (z && a.removeLayer(z), z = L.tileLayer(C[m].url, { maxZoom: 19, minZoom: 6 }).addTo(a), U.value = m);
3240
3261
  }
3241
- function Ae(b) {
3242
- const $ = L.latLng(b[0], b[1]);
3243
- a.setView($, 13);
3262
+ function S(m) {
3263
+ const y = L.latLng(m[0], m[1]);
3264
+ a.setView(y, 13);
3244
3265
  }
3245
- se(
3266
+ ie(
3246
3267
  () => t.modelValue,
3247
- (b) => {
3248
- s.clearLayers(), b && L.geoJSON({ type: "Feature", geometry: b }).eachLayer(($) => {
3249
- s.addLayer($);
3250
- }), g.value = s.getLayers().length, V(), _();
3268
+ (m) => {
3269
+ r.clearLayers(), m && L.geoJSON({ type: "Feature", geometry: m }).eachLayer((y) => {
3270
+ r.addLayer(y);
3271
+ }), g.value = r.getLayers().length, H(), _();
3251
3272
  }
3252
3273
  );
3253
- const _e = k(!1);
3254
- return (b, $) => (i(), u("div", {
3255
- class: S(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: _e.value }])
3274
+ const q = x(!1);
3275
+ return (m, y) => (i(), u("div", {
3276
+ class: V(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: q.value }])
3256
3277
  }, [
3257
3278
  l("div", {
3258
3279
  ref_key: "mapContainer",
3259
- ref: r,
3280
+ ref: s,
3260
3281
  class: "w-full h-full"
3261
3282
  }, null, 512),
3262
- l("div", Ls, [
3263
- j(ks, { onGoToCoordinates: Ae }),
3264
- l("div", Ss, [
3265
- l("div", Bs, [
3283
+ l("div", Sr, [
3284
+ B(_r, { onGoToCoordinates: S }),
3285
+ l("div", Br, [
3286
+ l("div", jr, [
3266
3287
  l("button", {
3267
3288
  type: "button",
3268
3289
  class: "vs-btn-row",
3269
- onClick: x
3290
+ onClick: b
3270
3291
  }, "Import"),
3271
3292
  l("button", {
3272
3293
  type: "button",
3273
3294
  class: "vs-btn-row",
3274
- onClick: xe,
3295
+ onClick: Ce,
3275
3296
  disabled: g.value === 0
3276
- }, "Export ", 8, js)
3297
+ }, "Export ", 8, Ir)
3277
3298
  ]),
3278
3299
  l("input", {
3279
3300
  ref_key: "importRef",
3280
3301
  ref: p,
3281
3302
  type: "file",
3282
- onChange: ke,
3303
+ onChange: I,
3283
3304
  accept: ".json,.geojson",
3284
3305
  class: "hidden"
3285
3306
  }, null, 544)
3286
3307
  ])
3287
3308
  ]),
3288
- l("div", Is, [
3289
- l("div", As, [
3309
+ l("div", zr, [
3310
+ l("div", Ar, [
3290
3311
  l("button", {
3291
- class: S(["vs-btn", { "vs-active": h.value === "marker" }]),
3312
+ class: V(["vs-btn", { "vs-active": h.value === "marker" }]),
3292
3313
  "aria-pressed": h.value === "marker",
3293
3314
  title: "Point (P)",
3294
3315
  "aria-label": "Draw point",
3295
- onClick: $[0] || ($[0] = (F) => te("marker"))
3316
+ onClick: y[0] || (y[0] = (E) => ce("marker"))
3296
3317
  }, [
3297
- j(Ur)
3298
- ], 10, zs),
3318
+ B(Ts)
3319
+ ], 10, Or),
3299
3320
  l("button", {
3300
- class: S(["vs-btn", { "vs-active": h.value === "polyline" }]),
3321
+ class: V(["vs-btn", { "vs-active": h.value === "polyline" }]),
3301
3322
  "aria-pressed": h.value === "polyline",
3302
3323
  title: "Line (L)",
3303
3324
  "aria-label": "Draw polyline",
3304
- onClick: $[1] || ($[1] = (F) => te("polyline"))
3325
+ onClick: y[1] || (y[1] = (E) => ce("polyline"))
3305
3326
  }, [
3306
- j(Nr)
3307
- ], 10, Es),
3327
+ B(Hs)
3328
+ ], 10, Er),
3308
3329
  l("button", {
3309
- class: S(["vs-btn", { "vs-active": h.value === "polygon" }]),
3330
+ class: V(["vs-btn", { "vs-active": h.value === "polygon" }]),
3310
3331
  "aria-pressed": h.value === "polygon",
3311
3332
  title: "Polygon (G)",
3312
3333
  "aria-label": "Draw polygon",
3313
- onClick: $[2] || ($[2] = (F) => te("polygon"))
3334
+ onClick: y[2] || (y[2] = (E) => ce("polygon"))
3314
3335
  }, [
3315
- j(Jr)
3316
- ], 10, Fs),
3336
+ B(Ks)
3337
+ ], 10, Fr),
3317
3338
  l("button", {
3318
- class: S(["vs-btn", { "vs-active": h.value === "rectangle" }]),
3339
+ class: V(["vs-btn", { "vs-active": h.value === "rectangle" }]),
3319
3340
  "aria-pressed": h.value === "rectangle",
3320
3341
  title: "Rectangle (R)",
3321
3342
  "aria-label": "Draw rectangle",
3322
- onClick: $[3] || ($[3] = (F) => te("rectangle"))
3343
+ onClick: y[3] || (y[3] = (E) => ce("rectangle"))
3323
3344
  }, [
3324
- j(Qr)
3325
- ], 10, Os),
3345
+ B(Xs)
3346
+ ], 10, Dr),
3326
3347
  l("button", {
3327
3348
  class: "vs-btn mt-5",
3328
- onClick: $[4] || ($[4] = (F) => _e.value = !_e.value),
3349
+ onClick: y[4] || (y[4] = (E) => q.value = !q.value),
3329
3350
  title: "Full Screen",
3330
3351
  "aria-label": "Full Screen"
3331
3352
  }, [
3332
- j(ts, { style: { width: "12px", height: "12px" } })
3353
+ B(lr, { style: { width: "12px", height: "12px" } })
3333
3354
  ])
3334
3355
  ])
3335
3356
  ]),
3336
3357
  l("div", {
3337
- class: S(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
3358
+ class: V(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
3338
3359
  }, [
3339
- j(Ms, {
3340
- basemaps: M,
3360
+ B(Lr, {
3361
+ basemaps: C,
3341
3362
  "default-layer": "topo100",
3342
- onOnLayerChange: ue
3363
+ onOnLayerChange: $
3343
3364
  })
3344
3365
  ], 2),
3345
- l("div", Ds, [
3346
- v.value ? (i(), u("div", Us, [
3347
- l("div", Ts, [
3348
- $[7] || ($[7] = oe(" Тип: ", -1)),
3349
- l("span", Rs, E(v.value.type), 1)
3366
+ l("div", Ur, [
3367
+ v.value ? (i(), u("div", Tr, [
3368
+ l("div", Rr, [
3369
+ y[7] || (y[7] = se(" Тип: ")),
3370
+ l("span", Pr, F(v.value.type), 1)
3350
3371
  ]),
3351
- l("div", Ps, [
3352
- l("div", Ns, [
3353
- $[8] || ($[8] = oe(" Центр: ", -1)),
3354
- l("b", null, E(v.value.center.lat.toFixed(5)) + ", " + E(v.value.center.lng.toFixed(5)), 1)
3372
+ l("div", Nr, [
3373
+ l("div", Hr, [
3374
+ y[8] || (y[8] = se(" Центр: ")),
3375
+ l("b", null, F(v.value.center.lat.toFixed(5)) + ", " + F(v.value.center.lng.toFixed(5)), 1)
3355
3376
  ]),
3356
- v.value.areaKm2 !== null ? (i(), u("div", Hs, [
3357
- $[9] || ($[9] = oe(" Площа: ", -1)),
3358
- l("b", null, E(v.value.areaKm2.toFixed(1)) + "км²", 1)
3359
- ])) : (i(), u("div", qs, $[10] || ($[10] = [
3360
- oe(" Площа: ", -1),
3377
+ v.value.areaKm2 !== null ? (i(), u("div", qr, [
3378
+ y[9] || (y[9] = se(" Площа: ")),
3379
+ l("b", null, F(v.value.areaKm2.toFixed(1)) + "км²", 1)
3380
+ ])) : (i(), u("div", Gr, y[10] || (y[10] = [
3381
+ se(" Площа: "),
3361
3382
  l("b", null, "—", -1)
3362
3383
  ]))),
3363
3384
  l("button", {
3364
3385
  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",
3365
3386
  title: "Наблизити",
3366
- onClick: $[5] || ($[5] = (F) => z())
3367
- }, $[11] || ($[11] = [
3368
- 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-55d330eb><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-55d330eb></path><path d="M7 10l6 0" data-v-55d330eb></path><path d="M10 7l0 6" data-v-55d330eb></path><path d="M21 21l-6 -6" data-v-55d330eb></path></svg>', 1)
3387
+ onClick: y[5] || (y[5] = (E) => Y())
3388
+ }, y[11] || (y[11] = [
3389
+ 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-ac23d238><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-ac23d238></path><path d="M7 10l6 0" data-v-ac23d238></path><path d="M10 7l0 6" data-v-ac23d238></path><path d="M21 21l-6 -6" data-v-ac23d238></path></svg>', 1)
3369
3390
  ])),
3370
3391
  l("button", {
3371
3392
  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",
3372
3393
  title: "Видалити",
3373
- onClick: $[6] || ($[6] = (F) => W())
3394
+ onClick: y[6] || (y[6] = (E) => we())
3374
3395
  }, [
3375
- j(Ie, { class: "w-3 h-3" })
3396
+ B(ze, { class: "w-3 h-3" })
3376
3397
  ])
3377
3398
  ])
3378
- ])) : B("", !0)
3399
+ ])) : j("", !0)
3379
3400
  ])
3380
3401
  ], 2));
3381
3402
  }
3382
- }), Js = /* @__PURE__ */ R(Gs, [["__scopeId", "data-v-55d330eb"]]), Ks = ["data-focus"], Zs = { class: "flex items-center" }, Ws = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Qs = ["onClick", "aria-label"], Xs = {
3403
+ }), Kr = /* @__PURE__ */ R(Jr, [["__scopeId", "data-v-ac23d238"]]), Zr = ["data-focus"], Wr = { class: "flex items-center" }, Qr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Xr = ["onClick", "aria-label"], Yr = {
3383
3404
  key: 0,
3384
3405
  class: "absolute text-gray-500 truncate pl-2"
3385
- }, Ys = { class: "flex-1 min-w-[2px]" }, en = ["placeholder"], tn = { class: "flex items-center shrink-0" }, ln = ["disabled"], on = /* @__PURE__ */ A({
3406
+ }, en = { class: "flex-1 min-w-[2px]" }, tn = ["placeholder"], ln = { class: "flex items-center shrink-0" }, on = ["disabled"], an = /* @__PURE__ */ O({
3386
3407
  __name: "vs-input-tag",
3387
- props: /* @__PURE__ */ K({
3408
+ props: /* @__PURE__ */ Q({
3388
3409
  unique: { type: Boolean, default: !0 },
3389
3410
  style: { default: () => ({}) },
3390
3411
  customClass: { default: "" },
@@ -3397,71 +3418,71 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3397
3418
  modelValue: { default: [] },
3398
3419
  modelModifiers: {}
3399
3420
  }),
3400
- emits: /* @__PURE__ */ K(["update:modelValue"], ["update:modelValue"]),
3421
+ emits: /* @__PURE__ */ Q(["update:modelValue"], ["update:modelValue"]),
3401
3422
  setup(o, { emit: e }) {
3402
3423
  const t = o, n = e;
3403
- ge(t.style);
3404
- const r = k(null), a = k(null), s = k(null), d = k(!1), p = k(""), f = Z(o, "modelValue"), c = O(() => t.placeholder || "Add tag…"), g = O(() => f.value?.length === 0 && p.value === ""), v = O(() => !t.disabled && f.value?.length > 0), M = O(() => t.disabled), I = async () => {
3405
- M.value || await Ce(() => s.value?.focus());
3406
- }, D = (C) => {
3407
- const m = C.trim();
3408
- m !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [m] : t.unique ? f.value.includes(m) || (f.value = [...f.value, m]) : f.value = [...f.value, m], p.value = "");
3424
+ be(t.style);
3425
+ const s = x(null), a = x(null), r = x(null), d = x(!1), p = x(""), f = X(o, "modelValue"), c = D(() => t.placeholder || "Add tag…"), g = D(() => f.value?.length === 0 && p.value === ""), v = D(() => !t.disabled && f.value?.length > 0), C = D(() => t.disabled), z = async () => {
3426
+ C.value || await Me(() => r.value?.focus());
3427
+ }, U = (P) => {
3428
+ const M = P.trim();
3429
+ M !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [M] : t.unique ? f.value.includes(M) || (f.value = [...f.value, M]) : f.value = [...f.value, M], p.value = "");
3409
3430
  }, T = () => {
3410
- const C = p.value;
3411
- C.trim() !== "" && D(C), p.value = "";
3412
- }, P = (C) => {
3413
- const m = f.value.slice();
3414
- m.splice(C, 1), n("update:modelValue", m);
3431
+ const P = p.value;
3432
+ P.trim() !== "" && U(P), p.value = "";
3433
+ }, N = (P) => {
3434
+ const M = f.value.slice();
3435
+ M.splice(P, 1), n("update:modelValue", M);
3415
3436
  }, _ = () => {
3416
3437
  n("update:modelValue", []);
3417
- }, x = () => {
3418
- M.value || (d.value = !0);
3438
+ }, b = () => {
3439
+ C.value || (d.value = !0);
3419
3440
  }, h = () => {
3420
3441
  d.value = !1;
3421
- }, J = (C) => {
3422
- const { key: m } = C;
3423
- m === "Enter" ? (C.preventDefault(), T()) : m === "Backspace" && p.value === "" && f.value.length > 0 && P(f.value.length - 1);
3442
+ }, Z = (P) => {
3443
+ const { key: M } = P;
3444
+ M === "Enter" ? (P.preventDefault(), T()) : M === "Backspace" && p.value === "" && f.value.length > 0 && N(f.value.length - 1);
3424
3445
  };
3425
- return (C, m) => (i(), u("div", {
3446
+ return (P, M) => (i(), u("div", {
3426
3447
  class: "flex gap-1 w-full",
3427
3448
  ref_key: "root",
3428
- ref: r,
3429
- onClick: m[1] || (m[1] = re(() => {
3449
+ ref: s,
3450
+ onClick: M[1] || (M[1] = ne(() => {
3430
3451
  }, ["stop"]))
3431
3452
  }, [
3432
3453
  l("div", {
3433
- class: S(["relative w-full font-sans", t.customClass]),
3454
+ class: V(["relative w-full font-sans", t.customClass]),
3434
3455
  role: "group",
3435
3456
  "aria-label": "Tag input"
3436
3457
  }, [
3437
3458
  l("div", {
3438
- class: S([
3459
+ class: V([
3439
3460
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
3440
3461
  "border-gray-300 hover:border-gray-400",
3441
3462
  d.value ? "border-blue-500 ring-1 ring-blue-500" : "",
3442
- M.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
3463
+ C.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
3443
3464
  ]),
3444
3465
  "data-focus": d.value ? "true" : "false",
3445
- onClick: I
3466
+ onClick: z
3446
3467
  }, [
3447
3468
  l("div", {
3448
3469
  class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
3449
3470
  ref_key: "chipsRef",
3450
3471
  ref: a
3451
3472
  }, [
3452
- (i(!0), u(Q, null, Y(f.value, (V, z) => (i(), u("div", {
3453
- key: z,
3473
+ (i(!0), u(ee, null, le(f.value, (H, Y) => (i(), u("div", {
3474
+ key: Y,
3454
3475
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
3455
3476
  }, [
3456
- l("div", Zs, [
3457
- l("div", Ws, E(V), 1)
3477
+ l("div", Wr, [
3478
+ l("div", Qr, F(H), 1)
3458
3479
  ]),
3459
3480
  l("div", {
3460
3481
  role: "button",
3461
3482
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
3462
- onClick: re((W) => P(z), ["stop"]),
3463
- "aria-label": `Remove ${V}`
3464
- }, m[2] || (m[2] = [
3483
+ onClick: ne((we) => N(Y), ["stop"]),
3484
+ "aria-label": `Remove ${H}`
3485
+ }, M[2] || (M[2] = [
3465
3486
  l("svg", {
3466
3487
  height: "14",
3467
3488
  width: "14",
@@ -3472,14 +3493,14 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3472
3493
  }, [
3473
3494
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3474
3495
  ], -1)
3475
- ]), 8, Qs)
3496
+ ]), 8, Xr)
3476
3497
  ]))), 128)),
3477
- g.value ? (i(), u("div", Xs, E(c.value), 1)) : B("", !0),
3478
- l("div", Ys, [
3479
- M.value ? B("", !0) : G((i(), u("input", {
3498
+ g.value ? (i(), u("div", Yr, F(c.value), 1)) : j("", !0),
3499
+ l("div", en, [
3500
+ C.value ? j("", !0) : K((i(), u("input", {
3480
3501
  key: 0,
3481
3502
  ref_key: "inputRef",
3482
- ref: s,
3503
+ ref: r,
3483
3504
  class: "pl-2 w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
3484
3505
  autocapitalize: "none",
3485
3506
  autocomplete: "off",
@@ -3488,25 +3509,25 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3488
3509
  type: "text",
3489
3510
  tabindex: "0",
3490
3511
  "aria-label": "Add tag",
3491
- "onUpdate:modelValue": m[0] || (m[0] = (V) => p.value = V),
3492
- onFocus: x,
3512
+ "onUpdate:modelValue": M[0] || (M[0] = (H) => p.value = H),
3513
+ onFocus: b,
3493
3514
  onBlur: h,
3494
- onKeydown: J,
3515
+ onKeydown: Z,
3495
3516
  placeholder: f.value && f.value.length ? "" : void 0
3496
- }, null, 40, en)), [
3497
- [ie, p.value]
3517
+ }, null, 40, tn)), [
3518
+ [de, p.value]
3498
3519
  ])
3499
3520
  ])
3500
3521
  ], 512),
3501
- l("div", tn, [
3522
+ l("div", ln, [
3502
3523
  v.value ? (i(), u("button", {
3503
3524
  key: 0,
3504
3525
  type: "button",
3505
3526
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
3506
3527
  "aria-label": "Clear all tags",
3507
- disabled: M.value,
3508
- onClick: re(_, ["stop"])
3509
- }, m[3] || (m[3] = [
3528
+ disabled: C.value,
3529
+ onClick: ne(_, ["stop"])
3530
+ }, M[3] || (M[3] = [
3510
3531
  l("svg", {
3511
3532
  height: "20",
3512
3533
  width: "20",
@@ -3515,34 +3536,34 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3515
3536
  }, [
3516
3537
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3517
3538
  ], -1)
3518
- ]), 8, ln)) : B("", !0)
3539
+ ]), 8, on)) : j("", !0)
3519
3540
  ])
3520
- ], 10, Ks)
3541
+ ], 10, Zr)
3521
3542
  ], 2)
3522
3543
  ], 512));
3523
3544
  }
3524
- }), an = {
3525
- VsInputText: qe,
3526
- VsInputRadio: Je,
3527
- "vs-input-text": qe,
3528
- "vs-input-textarea": Aa,
3545
+ }), sn = {
3546
+ VsInputText: Ge,
3547
+ VsInputRadio: Ke,
3548
+ "vs-input-text": Ge,
3549
+ "vs-input-textarea": za,
3529
3550
  "vs-input-mask": nl,
3530
3551
  "vs-input-number": jt,
3531
- "vs-input-radio": Je,
3552
+ "vs-input-radio": Ke,
3532
3553
  "vs-input-select": ja,
3533
- "vs-input-switcher": lt,
3534
- "vs-input-static": Ge,
3554
+ "vs-input-switcher": ot,
3555
+ "vs-input-static": Je,
3535
3556
  "vs-input-container": ia,
3536
3557
  "vs-input-date": wl,
3537
3558
  "vs-input-checkbox": yl,
3538
- "vs-input-file": so,
3539
- "vs-input-html": Ge,
3559
+ "vs-input-file": ro,
3560
+ "vs-input-html": Je,
3540
3561
  "vs-input-email": dl,
3541
- "vs-input-datatable": Ar,
3542
- "vs-input-map": Js,
3543
- "vs-input-file-list": Oo,
3544
- "vs-input-tag": on
3545
- }, rn = /* @__PURE__ */ A({
3562
+ "vs-input-datatable": As,
3563
+ "vs-input-map": Kr,
3564
+ "vs-input-file-list": Fo,
3565
+ "vs-input-tag": an
3566
+ }, rn = /* @__PURE__ */ O({
3546
3567
  __name: "behavior",
3547
3568
  props: {
3548
3569
  api: {},
@@ -3556,27 +3577,27 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3556
3577
  async function n() {
3557
3578
  try {
3558
3579
  if (!e.api) return;
3559
- const r = e.api.replace("{{value}}", e.value), a = await fetch(r);
3580
+ const s = e.api.replace("{{value}}", e.value), a = await fetch(s);
3560
3581
  if (!a.ok) {
3561
- ve({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3582
+ pe({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3562
3583
  return;
3563
3584
  }
3564
- const s = await a.json();
3585
+ const r = await a.json();
3565
3586
  if (!e.set || !t) return;
3566
3587
  for (const [d, p] of Object.entries(e.set))
3567
- t.value[d] = s.result[p];
3568
- } catch (r) {
3569
- console.error(e.error, r);
3588
+ t.value[d] = r.result[p];
3589
+ } catch (s) {
3590
+ console.error(e.error, s);
3570
3591
  }
3571
3592
  }
3572
- return (r, a) => (i(), u("button", {
3593
+ return (s, a) => (i(), u("button", {
3573
3594
  onClick: n,
3574
3595
  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"
3575
- }, E(r.button), 1));
3596
+ }, F(s.button), 1));
3576
3597
  }
3577
- }), sn = { class: "flex w-full" }, rt = /* @__PURE__ */ A({
3598
+ }), nn = { class: "flex w-full" }, rt = /* @__PURE__ */ O({
3578
3599
  __name: "vs-compact-form-layout",
3579
- props: /* @__PURE__ */ K({
3600
+ props: /* @__PURE__ */ Q({
3580
3601
  item: { default: {} },
3581
3602
  layout: { default: "default" },
3582
3603
  style: { default: {} },
@@ -3588,55 +3609,55 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3588
3609
  }),
3589
3610
  emits: ["update:modelValue"],
3590
3611
  setup(o) {
3591
- const e = o, t = Z(o, "modelValue"), n = O(() => Lt[`${e.layout}`]), r = O(() => an?.[`vs-input-${e.item.type}`]), a = O(() => {
3592
- const d = q(r);
3612
+ const e = o, t = X(o, "modelValue"), n = D(() => Lt[`${e.layout}`]), s = D(() => sn?.[`vs-input-${e.item.type}`]), a = D(() => {
3613
+ const d = J(s);
3593
3614
  if (!d) return /* @__PURE__ */ new Set();
3594
3615
  const p = d.props ?? d.__vccOpts?.props;
3595
3616
  if (!p) return /* @__PURE__ */ new Set();
3596
3617
  const f = Array.isArray(p) ? p : Object.keys(p);
3597
3618
  return new Set(f);
3598
- }), s = O(() => {
3619
+ }), r = D(() => {
3599
3620
  const d = e.item ?? {}, p = a.value;
3600
3621
  return p.size ? Object.fromEntries(Object.entries(d).filter(([f]) => p.has(f))) : {};
3601
3622
  });
3602
- return (d, p) => (i(), X(we(n.value), {
3623
+ return (d, p) => (i(), te(_e(n.value), {
3603
3624
  ua: e.item.ua,
3604
3625
  error: e.error || "",
3605
3626
  item: d.item,
3606
3627
  label: e.item.label
3607
3628
  }, {
3608
- default: Le(() => [
3609
- l("div", sn, [
3610
- (i(), X(we(r.value), Ve(s.value, {
3629
+ default: $e(() => [
3630
+ l("div", nn, [
3631
+ (i(), te(_e(s.value), Le(r.value, {
3611
3632
  modelValue: t.value,
3612
3633
  "onUpdate:modelValue": p[0] || (p[0] = (f) => t.value = f)
3613
3634
  }), null, 16, ["modelValue"])),
3614
- d.item.behavior ? (i(), X(rn, Ve({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : B("", !0)
3635
+ d.item.behavior ? (i(), te(rn, Le({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : j("", !0)
3615
3636
  ])
3616
3637
  ]),
3617
3638
  _: 1
3618
3639
  }, 8, ["ua", "error", "item", "label"]));
3619
3640
  }
3620
- }), st = {
3641
+ }), nt = {
3621
3642
  required: "Це поле є обов’язковим",
3622
3643
  email: "Неправильний email"
3623
- }, nn = (o) => o ? !1 : st.required, un = (o) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) && o ? st.email : !1, dn = (o, e) => {
3644
+ }, un = (o) => o ? !1 : nt.required, dn = (o) => !o && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) ? nt.email : !1, cn = (o, e) => {
3624
3645
  const t = e.pattern ?? e.regexp;
3625
3646
  return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
3626
- }, cn = (o, e) => !1, pn = (o, e) => {
3647
+ }, pn = (o, e) => !1, fn = (o, e) => {
3627
3648
  switch (typeof e == "string" ? e : e.type) {
3628
3649
  case "required":
3629
- return nn(o);
3630
- case "email":
3631
3650
  return un(o);
3651
+ case "email":
3652
+ return dn(o);
3632
3653
  case "regexp":
3633
- return dn(o, e);
3654
+ return cn(o, e);
3634
3655
  case "custom":
3635
- return cn();
3656
+ return pn();
3636
3657
  default:
3637
3658
  return !1;
3638
3659
  }
3639
- }, fn = {
3660
+ }, vn = {
3640
3661
  autocomplete: "select",
3641
3662
  combobox: "select",
3642
3663
  datepicker: "date",
@@ -3648,16 +3669,16 @@ const ts = /* @__PURE__ */ R(Xr, [["render", es]]), ls = { class: "form-geom__se
3648
3669
  file: "file"
3649
3670
  // mask: 'text',
3650
3671
  };
3651
- function Qe(o) {
3672
+ function Xe(o) {
3652
3673
  const e = o.toLowerCase();
3653
- return fn[e] || e;
3674
+ return vn[e] || e;
3654
3675
  }
3655
- function vn(o) {
3676
+ function mn(o) {
3656
3677
  if (Array.isArray(o)) {
3657
3678
  const t = [];
3658
3679
  return o.forEach((n) => {
3659
- const r = { ...n };
3660
- r.name = (n.name || n.id || n.key || "").toString(), r.type = Qe(n.type), r.label = n.label || n.ua, r.rules = n.rules || n.validators, n.data && (r.api = `/api/suggest/${n.data}`), t.push(r);
3680
+ const s = { ...n };
3681
+ s.name = (n.name || n.id || n.key || "").toString(), s.type = Xe(n.type), s.label = n.label || n.ua, s.rules = n.rules || n.validators, n.data && (s.api = `/api/suggest/${n.data}`), t.push(s);
3661
3682
  }), t;
3662
3683
  }
3663
3684
  const e = [];
@@ -3665,46 +3686,46 @@ function vn(o) {
3665
3686
  const n = {
3666
3687
  name: t[0],
3667
3688
  ...t[1],
3668
- type: Qe(t[1].type),
3689
+ type: Xe(t[1].type),
3669
3690
  label: t[1].label || t[1].ua,
3670
3691
  rules: t[1].rules || t[1].validators
3671
3692
  };
3672
3693
  t[1].type.includes("list") && (n.multiple = !0), t[1].data && (n.api = `/api/suggest/${t[1].data}`), e.push(n);
3673
3694
  }), e;
3674
3695
  }
3675
- function mn(o, e) {
3676
- const t = vn(e), n = k({});
3677
- function r(p) {
3696
+ function hn(o, e) {
3697
+ const t = mn(e), n = x({});
3698
+ function s(p) {
3678
3699
  const f = p?.conditions;
3679
3700
  if (!f) return !0;
3680
3701
  const c = Array.isArray(f) ? f[0] : f, g = o?.value?.[c];
3681
- return at(g, f);
3702
+ return st(g, f);
3682
3703
  }
3683
3704
  const a = (p = t, f = !0) => (p.forEach((c) => {
3684
3705
  if (c.rules) {
3685
- if (!r(c)) {
3706
+ if (!s(c)) {
3686
3707
  delete n.value[c.name];
3687
3708
  return;
3688
3709
  }
3689
3710
  c.rules.forEach((g) => {
3690
- const v = pn(o.value[c.name], g);
3711
+ const v = fn(o.value[c.name], g);
3691
3712
  v ? n.value[c.name] = v : delete n.value[c.name];
3692
3713
  });
3693
3714
  }
3694
3715
  c.schema && a(c.schema, !1);
3695
- }), f && Object.values(n.value).some(Boolean) ? n.value : null), s = O(() => t?.filter((p) => r(p)));
3716
+ }), f && Object.values(n.value).some(Boolean) ? n.value : null), r = D(() => t?.filter((p) => s(p)));
3696
3717
  return {
3697
3718
  errors: n,
3698
3719
  validate: a,
3699
3720
  reset: () => {
3700
3721
  o.value = {}, n.value = {};
3701
3722
  },
3702
- visibleSchema: s
3723
+ visibleSchema: r
3703
3724
  };
3704
3725
  }
3705
- const Ee = /* @__PURE__ */ A({
3726
+ const Ie = /* @__PURE__ */ O({
3706
3727
  __name: "vs-compact-form",
3707
- props: /* @__PURE__ */ K({
3728
+ props: /* @__PURE__ */ Q({
3708
3729
  schema: { default: () => [] },
3709
3730
  style: { default: () => ({}) },
3710
3731
  modelValue: {},
@@ -3716,74 +3737,74 @@ const Ee = /* @__PURE__ */ A({
3716
3737
  values: { default: () => ({}) },
3717
3738
  valuesModifiers: {}
3718
3739
  }),
3719
- emits: /* @__PURE__ */ K(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
3740
+ emits: /* @__PURE__ */ Q(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
3720
3741
  setup(o, { expose: e, emit: t }) {
3721
- const n = t, r = o, a = Z(o, "form"), s = Z(o, "values"), {
3742
+ const n = t, s = o, a = X(o, "form"), r = X(o, "values"), {
3722
3743
  errors: d,
3723
3744
  validate: p,
3724
3745
  reset: f,
3725
3746
  visibleSchema: c
3726
- } = mn(s, r.schema), g = () => {
3727
- n("update:modelValue", s.value), p(), n("handle-submit", s.value);
3747
+ } = hn(r, s.schema), g = () => {
3748
+ n("update:modelValue", r.value), p(), n("handle-submit", r.value);
3728
3749
  };
3729
3750
  e({
3730
3751
  validate: p,
3731
3752
  reset: f,
3732
3753
  errors: d
3733
- }), ne(() => {
3734
- 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;
3754
+ }), ue(() => {
3755
+ s.modelValue && (r.value = s.modelValue), a.value.value = r.value, a.value.errors = d.value, a.value.reset = f, a.value.validate = p, a.value.formId = s.formId;
3735
3756
  });
3736
- function v(M, I) {
3737
- if (M === I) return !0;
3738
- if (typeof M != "object" || typeof I != "object" || !M || !I) return !1;
3739
- const D = Object.keys(M), T = Object.keys(I);
3740
- return D.length !== T.length ? !1 : D.every((P) => M[P] === I[P]);
3757
+ function v(C, z) {
3758
+ if (C === z) return !0;
3759
+ if (typeof C != "object" || typeof z != "object" || !C || !z) return !1;
3760
+ const U = Object.keys(C), T = Object.keys(z);
3761
+ return U.length !== T.length ? !1 : U.every((N) => C[N] === z[N]);
3741
3762
  }
3742
- return He("form", a), He("values", s), (M, I) => (i(), u("form", {
3743
- onSubmit: re(g, ["prevent"]),
3744
- class: S(["grid grid-cols-12", M.layout === "default" ? "gap-6" : "gap-4"])
3763
+ return He("form", a), He("values", r), (C, z) => (i(), u("form", {
3764
+ onSubmit: ne(g, ["prevent"]),
3765
+ class: V(["grid grid-cols-12", C.layout === "default" ? "gap-6" : "gap-4"])
3745
3766
  }, [
3746
- (i(!0), u(Q, null, Y(q(c), (D) => (i(), X(rt, {
3747
- key: D.name,
3748
- class: S(M.layout === "horizontal" ? "col-span-12" : `col-span-${D.col || 12} `),
3749
- style: me(M.style),
3750
- item: D,
3751
- layout: M.layout,
3752
- "model-value": s.value[D.name],
3767
+ (i(!0), u(ee, null, le(J(c), (U) => (i(), te(rt, {
3768
+ key: U.name,
3769
+ class: V(C.layout === "horizontal" ? "col-span-12" : `col-span-${U.col || 12} `),
3770
+ style: he(C.style),
3771
+ item: U,
3772
+ layout: C.layout,
3773
+ "model-value": r.value[U.name],
3753
3774
  "onUpdate:modelValue": (T) => {
3754
- const P = s.value[D.name];
3755
- v(P, T) || (s.value[D.name] = T);
3775
+ const N = r.value[U.name];
3776
+ v(N, T) || (r.value[U.name] = T);
3756
3777
  },
3757
- error: q(d)[D.name]
3778
+ error: J(d)[U.name]
3758
3779
  }, null, 8, ["class", "style", "item", "layout", "model-value", "onUpdate:modelValue", "error"]))), 128))
3759
3780
  ], 34));
3760
3781
  }
3761
3782
  });
3762
- Ee.install = function(e) {
3763
- e.component("VForm", Ee), Object.assign(e.config.globalProperties, {
3764
- $form: Me
3765
- }), e.provide("form", Me), window.v3plugin || (window.v3plugin = {});
3783
+ Ie.install = function(e) {
3784
+ e.component("VForm", Ie), Object.assign(e.config.globalProperties, {
3785
+ $form: Oe
3786
+ }), e.provide("form", Oe), window.v3plugin || (window.v3plugin = {});
3766
3787
  };
3767
3788
  export {
3768
3789
  ma as ModalEdit,
3769
- Ee as VForm,
3790
+ Ie as VForm,
3770
3791
  yl as VsInputCheckbox,
3771
3792
  ia as VsInputContainer,
3772
3793
  wl as VsInputDate,
3773
3794
  dl as VsInputEmail,
3774
- so as VsInputFile,
3775
- Oo as VsInputFileList,
3795
+ ro as VsInputFile,
3796
+ Fo as VsInputFileList,
3776
3797
  nl as VsInputMask,
3777
3798
  jt as VsInputNumber,
3778
- Je as VsInputRadio,
3799
+ Ke as VsInputRadio,
3779
3800
  ja as VsInputSelect,
3780
- Ge as VsInputStatic,
3781
- lt as VsInputSwitcher,
3782
- on as VsInputTag,
3783
- qe as VsInputText,
3784
- Aa as VsInputTextarea,
3785
- Ee as default,
3786
- an as inputs,
3787
- Ar as vsInputDatatable,
3788
- Js as vsInputMap
3801
+ Je as VsInputStatic,
3802
+ ot as VsInputSwitcher,
3803
+ an as VsInputTag,
3804
+ Ge as VsInputText,
3805
+ za as VsInputTextarea,
3806
+ Ie as default,
3807
+ sn as inputs,
3808
+ As as vsInputDatatable,
3809
+ Kr as vsInputMap
3789
3810
  };