@opengis/form 0.0.170 → 0.0.171

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { defineComponent as pe, ref as A, openBlock as i, createElementBlock as p, Fragment as Fe, createElementVNode as u, renderSlot as st, createVNode as G, unref as R, createBlock as ke, Teleport as Yt, normalizeStyle as Pe, toDisplayString as de, createCommentVNode as q, computed as y, inject as ot, mergeProps as Kt, createTextVNode as Ke, normalizeProps as cl, guardReactiveProps as fl, onMounted as at, onUnmounted as sn, normalizeClass as oe, useModel as Ue, withDirectives as Oe, vModelText as tt, mergeModels as ze, useAttrs as Gl, vModelCheckbox as Yl, resolveDynamicComponent as pt, withCtx as it, withModifiers as Te, onBeforeUnmount as Et, watch as he, vModelRadio as Xl, renderList as Ne, reactive as ml, getCurrentInstance as Un, resolveComponent as ct, createSlots as Zl, nextTick as et, watchEffect as pl, vShow as Tt, Transition as vl, isRef as jn, defineAsyncComponent as Ea, createStaticVNode as gl, useSlots as Pa, withKeys as Oa, toRef as Ba, provide as Mn } from "vue";
2
- import { Info as tn, Check as Jl, Mail as Ra, Phone as Na, ChevronRight as ja, ChevronLeft as za, ChevronDown as un, ChevronUp as Ua, X as kt, Clock3 as Ha, CalendarDays as qa, Table as Wa, FileCode as Ka, FileText as zn, FileArchive as Ga, Trash2 as ln, Eye as Ql, Download as yl, Plus as $t, Upload as ea, Search as Hn, GripVertical as rn, Pencil as Ya, Circle as Xa, MapPin as ta, Ruler as na, Maximize as Za, ZoomIn as Ja, LoaderCircle as la, Copy as Qa } from "lucide-vue-next";
3
- import { notify as De, VsModal as qn, modal as eo } from "@opengis/core";
1
+ import { defineComponent as pe, ref as D, openBlock as i, createElementBlock as p, Fragment as Fe, createElementVNode as u, renderSlot as st, createVNode as G, unref as R, createBlock as ke, Teleport as Yt, normalizeStyle as Pe, toDisplayString as de, createCommentVNode as q, computed as y, inject as ot, mergeProps as Kt, createTextVNode as Ke, normalizeProps as cl, guardReactiveProps as fl, onMounted as at, onUnmounted as sn, normalizeClass as oe, useModel as Ue, withDirectives as Oe, vModelText as tt, mergeModels as ze, useAttrs as Gl, vModelCheckbox as Yl, resolveDynamicComponent as pt, withCtx as it, withModifiers as Te, onBeforeUnmount as Et, watch as he, vModelRadio as Zl, renderList as Ne, reactive as ml, getCurrentInstance as Un, resolveComponent as ct, createSlots as Xl, nextTick as et, watchEffect as pl, vShow as Tt, Transition as vl, isRef as jn, defineAsyncComponent as Ea, createStaticVNode as gl, useSlots as Pa, withKeys as Oa, toRef as Ba, provide as Mn } from "vue";
2
+ import { Info as tn, Check as Jl, Mail as Ra, Phone as Na, ChevronRight as ja, ChevronLeft as za, ChevronDown as un, ChevronUp as Ua, X as kt, Clock3 as Ha, CalendarDays as qa, Table as Wa, FileCode as Ka, FileText as zn, FileArchive as Ga, Trash2 as ln, Eye as Ql, Download as yl, Plus as $t, Upload as ea, Search as Hn, GripVertical as rn, Pencil as Ya, Circle as Za, MapPin as ta, Ruler as na, Maximize as Xa, ZoomIn as Ja, LoaderCircle as la, Copy as Qa } from "lucide-vue-next";
3
+ import { notify as Ae, VsModal as qn, modal as eo } from "@opengis/core";
4
4
  const aa = /* @__PURE__ */ pe({
5
5
  __name: "vs-info-tooltip",
6
6
  props: {
7
7
  text: {}
8
8
  },
9
9
  setup(e) {
10
- const t = e, n = A(!1), a = A({ top: "0px", left: "0px" });
10
+ const t = e, n = D(!1), a = D({ top: "0px", left: "0px" });
11
11
  function l(o) {
12
12
  if (!t.text) return;
13
13
  const s = o.currentTarget.getBoundingClientRect();
@@ -213,7 +213,7 @@ const aa = /* @__PURE__ */ pe({
213
213
  columns: {}
214
214
  },
215
215
  setup(e) {
216
- const t = e, n = A("uk");
216
+ const t = e, n = D("uk");
217
217
  y(() => (t.item ?? {})?.[n.value] ?? t.ua ?? t.label ?? "");
218
218
  const a = y(() => t.item?.description ?? ""), l = y(() => Array.isArray(t.item?.rules) && t.item.rules.includes("required")), r = y(() => (typeof t.error == "string" ? t.error : "") ?? ""), o = () => {
219
219
  const s = typeof localStorage < "u" ? localStorage.getItem("locale") : null;
@@ -335,7 +335,7 @@ const Mo = ["placeholder", "disabled"], Vo = /* @__PURE__ */ pe({
335
335
  [tt, a.value]
336
336
  ]);
337
337
  }
338
- }), Do = ["step", "placeholder", "disabled", "min", "max"], Ao = /* @__PURE__ */ pe({
338
+ }), Ao = ["step", "placeholder", "disabled", "min", "max"], Do = /* @__PURE__ */ pe({
339
339
  __name: "vs-input-number",
340
340
  props: /* @__PURE__ */ ze({
341
341
  style: {
@@ -389,7 +389,7 @@ const Mo = ["placeholder", "disabled"], Vo = /* @__PURE__ */ pe({
389
389
  },
390
390
  min: s.value,
391
391
  max: c.value
392
- }, null, 10, Do)), [
392
+ }, null, 10, Ao)), [
393
393
  [tt, l.value]
394
394
  ]);
395
395
  }
@@ -608,7 +608,7 @@ const Mo = ["placeholder", "disabled"], Vo = /* @__PURE__ */ pe({
608
608
  } else
609
609
  a("update:modelValue", s);
610
610
  }
611
- }), o = A(`vs-checkbox-${n.view || "default"}`);
611
+ }), o = D(`vs-checkbox-${n.view || "default"}`);
612
612
  return (s, c) => (i(), p("div", qo, [
613
613
  (i(), ke(pt(o.value === "vs-checkbox-buttons" ? R(Ho) : R(Bo)), {
614
614
  value: e.value,
@@ -691,7 +691,7 @@ const Mo = ["placeholder", "disabled"], Vo = /* @__PURE__ */ pe({
691
691
  }, null, 2)
692
692
  ], 10, Yo));
693
693
  }
694
- }), Xo = ["id", "innerHTML"], Il = /* @__PURE__ */ pe({
694
+ }), Zo = ["id", "innerHTML"], Il = /* @__PURE__ */ pe({
695
695
  __name: "vs-input-static",
696
696
  props: {
697
697
  text: { default: "" },
@@ -711,9 +711,9 @@ const Mo = ["placeholder", "disabled"], Vo = /* @__PURE__ */ pe({
711
711
  id: e.name,
712
712
  class: oe(["text-gray-900", e.customClass]),
713
713
  innerHTML: e.html ? e.html : e.text
714
- }, null, 10, Xo));
714
+ }, null, 10, Zo));
715
715
  }
716
- }), Zo = ["placeholder", "disabled", "name"], xl = /* @__PURE__ */ pe({
716
+ }), Xo = ["placeholder", "disabled", "name"], xl = /* @__PURE__ */ pe({
717
717
  __name: "vs-input-mask",
718
718
  props: /* @__PURE__ */ ze({
719
719
  name: {},
@@ -733,7 +733,7 @@ const Mo = ["placeholder", "disabled"], Vo = /* @__PURE__ */ pe({
733
733
  }),
734
734
  emits: ["update:modelValue"],
735
735
  setup(e) {
736
- const t = e, { inputClass: n } = mt(t.style), a = Ue(e, "modelValue"), l = A(null);
736
+ const t = e, { inputClass: n } = mt(t.style), a = Ue(e, "modelValue"), l = D(null);
737
737
  let r = null;
738
738
  function o(s) {
739
739
  const c = {
@@ -784,7 +784,7 @@ const Mo = ["placeholder", "disabled"], Vo = /* @__PURE__ */ pe({
784
784
  style: {
785
785
  border: "1px solid #CFD9E0"
786
786
  }
787
- }, null, 10, Zo));
787
+ }, null, 10, Xo));
788
788
  }
789
789
  }), Jo = { class: "relative w-full bg-white rounded-lg" }, Qo = { class: "absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer" }, er = ["placeholder", "disabled"], ra = /* @__PURE__ */ pe({
790
790
  __name: "vs-input-email",
@@ -861,7 +861,7 @@ const tr = { class: "relative w-full bg-white rounded-lg" }, nr = { class: "abso
861
861
  }),
862
862
  emits: ["update:modelValue"],
863
863
  setup(e) {
864
- const t = e, n = y(() => `^\\+[1-9]\\d{${(Wt(t.mask || jt) || Wt(jt)) - 1}}$`), { inputClass: a } = mt(t.style), l = Ue(e, "modelValue"), r = A(null);
864
+ const t = e, n = y(() => `^\\+[1-9]\\d{${(Wt(t.mask || jt) || Wt(jt)) - 1}}$`), { inputClass: a } = mt(t.style), l = Ue(e, "modelValue"), r = D(null);
865
865
  let o = null;
866
866
  function s(h) {
867
867
  const k = {
@@ -980,7 +980,7 @@ const tr = { class: "relative w-full bg-white rounded-lg" }, nr = { class: "abso
980
980
  disabled: a.value,
981
981
  class: "hidden"
982
982
  }, null, 8, ar), [
983
- [Xl, n.value]
983
+ [Zl, n.value]
984
984
  ]),
985
985
  u("span", {
986
986
  class: oe(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
@@ -1076,7 +1076,7 @@ const tr = { class: "relative w-full bg-white rounded-lg" }, nr = { class: "abso
1076
1076
  disabled: a.value,
1077
1077
  class: "hidden"
1078
1078
  }, null, 8, dr), [
1079
- [Xl, n.value]
1079
+ [Zl, n.value]
1080
1080
  ]),
1081
1081
  t.html ? (i(), p("div", {
1082
1082
  key: 0,
@@ -1148,7 +1148,7 @@ const tr = { class: "relative w-full bg-white rounded-lg" }, nr = { class: "abso
1148
1148
  formValues: t = null,
1149
1149
  watchParent: n = !0
1150
1150
  }) => {
1151
- const a = A([]), l = y(() => e.parent ? t?.value?.[e.parent]?.toString?.() ?? null : null), {
1151
+ const a = D([]), l = y(() => e.parent ? t?.value?.[e.parent]?.toString?.() ?? null : null), {
1152
1152
  fetchOptions: r,
1153
1153
  fetchOptionByValue: o
1154
1154
  } = yr(() => ({
@@ -1302,26 +1302,26 @@ const tr = { class: "relative w-full bg-white rounded-lg" }, nr = { class: "abso
1302
1302
  const W = v(N);
1303
1303
  M.push(W);
1304
1304
  });
1305
- const D = /* @__PURE__ */ new Set(), U = (N) => {
1305
+ const A = /* @__PURE__ */ new Set(), U = (N) => {
1306
1306
  const W = b.get(N) || [];
1307
1307
  if (!W.length)
1308
1308
  return null;
1309
1309
  const z = N === null ? "group-null" : `group-${String(N)}`, te = N === null ? $r : String(N);
1310
- return D.add(N), {
1310
+ return A.add(N), {
1311
1311
  key: z,
1312
1312
  label: te,
1313
1313
  options: W
1314
1314
  };
1315
- }, X = [];
1315
+ }, Z = [];
1316
1316
  return M.forEach((N) => {
1317
1317
  const W = U(N);
1318
- W && X.push(W);
1318
+ W && Z.push(W);
1319
1319
  }), b.forEach((N, W) => {
1320
- if (D.has(W))
1320
+ if (A.has(W))
1321
1321
  return;
1322
1322
  const z = U(W);
1323
- z && X.push(z);
1324
- }), X;
1323
+ z && Z.push(z);
1324
+ }), Z;
1325
1325
  });
1326
1326
  return he(
1327
1327
  () => n.modelValue,
@@ -1331,9 +1331,9 @@ const tr = { class: "relative w-full bg-white rounded-lg" }, nr = { class: "abso
1331
1331
  l[M] = b;
1332
1332
  } else if (Array.isArray(b)) {
1333
1333
  const M = new Set(b);
1334
- c.value.forEach((D) => {
1335
- if (!D.disabled) {
1336
- const U = f(D);
1334
+ c.value.forEach((A) => {
1335
+ if (!A.disabled) {
1336
+ const U = f(A);
1337
1337
  l[U] = M.has(U);
1338
1338
  }
1339
1339
  });
@@ -1359,29 +1359,29 @@ const tr = { class: "relative w-full bg-white rounded-lg" }, nr = { class: "abso
1359
1359
  const b = new Set(n.modelValue);
1360
1360
  c.value.forEach((M) => {
1361
1361
  if (!M.disabled) {
1362
- const D = f(M);
1363
- l[D] = b.has(D);
1362
+ const A = f(M);
1363
+ l[A] = b.has(A);
1364
1364
  }
1365
1365
  });
1366
1366
  }
1367
1367
  }), (b, M) => n.group ? (i(), p("div", wr, [
1368
- (i(!0), p(Fe, null, Ne(_.value, (D) => (i(), p("div", {
1369
- key: D.key,
1368
+ (i(!0), p(Fe, null, Ne(_.value, (A) => (i(), p("div", {
1369
+ key: A.key,
1370
1370
  class: "flex flex-col gap-2"
1371
1371
  }, [
1372
- D.label ? (i(), p("span", kr, de(D.label), 1)) : q("", !0),
1372
+ A.label ? (i(), p("span", kr, de(A.label), 1)) : q("", !0),
1373
1373
  u("div", {
1374
1374
  class: oe(["p-0 w-full gap-[12px]", w.value])
1375
1375
  }, [
1376
- (i(!0), p(Fe, null, Ne(D.options, (U) => (i(), ke(sl, {
1376
+ (i(!0), p(Fe, null, Ne(A.options, (U) => (i(), ke(sl, {
1377
1377
  modelValue: l[f(U)],
1378
- "onUpdate:modelValue": (X) => l[f(U)] = X,
1378
+ "onUpdate:modelValue": (Z) => l[f(U)] = Z,
1379
1379
  value: f(U),
1380
1380
  class: oe(g(e.colSpan)),
1381
1381
  disabled: n.disabled || U.disabled,
1382
1382
  label: S(U),
1383
1383
  labelHtml: k.value ? C(U) : "",
1384
- key: `${D.key}-${f(U)}`,
1384
+ key: `${A.key}-${f(U)}`,
1385
1385
  icon: U?.icon,
1386
1386
  imgUrl: U?.imgUrl,
1387
1387
  option: U,
@@ -1393,18 +1393,18 @@ const tr = { class: "relative w-full bg-white rounded-lg" }, nr = { class: "abso
1393
1393
  key: 0,
1394
1394
  class: oe(["p-0 w-full gap-[10px]", w.value])
1395
1395
  }, [
1396
- (i(!0), p(Fe, null, Ne(c.value, (D) => (i(), ke(sl, {
1397
- modelValue: l[f(D)],
1398
- "onUpdate:modelValue": (U) => l[f(D)] = U,
1399
- value: f(D),
1396
+ (i(!0), p(Fe, null, Ne(c.value, (A) => (i(), ke(sl, {
1397
+ modelValue: l[f(A)],
1398
+ "onUpdate:modelValue": (U) => l[f(A)] = U,
1399
+ value: f(A),
1400
1400
  class: oe(g(e.colSpan)),
1401
- disabled: n.disabled || D.disabled,
1402
- label: S(D),
1403
- labelHtml: k.value ? C(D) : "",
1404
- key: f(D),
1405
- icon: D?.icon,
1406
- imgUrl: D?.imgUrl,
1407
- option: D,
1401
+ disabled: n.disabled || A.disabled,
1402
+ label: S(A),
1403
+ labelHtml: k.value ? C(A) : "",
1404
+ key: f(A),
1405
+ icon: A?.icon,
1406
+ imgUrl: A?.imgUrl,
1407
+ option: A,
1408
1408
  view: e.view
1409
1409
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "labelHtml", "icon", "imgUrl", "option", "view"]))), 128))
1410
1410
  ], 2));
@@ -1439,15 +1439,15 @@ function $l(e, t) {
1439
1439
  const l = new Date(n.getFullYear(), n.getMonth() + 1, 0).getDate();
1440
1440
  return n.setDate(Math.min(a, l)), n;
1441
1441
  }
1442
- function Dr(e, t) {
1442
+ function Ar(e, t) {
1443
1443
  return $l(e, -1);
1444
1444
  }
1445
- function Xn(e, t) {
1445
+ function Zn(e, t) {
1446
1446
  const n = new Date(e);
1447
1447
  return n.setFullYear(n.getFullYear() + t), n;
1448
1448
  }
1449
1449
  function ia(e, t) {
1450
- return Xn(e, -t);
1450
+ return Zn(e, -t);
1451
1451
  }
1452
1452
  function ua(e) {
1453
1453
  return nn(new Date(e.getFullYear(), 0, 1));
@@ -1455,7 +1455,7 @@ function ua(e) {
1455
1455
  function da(e) {
1456
1456
  return kn(new Date(e.getFullYear(), 11, 31));
1457
1457
  }
1458
- function Ar(e) {
1458
+ function Dr(e) {
1459
1459
  const t = Math.floor(e.getFullYear() / 10) * 10;
1460
1460
  return nn(new Date(t, 0, 1));
1461
1461
  }
@@ -1485,7 +1485,7 @@ function Er(e) {
1485
1485
  let n = ua(e.start);
1486
1486
  const a = da(e.end);
1487
1487
  for (; n <= a; )
1488
- t.push(dn(n)), n = Xn(n, 1);
1488
+ t.push(dn(n)), n = Zn(n, 1);
1489
1489
  return t;
1490
1490
  }
1491
1491
  function Cl(e, t = 1) {
@@ -1655,7 +1655,7 @@ const Wr = ["year", "month", "day", "time", "custom"], Kr = pe({
1655
1655
  }), Gr = {
1656
1656
  key: 0,
1657
1657
  class: "p-datepicker-header flex items-center justify-between mb-1.5"
1658
- }, Yr = ["disabled"], Xr = ["disabled"], Zr = {
1658
+ }, Yr = ["disabled"], Zr = ["disabled"], Xr = {
1659
1659
  key: 0,
1660
1660
  class: "p-datepicker-weekheader grid [grid-template-columns:var(--popout-column-definition)] text-[12px] text-slate-400 font-medium mb-1.5"
1661
1661
  }, Jr = ["disabled", "onClick"], Qr = {
@@ -1705,10 +1705,10 @@ function es(e, t, n, a, l, r) {
1705
1705
  st(e.$slots, "arrow-right", {}, () => [
1706
1706
  G(s, { class: "h-3.5 w-3.5" })
1707
1707
  ])
1708
- ], 8, Xr)
1708
+ ], 8, Zr)
1709
1709
  ])),
1710
1710
  u("div", null, [
1711
- "subheading" in e.$slots ? (i(), p("div", Zr, [
1711
+ "subheading" in e.$slots ? (i(), p("div", Xr, [
1712
1712
  st(e.$slots, "subheading")
1713
1713
  ])) : q("", !0),
1714
1714
  u("div", {
@@ -1759,9 +1759,9 @@ function es(e, t, n, a, l, r) {
1759
1759
  ])
1760
1760
  ], 38);
1761
1761
  }
1762
- const Zn = /* @__PURE__ */ He(Kr, [["render", es]]), ts = pe({
1762
+ const Xn = /* @__PURE__ */ He(Kr, [["render", es]]), ts = pe({
1763
1763
  components: {
1764
- PickerPopup: Zn
1764
+ PickerPopup: Xn
1765
1765
  },
1766
1766
  emits: {
1767
1767
  "update:pageDate": (e) => ft(e),
@@ -1786,7 +1786,7 @@ const Zn = /* @__PURE__ */ He(Kr, [["render", es]]), ts = pe({
1786
1786
  }
1787
1787
  },
1788
1788
  setup(e, { emit: t }) {
1789
- const n = y(() => Ar(e.pageDate)), a = y(() => Ir(e.pageDate)), l = (k, C, S) => !C && !S ? !0 : !(C && Lt(k) < Lt(C) || S && Lt(k) > Lt(S)), r = y(() => Er({
1789
+ const n = y(() => Dr(e.pageDate)), a = y(() => Ir(e.pageDate)), l = (k, C, S) => !C && !S ? !0 : !(C && Lt(k) < Lt(C) || S && Lt(k) > Lt(S)), r = y(() => Er({
1790
1790
  start: n.value,
1791
1791
  end: a.value
1792
1792
  }).map(
@@ -1811,7 +1811,7 @@ const Zn = /* @__PURE__ */ He(Kr, [["render", es]]), ts = pe({
1811
1811
  leftDisabled: s,
1812
1812
  rightDisabled: c,
1813
1813
  previousPage: () => t("update:pageDate", ia(e.pageDate, 10)),
1814
- nextPage: () => t("update:pageDate", Xn(e.pageDate, 10))
1814
+ nextPage: () => t("update:pageDate", Zn(e.pageDate, 10))
1815
1815
  };
1816
1816
  }
1817
1817
  });
@@ -1835,7 +1835,7 @@ function ns(e, t, n, a, l, r) {
1835
1835
  }
1836
1836
  const ls = /* @__PURE__ */ He(ts, [["render", ns]]), as = pe({
1837
1837
  components: {
1838
- PickerPopup: Zn
1838
+ PickerPopup: Xn
1839
1839
  },
1840
1840
  emits: {
1841
1841
  "update:pageDate": (e) => ft(e),
@@ -1893,7 +1893,7 @@ const ls = /* @__PURE__ */ He(ts, [["render", ns]]), as = pe({
1893
1893
  leftDisabled: c,
1894
1894
  rightDisabled: f,
1895
1895
  previousPage: () => t("update:pageDate", ia(e.pageDate, 1)),
1896
- nextPage: () => t("update:pageDate", Xn(e.pageDate, 1))
1896
+ nextPage: () => t("update:pageDate", Zn(e.pageDate, 1))
1897
1897
  };
1898
1898
  }
1899
1899
  });
@@ -1919,7 +1919,7 @@ function os(e, t, n, a, l, r) {
1919
1919
  }
1920
1920
  const rs = /* @__PURE__ */ He(as, [["render", os]]), ss = pe({
1921
1921
  components: {
1922
- PickerPopup: Zn
1922
+ PickerPopup: Xn
1923
1923
  },
1924
1924
  emits: {
1925
1925
  "update:pageDate": (e) => ft(e),
@@ -1992,10 +1992,10 @@ const rs = /* @__PURE__ */ He(as, [["render", os]]), ss = pe({
1992
1992
  })), s = y(() => e.customWeekdays?.length === 7 ? e.customWeekdays : null), c = y(() => {
1993
1993
  const v = e.weekStartsOn, _ = s.value;
1994
1994
  if (_)
1995
- return Array.from({ length: 7 }).map((M, D) => _[(v + D) % 7]);
1995
+ return Array.from({ length: 7 }).map((M, A) => _[(v + A) % 7]);
1996
1996
  const b = n.value(e.weekdayFormat);
1997
- return Array.from(Array(7)).map((M, D) => (v + D) % 7).map((M) => Or(/* @__PURE__ */ new Date(), M, e.weekStartsOn)).map(b);
1998
- }), f = (v, _, b, M) => M?.dates?.some((D) => Nn(v, D)) || M?.predicate?.(v) ? !1 : !_ && !b ? !0 : !(_ && hn(v, nn(_)) || b && bn(v, kn(b))), h = y(() => {
1997
+ return Array.from(Array(7)).map((M, A) => (v + A) % 7).map((M) => Or(/* @__PURE__ */ new Date(), M, e.weekStartsOn)).map(b);
1998
+ }), f = (v, _, b, M) => M?.dates?.some((A) => Nn(v, A)) || M?.predicate?.(v) ? !1 : !_ && !b ? !0 : !(_ && hn(v, nn(_)) || b && bn(v, kn(b))), h = y(() => {
1999
1999
  const v = /* @__PURE__ */ new Date(), _ = n.value(e.format);
2000
2000
  return Fr(o.value).map(
2001
2001
  (b) => ({
@@ -2023,7 +2023,7 @@ const rs = /* @__PURE__ */ He(as, [["render", os]]), ss = pe({
2023
2023
  heading: k,
2024
2024
  leftDisabled: C,
2025
2025
  rightDisabled: S,
2026
- previousPage: () => t("update:pageDate", Dr(e.pageDate)),
2026
+ previousPage: () => t("update:pageDate", Ar(e.pageDate)),
2027
2027
  nextPage: () => t("update:pageDate", $l(e.pageDate, 1))
2028
2028
  };
2029
2029
  }
@@ -2043,7 +2043,7 @@ function is(e, t, n, a, l, r) {
2043
2043
  onElementClick: t[1] || (t[1] = (s) => e.$emit("select", s)),
2044
2044
  onToday: t[2] || (t[2] = (s) => e.$emit("today")),
2045
2045
  onClear: t[3] || (t[3] = (s) => e.$emit("clear"))
2046
- }, Zl({
2046
+ }, Xl({
2047
2047
  heading: it(() => [
2048
2048
  Ke(de(e.heading), 1)
2049
2049
  ]),
@@ -2066,7 +2066,7 @@ function is(e, t, n, a, l, r) {
2066
2066
  }
2067
2067
  const us = /* @__PURE__ */ He(ss, [["render", is]]), ds = pe({
2068
2068
  components: {
2069
- PickerPopup: Zn,
2069
+ PickerPopup: Xn,
2070
2070
  ChevronUp: Ua,
2071
2071
  ChevronDown: un
2072
2072
  },
@@ -2097,7 +2097,7 @@ const us = /* @__PURE__ */ He(ss, [["render", is]]), ds = pe({
2097
2097
  }
2098
2098
  },
2099
2099
  setup(e, { emit: t }) {
2100
- const n = y(() => e.pageDate ?? e.selected), a = A(n.value.getHours()), l = A(n.value.getMinutes());
2100
+ const n = y(() => e.pageDate ?? e.selected), a = D(n.value.getHours()), l = D(n.value.getMinutes());
2101
2101
  he(
2102
2102
  () => e.selected,
2103
2103
  (S) => {
@@ -2218,7 +2218,7 @@ function ks(e, t, n, a, l, r) {
2218
2218
  _: 1
2219
2219
  }));
2220
2220
  }
2221
- const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month", "year"], Cs = (e, t, n = void 0) => {
2221
+ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), An = ["time", "day", "month", "year"], Cs = (e, t, n = void 0) => {
2222
2222
  let a = n || /* @__PURE__ */ new Date();
2223
2223
  const l = Nr([e, a]);
2224
2224
  l && (a = l);
@@ -2287,7 +2287,7 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2287
2287
  type: String,
2288
2288
  required: !1,
2289
2289
  default: "day",
2290
- validate: (e) => typeof e == "string" && Dn.includes(e)
2290
+ validate: (e) => typeof e == "string" && An.includes(e)
2291
2291
  },
2292
2292
  /**
2293
2293
  * Date which should be the "center" of the initial view.
@@ -2390,7 +2390,7 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2390
2390
  type: String,
2391
2391
  required: !1,
2392
2392
  default: "day",
2393
- validate: (e) => typeof e == "string" && Dn.includes(e)
2393
+ validate: (e) => typeof e == "string" && An.includes(e)
2394
2394
  }
2395
2395
  },
2396
2396
  emits: {
@@ -2402,9 +2402,9 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2402
2402
  closed: () => !0
2403
2403
  },
2404
2404
  setup(e, { emit: t }) {
2405
- const n = A("none"), a = A(e.startingViewDate), l = A(null), r = A(null), o = A(null), s = A({}), c = A(!1), f = A(!1);
2405
+ const n = D("none"), a = D(e.startingViewDate), l = D(null), r = D(null), o = D(null), s = D({}), c = D(!1), f = D(!1);
2406
2406
  let h = null;
2407
- const k = A(""), C = (Q) => {
2407
+ const k = D(""), C = (Q) => {
2408
2408
  const ue = Q.replace(/[a-zA-Z]/g, "0");
2409
2409
  return /0/.test(ue) ? ue : "";
2410
2410
  }, S = y(() => C(e.inputFormat));
@@ -2422,7 +2422,7 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2422
2422
  }, M = (Q) => {
2423
2423
  const ue = Q && ft(Q) ? gn(Q, e.inputFormat) : "";
2424
2424
  k.value !== ue && (k.value = ue), b();
2425
- }, D = async () => {
2425
+ }, A = async () => {
2426
2426
  if (v(), !r.value || !S.value) return;
2427
2427
  g = (await _())(r.value, {
2428
2428
  mask: S.value,
@@ -2443,16 +2443,16 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2443
2443
  }
2444
2444
  ), at(() => {
2445
2445
  S.value && et(() => {
2446
- D();
2446
+ A();
2447
2447
  });
2448
2448
  }), Et(() => {
2449
2449
  v();
2450
2450
  }), he(S, (Q) => {
2451
2451
  Q ? et(() => {
2452
- D();
2452
+ A();
2453
2453
  }) : v();
2454
2454
  });
2455
- const U = y(() => n.value !== "none"), X = y(() => e.startingView === "time" && e.minimumView === "time"), N = y(() => e.startingView === "day" && e.minimumView === "time"), W = (Q) => {
2455
+ const U = y(() => n.value !== "none"), Z = y(() => e.startingView === "time" && e.minimumView === "time"), N = y(() => e.startingView === "day" && e.minimumView === "time"), W = (Q) => {
2456
2456
  e.disabled || (U.value || (a.value = e.modelValue || Cs(e.lowerLimit, e.upperLimit, a.value), t("opened")), n.value = Q, et(() => We()));
2457
2457
  }, z = () => {
2458
2458
  U.value && (h !== null && (cancelAnimationFrame(h), h = null), n.value = "none", t("closed"));
@@ -2474,7 +2474,7 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2474
2474
  return Ie.setHours(Le.getHours(), Le.getMinutes(), 0, 0), Ie;
2475
2475
  })() : Q;
2476
2476
  a.value = ue, e.minimumView === "day" ? (z(), M(ue), t("update:modelValue", ue)) : N.value ? (M(ue), t("update:modelValue", ue), W("day")) : W("time");
2477
- }, Z = (Q) => {
2477
+ }, X = (Q) => {
2478
2478
  M(Q), t("update:modelValue", Q);
2479
2479
  }, ve = () => {
2480
2480
  ee(/* @__PURE__ */ new Date());
@@ -2505,7 +2505,7 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2505
2505
  }
2506
2506
  e.typeable && Ie && (ye({ closeOnSuccess: !0, revertOnInvalid: !0 }) || r.value?.focus());
2507
2507
  }, ge = y(() => {
2508
- const Q = Dn.indexOf(e.startingView), ue = Dn.indexOf(e.minimumView);
2508
+ const Q = An.indexOf(e.startingView), ue = An.indexOf(e.minimumView);
2509
2509
  return Q < ue ? e.minimumView : e.startingView;
2510
2510
  }), Ce = y(() => e.weekDayNames?.length === 7 ? e.weekDayNames : void 0), se = () => e.startingView === "time" && e.minimumView === "time" ? null : W("day"), xe = () => {
2511
2511
  if (!r.value || !o.value) return;
@@ -2525,7 +2525,7 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2525
2525
  overflowY: "auto",
2526
2526
  zIndex: "2147483000"
2527
2527
  }, N.value && n.value === "day" && (s.value.minWidth = "345px");
2528
- }, Ae = (Q, ue) => Q.bottom > ue.top && Q.top < ue.bottom && Q.right > ue.left && Q.left < ue.right, Ve = (Q) => {
2528
+ }, De = (Q, ue) => Q.bottom > ue.top && Q.top < ue.bottom && Q.right > ue.left && Q.left < ue.right, Ve = (Q) => {
2529
2529
  const ue = [];
2530
2530
  let Le = Q.parentElement;
2531
2531
  for (; Le; ) {
@@ -2536,7 +2536,7 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2536
2536
  }, Be = () => {
2537
2537
  if (!r.value) return !1;
2538
2538
  const Q = r.value.getBoundingClientRect(), ue = new DOMRect(0, 0, window.innerWidth, window.innerHeight);
2539
- return Ae(Q, ue) ? Ve(r.value).every((Ie) => Ae(Q, Ie.getBoundingClientRect())) : !1;
2539
+ return De(Q, ue) ? Ve(r.value).every((Ie) => De(Q, Ie.getBoundingClientRect())) : !1;
2540
2540
  }, Ye = () => {
2541
2541
  if (U.value) {
2542
2542
  if (!Be()) {
@@ -2557,11 +2557,11 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2557
2557
  });
2558
2558
  };
2559
2559
  at(() => {
2560
- window.addEventListener("resize", Ye), window.addEventListener("scroll", Ye, !0), document.addEventListener("pointerdown", Xe, !0);
2560
+ window.addEventListener("resize", Ye), window.addEventListener("scroll", Ye, !0), document.addEventListener("pointerdown", Ze, !0);
2561
2561
  }), Et(() => {
2562
- h !== null && (cancelAnimationFrame(h), h = null), window.removeEventListener("resize", Ye), window.removeEventListener("scroll", Ye, !0), document.removeEventListener("pointerdown", Xe, !0);
2562
+ h !== null && (cancelAnimationFrame(h), h = null), window.removeEventListener("resize", Ye), window.removeEventListener("scroll", Ye, !0), document.removeEventListener("pointerdown", Ze, !0);
2563
2563
  });
2564
- const Xe = (Q) => {
2564
+ const Ze = (Q) => {
2565
2565
  if (n.value === "none") return;
2566
2566
  const ue = Q.target;
2567
2567
  if (!ue) return;
@@ -2582,10 +2582,10 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2582
2582
  selectMonth: H,
2583
2583
  selectDay: ee,
2584
2584
  selectToday: ve,
2585
- selectTime: Z,
2585
+ selectTime: X,
2586
2586
  keyUp: Y,
2587
2587
  onInput: ae,
2588
- isTimeOnlyMode: X,
2588
+ isTimeOnlyMode: Z,
2589
2589
  isDateTimeMode: N,
2590
2590
  normalizedWeekdayNames: Ce,
2591
2591
  viewShown: n,
@@ -2600,8 +2600,8 @@ const $s = /* @__PURE__ */ He(ds, [["render", ks]]), Dn = ["time", "day", "month
2600
2600
  }), _s = {
2601
2601
  ref: "rootRef",
2602
2602
  class: "relative"
2603
- }, Ms = { class: "p-datepicker p-component p-inputwrapper relative" }, Vs = ["readonly", "value", "placeholder", "disabled", "tabindex"], Ls = { class: "p-datepicker-input-icon-container absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400" }, Ds = { class: "absolute right-8 top-1/2 -translate-y-1/2" };
2604
- function As(e, t, n, a, l, r) {
2603
+ }, Ms = { class: "p-datepicker p-component p-inputwrapper relative" }, Vs = ["readonly", "value", "placeholder", "disabled", "tabindex"], Ls = { class: "p-datepicker-input-icon-container absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400" }, As = { class: "absolute right-8 top-1/2 -translate-y-1/2" };
2604
+ function Ds(e, t, n, a, l, r) {
2605
2605
  const o = ct("Clock3"), s = ct("CalendarDays"), c = ct("X"), f = ct("year-picker"), h = ct("month-picker"), k = ct("time-picker"), C = ct("day-picker");
2606
2606
  return i(), p("div", _s, [
2607
2607
  u("div", Ms, [
@@ -2630,7 +2630,7 @@ function As(e, t, n, a, l, r) {
2630
2630
  class: "h-4 w-4"
2631
2631
  }))
2632
2632
  ]),
2633
- Oe(u("div", Ds, [
2633
+ Oe(u("div", As, [
2634
2634
  st(e.$slots, "clear", { onClear: e.clearModelValue }, () => [
2635
2635
  u("button", {
2636
2636
  type: "button",
@@ -2689,7 +2689,7 @@ function As(e, t, n, a, l, r) {
2689
2689
  onToday: e.selectToday,
2690
2690
  onClear: e.clearModelValue,
2691
2691
  onBack: t[10] || (t[10] = (S) => e.viewShown = "month")
2692
- }, Zl({ _: 2 }, [
2692
+ }, Xl({ _: 2 }, [
2693
2693
  e.isDateTimeMode ? {
2694
2694
  name: "after-calendar",
2695
2695
  fn: it(() => [
@@ -2724,7 +2724,7 @@ function As(e, t, n, a, l, r) {
2724
2724
  ]))
2725
2725
  ], 512);
2726
2726
  }
2727
- const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
2727
+ const Is = /* @__PURE__ */ He(Ss, [["render", Ds]]), Fs = /* @__PURE__ */ pe({
2728
2728
  __name: "vs-input-date2",
2729
2729
  props: {
2730
2730
  clearable: { type: Boolean, default: !0 },
@@ -2822,7 +2822,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
2822
2822
  function M(P, ae) {
2823
2823
  return P ? ae === "week" ? "рррр-тиждень" : P.replaceAll("yyyy", "рррр").replaceAll("yy", "рр").replaceAll("MM", "мм").replaceAll("M", "м").replaceAll("dd", "дд").replaceAll("d", "д").replaceAll("HH", "гг").replaceAll("H", "г").replaceAll("mm", ae === "time" || ae === "datetime" ? "хх" : "мм") : "";
2824
2824
  }
2825
- const D = {
2825
+ const A = {
2826
2826
  date: "дд.мм.рррр",
2827
2827
  datetime: "дд.мм.рррр гг:хх",
2828
2828
  month: "мм.рррр",
@@ -2832,16 +2832,16 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
2832
2832
  }, U = y(() => {
2833
2833
  if (n.placeholder) return n.placeholder;
2834
2834
  const P = o.value;
2835
- return M(b.value, P) || D[P] || "";
2836
- }), X = A(!1);
2835
+ return M(b.value, P) || A[P] || "";
2836
+ }), Z = D(!1);
2837
2837
  he(
2838
2838
  () => n.modelValue,
2839
2839
  (P) => {
2840
- P ? X.value = !0 : n.now || (X.value = !1);
2840
+ P ? Z.value = !0 : n.now || (Z.value = !1);
2841
2841
  },
2842
2842
  { immediate: !0 }
2843
2843
  ), pl(() => {
2844
- n.now && !n.modelValue && !X.value && (a("update:modelValue", W(/* @__PURE__ */ new Date(), o.value)), X.value = !0);
2844
+ n.now && !n.modelValue && !Z.value && (a("update:modelValue", W(/* @__PURE__ */ new Date(), o.value)), Z.value = !0);
2845
2845
  }), he(b, () => {
2846
2846
  a("update:modelValue", W(f.value, o.value));
2847
2847
  });
@@ -2854,7 +2854,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
2854
2854
  case "datetime":
2855
2855
  return j(P);
2856
2856
  case "time":
2857
- return Z(P);
2857
+ return X(P);
2858
2858
  case "month":
2859
2859
  return H(P);
2860
2860
  case "year":
@@ -2910,7 +2910,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
2910
2910
  const ae = Number(P);
2911
2911
  return ae ? new Date(ae, 0, 1) : null;
2912
2912
  }
2913
- function Z(P) {
2913
+ function X(P) {
2914
2914
  const ae = P.match(/^(\d{1,2}):(\d{2})$/);
2915
2915
  if (!ae) return null;
2916
2916
  const [, ye, Y] = ae, ge = /* @__PURE__ */ new Date();
@@ -2984,7 +2984,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
2984
2984
  }
2985
2985
  ).then((k) => k.json()))?.result;
2986
2986
  } catch (n) {
2987
- return De({
2987
+ return Ae({
2988
2988
  type: "error",
2989
2989
  title: "Помилка!",
2990
2990
  message: "Сталась помилка під час завантаження файлу",
@@ -3121,10 +3121,10 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3121
3121
  const n = e, a = Ue(e, "modelValue"), l = t, r = y(() => {
3122
3122
  const b = a.value;
3123
3123
  return !n.multiple || !Array.isArray(b) ? [] : b;
3124
- }), o = A(null), s = A(!1), c = ot("values"), f = y(() => n.format ? n.format.split(",").map((b) => b.trim().toLowerCase()).filter(Boolean) : []), h = (b) => {
3124
+ }), o = D(null), s = D(!1), c = ot("values"), f = y(() => n.format ? n.format.split(",").map((b) => b.trim().toLowerCase()).filter(Boolean) : []), h = (b) => {
3125
3125
  if (n.max_size && b.size > n.max_size * 1024 * 1024) {
3126
3126
  const M = (b.size / 1048576).toFixed(2);
3127
- return De({
3127
+ return Ae({
3128
3128
  type: "error",
3129
3129
  title: "Помилка!",
3130
3130
  message: `Файл "${b.name}" занадто великий. Максимальний розмір: ${n.max_size} МБ, розмір файлу: ${M} МБ`,
@@ -3135,23 +3135,23 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3135
3135
  }, k = (b) => {
3136
3136
  if (!f.value.length)
3137
3137
  return !0;
3138
- const M = `.${b.name.split(".").pop()?.toLowerCase() || ""}`, D = f.value.includes(M);
3139
- return D || De({
3138
+ const M = `.${b.name.split(".").pop()?.toLowerCase() || ""}`, A = f.value.includes(M);
3139
+ return A || Ae({
3140
3140
  type: "error",
3141
3141
  title: "Помилка!",
3142
3142
  message: `Неприпустимий формат файлу "${b.name}". Дозволені формати: ${f.value.join(", ")}`,
3143
3143
  position: "right-bottom"
3144
- }), D;
3144
+ }), A;
3145
3145
  }, C = y(() => {
3146
3146
  const b = {}, M = [];
3147
3147
  if (!n.customParams?.length)
3148
3148
  return { params: b, missingSources: M };
3149
- const D = c?.value ?? {};
3149
+ const A = c?.value ?? {};
3150
3150
  return n.customParams.forEach((U) => {
3151
3151
  if (!U) return;
3152
- const [X, N] = U.split("="), W = X?.trim(), z = N?.trim();
3152
+ const [Z, N] = U.split("="), W = Z?.trim(), z = N?.trim();
3153
3153
  if (!W || !z) return;
3154
- const te = D[z];
3154
+ const te = A[z];
3155
3155
  if (te == null || te === "") {
3156
3156
  M.push(z);
3157
3157
  return;
@@ -3168,14 +3168,14 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3168
3168
  const b = C.value.missingSources;
3169
3169
  if (!b.length) return !0;
3170
3170
  const M = b.join(", ");
3171
- return De({
3171
+ return Ae({
3172
3172
  type: "warning",
3173
3173
  title: "Заповніть поля",
3174
3174
  message: `Поля (${M}) необхідні для завантаження файлу`,
3175
3175
  position: "right-bottom"
3176
3176
  }), !1;
3177
3177
  }, w = (b) => {
3178
- De({
3178
+ Ae({
3179
3179
  type: "error",
3180
3180
  title: "Помилка завантаження",
3181
3181
  message: b || "Не вдалося завантажити файл. Спробуйте ще раз.",
@@ -3190,19 +3190,19 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3190
3190
  o.value && (o.value.value = "");
3191
3191
  return;
3192
3192
  }
3193
- const D = Array.from(M);
3194
- if (n.max_size && D.filter((N) => !h(N)).length > 0) {
3193
+ const A = Array.from(M);
3194
+ if (n.max_size && A.filter((N) => !h(N)).length > 0) {
3195
3195
  o.value && (o.value.value = "");
3196
3196
  return;
3197
3197
  }
3198
- if (D.filter((X) => !k(X)).length > 0) {
3198
+ if (A.filter((Z) => !k(Z)).length > 0) {
3199
3199
  o.value && (o.value.value = "");
3200
3200
  return;
3201
3201
  }
3202
3202
  s.value = !0;
3203
3203
  try {
3204
3204
  if (n.multiple) {
3205
- const X = Array.from(M).map(async (le) => await Rl(le, S())), N = await Promise.all(X), W = N.filter((le) => le?.file_path);
3205
+ const Z = Array.from(M).map(async (le) => await Rl(le, S())), N = await Promise.all(Z), W = N.filter((le) => le?.file_path);
3206
3206
  if (W.length === 0) {
3207
3207
  w();
3208
3208
  return;
@@ -3211,7 +3211,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3211
3211
  const z = W.map((le) => le.file_path), te = Array.isArray(a.value) ? a.value : [];
3212
3212
  a.value = [...te, ...z], l("change", a.value);
3213
3213
  } else {
3214
- const X = M[0], N = await Rl(X, S());
3214
+ const Z = M[0], N = await Rl(Z, S());
3215
3215
  if (!N?.file_path) {
3216
3216
  w();
3217
3217
  return;
@@ -3219,8 +3219,8 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3219
3219
  const W = N.file_path;
3220
3220
  a.value = W, l("change", W);
3221
3221
  }
3222
- } catch (X) {
3223
- const N = X?.message || void 0;
3222
+ } catch (Z) {
3223
+ const N = Z?.message || void 0;
3224
3224
  w(N);
3225
3225
  } finally {
3226
3226
  s.value = !1, o.value && (o.value.value = "");
@@ -3241,14 +3241,14 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3241
3241
  key: 0,
3242
3242
  item: a.value,
3243
3243
  value: a.value,
3244
- "onUpdate:value": M[0] || (M[0] = (D) => a.value = D)
3244
+ "onUpdate:value": M[0] || (M[0] = (A) => a.value = A)
3245
3245
  }, null, 8, ["item", "value"])) : e.multiple ? (i(), p("div", Hs, [
3246
- (i(!0), p(Fe, null, Ne(r.value, (D, U) => (i(), ke(ul, {
3246
+ (i(!0), p(Fe, null, Ne(r.value, (A, U) => (i(), ke(ul, {
3247
3247
  multiple: e.multiple,
3248
3248
  key: U,
3249
3249
  value: a.value,
3250
- "onUpdate:value": M[1] || (M[1] = (X) => a.value = X),
3251
- item: D
3250
+ "onUpdate:value": M[1] || (M[1] = (Z) => a.value = Z),
3251
+ item: A
3252
3252
  }, null, 8, ["multiple", "value", "item"]))), 128)),
3253
3253
  u("div", {
3254
3254
  onClick: v,
@@ -3275,7 +3275,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3275
3275
  ], 2))
3276
3276
  ]));
3277
3277
  }
3278
- }), Gs = /* @__PURE__ */ He(Ks, [["__scopeId", "data-v-f452b969"]]), Ys = { class: "vs-input-file2 flex flex-col gap-4" }, Xs = { class: "flex items-center gap-x-2" }, Zs = ["accept", "disabled"], Js = {
3278
+ }), Gs = /* @__PURE__ */ He(Ks, [["__scopeId", "data-v-f452b969"]]), Ys = { class: "vs-input-file2 flex flex-col gap-4" }, Zs = { class: "flex items-center gap-x-2" }, Xs = ["accept", "disabled"], Js = {
3279
3279
  key: 0,
3280
3280
  class: "absolute inset-0 flex flex-col items-center justify-center gap-1 rounded-lg bg-white/90 text-xs font-medium text-slate-600"
3281
3281
  }, Qs = {
@@ -3308,19 +3308,19 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3308
3308
  }),
3309
3309
  emits: ["update:modelValue"],
3310
3310
  setup(e) {
3311
- const t = e, n = Ue(e, "modelValue"), a = A(null), l = A(null), r = A(""), o = A(0), s = A(!1), c = A(""), f = A(null), h = ot("values"), k = y(() => t.format ? t.format.split(",").map((j) => j.trim().toLowerCase()).filter(Boolean) : []), C = y(() => !l.value || !l.value.size ? 0 : Math.min(100, Math.round(o.value / l.value.size * 100))), S = y(() => l.value ? `${v(o.value)} / ${v(l.value.size)}` : ""), g = y(() => t.disabled ? "opacity-50 cursor-not-allowed" : s.value ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), w = () => {
3312
- t.disabled || s.value || D() && a.value?.click();
3311
+ const t = e, n = Ue(e, "modelValue"), a = D(null), l = D(null), r = D(""), o = D(0), s = D(!1), c = D(""), f = D(null), h = ot("values"), k = y(() => t.format ? t.format.split(",").map((j) => j.trim().toLowerCase()).filter(Boolean) : []), C = y(() => !l.value || !l.value.size ? 0 : Math.min(100, Math.round(o.value / l.value.size * 100))), S = y(() => l.value ? `${v(o.value)} / ${v(l.value.size)}` : ""), g = y(() => t.disabled ? "opacity-50 cursor-not-allowed" : s.value ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), w = () => {
3312
+ t.disabled || s.value || A() && a.value?.click();
3313
3313
  }, v = (j) => {
3314
3314
  if (!Number.isFinite(j)) return "0 B";
3315
3315
  const H = ["B", "KB", "MB", "GB"];
3316
- let ee = 0, Z = j;
3317
- for (; Z >= 1024 && ee < H.length - 1; )
3318
- Z /= 1024, ee += 1;
3319
- return `${Z.toFixed(ee === 0 ? 0 : 1)} ${H[ee]}`;
3316
+ let ee = 0, X = j;
3317
+ for (; X >= 1024 && ee < H.length - 1; )
3318
+ X /= 1024, ee += 1;
3319
+ return `${X.toFixed(ee === 0 ? 0 : 1)} ${H[ee]}`;
3320
3320
  }, _ = (j) => {
3321
3321
  if (!t.max_size) return !0;
3322
3322
  const H = t.max_size * 1024 * 1024;
3323
- return j.size > H ? (De({
3323
+ return j.size > H ? (Ae({
3324
3324
  type: "error",
3325
3325
  title: "Файл занадто великий",
3326
3326
  message: `Максимальний розмір ${t.max_size} МБ`,
@@ -3329,7 +3329,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3329
3329
  }, b = (j) => {
3330
3330
  if (!k.value.length) return !0;
3331
3331
  const H = `.${j.name.split(".").pop()?.toLowerCase() || ""}`;
3332
- return k.value.includes(H) ? !0 : (De({
3332
+ return k.value.includes(H) ? !0 : (Ae({
3333
3333
  type: "error",
3334
3334
  title: "Непідтримуваний формат",
3335
3335
  message: `Дозволені формати: ${k.value.join(", ")}`,
@@ -3339,14 +3339,14 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3339
3339
  const j = {}, H = [];
3340
3340
  if (!t.customParams?.length) return { params: j, missing: H };
3341
3341
  const ee = h?.value ?? {};
3342
- return t.customParams.forEach((Z) => {
3343
- if (!Z) return;
3344
- const [ve, ce] = Z.split("="), Me = ve?.trim(), Se = ce?.trim();
3342
+ return t.customParams.forEach((X) => {
3343
+ if (!X) return;
3344
+ const [ve, ce] = X.split("="), Me = ve?.trim(), Se = ce?.trim();
3345
3345
  if (!Me || !Se) return;
3346
3346
  const P = ee[Se];
3347
3347
  P == null || P === "" ? H.push(Se) : j[Me] = P;
3348
3348
  }), { params: j, missing: H };
3349
- }), D = () => M.value.missing.length ? (De({
3349
+ }), A = () => M.value.missing.length ? (Ae({
3350
3350
  type: "warning",
3351
3351
  title: "Заповніть поля",
3352
3352
  message: `Потрібні значення: ${M.value.missing.join(", ")}`,
@@ -3354,7 +3354,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3354
3354
  }), !1) : !0, U = (j) => {
3355
3355
  const H = j.target, ee = H.files?.[0];
3356
3356
  if (ee) {
3357
- if (!D()) {
3357
+ if (!A()) {
3358
3358
  H.value = "";
3359
3359
  return;
3360
3360
  }
@@ -3364,7 +3364,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3364
3364
  }
3365
3365
  l.value = ee, o.value = 0, r.value = "", c.value = "";
3366
3366
  }
3367
- }, X = async () => {
3367
+ }, Z = async () => {
3368
3368
  if (!l.value) {
3369
3369
  w();
3370
3370
  return;
@@ -3395,7 +3395,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3395
3395
  for (; o.value < l.value.size; ) {
3396
3396
  const j = o.value, H = Math.min(j + t.chunkSize, l.value.size), ee = l.value.slice(j, H);
3397
3397
  f.value = new AbortController();
3398
- const Z = await fetch(`/api/file/upload2/${r.value}`, {
3398
+ const X = await fetch(`/api/file/upload2/${r.value}`, {
3399
3399
  method: "PATCH",
3400
3400
  headers: {
3401
3401
  "Content-Range": `bytes ${j}-${H - 1}/${l.value.size}`
@@ -3403,12 +3403,12 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3403
3403
  body: ee,
3404
3404
  signal: f.value.signal
3405
3405
  });
3406
- if (!Z.ok) throw new Error("Помилка завантаження частини");
3407
- const ve = await Z.json().catch(() => ({}));
3406
+ if (!X.ok) throw new Error("Помилка завантаження частини");
3407
+ const ve = await X.json().catch(() => ({}));
3408
3408
  if (ve.uploaded != null ? o.value = Number(ve.uploaded) : o.value = H, ve.finished || o.value >= l.value.size) {
3409
3409
  s.value = !1;
3410
3410
  const ce = ve.file_path || ve.url || r.value;
3411
- n.value = { file_id: ve.file_id ?? r.value ?? ce, file_path: ce }, De({
3411
+ n.value = { file_id: ve.file_id ?? r.value ?? ce, file_path: ce }, Ae({
3412
3412
  type: "success",
3413
3413
  title: "Файл завантажено",
3414
3414
  message: l.value.name,
@@ -3429,7 +3429,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3429
3429
  }, z = async () => {
3430
3430
  if (l.value) {
3431
3431
  if (!r.value) {
3432
- await X();
3432
+ await Z();
3433
3433
  return;
3434
3434
  }
3435
3435
  await N();
@@ -3441,7 +3441,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3441
3441
  j && (j.value = ""), l.value = null, r.value = "", o.value = 0, c.value = "";
3442
3442
  };
3443
3443
  return (j, H) => (i(), p("div", Ys, [
3444
- u("div", Xs, [
3444
+ u("div", Zs, [
3445
3445
  u("input", {
3446
3446
  ref_key: "fileInput",
3447
3447
  ref: a,
@@ -3450,7 +3450,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3450
3450
  accept: t.format,
3451
3451
  disabled: s.value || t.disabled,
3452
3452
  onChange: U
3453
- }, null, 40, Zs),
3453
+ }, null, 40, Xs),
3454
3454
  n.value ? (i(), ke(ul, {
3455
3455
  key: 0,
3456
3456
  item: n.value,
@@ -3502,7 +3502,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3502
3502
  key: 2,
3503
3503
  type: "button",
3504
3504
  class: "rounded border border-slate-300 px-3 py-1",
3505
- onClick: X
3505
+ onClick: Z
3506
3506
  }, " Upload ")) : q("", !0),
3507
3507
  u("button", {
3508
3508
  type: "button",
@@ -3514,7 +3514,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3514
3514
  ])) : q("", !0)
3515
3515
  ]));
3516
3516
  }
3517
- }), al = /* @__PURE__ */ He(ii, [["__scopeId", "data-v-19ea2129"]]), ui = { class: "flex items-center justify-center h-[30px] w-[30px]" }, di = { class: "max-w-[55vw]" }, ci = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, fi = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, mi = { class: "px-[5px]" }, pi = { class: "" }, An = /* @__PURE__ */ pe({
3517
+ }), al = /* @__PURE__ */ He(ii, [["__scopeId", "data-v-19ea2129"]]), ui = { class: "flex items-center justify-center h-[30px] w-[30px]" }, di = { class: "max-w-[55vw]" }, ci = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, fi = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, mi = { class: "px-[5px]" }, pi = { class: "" }, Dn = /* @__PURE__ */ pe({
3518
3518
  __name: "vs-widget-file-info",
3519
3519
  props: {
3520
3520
  item: { default: null }
@@ -3618,20 +3618,20 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3618
3618
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
3619
3619
  onClick: C[0] || (C[0] = (S) => h(e.index))
3620
3620
  }, [
3621
- G(An, { item: e.item }, null, 8, ["item"])
3621
+ G(Dn, { item: e.item }, null, 8, ["item"])
3622
3622
  ])
3623
3623
  ])) : l(e.item) ? (i(), p("div", yi, [
3624
- G(An, { item: e.item }, null, 8, ["item"])
3624
+ G(Dn, { item: e.item }, null, 8, ["item"])
3625
3625
  ])) : r(e.item) ? (i(), p("div", hi, [
3626
3626
  u("a", {
3627
3627
  href: `/api/file-preview?id=${e.item.file_id}`,
3628
3628
  target: "_blank",
3629
3629
  class: "flex gap-x-3 w-full items-center"
3630
3630
  }, [
3631
- G(An, { item: e.item }, null, 8, ["item"])
3631
+ G(Dn, { item: e.item }, null, 8, ["item"])
3632
3632
  ], 8, bi)
3633
3633
  ])) : (i(), p("div", xi, [
3634
- G(An, { item: e.item }, null, 8, ["item"])
3634
+ G(Dn, { item: e.item }, null, 8, ["item"])
3635
3635
  ])),
3636
3636
  u("div", wi, [
3637
3637
  u("div", ki, [
@@ -3665,7 +3665,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3665
3665
  ])
3666
3666
  ]));
3667
3667
  }
3668
- }), Mi = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Vi = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Li = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, Di = { class1: "ml-auto" }, Ai = { 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" }, Ii = {
3668
+ }), Mi = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Vi = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Li = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, Ai = { class1: "ml-auto" }, Di = { 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" }, Ii = {
3669
3669
  key: 0,
3670
3670
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
3671
3671
  }, Fi = { class: "relative" }, Ti = { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, Ei = {
@@ -3688,44 +3688,44 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3688
3688
  },
3689
3689
  emits: ["update"],
3690
3690
  setup(e, { emit: t }) {
3691
- const n = e, a = ot("form"), l = y(() => a.value.formId), r = A(!1), o = A(0), s = t, c = A(!1), f = A({}), h = A([]), k = A(""), C = y(() => Array.isArray(h.value) ? h.value.filter((M) => M.ext === "jpg" || M.ext === "png").map((M) => M?.file_path) : []), S = y(() => k.value === "" ? h.value : h.value.filter((M) => M?.uploaded_name?.includes(k.value))), g = (M) => {
3692
- const D = C.value.findIndex((U) => U === M.item.file_path);
3693
- D !== -1 && (r.value = !0, o.value = D);
3691
+ const n = e, a = ot("form"), l = y(() => a.value.formId), r = D(!1), o = D(0), s = t, c = D(!1), f = D({}), h = D([]), k = D(""), C = y(() => Array.isArray(h.value) ? h.value.filter((M) => M.ext === "jpg" || M.ext === "png").map((M) => M?.file_path) : []), S = y(() => k.value === "" ? h.value : h.value.filter((M) => M?.uploaded_name?.includes(k.value))), g = (M) => {
3692
+ const A = C.value.findIndex((U) => U === M.item.file_path);
3693
+ A !== -1 && (r.value = !0, o.value = A);
3694
3694
  }, w = async () => {
3695
3695
  try {
3696
- const M = await fetch(`${n.prefix}/widget/file/${l.value}`).then((D) => D.json());
3696
+ const M = await fetch(`${n.prefix}/widget/file/${l.value}`).then((A) => A.json());
3697
3697
  h.value = M?.rows;
3698
3698
  } catch (M) {
3699
3699
  console.error(M);
3700
3700
  }
3701
3701
  }, v = async (M) => {
3702
3702
  await Promise.all(
3703
- Array.from(M.target.files).map(async (D) => {
3703
+ Array.from(M.target.files).map(async (A) => {
3704
3704
  const U = new FormData();
3705
- U.append("file", D);
3705
+ U.append("file", A);
3706
3706
  try {
3707
- const X = `${n.prefix}/widget/file/${l.value}`, N = await fetch(X, { method: "POST", body: U });
3708
- return N.ok ? (s("update", "file-list"), D) : (De({
3707
+ const Z = `${n.prefix}/widget/file/${l.value}`, N = await fetch(Z, { method: "POST", body: U });
3708
+ return N.ok ? (s("update", "file-list"), A) : (Ae({
3709
3709
  type: N.status >= 400 && N.status < 500 ? "warning" : "error",
3710
3710
  title: "Error",
3711
3711
  message: `Error code: ${N.status}`
3712
3712
  }), null);
3713
- } catch (X) {
3714
- return De({
3713
+ } catch (Z) {
3714
+ return Ae({
3715
3715
  type: "error",
3716
3716
  title: "Error",
3717
- message: X.message || "Unknown error"
3718
- }), console.error(X), null;
3717
+ message: Z.message || "Unknown error"
3718
+ }), console.error(Z), null;
3719
3719
  }
3720
3720
  })
3721
3721
  ), await w();
3722
3722
  }, _ = (M) => {
3723
- const D = { ...M };
3724
- return M.cancel || (D.cancel = () => {
3723
+ const A = { ...M };
3724
+ return M.cancel || (A.cancel = () => {
3725
3725
  c.value = !1;
3726
- }), M.updateListOnConfirm && (D.confirm = async () => {
3726
+ }), M.updateListOnConfirm && (A.confirm = async () => {
3727
3727
  await M.confirm(), c.value = !1, w();
3728
- }), D;
3728
+ }), A;
3729
3729
  }, b = (M) => {
3730
3730
  f.value = _(M), c.value = !0;
3731
3731
  };
@@ -3733,19 +3733,19 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3733
3733
  M && w();
3734
3734
  }), at(() => {
3735
3735
  l.value && w();
3736
- }), (M, D) => {
3737
- const U = ct("Lightbox"), X = ct("MessageBox");
3736
+ }), (M, A) => {
3737
+ const U = ct("Lightbox"), Z = ct("MessageBox");
3738
3738
  return i(), p("div", Mi, [
3739
3739
  u("div", Vi, [
3740
3740
  u("h2", Li, " Файлів: " + de(h.value?.length), 1),
3741
- u("div", Di, [
3741
+ u("div", Ai, [
3742
3742
  u("label", null, [
3743
3743
  u("input", {
3744
3744
  type: "file",
3745
3745
  class: "hidden",
3746
- onChange: D[0] || (D[0] = (N) => v(N))
3746
+ onChange: A[0] || (A[0] = (N) => v(N))
3747
3747
  }, null, 32),
3748
- u("div", Ai, [
3748
+ u("div", Di, [
3749
3749
  G(R(ea), { class: "h-4 w-4" })
3750
3750
  ])
3751
3751
  ])
@@ -3759,7 +3759,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3759
3759
  ]),
3760
3760
  Oe(u("input", {
3761
3761
  type: "text",
3762
- "onUpdate:modelValue": D[1] || (D[1] = (N) => k.value = N),
3762
+ "onUpdate:modelValue": A[1] || (A[1] = (N) => k.value = N),
3763
3763
  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",
3764
3764
  placeholder: "Введіть назву файлу"
3765
3765
  }, null, 512), [
@@ -3779,24 +3779,24 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3779
3779
  prefix: e.prefix,
3780
3780
  item: N,
3781
3781
  index: W,
3782
- onUpdate: D[2] || (D[2] = (z) => M.$emit("update", "file-list")),
3783
- onOpenModal: D[3] || (D[3] = (z) => b(z)),
3784
- onOpenLightbox: D[4] || (D[4] = (z) => g(z))
3782
+ onUpdate: A[2] || (A[2] = (z) => M.$emit("update", "file-list")),
3783
+ onOpenModal: A[3] || (A[3] = (z) => b(z)),
3784
+ onOpenLightbox: A[4] || (A[4] = (z) => g(z))
3785
3785
  }, null, 8, ["prefix", "item", "index"]))), 128)),
3786
- S.value.length ? q("", !0) : (i(), p("div", Pi, [...D[8] || (D[8] = [
3786
+ S.value.length ? q("", !0) : (i(), p("div", Pi, [...A[8] || (A[8] = [
3787
3787
  u("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
3788
3788
  ])]))
3789
3789
  ])) : q("", !0),
3790
3790
  G(U, {
3791
3791
  modelValue: r.value,
3792
- "onUpdate:modelValue": D[5] || (D[5] = (N) => r.value = N),
3792
+ "onUpdate:modelValue": A[5] || (A[5] = (N) => r.value = N),
3793
3793
  startIndex: o.value,
3794
- "onUpdate:index": D[6] || (D[6] = (N) => o.value = N),
3794
+ "onUpdate:index": A[6] || (A[6] = (N) => o.value = N),
3795
3795
  images: C.value
3796
3796
  }, null, 8, ["modelValue", "startIndex", "images"]),
3797
- G(X, Kt({
3797
+ G(Z, Kt({
3798
3798
  modelValue: c.value,
3799
- "onUpdate:modelValue": D[7] || (D[7] = (N) => c.value = N),
3799
+ "onUpdate:modelValue": A[7] || (A[7] = (N) => c.value = N),
3800
3800
  onConfirm: f.value.confirm
3801
3801
  }, f.value), null, 16, ["modelValue", "onConfirm"])
3802
3802
  ]);
@@ -3819,7 +3819,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3819
3819
  }
3820
3820
  },
3821
3821
  setup(e) {
3822
- const t = e, n = A(t.isOpen);
3822
+ const t = e, n = D(t.isOpen);
3823
3823
  return he(
3824
3824
  () => t.isOpen,
3825
3825
  (a) => {
@@ -3863,7 +3863,7 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3863
3863
  }
3864
3864
  },
3865
3865
  setup(e) {
3866
- const t = e, n = A(t.isOpen);
3866
+ const t = e, n = D(t.isOpen);
3867
3867
  return he(
3868
3868
  () => t.isOpen,
3869
3869
  (a) => {
@@ -3929,13 +3929,13 @@ const Is = /* @__PURE__ */ He(Ss, [["render", As]]), Fs = /* @__PURE__ */ pe({
3929
3929
  Contain: "*",
3930
3930
  In: "in",
3931
3931
  NotIn: "not_in"
3932
- }, Xi = (e, t) => String(e) === String(t), Zi = (e, t) => String(e) !== String(t), Ji = (e, t) => e > t, Qi = (e, t) => e >= t, eu = (e, t) => e < t, tu = (e, t) => e <= t, nu = (e, t) => Array.isArray(t) && t.length === 2 ? e >= t[0] && e <= t[1] : !1, lu = (e, t) => String(e).startsWith(String(t)), au = (e, t) => String(e).endsWith(String(t)), ou = (e, t) => String(e).includes(String(t)), ru = (e, t) => Array.isArray(t) ? t.includes(e) : !1, su = (e, t) => Array.isArray(t) ? !t.includes(e) : !0, iu = (e, t) => {
3932
+ }, Zi = (e, t) => String(e) === String(t), Xi = (e, t) => String(e) !== String(t), Ji = (e, t) => e > t, Qi = (e, t) => e >= t, eu = (e, t) => e < t, tu = (e, t) => e <= t, nu = (e, t) => Array.isArray(t) && t.length === 2 ? e >= t[0] && e <= t[1] : !1, lu = (e, t) => String(e).startsWith(String(t)), au = (e, t) => String(e).endsWith(String(t)), ou = (e, t) => String(e).includes(String(t)), ru = (e, t) => Array.isArray(t) ? t.includes(e) : !1, su = (e, t) => Array.isArray(t) ? !t.includes(e) : !0, iu = (e, t) => {
3933
3933
  if (!t) return !0;
3934
3934
  switch (t?.[1]) {
3935
3935
  case wt.Equal:
3936
- return Xi(e, t?.[2]);
3937
- case wt.Inequal:
3938
3936
  return Zi(e, t?.[2]);
3937
+ case wt.Inequal:
3938
+ return Xi(e, t?.[2]);
3939
3939
  case wt.Higer:
3940
3940
  return Ji(e, t?.[2]);
3941
3941
  case wt.HigerOrEqual:
@@ -3992,7 +3992,7 @@ const uu = /* @__PURE__ */ pe({
3992
3992
  }
3993
3993
  },
3994
3994
  setup(e) {
3995
- const t = e, n = ot("values", A({})), a = ot("form"), l = y(() => t.schema?.filter((s) => fa(
3995
+ const t = e, n = ot("values", D({})), a = ot("form"), l = y(() => t.schema?.filter((s) => fa(
3996
3996
  n.value,
3997
3997
  s?.conditions,
3998
3998
  t.name || void 0
@@ -4033,7 +4033,7 @@ const uu = /* @__PURE__ */ pe({
4033
4033
  modelValue: l,
4034
4034
  onCreated: r
4035
4035
  }) => {
4036
- const o = A(!1), s = A({}), c = A([]), f = A(null), h = y(() => e.add?.title || "Додати"), k = y(() => e.add?.token || e.add?.model || ""), C = y(() => e.add?.pk || "id");
4036
+ const o = D(!1), s = D({}), c = D([]), f = D(null), h = y(() => e.add?.title || "Додати"), k = y(() => e.add?.token || e.add?.model || ""), C = y(() => e.add?.pk || "id");
4037
4037
  return {
4038
4038
  isOpenAdd: o,
4039
4039
  addData: s,
@@ -4047,9 +4047,9 @@ const uu = /* @__PURE__ */ pe({
4047
4047
  method: "POST",
4048
4048
  headers: { "Content-Type": "application/json" },
4049
4049
  body: JSON.stringify(s.value)
4050
- }), b = await _.json().catch(() => ({})), M = b?.error || b?.message, D = Number(b?.code) >= 400;
4051
- if (!_.ok || D) {
4052
- De({
4050
+ }), b = await _.json().catch(() => ({})), M = b?.error || b?.message, A = Number(b?.code) >= 400;
4051
+ if (!_.ok || A) {
4052
+ Ae({
4053
4053
  title: "Помилка",
4054
4054
  type: "error",
4055
4055
  message: M || `Код помилки: ${b?.code || _.status}`
@@ -4058,17 +4058,17 @@ const uu = /* @__PURE__ */ pe({
4058
4058
  }
4059
4059
  const U = b?.[C.value] ?? b?.id;
4060
4060
  if (!U) {
4061
- De({
4061
+ Ae({
4062
4062
  title: "Помилка",
4063
4063
  type: "error",
4064
4064
  message: "Обʼєкт створено, але в відповіді відсутній ID."
4065
4065
  });
4066
4066
  return;
4067
4067
  }
4068
- const X = await t(U);
4069
- X && (n.value.some((W) => String(W?.id) === String(X.id)) || n.value.push(X)), r ? await r(X, U) : X && (a.value = X, l.value = U), o.value = !1, De({ title: "Успіх", message: "Обʼєкт успішно створено." });
4068
+ const Z = await t(U);
4069
+ Z && (n.value.some((W) => String(W?.id) === String(Z.id)) || n.value.push(Z)), r ? await r(Z, U) : Z && (a.value = Z, l.value = U), o.value = !1, Ae({ title: "Успіх", message: "Обʼєкт успішно створено." });
4070
4070
  } catch (v) {
4071
- De({
4071
+ Ae({
4072
4072
  title: "Помилка",
4073
4073
  type: "error",
4074
4074
  message: v?.message || "Не вдалося створити обʼєкт."
@@ -4306,7 +4306,7 @@ const uu = /* @__PURE__ */ pe({
4306
4306
  ])
4307
4307
  ], 42, du));
4308
4308
  }
4309
- }), Du = ["aria-disabled", "onMousedown"], Au = { class: "leading-[19px]" }, Iu = ["innerHTML"], Fu = {
4309
+ }), Au = ["aria-disabled", "onMousedown"], Du = { class: "leading-[19px]" }, Iu = ["innerHTML"], Fu = {
4310
4310
  key: 1,
4311
4311
  class: "px-3 py-2 text-center text-gray-500"
4312
4312
  }, Tu = /* @__PURE__ */ pe({
@@ -4373,7 +4373,7 @@ const uu = /* @__PURE__ */ pe({
4373
4373
  focusable: "false"
4374
4374
  }))
4375
4375
  ], 6)) : q("", !0),
4376
- u("div", Au, [
4376
+ u("div", Du, [
4377
4377
  e.optionTemplate ? (i(), p("div", {
4378
4378
  key: 0,
4379
4379
  innerHTML: e.renderTemplate(a)
@@ -4381,7 +4381,7 @@ const uu = /* @__PURE__ */ pe({
4381
4381
  Ke(de(a.text), 1)
4382
4382
  ], 64))
4383
4383
  ])
4384
- ], 42, Du))), 128)) : (i(), p("div", Fu, " No options "))
4384
+ ], 42, Au))), 128)) : (i(), p("div", Fu, " No options "))
4385
4385
  ], 4)
4386
4386
  ], 4)) : q("", !0)
4387
4387
  ]));
@@ -4425,21 +4425,21 @@ const uu = /* @__PURE__ */ pe({
4425
4425
  set: (O) => a("update:modelValue", O)
4426
4426
  });
4427
4427
  !s.value && n.defaultValue && (s.value = n.defaultValue);
4428
- const c = A(null), f = A(null), h = A(null), k = A(null), C = A(!1), S = A(!1), g = A(null), w = A(-1), v = A([]), _ = A(""), b = A(null), M = (O) => {
4428
+ const c = D(null), f = D(null), h = D(null), k = D(null), C = D(!1), S = D(!1), g = D(null), w = D(-1), v = D([]), _ = D(""), b = D(null), M = (O) => {
4429
4429
  f.value = O;
4430
- }, D = (O) => {
4430
+ }, A = (O) => {
4431
4431
  b.value = O;
4432
4432
  }, U = (O) => {
4433
4433
  k.value = O;
4434
- }, X = (O) => {
4434
+ }, Z = (O) => {
4435
4435
  h.value = O;
4436
4436
  }, N = (O, ne) => {
4437
4437
  v.value[ne] = O;
4438
- }, W = A({}), z = A([]), te = y(() => {
4438
+ }, W = D({}), z = D([]), te = y(() => {
4439
4439
  if (!z.value.length) return [];
4440
4440
  const O = Ve.value, ne = new Map(O.map(($e) => [$e.id?.toString(), $e]));
4441
4441
  return z.value.map(($e) => ne.get($e?.toString())).filter(($e) => !!$e);
4442
- }), le = y(() => n.placeholder || "Select..."), j = y(() => P(g.value)), H = y(() => r.value ? !1 : l.value ? z.value.length > 0 : !!s.value), ee = (O) => l.value ? z.value.some((ne) => ne?.toString() === O?.toString()) : s.value?.toString() === O?.toString(), Z = y(() => {
4442
+ }), le = y(() => n.placeholder || "Select..."), j = y(() => P(g.value)), H = y(() => r.value ? !1 : l.value ? z.value.length > 0 : !!s.value), ee = (O) => l.value ? z.value.some((ne) => ne?.toString() === O?.toString()) : s.value?.toString() === O?.toString(), X = y(() => {
4443
4443
  let O = Ve.value ?? [];
4444
4444
  if (!n.data && _.value.trim() !== "") {
4445
4445
  const ne = _.value.toLowerCase();
@@ -4480,7 +4480,7 @@ const uu = /* @__PURE__ */ pe({
4480
4480
  [Pu]: O
4481
4481
  }
4482
4482
  };
4483
- }, Ae = (O) => {
4483
+ }, De = (O) => {
4484
4484
  if (!n.set) return;
4485
4485
  const ne = ve?.value;
4486
4486
  !ne && !ce || Object.entries(n.set).forEach(([$e, Re]) => {
@@ -4495,7 +4495,7 @@ const uu = /* @__PURE__ */ pe({
4495
4495
  parentValue: Be,
4496
4496
  fetchOptions: Ye,
4497
4497
  fetchOptionByValue: We,
4498
- loadOptions: Xe
4498
+ loadOptions: Ze
4499
4499
  } = Kn({
4500
4500
  props: n,
4501
4501
  formValues: ve,
@@ -4525,7 +4525,7 @@ const uu = /* @__PURE__ */ pe({
4525
4525
  return;
4526
4526
  }
4527
4527
  Ve.value = O;
4528
- }, Le = A(0), Ie = async (O) => {
4528
+ }, Le = D(0), Ie = async (O) => {
4529
4529
  const ne = ++Le.value, $e = await Ye(O);
4530
4530
  return ne !== Le.value ? null : $e;
4531
4531
  }, Ge = async () => {
@@ -4533,7 +4533,7 @@ const uu = /* @__PURE__ */ pe({
4533
4533
  const O = await Ie(_.value);
4534
4534
  return O && ue(O), Ve.value;
4535
4535
  }
4536
- return Xe();
4536
+ return Ze();
4537
4537
  }, rt = async (O) => {
4538
4538
  if (O == null || O === "") return null;
4539
4539
  const ne = Ve.value?.find(($e) => $e?.id?.toString() === String(O));
@@ -4546,13 +4546,13 @@ const uu = /* @__PURE__ */ pe({
4546
4546
  dt && Ve.value.push(dt);
4547
4547
  }, Promise.resolve());
4548
4548
  }, J = () => {
4549
- if (!Z.value.length) {
4549
+ if (!X.value.length) {
4550
4550
  w.value = -1;
4551
4551
  return;
4552
4552
  }
4553
4553
  let O = 0;
4554
4554
  if (!l.value && g.value) {
4555
- const ne = g.value.id?.toString(), $e = Z.value.findIndex((Re) => Re.id?.toString() === ne);
4555
+ const ne = g.value.id?.toString(), $e = X.value.findIndex((Re) => Re.id?.toString() === ne);
4556
4556
  $e >= 0 && (O = $e);
4557
4557
  }
4558
4558
  w.value = O, et(() => {
@@ -4580,7 +4580,7 @@ const uu = /* @__PURE__ */ pe({
4580
4580
  await ie();
4581
4581
  }
4582
4582
  }, Ee = () => {
4583
- l.value ? (z.value = [], s.value = [], a("change", []), E(null, [])) : (g.value = null, s.value = null, a("change", null), E(null, null)), Ae(null), _.value = "", et(() => {
4583
+ l.value ? (z.value = [], s.value = [], a("change", []), E(null, [])) : (g.value = null, s.value = null, a("change", null), E(null, null)), De(null), _.value = "", et(() => {
4584
4584
  b.value?.focus(), C.value || ie();
4585
4585
  });
4586
4586
  }, je = (O) => {
@@ -4594,8 +4594,8 @@ const uu = /* @__PURE__ */ pe({
4594
4594
  });
4595
4595
  }, x = (O, ne = "manual") => {
4596
4596
  l.value ? (ee(O.id) || (z.value = [...z.value, O.id], s.value = [...z.value], a("change", s.value), E(O)), _.value = "", et(() => {
4597
- b.value?.focus(), w.value = Math.min(w.value, Z.value.length - 1);
4598
- }), Ae(null)) : (g.value = O, s.value = O.id, a("change", s.value), E(O), _.value = "", be(), Ae(O), ne === "parent-auto" && xe({
4597
+ b.value?.focus(), w.value = Math.min(w.value, X.value.length - 1);
4598
+ }), De(null)) : (g.value = O, s.value = O.id, a("change", s.value), E(O), _.value = "", be(), De(O), ne === "parent-auto" && xe({
4599
4599
  source: ne,
4600
4600
  parentField: n.parent ?? null,
4601
4601
  parentValue: Be.value ?? null
@@ -4643,20 +4643,20 @@ const uu = /* @__PURE__ */ pe({
4643
4643
  transform: _t ? "none" : "translateY(-100%)",
4644
4644
  top: _t ? `${O.bottom + Qe}px` : `${O.top - Qe}px`
4645
4645
  };
4646
- }, Ze = async (O) => {
4646
+ }, Xe = async (O) => {
4647
4647
  r.value || !C.value && (O.key === "ArrowDown" || O.key === "ArrowUp") && (O.preventDefault(), await ie());
4648
4648
  }, qe = (O) => {
4649
4649
  if (!C.value) return;
4650
4650
  const { key: ne } = O;
4651
4651
  if (ne === "ArrowDown")
4652
- O.preventDefault(), w.value + 1 < Z.value.length && (w.value += 1, F(v.value[w.value], h.value));
4652
+ O.preventDefault(), w.value + 1 < X.value.length && (w.value += 1, F(v.value[w.value], h.value));
4653
4653
  else if (ne === "ArrowUp")
4654
4654
  O.preventDefault(), w.value > 0 && (w.value -= 1, F(v.value[w.value], h.value));
4655
4655
  else if (ne === "Enter") {
4656
4656
  O.preventDefault();
4657
- const $e = Z.value[w.value];
4657
+ const $e = X.value[w.value];
4658
4658
  $e && x($e), b.value?.blur();
4659
- } else ne === "Escape" ? (O.preventDefault(), be()) : ne === "Backspace" ? l.value && _.value === "" && z.value.length && (z.value = z.value.slice(0, -1), s.value = [...z.value], a("change", s.value)) : ne === "Home" ? (w.value = 0, F(v.value[0], h.value)) : ne === "End" ? (w.value = Z.value.length - 1, F(v.value[w.value], h.value)) : ne === "Tab" && be();
4659
+ } else ne === "Escape" ? (O.preventDefault(), be()) : ne === "Backspace" ? l.value && _.value === "" && z.value.length && (z.value = z.value.slice(0, -1), s.value = [...z.value], a("change", s.value)) : ne === "Home" ? (w.value = 0, F(v.value[0], h.value)) : ne === "End" ? (w.value = X.value.length - 1, F(v.value[w.value], h.value)) : ne === "Tab" && be();
4660
4660
  }, ut = () => {
4661
4661
  r.value || (S.value = !0);
4662
4662
  }, Ct = () => {
@@ -4668,7 +4668,7 @@ const uu = /* @__PURE__ */ pe({
4668
4668
  c.value?.contains(ne) || k.value?.contains(ne) || be();
4669
4669
  }, ht = (O) => {
4670
4670
  C.value && h.value && !h.value.contains(O.target) && _e();
4671
- }, Xt = () => {
4671
+ }, Zt = () => {
4672
4672
  C.value && _e();
4673
4673
  }, $n = () => {
4674
4674
  C.value && _e();
@@ -4681,13 +4681,13 @@ const uu = /* @__PURE__ */ pe({
4681
4681
  const O = s.value[0] ?? null;
4682
4682
  s.value = O ?? null;
4683
4683
  }
4684
- s.value != null && (g.value = await rt(s.value)), Ae(g.value ?? null);
4684
+ s.value != null && (g.value = await rt(s.value)), De(g.value ?? null);
4685
4685
  }
4686
4686
  }
4687
4687
  he(s, () => {
4688
4688
  Ut();
4689
4689
  }), at(async () => {
4690
- if (addEventListener("keydown", St), addEventListener("scroll", ht, !0), addEventListener("resize", Xt), document.addEventListener("click", Je, !0), f.value && fe(f.value).addEventListener("scroll", $n, !0), n.options?.length && !n.data)
4690
+ if (addEventListener("keydown", St), addEventListener("scroll", ht, !0), addEventListener("resize", Zt), document.addEventListener("click", Je, !0), f.value && fe(f.value).addEventListener("scroll", $n, !0), n.options?.length && !n.data)
4691
4691
  Ve.value = [...n.options];
4692
4692
  else if (n.data) {
4693
4693
  const O = await Ie("");
@@ -4695,12 +4695,12 @@ const uu = /* @__PURE__ */ pe({
4695
4695
  }
4696
4696
  await Ut(), Ht.value = !1;
4697
4697
  }), sn(() => {
4698
- removeEventListener("keydown", St), removeEventListener("scroll", ht, !0), removeEventListener("resize", Xt), document.removeEventListener("click", Je, !0), f.value && fe(f.value).removeEventListener("scroll", $n, !0);
4698
+ removeEventListener("keydown", St), removeEventListener("scroll", ht, !0), removeEventListener("resize", Zt), document.removeEventListener("click", Je, !0), f.value && fe(f.value).removeEventListener("scroll", $n, !0);
4699
4699
  });
4700
4700
  const {
4701
4701
  isOpenAdd: cn,
4702
- addData: At,
4703
- addSchema: Zt,
4702
+ addData: Dt,
4703
+ addSchema: Xt,
4704
4704
  addForm: Jn,
4705
4705
  addTitle: Pt,
4706
4706
  addOption: Qn,
@@ -4727,7 +4727,7 @@ const uu = /* @__PURE__ */ pe({
4727
4727
  }), he(() => n.options, (O) => {
4728
4728
  !n.data && O?.length && (Ve.value = [...O], Ut());
4729
4729
  }, { immediate: !0 });
4730
- const Ht = A(!0);
4730
+ const Ht = D(!0);
4731
4731
  return he(Be, async () => {
4732
4732
  if (n.data && (Ht.value || (l.value ? (z.value = [], s.value = [], a("change", [])) : (g.value = null, s.value = null, a("change", null))), await Ge(), n.auto === 1 && Be.value && Ve.value.length > 0)) {
4733
4733
  const O = Ve.value[0];
@@ -4745,9 +4745,9 @@ const uu = /* @__PURE__ */ pe({
4745
4745
  }, {
4746
4746
  default: it(() => [
4747
4747
  G(zt, {
4748
- schema: R(Zt),
4749
- modelValue: R(At),
4750
- "onUpdate:modelValue": ne[0] || (ne[0] = ($e) => jn(At) ? At.value = $e : null),
4748
+ schema: R(Xt),
4749
+ modelValue: R(Dt),
4750
+ "onUpdate:modelValue": ne[0] || (ne[0] = ($e) => jn(Dt) ? Dt.value = $e : null),
4751
4751
  ref_key: "addForm",
4752
4752
  ref: Jn
4753
4753
  }, null, 8, ["schema", "modelValue"])
@@ -4792,14 +4792,14 @@ const uu = /* @__PURE__ */ pe({
4792
4792
  "selected-option": g.value,
4793
4793
  "show-clear": H.value,
4794
4794
  "set-trigger-ref": M,
4795
- "set-input-ref": D,
4795
+ "set-input-ref": A,
4796
4796
  "should-show-color-dot": Y,
4797
4797
  "option-has-icon": Ce,
4798
4798
  "get-icon-color-style": ge,
4799
4799
  "resolve-option-icon": ye,
4800
4800
  "render-template": Se,
4801
4801
  "get-label": P,
4802
- "on-control-keydown": Ze,
4802
+ "on-control-keydown": Xe,
4803
4803
  "on-control-click": re,
4804
4804
  "on-input-focus": ut,
4805
4805
  "on-input-blur": Ct,
@@ -4811,12 +4811,12 @@ const uu = /* @__PURE__ */ pe({
4811
4811
  G(Tu, {
4812
4812
  "is-open": C.value,
4813
4813
  "dropdown-style": W.value,
4814
- "filtered-options-list": Z.value,
4814
+ "filtered-options-list": X.value,
4815
4815
  "selected-nav-index": w.value,
4816
4816
  "option-template": Me.value,
4817
4817
  "icon-wrapper-class": jl,
4818
4818
  "set-dropdown-ref": U,
4819
- "set-list-ref": X,
4819
+ "set-list-ref": Z,
4820
4820
  "set-item-ref": N,
4821
4821
  "is-selected": ee,
4822
4822
  "on-option-click": V,
@@ -4844,7 +4844,7 @@ const uu = /* @__PURE__ */ pe({
4844
4844
  }), zl = /* @__PURE__ */ He(Ou, [["__scopeId", "data-v-548e9de9"]]), Sl = (e = "") => `${e}${Math.floor(Math.random() * 1e4)}`, Bu = ["disabled", "aria-expanded"], Ru = { class: "truncate" }, Nu = { class: "py-2 px-4" }, ju = { class: "block font-medium text-[13px] text-foreground" }, zu = { class: "truncate" }, Uu = { class: "p-1 border-t border-gray-200" }, Hu = { class: "space-y-0.5 max-h-48 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-none [&::-webkit-scrollbar-track]:bg-scrollbar-track [&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb" }, qu = ["onClick"], Wu = ["checked"], Ku = { class: "shrink-0 size-3.5 flex justify-center items-center" }, Gu = {
4845
4845
  key: 1,
4846
4846
  class: "shrink-0 size-2 block mx-auto rounded-full bg-secondary/60"
4847
- }, Yu = { class: "truncate" }, Xu = {
4847
+ }, Yu = { class: "truncate" }, Zu = {
4848
4848
  key: 0,
4849
4849
  class: "px-3 py-2 text-xs text-stone-500"
4850
4850
  }, ol = /* @__PURE__ */ pe({
@@ -4886,9 +4886,9 @@ const uu = /* @__PURE__ */ pe({
4886
4886
  set: (se) => a("update:modelValue", se)
4887
4887
  });
4888
4888
  l.value == null && n.defaultValue != null && (l.value = n.defaultValue);
4889
- const r = ot("values"), o = ot("field-props"), s = y(() => !!n.disabled), c = A(null), f = A(!1), h = A(null), k = A(null), C = A(null), S = A({}), g = `vs-input-inline-select-${Sl()}`, w = y(() => n.placeholder || "Оберіть значення"), v = y(() => U(c.value) || n.placeholder || "Оберіть значення"), _ = y(() => n.slot ?? ""), b = y(() => Wn(_.value)), M = y(() => n.teleport || "body"), D = /^#(?:[\da-fA-F]{3}|[\da-fA-F]{6}|[\da-fA-F]{8})$/, U = (se) => Yn(se, _.value), X = (se) => !!(!b.value && Gt(se)), N = y(() => {
4889
+ const r = ot("values"), o = ot("field-props"), s = y(() => !!n.disabled), c = D(null), f = D(!1), h = D(null), k = D(null), C = D(null), S = D({}), g = `vs-input-inline-select-${Sl()}`, w = y(() => n.placeholder || "Оберіть значення"), v = y(() => U(c.value) || n.placeholder || "Оберіть значення"), _ = y(() => n.slot ?? ""), b = y(() => Wn(_.value)), M = y(() => n.teleport || "body"), A = /^#(?:[\da-fA-F]{3}|[\da-fA-F]{6}|[\da-fA-F]{8})$/, U = (se) => Yn(se, _.value), Z = (se) => !!(!b.value && Gt(se)), N = y(() => {
4890
4890
  const se = Gt(c.value).trim();
4891
- return se ? D.test(se) ? `bg-[${se}] border-[${se}]` : `bg-${se.toLowerCase()}-500 border-${se.toLowerCase()}-500` : "";
4891
+ return se ? A.test(se) ? `bg-[${se}] border-[${se}]` : `bg-${se.toLowerCase()}-500 border-${se.toLowerCase()}-500` : "";
4892
4892
  }), {
4893
4893
  optionsList: W,
4894
4894
  parentValue: z,
@@ -4899,16 +4899,16 @@ const uu = /* @__PURE__ */ pe({
4899
4899
  props: n,
4900
4900
  formValues: r,
4901
4901
  watchParent: !1
4902
- }), H = (se, xe, Ae) => {
4902
+ }), H = (se, xe, De) => {
4903
4903
  if (!o) return !1;
4904
- const Ve = o.value?.[se] ?? {}, Be = (We, Xe, Q) => {
4905
- if (!Xe.length) return We;
4906
- const [ue, ...Le] = Xe, Ie = { ...We };
4904
+ const Ve = o.value?.[se] ?? {}, Be = (We, Ze, Q) => {
4905
+ if (!Ze.length) return We;
4906
+ const [ue, ...Le] = Ze, Ie = { ...We };
4907
4907
  if (!Le.length)
4908
4908
  return Ie[ue] = Q, Ie;
4909
4909
  const Ge = typeof We[ue] == "object" && We[ue] !== null ? We[ue] : {};
4910
4910
  return Ie[ue] = Be(Ge, Le, Q), Ie;
4911
- }, Ye = Be(Ve, xe, Ae);
4911
+ }, Ye = Be(Ve, xe, De);
4912
4912
  return o.value = {
4913
4913
  ...o.value || {},
4914
4914
  [se]: Ye
@@ -4916,23 +4916,23 @@ const uu = /* @__PURE__ */ pe({
4916
4916
  }, ee = (se) => {
4917
4917
  if (!n.set) return;
4918
4918
  const xe = r?.value;
4919
- !xe && !o || Object.entries(n.set).forEach(([Ae, Ve]) => {
4920
- if (!Ae) return;
4921
- const Be = se ? se[Ve] : null, Ye = Ae.split(".").map((Q) => Q.trim()).filter(Boolean);
4919
+ !xe && !o || Object.entries(n.set).forEach(([De, Ve]) => {
4920
+ if (!De) return;
4921
+ const Be = se ? se[Ve] : null, Ye = De.split(".").map((Q) => Q.trim()).filter(Boolean);
4922
4922
  if (!Ye.length) return;
4923
- const [We, ...Xe] = Ye;
4924
- Xe.length && H(We, Xe, Be ?? null) || xe && (xe[We] = Be ?? null);
4923
+ const [We, ...Ze] = Ye;
4924
+ Ze.length && H(We, Ze, Be ?? null) || xe && (xe[We] = Be ?? null);
4925
4925
  });
4926
- }, Z = (se) => l.value?.toString?.() === se?.toString?.(), ve = () => {
4926
+ }, X = (se) => l.value?.toString?.() === se?.toString?.(), ve = () => {
4927
4927
  if (!k.value || typeof window > "u") return;
4928
- const se = k.value.getBoundingClientRect(), xe = 8, Ae = 8, Ve = window.innerHeight || document.documentElement.clientHeight, Be = window.innerWidth || document.documentElement.clientWidth, Ye = C.value?.offsetHeight || 260, We = Math.max(se.width, 176), Xe = Math.max(Be - xe * 2, 120), Q = Math.min(We, Xe);
4928
+ const se = k.value.getBoundingClientRect(), xe = 8, De = 8, Ve = window.innerHeight || document.documentElement.clientHeight, Be = window.innerWidth || document.documentElement.clientWidth, Ye = C.value?.offsetHeight || 260, We = Math.max(se.width, 176), Ze = Math.max(Be - xe * 2, 120), Q = Math.min(We, Ze);
4929
4929
  let ue = se.left;
4930
4930
  ue + Q + xe > Be && (ue = Be - Q - xe), ue = Math.max(ue, xe);
4931
- const Le = Ve - se.bottom - Ae - xe, Ie = se.top - Ae - xe, Ge = Le < Math.min(Ye, 260) && Ie > Le, rt = Math.max(120, Math.min(320, Ge ? Ie : Le));
4931
+ const Le = Ve - se.bottom - De - xe, Ie = se.top - De - xe, Ge = Le < Math.min(Ye, 260) && Ie > Le, rt = Math.max(120, Math.min(320, Ge ? Ie : Le));
4932
4932
  S.value = {
4933
4933
  position: "fixed",
4934
4934
  left: `${ue}px`,
4935
- top: Ge ? `${se.top - Ae}px` : `${se.bottom + Ae}px`,
4935
+ top: Ge ? `${se.top - De}px` : `${se.bottom + De}px`,
4936
4936
  transform: Ge ? "translateY(-100%)" : "none",
4937
4937
  width: `${Q}px`,
4938
4938
  maxHeight: `${rt}px`
@@ -5027,38 +5027,38 @@ const uu = /* @__PURE__ */ pe({
5027
5027
  ]),
5028
5028
  u("div", Uu, [
5029
5029
  u("div", Hu, [
5030
- (i(!0), p(Fe, null, Ne(R(W), (Ae) => (i(), p("label", {
5031
- key: Ae.id,
5030
+ (i(!0), p(Fe, null, Ne(R(W), (De) => (i(), p("label", {
5031
+ key: De.id,
5032
5032
  class: "py-1.5 px-3 group flex items-center gap-x-3 rounded-lg cursor-pointer text-[13px] text-gray-800 hover:bg-gray-100",
5033
- onClick: Te((Ve) => Y(Ae), ["prevent"])
5033
+ onClick: Te((Ve) => Y(De), ["prevent"])
5034
5034
  }, [
5035
5035
  u("input", {
5036
5036
  type: "radio",
5037
5037
  class: "hidden",
5038
5038
  name: g,
5039
- checked: Z(Ae.id),
5039
+ checked: X(De.id),
5040
5040
  tabindex: "-1"
5041
5041
  }, null, 8, Wu),
5042
5042
  u("span", Ku, [
5043
- X(Ae) ? (i(), p("span", {
5043
+ Z(De) ? (i(), p("span", {
5044
5044
  key: 0,
5045
5045
  class: "shrink-0 size-2 block mx-auto rounded-full",
5046
- style: Pe({ backgroundColor: Ae.color })
5046
+ style: Pe({ backgroundColor: De.color })
5047
5047
  }, null, 4)) : (i(), p("span", Gu))
5048
5048
  ]),
5049
- u("span", Yu, de(U(Ae)), 1),
5049
+ u("span", Yu, de(U(De)), 1),
5050
5050
  G(R(Jl), {
5051
- class: oe(["shrink-0 size-3.5 ms-auto transition-opacity", Z(Ae.id) ? "opacity-100" : "opacity-0"])
5051
+ class: oe(["shrink-0 size-3.5 ms-auto transition-opacity", X(De.id) ? "opacity-100" : "opacity-0"])
5052
5052
  }, null, 8, ["class"])
5053
5053
  ], 8, qu))), 128))
5054
5054
  ]),
5055
- R(W).length ? q("", !0) : (i(), p("p", Xu, "Немає варіантів"))
5055
+ R(W).length ? q("", !0) : (i(), p("p", Zu, "Немає варіантів"))
5056
5056
  ])
5057
5057
  ], 4)) : q("", !0)
5058
5058
  ], 8, ["to"]))
5059
5059
  ], 512));
5060
5060
  }
5061
- }), Zu = ["placeholder", "disabled"], Ju = /* @__PURE__ */ pe({
5061
+ }), Xu = ["placeholder", "disabled"], Ju = /* @__PURE__ */ pe({
5062
5062
  __name: "vs-input-textarea",
5063
5063
  props: /* @__PURE__ */ ze({
5064
5064
  style: { default: () => ({}) },
@@ -5090,7 +5090,7 @@ const uu = /* @__PURE__ */ pe({
5090
5090
  style: {
5091
5091
  border: "1px solid #CFD9E0"
5092
5092
  }
5093
- }, null, 42, Zu)), [
5093
+ }, null, 42, Xu)), [
5094
5094
  [tt, a.value]
5095
5095
  ]);
5096
5096
  }
@@ -5114,7 +5114,7 @@ const uu = /* @__PURE__ */ pe({
5114
5114
  }),
5115
5115
  emits: ["update:modelValue"],
5116
5116
  setup(e) {
5117
- const t = Ea(() => import("./vs-richtext-K230c1Zr.js")), n = e, { inputClass: a } = mt(n.style), l = Ue(e, "modelValue"), r = y(() => !!n.disabled), o = y(() => n.placeholder ?? ""), s = y(() => ({
5117
+ const t = Ea(() => import("./vs-richtext-u2lxME-n.js")), n = e, { inputClass: a } = mt(n.style), l = Ue(e, "modelValue"), r = y(() => !!n.disabled), o = y(() => n.placeholder ?? ""), s = y(() => ({
5118
5118
  height: n.richtextProps.height || "300px",
5119
5119
  format: n.format,
5120
5120
  ...n.richtextProps
@@ -5165,7 +5165,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5165
5165
  }, Md = {
5166
5166
  key: 2,
5167
5167
  class: "text-sm font-medium text-gray-900"
5168
- }, Vd = { class: "px-4 py-3 text-right whitespace-nowrap" }, Ld = { class: "flex items-center justify-end gap-2" }, Dd = ["onClick"], Ad = ["onClick"], Id = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Fd = /* @__PURE__ */ pe({
5168
+ }, Vd = { class: "px-4 py-3 text-right whitespace-nowrap" }, Ld = { class: "flex items-center justify-end gap-2" }, Ad = ["onClick"], Dd = ["onClick"], Id = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Fd = /* @__PURE__ */ pe({
5169
5169
  __name: "vs-input-datatable",
5170
5170
  props: /* @__PURE__ */ ze({
5171
5171
  actions: {},
@@ -5185,7 +5185,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5185
5185
  }),
5186
5186
  emits: ["update:modelValue"],
5187
5187
  setup(e) {
5188
- const t = e, n = Pa(), a = (B) => t.actions === void 0 ? !0 : t.actions.includes(B), l = ["search", "import", "export", "add"], r = y(() => l.some((B) => a(B))), o = Ue(e, "modelValue"), s = A({}), c = A(""), f = A(null), h = A("asc"), k = y(() => {
5188
+ const t = e, n = Pa(), a = (B) => t.actions === void 0 ? !0 : t.actions.includes(B), l = ["search", "import", "export", "add"], r = y(() => l.some((B) => a(B))), o = Ue(e, "modelValue"), s = D({}), c = D(""), f = D(null), h = D("asc"), k = y(() => {
5189
5189
  const B = o.value ?? [], J = c.value ? B.filter((T) => C.value?.some((re) => {
5190
5190
  const Ee = re.key || re.name;
5191
5191
  if (!Ee) return !1;
@@ -5198,7 +5198,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5198
5198
  return typeof Ee == "number" && typeof je == "number" ? Ee - je : String(Ee).localeCompare(String(je));
5199
5199
  });
5200
5200
  return h.value === "asc" ? be : be.reverse();
5201
- }), C = y(() => (t.colModel ?? []).filter((B) => !B.tableHidden)), S = A(null), g = A(null), w = A(null);
5201
+ }), C = y(() => (t.colModel ?? []).filter((B) => !B.tableHidden)), S = D(null), g = D(null), w = D(null);
5202
5202
  function v(B) {
5203
5203
  return B.pointerType === "touch" || B.pointerType === "pen";
5204
5204
  }
@@ -5219,7 +5219,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5219
5219
  const J = _(B.clientX, B.clientY);
5220
5220
  J !== null && (g.value = J);
5221
5221
  }
5222
- function D(B) {
5222
+ function A(B) {
5223
5223
  if (S.value === null || !v(B)) return;
5224
5224
  B.preventDefault();
5225
5225
  const J = _(B.clientX, B.clientY);
@@ -5238,7 +5238,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5238
5238
  }
5239
5239
  }
5240
5240
  }
5241
- const X = (B) => {
5241
+ const Z = (B) => {
5242
5242
  S.value = B;
5243
5243
  }, N = (B) => {
5244
5244
  g.value = B;
@@ -5278,7 +5278,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5278
5278
  "radio",
5279
5279
  "checkbox",
5280
5280
  "combobox"
5281
- ]), ee = /* @__PURE__ */ new Map(), Z = (B, J) => {
5281
+ ]), ee = /* @__PURE__ */ new Map(), X = (B, J) => {
5282
5282
  const ie = `/api/suggest/${B}`, be = ie.includes("?") ? "&" : "?", T = J ? `&val=${J}` : "";
5283
5283
  return `${ie}${be}json=1${T}`;
5284
5284
  }, ve = (B) => B == null || B === "" ? null : typeof B == "object" ? B?.id !== void 0 && B.id !== null && B.id !== "" ? B.id : null : B, ce = (B) => {
@@ -5307,7 +5307,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5307
5307
  ee.set(ie, re);
5308
5308
  const Ee = T.map(encodeURIComponent).join(",");
5309
5309
  try {
5310
- const E = await (await fetch(Z(J.data, Ee))).json();
5310
+ const E = await (await fetch(X(J.data, Ee))).json();
5311
5311
  s.value[ie] = E?.data ?? E;
5312
5312
  } catch (je) {
5313
5313
  console.error("Failed to fetch column values", je);
@@ -5321,13 +5321,13 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5321
5321
  },
5322
5322
  { immediate: !0, deep: !0 }
5323
5323
  );
5324
- const Se = A(""), P = A(!1);
5324
+ const Se = D(""), P = D(!1);
5325
5325
  let ae = "edit", ye = 0;
5326
5326
  const Y = (B) => (B?.format || B?.type || "").toString().toLowerCase(), ge = y(() => (t.colModel?.filter((J) => Y(J) !== "slot") ?? []).map((J) => {
5327
5327
  const ie = J.key || J.name;
5328
5328
  return ie ? { ...J, name: ie, key: ie } : J;
5329
- })), Ce = A({}), se = A({}), xe = (B) => typeof B != "string" ? !1 : !!n[B], Ae = (B, J) => J ? J.split(".").reduce((ie, be) => ie == null ? ie : ie[be.trim()], B) : B, Ve = (B, J) => typeof B != "string" ? "" : B.replace(/{{\s*([^}]+)\s*}}/g, (ie, be) => {
5330
- const T = Ae(J, be.trim());
5329
+ })), Ce = D({}), se = D({}), xe = (B) => typeof B != "string" ? !1 : !!n[B], De = (B, J) => J ? J.split(".").reduce((ie, be) => ie == null ? ie : ie[be.trim()], B) : B, Ve = (B, J) => typeof B != "string" ? "" : B.replace(/{{\s*([^}]+)\s*}}/g, (ie, be) => {
5330
+ const T = De(J, be.trim());
5331
5331
  return T ?? "";
5332
5332
  }), Be = (B) => {
5333
5333
  if (B == null || B === "") return "";
@@ -5355,7 +5355,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5355
5355
  async function We() {
5356
5356
  Se.value = "Додати", P.value = !0, ae = "add", Ce.value = {};
5357
5357
  }
5358
- function Xe(B, J) {
5358
+ function Ze(B, J) {
5359
5359
  if (!B?.length) return null;
5360
5360
  const ie = typeof J == "object" ? J?.id : J;
5361
5361
  return ie == null || ie === "" ? null : B.find((be) => be?.id?.toString() === ie.toString())?.text ?? null;
@@ -5367,10 +5367,10 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5367
5367
  const ie = J.key || J.name, be = B?.[ie], T = s.value[ie];
5368
5368
  if (!be) return "-";
5369
5369
  if (Array.isArray(be)) {
5370
- const Ee = be.map((je) => Xe(T, je)).filter(Boolean);
5370
+ const Ee = be.map((je) => Ze(T, je)).filter(Boolean);
5371
5371
  return Ee.length ? Ee.join(", ") : Q(be);
5372
5372
  }
5373
- const re = Xe(T, be);
5373
+ const re = Ze(T, be);
5374
5374
  return re || Q(be);
5375
5375
  }
5376
5376
  async function Le(B, J) {
@@ -5379,7 +5379,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5379
5379
  function Ie() {
5380
5380
  const B = se.value.validate();
5381
5381
  if (B) {
5382
- De({ type: "warning", title: "Помилка валідації", message: Object.entries(B).map(([J, ie]) => `${J}: ${ie}`).join(`
5382
+ Ae({ type: "warning", title: "Помилка валідації", message: Object.entries(B).map(([J, ie]) => `${J}: ${ie}`).join(`
5383
5383
  `) });
5384
5384
  return;
5385
5385
  }
@@ -5488,7 +5488,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5488
5488
  "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": g.value === be
5489
5489
  }]),
5490
5490
  draggable: "true",
5491
- onDragstart: (T) => X(be),
5491
+ onDragstart: (T) => Z(be),
5492
5492
  onDragover: Te((T) => N(be), ["prevent"]),
5493
5493
  onDrop: (T) => W(be)
5494
5494
  }, [
@@ -5496,7 +5496,7 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5496
5496
  class: "px-4 py-3 text-center align-middle touch-none select-none",
5497
5497
  onPointerdown: (T) => b(T, be),
5498
5498
  onPointermove: M,
5499
- onPointerup: D,
5499
+ onPointerup: A,
5500
5500
  onPointercancel: U
5501
5501
  }, [
5502
5502
  u("div", xd, [
@@ -5545,13 +5545,13 @@ const ld = /* @__PURE__ */ He(ed, [["render", nd]]), ad = { class: "bg-white rou
5545
5545
  class: "p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded transition-colors"
5546
5546
  }, [
5547
5547
  G(R(Ya), { class: "h-4 w-4" })
5548
- ], 8, Dd),
5548
+ ], 8, Ad),
5549
5549
  u("button", {
5550
5550
  onClick: (T) => Ge(be),
5551
5551
  class: "p-1.5 text-gray-600 hover:text-red-600 hover:bg-red-50 rounded transition-colors"
5552
5552
  }, [
5553
5553
  G(R(ln), { class: "h-4 w-4" })
5554
- ], 8, Ad)
5554
+ ], 8, Dd)
5555
5555
  ])
5556
5556
  ])
5557
5557
  ], 42, hd))), 128))
@@ -5643,14 +5643,14 @@ function Hd(e, t) {
5643
5643
  gl('<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)
5644
5644
  ])]);
5645
5645
  }
5646
- const qd = /* @__PURE__ */ He(zd, [["render", Hd]]), Wd = { class: "bg-white/30 p-1 rounded-md shadow w-fit" }, Kd = { class: "flex gap-2" }, Gd = ["onClick", "title"], Yd = ["src"], Xd = /* @__PURE__ */ pe({
5646
+ const qd = /* @__PURE__ */ He(zd, [["render", Hd]]), Wd = { class: "bg-white/30 p-1 rounded-md shadow w-fit" }, Kd = { class: "flex gap-2" }, Gd = ["onClick", "title"], Yd = ["src"], Zd = /* @__PURE__ */ pe({
5647
5647
  __name: "map-layers",
5648
5648
  props: {
5649
5649
  basemaps: {}
5650
5650
  },
5651
5651
  emits: ["onLayerChange"],
5652
5652
  setup(e, { emit: t }) {
5653
- const a = A(Object.keys(e.basemaps)[0]), l = t;
5653
+ const a = D(Object.keys(e.basemaps)[0]), l = t;
5654
5654
  function r(c) {
5655
5655
  l("onLayerChange", c), a.value = c;
5656
5656
  }
@@ -5687,7 +5687,7 @@ const qd = /* @__PURE__ */ He(zd, [["render", Hd]]), Wd = { class: "bg-white/30
5687
5687
  ])
5688
5688
  ]));
5689
5689
  }
5690
- }), en = 1e-10, In = /([+-]?\d{1,3})\s*[°º˚]\s*(\d{1,2})\s*['’′`]\s*(\d{1,2}(?:\.\d+)?)\s*["”″]\s*([NSEW])/gi, Zd = /^[+-]?\d+(?:\.\d+)?$/;
5690
+ }), en = 1e-10, In = /([+-]?\d{1,3})\s*[°º˚]\s*(\d{1,2})\s*['’′`]\s*(\d{1,2}(?:\.\d+)?)\s*["”″]\s*([NSEW])/gi, Xd = /^[+-]?\d+(?:\.\d+)?$/;
5691
5691
  function Jd(e, t, n) {
5692
5692
  const a = e.split(/\r?\n/).map((f) => f.trim()).filter(Boolean);
5693
5693
  if (a.length < 3)
@@ -5775,7 +5775,7 @@ function ec(e, t, n) {
5775
5775
  ok: !1,
5776
5776
  errors: [{ line: t, message: "У рядку дозволено лише одну пару координат." }]
5777
5777
  };
5778
- if (!l.every((f) => Zd.test(f)))
5778
+ if (!l.every((f) => Xd.test(f)))
5779
5779
  return {
5780
5780
  ok: !1,
5781
5781
  errors: [{ line: t, message: "Не вдалося розпізнати десяткові координати." }]
@@ -5898,9 +5898,9 @@ const ac = ["title"], oc = {
5898
5898
  if (typeof document > "u") return;
5899
5899
  let V = null;
5900
5900
  const F = 8, fe = () => {
5901
- const Ze = String(x?.value ?? "");
5902
- if (!Ze) return;
5903
- V = document.createElement("div"), V.textContent = Ze, Object.assign(V.style, {
5901
+ const Xe = String(x?.value ?? "");
5902
+ if (!Xe) return;
5903
+ V = document.createElement("div"), V.textContent = Xe, Object.assign(V.style, {
5904
5904
  position: "absolute",
5905
5905
  background: "#333",
5906
5906
  color: "#fff",
@@ -5955,15 +5955,15 @@ const ac = ["title"], oc = {
5955
5955
  }), S = y(() => {
5956
5956
  const E = C.value, x = a.config?.tools?.filter((V) => E.includes(V));
5957
5957
  return x && x.length ? x : E;
5958
- }), g = y(() => a.config?.placeholder?.trim() || "Пошук…"), w = A(S.value[0]);
5958
+ }), g = y(() => a.config?.placeholder?.trim() || "Пошук…"), w = D(S.value[0]);
5959
5959
  he(S, (E) => {
5960
5960
  E.includes(w.value) || (w.value = E[0]);
5961
5961
  });
5962
- const v = A(""), _ = A(!1), b = A(null), M = A(null), D = A(null), U = A(null), X = A([]), N = A(null), W = A(!1), z = A([]), te = y(
5962
+ const v = D(""), _ = D(!1), b = D(null), M = D(null), A = D(null), U = D(null), Z = D([]), N = D(null), W = D(!1), z = D([]), te = y(
5963
5963
  () => (w.value === "address" || w.value === "nominatim") && W.value
5964
5964
  ), le = y(() => a.config?.addressDebounceMs ?? 1e3);
5965
5965
  let j = null;
5966
- const H = A(!1), ee = y(() => v.value.trim().length > 0 ? X.value : z.value), Z = y(() => v.value.trim().length ? `Знайдено ${X.value.length}` : "Історія пошуку"), ve = y(
5966
+ const H = D(!1), ee = y(() => v.value.trim().length > 0 ? Z.value : z.value), X = y(() => v.value.trim().length ? `Знайдено ${Z.value.length}` : "Історія пошуку"), ve = y(
5967
5967
  () => v.value.trim().length ? "Нічого не знайдено" : "Історія порожня"
5968
5968
  );
5969
5969
  function ce() {
@@ -5993,7 +5993,7 @@ const ac = ["title"], oc = {
5993
5993
  });
5994
5994
  function ae() {
5995
5995
  if (!U.value) return;
5996
- const E = U.value.getBoundingClientRect(), x = D.value?.getBoundingClientRect(), V = x?.width ?? E.width, F = (x?.left ?? E.left) + window.scrollX, fe = E.bottom + window.scrollY + vc;
5996
+ const E = U.value.getBoundingClientRect(), x = A.value?.getBoundingClientRect(), V = x?.width ?? E.width, F = (x?.left ?? E.left) + window.scrollX, fe = E.bottom + window.scrollY + vc;
5997
5997
  P.left = `${F}px`, P.top = `${fe}px`, P.width = `${V}px`, P.display = "block";
5998
5998
  }
5999
5999
  const ye = () => {
@@ -6003,24 +6003,24 @@ const ac = ["title"], oc = {
6003
6003
  j && (clearTimeout(j), j = null);
6004
6004
  }
6005
6005
  he(w, () => {
6006
- v.value = "", _.value = !1, X.value = [], W.value = !1, Y(), H.value = !1;
6006
+ v.value = "", _.value = !1, Z.value = [], W.value = !1, Y(), H.value = !1;
6007
6007
  }), he(te, (E) => {
6008
6008
  E ? et(() => {
6009
6009
  ae();
6010
6010
  }) : P.display = "none";
6011
6011
  }), he(v, (E) => {
6012
6012
  if (w.value !== "address" && w.value !== "nominatim") {
6013
- X.value = [], Y();
6013
+ Z.value = [], Y();
6014
6014
  return;
6015
6015
  }
6016
6016
  if (!E.trim()) {
6017
- X.value = [], W.value = z.value.length > 0, Y();
6017
+ Z.value = [], W.value = z.value.length > 0, Y();
6018
6018
  return;
6019
6019
  }
6020
6020
  Y(), W.value = !0, j = window.setTimeout(() => {
6021
6021
  ie(E).catch((x) => {
6022
6022
  const V = x?.message || "Помилка пошуку адреси";
6023
- De({ type: "error", title: "Пошук адреси", message: V });
6023
+ Ae({ type: "error", title: "Пошук адреси", message: V });
6024
6024
  });
6025
6025
  }, le.value);
6026
6026
  });
@@ -6039,9 +6039,9 @@ const ac = ["title"], oc = {
6039
6039
  ge(x?.target), w.value = E;
6040
6040
  }
6041
6041
  function xe() {
6042
- v.value = "", X.value = [], W.value = !1, H.value = !1;
6042
+ v.value = "", Z.value = [], W.value = !1, H.value = !1;
6043
6043
  }
6044
- function Ae(E) {
6044
+ function De(E) {
6045
6045
  const x = E.target;
6046
6046
  if (_.value) {
6047
6047
  const V = b.value;
@@ -6053,9 +6053,9 @@ const ac = ["title"], oc = {
6053
6053
  }
6054
6054
  }
6055
6055
  at(() => {
6056
- z.value = ce(), window.addEventListener("click", Ae, !0), window.addEventListener("scroll", ye, !0), window.addEventListener("resize", ye);
6056
+ z.value = ce(), window.addEventListener("click", De, !0), window.addEventListener("scroll", ye, !0), window.addEventListener("resize", ye);
6057
6057
  }), Et(() => {
6058
- window.removeEventListener("click", Ae, !0), window.removeEventListener("scroll", ye, !0), window.removeEventListener("resize", ye), Y();
6058
+ window.removeEventListener("click", De, !0), window.removeEventListener("scroll", ye, !0), window.removeEventListener("resize", ye), Y();
6059
6059
  });
6060
6060
  function Ve(E) {
6061
6061
  return E === "xy" ? "Координати" : E === "parcel" ? "Кадастр" : E === "nominatim" ? "Адреса" : "Адресний";
@@ -6086,11 +6086,11 @@ const ac = ["title"], oc = {
6086
6086
  if (F.length < 2) return null;
6087
6087
  const fe = F.slice(0, 2).map(Number);
6088
6088
  if (!fe.every((Je) => Number.isFinite(Je))) return null;
6089
- let [_e, Ze] = fe, qe = _e, ut = Ze;
6089
+ let [_e, Xe] = fe, qe = _e, ut = Xe;
6090
6090
  const Ct = (Je) => Math.abs(Je) <= 90, St = (Je) => Math.abs(Je) <= 180;
6091
6091
  if (!Ct(qe) || !St(ut))
6092
6092
  if (Ct(ut) && St(qe))
6093
- qe = Ze, ut = _e;
6093
+ qe = Xe, ut = _e;
6094
6094
  else
6095
6095
  return null;
6096
6096
  return { lat: qe, lng: ut };
@@ -6098,9 +6098,9 @@ const ac = ["title"], oc = {
6098
6098
  function We(E) {
6099
6099
  const x = E?.result || E?.data || E;
6100
6100
  return (Array.isArray(x) ? x : x ? [x] : []).map((F, fe) => {
6101
- const _e = F?.geom_centroid, Ze = Array.isArray(_e?.coordinates) ? _e.coordinates : null;
6102
- if (!Ze || Ze.length < 2) return null;
6103
- const qe = Number(Ze[0]), ut = Number(Ze[1]);
6101
+ const _e = F?.geom_centroid, Xe = Array.isArray(_e?.coordinates) ? _e.coordinates : null;
6102
+ if (!Xe || Xe.length < 2) return null;
6103
+ const qe = Number(Xe[0]), ut = Number(Xe[1]);
6104
6104
  return !Number.isFinite(ut) || !Number.isFinite(qe) ? null : {
6105
6105
  id: String(F?.parcel_id ?? F?.cad_num ?? fe),
6106
6106
  title: F?.cadnum || F?.cad_num || "Земельна ділянка",
@@ -6109,12 +6109,12 @@ const ac = ["title"], oc = {
6109
6109
  };
6110
6110
  }).filter((F) => !!F);
6111
6111
  }
6112
- function Xe(E) {
6112
+ function Ze(E) {
6113
6113
  return (Array.isArray(E?.features) ? E.features : []).map((V, F) => {
6114
- const fe = V?.geometry?.coordinates, _e = Number(fe?.[0]), Ze = Number(fe?.[1]);
6115
- if (!Number.isFinite(Ze) || !Number.isFinite(_e)) return null;
6114
+ const fe = V?.geometry?.coordinates, _e = Number(fe?.[0]), Xe = Number(fe?.[1]);
6115
+ if (!Number.isFinite(Xe) || !Number.isFinite(_e)) return null;
6116
6116
  const qe = V?.properties || {}, ut = qe?.geocoding?.label || qe?.display_name || qe?.label || "Адреса";
6117
- return { id: String(qe?.geocoding?.place_id || qe?.place_id || F), title: ut, lat: Ze, lng: _e };
6117
+ return { id: String(qe?.geocoding?.place_id || qe?.place_id || F), title: ut, lat: Xe, lng: _e };
6118
6118
  }).filter((V) => !!V);
6119
6119
  }
6120
6120
  function Q(E) {
@@ -6140,8 +6140,8 @@ const ac = ["title"], oc = {
6140
6140
  return (Array.isArray(E?.data) ? E.data : []).map((V, F) => {
6141
6141
  const fe = Le(V), _e = String(
6142
6142
  V.text ?? V.title ?? V.label ?? V.name ?? V.address ?? V.display_name ?? V.id ?? "Адреса"
6143
- ), Ze = String(V.id ?? V.code ?? V.value ?? F);
6144
- return fe ? { id: Ze, title: _e, ...fe } : { id: Ze, title: _e };
6143
+ ), Xe = String(V.id ?? V.code ?? V.value ?? F);
6144
+ return fe ? { id: Xe, title: _e, ...fe } : { id: Xe, title: _e };
6145
6145
  }).filter((V) => !!V?.title);
6146
6146
  }
6147
6147
  function Ge(E) {
@@ -6185,12 +6185,12 @@ const ac = ["title"], oc = {
6185
6185
  const F = await fetch(x.toString());
6186
6186
  if (!F.ok) throw new Error(`HTTP ${F.status}`);
6187
6187
  const fe = await F.json();
6188
- return Xe(fe);
6188
+ return Ze(fe);
6189
6189
  }
6190
6190
  async function ie(E) {
6191
- if (X.value = [], Y(), w.value === "address") {
6191
+ if (Z.value = [], Y(), w.value === "address") {
6192
6192
  if (!c()) {
6193
- De({
6193
+ Ae({
6194
6194
  type: "warning",
6195
6195
  title: "Пошук адреси",
6196
6196
  message: "Не налаштовано addressSuggest"
@@ -6199,25 +6199,25 @@ const ac = ["title"], oc = {
6199
6199
  }
6200
6200
  const F = await B(E);
6201
6201
  if (!F.length) {
6202
- De({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
6202
+ Ae({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
6203
6203
  return;
6204
6204
  }
6205
- X.value = F;
6205
+ Z.value = F;
6206
6206
  return;
6207
6207
  }
6208
6208
  const x = await J(E);
6209
6209
  if (!x.length) {
6210
- De({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
6210
+ Ae({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
6211
6211
  return;
6212
6212
  }
6213
- X.value = x;
6213
+ Z.value = x;
6214
6214
  }
6215
6215
  async function be(E) {
6216
6216
  if (Q(E)) {
6217
6217
  Ee(E), Se(E);
6218
6218
  return;
6219
6219
  }
6220
- De({
6220
+ Ae({
6221
6221
  type: "warning",
6222
6222
  title: "Пошук адреси",
6223
6223
  message: "Геометрія для обраної адреси відсутня"
@@ -6245,7 +6245,7 @@ const ac = ["title"], oc = {
6245
6245
  if (w.value === "xy") {
6246
6246
  const x = Ye(E);
6247
6247
  if (!x) {
6248
- De({
6248
+ Ae({
6249
6249
  type: "warning",
6250
6250
  title: "Пошук координат",
6251
6251
  message: "Використайте `lat lon` або DMS у форматі `50°27'00\"N 30°31'24\"E`."
@@ -6260,13 +6260,13 @@ const ac = ["title"], oc = {
6260
6260
  await ie(E);
6261
6261
  } catch (x) {
6262
6262
  const V = x?.message || "Помилка пошуку адреси";
6263
- De({ type: "error", title: "Пошук адреси", message: V });
6263
+ Ae({ type: "error", title: "Пошук адреси", message: V });
6264
6264
  }
6265
6265
  return;
6266
6266
  }
6267
6267
  try {
6268
6268
  if (!re(E)) {
6269
- De({
6269
+ Ae({
6270
6270
  type: "warning",
6271
6271
  title: "Пошук кадастру",
6272
6272
  message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ"
@@ -6277,24 +6277,24 @@ const ac = ["title"], oc = {
6277
6277
  if (!x.ok) throw new Error(`HTTP ${x.status}`);
6278
6278
  const V = await x.json(), F = We(V);
6279
6279
  if (!F.length)
6280
- De({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
6280
+ Ae({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
6281
6281
  else {
6282
6282
  const fe = F.find(Q);
6283
6283
  if (!fe) {
6284
- De({ type: "warning", title: "Пошук", message: "Геометрія ділянки відсутня" });
6284
+ Ae({ type: "warning", title: "Пошук", message: "Геометрія ділянки відсутня" });
6285
6285
  return;
6286
6286
  }
6287
6287
  Ee(fe);
6288
6288
  }
6289
6289
  } catch (x) {
6290
6290
  const V = x?.message || "Помилка пошуку";
6291
- De({ type: "error", title: "Пошук", message: V });
6291
+ Ae({ type: "error", title: "Пошук", message: V });
6292
6292
  }
6293
6293
  }
6294
6294
  }
6295
6295
  return (E, x) => (i(), p("div", {
6296
6296
  ref_key: "widgetRef",
6297
- ref: D,
6297
+ ref: A,
6298
6298
  class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]"
6299
6299
  }, [
6300
6300
  u("form", {
@@ -6432,7 +6432,7 @@ const ac = ["title"], oc = {
6432
6432
  style: Pe(P)
6433
6433
  }, [
6434
6434
  u("div", uc, [
6435
- u("span", dc, de(Z.value), 1),
6435
+ u("span", dc, de(X.value), 1),
6436
6436
  u("button", {
6437
6437
  type: "button",
6438
6438
  class: "text-gray-400 hover:text-gray-600",
@@ -6459,7 +6459,7 @@ const ac = ["title"], oc = {
6459
6459
  __name: "AddCoordinates",
6460
6460
  emits: ["submit", "cancel"],
6461
6461
  setup(e, { emit: t }) {
6462
- const n = t, a = A(null), l = A(null), r = (c, f, h) => Math.min(Math.max(c, f), h), o = () => {
6462
+ const n = t, a = D(null), l = D(null), r = (c, f, h) => Math.min(Math.max(c, f), h), o = () => {
6463
6463
  if (a.value === null || l.value === null || !Number.isFinite(a.value) || !Number.isFinite(l.value))
6464
6464
  return;
6465
6465
  const c = r(a.value, -90, 90), f = r(l.value, -180, 180);
@@ -6551,7 +6551,7 @@ const ac = ["title"], oc = {
6551
6551
  class: "flex-1 px-2 py-1.5 bg-emerald-500 hover:bg-emerald-600 text-white text-xs font-medium rounded transition-colors duration-150 flex items-center justify-center gap-1",
6552
6552
  onClick: n[0] || (n[0] = (a) => t.$emit("click"))
6553
6553
  }, [
6554
- G(R(Xa), {
6554
+ G(R(Za), {
6555
6555
  size: 12,
6556
6556
  "stroke-width": 2
6557
6557
  }),
@@ -6574,7 +6574,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6574
6574
  }, Lc = {
6575
6575
  key: 1,
6576
6576
  class: "flex-1 font-mono text-gray-700"
6577
- }, Dc = /* @__PURE__ */ pe({
6577
+ }, Ac = /* @__PURE__ */ pe({
6578
6578
  __name: "DotListItem",
6579
6579
  props: {
6580
6580
  id: {},
@@ -6585,7 +6585,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6585
6585
  setup(e, { emit: t }) {
6586
6586
  const n = e, a = t, l = y(
6587
6587
  () => `${n.coords.lat.toFixed(4)}°, ${n.coords.lng.toFixed(4)}°`
6588
- ), r = A(!1), o = A(n.coords.lat), s = A(n.coords.lng);
6588
+ ), r = D(!1), o = D(n.coords.lat), s = D(n.coords.lng);
6589
6589
  he(
6590
6590
  () => n.coords,
6591
6591
  (C) => {
@@ -6661,7 +6661,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6661
6661
  }, " ✕ ")
6662
6662
  ]));
6663
6663
  }
6664
- }), Ac = { class: "ruler-control px-3 py-2.5 space-y-2" }, Ic = {
6664
+ }), Dc = { class: "ruler-control px-3 py-2.5 space-y-2" }, Ic = {
6665
6665
  type: "button",
6666
6666
  class: "ruler-row w-full flex items-center gap-2 cursor-pointer group text-left"
6667
6667
  }, Fc = {
@@ -6702,17 +6702,17 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6702
6702
  },
6703
6703
  emits: ["update-point", "delete-point"],
6704
6704
  setup(e) {
6705
- const t = e, n = A(!1), a = A("km2"), l = [
6705
+ const t = e, n = D(!1), a = D("km2"), l = [
6706
6706
  { id: "km2", label: "км²" },
6707
6707
  { id: "ha", label: "га" },
6708
6708
  { id: "m2", label: "м²" }
6709
6709
  ], r = () => {
6710
6710
  n.value = !n.value;
6711
6711
  }, o = (g, w) => {
6712
- const v = (z) => z * Math.PI / 180, _ = v(w.lat - g.lat), b = v(w.lng - g.lng), M = v(g.lat), D = v(w.lat), U = Math.sin(_ / 2), X = Math.sin(b / 2);
6712
+ const v = (z) => z * Math.PI / 180, _ = v(w.lat - g.lat), b = v(w.lng - g.lng), M = v(g.lat), A = v(w.lat), U = Math.sin(_ / 2), Z = Math.sin(b / 2);
6713
6713
  return 6371e3 * (2 * Math.asin(
6714
6714
  Math.sqrt(
6715
- U * U + Math.cos(M) * Math.cos(D) * X * X
6715
+ U * U + Math.cos(M) * Math.cos(A) * Z * Z
6716
6716
  )
6717
6717
  ));
6718
6718
  }, s = y(() => {
@@ -6727,14 +6727,14 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6727
6727
  }), c = y(() => s.value >= 1e3 ? `${Qt(s.value / 1e3)} км` : `${Qt(s.value)} м`);
6728
6728
  function f(g) {
6729
6729
  if (g.length < 3) return 0;
6730
- const w = g[0].lat, v = g[0].lng, _ = (M, D) => {
6730
+ const w = g[0].lat, v = g[0].lng, _ = (M, A) => {
6731
6731
  const U = (M - w) * 110574;
6732
- return { x: (D - v) * 111320 * Math.cos(w * Math.PI / 180), y: U };
6732
+ return { x: (A - v) * 111320 * Math.cos(w * Math.PI / 180), y: U };
6733
6733
  };
6734
6734
  let b = 0;
6735
6735
  for (let M = 0; M < g.length; M++) {
6736
- const D = (M + 1) % g.length, U = _(g[M].lat, g[M].lng), X = _(g[D].lat, g[D].lng);
6737
- b += U.x * X.y - U.y * X.x;
6736
+ const A = (M + 1) % g.length, U = _(g[M].lat, g[M].lng), Z = _(g[A].lat, g[A].lng);
6737
+ b += U.x * Z.y - U.y * Z.x;
6738
6738
  }
6739
6739
  return Math.abs(b) * 0.5;
6740
6740
  }
@@ -6764,7 +6764,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6764
6764
  () => {
6765
6765
  t.points.length === 0 && (n.value = !1);
6766
6766
  }
6767
- ), (g, w) => (i(), p("div", Ac, [
6767
+ ), (g, w) => (i(), p("div", Dc, [
6768
6768
  u("button", Ic, [
6769
6769
  u("span", Fc, [
6770
6770
  G(R(tn), {
@@ -6817,7 +6817,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6817
6817
  }, " Координати ")
6818
6818
  ]),
6819
6819
  n.value ? (i(), p("div", Wc, [
6820
- (i(!0), p(Fe, null, Ne(e.points, (v, _) => (i(), ke(Dc, {
6820
+ (i(!0), p(Fe, null, Ne(e.points, (v, _) => (i(), ke(Ac, {
6821
6821
  key: v.id,
6822
6822
  id: v.id,
6823
6823
  index: _ + 1,
@@ -6828,7 +6828,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6828
6828
  ])) : q("", !0)
6829
6829
  ]));
6830
6830
  }
6831
- }), Gc = { class: "px-3 py-3 bg-blue-50/50 border-b border-blue-100" }, Yc = { class: "flex items-start gap-2" }, Xc = /* @__PURE__ */ pe({
6831
+ }), Gc = { class: "px-3 py-3 bg-blue-50/50 border-b border-blue-100" }, Yc = { class: "flex items-start gap-2" }, Zc = /* @__PURE__ */ pe({
6832
6832
  __name: "InfoHint",
6833
6833
  setup(e) {
6834
6834
  return (t, n) => (i(), p("div", Gc, [
@@ -6845,7 +6845,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6845
6845
  ])
6846
6846
  ]));
6847
6847
  }
6848
- }), Zc = { class: "space-y-1.5" }, Jc = { class: "space-y-1 max-h-40 overflow-y-auto" }, Qc = { class: "text-gray-700" }, ef = { class: "font-semibold text-slate-800" }, tf = /* @__PURE__ */ pe({
6848
+ }), Xc = { class: "space-y-1.5" }, Jc = { class: "space-y-1 max-h-40 overflow-y-auto" }, Qc = { class: "text-gray-700" }, ef = { class: "font-semibold text-slate-800" }, tf = /* @__PURE__ */ pe({
6849
6849
  __name: "ToPointList",
6850
6850
  props: {
6851
6851
  points: {},
@@ -6879,7 +6879,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6879
6879
  }
6880
6880
  return r;
6881
6881
  });
6882
- return (r, o) => (i(), p("div", Zc, [
6882
+ return (r, o) => (i(), p("div", Xc, [
6883
6883
  o[0] || (o[0] = u("p", { class: "text-xs font-medium text-gray-600 mb-1.5" }, "Відстань між точками:", -1)),
6884
6884
  u("div", Jc, [
6885
6885
  (i(!0), p(Fe, null, Ne(l.value, (s, c) => (i(), p("div", {
@@ -6910,7 +6910,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6910
6910
  "shape-closed-change"
6911
6911
  ],
6912
6912
  setup(e, { expose: t, emit: n }) {
6913
- const a = n, l = A([]), r = y(() => l.value.length > 0), o = A(!1), s = A(!1), c = A("general");
6913
+ const a = n, l = D([]), r = y(() => l.value.length > 0), o = D(!1), s = D(!1), c = D("general");
6914
6914
  function f(te) {
6915
6915
  c.value = te, a("tab-change", te);
6916
6916
  }
@@ -6945,11 +6945,11 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
6945
6945
  l.value = [], s.value && (s.value = !1, a("shape-closed-change", !1)), S();
6946
6946
  }, M = (te) => {
6947
6947
  v(te);
6948
- }, D = (te) => {
6948
+ }, A = (te) => {
6949
6949
  _(te);
6950
6950
  }, U = () => {
6951
6951
  o.value = !0, a("add-request");
6952
- }, X = (te) => {
6952
+ }, Z = (te) => {
6953
6953
  w(te), o.value = !1;
6954
6954
  }, N = () => {
6955
6955
  o.value = !1;
@@ -7010,8 +7010,8 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7010
7010
  points: l.value,
7011
7011
  "is-shape-closed": s.value,
7012
7012
  onUpdatePoint: M,
7013
- onDeletePoint: D
7014
- }, null, 8, ["points", "is-shape-closed"])) : (i(), ke(Xc, { key: 0 }))
7013
+ onDeletePoint: A
7014
+ }, null, 8, ["points", "is-shape-closed"])) : (i(), ke(Zc, { key: 0 }))
7015
7015
  ], 64)) : (i(), p("div", uf, [
7016
7016
  r.value ? (i(), ke(tf, {
7017
7017
  key: 0,
@@ -7032,7 +7032,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7032
7032
  ]),
7033
7033
  o.value ? (i(), ke(kc, {
7034
7034
  key: 0,
7035
- onSubmit: X,
7035
+ onSubmit: Z,
7036
7036
  onCancel: N
7037
7037
  })) : q("", !0),
7038
7038
  r.value ? (i(), ke(Cc, {
@@ -7053,10 +7053,10 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7053
7053
  },
7054
7054
  setup(e) {
7055
7055
  function t(g, w) {
7056
- const v = (X) => X * Math.PI / 180, _ = v(w.lat - g.lat), b = v(w.lng - g.lng), M = v(g.lat), D = v(w.lat);
7056
+ const v = (Z) => Z * Math.PI / 180, _ = v(w.lat - g.lat), b = v(w.lng - g.lng), M = v(g.lat), A = v(w.lat);
7057
7057
  return 6371e3 * (2 * Math.asin(
7058
7058
  Math.sqrt(
7059
- Math.sin(_ / 2) ** 2 + Math.cos(M) * Math.cos(D) * Math.sin(b / 2) ** 2
7059
+ Math.sin(_ / 2) ** 2 + Math.cos(M) * Math.cos(A) * Math.sin(b / 2) ** 2
7060
7060
  )
7061
7061
  ));
7062
7062
  }
@@ -7071,21 +7071,21 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7071
7071
  const _ = v ?? "general", b = [];
7072
7072
  let M = 0;
7073
7073
  b.push(0);
7074
- for (let D = 1; D < g.length; D++)
7075
- M += t(g[D - 1].coords, g[D].coords), b.push(M);
7074
+ for (let A = 1; A < g.length; A++)
7075
+ M += t(g[A - 1].coords, g[A].coords), b.push(M);
7076
7076
  return w && g.length >= 2 && (M += t(g[g.length - 1].coords, g[0].coords)), {
7077
7077
  type: "FeatureCollection",
7078
- features: g.map((D, U) => {
7079
- const X = _ === "general" ? U === 0 ? "0" : n(b[U]) : U === 0 ? "0" : n(
7078
+ features: g.map((A, U) => {
7079
+ const Z = _ === "general" ? U === 0 ? "0" : n(b[U]) : U === 0 ? "0" : n(
7080
7080
  t(g[U - 1].coords, g[U].coords)
7081
7081
  );
7082
7082
  return {
7083
7083
  type: "Feature",
7084
7084
  geometry: {
7085
7085
  type: "Point",
7086
- coordinates: [D.coords.lng, D.coords.lat]
7086
+ coordinates: [A.coords.lng, A.coords.lat]
7087
7087
  },
7088
- properties: { id: D.id, index: U + 1, label: X }
7088
+ properties: { id: A.id, index: U + 1, label: Z }
7089
7089
  };
7090
7090
  })
7091
7091
  };
@@ -7096,14 +7096,14 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7096
7096
  for (let _ = 0; _ < g.length; _++) {
7097
7097
  const b = _ === g.length - 1 && w ? 0 : _ + 1;
7098
7098
  if (b >= g.length) break;
7099
- const M = g[_].coords, D = g[b].coords, U = t(M, D);
7099
+ const M = g[_].coords, A = g[b].coords, U = t(M, A);
7100
7100
  v.push({
7101
7101
  type: "Feature",
7102
7102
  geometry: {
7103
7103
  type: "LineString",
7104
7104
  coordinates: [
7105
7105
  [M.lng, M.lat],
7106
- [D.lng, D.lat]
7106
+ [A.lng, A.lat]
7107
7107
  ]
7108
7108
  },
7109
7109
  properties: { distance: n(U) }
@@ -7222,11 +7222,11 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7222
7222
  }
7223
7223
  function C(g) {
7224
7224
  if (!g) return;
7225
- const w = g.getSource(yt), v = g.getSource(Bt), _ = g.getSource(Rt), b = g.getSource(Nt), M = a.points, D = a.labelMode ?? "general";
7225
+ const w = g.getSource(yt), v = g.getSource(Bt), _ = g.getSource(Rt), b = g.getSource(Nt), M = a.points, A = a.labelMode ?? "general";
7226
7226
  w && w.setData(
7227
- r(M, a.isShapeClosed, D)
7227
+ r(M, a.isShapeClosed, A)
7228
7228
  ), v && v.setData(s(M, a.isShapeClosed)), _ && _.setData(c(M)), b && b.setData(
7229
- D === "topoint" ? o(M, a.isShapeClosed) : l()
7229
+ A === "topoint" ? o(M, a.isShapeClosed) : l()
7230
7230
  );
7231
7231
  }
7232
7232
  function S() {
@@ -7247,7 +7247,7 @@ const Mc = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7247
7247
  }
7248
7248
  });
7249
7249
  function vf(e = {}) {
7250
- const t = A(!1), n = A([]), a = A(!1), l = A("general"), r = A(null);
7250
+ const t = D(!1), n = D([]), a = D(!1), l = D("general"), r = D(null);
7251
7251
  function o() {
7252
7252
  t.value ? s() : (t.value = !0, e.onActivate?.());
7253
7253
  }
@@ -7291,7 +7291,7 @@ const gf = {
7291
7291
  }, hf = { class: "flex items-center gap-1" }, bf = ["disabled"], xf = {
7292
7292
  key: 0,
7293
7293
  class: "absolute z-[1600] mt-1 min-w-[120px] bg-white border border-gray-300 shadow-lg rounded-lg text-sm overflow-hidden"
7294
- }, wf = ["disabled"], kf = ["disabled"], $f = { class: "mt-4 flex justify-end gap-2" }, Cf = ["disabled"], Sf = { class: "absolute top-4 right-4 z-[1000]" }, _f = { class: "flex flex-col gap-[2px]" }, Mf = ["disabled"], Vf = ["disabled"], Lf = ["disabled"], Df = ["disabled"], Af = { class: "bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900" }, If = { class: "space-y-0.5" }, Ff = { class: "text-gray-500" }, Tf = { class: "text-gray-900 text-right break-all" }, Ef = { class: "absolute left-4 bottom-[36px] z-[1000]" }, Pf = { class: "flex flex-col gap-2" }, Of = {
7294
+ }, wf = ["disabled"], kf = ["disabled"], $f = { class: "mt-4 flex justify-end gap-2" }, Cf = ["disabled"], Sf = { class: "absolute top-4 right-4 z-[1000]" }, _f = { class: "flex flex-col gap-[2px]" }, Mf = ["disabled"], Vf = ["disabled"], Lf = ["disabled"], Af = ["disabled"], Df = { class: "bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900" }, If = { class: "space-y-0.5" }, Ff = { class: "text-gray-500" }, Tf = { class: "text-gray-900 text-right break-all" }, Ef = { class: "absolute left-4 bottom-[36px] z-[1000]" }, Pf = { class: "flex flex-col gap-2" }, Of = {
7295
7295
  key: 0,
7296
7296
  class: "bg-white/95 border border-gray-200 rounded-md shadow-sm px-3 py-2 text-xs text-gray-700 min-w-[200px]"
7297
7297
  }, Bf = { class: "flex flex-col gap-1" }, Rf = ["checked", "disabled", "onChange"], Nf = { class: "text-gray-700 text-xs font-medium" }, jf = { class: "absolute bottom-0 left-0 right-0 z-[1000] min-h-[28px] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, zf = {
@@ -7300,7 +7300,7 @@ const gf = {
7300
7300
  }, Uf = { class: "mr-auto flex items-center gap-2 min-w-0 relative" }, Hf = { class: "shrink-0" }, qf = {
7301
7301
  key: 0,
7302
7302
  class: "font-bold"
7303
- }, Wf = ["onClick", "disabled"], Kf = { key: 0 }, Gf = { class: "flex items-center" }, Yf = { class: "text-xs mr-2" }, Xf = { key: 0 }, Zf = { key: 1 }, Jf = {
7303
+ }, Wf = ["onClick", "disabled"], Kf = { key: 0 }, Gf = { class: "flex items-center" }, Yf = { class: "text-xs mr-2" }, Zf = { key: 0 }, Xf = { key: 1 }, Jf = {
7304
7304
  key: 0,
7305
7305
  class: "text-xs mr-2"
7306
7306
  }, Qf = {
@@ -7337,7 +7337,7 @@ const gf = {
7337
7337
  const n = e, a = t, l = Gl(), r = y(() => {
7338
7338
  const d = l?.multiple, m = l?.multi, $ = (L) => L === "" || L === !0 || L === "true" || L === 1 || L === "1";
7339
7339
  return !!n.multi || !!n.multiple || $(m) || $(d);
7340
- }), o = y(() => !!n.disabled), s = A(!1), c = A(null), f = A(0), h = A(""), k = A(null), C = A([]), S = A(null), g = A(null), w = vf({
7340
+ }), o = y(() => !!n.disabled), s = D(!1), c = D(null), f = D(0), h = D(""), k = D(null), C = D([]), S = D(null), g = D(null), w = vf({
7341
7341
  onActivate() {
7342
7342
  if (re)
7343
7343
  try {
@@ -7352,14 +7352,14 @@ const gf = {
7352
7352
  function v() {
7353
7353
  w.toggleRuler();
7354
7354
  }
7355
- const _ = Un(), b = _?.appContext?.config?.globalProperties?.$settings ?? {}, M = b?.map ?? {}, D = _?.vnode?.props ?? {};
7355
+ const _ = Un(), b = _?.appContext?.config?.globalProperties?.$settings ?? {}, M = b?.map ?? {}, A = _?.vnode?.props ?? {};
7356
7356
  function U(d) {
7357
- return Object.prototype.hasOwnProperty.call(D, d) || Object.prototype.hasOwnProperty.call(
7358
- D,
7357
+ return Object.prototype.hasOwnProperty.call(A, d) || Object.prototype.hasOwnProperty.call(
7358
+ A,
7359
7359
  d.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)
7360
7360
  );
7361
7361
  }
7362
- const X = Array.isArray(M.center) && M.center.length === 2 ? M.center : Array.isArray(b.center) && b.center.length === 2 ? b.center : [30, 50], N = typeof M.zoom == "number" ? M.zoom : typeof b.zoom == "number" ? b.zoom : typeof b.defaultZoom == "number" ? b.defaultZoom : 10;
7362
+ const Z = Array.isArray(M.center) && M.center.length === 2 ? M.center : Array.isArray(b.center) && b.center.length === 2 ? b.center : [30, 50], N = typeof M.zoom == "number" ? M.zoom : typeof b.zoom == "number" ? b.zoom : typeof b.defaultZoom == "number" ? b.defaultZoom : 10;
7363
7363
  function W(d) {
7364
7364
  if (d != null) {
7365
7365
  if (Array.isArray(d) && d.length >= 2) {
@@ -7392,11 +7392,11 @@ const gf = {
7392
7392
  () => U("zoom") ? n.zoom : M.zoom ?? n.zoom
7393
7393
  ), le = y(
7394
7394
  () => U("katottg") ? String(n.katottg ?? "") : String(M.katottg ?? n.katottg ?? "")
7395
- ), j = y(() => U("layers") ? n.layers ?? [] : M.layers ?? n.layers ?? []), H = y(() => U("bounds") ? n.bounds : M.bounds ?? n.bounds), ee = A(
7396
- Array.isArray(z.value) && z.value.length === 2 ? [...z.value] : X
7397
- ), Z = A(
7395
+ ), j = y(() => U("layers") ? n.layers ?? [] : M.layers ?? n.layers ?? []), H = y(() => U("bounds") ? n.bounds : M.bounds ?? n.bounds), ee = D(
7396
+ Array.isArray(z.value) && z.value.length === 2 ? [...z.value] : Z
7397
+ ), X = D(
7398
7398
  typeof te.value == "number" ? te.value : N
7399
- ), ve = A(n.modelValue), ce = A(null), Me = A(null), Se = A([]), P = A(!1), ae = A(!1), ye = A([]), Y = A({
7399
+ ), ve = D(n.modelValue), ce = D(null), Me = D(null), Se = D([]), P = D(!1), ae = D(!1), ye = D([]), Y = D({
7400
7400
  coordinates: "",
7401
7401
  format: "decimal",
7402
7402
  order: "lat-lon"
@@ -7426,15 +7426,15 @@ const gf = {
7426
7426
  }
7427
7427
  };
7428
7428
  let Ce = !1, se = !1;
7429
- const xe = ml({}), Ae = A([]), Ve = y(
7430
- () => Ae.value.map((d) => xe[d]).filter(Boolean)
7431
- ), Be = A(null), Ye = y(() => Be.value?.entries ?? []), We = y(() => {
7429
+ const xe = ml({}), De = D([]), Ve = y(
7430
+ () => De.value.map((d) => xe[d]).filter(Boolean)
7431
+ ), Be = D(null), Ye = y(() => Be.value?.entries ?? []), We = y(() => {
7432
7432
  if (Be.value)
7433
7433
  return {
7434
7434
  left: `${Be.value.point.x + 12}px`,
7435
7435
  top: `${Be.value.point.y + 12}px`
7436
7436
  };
7437
- }), Xe = y(() => {
7437
+ }), Ze = y(() => {
7438
7438
  if (Array.isArray(n.tools) && n.tools.length) return n.tools;
7439
7439
  const d = l?.tools;
7440
7440
  return Array.isArray(d) ? d.map((m) => String(m)) : typeof d == "string" ? d.split(",").map((m) => m.trim()).filter(Boolean) : [];
@@ -7449,7 +7449,7 @@ const gf = {
7449
7449
  rectangle: !1,
7450
7450
  ruler: !1
7451
7451
  };
7452
- if (!Xe.value.length)
7452
+ if (!Ze.value.length)
7453
7453
  return {
7454
7454
  ...d,
7455
7455
  import: !0,
@@ -7459,7 +7459,7 @@ const gf = {
7459
7459
  polygon: !0,
7460
7460
  rectangle: !0
7461
7461
  };
7462
- const m = new Set(Xe.value.map(($) => $.toLowerCase()));
7462
+ const m = new Set(Ze.value.map(($) => $.toLowerCase()));
7463
7463
  return {
7464
7464
  search: m.has("search"),
7465
7465
  import: m.has("import"),
@@ -7511,7 +7511,7 @@ const gf = {
7511
7511
  }
7512
7512
  };
7513
7513
  }
7514
- const Ie = Le(), Ge = Object.keys(Ie), rt = A(Ge.length ? Ge[0] : "");
7514
+ const Ie = Le(), Ge = Object.keys(Ie), rt = D(Ge.length ? Ge[0] : "");
7515
7515
  async function B() {
7516
7516
  if (typeof window > "u") return null;
7517
7517
  const d = window;
@@ -7558,7 +7558,7 @@ const gf = {
7558
7558
  };
7559
7559
  }
7560
7560
  let ie = null, be = null, T = null, re = null, Ee = [], je = null, E = null, x = null, V = !1, F = !1, fe = !1, _e = null;
7561
- function Ze() {
7561
+ function Xe() {
7562
7562
  return {
7563
7563
  onSetup() {
7564
7564
  const d = this.newFeature({
@@ -7785,7 +7785,7 @@ const gf = {
7785
7785
  return I == null || I === "" ? null : { key: $.label || L, value: String(I) };
7786
7786
  }).filter(Boolean) : [] : Object.entries(m).slice(0, 5).map(([$, L]) => ({ key: $, value: L == null ? "—" : String(L) }));
7787
7787
  }
7788
- function Xt(d) {
7788
+ function Zt(d) {
7789
7789
  if (!Array.isArray(d)) return [];
7790
7790
  const m = (L) => Array.isArray(L) && L.length >= 2 && Number.isFinite(Number(L[0])) && Number.isFinite(Number(L[1])), $ = (L) => {
7791
7791
  if (!L.length) return L;
@@ -7827,7 +7827,7 @@ const gf = {
7827
7827
  }
7828
7828
  function cn(d, m) {
7829
7829
  if (!T) return [];
7830
- const $ = `vs-ov-bounds-src-${m}`, L = `vs-ov-bounds-line-${m}`, I = d.bounds ?? H.value ?? Se.value, K = Xt(I);
7830
+ const $ = `vs-ov-bounds-src-${m}`, L = `vs-ov-bounds-line-${m}`, I = d.bounds ?? H.value ?? Se.value, K = Zt(I);
7831
7831
  if (!K.length) return [];
7832
7832
  const me = {
7833
7833
  type: "FeatureCollection",
@@ -7849,7 +7849,7 @@ const gf = {
7849
7849
  }
7850
7850
  }), [L];
7851
7851
  }
7852
- function At(d) {
7852
+ function Dt(d) {
7853
7853
  if (!T) return;
7854
7854
  Ut(d);
7855
7855
  const m = d.config, $ = St(m);
@@ -7955,11 +7955,11 @@ const gf = {
7955
7955
  T.getLayer(we) && T.setLayoutProperty(we, "visibility", me);
7956
7956
  });
7957
7957
  }
7958
- function Zt() {
7958
+ function Xt() {
7959
7959
  if (!T) return;
7960
7960
  const m = {
7961
7961
  type: "FeatureCollection",
7962
- features: Xt(H.value ?? Se.value).map(($) => ({
7962
+ features: Zt(H.value ?? Se.value).map(($) => ({
7963
7963
  type: "Feature",
7964
7964
  properties: {},
7965
7965
  geometry: { type: "LineString", coordinates: $ }
@@ -7990,7 +7990,7 @@ const gf = {
7990
7990
  function Pt() {
7991
7991
  if (!T) return;
7992
7992
  const d = [], m = [], $ = [], L = [];
7993
- Ae.value.forEach((me) => {
7993
+ De.value.forEach((me) => {
7994
7994
  const we = xe[me];
7995
7995
  if (!we) return;
7996
7996
  const lt = String(we.config?.url ?? ""), gt = /\.v(?:m)?t(?:\?|$)/i.test(lt), Vt = /\.png(?:\?|$)/i.test(lt);
@@ -8009,9 +8009,9 @@ const gf = {
8009
8009
  if (!m) return;
8010
8010
  const $ = T.getCenter?.(), L = T.getZoom?.(), I = re?.getAll?.();
8011
8011
  T.setStyle(J(m)), T.once("style.load", () => {
8012
- if (T && ($ && Number.isFinite(L) && T.jumpTo({ center: [$.lng, $.lat], zoom: L }), Zt(), Ae.value.forEach((K) => {
8012
+ if (T && ($ && Number.isFinite(L) && T.jumpTo({ center: [$.lng, $.lat], zoom: L }), Xt(), De.value.forEach((K) => {
8013
8013
  const me = xe[K];
8014
- me && At(me);
8014
+ me && Dt(me);
8015
8015
  }), Pt(), I?.features?.length && re))
8016
8016
  try {
8017
8017
  I.features.forEach((K) => re.add(K)), f.value = I.features.length;
@@ -8290,13 +8290,13 @@ const gf = {
8290
8290
  [L, I]
8291
8291
  ];
8292
8292
  }
8293
- function Dl(d) {
8293
+ function Al(d) {
8294
8294
  if (!T || !d) return;
8295
8295
  const m = Ll(d);
8296
8296
  if (!m) return;
8297
8297
  const [[$, L], [I, K]] = m;
8298
8298
  if ($ === I && L === K) {
8299
- T.easeTo({ center: [$, L], zoom: Math.max(Z.value, 14) });
8299
+ T.easeTo({ center: [$, L], zoom: Math.max(X.value, 14) });
8300
8300
  return;
8301
8301
  }
8302
8302
  T.fitBounds(m, { padding: 30, duration: 250, maxZoom: 18 });
@@ -8348,7 +8348,7 @@ const gf = {
8348
8348
  }
8349
8349
  }), Ce = !1, Ee = (re.getAll?.()?.features ?? $).map(fn).filter(Boolean), nl(Ee), x = null;
8350
8350
  const I = bt(Ee[Ee.length - 1]?.geometry ?? null);
8351
- je = bt(I), ll(), el(I), I && (Dl(I), o.value || Ot());
8351
+ je = bt(I), ll(), el(I), I && (Al(I), o.value || Ot());
8352
8352
  }
8353
8353
  function wa() {
8354
8354
  re && (Ce = !0, Cn(), Ee.forEach((d) => {
@@ -8413,7 +8413,7 @@ const gf = {
8413
8413
  }
8414
8414
  }
8415
8415
  function Ca() {
8416
- o.value || !je || Dl(je);
8416
+ o.value || !je || Al(je);
8417
8417
  }
8418
8418
  function Sa(d) {
8419
8419
  if (!T || !ie) return;
@@ -8426,7 +8426,7 @@ const gf = {
8426
8426
  function Ma() {
8427
8427
  o.value || (P.value = !P.value);
8428
8428
  }
8429
- function Al(d) {
8429
+ function Dl(d) {
8430
8430
  if (!P.value) return;
8431
8431
  const m = Me.value;
8432
8432
  m && !m.contains(d.target) && (P.value = !1);
@@ -8437,10 +8437,10 @@ const gf = {
8437
8437
  function La() {
8438
8438
  o.value || (ye.value = [], P.value = !1, ae.value = !0);
8439
8439
  }
8440
- function Da() {
8440
+ function Aa() {
8441
8441
  ae.value = !1, ye.value = [];
8442
8442
  }
8443
- function Aa() {
8443
+ function Da() {
8444
8444
  if (o.value || !re) return;
8445
8445
  const d = Jd(
8446
8446
  Y.value.coordinates ?? "",
@@ -8454,7 +8454,7 @@ const gf = {
8454
8454
  ye.value = [], Sn({
8455
8455
  type: "Polygon",
8456
8456
  coordinates: [d.ring]
8457
- }), qt(), ae.value = !1, d.wasClosedAutomatically && De({
8457
+ }), qt(), ae.value = !1, d.wasClosedAutomatically && Ae({
8458
8458
  type: "info",
8459
8459
  title: "Імпорт координат",
8460
8460
  message: "Полігон був автоматично замкнений (перша і остання точки різнилися)."
@@ -8465,12 +8465,12 @@ const gf = {
8465
8465
  const m = 5;
8466
8466
  d.slice(0, m).forEach(($) => {
8467
8467
  const L = $.line > 0 ? `Рядок ${$.line}` : "Загальна помилка";
8468
- De({
8468
+ Ae({
8469
8469
  type: "warning",
8470
8470
  title: "Імпорт координат",
8471
8471
  message: `${L} — ${$.message}`
8472
8472
  });
8473
- }), d.length > m && De({
8473
+ }), d.length > m && Ae({
8474
8474
  type: "warning",
8475
8475
  title: "Імпорт координат",
8476
8476
  message: `Ще помилок: ${d.length - m}`
@@ -8486,7 +8486,7 @@ const gf = {
8486
8486
  try {
8487
8487
  const I = JSON.parse(String(L.result));
8488
8488
  if (!Ht(I).length) {
8489
- De({
8489
+ Ae({
8490
8490
  type: "warning",
8491
8491
  title: "Імпорт файлу",
8492
8492
  message: "Файл не містить коректний GeoJSON-обʼєкт."
@@ -8495,7 +8495,7 @@ const gf = {
8495
8495
  }
8496
8496
  Sn(I), qt();
8497
8497
  } catch {
8498
- De({
8498
+ Ae({
8499
8499
  type: "error",
8500
8500
  title: "Імпорт файлу",
8501
8501
  message: "Не вдалося прочитати файл. Перевірте формат GeoJSON/JSON."
@@ -8504,7 +8504,7 @@ const gf = {
8504
8504
  m.value = "";
8505
8505
  }
8506
8506
  }, L.onerror = () => {
8507
- De({
8507
+ Ae({
8508
8508
  type: "error",
8509
8509
  title: "Імпорт файлу",
8510
8510
  message: "Помилка читання файлу."
@@ -8517,7 +8517,7 @@ const gf = {
8517
8517
  L.href = $, L.download = "data.geojson", L.click(), URL.revokeObjectURL($);
8518
8518
  }
8519
8519
  return at(async () => {
8520
- if (window.addEventListener("click", Al, !0), !c.value) return;
8520
+ if (window.addEventListener("click", Dl, !0), !c.value) return;
8521
8521
  const d = await B();
8522
8522
  ie = d.maplibregl, be = d.MapboxDraw;
8523
8523
  const m = ut();
@@ -8525,7 +8525,7 @@ const gf = {
8525
8525
  container: c.value,
8526
8526
  style: J(m),
8527
8527
  center: [ee.value[0], ee.value[1]],
8528
- zoom: Z.value,
8528
+ zoom: X.value,
8529
8529
  attributionControl: !1
8530
8530
  }), S.value = T, T.addControl(new ie.NavigationControl({ showCompass: !0 }), "bottom-right"), T.on("load", () => {
8531
8531
  if (!(!be || !T)) {
@@ -8533,7 +8533,7 @@ const gf = {
8533
8533
  displayControlsDefault: !1,
8534
8534
  modes: {
8535
8535
  ...be.modes,
8536
- draw_rectangle: Ze()
8536
+ draw_rectangle: Xe()
8537
8537
  },
8538
8538
  controls: {
8539
8539
  point: !1,
@@ -8616,16 +8616,16 @@ const gf = {
8616
8616
  re && Sn($);
8617
8617
  });
8618
8618
  }
8619
- Zt(), Ae.value.forEach(($) => {
8619
+ Xt(), De.value.forEach(($) => {
8620
8620
  const L = xe[$];
8621
- L && At(L);
8621
+ L && Dt(L);
8622
8622
  }), Pt();
8623
8623
  }
8624
8624
  }), T.on("contextmenu", xt), T.on("zoomend", () => {
8625
- T && (Z.value = T.getZoom());
8625
+ T && (X.value = T.getZoom());
8626
8626
  }));
8627
8627
  }), sn(() => {
8628
- w.isRulerActive.value && w.closeRuler(), window.removeEventListener("click", Al, !0), Object.values(xe).forEach((d) => {
8628
+ w.isRulerActive.value && w.closeRuler(), window.removeEventListener("click", Dl, !0), Object.values(xe).forEach((d) => {
8629
8629
  T && Ut(d);
8630
8630
  }), Je(), _e?.remove && _e.remove(), _e = null, T?.remove && T.remove(), T = null, re = null, S.value = null;
8631
8631
  }), he(
@@ -8667,18 +8667,18 @@ const gf = {
8667
8667
  if (L.has(I)) return;
8668
8668
  const K = xe[I];
8669
8669
  K && T && Ut(K), delete xe[I];
8670
- }), Ae.value = $, T && (Ae.value.forEach((I) => {
8670
+ }), De.value = $, T && (De.value.forEach((I) => {
8671
8671
  const K = xe[I];
8672
- K && At(K);
8672
+ K && Dt(K);
8673
8673
  }), Pt());
8674
8674
  },
8675
8675
  { immediate: !0, deep: !0 }
8676
8676
  ), he(
8677
8677
  () => H.value,
8678
8678
  () => {
8679
- T && (Zt(), Ae.value.forEach((d) => {
8679
+ T && (Xt(), De.value.forEach((d) => {
8680
8680
  const m = xe[d];
8681
- m && At(m);
8681
+ m && Dt(m);
8682
8682
  }), Pt());
8683
8683
  },
8684
8684
  { deep: !0 }
@@ -8686,9 +8686,9 @@ const gf = {
8686
8686
  () => le.value,
8687
8687
  async (d) => {
8688
8688
  if (Se.value = [], !d) {
8689
- T && (Zt(), Ae.value.forEach((m) => {
8689
+ T && (Xt(), De.value.forEach((m) => {
8690
8690
  const $ = xe[m];
8691
- $ && At($);
8691
+ $ && Dt($);
8692
8692
  }), Pt());
8693
8693
  return;
8694
8694
  }
@@ -8701,9 +8701,9 @@ const gf = {
8701
8701
  console.error("Failed to fetch KATOTTG bounds", m);
8702
8702
  } finally {
8703
8703
  if (!T) return;
8704
- Zt(), Ae.value.forEach((m) => {
8704
+ Xt(), De.value.forEach((m) => {
8705
8705
  const $ = xe[m];
8706
- $ && At($);
8706
+ $ && Dt($);
8707
8707
  }), Pt();
8708
8708
  }
8709
8709
  },
@@ -8721,7 +8721,7 @@ const gf = {
8721
8721
  ), he(
8722
8722
  () => te.value,
8723
8723
  (d) => {
8724
- typeof d == "number" && (Z.value = d, T && T.setZoom(d));
8724
+ typeof d == "number" && (X.value = d, T && T.setZoom(d));
8725
8725
  }
8726
8726
  ), he(o, (d) => {
8727
8727
  d && on();
@@ -8821,12 +8821,12 @@ const gf = {
8821
8821
  u("button", {
8822
8822
  type: "button",
8823
8823
  class: "px-3 py-2 rounded-md border border-gray-300 text-gray-700 text-sm hover:bg-gray-100",
8824
- onClick: Da
8824
+ onClick: Aa
8825
8825
  }, " Скасувати "),
8826
8826
  u("button", {
8827
8827
  type: "button",
8828
8828
  class: "px-3 py-2 rounded-md bg-blue-600 text-white text-sm hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",
8829
- onClick: Aa,
8829
+ onClick: Da,
8830
8830
  disabled: o.value
8831
8831
  }, " Побудувати ", 8, Cf)
8832
8832
  ])
@@ -8870,7 +8870,7 @@ const gf = {
8870
8870
  disabled: o.value
8871
8871
  }, [
8872
8872
  G(qd)
8873
- ], 10, Df)) : q("", !0),
8873
+ ], 10, Af)) : q("", !0),
8874
8874
  Q.value.ruler ? (i(), p("button", {
8875
8875
  key: 4,
8876
8876
  class: oe(["vs-btn mt-3", { "vs-active": R(w).isRulerActive.value }]),
@@ -8884,7 +8884,7 @@ const gf = {
8884
8884
  onClick: m[6] || (m[6] = ($) => s.value = !s.value),
8885
8885
  title: "Full Screen"
8886
8886
  }, [
8887
- G(R(Za), { class: "h-4 w-4" })
8887
+ G(R(Xa), { class: "h-4 w-4" })
8888
8888
  ])
8889
8889
  ])
8890
8890
  ]),
@@ -8909,7 +8909,7 @@ const gf = {
8909
8909
  class: "absolute z-[1500] pointer-events-none",
8910
8910
  style: Pe(We.value)
8911
8911
  }, [
8912
- u("div", Af, [
8912
+ u("div", Df, [
8913
8913
  u("dl", If, [
8914
8914
  (i(!0), p(Fe, null, Ne(Ye.value, ($) => (i(), p("div", {
8915
8915
  key: `${$.key}-${$.value}`,
@@ -8923,7 +8923,7 @@ const gf = {
8923
8923
  ], 4)) : q("", !0),
8924
8924
  u("div", Ef, [
8925
8925
  u("div", Pf, [
8926
- G(Xd, {
8926
+ G(Zd, {
8927
8927
  basemaps: R(Ie),
8928
8928
  onOnLayerChange: Qn
8929
8929
  }, null, 8, ["basemaps"]),
@@ -8971,7 +8971,7 @@ const gf = {
8971
8971
  u("div", Gf, [
8972
8972
  u("div", Yf, [
8973
8973
  m[11] || (m[11] = Ke(" Центр: ", -1)),
8974
- k.value ? (i(), p("b", Xf, de(k.value.center.lng.toFixed(5)) + ", " + de(k.value.center.lat.toFixed(5)), 1)) : (i(), p("b", Zf, "—"))
8974
+ k.value ? (i(), p("b", Zf, de(k.value.center.lng.toFixed(5)) + ", " + de(k.value.center.lat.toFixed(5)), 1)) : (i(), p("b", Xf, "—"))
8975
8975
  ]),
8976
8976
  k.value && k.value.areaKm2 !== null ? (i(), p("div", Jf, [
8977
8977
  m[12] || (m[12] = Ke(" Площа: ", -1)),
@@ -9026,28 +9026,28 @@ const gf = {
9026
9026
  setup(e, { emit: t }) {
9027
9027
  const n = e, a = t;
9028
9028
  mt(n.style);
9029
- const l = A(null), r = A(null), o = A(null), s = A(!1), c = A(""), f = Ue(e, "modelValue"), h = y(() => n.placeholder || "Add tag…"), k = y(() => f.value?.length === 0 && c.value === ""), C = y(() => !n.disabled && f.value?.length > 0), S = y(() => n.disabled), g = async () => {
9029
+ const l = D(null), r = D(null), o = D(null), s = D(!1), c = D(""), f = Ue(e, "modelValue"), h = y(() => n.placeholder || "Add tag…"), k = y(() => f.value?.length === 0 && c.value === ""), C = y(() => !n.disabled && f.value?.length > 0), S = y(() => n.disabled), g = async () => {
9030
9030
  S.value || await et(() => o.value?.focus());
9031
- }, w = (X) => {
9032
- const N = X.trim();
9031
+ }, w = (Z) => {
9032
+ const N = Z.trim();
9033
9033
  N !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [N] : n.unique ? f.value.includes(N) || (f.value = [...f.value, N]) : f.value = [...f.value, N], c.value = "");
9034
9034
  }, v = () => {
9035
- const X = c.value;
9036
- X.trim() !== "" && w(X), c.value = "";
9037
- }, _ = (X) => {
9035
+ const Z = c.value;
9036
+ Z.trim() !== "" && w(Z), c.value = "";
9037
+ }, _ = (Z) => {
9038
9038
  const N = f.value.slice();
9039
- N.splice(X, 1), a("update:modelValue", N);
9039
+ N.splice(Z, 1), a("update:modelValue", N);
9040
9040
  }, b = () => {
9041
9041
  a("update:modelValue", []);
9042
9042
  }, M = () => {
9043
9043
  S.value || (s.value = !0);
9044
- }, D = () => {
9044
+ }, A = () => {
9045
9045
  s.value = !1, !S.value && v();
9046
- }, U = (X) => {
9047
- const { key: N } = X;
9048
- N === "Enter" ? (X.preventDefault(), v()) : N === "Backspace" && c.value === "" && f.value.length > 0 && _(f.value.length - 1);
9046
+ }, U = (Z) => {
9047
+ const { key: N } = Z;
9048
+ N === "Enter" ? (Z.preventDefault(), v()) : N === "Backspace" && c.value === "" && f.value.length > 0 && _(f.value.length - 1);
9049
9049
  };
9050
- return (X, N) => (i(), p("div", {
9050
+ return (Z, N) => (i(), p("div", {
9051
9051
  class: "flex gap-1 w-full",
9052
9052
  ref_key: "root",
9053
9053
  ref: l,
@@ -9110,7 +9110,7 @@ const gf = {
9110
9110
  "aria-label": "Add tag",
9111
9111
  "onUpdate:modelValue": N[0] || (N[0] = (W) => c.value = W),
9112
9112
  onFocus: M,
9113
- onBlur: D,
9113
+ onBlur: A,
9114
9114
  onKeydown: U,
9115
9115
  placeholder: f.value && f.value.length ? "" : void 0
9116
9116
  }, null, 40, dm)), [
@@ -9232,7 +9232,7 @@ const gf = {
9232
9232
  }),
9233
9233
  emits: ["update:modelValue"],
9234
9234
  setup(e) {
9235
- const t = e, n = Ue(e, "modelValue"), a = A(!1), l = y(() => t.init !== !1), r = y(() => !!t.table && !!t.code), o = () => {
9235
+ const t = e, n = Ue(e, "modelValue"), a = D(!1), l = y(() => t.init !== !1), r = y(() => !!t.table && !!t.code), o = () => {
9236
9236
  if (!r.value) return "";
9237
9237
  const f = encodeURIComponent(String(t.table)), h = encodeURIComponent(String(t.code));
9238
9238
  return `/api/code-gen/${f}/${h}`;
@@ -9282,7 +9282,7 @@ const gf = {
9282
9282
  }, Mm = ["onDragstart", "onDrop"], Vm = {
9283
9283
  class: "cursor-move",
9284
9284
  type: "button"
9285
- }, Lm = { class: "w-1/3" }, Dm = { class: "w-2/3" }, Am = ["onClick"], Im = {
9285
+ }, Lm = { class: "w-1/3" }, Am = { class: "w-2/3" }, Dm = ["onClick"], Im = {
9286
9286
  key: 0,
9287
9287
  class: "text-[14px] text-gray-700"
9288
9288
  }, Fm = { class: "mt-2 w-full flex items-center" }, Tm = ["disabled"], Em = /* @__PURE__ */ pe({
@@ -9295,7 +9295,7 @@ const gf = {
9295
9295
  },
9296
9296
  emits: ["update:modelValue"],
9297
9297
  setup(e, { emit: t }) {
9298
- const n = (v) => `${v}-${Math.random().toString(36).substring(2, 15)}`, a = ot("values"), l = e, r = t, o = l.addButtonText ?? "Додати", s = l.ignore ?? [], c = A([]), f = A(null);
9298
+ const n = (v) => `${v}-${Math.random().toString(36).substring(2, 15)}`, a = ot("values"), l = e, r = t, o = l.addButtonText ?? "Додати", s = l.ignore ?? [], c = D([]), f = D(null);
9299
9299
  (() => {
9300
9300
  const v = l.parent && a?.value?.[l.parent] || l.modelValue || {};
9301
9301
  c.value = Object.entries(v).filter(([_]) => !s.includes(_)).map(([_, b]) => ({
@@ -9339,10 +9339,10 @@ const gf = {
9339
9339
  key: b.id,
9340
9340
  class: oe(["flex items-center gap-2 w-full", { "opacity-50": f.value === M }]),
9341
9341
  draggable: "true",
9342
- onDragstart: (D) => k(M),
9342
+ onDragstart: (A) => k(M),
9343
9343
  onDragover: _[0] || (_[0] = Te(() => {
9344
9344
  }, ["prevent"])),
9345
- onDrop: (D) => C(M)
9345
+ onDrop: (A) => C(M)
9346
9346
  }, [
9347
9347
  u("button", Vm, [
9348
9348
  G(R(rn), { class: "h-4 w-4" })
@@ -9350,23 +9350,23 @@ const gf = {
9350
9350
  u("div", Lm, [
9351
9351
  G(yn, {
9352
9352
  modelValue: b.key,
9353
- "onUpdate:modelValue": (D) => b.key = D,
9353
+ "onUpdate:modelValue": (A) => b.key = A,
9354
9354
  placeholder: "Ключ"
9355
9355
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
9356
9356
  ]),
9357
- u("div", Dm, [
9357
+ u("div", Am, [
9358
9358
  G(yn, {
9359
9359
  modelValue: b.value,
9360
- "onUpdate:modelValue": (D) => b.value = D,
9360
+ "onUpdate:modelValue": (A) => b.value = A,
9361
9361
  placeholder: "Значення"
9362
9362
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
9363
9363
  ]),
9364
9364
  u("button", {
9365
- onClick: (D) => w(b.id),
9365
+ onClick: (A) => w(b.id),
9366
9366
  class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
9367
9367
  }, [
9368
9368
  G(R(kt), { class: "h-4 w-4" })
9369
- ], 8, Am)
9369
+ ], 8, Dm)
9370
9370
  ], 42, Mm))), 128))
9371
9371
  ], 512),
9372
9372
  c.value.length ? q("", !0) : (i(), p("span", Im, " Дані для відображення відсутні ")),
@@ -9403,7 +9403,7 @@ const gf = {
9403
9403
  }),
9404
9404
  emits: ["update:modelValue"],
9405
9405
  setup(e) {
9406
- const t = e, n = Ue(e, "modelValue"), a = A([]), l = A(null), r = y(() => !!t.disabled), o = y(() => t.placeholder ?? ""), s = y(() => t.addButtonText ?? "Додати");
9406
+ const t = e, n = Ue(e, "modelValue"), a = D([]), l = D(null), r = y(() => !!t.disabled), o = y(() => t.placeholder ?? ""), s = y(() => t.addButtonText ?? "Додати");
9407
9407
  let c = !1;
9408
9408
  const f = (v) => `${v}-${Math.random().toString(36).substring(2, 15)}`, h = (v) => {
9409
9409
  const _ = v ?? n.value ?? [];
@@ -9450,10 +9450,10 @@ const gf = {
9450
9450
  key: b.id,
9451
9451
  class: oe(["flex items-center gap-2 w-full", { "opacity-50": l.value === M }]),
9452
9452
  draggable: "true",
9453
- onDragstart: (D) => g(M),
9453
+ onDragstart: (A) => g(M),
9454
9454
  onDragover: _[0] || (_[0] = Te(() => {
9455
9455
  }, ["prevent"])),
9456
- onDrop: (D) => w(M)
9456
+ onDrop: (A) => w(M)
9457
9457
  }, [
9458
9458
  u("button", {
9459
9459
  class: "cursor-move",
@@ -9466,28 +9466,28 @@ const gf = {
9466
9466
  e.inputType === "text" ? (i(), ke(yn, {
9467
9467
  key: 0,
9468
9468
  modelValue: b.value,
9469
- "onUpdate:modelValue": (D) => b.value = D,
9469
+ "onUpdate:modelValue": (A) => b.value = A,
9470
9470
  disabled: r.value,
9471
9471
  placeholder: o.value
9472
9472
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : q("", !0),
9473
9473
  e.inputType === "tel" ? (i(), ke(sa, {
9474
9474
  key: 1,
9475
9475
  modelValue: b.value,
9476
- "onUpdate:modelValue": (D) => b.value = D,
9476
+ "onUpdate:modelValue": (A) => b.value = A,
9477
9477
  disabled: r.value,
9478
9478
  placeholder: o.value
9479
9479
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : q("", !0),
9480
9480
  e.inputType === "email" ? (i(), ke(ra, {
9481
9481
  key: 2,
9482
9482
  modelValue: b.value,
9483
- "onUpdate:modelValue": (D) => b.value = D,
9483
+ "onUpdate:modelValue": (A) => b.value = A,
9484
9484
  disabled: r.value,
9485
9485
  placeholder: o.value
9486
9486
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : q("", !0),
9487
9487
  e.inputType === "mask" ? (i(), ke(xl, {
9488
9488
  key: 3,
9489
9489
  modelValue: b.value,
9490
- "onUpdate:modelValue": (D) => b.value = D,
9490
+ "onUpdate:modelValue": (A) => b.value = A,
9491
9491
  mask: e.mask,
9492
9492
  disabled: r.value,
9493
9493
  placeholder: o.value
@@ -9495,7 +9495,7 @@ const gf = {
9495
9495
  ]),
9496
9496
  u("button", {
9497
9497
  type: "button",
9498
- onClick: (D) => S(b.id),
9498
+ onClick: (A) => S(b.id),
9499
9499
  disabled: r.value,
9500
9500
  class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200 disabled:opacity-50"
9501
9501
  }, [
@@ -9517,7 +9517,7 @@ const gf = {
9517
9517
  ])
9518
9518
  ]));
9519
9519
  }
9520
- }), Km = /* @__PURE__ */ He(Wm, [["__scopeId", "data-v-972a598a"]]), Gm = { class: "flex items-center gap-2 w-full" }, Ym = ["disabled"], Xm = ["disabled"], Zm = /* @__PURE__ */ pe({
9520
+ }), Km = /* @__PURE__ */ He(Wm, [["__scopeId", "data-v-972a598a"]]), Gm = { class: "flex items-center gap-2 w-full" }, Ym = ["disabled"], Zm = ["disabled"], Xm = /* @__PURE__ */ pe({
9521
9521
  __name: "vs-input-color",
9522
9522
  props: {
9523
9523
  style: { default: () => ({}) },
@@ -9551,7 +9551,7 @@ const gf = {
9551
9551
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
9552
9552
  "onUpdate:modelValue": c[1] || (c[1] = (f) => r.value = f),
9553
9553
  disabled: o.value
9554
- }, null, 8, Xm), [
9554
+ }, null, 8, Zm), [
9555
9555
  [tt, r.value]
9556
9556
  ])
9557
9557
  ]));
@@ -9636,7 +9636,7 @@ const gf = {
9636
9636
  }),
9637
9637
  emits: ["update:modelValue"],
9638
9638
  setup(e) {
9639
- const t = e, n = A(t.count), a = y(() => t.limit), { inputClass: l } = mt(t.style), r = Ue(e, "modelValue"), o = y(() => !!t.disabled), s = y(() => t.placeholder ?? "");
9639
+ const t = e, n = D(t.count), a = y(() => t.limit), { inputClass: l } = mt(t.style), r = Ue(e, "modelValue"), o = y(() => !!t.disabled), s = y(() => t.placeholder ?? "");
9640
9640
  pl(() => {
9641
9641
  const w = r.value?.length ?? 0;
9642
9642
  w < n.value && (r.value = [
@@ -9644,7 +9644,7 @@ const gf = {
9644
9644
  ...Array(n.value - w)
9645
9645
  ]);
9646
9646
  });
9647
- const c = A({}), f = A({});
9647
+ const c = D({}), f = D({});
9648
9648
  function h(w, v) {
9649
9649
  w && (c.value[v] = w);
9650
9650
  }
@@ -9798,12 +9798,12 @@ const gf = {
9798
9798
  }),
9799
9799
  emits: /* @__PURE__ */ ze(["change", "update:modelValue", "value-selected"], ["update:modelValue"]),
9800
9800
  setup(e, { emit: t }) {
9801
- const n = e, a = t, l = Ue(e, "modelValue"), r = A([]), o = A(n.options ?? []), s = A({}), c = A({}), f = A({ keyword: "", parent: null }), h = A(""), k = A(!1), C = A(null), S = A(null), g = A(null), w = A(null), v = A(null), _ = A({});
9801
+ const n = e, a = t, l = Ue(e, "modelValue"), r = D([]), o = D(n.options ?? []), s = D({}), c = D({}), f = D({ keyword: "", parent: null }), h = D(""), k = D(!1), C = D(null), S = D(null), g = D(null), w = D(null), v = D(null), _ = D({});
9802
9802
  let b = !1, M = !1;
9803
- const D = ot("values"), U = y(() => !!n.disabled), X = y(() => n.placeholder ?? "Оберіть значення"), N = y(() => n.search !== !1), W = y(() => {
9803
+ const A = ot("values"), U = y(() => !!n.disabled), Z = y(() => n.placeholder ?? "Оберіть значення"), N = y(() => n.search !== !1), W = y(() => {
9804
9804
  const x = n.parent ?? n.parentValue;
9805
9805
  return x ? String(x) : "";
9806
- }), z = y(() => W.value ? D?.value?.[W.value] ?? null : null), te = (x) => x == null ? "__null__" : String(x), le = (x) => {
9806
+ }), z = y(() => W.value ? A?.value?.[W.value] ?? null : null), te = (x) => x == null ? "__null__" : String(x), le = (x) => {
9807
9807
  if (!x) return "";
9808
9808
  const V = x.label ?? x.text ?? x.name ?? x.ua ?? x.en;
9809
9809
  return V ? String(V) : x.id !== void 0 && x.id !== null ? String(x.id) : "";
@@ -9818,7 +9818,7 @@ const gf = {
9818
9818
  V = V.filter((fe) => le(fe).toLowerCase().includes(F));
9819
9819
  }
9820
9820
  return V.filter((F) => !x.has(te(F.id)));
9821
- }), Z = () => {
9821
+ }), X = () => {
9822
9822
  if (!n.data) return "";
9823
9823
  const x = n.prefix ?? "api", V = n.api ?? `/${x}/suggest/${n.data}`;
9824
9824
  return `${n.host ?? ""}${V}`;
@@ -9841,7 +9841,7 @@ const gf = {
9841
9841
  }), o.value = Array.from(V.values()), ve();
9842
9842
  }, P = async (x = "") => {
9843
9843
  if (!n.data) return [];
9844
- const V = Z();
9844
+ const V = X();
9845
9845
  if (!V) return [];
9846
9846
  const F = new URLSearchParams();
9847
9847
  F.set("json", "1"), x && F.set("key", x), n.start === 1 && F.set("start", "1"), z.value !== null && z.value !== void 0 && z.value !== "" && F.set("parent", String(z.value));
@@ -9852,7 +9852,7 @@ const gf = {
9852
9852
  }
9853
9853
  }, ae = async (x) => {
9854
9854
  if (!n.data || !x.length) return [];
9855
- const V = Z();
9855
+ const V = X();
9856
9856
  if (!V) return [];
9857
9857
  const F = Array.from(new Set(x.map((_e) => te(_e)))), fe = new URLSearchParams();
9858
9858
  fe.set("json", "1"), fe.set("val", F.join(",")), n.start === 1 && fe.set("start", "1"), z.value !== null && z.value !== void 0 && z.value !== "" && fe.set("parent", String(z.value));
@@ -9882,26 +9882,26 @@ const gf = {
9882
9882
  };
9883
9883
  })(async (x) => {
9884
9884
  n.data && await Y(x, { force: !0 });
9885
- }, 250), se = A(null), xe = () => {
9885
+ }, 250), se = D(null), xe = () => {
9886
9886
  if (!g.value) return;
9887
- const x = g.value.getBoundingClientRect(), V = window.innerHeight ?? document.documentElement.clientHeight, F = window.innerWidth ?? document.documentElement.clientWidth, fe = 8, _e = 8, Ze = n.maxHeight ?? 280, qe = V - x.bottom - _e - fe, ut = x.top - _e - fe, Ct = qe >= ut, St = Math.max(F - fe * 2, 0);
9887
+ const x = g.value.getBoundingClientRect(), V = window.innerHeight ?? document.documentElement.clientHeight, F = window.innerWidth ?? document.documentElement.clientWidth, fe = 8, _e = 8, Xe = n.maxHeight ?? 280, qe = V - x.bottom - _e - fe, ut = x.top - _e - fe, Ct = qe >= ut, St = Math.max(F - fe * 2, 0);
9888
9888
  let { width: Je } = x;
9889
9889
  St > 0 && Je > St && (Je = St);
9890
9890
  let { left: ht } = x;
9891
9891
  ht + Je + fe > F && (ht = F - Je - fe), ht = Math.max(ht, fe);
9892
- const Xt = Math.min(
9893
- Ze,
9892
+ const Zt = Math.min(
9893
+ Xe,
9894
9894
  Math.max(Ct ? qe : ut, 50)
9895
9895
  );
9896
9896
  _.value = {
9897
9897
  position: "fixed",
9898
9898
  left: `${ht}px`,
9899
9899
  width: `${Je}px`,
9900
- maxHeight: `${Xt}px`,
9900
+ maxHeight: `${Zt}px`,
9901
9901
  transform: Ct ? "none" : "translateY(-100%)",
9902
9902
  top: Ct ? `${x.bottom + _e}px` : `${x.top - _e}px`
9903
9903
  };
9904
- }, Ae = async (x = "click") => {
9904
+ }, De = async (x = "click") => {
9905
9905
  U.value || k.value || (se.value = x, await Y(h.value.trim()), k.value = !0, await et(), xe(), v.value?.focus());
9906
9906
  }, Ve = () => {
9907
9907
  k.value = !1, se.value = null, et(() => {
@@ -9917,7 +9917,7 @@ const gf = {
9917
9917
  Ve();
9918
9918
  return;
9919
9919
  }
9920
- await Ae("click");
9920
+ await De("click");
9921
9921
  }
9922
9922
  }, Ye = (x) => {
9923
9923
  x.key === "Escape" && Ve();
@@ -9925,7 +9925,7 @@ const gf = {
9925
9925
  if (!k.value) return;
9926
9926
  const V = x.target;
9927
9927
  w.value?.contains(V) || Ve();
9928
- }, Xe = (x) => {
9928
+ }, Ze = (x) => {
9929
9929
  const V = x.target;
9930
9930
  S.value?.contains(V) || w.value?.contains(V) || Ve();
9931
9931
  }, Q = (x) => {
@@ -9974,7 +9974,7 @@ const gf = {
9974
9974
  props: n,
9975
9975
  fetchOptionByValue: ye,
9976
9976
  optionsList: o,
9977
- selectedOption: A(null),
9977
+ selectedOption: D(null),
9978
9978
  modelValue: l,
9979
9979
  onCreated: async (x, V) => {
9980
9980
  const F = x ?? await ye(V), fe = F?.id ?? V;
@@ -10028,7 +10028,7 @@ const gf = {
10028
10028
  }, { immediate: !0, deep: !0 }), he(() => n.data, async (x) => {
10029
10029
  x && (await Y(h.value.trim()), await je());
10030
10030
  }, { immediate: !0 });
10031
- const E = A(!1);
10031
+ const E = D(!1);
10032
10032
  return he(z, async () => {
10033
10033
  if (n.data) {
10034
10034
  if (!E.value) {
@@ -10038,9 +10038,9 @@ const gf = {
10038
10038
  r.value = [], await Y(h.value.trim()), await je();
10039
10039
  }
10040
10040
  }), at(async () => {
10041
- document.addEventListener("click", Xe, !0), window.addEventListener("keydown", Ye), window.addEventListener("scroll", We, !0), await je();
10041
+ document.addEventListener("click", Ze, !0), window.addEventListener("keydown", Ye), window.addEventListener("scroll", We, !0), await je();
10042
10042
  }), sn(() => {
10043
- document.removeEventListener("click", Xe, !0), window.removeEventListener("keydown", Ye), window.removeEventListener("scroll", We, !0);
10043
+ document.removeEventListener("click", Ze, !0), window.removeEventListener("keydown", Ye), window.removeEventListener("scroll", We, !0);
10044
10044
  }), (x, V) => (i(), p(Fe, null, [
10045
10045
  G(R(qn), {
10046
10046
  visible: R(Ge),
@@ -10091,10 +10091,10 @@ const gf = {
10091
10091
  ref_key: "inputRef",
10092
10092
  ref: v,
10093
10093
  "onUpdate:modelValue": V[2] || (V[2] = (F) => h.value = F),
10094
- placeholder: X.value,
10094
+ placeholder: Z.value,
10095
10095
  disabled: U.value,
10096
10096
  readonly: !N.value,
10097
- onFocus: V[3] || (V[3] = () => Ae("focus")),
10097
+ onFocus: V[3] || (V[3] = () => De("focus")),
10098
10098
  onKeydown: Q,
10099
10099
  class: "flex-1 bg-transparent border-0 outline-none px-0 py-1 text-sm text-stone-900 placeholder:text-stone-400"
10100
10100
  }, null, 40, ip), [
@@ -10216,7 +10216,7 @@ const gf = {
10216
10216
  set: (N) => {
10217
10217
  o.value = N;
10218
10218
  }
10219
- }), c = A(!1), f = A([]), h = A(!1), k = A(null);
10219
+ }), c = D(!1), f = D([]), h = D(!1), k = D(null);
10220
10220
  he(h, (N) => {
10221
10221
  typeof document > "u" || (N ? (k.value = document.body.style.overflow, document.body.style.overflow = "hidden") : k.value != null ? (document.body.style.overflow = k.value, k.value = null) : document.body.style.removeProperty("overflow"));
10222
10222
  }), Et(() => {
@@ -10254,7 +10254,7 @@ const gf = {
10254
10254
  const te = a.includes.map((le) => _.value?.[le]).filter(Boolean);
10255
10255
  te.length && (W = `${te.join(", ")}, ${N}`);
10256
10256
  }
10257
- const z = X(W);
10257
+ const z = Z(W);
10258
10258
  if (z) {
10259
10259
  c.value = !0;
10260
10260
  try {
@@ -10267,7 +10267,7 @@ const gf = {
10267
10267
  }
10268
10268
  }
10269
10269
  }
10270
- function D() {
10270
+ function A() {
10271
10271
  h.value = !h.value;
10272
10272
  }
10273
10273
  function U(N) {
@@ -10279,7 +10279,7 @@ const gf = {
10279
10279
  };
10280
10280
  a.geom && _?.value && (_.value[a.geom] = te), l("update:geom", te);
10281
10281
  }
10282
- function X(N) {
10282
+ function Z(N) {
10283
10283
  if (!a.api) return "";
10284
10284
  const W = {
10285
10285
  value: encodeURIComponent(N),
@@ -10304,7 +10304,7 @@ const gf = {
10304
10304
  key: 0,
10305
10305
  type: "button",
10306
10306
  class: "absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-blue-600",
10307
- onClick: D,
10307
+ onClick: A,
10308
10308
  title: "Show search results"
10309
10309
  }, [
10310
10310
  G(R(tn), { class: "h-4 w-4" })
@@ -10350,7 +10350,7 @@ const gf = {
10350
10350
  ]))
10351
10351
  ]));
10352
10352
  }
10353
- }), Dp = { class: "vs-datalist space-y-3" }, Ap = { class: "space-y-3" }, Ip = ["onClick", "disabled"], Fp = {
10353
+ }), Ap = { class: "vs-datalist space-y-3" }, Dp = { class: "space-y-3" }, Ip = ["onClick", "disabled"], Fp = {
10354
10354
  key: 0,
10355
10355
  class: "rounded-lg border border-dashed border-gray-200 p-4 text-sm text-gray-500"
10356
10356
  }, Tp = ["disabled"], Ep = /* @__PURE__ */ pe({
@@ -10376,7 +10376,7 @@ const gf = {
10376
10376
  }),
10377
10377
  emits: ["update:modelValue"],
10378
10378
  setup(e) {
10379
- const t = e, n = Ue(e, "modelValue"), a = y(() => Array.isArray(n.value) ? n.value : []), l = A([]), r = y(() => t.schema?.map((v) => ({
10379
+ const t = e, n = Ue(e, "modelValue"), a = y(() => Array.isArray(n.value) ? n.value : []), l = D([]), r = y(() => t.schema?.map((v) => ({
10380
10380
  ...v,
10381
10381
  disabled: t.disabled || v.disabled
10382
10382
  })) ?? []), o = y(() => r.value.map((v) => w(v))), s = y(() => r.value.reduce((_, b) => {
@@ -10412,8 +10412,8 @@ const gf = {
10412
10412
  ...v
10413
10413
  };
10414
10414
  }
10415
- return (v, _) => (i(), p("div", Dp, [
10416
- u("div", Ap, [
10415
+ return (v, _) => (i(), p("div", Ap, [
10416
+ u("div", Dp, [
10417
10417
  (i(!0), p(Fe, null, Ne(a.value, (b, M) => (i(), p("div", {
10418
10418
  key: l.value[M],
10419
10419
  class: oe(["flex items-center gap-3 rounded-lg transition-colors", {
@@ -10425,13 +10425,13 @@ const gf = {
10425
10425
  layout: "inline",
10426
10426
  navigation: !1,
10427
10427
  values: a.value[M],
10428
- "onUpdate:values": (D) => a.value[M] = D,
10428
+ "onUpdate:values": (A) => a.value[M] = A,
10429
10429
  "form-id": l.value[M]
10430
10430
  }, null, 8, ["schema", "values", "onUpdate:values", "form-id"]),
10431
10431
  u("button", {
10432
10432
  type: "button",
10433
10433
  class: "h-[38px] w-[38px] flex items-center justify-center text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",
10434
- onClick: (D) => g(M),
10434
+ onClick: (A) => g(M),
10435
10435
  disabled: f.value
10436
10436
  }, [
10437
10437
  G(R(ln), { class: "h-4 w-4" })
@@ -10482,13 +10482,13 @@ const gf = {
10482
10482
  }),
10483
10483
  emits: ["update:modelValue"],
10484
10484
  setup(e) {
10485
- const t = e, n = Ue(e, "modelValue"), a = A([]), l = A([]), r = A(0), o = A(null), s = A(null), c = A(null), f = y(() => t.groupLabel ?? "Group"), h = y(() => t.emptyLabel ?? "Ще немає груп"), k = y(() => t.schema?.map((Y) => ({
10485
+ const t = e, n = Ue(e, "modelValue"), a = D([]), l = D([]), r = D(0), o = D(null), s = D(null), c = D(null), f = y(() => t.groupLabel ?? "Group"), h = y(() => t.emptyLabel ?? "Ще немає груп"), k = y(() => t.schema?.map((Y) => ({
10486
10486
  ...Y,
10487
10487
  disabled: t.disabled || Y.disabled
10488
10488
  })) ?? []), C = y(() => k.value.map((Y) => z(Y))), S = y(() => t.view === "accordion"), g = y(() => !!(t.collapsible || S.value)), w = y(() => t.draggable !== !1), v = y(() => t.disabled ? !1 : t.maxGroups ? n.value.length < t.maxGroups : !0), _ = y(() => t.disabled || n.value.length <= (t.minGroups || 0));
10489
10489
  he(() => n.value.length, () => {
10490
- b(), M(), D();
10491
- }, { immediate: !0 }), he(() => t.schema, D, { immediate: !0, deep: !0 }), he(() => t.view, () => {
10490
+ b(), M(), A();
10491
+ }, { immediate: !0 }), he(() => t.schema, A, { immediate: !0, deep: !0 }), he(() => t.view, () => {
10492
10492
  M();
10493
10493
  }, { immediate: !0 });
10494
10494
  function b() {
@@ -10499,7 +10499,7 @@ const gf = {
10499
10499
  const Y = n.value.length;
10500
10500
  S.value ? Y === 0 ? r.value = -1 : r.value >= Y ? r.value = Y - 1 : r.value < 0 && (r.value = 0) : l.value.length < Y ? l.value = [...l.value, ...Array.from({ length: Y - l.value.length }, () => !1)] : l.value.length > Y && l.value.splice(Y);
10501
10501
  }
10502
- function D() {
10502
+ function A() {
10503
10503
  if (!t.minGroups || n.value.length >= t.minGroups) return;
10504
10504
  const Y = t.minGroups - n.value.length, ge = Array.from({ length: Y }, U);
10505
10505
  n.value = [...n.value, ...ge], M();
@@ -10510,11 +10510,11 @@ const gf = {
10510
10510
  Y[ge.name] = ge?.default ?? null;
10511
10511
  }), Y;
10512
10512
  }
10513
- function X() {
10513
+ function Z() {
10514
10514
  v.value && (n.value = [...n.value, U()], b(), M());
10515
10515
  }
10516
10516
  function N(Y) {
10517
- _.value || (n.value = n.value.filter((ge, Ce) => Ce !== Y), b(), S.value ? r.value >= n.value.length && (r.value = n.value.length - 1) : l.value.splice(Y, 1), D());
10517
+ _.value || (n.value = n.value.filter((ge, Ce) => Ce !== Y), b(), S.value ? r.value >= n.value.length && (r.value = n.value.length - 1) : l.value.splice(Y, 1), A());
10518
10518
  }
10519
10519
  function W(Y) {
10520
10520
  if (t.disabled) return;
@@ -10559,7 +10559,7 @@ const gf = {
10559
10559
  function ee(Y, ge) {
10560
10560
  Se(Y, ge);
10561
10561
  }
10562
- function Z(Y) {
10562
+ function X(Y) {
10563
10563
  !w.value || t.disabled || ye();
10564
10564
  }
10565
10565
  function ve() {
@@ -10568,8 +10568,8 @@ const gf = {
10568
10568
  function ce(Y, ge) {
10569
10569
  const Ce = [...n.value], [se] = Ce.splice(Y, 1);
10570
10570
  Ce.splice(ge, 0, se), n.value = Ce;
10571
- const xe = [...a.value], [Ae] = xe.splice(Y, 1);
10572
- if (xe.splice(ge, 0, Ae), a.value = xe, S.value)
10571
+ const xe = [...a.value], [De] = xe.splice(Y, 1);
10572
+ if (xe.splice(ge, 0, De), a.value = xe, S.value)
10573
10573
  r.value === Y && (r.value = ge);
10574
10574
  else {
10575
10575
  const Ve = [...l.value], [Be] = Ve.splice(Y, 1);
@@ -10611,7 +10611,7 @@ const gf = {
10611
10611
  onDragend: ve,
10612
10612
  onDragover: Te((xe) => H(se, xe), ["prevent"]),
10613
10613
  onDragenter: Te((xe) => ee(se, xe), ["prevent"]),
10614
- onDrop: Te((xe) => Z(), ["prevent"])
10614
+ onDrop: Te((xe) => X(), ["prevent"])
10615
10615
  }, [
10616
10616
  u("div", {
10617
10617
  class: oe(["flex items-center justify-between gap-2 border-b border-gray-100 px-4 py-3", [
@@ -10681,7 +10681,7 @@ const gf = {
10681
10681
  u("button", {
10682
10682
  type: "button",
10683
10683
  class: "flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",
10684
- onClick: X,
10684
+ onClick: Z,
10685
10685
  disabled: !v.value
10686
10686
  }, [
10687
10687
  G(R($t), { class: "h-4 w-4" }),
@@ -10711,7 +10711,7 @@ const gf = {
10711
10711
  }),
10712
10712
  emits: ["update:modelValue"],
10713
10713
  setup(e, { expose: t }) {
10714
- const n = e, a = Ue(e, "modelValue"), l = A(null), r = y(() => typeof n.height == "number" ? `${n.height}px` : n.height || "280px");
10714
+ const n = e, a = Ue(e, "modelValue"), l = D(null), r = y(() => typeof n.height == "number" ? `${n.height}px` : n.height || "280px");
10715
10715
  let o = null, s = null, c = !1;
10716
10716
  const f = () => {
10717
10717
  if (s) return Promise.resolve(s);
@@ -10721,42 +10721,42 @@ const gf = {
10721
10721
  return s = g.monaco, Promise.resolve(s);
10722
10722
  if (g[Bn]) return g[Bn];
10723
10723
  const v = (async () => {
10724
- const _ = (D) => {
10725
- if (Array.from(document.styleSheets || []).some((N) => N?.href?.includes(D))) return;
10726
- const X = document.createElement("link");
10727
- X.rel = "stylesheet", X.href = D, document.head.appendChild(X);
10728
- }, b = (D) => {
10729
- if (g[Jt]?.[D]) return g[Jt][D];
10724
+ const _ = (A) => {
10725
+ if (Array.from(document.styleSheets || []).some((N) => N?.href?.includes(A))) return;
10726
+ const Z = document.createElement("link");
10727
+ Z.rel = "stylesheet", Z.href = A, document.head.appendChild(Z);
10728
+ }, b = (A) => {
10729
+ if (g[Jt]?.[A]) return g[Jt][A];
10730
10730
  g[Jt] ||= {};
10731
- const U = Array.from(document.scripts).find((X) => X.src === D);
10732
- return U ? (g[Jt][D] = new Promise((X, N) => {
10731
+ const U = Array.from(document.scripts).find((Z) => Z.src === A);
10732
+ return U ? (g[Jt][A] = new Promise((Z, N) => {
10733
10733
  const W = U.readyState;
10734
10734
  if (U.dataset.loaded === "true" || W === "loaded" || W === "complete") {
10735
- X();
10735
+ Z();
10736
10736
  return;
10737
10737
  }
10738
10738
  U.addEventListener("load", () => {
10739
- U.dataset.loaded = "true", X();
10739
+ U.dataset.loaded = "true", Z();
10740
10740
  }, { once: !0 }), U.addEventListener("error", (z) => N(z), { once: !0 });
10741
- }), g[Jt][D]) : (g[Jt][D] = new Promise((X, N) => {
10741
+ }), g[Jt][A]) : (g[Jt][A] = new Promise((Z, N) => {
10742
10742
  const W = document.createElement("script");
10743
- W.src = D, W.async = !0, W.onload = () => {
10744
- W.dataset.loaded = "true", X();
10743
+ W.src = A, W.async = !0, W.onload = () => {
10744
+ W.dataset.loaded = "true", Z();
10745
10745
  }, W.onerror = (z) => N(z), document.body.appendChild(W);
10746
- }), g[Jt][D]);
10746
+ }), g[Jt][A]);
10747
10747
  }, M = "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.0/min/vs";
10748
- return _(`${M}/editor/editor.main.min.css`), await b(`${M}/loader.min.js`), g[Rn] || (g[Rn] = new Promise((D, U) => {
10748
+ return _(`${M}/editor/editor.main.min.css`), await b(`${M}/loader.min.js`), g[Rn] || (g[Rn] = new Promise((A, U) => {
10749
10749
  window.require.config({
10750
10750
  paths: { vs: M }
10751
10751
  }), window.require(
10752
10752
  ["vs/editor/editor.main"],
10753
10753
  () => {
10754
- s = window.monaco, g.monaco = s, D(s);
10754
+ s = window.monaco, g.monaco = s, A(s);
10755
10755
  },
10756
- (X) => U(X)
10756
+ (Z) => U(Z)
10757
10757
  );
10758
- }).catch((D) => {
10759
- throw delete g[Rn], D;
10758
+ }).catch((A) => {
10759
+ throw delete g[Rn], A;
10760
10760
  })), g[Rn];
10761
10761
  })().catch((_) => {
10762
10762
  throw delete g[Bn], _;
@@ -10828,7 +10828,7 @@ const gf = {
10828
10828
  }, null, 512)
10829
10829
  ], 4));
10830
10830
  }
10831
- }), Xp = {
10831
+ }), Zp = {
10832
10832
  VsInputText: yn,
10833
10833
  VsInputRadio: El,
10834
10834
  VsInputInlineSelect: ol,
@@ -10837,7 +10837,7 @@ const gf = {
10837
10837
  "vs-input-textarea": Ju,
10838
10838
  "vs-input-richtext": Qu,
10839
10839
  "vs-input-mask": xl,
10840
- "vs-input-number": Ao,
10840
+ "vs-input-number": Do,
10841
10841
  "vs-input-radio": El,
10842
10842
  "vs-input-select": zl,
10843
10843
  "vs-input-inline-select": ol,
@@ -10865,7 +10865,7 @@ const gf = {
10865
10865
  "vs-input-key-value": Pm,
10866
10866
  "vs-input-text[]": Km,
10867
10867
  "vs-input-range": tp,
10868
- "vs-input-color": Zm,
10868
+ "vs-input-color": Xm,
10869
10869
  "vs-input-native-select": zl,
10870
10870
  VsInputArraySelect: rl,
10871
10871
  "vs-input-array": op,
@@ -10878,7 +10878,7 @@ const gf = {
10878
10878
  "vs-input-dataform": Gp,
10879
10879
  // 5kb
10880
10880
  "vs-input-monaco": Yp
10881
- }, Zp = /* @__PURE__ */ pe({
10881
+ }, Xp = /* @__PURE__ */ pe({
10882
10882
  __name: "behavior",
10883
10883
  props: {
10884
10884
  api: {},
@@ -10894,7 +10894,7 @@ const gf = {
10894
10894
  if (!t.api) return;
10895
10895
  const l = t.api.replace("{{value}}", t.value), r = await fetch(l);
10896
10896
  if (!r.ok) {
10897
- De({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
10897
+ Ae({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
10898
10898
  return;
10899
10899
  }
10900
10900
  const o = await r.json();
@@ -10925,10 +10925,10 @@ const gf = {
10925
10925
  }),
10926
10926
  emits: /* @__PURE__ */ ze(["value-selected"], ["update:modelValue"]),
10927
10927
  setup(e, { emit: t }) {
10928
- const n = e, a = Ue(e, "modelValue"), l = t, r = y(() => _o[`${n.layout}`]), o = ["label", "placeholder", "info", "description", "text", "html"], s = A(te()), c = y(() => N(n.item, s.value)), f = y(() => {
10928
+ const n = e, a = Ue(e, "modelValue"), l = t, r = y(() => _o[`${n.layout}`]), o = ["label", "placeholder", "info", "description", "text", "html"], s = D(te()), c = y(() => N(n.item, s.value)), f = y(() => {
10929
10929
  const j = { ...c.value ?? {} }, H = n.item?.name;
10930
10930
  return H && k?.value?.[H] && Object.assign(j, k.value[H]), j.__locale = s.value, j;
10931
- }), h = y(() => Xp?.[`vs-input-${n.item.type}`]), k = ot("field-props"), C = y(() => {
10931
+ }), h = y(() => Zp?.[`vs-input-${n.item.type}`]), k = ot("field-props"), C = y(() => {
10932
10932
  const j = R(h);
10933
10933
  if (!j) return /* @__PURE__ */ new Set();
10934
10934
  const H = j.props ?? j.__vccOpts?.props;
@@ -10939,50 +10939,50 @@ const gf = {
10939
10939
  const j = { ...c.value ?? {} }, H = n.item?.name;
10940
10940
  H && k?.value?.[H] && Object.assign(j, k.value[H]);
10941
10941
  const ee = C.value;
10942
- let Z;
10943
- return ee.size ? Z = Object.fromEntries(Object.entries(j).filter(([ve]) => ee.has(ve))) : Z = j, g.forEach((ve) => {
10942
+ let X;
10943
+ return ee.size ? X = Object.fromEntries(Object.entries(j).filter(([ve]) => ee.has(ve))) : X = j, g.forEach((ve) => {
10944
10944
  const ce = j[ve];
10945
- ce != null && (Z[ve] = ce);
10946
- }), Z;
10945
+ ce != null && (X[ve] = ce);
10946
+ }), X;
10947
10947
  }), v = (j) => {
10948
10948
  const H = typeof j == "object" && j !== null ? j : { value: j };
10949
10949
  l("value-selected", {
10950
10950
  ...H,
10951
10951
  name: H.name ?? n.item?.name
10952
10952
  });
10953
- }, _ = /{{\s*([^}]+?)\s*}}/g, b = ot("values"), M = A(!1), D = y(() => {
10953
+ }, _ = /{{\s*([^}]+?)\s*}}/g, b = ot("values"), M = D(!1), A = y(() => {
10954
10954
  const j = n.item?.api, H = n.item?.type?.toLowerCase();
10955
10955
  return typeof j == "string" && j.trim().length > 0 && (H === "text" || H === "mask");
10956
10956
  });
10957
10957
  function U(j, H) {
10958
10958
  if (!(j == null || !H))
10959
10959
  return H.split(".").reduce(
10960
- (ee, Z) => ee?.[Z.trim()],
10960
+ (ee, X) => ee?.[X.trim()],
10961
10961
  j
10962
10962
  );
10963
10963
  }
10964
- async function X() {
10964
+ async function Z() {
10965
10965
  const j = String(a.value ?? "").trim();
10966
10966
  if (!j) return;
10967
10967
  const H = (n.item?.api ?? "").trim();
10968
10968
  if (!H) return;
10969
- const ee = H.replace(_, (Z, ve) => ve.trim() === "value" ? encodeURIComponent(j) : "");
10969
+ const ee = H.replace(_, (X, ve) => ve.trim() === "value" ? encodeURIComponent(j) : "");
10970
10970
  M.value = !0;
10971
10971
  try {
10972
- let Z = await fetch(ee), ve = 0;
10973
- for (; Z.status === 202 && ve < lv; )
10972
+ let X = await fetch(ee), ve = 0;
10973
+ for (; X.status === 202 && ve < lv; )
10974
10974
  ve += 1, await new Promise((ae) => {
10975
10975
  setTimeout(ae, nv);
10976
- }), Z = await fetch(ee);
10977
- if (Z.status === 202) {
10978
- De({ type: "warning", title: "Validation", message: "Сервер ще обробляє запит. Спробуйте пізніше." });
10976
+ }), X = await fetch(ee);
10977
+ if (X.status === 202) {
10978
+ Ae({ type: "warning", title: "Validation", message: "Сервер ще обробляє запит. Спробуйте пізніше." });
10979
10979
  return;
10980
10980
  }
10981
- if (!Z.ok) {
10982
- De({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
10981
+ if (!X.ok) {
10982
+ Ae({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
10983
10983
  return;
10984
10984
  }
10985
- const ce = await Z.json(), Me = ce?.result !== void 0 ? ce.result : ce, Se = n.item?.set;
10985
+ const ce = await X.json(), Me = ce?.result !== void 0 ? ce.result : ce, Se = n.item?.set;
10986
10986
  if (!Se || !b?.value) return;
10987
10987
  const P = n.item?.name;
10988
10988
  Object.entries(Se).forEach(([ae, ye]) => {
@@ -10992,8 +10992,8 @@ const gf = {
10992
10992
  const ge = U(Me, Y);
10993
10993
  b.value[ae] = ge ?? null;
10994
10994
  });
10995
- } catch (Z) {
10996
- console.error("API lookup error:", Z), De({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
10995
+ } catch (X) {
10996
+ console.error("API lookup error:", X), Ae({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
10997
10997
  } finally {
10998
10998
  M.value = !1;
10999
10999
  }
@@ -11006,19 +11006,19 @@ const gf = {
11006
11006
  function N(j, H) {
11007
11007
  if (!j) return {};
11008
11008
  const ee = { ...j };
11009
- return o.forEach((Z) => {
11010
- const ve = z(j, Z, H);
11011
- ve != null && (ee[Z] = ve);
11012
- }), Array.isArray(j.options) && (ee.options = j.options.map((Z) => W(Z, H))), ee;
11009
+ return o.forEach((X) => {
11010
+ const ve = z(j, X, H);
11011
+ ve != null && (ee[X] = ve);
11012
+ }), Array.isArray(j.options) && (ee.options = j.options.map((X) => W(X, H))), ee;
11013
11013
  }
11014
11014
  function W(j, H) {
11015
11015
  if (!j) return j;
11016
- const ee = { ...j }, Z = z(j, "label", H), ve = z(j, "text", H);
11017
- return Z != null && (ee.label = Z), ve != null ? ee.text = ve : Z != null && (ee.text = Z), ee;
11016
+ const ee = { ...j }, X = z(j, "label", H), ve = z(j, "text", H);
11017
+ return X != null && (ee.label = X), ve != null ? ee.text = ve : X != null && (ee.text = X), ee;
11018
11018
  }
11019
11019
  function z(j, H, ee) {
11020
- const Z = `${H}:${ee}`;
11021
- if (j?.[Z] != null) return j[Z];
11020
+ const X = `${H}:${ee}`;
11021
+ if (j?.[X] != null) return j[X];
11022
11022
  if (H === "label" && j?.[ee] != null) return j[ee];
11023
11023
  if (j?.[H] != null) return j[H];
11024
11024
  if (H === "label") {
@@ -11050,7 +11050,7 @@ const gf = {
11050
11050
  }, [
11051
11051
  u("div", Jp, [
11052
11052
  u("div", {
11053
- class: oe(["flex items-center gap-2 w-full", { "flex-1": D.value }])
11053
+ class: oe(["flex items-center gap-2 w-full", { "flex-1": A.value }])
11054
11054
  }, [
11055
11055
  u("div", Qp, [
11056
11056
  (i(), ke(pt(h.value), Kt(w.value, {
@@ -11059,12 +11059,12 @@ const gf = {
11059
11059
  onValueSelected: v
11060
11060
  }), null, 16, ["modelValue"]))
11061
11061
  ]),
11062
- D.value ? (i(), p("button", {
11062
+ A.value ? (i(), p("button", {
11063
11063
  key: 0,
11064
11064
  type: "button",
11065
11065
  class: "flex items-center justify-center px-2 py-2 border rounded-md bg-white hover:bg-gray-50 text-gray-600 hover:text-blue-600 disabled:opacity-50 h-[38px] shrink-0",
11066
11066
  disabled: M.value || !a.value?.toString().trim(),
11067
- onClick: X
11067
+ onClick: Z
11068
11068
  }, [
11069
11069
  M.value ? (i(), ke(R(la), {
11070
11070
  key: 1,
@@ -11081,7 +11081,7 @@ const gf = {
11081
11081
  innerHTML: f.value.description
11082
11082
  }, null, 8, tv)) : q("", !0)
11083
11083
  ]),
11084
- f.value.behavior?.api && f.value.behavior?.button ? (i(), ke(Zp, Kt({ key: 0 }, f.value.behavior, { value: a.value }), null, 16, ["value"])) : q("", !0)
11084
+ f.value.behavior?.api && f.value.behavior?.button ? (i(), ke(Xp, Kt({ key: 0 }, f.value.behavior, { value: a.value }), null, 16, ["value"])) : q("", !0)
11085
11085
  ], 2)
11086
11086
  ]),
11087
11087
  _: 1
@@ -11097,7 +11097,7 @@ const gf = {
11097
11097
  width: { default: 400 }
11098
11098
  },
11099
11099
  setup(e, { expose: t }) {
11100
- const n = e, a = A([]), l = A(""), r = A(""), o = y(() => !!n.enabled), s = y(() => [
11100
+ const n = e, a = D([]), l = D(""), r = D(""), o = y(() => !!n.enabled), s = y(() => [
11101
11101
  "vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]",
11102
11102
  "sticky top-0 self-start shrink-0",
11103
11103
  "max-h-full min-h-0 overflow-y-auto"
@@ -11112,7 +11112,7 @@ const gf = {
11112
11112
  he(
11113
11113
  () => n.target,
11114
11114
  async (le) => {
11115
- if (X(), !le) {
11115
+ if (Z(), !le) {
11116
11116
  C = null, a.value = [], l.value = "";
11117
11117
  return;
11118
11118
  }
@@ -11132,7 +11132,7 @@ const gf = {
11132
11132
  ), at(() => {
11133
11133
  n.scrollContainer || _(null), b();
11134
11134
  }), Et(() => {
11135
- X(), _(null, !0), C = null, typeof window < "u" && (h && window.cancelAnimationFrame(h), k && window.cancelAnimationFrame(k));
11135
+ Z(), _(null, !0), C = null, typeof window < "u" && (h && window.cancelAnimationFrame(h), k && window.cancelAnimationFrame(k));
11136
11136
  });
11137
11137
  function _(le, j = !1) {
11138
11138
  if (g && (g(), g = null), j) {
@@ -11156,11 +11156,11 @@ const gf = {
11156
11156
  function M() {
11157
11157
  if (!o.value || !C) return;
11158
11158
  const le = Array.from(C.querySelectorAll("h1, h2")), j = /* @__PURE__ */ new Set(), H = [];
11159
- le.forEach((ee, Z) => {
11159
+ le.forEach((ee, X) => {
11160
11160
  const ve = ee.textContent?.trim() ?? "";
11161
11161
  if (!ve) return;
11162
11162
  let ce = (ee.getAttribute("id") ?? "").trim();
11163
- ce || (ce = D(ve) || `heading-${Z + 1}`);
11163
+ ce || (ce = A(ve) || `heading-${X + 1}`);
11164
11164
  let Me = ce, Se = 1;
11165
11165
  for (; j.has(Me); )
11166
11166
  Me = `${ce}-${Se += 1}`;
@@ -11171,13 +11171,13 @@ const gf = {
11171
11171
  });
11172
11172
  }), a.value = H, H.length || (l.value = ""), W();
11173
11173
  }
11174
- function D(le) {
11174
+ function A(le) {
11175
11175
  return le.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
11176
11176
  }
11177
11177
  function U(le) {
11178
- !le || !o.value || typeof MutationObserver > "u" || (X(), f = new MutationObserver(() => b()), f.observe(le, { childList: !0, subtree: !0 }));
11178
+ !le || !o.value || typeof MutationObserver > "u" || (Z(), f = new MutationObserver(() => b()), f.observe(le, { childList: !0, subtree: !0 }));
11179
11179
  }
11180
- function X() {
11180
+ function Z() {
11181
11181
  f && (f.disconnect(), f = null);
11182
11182
  }
11183
11183
  function N(le) {
@@ -11190,17 +11190,17 @@ const gf = {
11190
11190
  function W() {
11191
11191
  if (!o.value || !a.value.length) return;
11192
11192
  const le = S, j = (le ? le.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), H = (le ? le.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), ee = j + H;
11193
- let Z = null;
11193
+ let X = null;
11194
11194
  for (let ce = 0; ce < a.value.length; ce += 1) {
11195
11195
  const Me = a.value[ce], Se = document.getElementById(Me.id);
11196
11196
  if (Se) {
11197
11197
  const P = N(Se);
11198
- P + Se.offsetHeight > j && P < ee && (Z = Me.id);
11198
+ P + Se.offsetHeight > j && P < ee && (X = Me.id);
11199
11199
  }
11200
11200
  }
11201
- !Z && r.value && (Z = r.value), Z && (r.value = Z);
11201
+ !X && r.value && (X = r.value), X && (r.value = X);
11202
11202
  const ve = le ? le.scrollHeight - le.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
11203
- j + 5 >= ve && (Z = a.value[a.value.length - 1].id), Z && (l.value = Z);
11203
+ j + 5 >= ve && (X = a.value[a.value.length - 1].id), X && (l.value = X);
11204
11204
  }
11205
11205
  function z() {
11206
11206
  o.value && (k && window.cancelAnimationFrame(k), k = window.requestAnimationFrame(() => {
@@ -11244,7 +11244,7 @@ const gf = {
11244
11244
  ])
11245
11245
  ], 6)) : q("", !0);
11246
11246
  }
11247
- }), iv = /* @__PURE__ */ He(sv, [["__scopeId", "data-v-b3e16a91"]]), Dt = {
11247
+ }), iv = /* @__PURE__ */ He(sv, [["__scopeId", "data-v-b3e16a91"]]), At = {
11248
11248
  required: "Це поле є обов’язковим",
11249
11249
  email: "Неправильний email",
11250
11250
  tel: "Неправильний телефон",
@@ -11252,23 +11252,23 @@ const gf = {
11252
11252
  maxlength: (e) => `Максимальна довжина — ${e} символів`,
11253
11253
  min: (e) => `Значення має бути не менше ${e}`,
11254
11254
  max: (e) => `Значення має бути не більше ${e}`
11255
- }, uv = (e) => typeof e == "string" ? e.trim() ? !1 : Dt.required : Array.isArray(e) ? e.map((n) => typeof n == "string" ? n.trim() : n).filter((n) => n != null && n !== "").length ? !1 : Dt.required : typeof e == "number" ? Number?.isNaN(e) ? Dt?.required : !1 : e ? !1 : Dt.required, dv = (e) => {
11256
- const t = /^[\p{L}\p{N}!#$%&'*+/=?^_`{|}~.-]+@(?:[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?\.)+[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?$/u;
11257
- return e ? t.test(e) ? !1 : Dt.email : !1;
11255
+ }, uv = (e) => typeof e == "string" ? e.trim() ? !1 : At.required : Array.isArray(e) ? e.map((n) => typeof n == "string" ? n.trim() : n).filter((n) => n != null && n !== "").length ? !1 : At.required : typeof e == "number" ? Number?.isNaN(e) ? At?.required : !1 : e ? !1 : At.required, dv = (e) => {
11256
+ const t = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
11257
+ return e ? t.test(e) ? !1 : At.email : !1;
11258
11258
  }, cv = (e, t) => {
11259
11259
  if (!e) return !1;
11260
11260
  const n = String(e).trim();
11261
- if (!/^\+[1-9]\d{1,14}$/.test(n)) return Dt.tel;
11261
+ if (!/^\+[1-9]\d{1,14}$/.test(n)) return At.tel;
11262
11262
  const r = (typeof t?.digits == "number" && Number.isFinite(t.digits) && t.digits > 0 ? t.digits : Wt(jt)) || Wt(jt);
11263
- return n.length - 1 !== r ? Dt.tel : !1;
11263
+ return n.length - 1 !== r ? At.tel : !1;
11264
11264
  }, ha = (e) => e == null ? 0 : typeof e == "string" ? e.trim().length : Array.isArray(e) ? e.length : typeof e == "number" ? e.toString().length : String(e).length, fv = (e, t) => {
11265
11265
  if (e == null) return !1;
11266
11266
  const n = Number(t?.value ?? t?.length);
11267
- return Number.isFinite(n) && ha(e) < n ? t?.message || Dt.minlength(n) : !1;
11267
+ return Number.isFinite(n) && ha(e) < n ? t?.message || At.minlength(n) : !1;
11268
11268
  }, mv = (e, t) => {
11269
11269
  if (e == null || e === "") return !1;
11270
11270
  const n = Number(t?.value ?? t?.length);
11271
- return Number.isFinite(n) && ha(e) > n ? t?.message || Dt.maxlength(n) : !1;
11271
+ return Number.isFinite(n) && ha(e) > n ? t?.message || At.maxlength(n) : !1;
11272
11272
  }, ba = (e) => {
11273
11273
  if (typeof e == "number") return e;
11274
11274
  if (typeof e == "string") {
@@ -11281,13 +11281,13 @@ const gf = {
11281
11281
  const n = Number(t?.value);
11282
11282
  if (!Number.isFinite(n)) return !1;
11283
11283
  const a = ba(e);
11284
- return Number.isFinite(a) && a < n ? t?.message || Dt.min(n) : !1;
11284
+ return Number.isFinite(a) && a < n ? t?.message || At.min(n) : !1;
11285
11285
  }, vv = (e, t) => {
11286
11286
  if (e == null || e === "") return !1;
11287
11287
  const n = Number(t?.value);
11288
11288
  if (!Number.isFinite(n)) return !1;
11289
11289
  const a = ba(e);
11290
- return Number.isFinite(a) && a > n ? t?.message || Dt.max(n) : !1;
11290
+ return Number.isFinite(a) && a > n ? t?.message || At.max(n) : !1;
11291
11291
  }, gv = (e, t) => {
11292
11292
  const n = t.pattern ?? t.regexp, a = typeof n == "string" ? new RegExp(n) : n;
11293
11293
  if (Array.isArray(e)) {
@@ -11368,7 +11368,7 @@ function xv(e, t, n = !1) {
11368
11368
  const a = y(() => dl(
11369
11369
  (Array.isArray(t), t),
11370
11370
  typeof n == "boolean" ? n : n.value
11371
- )), l = A({});
11371
+ )), l = D({});
11372
11372
  function r(f) {
11373
11373
  return fa(e?.value, f?.conditions);
11374
11374
  }
@@ -11382,8 +11382,8 @@ function xv(e, t, n = !1) {
11382
11382
  return;
11383
11383
  }
11384
11384
  let b = !1, M = null;
11385
- _.forEach((D) => {
11386
- const U = hv(e.value[k.name], D);
11385
+ _.forEach((A) => {
11386
+ const U = hv(e.value[k.name], A);
11387
11387
  U && (b = !0, !M && typeof U == "string" && (M = U));
11388
11388
  }), b && M ? l.value[k.name] = M : delete l.value[k.name];
11389
11389
  }
@@ -11427,31 +11427,31 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11427
11427
  setup(e, { expose: t, emit: n }) {
11428
11428
  const a = n, l = e, r = Ue(e, "form"), o = Ue(e, "modelValue"), s = Ue(e, "values"), c = y({
11429
11429
  get: () => s.value ?? o.value,
11430
- set: (Z) => {
11431
- o.value = Z, s.value = Z;
11430
+ set: (X) => {
11431
+ o.value = X, s.value = X;
11432
11432
  }
11433
11433
  }), {
11434
11434
  errors: f,
11435
11435
  validate: h,
11436
11436
  reset: k,
11437
11437
  visibleSchema: C
11438
- } = xv(c, l.schema, Ba(l, "disabled")), S = A(null), g = A(null), w = A({}), v = y(() => l.navigation), _ = y(() => l.navWidth), b = y(() => l.style?.columns), M = Object.freeze({ container: 12, label: 3 }), D = y(() => l.columns ?? b.value ?? M), U = y(() => l.columns != null || b.value != null), X = y(() => U.value ? "horizontal" : l.layout), N = (Z) => Z?.columns ? "horizontal" : X.value, W = (Z) => Z?.columns ?? D.value, z = y(() => {
11439
- const Z = {}, ve = (ce) => {
11438
+ } = xv(c, l.schema, Ba(l, "disabled")), S = D(null), g = D(null), w = D({}), v = y(() => l.navigation), _ = y(() => l.navWidth), b = y(() => l.style?.columns), M = Object.freeze({ container: 12, label: 3 }), A = y(() => l.columns ?? b.value ?? M), U = y(() => l.columns != null || b.value != null), Z = y(() => U.value ? "horizontal" : l.layout), N = (X) => X?.columns ? "horizontal" : Z.value, W = (X) => X?.columns ?? A.value, z = y(() => {
11439
+ const X = {}, ve = (ce) => {
11440
11440
  if (!ce) return;
11441
11441
  (Array.isArray(ce) ? ce.map((Se, P) => ({ key: String(P), entry: Se })) : typeof ce == "object" ? Object.entries(ce).map(([Se, P]) => ({ key: Se, entry: P })) : []).forEach(({ key: Se, entry: P }) => {
11442
11442
  if (!P || typeof P != "object") return;
11443
11443
  const ae = P.name ? String(P.name) : Se;
11444
- ae && (Z[ae] = {
11444
+ ae && (X[ae] = {
11445
11445
  ...P,
11446
11446
  name: ae
11447
11447
  }), Array.isArray(P.schema) && ve(P.schema);
11448
11448
  });
11449
11449
  };
11450
- return ve(l.schema), Z;
11450
+ return ve(l.schema), X;
11451
11451
  }), te = () => {
11452
11452
  !l.formId && c.value && delete c.value.id, a("update:modelValue", c.value), h(), a("handle-submit", c.value);
11453
- }, le = (Z) => {
11454
- a("value-selected", Z);
11453
+ }, le = (X) => {
11454
+ a("value-selected", X);
11455
11455
  };
11456
11456
  t({
11457
11457
  validate: h,
@@ -11466,17 +11466,17 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11466
11466
  formId: l.formId
11467
11467
  };
11468
11468
  });
11469
- function j(Z, ve) {
11470
- if (Z === ve) return !0;
11471
- if (typeof Z != "object" || typeof ve != "object" || !Z || !ve) return !1;
11472
- const ce = Object.keys(Z), Me = Object.keys(ve);
11473
- return ce.length !== Me.length ? !1 : ce.every((Se) => Z[Se] === ve[Se]);
11469
+ function j(X, ve) {
11470
+ if (X === ve) return !0;
11471
+ if (typeof X != "object" || typeof ve != "object" || !X || !ve) return !1;
11472
+ const ce = Object.keys(X), Me = Object.keys(ve);
11473
+ return ce.length !== Me.length ? !1 : ce.every((Se) => X[Se] === ve[Se]);
11474
11474
  }
11475
- function H(Z) {
11476
- return Array.isArray(Z) ? [...Z] : Z && typeof Z == "object" ? { ...Z } : Z;
11475
+ function H(X) {
11476
+ return Array.isArray(X) ? [...X] : X && typeof X == "object" ? { ...X } : X;
11477
11477
  }
11478
- function ee(Z) {
11479
- Array.isArray(Z) && Z.forEach((ve) => {
11478
+ function ee(X) {
11479
+ Array.isArray(X) && X.forEach((ve) => {
11480
11480
  if (!ve) return;
11481
11481
  const ce = ve.name, Me = ve.default !== void 0;
11482
11482
  ce && Me && c.value[ce] === void 0 && (c.value[ce] = H(ve.default)), Array.isArray(ve.schema) && ee(ve.schema);
@@ -11484,11 +11484,11 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11484
11484
  }
11485
11485
  return he(
11486
11486
  C,
11487
- (Z) => {
11488
- ee(Z);
11487
+ (X) => {
11488
+ ee(X);
11489
11489
  },
11490
11490
  { immediate: !0, deep: !0 }
11491
- ), Mn("form", r), Mn("values", c), Mn("field-props", w), Mn("schema-by-name", z), (Z, ve) => (i(), p("div", wv, [
11491
+ ), Mn("form", r), Mn("values", c), Mn("field-props", w), Mn("schema-by-name", z), (X, ve) => (i(), p("div", wv, [
11492
11492
  u("div", {
11493
11493
  class: "flex-1 min-h-0 overflow-y-auto overflow-x-visible",
11494
11494
  ref_key: "formScrollContainer",
@@ -11498,7 +11498,7 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11498
11498
  ref_key: "formRef",
11499
11499
  ref: S,
11500
11500
  onSubmit: Te(te, ["prevent"]),
11501
- class: oe(["grid grid-cols-12 p-1", X.value === "default" ? "gap-6" : "gap-4"])
11501
+ class: oe(["grid grid-cols-12 p-1", Z.value === "default" ? "gap-6" : "gap-4"])
11502
11502
  }, [
11503
11503
  (i(!0), p(Fe, null, Ne(R(C), (ce, Me) => (i(), p("div", {
11504
11504
  key: ce.name,
@@ -11543,11 +11543,11 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11543
11543
  },
11544
11544
  emits: ["close", "save", "edit"],
11545
11545
  setup(e, { emit: t }) {
11546
- const n = e, a = t, l = A(n.schema), r = A(n.defaultValue ? JSON.parse(JSON.stringify(n.defaultValue)) : {}), o = A({}), s = A(n.token || ""), c = A(n.token || ""), f = A(n.mode), h = () => {
11546
+ const n = e, a = t, l = D(n.schema), r = D(n.defaultValue ? JSON.parse(JSON.stringify(n.defaultValue)) : {}), o = D({}), s = D(n.token || ""), c = D(n.token || ""), f = D(n.mode), h = () => {
11547
11547
  const v = n.method?.trim().toUpperCase();
11548
11548
  return v === "GET" || v === "POST" || v === "PUT" ? v : f.value === "add" ? "POST" : "PUT";
11549
11549
  }, k = () => {
11550
- De({
11550
+ Ae({
11551
11551
  type: "success",
11552
11552
  title: "Успішно",
11553
11553
  message: `Дані успішно ${f.value === "add" ? "збережено" : "оновлено"}`
@@ -11565,7 +11565,7 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11565
11565
  }
11566
11566
  const _ = await v.json().catch(() => ({})), b = _.message || _.error;
11567
11567
  if (v.status === 400) {
11568
- De({
11568
+ Ae({
11569
11569
  type: "warning",
11570
11570
  title: "Помилка валідації",
11571
11571
  message: b || "Некоректні дані (400)"
@@ -11573,14 +11573,14 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11573
11573
  return;
11574
11574
  }
11575
11575
  if (v.status === 500) {
11576
- De({
11576
+ Ae({
11577
11577
  type: "error",
11578
11578
  title: "Серверна помилка",
11579
11579
  message: b || "Виникла помилка на сервері (500)"
11580
11580
  });
11581
11581
  return;
11582
11582
  }
11583
- De({
11583
+ Ae({
11584
11584
  type: "error",
11585
11585
  title: "Помилка",
11586
11586
  message: `Статус: ${v.status}`
@@ -11589,7 +11589,7 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11589
11589
  async function g() {
11590
11590
  const v = o.value.validate();
11591
11591
  if (v) {
11592
- De({
11592
+ Ae({
11593
11593
  type: "warning",
11594
11594
  title: "Помилка валідації",
11595
11595
  message: Object.entries(v).map(([b, M]) => `${b}: ${M}`).join(`
@@ -11611,7 +11611,7 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11611
11611
  });
11612
11612
  await S(M);
11613
11613
  } catch (M) {
11614
- De({
11614
+ Ae({
11615
11615
  type: "error",
11616
11616
  title: "Помилка з’єднання",
11617
11617
  message: M.message || "Не вдалося виконати запит"
@@ -11630,7 +11630,7 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11630
11630
  });
11631
11631
  await S(b);
11632
11632
  } catch (b) {
11633
- De({
11633
+ Ae({
11634
11634
  type: "error",
11635
11635
  title: "Помилка з’єднання",
11636
11636
  message: b.message || "Не вдалося виконати запит"
@@ -11647,7 +11647,7 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11647
11647
  if (n.form && !n.schema) {
11648
11648
  const v = await fetch(`/api/template/form/${n.form}`);
11649
11649
  if (!v.ok) {
11650
- De({
11650
+ Ae({
11651
11651
  type: v.status >= 400 && v.status < 500 ? "warning" : "error",
11652
11652
  title: "Error",
11653
11653
  message: `Error code: ${v.status}`
@@ -11660,7 +11660,7 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11660
11660
  s.value = n.token;
11661
11661
  const v = await fetch(`/api/form/${s.value}`);
11662
11662
  if (!v.ok) {
11663
- De({
11663
+ Ae({
11664
11664
  type: v.status >= 400 && v.status < 500 ? "warning" : "error",
11665
11665
  title: "Error",
11666
11666
  message: `Error code: ${v.status}`
@@ -11674,7 +11674,7 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11674
11674
  });
11675
11675
  }
11676
11676
  } catch (v) {
11677
- De({
11677
+ Ae({
11678
11678
  type: "error",
11679
11679
  title: "Error",
11680
11680
  message: v.message || "Unexpected error"
@@ -11721,15 +11721,15 @@ const wv = { class: "flex w-full h-full min-h-0 gap-6" }, kv = {
11721
11721
  ])
11722
11722
  ]));
11723
11723
  }
11724
- }), Dv = hl.form.richtext, Av = bl.form.richtext, Ev = {
11724
+ }), Av = hl.form.richtext, Dv = bl.form.richtext, Ev = {
11725
11725
  en: {
11726
11726
  form: {
11727
- richtext: Dv
11727
+ richtext: Av
11728
11728
  }
11729
11729
  },
11730
11730
  uk: {
11731
11731
  form: {
11732
- richtext: Av
11732
+ richtext: Dv
11733
11733
  }
11734
11734
  }
11735
11735
  }, Kl = (e = { mode: "edit", schema: null }) => new Promise((t) => {
@@ -11761,9 +11761,9 @@ export {
11761
11761
  yn as B,
11762
11762
  Km as C,
11763
11763
  Ju as D,
11764
- Xp as E,
11765
- Dv as F,
11766
- Av as G,
11764
+ Zp as E,
11765
+ Av as F,
11766
+ Dv as G,
11767
11767
  Fd as H,
11768
11768
  lm as I,
11769
11769
  rl as V,
@@ -11775,7 +11775,7 @@ export {
11775
11775
  op as e,
11776
11776
  Sr as f,
11777
11777
  Cm as g,
11778
- Zm as h,
11778
+ Xm as h,
11779
11779
  uu as i,
11780
11780
  Ts as j,
11781
11781
  ra as k,
@@ -11784,7 +11784,7 @@ export {
11784
11784
  ol as n,
11785
11785
  Pm as o,
11786
11786
  xl as p,
11787
- Ao as q,
11787
+ Do as q,
11788
11788
  Ev as r,
11789
11789
  El as s,
11790
11790
  tp as t,