@opengis/form 0.0.142 → 0.0.143

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,5 +1,5 @@
1
- import { defineComponent as ce, ref as L, openBlock as i, createElementBlock as f, Fragment as $e, createElementVNode as c, renderSlot as Qe, createVNode as Y, unref as R, createBlock as ye, Teleport as el, normalizeStyle as Ve, toDisplayString as oe, createCommentVNode as U, computed as h, mergeProps as Bt, createTextVNode as Ue, normalizeProps as Yl, guardReactiveProps as Zl, onMounted as Xe, onUnmounted as ul, normalizeClass as Q, useModel as Ee, withDirectives as Se, vModelText as Ke, mergeModels as Ae, useAttrs as Rn, vModelCheckbox as Pn, resolveDynamicComponent as rt, withCtx as tt, withModifiers as Te, onBeforeUnmount as Rt, watch as pe, vModelRadio as Nn, inject as nt, renderList as De, reactive as Jl, vModelDynamic as Sa, vShow as Ft, resolveComponent as gt, Transition as Xl, isRef as bn, nextTick as Je, defineAsyncComponent as Va, createStaticVNode as Ql, useSlots as Ma, getCurrentInstance as jn, watchEffect as ol, withKeys as La, toRef as Da, provide as Ul } from "vue";
2
- import { Info as Ht, Check as Aa, Mail as Ia, Phone as Fa, Table as Ta, FileCode as Ea, FileText as Dl, FileArchive as Ba, Trash2 as Wt, Download as en, Plus as wt, Upload as Un, Search as tn, ChevronDown as dl, X as kt, GripVertical as Xt, Pencil as Oa, Circle as Ra, MapPin as zn, Ruler as Hn, Maximize as Pa, ZoomIn as Na, LoaderCircle as ja, Copy as Ua, ChevronRight as za, ChevronLeft as Ha } from "lucide-vue-next";
1
+ import { defineComponent as ce, ref as L, openBlock as i, createElementBlock as f, Fragment as $e, createElementVNode as c, renderSlot as Qe, createVNode as Y, unref as P, createBlock as ye, Teleport as el, normalizeStyle as Ve, toDisplayString as oe, createCommentVNode as U, computed as h, mergeProps as Ot, createTextVNode as Ue, normalizeProps as Yl, guardReactiveProps as Zl, onMounted as Xe, onUnmounted as ul, normalizeClass as Q, useModel as Ee, withDirectives as Se, vModelText as Ke, mergeModels as Ae, useAttrs as Pn, vModelCheckbox as Rn, resolveDynamicComponent as rt, withCtx as tt, withModifiers as Te, onBeforeUnmount as Rt, watch as pe, vModelRadio as Nn, inject as nt, renderList as De, reactive as Jl, vModelDynamic as Sa, vShow as Ft, resolveComponent as gt, Transition as Xl, isRef as bn, nextTick as Je, defineAsyncComponent as Va, createStaticVNode as Ql, useSlots as Ma, getCurrentInstance as jn, watchEffect as ol, withKeys as La, toRef as Da, provide as Ul } from "vue";
2
+ import { Info as Ht, Check as Aa, Mail as Ia, Phone as Fa, Table as Ta, FileCode as Ea, FileText as Dl, FileArchive as Ba, Trash2 as Wt, Download as en, Plus as wt, Upload as Un, Search as tn, ChevronDown as dl, X as kt, GripVertical as Xt, Pencil as Oa, Circle as Pa, MapPin as zn, Ruler as Hn, Maximize as Ra, ZoomIn as Na, LoaderCircle as ja, Copy as Ua, ChevronRight as za, ChevronLeft as Ha } from "lucide-vue-next";
3
3
  import { notify as Ce, VsModal as ln, modal as qa } from "@opengis/core";
4
4
  const qn = /* @__PURE__ */ ce({
5
5
  __name: "vs-info-tooltip",
@@ -26,7 +26,7 @@ const qn = /* @__PURE__ */ ce({
26
26
  onMouseleave: r
27
27
  }, [
28
28
  Qe(s.$slots, "default", {}, () => [
29
- Y(R(Ht), { class: "h-4 w-4 text-gray-400 cursor-help" })
29
+ Y(P(Ht), { class: "h-4 w-4 text-gray-400 cursor-help" })
30
30
  ])
31
31
  ], 32),
32
32
  (i(), ye(el, { to: "body" }, [
@@ -72,7 +72,7 @@ const qn = /* @__PURE__ */ ce({
72
72
  text: r.value
73
73
  }, null, 8, ["text"])) : U("", !0)
74
74
  ])) : U("", !0),
75
- Qe(s.$slots, "default", Bt(s.$attrs, {
75
+ Qe(s.$slots, "default", Ot(s.$attrs, {
76
76
  class: { "opacity-60": e.item.disabled }
77
77
  })),
78
78
  e.error ? (i(), f("span", Za, oe(e.error), 1)) : U("", !0)
@@ -263,7 +263,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
263
263
  "onUpdate:modelValue": o[0] || (o[0] = (d) => n.value = d),
264
264
  placeholder: r.value,
265
265
  disabled: a.value,
266
- class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [R(l), { "!border-red-600": e.error }]]),
266
+ class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [P(l), { "!border-red-600": e.error }]]),
267
267
  style: {
268
268
  border: "1px solid #CFD9E0"
269
269
  }
@@ -301,7 +301,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
301
301
  maxlength: s.value,
302
302
  minlength: o.value,
303
303
  onBlur: d,
304
- class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [e.customClass, R(l), { "!border-red-600": e.error }]]),
304
+ class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [e.customClass, P(l), { "!border-red-600": e.error }]]),
305
305
  style: { border: "1px solid #CFD9E0" }
306
306
  }, null, 42, go)), [
307
307
  [Ke, n.value]
@@ -340,7 +340,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
340
340
  }),
341
341
  emits: ["update:modelValue"],
342
342
  setup(e) {
343
- const t = e, { inputClass: l } = lt(t.style), n = Rn(), a = Ee(e, "modelValue"), r = h(() => !!t.disabled), s = (v) => {
343
+ const t = e, { inputClass: l } = lt(t.style), n = Pn(), a = Ee(e, "modelValue"), r = h(() => !!t.disabled), s = (v) => {
344
344
  if (v == null || v === "") return;
345
345
  const $ = typeof v == "string" ? v.trim().replace(",", ".") : v, _ = Number($);
346
346
  return Number.isFinite(_) ? _ : void 0;
@@ -355,7 +355,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
355
355
  "onUpdate:modelValue": $[0] || ($[0] = (_) => a.value = _),
356
356
  placeholder: e.placeholder,
357
357
  disabled: r.value,
358
- class: Q(["py-1.5 px-3 block w-full bg-white", [R(l)]]),
358
+ class: Q(["py-1.5 px-3 block w-full bg-white", [P(l)]]),
359
359
  style: {
360
360
  border: "1px solid #CFD9E0"
361
361
  },
@@ -417,7 +417,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
417
417
  id: e.id,
418
418
  disabled: r.value
419
419
  }, null, 10, xo), [
420
- [Pn, a.value]
420
+ [Rn, a.value]
421
421
  ]),
422
422
  c("label", {
423
423
  for: e.id,
@@ -426,7 +426,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
426
426
  c("div", {
427
427
  class: Q(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [a.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", e.error ? "border-red-600" : ""]])
428
428
  }, [
429
- Y(R(Aa), { class: "h-4 w-4" })
429
+ Y(P(Aa), { class: "h-4 w-4" })
430
430
  ], 2),
431
431
  e.html ? (i(), f("div", {
432
432
  key: 0,
@@ -518,7 +518,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
518
518
  "onUpdate:modelValue": x[0] || (x[0] = (V) => a.value = V),
519
519
  disabled: e.disabled
520
520
  }, null, 8, So), [
521
- [Pn, a.value]
521
+ [Rn, a.value]
522
522
  ]),
523
523
  e.html ? (i(), f("span", {
524
524
  key: 0,
@@ -582,7 +582,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
582
582
  }
583
583
  }), s = L(`vs-checkbox-${l.view || "default"}`);
584
584
  return (o, d) => (i(), f("div", Io, [
585
- (i(), ye(rt(s.value === "vs-checkbox-buttons" ? R(Ao) : R(_o)), {
585
+ (i(), ye(rt(s.value === "vs-checkbox-buttons" ? P(Ao) : P(_o)), {
586
586
  value: e.value,
587
587
  label: e.label,
588
588
  html: e.labelHtml,
@@ -648,7 +648,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
648
648
  onClick: a[1] || (a[1] = Te(() => {
649
649
  }, ["prevent"]))
650
650
  }, [
651
- Y(R(Ht), { class: "h-4 w-4 text-gray-500" })
651
+ Y(P(Ht), { class: "h-4 w-4 text-gray-500" })
652
652
  ], 8, Eo)) : U("", !0)
653
653
  ])) : (i(), f("button", {
654
654
  key: 1,
@@ -685,7 +685,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
685
685
  innerHTML: e.html ? e.html : e.text
686
686
  }, null, 10, Oo));
687
687
  }
688
- }), Ro = ["placeholder", "disabled", "name"], an = /* @__PURE__ */ ce({
688
+ }), Po = ["placeholder", "disabled", "name"], an = /* @__PURE__ */ ce({
689
689
  __name: "vs-input-mask",
690
690
  props: /* @__PURE__ */ Ae({
691
691
  name: {},
@@ -752,13 +752,13 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
752
752
  placeholder: e.placeholder,
753
753
  disabled: e.disabled,
754
754
  name: e.name,
755
- class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [R(l)]]),
755
+ class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [P(l)]]),
756
756
  style: {
757
757
  border: "1px solid #CFD9E0"
758
758
  }
759
- }, null, 10, Ro));
759
+ }, null, 10, Po));
760
760
  }
761
- }), Po = { class: "relative w-full bg-white rounded-lg" }, No = { class: "absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer" }, jo = ["placeholder", "disabled"], Kn = /* @__PURE__ */ ce({
761
+ }), Ro = { class: "relative w-full bg-white rounded-lg" }, No = { class: "absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer" }, jo = ["placeholder", "disabled"], Kn = /* @__PURE__ */ ce({
762
762
  __name: "vs-input-email",
763
763
  props: /* @__PURE__ */ Ae({
764
764
  style: { default: () => ({}) },
@@ -777,16 +777,16 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
777
777
  emits: ["update:modelValue"],
778
778
  setup(e) {
779
779
  const t = e, { inputClass: l } = lt(t.style), n = Ee(e, "modelValue");
780
- return (a, r) => (i(), f("div", Po, [
780
+ return (a, r) => (i(), f("div", Ro, [
781
781
  c("div", No, [
782
- Y(R(Ia), { class: "h-4 w-4 stroke-gray-500 transition-all" })
782
+ Y(P(Ia), { class: "h-4 w-4 stroke-gray-500 transition-all" })
783
783
  ]),
784
784
  Se(c("input", {
785
785
  type: "email",
786
786
  "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
787
787
  placeholder: e.placeholder,
788
788
  disabled: e.disabled,
789
- class: Q(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [R(l), { "!border-red-600": e.error }]]),
789
+ class: Q(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [P(l), { "!border-red-600": e.error }]]),
790
790
  style: {
791
791
  border: "1px solid #CFD9E0"
792
792
  }
@@ -824,7 +824,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
824
824
  o && !o.startsWith("+") ? n.value = `+${o.replace(/^\+/, "")}` : o || (n.value = "");
825
825
  }, { immediate: !0 }), (o, d) => (i(), f("div", Uo, [
826
826
  c("div", zo, [
827
- Y(R(Fa), { class: "h-4 w-4 stroke-gray-500 transition-all" })
827
+ Y(P(Fa), { class: "h-4 w-4 stroke-gray-500 transition-all" })
828
828
  ]),
829
829
  d[0] || (d[0] = c("div", { class: "absolute bottom-2/4 translate-y-2/4 left-[30px] text-gray-500 select-none pointer-events-none" }, " + ", -1)),
830
830
  c("input", {
@@ -836,7 +836,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
836
836
  maxlength: "15",
837
837
  placeholder: e.placeholder,
838
838
  disabled: e.disabled,
839
- class: Q(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [R(l), { "!border-red-600": e.error }]]),
839
+ class: Q(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [P(l), { "!border-red-600": e.error }]]),
840
840
  style: {
841
841
  border: "1px solid #CFD9E0"
842
842
  }
@@ -1139,12 +1139,12 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1139
1139
  }), (C, y) => (i(), f("div", {
1140
1140
  class: Q(d.value)
1141
1141
  }, [
1142
- (i(!0), f($e, null, De(R($), (g) => (i(), f("div", {
1142
+ (i(!0), f($e, null, De(P($), (g) => (i(), f("div", {
1143
1143
  key: g?.id,
1144
1144
  class: Q(["flex items-stretch", e.position === "horizontal" ? t.customClass : ""]),
1145
1145
  style: Ve(p.value)
1146
1146
  }, [
1147
- (i(), ye(rt(n.value), Bt({
1147
+ (i(), ye(rt(n.value), Ot({
1148
1148
  text: o(g),
1149
1149
  html: r.value ? s(g) : "",
1150
1150
  option: g,
@@ -1206,34 +1206,34 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1206
1206
  return [];
1207
1207
  const b = /* @__PURE__ */ new Map();
1208
1208
  d.value.forEach((I) => {
1209
- const q = I[l.group], H = x(q);
1210
- b.has(H) || b.set(H, []), b.get(H)?.push(I);
1209
+ const W = I[l.group], q = x(W);
1210
+ b.has(q) || b.set(q, []), b.get(q)?.push(I);
1211
1211
  });
1212
1212
  const M = [];
1213
1213
  l.values?.length && l.values.forEach((I) => {
1214
- const q = x(I);
1215
- M.push(q);
1214
+ const W = x(I);
1215
+ M.push(W);
1216
1216
  });
1217
- const w = /* @__PURE__ */ new Set(), T = (I) => {
1218
- const q = b.get(I) || [];
1219
- if (!q.length)
1217
+ const k = /* @__PURE__ */ new Set(), T = (I) => {
1218
+ const W = b.get(I) || [];
1219
+ if (!W.length)
1220
1220
  return null;
1221
- const H = I === null ? "group-null" : `group-${String(I)}`, X = I === null ? dr : String(I);
1222
- return w.add(I), {
1223
- key: H,
1221
+ const q = I === null ? "group-null" : `group-${String(I)}`, X = I === null ? dr : String(I);
1222
+ return k.add(I), {
1223
+ key: q,
1224
1224
  label: X,
1225
- options: q
1225
+ options: W
1226
1226
  };
1227
- }, P = [];
1227
+ }, R = [];
1228
1228
  return M.forEach((I) => {
1229
- const q = T(I);
1230
- q && P.push(q);
1231
- }), b.forEach((I, q) => {
1232
- if (w.has(q))
1229
+ const W = T(I);
1230
+ W && R.push(W);
1231
+ }), b.forEach((I, W) => {
1232
+ if (k.has(W))
1233
1233
  return;
1234
- const H = T(q);
1235
- H && P.push(H);
1236
- }), P;
1234
+ const q = T(W);
1235
+ q && R.push(q);
1236
+ }), R;
1237
1237
  });
1238
1238
  return pe(
1239
1239
  () => l.modelValue,
@@ -1243,9 +1243,9 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1243
1243
  a[M] = b;
1244
1244
  } else if (Array.isArray(b)) {
1245
1245
  const M = new Set(b);
1246
- d.value.forEach((w) => {
1247
- if (!w.disabled) {
1248
- const T = p(w);
1246
+ d.value.forEach((k) => {
1247
+ if (!k.disabled) {
1248
+ const T = p(k);
1249
1249
  a[T] = M.has(T);
1250
1250
  }
1251
1251
  });
@@ -1271,29 +1271,29 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1271
1271
  const b = new Set(l.modelValue);
1272
1272
  d.value.forEach((M) => {
1273
1273
  if (!M.disabled) {
1274
- const w = p(M);
1275
- a[w] = b.has(w);
1274
+ const k = p(M);
1275
+ a[k] = b.has(k);
1276
1276
  }
1277
1277
  });
1278
1278
  }
1279
1279
  }), (b, M) => l.group ? (i(), f("div", ir, [
1280
- (i(!0), f($e, null, De(V.value, (w) => (i(), f("div", {
1281
- key: w.key,
1280
+ (i(!0), f($e, null, De(V.value, (k) => (i(), f("div", {
1281
+ key: k.key,
1282
1282
  class: "flex flex-col gap-2"
1283
1283
  }, [
1284
- w.label ? (i(), f("span", ur, oe(w.label), 1)) : U("", !0),
1284
+ k.label ? (i(), f("span", ur, oe(k.label), 1)) : U("", !0),
1285
1285
  c("div", {
1286
1286
  class: Q(["p-0 w-full gap-[12px]", g.value])
1287
1287
  }, [
1288
- (i(!0), f($e, null, De(w.options, (T) => (i(), ye(ql, {
1288
+ (i(!0), f($e, null, De(k.options, (T) => (i(), ye(ql, {
1289
1289
  modelValue: a[p(T)],
1290
- "onUpdate:modelValue": (P) => a[p(T)] = P,
1290
+ "onUpdate:modelValue": (R) => a[p(T)] = R,
1291
1291
  value: p(T),
1292
1292
  class: Q(y(e.colSpan)),
1293
1293
  disabled: l.disabled || T.disabled,
1294
1294
  label: C(T),
1295
1295
  labelHtml: $.value ? _(T) : "",
1296
- key: `${w.key}-${p(T)}`,
1296
+ key: `${k.key}-${p(T)}`,
1297
1297
  icon: T?.icon,
1298
1298
  imgUrl: T?.imgUrl,
1299
1299
  option: T,
@@ -1305,18 +1305,18 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1305
1305
  key: 0,
1306
1306
  class: Q(["p-0 w-full gap-[10px]", g.value])
1307
1307
  }, [
1308
- (i(!0), f($e, null, De(d.value, (w) => (i(), ye(ql, {
1309
- modelValue: a[p(w)],
1310
- "onUpdate:modelValue": (T) => a[p(w)] = T,
1311
- value: p(w),
1308
+ (i(!0), f($e, null, De(d.value, (k) => (i(), ye(ql, {
1309
+ modelValue: a[p(k)],
1310
+ "onUpdate:modelValue": (T) => a[p(k)] = T,
1311
+ value: p(k),
1312
1312
  class: Q(y(e.colSpan)),
1313
- disabled: l.disabled || w.disabled,
1314
- label: C(w),
1315
- labelHtml: $.value ? _(w) : "",
1316
- key: p(w),
1317
- icon: w?.icon,
1318
- imgUrl: w?.imgUrl,
1319
- option: w,
1313
+ disabled: l.disabled || k.disabled,
1314
+ label: C(k),
1315
+ labelHtml: $.value ? _(k) : "",
1316
+ key: p(k),
1317
+ icon: k?.icon,
1318
+ imgUrl: k?.imgUrl,
1319
+ option: k,
1320
1320
  view: e.view
1321
1321
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "labelHtml", "icon", "imgUrl", "option", "view"]))), 128))
1322
1322
  ], 2));
@@ -1356,7 +1356,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1356
1356
  placeholder: p.value,
1357
1357
  disabled: d.value,
1358
1358
  ref: "date",
1359
- class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [e.modelValue ? "" : "text-opacity-50", R(a)].join(" ")]),
1359
+ class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [e.modelValue ? "" : "text-opacity-50", P(a)].join(" ")]),
1360
1360
  style: {
1361
1361
  border: "1px solid #CFD9E0"
1362
1362
  }
@@ -1458,11 +1458,11 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1458
1458
  title: a.value,
1459
1459
  class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"
1460
1460
  }, [
1461
- (i(), ye(rt(R(hr)(a.value)), {
1461
+ (i(), ye(rt(P(hr)(a.value)), {
1462
1462
  src: a.value,
1463
1463
  alt: "file",
1464
1464
  class: "w-full h-full object-cover cursor-pointer",
1465
- onClick: d[0] || (d[0] = (p) => R(_n)(a.value))
1465
+ onClick: d[0] || (d[0] = (p) => P(_n)(a.value))
1466
1466
  }, null, 8, ["src"])),
1467
1467
  c("div", xr, [
1468
1468
  c("button", {
@@ -1470,14 +1470,14 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1470
1470
  onClick: s,
1471
1471
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1472
1472
  }, [
1473
- Y(R(Wt), { class: "w-4 h-4" })
1473
+ Y(P(Wt), { class: "w-4 h-4" })
1474
1474
  ]),
1475
1475
  c("button", {
1476
1476
  type: "button",
1477
- onClick: d[1] || (d[1] = (p) => R(_n)(a.value)),
1477
+ onClick: d[1] || (d[1] = (p) => P(_n)(a.value)),
1478
1478
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
1479
1479
  }, [
1480
- Y(R(en), { class: "w-4 h-4" })
1480
+ Y(P(en), { class: "w-4 h-4" })
1481
1481
  ])
1482
1482
  ])
1483
1483
  ], 8, br));
@@ -1531,28 +1531,28 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1531
1531
  }, $ = (b) => {
1532
1532
  if (!p.value.length)
1533
1533
  return !0;
1534
- const M = `.${b.name.split(".").pop()?.toLowerCase() || ""}`, w = p.value.includes(M);
1535
- return w || Ce({
1534
+ const M = `.${b.name.split(".").pop()?.toLowerCase() || ""}`, k = p.value.includes(M);
1535
+ return k || Ce({
1536
1536
  type: "error",
1537
1537
  title: "Помилка!",
1538
1538
  message: `Неприпустимий формат файлу "${b.name}". Дозволені формати: ${p.value.join(", ")}`,
1539
1539
  position: "right-bottom"
1540
- }), w;
1540
+ }), k;
1541
1541
  }, _ = h(() => {
1542
1542
  const b = {}, M = [];
1543
1543
  if (!l.customParams?.length)
1544
1544
  return { params: b, missingSources: M };
1545
- const w = d?.value ?? {};
1545
+ const k = d?.value ?? {};
1546
1546
  return l.customParams.forEach((T) => {
1547
1547
  if (!T) return;
1548
- const [P, I] = T.split("="), q = P?.trim(), H = I?.trim();
1549
- if (!q || !H) return;
1550
- const X = w[H];
1548
+ const [R, I] = T.split("="), W = R?.trim(), q = I?.trim();
1549
+ if (!W || !q) return;
1550
+ const X = k[q];
1551
1551
  if (X == null || X === "") {
1552
- M.push(H);
1552
+ M.push(q);
1553
1553
  return;
1554
1554
  }
1555
- b[q] = X;
1555
+ b[W] = X;
1556
1556
  }), { params: b, missingSources: M };
1557
1557
  }), C = () => {
1558
1558
  const { params: b } = _.value;
@@ -1586,37 +1586,37 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1586
1586
  s.value && (s.value.value = "");
1587
1587
  return;
1588
1588
  }
1589
- const w = Array.from(M);
1590
- if (l.max_size && w.filter((I) => !v(I)).length > 0) {
1589
+ const k = Array.from(M);
1590
+ if (l.max_size && k.filter((I) => !v(I)).length > 0) {
1591
1591
  s.value && (s.value.value = "");
1592
1592
  return;
1593
1593
  }
1594
- if (w.filter((P) => !$(P)).length > 0) {
1594
+ if (k.filter((R) => !$(R)).length > 0) {
1595
1595
  s.value && (s.value.value = "");
1596
1596
  return;
1597
1597
  }
1598
1598
  o.value = !0;
1599
1599
  try {
1600
1600
  if (l.multiple) {
1601
- const P = Array.from(M).map(async (Z) => await Cn(Z, C())), I = await Promise.all(P), q = I.filter((Z) => Z?.file_path);
1602
- if (q.length === 0) {
1601
+ const R = Array.from(M).map(async (Z) => await Cn(Z, C())), I = await Promise.all(R), W = I.filter((Z) => Z?.file_path);
1602
+ if (W.length === 0) {
1603
1603
  g();
1604
1604
  return;
1605
1605
  }
1606
- q.length < I.length && g("Деякі файли не вдалося завантажити. Перевірте їх та спробуйте знову.");
1607
- const H = q.map((Z) => Z.file_path), X = Array.isArray(n.value) ? n.value : [];
1608
- n.value = [...X, ...H], a("change", n.value);
1606
+ W.length < I.length && g("Деякі файли не вдалося завантажити. Перевірте їх та спробуйте знову.");
1607
+ const q = W.map((Z) => Z.file_path), X = Array.isArray(n.value) ? n.value : [];
1608
+ n.value = [...X, ...q], a("change", n.value);
1609
1609
  } else {
1610
- const P = M[0], I = await Cn(P, C());
1610
+ const R = M[0], I = await Cn(R, C());
1611
1611
  if (!I?.file_path) {
1612
1612
  g();
1613
1613
  return;
1614
1614
  }
1615
- const q = I.file_path;
1616
- n.value = q, a("change", q);
1615
+ const W = I.file_path;
1616
+ n.value = W, a("change", W);
1617
1617
  }
1618
- } catch (P) {
1619
- const I = P?.message || void 0;
1618
+ } catch (R) {
1619
+ const I = R?.message || void 0;
1620
1620
  g(I);
1621
1621
  } finally {
1622
1622
  o.value = !1, s.value && (s.value.value = "");
@@ -1637,14 +1637,14 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1637
1637
  key: 0,
1638
1638
  item: n.value,
1639
1639
  value: n.value,
1640
- "onUpdate:value": M[0] || (M[0] = (w) => n.value = w)
1640
+ "onUpdate:value": M[0] || (M[0] = (k) => n.value = k)
1641
1641
  }, null, 8, ["item", "value"])) : e.multiple ? (i(), f("div", Cr, [
1642
- (i(!0), f($e, null, De(r.value, (w, T) => (i(), ye(Wl, {
1642
+ (i(!0), f($e, null, De(r.value, (k, T) => (i(), ye(Wl, {
1643
1643
  multiple: e.multiple,
1644
1644
  key: T,
1645
1645
  value: n.value,
1646
- "onUpdate:value": M[1] || (M[1] = (P) => n.value = P),
1647
- item: w
1646
+ "onUpdate:value": M[1] || (M[1] = (R) => n.value = R),
1647
+ item: k
1648
1648
  }, null, 8, ["multiple", "value", "item"]))), 128)),
1649
1649
  c("div", {
1650
1650
  onClick: x,
@@ -1653,7 +1653,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1653
1653
  e.disabled || o.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1654
1654
  ])
1655
1655
  }, [
1656
- o.value ? (i(), f("div", _r)) : (i(), ye(R(wt), {
1656
+ o.value ? (i(), f("div", _r)) : (i(), ye(P(wt), {
1657
1657
  key: 0,
1658
1658
  class: "h-4 w-4"
1659
1659
  }))
@@ -1664,7 +1664,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1664
1664
  onClick: x,
1665
1665
  class: Q([e.disabled || o.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
1666
1666
  }, [
1667
- o.value ? (i(), f("div", Sr)) : (i(), ye(R(wt), {
1667
+ o.value ? (i(), f("div", Sr)) : (i(), ye(P(wt), {
1668
1668
  key: 0,
1669
1669
  class: "h-4 w-4"
1670
1670
  }))
@@ -1677,7 +1677,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1677
1677
  }, Fr = {
1678
1678
  key: 0,
1679
1679
  class: "rounded-lg border border-[#CFD9E0] bg-white p-4 shadow-sm"
1680
- }, Tr = { class: "flex items-center justify-between text-sm" }, Er = { class: "truncate pr-4" }, Br = { class: "font-medium text-slate-800 truncate" }, Or = { class: "text-slate-500" }, Rr = { class: "text-slate-500 whitespace-nowrap" }, Pr = { class: "mt-3 h-2 rounded-full bg-slate-100 overflow-hidden" }, Nr = { class: "mt-3 flex flex-wrap gap-2 text-sm" }, jr = {
1680
+ }, Tr = { class: "flex items-center justify-between text-sm" }, Er = { class: "truncate pr-4" }, Br = { class: "font-medium text-slate-800 truncate" }, Or = { class: "text-slate-500" }, Pr = { class: "text-slate-500 whitespace-nowrap" }, Rr = { class: "mt-3 h-2 rounded-full bg-slate-100 overflow-hidden" }, Nr = { class: "mt-3 flex flex-wrap gap-2 text-sm" }, jr = {
1681
1681
  key: 0,
1682
1682
  class: "mt-2 text-sm text-rose-600"
1683
1683
  }, Ur = /* @__PURE__ */ ce({
@@ -1705,7 +1705,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1705
1705
  emits: ["update:modelValue"],
1706
1706
  setup(e) {
1707
1707
  const t = e, l = Ee(e, "modelValue"), n = L(null), a = L(null), r = L(""), s = L(0), o = L(!1), d = L(""), p = L(null), v = nt("values"), $ = h(() => t.format ? t.format.split(",").map((ue) => ue.trim().toLowerCase()).filter(Boolean) : []), _ = h(() => !a.value || !a.value.size ? 0 : Math.min(100, Math.round(s.value / a.value.size * 100))), C = h(() => a.value ? `${x(s.value)} / ${x(a.value.size)}` : ""), y = h(() => t.disabled ? "opacity-50 cursor-not-allowed" : o.value ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), g = () => {
1708
- t.disabled || o.value || w() && n.value?.click();
1708
+ t.disabled || o.value || k() && n.value?.click();
1709
1709
  }, x = (ue) => {
1710
1710
  if (!Number.isFinite(ue)) return "0 B";
1711
1711
  const ae = ["B", "KB", "MB", "GB"];
@@ -1742,7 +1742,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1742
1742
  const ke = J[xe];
1743
1743
  ke == null || ke === "" ? ae.push(xe) : ue[ne] = ke;
1744
1744
  }), { params: ue, missing: ae };
1745
- }), w = () => M.value.missing.length ? (Ce({
1745
+ }), k = () => M.value.missing.length ? (Ce({
1746
1746
  type: "warning",
1747
1747
  title: "Заповніть поля",
1748
1748
  message: `Потрібні значення: ${M.value.missing.join(", ")}`,
@@ -1750,7 +1750,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1750
1750
  }), !1) : !0, T = (ue) => {
1751
1751
  const ae = ue.target, J = ae.files?.[0];
1752
1752
  if (J) {
1753
- if (!w()) {
1753
+ if (!k()) {
1754
1754
  ae.value = "";
1755
1755
  return;
1756
1756
  }
@@ -1760,7 +1760,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1760
1760
  }
1761
1761
  a.value = J, s.value = 0, r.value = "", d.value = "";
1762
1762
  }
1763
- }, P = async () => {
1763
+ }, R = async () => {
1764
1764
  if (!a.value) {
1765
1765
  g();
1766
1766
  return;
@@ -1820,12 +1820,12 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1820
1820
  p.value = null, o.value = !1;
1821
1821
  }
1822
1822
  }
1823
- }, q = () => {
1823
+ }, W = () => {
1824
1824
  o.value && (p.value?.abort(), p.value = null, o.value = !1);
1825
- }, H = async () => {
1825
+ }, q = async () => {
1826
1826
  if (a.value) {
1827
1827
  if (!r.value) {
1828
- await P();
1828
+ await R();
1829
1829
  return;
1830
1830
  }
1831
1831
  await I();
@@ -1861,7 +1861,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1861
1861
  o.value ? (i(), f("div", Ir, [
1862
1862
  ae[2] || (ae[2] = c("div", { class: "loader" }, null, -1)),
1863
1863
  c("span", null, oe(_.value) + "%", 1)
1864
- ])) : (i(), ye(R(wt), {
1864
+ ])) : (i(), ye(P(wt), {
1865
1865
  key: 1,
1866
1866
  class: "h-4 w-4"
1867
1867
  }))
@@ -1873,9 +1873,9 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1873
1873
  c("div", Br, oe(a.value.name), 1),
1874
1874
  c("div", Or, oe(x(a.value.size)), 1)
1875
1875
  ]),
1876
- c("div", Rr, oe(C.value), 1)
1876
+ c("div", Pr, oe(C.value), 1)
1877
1877
  ]),
1878
- c("div", Pr, [
1878
+ c("div", Rr, [
1879
1879
  c("div", {
1880
1880
  class: "h-full rounded-full bg-blue-500 transition-all duration-300",
1881
1881
  style: Ve({ width: `${_.value}%` })
@@ -1886,19 +1886,19 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1886
1886
  key: 0,
1887
1887
  type: "button",
1888
1888
  class: "rounded border border-slate-300 px-3 py-1",
1889
- onClick: H
1889
+ onClick: q
1890
1890
  }, " Resume ")) : U("", !0),
1891
1891
  o.value ? (i(), f("button", {
1892
1892
  key: 1,
1893
1893
  type: "button",
1894
1894
  class: "rounded border border-slate-300 px-3 py-1",
1895
- onClick: q
1895
+ onClick: W
1896
1896
  }, " Pause ")) : U("", !0),
1897
1897
  !o.value && s.value === 0 ? (i(), f("button", {
1898
1898
  key: 2,
1899
1899
  type: "button",
1900
1900
  class: "rounded border border-slate-300 px-3 py-1",
1901
- onClick: P
1901
+ onClick: R
1902
1902
  }, " Upload ")) : U("", !0),
1903
1903
  c("button", {
1904
1904
  type: "button",
@@ -1935,7 +1935,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
1935
1935
  }
1936
1936
  return (a, r) => (i(), f($e, null, [
1937
1937
  c("div", zr, [
1938
- Y(R(Dl), { class: "icon icon-tabler icons-tabler-outline icon-tabler-file h-4 w-4" })
1938
+ Y(P(Dl), { class: "icon icon-tabler icons-tabler-outline icon-tabler-file h-4 w-4" })
1939
1939
  ]),
1940
1940
  c("div", Hr, [
1941
1941
  c("p", qr, oe(e.item?.uploaded_name), 1),
@@ -2033,7 +2033,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2033
2033
  class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
2034
2034
  onClick: $[1] || ($[1] = (_) => s(e.item))
2035
2035
  }, [
2036
- Y(R(en), { class: "h-4 w-4" })
2036
+ Y(P(en), { class: "h-4 w-4" })
2037
2037
  ])
2038
2038
  ]),
2039
2039
  $[3] || ($[3] = c("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
@@ -2043,7 +2043,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2043
2043
  class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
2044
2044
  onClick: $[2] || ($[2] = (_) => d())
2045
2045
  }, [
2046
- Y(R(Wt), { class: "h-4 w-4" })
2046
+ Y(P(Wt), { class: "h-4 w-4" })
2047
2047
  ])
2048
2048
  ])
2049
2049
  ])
@@ -2074,43 +2074,43 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2074
2074
  emits: ["update"],
2075
2075
  setup(e, { emit: t }) {
2076
2076
  const l = e, n = nt("form"), a = h(() => n.value.formId), r = L(!1), s = L(0), o = t, d = L(!1), p = L({}), v = L([]), $ = L(""), _ = h(() => Array.isArray(v.value) ? v.value.filter((M) => M.ext === "jpg" || M.ext === "png").map((M) => M?.file_path) : []), C = h(() => $.value === "" ? v.value : v.value.filter((M) => M?.uploaded_name?.includes($.value))), y = (M) => {
2077
- const w = _.value.findIndex((T) => T === M.item.file_path);
2078
- w !== -1 && (r.value = !0, s.value = w);
2077
+ const k = _.value.findIndex((T) => T === M.item.file_path);
2078
+ k !== -1 && (r.value = !0, s.value = k);
2079
2079
  }, g = async () => {
2080
2080
  try {
2081
- const M = await fetch(`${l.prefix}/widget/file/${a.value}`).then((w) => w.json());
2081
+ const M = await fetch(`${l.prefix}/widget/file/${a.value}`).then((k) => k.json());
2082
2082
  v.value = M?.rows;
2083
2083
  } catch (M) {
2084
2084
  console.error(M);
2085
2085
  }
2086
2086
  }, x = async (M) => {
2087
2087
  await Promise.all(
2088
- Array.from(M.target.files).map(async (w) => {
2088
+ Array.from(M.target.files).map(async (k) => {
2089
2089
  const T = new FormData();
2090
- T.append("file", w);
2090
+ T.append("file", k);
2091
2091
  try {
2092
- const P = `${l.prefix}/widget/file/${a.value}`, I = await fetch(P, { method: "POST", body: T });
2093
- return I.ok ? (o("update", "file-list"), w) : (Ce({
2092
+ const R = `${l.prefix}/widget/file/${a.value}`, I = await fetch(R, { method: "POST", body: T });
2093
+ return I.ok ? (o("update", "file-list"), k) : (Ce({
2094
2094
  type: I.status >= 400 && I.status < 500 ? "warning" : "error",
2095
2095
  title: "Error",
2096
2096
  message: `Error code: ${I.status}`
2097
2097
  }), null);
2098
- } catch (P) {
2098
+ } catch (R) {
2099
2099
  return Ce({
2100
2100
  type: "error",
2101
2101
  title: "Error",
2102
- message: P.message || "Unknown error"
2103
- }), console.error(P), null;
2102
+ message: R.message || "Unknown error"
2103
+ }), console.error(R), null;
2104
2104
  }
2105
2105
  })
2106
2106
  ), await g();
2107
2107
  }, V = (M) => {
2108
- const w = { ...M };
2109
- return M.cancel || (w.cancel = () => {
2108
+ const k = { ...M };
2109
+ return M.cancel || (k.cancel = () => {
2110
2110
  d.value = !1;
2111
- }), M.updateListOnConfirm && (w.confirm = async () => {
2111
+ }), M.updateListOnConfirm && (k.confirm = async () => {
2112
2112
  await M.confirm(), d.value = !1, g();
2113
- }), w;
2113
+ }), k;
2114
2114
  }, b = (M) => {
2115
2115
  p.value = V(M), d.value = !0;
2116
2116
  };
@@ -2118,8 +2118,8 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2118
2118
  M && g();
2119
2119
  }), Xe(() => {
2120
2120
  a.value && g();
2121
- }), (M, w) => {
2122
- const T = gt("Lightbox"), P = gt("MessageBox");
2121
+ }), (M, k) => {
2122
+ const T = gt("Lightbox"), R = gt("MessageBox");
2123
2123
  return i(), f("div", rs, [
2124
2124
  c("div", ss, [
2125
2125
  c("h2", is, " Файлів: " + oe(v.value?.length), 1),
@@ -2128,10 +2128,10 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2128
2128
  c("input", {
2129
2129
  type: "file",
2130
2130
  class: "hidden",
2131
- onChange: w[0] || (w[0] = (I) => x(I))
2131
+ onChange: k[0] || (k[0] = (I) => x(I))
2132
2132
  }, null, 32),
2133
2133
  c("div", ds, [
2134
- Y(R(Un), { class: "h-4 w-4" })
2134
+ Y(P(Un), { class: "h-4 w-4" })
2135
2135
  ])
2136
2136
  ])
2137
2137
  ])
@@ -2140,11 +2140,11 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2140
2140
  c("div", null, [
2141
2141
  c("div", fs, [
2142
2142
  c("div", ms, [
2143
- Y(R(tn), { class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400" })
2143
+ Y(P(tn), { class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400" })
2144
2144
  ]),
2145
2145
  Se(c("input", {
2146
2146
  type: "text",
2147
- "onUpdate:modelValue": w[1] || (w[1] = (I) => $.value = I),
2147
+ "onUpdate:modelValue": k[1] || (k[1] = (I) => $.value = I),
2148
2148
  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",
2149
2149
  placeholder: "Введіть назву файлу"
2150
2150
  }, null, 512), [
@@ -2159,29 +2159,29 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2159
2159
  ])
2160
2160
  ])) : U("", !0),
2161
2161
  v.value?.length ? (i(), f("div", ps, [
2162
- (i(!0), f($e, null, De(C.value, (I, q) => (i(), ye(os, {
2163
- key: q,
2162
+ (i(!0), f($e, null, De(C.value, (I, W) => (i(), ye(os, {
2163
+ key: W,
2164
2164
  prefix: e.prefix,
2165
2165
  item: I,
2166
- index: q,
2167
- onUpdate: w[2] || (w[2] = (H) => M.$emit("update", "file-list")),
2168
- onOpenModal: w[3] || (w[3] = (H) => b(H)),
2169
- onOpenLightbox: w[4] || (w[4] = (H) => y(H))
2166
+ index: W,
2167
+ onUpdate: k[2] || (k[2] = (q) => M.$emit("update", "file-list")),
2168
+ onOpenModal: k[3] || (k[3] = (q) => b(q)),
2169
+ onOpenLightbox: k[4] || (k[4] = (q) => y(q))
2170
2170
  }, null, 8, ["prefix", "item", "index"]))), 128)),
2171
- C.value.length ? U("", !0) : (i(), f("div", vs, [...w[8] || (w[8] = [
2171
+ C.value.length ? U("", !0) : (i(), f("div", vs, [...k[8] || (k[8] = [
2172
2172
  c("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
2173
2173
  ])]))
2174
2174
  ])) : U("", !0),
2175
2175
  Y(T, {
2176
2176
  modelValue: r.value,
2177
- "onUpdate:modelValue": w[5] || (w[5] = (I) => r.value = I),
2177
+ "onUpdate:modelValue": k[5] || (k[5] = (I) => r.value = I),
2178
2178
  startIndex: s.value,
2179
- "onUpdate:index": w[6] || (w[6] = (I) => s.value = I),
2179
+ "onUpdate:index": k[6] || (k[6] = (I) => s.value = I),
2180
2180
  images: _.value
2181
2181
  }, null, 8, ["modelValue", "startIndex", "images"]),
2182
- Y(P, Bt({
2182
+ Y(R, Ot({
2183
2183
  modelValue: d.value,
2184
- "onUpdate:modelValue": w[7] || (w[7] = (I) => d.value = I),
2184
+ "onUpdate:modelValue": k[7] || (k[7] = (I) => d.value = I),
2185
2185
  onConfirm: p.value.confirm
2186
2186
  }, p.value), null, 16, ["modelValue", "onConfirm"])
2187
2187
  ]);
@@ -2260,7 +2260,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2260
2260
  onClick: a[0] || (a[0] = (r) => l.value = !l.value),
2261
2261
  class: "flex items-center gap-2"
2262
2262
  }, [
2263
- Y(R(dl), {
2263
+ Y(P(dl), {
2264
2264
  class: Q(["h-4 w-4 duration-300", [l.value ? "-rotate-180" : ""]])
2265
2265
  }, null, 8, ["class"]),
2266
2266
  c("span", ks, oe(e.title), 1)
@@ -2314,7 +2314,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2314
2314
  Contain: "*",
2315
2315
  In: "in",
2316
2316
  NotIn: "not_in"
2317
- }, Ls = (e, t) => String(e) === String(t), Ds = (e, t) => String(e) !== String(t), As = (e, t) => e > t, Is = (e, t) => e >= t, Fs = (e, t) => e < t, Ts = (e, t) => e <= t, Es = (e, t) => Array.isArray(t) && t.length === 2 ? e >= t[0] && e <= t[1] : !1, Bs = (e, t) => String(e).startsWith(String(t)), Os = (e, t) => String(e).endsWith(String(t)), Rs = (e, t) => String(e).includes(String(t)), Ps = (e, t) => Array.isArray(t) ? t.includes(e) : !1, Ns = (e, t) => Array.isArray(t) ? !t.includes(e) : !0, Yn = (e, t) => {
2317
+ }, Ls = (e, t) => String(e) === String(t), Ds = (e, t) => String(e) !== String(t), As = (e, t) => e > t, Is = (e, t) => e >= t, Fs = (e, t) => e < t, Ts = (e, t) => e <= t, Es = (e, t) => Array.isArray(t) && t.length === 2 ? e >= t[0] && e <= t[1] : !1, Bs = (e, t) => String(e).startsWith(String(t)), Os = (e, t) => String(e).endsWith(String(t)), Ps = (e, t) => String(e).includes(String(t)), Rs = (e, t) => Array.isArray(t) ? t.includes(e) : !1, Ns = (e, t) => Array.isArray(t) ? !t.includes(e) : !0, Yn = (e, t) => {
2318
2318
  if (!t) return !0;
2319
2319
  switch (t?.[1]) {
2320
2320
  case vt.Equal:
@@ -2336,9 +2336,9 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2336
2336
  case vt.EndWith:
2337
2337
  return Os(e, t?.[2]);
2338
2338
  case vt.Contain:
2339
- return Rs(e, t?.[2]);
2340
- case vt.In:
2341
2339
  return Ps(e, t?.[2]);
2340
+ case vt.In:
2341
+ return Rs(e, t?.[2]);
2342
2342
  case vt.NotIn:
2343
2343
  return Ns(e, t?.[2]);
2344
2344
  default:
@@ -2390,14 +2390,14 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2390
2390
  style: Ve(e.style)
2391
2391
  }, {
2392
2392
  default: tt(() => [
2393
- (i(!0), f($e, null, De(a.value, (p) => (i(), ye(ea, Bt({
2393
+ (i(!0), f($e, null, De(a.value, (p) => (i(), ye(ea, Ot({
2394
2394
  key: p.name
2395
2395
  }, { ref_for: !0 }, p, {
2396
2396
  item: p,
2397
2397
  modelValue: s.value[p.name],
2398
2398
  "onUpdate:modelValue": (v) => s.value[p.name] = v,
2399
2399
  style: e.style,
2400
- error: R(n)?.errors?.[p.name]
2400
+ error: P(n)?.errors?.[p.name]
2401
2401
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
2402
2402
  ]),
2403
2403
  _: 1
@@ -2567,7 +2567,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2567
2567
  class: "flex items-center rounded-sm px-1 box-border text-[#172b4d] hover:bg-[rgb(255,189,173)] hover:text-[rgb(222,53,11)] flex-shrink-0",
2568
2568
  onClick: Te((d) => e.onRemoveSelected(o.id), ["stop"])
2569
2569
  }, [
2570
- Y(R(kt), {
2570
+ Y(P(kt), {
2571
2571
  "aria-hidden": "true",
2572
2572
  focusable: "false",
2573
2573
  class: "inline-block h-4 w-4"
@@ -2663,7 +2663,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2663
2663
  ["stop"]
2664
2664
  ))
2665
2665
  }, [
2666
- Y(R(kt), { class: "h-4 w-4" })
2666
+ Y(P(kt), { class: "h-4 w-4" })
2667
2667
  ], 8, ai)) : U("", !0),
2668
2668
  e.showClear ? (i(), f("div", oi)) : U("", !0),
2669
2669
  c("button", {
@@ -2678,7 +2678,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2678
2678
  )),
2679
2679
  title: e.isOpen ? "Закрити список" : "Відкрити список"
2680
2680
  }, [
2681
- Y(R(dl), { class: "h-4 w-4" })
2681
+ Y(P(dl), { class: "h-4 w-4" })
2682
2682
  ], 8, ri)
2683
2683
  ])
2684
2684
  ], 42, zs));
@@ -2804,19 +2804,19 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2804
2804
  !o.value && l.defaultValue && (o.value = l.defaultValue);
2805
2805
  const d = L(null), p = L(null), v = L(null), $ = L(null), _ = L(!1), C = L(!1), y = L(null), g = L(-1), x = L([]), V = L(""), b = L(null), M = (O) => {
2806
2806
  p.value = O;
2807
- }, w = (O) => {
2807
+ }, k = (O) => {
2808
2808
  b.value = O;
2809
2809
  }, T = (O) => {
2810
2810
  $.value = O;
2811
- }, P = (O) => {
2811
+ }, R = (O) => {
2812
2812
  v.value = O;
2813
2813
  }, I = (O, ee) => {
2814
2814
  x.value[ee] = O;
2815
- }, q = L({}), H = L([]), X = h(() => {
2816
- if (!H.value.length) return [];
2815
+ }, W = L({}), q = L([]), X = h(() => {
2816
+ if (!q.value.length) return [];
2817
2817
  const O = Be.value, ee = new Map(O.map((me) => [me.id?.toString(), me]));
2818
- return H.value.map((me) => ee.get(me?.toString())).filter((me) => !!me);
2819
- }), Z = h(() => l.placeholder || "Select..."), ue = h(() => ke(y.value)), ae = h(() => r.value ? !1 : a.value ? H.value.length > 0 : !!o.value), J = (O) => a.value ? H.value.some((ee) => ee?.toString() === O?.toString()) : o.value?.toString() === O?.toString(), K = h(() => {
2818
+ return q.value.map((me) => ee.get(me?.toString())).filter((me) => !!me);
2819
+ }), Z = h(() => l.placeholder || "Select..."), ue = h(() => ke(y.value)), ae = h(() => r.value ? !1 : a.value ? q.value.length > 0 : !!o.value), J = (O) => a.value ? q.value.some((ee) => ee?.toString() === O?.toString()) : o.value?.toString() === O?.toString(), K = h(() => {
2820
2820
  let O = Be.value ?? [];
2821
2821
  if (!l.data && V.value.trim() !== "") {
2822
2822
  const ee = V.value.toLowerCase();
@@ -2825,8 +2825,8 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2825
2825
  return Fe.includes(ee) || We.includes(ee);
2826
2826
  });
2827
2827
  }
2828
- if (a.value && H.value.length) {
2829
- const ee = new Set(H.value.map((me) => me?.toString()));
2828
+ if (a.value && q.value.length) {
2829
+ const ee = new Set(q.value.map((me) => me?.toString()));
2830
2830
  O = O.filter((me) => !ee.has(me.id?.toString()));
2831
2831
  }
2832
2832
  return O;
@@ -2867,7 +2867,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2867
2867
  props: l,
2868
2868
  formValues: B,
2869
2869
  watchParent: !1
2870
- }), Ie = async () => l.data ? st(V.value) : st(), z = async (O) => {
2870
+ }), Ie = async () => l.data ? st(V.value) : st(), H = async (O) => {
2871
2871
  if (O == null || O === "") return null;
2872
2872
  const ee = Be.value?.find((me) => me?.id?.toString() === String(O));
2873
2873
  return ee || yt(O);
@@ -2875,7 +2875,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2875
2875
  const ee = new Set(Be.value.map((Fe) => Fe.id?.toString())), me = O.filter((Fe) => !ee.has(Fe?.toString()));
2876
2876
  me.length && await me.reduce(async (Fe, We) => {
2877
2877
  await Fe;
2878
- const ot = await z(We);
2878
+ const ot = await H(We);
2879
2879
  ot && Be.value.push(ot);
2880
2880
  }, Promise.resolve());
2881
2881
  }, re = () => {
@@ -2911,20 +2911,20 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2911
2911
  await he();
2912
2912
  }
2913
2913
  }, E = () => {
2914
- a.value ? (H.value = [], o.value = [], n("change", []), A(null, [])) : (y.value = null, o.value = null, n("change", null), A(null, null)), _e(null), V.value = "", Je(() => {
2914
+ a.value ? (q.value = [], o.value = [], n("change", []), A(null, [])) : (y.value = null, o.value = null, n("change", null), A(null, null)), _e(null), V.value = "", Je(() => {
2915
2915
  b.value?.focus(), _.value || he();
2916
2916
  });
2917
2917
  }, se = (O) => {
2918
- a.value && (H.value = H.value.filter((ee) => ee?.toString() !== O?.toString()), o.value = [...H.value], n("change", o.value), A(null), Je(() => b.value?.focus()));
2918
+ a.value && (q.value = q.value.filter((ee) => ee?.toString() !== O?.toString()), o.value = [...q.value], n("change", o.value), A(null), Je(() => b.value?.focus()));
2919
2919
  }, A = (O, ee) => {
2920
- const me = ee ?? (a.value ? [...H.value] : O?.id ?? null);
2920
+ const me = ee ?? (a.value ? [...q.value] : O?.id ?? null);
2921
2921
  n("value-selected", {
2922
2922
  name: l.name,
2923
2923
  value: me,
2924
2924
  option: O
2925
2925
  });
2926
2926
  }, G = (O) => {
2927
- a.value ? (J(O.id) || (H.value = [...H.value, O.id], o.value = [...H.value], n("change", o.value), A(O)), V.value = "", Je(() => {
2927
+ a.value ? (J(O.id) || (q.value = [...q.value, O.id], o.value = [...q.value], n("change", o.value), A(O)), V.value = "", Je(() => {
2928
2928
  b.value?.focus(), g.value = Math.min(g.value, K.value.length - 1);
2929
2929
  }), _e(null)) : (y.value = O, o.value = O.id, n("change", o.value), A(O), V.value = "", be(), _e(O));
2930
2930
  }, F = (O) => {
@@ -2962,7 +2962,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2962
2962
  ot,
2963
2963
  Math.max(ht ? Ze : ft, 50)
2964
2964
  );
2965
- q.value = {
2965
+ W.value = {
2966
2966
  position: "fixed",
2967
2967
  left: `${pt}px`,
2968
2968
  width: `${_t}px`,
@@ -2972,7 +2972,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2972
2972
  };
2973
2973
  }, Me = async (O) => {
2974
2974
  r.value || !_.value && (O.key === "ArrowDown" || O.key === "ArrowUp") && (O.preventDefault(), await he());
2975
- }, Re = (O) => {
2975
+ }, Pe = (O) => {
2976
2976
  if (!_.value) return;
2977
2977
  const { key: ee } = O;
2978
2978
  if (ee === "ArrowDown")
@@ -2983,10 +2983,10 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
2983
2983
  O.preventDefault();
2984
2984
  const me = K.value[g.value];
2985
2985
  me && G(me), b.value?.blur();
2986
- } else ee === "Escape" ? (O.preventDefault(), be()) : ee === "Backspace" ? a.value && V.value === "" && H.value.length && (H.value = H.value.slice(0, -1), o.value = [...H.value], n("change", o.value)) : ee === "Home" ? (g.value = 0, j(x.value[0], v.value)) : ee === "End" ? (g.value = K.value.length - 1, j(x.value[g.value], v.value)) : ee === "Tab" && be();
2986
+ } else ee === "Escape" ? (O.preventDefault(), be()) : ee === "Backspace" ? a.value && V.value === "" && q.value.length && (q.value = q.value.slice(0, -1), o.value = [...q.value], n("change", o.value)) : ee === "Home" ? (g.value = 0, j(x.value[0], v.value)) : ee === "End" ? (g.value = K.value.length - 1, j(x.value[g.value], v.value)) : ee === "Tab" && be();
2987
2987
  }, qe = () => {
2988
2988
  r.value || (C.value = !0);
2989
- }, Pe = () => {
2989
+ }, Re = () => {
2990
2990
  C.value = !1, V.value = "";
2991
2991
  }, it = (O) => {
2992
2992
  O.key === "Escape" && _.value && be();
@@ -3002,13 +3002,13 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3002
3002
  };
3003
3003
  async function $t() {
3004
3004
  if (a.value)
3005
- Array.isArray(o.value) ? H.value = [...o.value] : (H.value = o.value == null ? [] : [o.value], o.value = [...H.value]), l.data && H.value.length && (await le(H.value), await Je());
3005
+ Array.isArray(o.value) ? q.value = [...o.value] : (q.value = o.value == null ? [] : [o.value], o.value = [...q.value]), l.data && q.value.length && (await le(q.value), await Je());
3006
3006
  else {
3007
3007
  if (Array.isArray(o.value)) {
3008
3008
  const O = o.value[0] ?? null;
3009
3009
  o.value = O ?? null;
3010
3010
  }
3011
- o.value != null && (y.value = await z(o.value)), _e(y.value ?? null);
3011
+ o.value != null && (y.value = await H(o.value)), _e(y.value ?? null);
3012
3012
  }
3013
3013
  }
3014
3014
  pe(o, () => {
@@ -3032,13 +3032,13 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3032
3032
  selectedOption: y,
3033
3033
  modelValue: o
3034
3034
  });
3035
- function Pt(O, ee = 200) {
3035
+ function Nt(O, ee = 200) {
3036
3036
  let me;
3037
3037
  return (...Fe) => {
3038
3038
  me && clearTimeout(me), me = window.setTimeout(() => O(...Fe), ee);
3039
3039
  };
3040
3040
  }
3041
- const Ol = Pt(async (O) => {
3041
+ const Ol = Nt(async (O) => {
3042
3042
  Be.value = await at(O);
3043
3043
  }, 200);
3044
3044
  pe(V, (O) => {
@@ -3048,24 +3048,24 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3048
3048
  }, { immediate: !0 });
3049
3049
  const Ct = L(!0);
3050
3050
  return pe(He, async () => {
3051
- if (l.data && (Ct.value || (a.value ? (H.value = [], o.value = [], n("change", [])) : (y.value = null, o.value = null, n("change", null))), await Ie(), l.auto === 1 && He.value && Be.value.length > 0)) {
3051
+ if (l.data && (Ct.value || (a.value ? (q.value = [], o.value = [], n("change", [])) : (y.value = null, o.value = null, n("change", null))), await Ie(), l.auto === 1 && He.value && Be.value.length > 0)) {
3052
3052
  const O = Be.value[0];
3053
3053
  O && G(O);
3054
3054
  }
3055
3055
  }), (O, ee) => (i(), f($e, null, [
3056
- Y(R(ln), {
3057
- visible: R(ll),
3056
+ Y(P(ln), {
3057
+ visible: P(ll),
3058
3058
  "onUpdate:visible": ee[1] || (ee[1] = (me) => bn(ll) ? ll.value = me : null),
3059
3059
  class: "z-[1000]",
3060
3060
  title: "Додати",
3061
3061
  buttonText: "Додати",
3062
- onDone: R(Bl),
3062
+ onDone: P(Bl),
3063
3063
  teleport: e.teleport
3064
3064
  }, {
3065
3065
  default: tt(() => [
3066
- Y(Ot, {
3067
- schema: R(El),
3068
- modelValue: R(Gt),
3066
+ Y(Pt, {
3067
+ schema: P(El),
3068
+ modelValue: P(Gt),
3069
3069
  "onUpdate:modelValue": ee[0] || (ee[0] = (me) => bn(Gt) ? Gt.value = me : null),
3070
3070
  ref_key: "addForm",
3071
3071
  ref: Yt
@@ -3102,7 +3102,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3102
3102
  "input-focus": C.value,
3103
3103
  "is-multi": a.value,
3104
3104
  "selected-options": X.value,
3105
- "selected-ids": H.value,
3105
+ "selected-ids": q.value,
3106
3106
  placeholder: Z.value,
3107
3107
  search: s.value,
3108
3108
  "option-template": ne.value,
@@ -3111,7 +3111,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3111
3111
  "selected-option": y.value,
3112
3112
  "show-clear": ae.value,
3113
3113
  "set-trigger-ref": M,
3114
- "set-input-ref": w,
3114
+ "set-input-ref": k,
3115
3115
  "should-show-color-dot": de,
3116
3116
  "option-has-icon": Le,
3117
3117
  "get-icon-color-style": ve,
@@ -3121,21 +3121,21 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3121
3121
  "on-control-keydown": Me,
3122
3122
  "on-control-click": je,
3123
3123
  "on-input-focus": qe,
3124
- "on-input-blur": Pe,
3125
- "on-input-keydown": Re,
3124
+ "on-input-blur": Re,
3125
+ "on-input-keydown": Pe,
3126
3126
  "on-remove-selected": se,
3127
3127
  "on-clear-selected": E,
3128
3128
  "on-toggle-select": Oe
3129
3129
  }, null, 8, ["keyWord", "disabled", "is-open", "input-focus", "is-multi", "selected-options", "selected-ids", "placeholder", "search", "option-template", "selected-option-label", "selected-option", "show-clear"]),
3130
3130
  Y(fi, {
3131
3131
  "is-open": _.value,
3132
- "dropdown-style": q.value,
3132
+ "dropdown-style": W.value,
3133
3133
  "filtered-options-list": K.value,
3134
3134
  "selected-nav-index": g.value,
3135
3135
  "option-template": ne.value,
3136
3136
  "icon-wrapper-class": Sn,
3137
3137
  "set-dropdown-ref": T,
3138
- "set-list-ref": P,
3138
+ "set-list-ref": R,
3139
3139
  "set-item-ref": I,
3140
3140
  "is-selected": J,
3141
3141
  "on-option-click": F,
@@ -3149,12 +3149,12 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3149
3149
  l.add ? (i(), f("button", {
3150
3150
  key: 0,
3151
3151
  onClick: ee[3] || (ee[3] = //@ts-ignore
3152
- (...me) => R(Mt) && R(Mt)(...me)),
3152
+ (...me) => P(Mt) && P(Mt)(...me)),
3153
3153
  class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
3154
3154
  disabled: r.value,
3155
3155
  type: "button"
3156
3156
  }, [
3157
- Y(R(wt), { class: "h-4 w-4" }),
3157
+ Y(P(wt), { class: "h-4 w-4" }),
3158
3158
  ee[7] || (ee[7] = c("span", null, "Додати", -1))
3159
3159
  ], 8, mi)) : U("", !0)
3160
3160
  ], 512)
@@ -3188,7 +3188,7 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3188
3188
  disabled: a.value,
3189
3189
  row: "2",
3190
3190
  onBlur: s,
3191
- class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [R(l)]]),
3191
+ class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [P(l)]]),
3192
3192
  style: {
3193
3193
  border: "1px solid #CFD9E0"
3194
3194
  }
@@ -3216,16 +3216,16 @@ const po = ["placeholder", "disabled"], vo = /* @__PURE__ */ ce({
3216
3216
  }),
3217
3217
  emits: ["update:modelValue"],
3218
3218
  setup(e) {
3219
- const t = Va(() => import("./vs-richtext-BHR1pSgx.js")), l = e, { inputClass: n } = lt(l.style), a = Ee(e, "modelValue"), r = h(() => !!l.disabled), s = h(() => l.placeholder ?? ""), o = h(() => ({
3219
+ const t = Va(() => import("./vs-richtext-D-51yhuV.js")), l = e, { inputClass: n } = lt(l.style), a = Ee(e, "modelValue"), r = h(() => !!l.disabled), s = h(() => l.placeholder ?? ""), o = h(() => ({
3220
3220
  height: "300px",
3221
3221
  format: l.format,
3222
3222
  ...l.richtextProps
3223
3223
  }));
3224
3224
  return (d, p) => (i(), f("div", {
3225
- class: Q(["!h-full", [e.customClass, R(n)]]),
3225
+ class: Q(["!h-full", [e.customClass, P(n)]]),
3226
3226
  style: Ve(r.value ? { pointerEvents: "none", opacity: 0.6 } : {})
3227
3227
  }, [
3228
- Y(R(t), Bt({
3228
+ Y(P(t), Ot({
3229
3229
  modelValue: a.value,
3230
3230
  "onUpdate:modelValue": p[0] || (p[0] = (v) => a.value = v),
3231
3231
  placeholder: s.value
@@ -3255,7 +3255,7 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3255
3255
  key: 0,
3256
3256
  colspan: "100%",
3257
3257
  class: "text-center"
3258
- }, Ti = { class: "w-full" }, Ei = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Bi = ["onDragstart", "onDragover", "onDrop"], Oi = { class: "px-4 py-3 text-center align-middle" }, Ri = { class: "flex items-center justify-center" }, Pi = ["innerHTML"], Ni = {
3258
+ }, Ti = { class: "w-full" }, Ei = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Bi = ["onDragstart", "onDragover", "onDrop"], Oi = { class: "px-4 py-3 text-center align-middle" }, Pi = { class: "flex items-center justify-center" }, Ri = ["innerHTML"], Ni = {
3259
3259
  key: 0,
3260
3260
  class: "flex items-center gap-3 text-sm text-gray-700"
3261
3261
  }, ji = { key: 0 }, Ui = ["src"], zi = {
@@ -3287,37 +3287,37 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3287
3287
  }),
3288
3288
  emits: ["update:modelValue"],
3289
3289
  setup(e) {
3290
- const t = e, l = Ma(), n = (z) => t.actions === void 0 ? !0 : t.actions.includes(z), a = ["search", "import", "export", "add"], r = h(() => a.some((z) => n(z))), s = Ee(e, "modelValue"), o = L({}), d = L(""), p = L(null), v = L("asc"), $ = h(() => {
3291
- const z = s.value ?? [], le = d.value ? z.filter((be) => _.value?.some((Oe) => {
3290
+ const t = e, l = Ma(), n = (H) => t.actions === void 0 ? !0 : t.actions.includes(H), a = ["search", "import", "export", "add"], r = h(() => a.some((H) => n(H))), s = Ee(e, "modelValue"), o = L({}), d = L(""), p = L(null), v = L("asc"), $ = h(() => {
3291
+ const H = s.value ?? [], le = d.value ? H.filter((be) => _.value?.some((Oe) => {
3292
3292
  const je = Oe.key || Oe.name;
3293
3293
  if (!je) return !1;
3294
3294
  const E = be[je];
3295
3295
  return E ? Array.isArray(E) ? E.join(", ").toLowerCase().includes(d.value.toLowerCase()) : String(E).toLowerCase().includes(d.value.toLowerCase()) : !1;
3296
- })) : z;
3296
+ })) : H;
3297
3297
  if (!p.value) return le;
3298
3298
  const re = p.value, he = [...le].sort((be, Oe) => {
3299
3299
  const je = ve(be?.[re]), E = ve(Oe?.[re]);
3300
3300
  return typeof je == "number" && typeof E == "number" ? je - E : String(je).localeCompare(String(E));
3301
3301
  });
3302
3302
  return v.value === "asc" ? he : he.reverse();
3303
- }), _ = h(() => (t.colModel ?? []).filter((z) => !z.tableHidden)), C = L(null), y = L(null), g = L(null), x = (z) => {
3304
- C.value = z;
3305
- }, V = (z) => {
3306
- y.value = z;
3307
- }, b = (z) => {
3308
- if (C.value === null || C.value === z) {
3303
+ }), _ = h(() => (t.colModel ?? []).filter((H) => !H.tableHidden)), C = L(null), y = L(null), g = L(null), x = (H) => {
3304
+ C.value = H;
3305
+ }, V = (H) => {
3306
+ y.value = H;
3307
+ }, b = (H) => {
3308
+ if (C.value === null || C.value === H) {
3309
3309
  C.value = null, y.value = null;
3310
3310
  return;
3311
3311
  }
3312
3312
  const le = [...s.value], [re] = le.splice(C.value, 1);
3313
- le.splice(z, 0, re), s.value = le, C.value = null, y.value = null;
3313
+ le.splice(H, 0, re), s.value = le, C.value = null, y.value = null;
3314
3314
  }, M = () => {
3315
3315
  g.value && g.value.click();
3316
- }, w = (z) => {
3317
- const le = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], re = z.toLowerCase();
3316
+ }, k = (H) => {
3317
+ const le = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], re = H.toLowerCase();
3318
3318
  return le.some((he) => re.endsWith(he));
3319
- }, T = (z) => {
3320
- const re = z.target.files?.[0];
3319
+ }, T = (H) => {
3320
+ const re = H.target.files?.[0];
3321
3321
  if (!re) return;
3322
3322
  const he = new FileReader();
3323
3323
  he.onload = (be) => {
@@ -3331,8 +3331,8 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3331
3331
  console.error("Error parsing file:", Oe);
3332
3332
  }
3333
3333
  }, he.readAsText(re);
3334
- }, P = () => {
3335
- const z = JSON.stringify(s.value, null, 2), le = new Blob([z], { type: "application/json" }), re = URL.createObjectURL(le), he = document.createElement("a");
3334
+ }, R = () => {
3335
+ const H = JSON.stringify(s.value, null, 2), le = new Blob([H], { type: "application/json" }), re = URL.createObjectURL(le), he = document.createElement("a");
3336
3336
  he.href = re, he.download = "data.json", he.click(), URL.revokeObjectURL(re);
3337
3337
  }, I = /* @__PURE__ */ new Set([
3338
3338
  "autocomplete",
@@ -3340,13 +3340,13 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3340
3340
  "radio",
3341
3341
  "checkbox",
3342
3342
  "combobox"
3343
- ]), q = /* @__PURE__ */ new Map(), H = (z, le) => {
3344
- const re = `/api/suggest/${z}`, he = re.includes("?") ? "&" : "?", be = le ? `&val=${le}` : "";
3343
+ ]), W = /* @__PURE__ */ new Map(), q = (H, le) => {
3344
+ const re = `/api/suggest/${H}`, he = re.includes("?") ? "&" : "?", be = le ? `&val=${le}` : "";
3345
3345
  return `${re}${he}json=1${be}`;
3346
- }, X = (z) => z == null || z === "" ? null : typeof z == "object" ? z?.id !== void 0 && z.id !== null && z.id !== "" ? z.id : null : z, Z = (z) => {
3346
+ }, X = (H) => H == null || H === "" ? null : typeof H == "object" ? H?.id !== void 0 && H.id !== null && H.id !== "" ? H.id : null : H, Z = (H) => {
3347
3347
  const le = /* @__PURE__ */ new Set();
3348
3348
  return Array.isArray(s.value) && s.value.forEach((re) => {
3349
- const he = re?.[z];
3349
+ const he = re?.[H];
3350
3350
  if (he == null || he === "") return;
3351
3351
  if (Array.isArray(he)) {
3352
3352
  he.forEach((Oe) => {
@@ -3360,16 +3360,16 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3360
3360
  }), le;
3361
3361
  }, ue = async () => {
3362
3362
  if (!t.colModel?.length) return;
3363
- const z = t.colModel.filter((le) => le.data && I.has(le.type?.toLowerCase() || ""));
3364
- z.length && await Promise.all(z.map(async (le) => {
3363
+ const H = t.colModel.filter((le) => le.data && I.has(le.type?.toLowerCase() || ""));
3364
+ H.length && await Promise.all(H.map(async (le) => {
3365
3365
  const re = le.key || le.name;
3366
3366
  if (!re) return;
3367
3367
  const he = Z(re), be = Array.from(he).map((E) => String(E)).sort(), Oe = be.join(",");
3368
- if (!be.length || q.get(re) === Oe) return;
3369
- q.set(re, Oe);
3368
+ if (!be.length || W.get(re) === Oe) return;
3369
+ W.set(re, Oe);
3370
3370
  const je = be.map(encodeURIComponent).join(",");
3371
3371
  try {
3372
- const se = await (await fetch(H(le.data, je))).json();
3372
+ const se = await (await fetch(q(le.data, je))).json();
3373
3373
  o.value[re] = se?.data ?? se;
3374
3374
  } catch (E) {
3375
3375
  console.error("Failed to fetch column values", E);
@@ -3385,24 +3385,24 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3385
3385
  );
3386
3386
  const ae = L(""), J = L(!1);
3387
3387
  let K = "edit", B = 0;
3388
- const te = (z) => (z?.format || z?.type || "").toString().toLowerCase(), ne = h(() => t.colModel?.filter((z) => te(z) !== "slot") ?? []), xe = L({}), ke = L({}), Ge = (z) => typeof z != "string" ? !1 : !!l[z], ze = (z, le) => le ? le.split(".").reduce((re, he) => re == null ? re : re[he.trim()], z) : z, de = (z, le) => typeof z != "string" ? "" : z.replace(/{{\s*([^}]+)\s*}}/g, (re, he) => {
3388
+ const te = (H) => (H?.format || H?.type || "").toString().toLowerCase(), ne = h(() => t.colModel?.filter((H) => te(H) !== "slot") ?? []), xe = L({}), ke = L({}), Ge = (H) => typeof H != "string" ? !1 : !!l[H], ze = (H, le) => le ? le.split(".").reduce((re, he) => re == null ? re : re[he.trim()], H) : H, de = (H, le) => typeof H != "string" ? "" : H.replace(/{{\s*([^}]+)\s*}}/g, (re, he) => {
3389
3389
  const be = ze(le, he.trim());
3390
3390
  return be ?? "";
3391
- }), ve = (z) => {
3392
- if (z == null || z === "") return "";
3393
- if (typeof z == "number") return z;
3394
- if (typeof z == "boolean") return z ? 1 : 0;
3395
- if (typeof z == "string") return z.toLowerCase();
3396
- if (Array.isArray(z))
3397
- return z.map((le) => ve(le)).join(", ");
3398
- if (typeof z == "object") {
3399
- if (z.text !== void 0) return String(z.text).toLowerCase();
3400
- if (z.label !== void 0) return String(z.label).toLowerCase();
3401
- if (z.id !== void 0) return String(z.id).toLowerCase();
3402
- }
3403
- return String(z).toLowerCase();
3404
- }, Le = (z) => {
3405
- const le = z.key || z.name;
3391
+ }), ve = (H) => {
3392
+ if (H == null || H === "") return "";
3393
+ if (typeof H == "number") return H;
3394
+ if (typeof H == "boolean") return H ? 1 : 0;
3395
+ if (typeof H == "string") return H.toLowerCase();
3396
+ if (Array.isArray(H))
3397
+ return H.map((le) => ve(le)).join(", ");
3398
+ if (typeof H == "object") {
3399
+ if (H.text !== void 0) return String(H.text).toLowerCase();
3400
+ if (H.label !== void 0) return String(H.label).toLowerCase();
3401
+ if (H.id !== void 0) return String(H.id).toLowerCase();
3402
+ }
3403
+ return String(H).toLowerCase();
3404
+ }, Le = (H) => {
3405
+ const le = H.key || H.name;
3406
3406
  if (le) {
3407
3407
  if (p.value === le) {
3408
3408
  v.value = v.value === "asc" ? "desc" : "asc";
@@ -3414,16 +3414,16 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3414
3414
  async function we() {
3415
3415
  ae.value = "Додати", J.value = !0, K = "add", xe.value = {};
3416
3416
  }
3417
- function _e(z, le) {
3418
- if (!z?.length) return null;
3417
+ function _e(H, le) {
3418
+ if (!H?.length) return null;
3419
3419
  const re = typeof le == "object" ? le?.id : le;
3420
- return re == null || re === "" ? null : z.find((he) => he?.id?.toString() === re.toString())?.text ?? null;
3420
+ return re == null || re === "" ? null : H.find((he) => he?.id?.toString() === re.toString())?.text ?? null;
3421
3421
  }
3422
- function Be(z) {
3423
- return z == null || z === "" ? "-" : Array.isArray(z) ? z.map((le) => typeof le == "object" ? le?.text ?? le?.id ?? "-" : le).join(", ") : typeof z == "object" ? z?.text ?? z?.id ?? "-" : z;
3422
+ function Be(H) {
3423
+ return H == null || H === "" ? "-" : Array.isArray(H) ? H.map((le) => typeof le == "object" ? le?.text ?? le?.id ?? "-" : le).join(", ") : typeof H == "object" ? H?.text ?? H?.id ?? "-" : H;
3424
3424
  }
3425
- function He(z, le) {
3426
- const re = le.key || le.name, he = z?.[re], be = o.value[re];
3425
+ function He(H, le) {
3426
+ const re = le.key || le.name, he = H?.[re], be = o.value[re];
3427
3427
  if (!he) return "-";
3428
3428
  if (Array.isArray(he)) {
3429
3429
  const je = he.map((E) => _e(be, E)).filter(Boolean);
@@ -3432,28 +3432,28 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3432
3432
  const Oe = _e(be, he);
3433
3433
  return Oe || Be(he);
3434
3434
  }
3435
- async function at(z, le) {
3436
- ae.value = "Редагувати", J.value = !0, K = "edit", B = le, xe.value = { ...z };
3435
+ async function at(H, le) {
3436
+ ae.value = "Редагувати", J.value = !0, K = "edit", B = le, xe.value = { ...H };
3437
3437
  }
3438
3438
  function yt() {
3439
- const z = ke.value.validate();
3440
- if (z) {
3441
- Ce({ type: "warning", title: "Помилка валідації", message: Object.entries(z).map(([le, re]) => `${le}: ${re}`).join(`
3439
+ const H = ke.value.validate();
3440
+ if (H) {
3441
+ Ce({ type: "warning", title: "Помилка валідації", message: Object.entries(H).map(([le, re]) => `${le}: ${re}`).join(`
3442
3442
  `) });
3443
3443
  return;
3444
3444
  }
3445
3445
  K === "add" ? Array.isArray(s.value) ? s.value = [...s.value, xe.value] : s.value = [xe.value] : s.value = s.value.map((le, re) => re === B ? xe.value : le), J.value = !1;
3446
3446
  }
3447
- function st(z) {
3448
- s.value = s.value.filter((le, re) => re !== z);
3447
+ function st(H) {
3448
+ s.value = s.value.filter((le, re) => re !== H);
3449
3449
  }
3450
3450
  function Ie() {
3451
3451
  J.value = !1;
3452
3452
  }
3453
- return (z, le) => (i(), f("div", ki, [
3453
+ return (H, le) => (i(), f("div", ki, [
3454
3454
  r.value ? (i(), f("div", $i, [
3455
3455
  n("search") ? (i(), f("div", Ci, [
3456
- Y(R(tn), { class: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" }),
3456
+ Y(P(tn), { class: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" }),
3457
3457
  Se(c("input", {
3458
3458
  type: "text",
3459
3459
  "onUpdate:modelValue": le[0] || (le[0] = (re) => d.value = re),
@@ -3479,16 +3479,16 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3479
3479
  onClick: M,
3480
3480
  class: "inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"
3481
3481
  }, [
3482
- Y(R(Un), { class: "h-4 w-4 text-gray-700" }),
3482
+ Y(P(Un), { class: "h-4 w-4 text-gray-700" }),
3483
3483
  le[4] || (le[4] = Ue(" Імпорт ", -1))
3484
3484
  ])) : U("", !0),
3485
3485
  n("export") ? (i(), f("button", {
3486
3486
  key: 2,
3487
3487
  type: "button",
3488
- onClick: P,
3488
+ onClick: R,
3489
3489
  class: "inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"
3490
3490
  }, [
3491
- Y(R(en), { class: "h-4 w-4 text-gray-700" }),
3491
+ Y(P(en), { class: "h-4 w-4 text-gray-700" }),
3492
3492
  le[5] || (le[5] = Ue(" Експорт ", -1))
3493
3493
  ])) : U("", !0),
3494
3494
  n("add") ? (i(), f("button", {
@@ -3497,7 +3497,7 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3497
3497
  type: "button",
3498
3498
  class: "inline-flex items-center gap-2 rounded-md bg-blue-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-600 transition-colors"
3499
3499
  }, [
3500
- Y(R(wt), { class: "h-4 w-4 text-white" }),
3500
+ Y(P(wt), { class: "h-4 w-4 text-white" }),
3501
3501
  le[6] || (le[6] = Ue(" Додати ", -1))
3502
3502
  ])) : U("", !0)
3503
3503
  ])
@@ -3507,7 +3507,7 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3507
3507
  c("thead", Mi, [
3508
3508
  c("tr", Li, [
3509
3509
  c("th", Di, [
3510
- Y(R(Xt), { class: "mx-auto h-4 w-4 text-gray-400" })
3510
+ Y(P(Xt), { class: "mx-auto h-4 w-4 text-gray-400" })
3511
3511
  ]),
3512
3512
  (i(!0), f($e, null, De(_.value, (re) => (i(), f("th", {
3513
3513
  key: re.key,
@@ -3551,8 +3551,8 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3551
3551
  onDrop: (be) => b(he)
3552
3552
  }, [
3553
3553
  c("td", Oi, [
3554
- c("div", Ri, [
3555
- Y(R(Xt), { class: "mx-auto h-4 w-4 text-slate-400 dark:text-slate-500" })
3554
+ c("div", Pi, [
3555
+ Y(P(Xt), { class: "mx-auto h-4 w-4 text-slate-400 dark:text-slate-500" })
3556
3556
  ])
3557
3557
  ]),
3558
3558
  (i(!0), f($e, null, De(_.value, (be) => (i(), f("td", {
@@ -3560,7 +3560,7 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3560
3560
  class: "px-4 py-3 align-middle"
3561
3561
  }, [
3562
3562
  te(be) === "slot" ? (i(), f($e, { key: 0 }, [
3563
- Ge(be.slot) ? Qe(z.$slots, be.slot, {
3563
+ Ge(be.slot) ? Qe(H.$slots, be.slot, {
3564
3564
  key: 0,
3565
3565
  row: re,
3566
3566
  value: re[be.key],
@@ -3569,10 +3569,10 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3569
3569
  key: 1,
3570
3570
  class: "text-sm text-gray-900",
3571
3571
  innerHTML: de(be.slot, re)
3572
- }, null, 8, Pi))
3572
+ }, null, 8, Ri))
3573
3573
  ], 64)) : (i(), f($e, { key: 1 }, [
3574
3574
  te(be) === "file" ? (i(), f("div", Ni, [
3575
- w(He(re, be)) ? (i(), f("div", ji, [
3575
+ k(He(re, be)) ? (i(), f("div", ji, [
3576
3576
  c("img", {
3577
3577
  src: He(re, be),
3578
3578
  alt: "alt",
@@ -3580,7 +3580,7 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3580
3580
  class: "rounded-md max-w-[45px] h-[45px] object-cover"
3581
3581
  }, null, 8, Ui)
3582
3582
  ])) : (i(), f("div", zi, [
3583
- Y(R(Dl), { class: "h-4 w-4 min-w-4" })
3583
+ Y(P(Dl), { class: "h-4 w-4 min-w-4" })
3584
3584
  ]))
3585
3585
  ])) : te(be) === "color" ? (i(), f("div", Hi, [
3586
3586
  c("span", {
@@ -3596,13 +3596,13 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3596
3596
  onClick: (be) => at(re, he),
3597
3597
  class: "p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded transition-colors"
3598
3598
  }, [
3599
- Y(R(Oa), { class: "h-4 w-4" })
3599
+ Y(P(Oa), { class: "h-4 w-4" })
3600
3600
  ], 8, Gi),
3601
3601
  c("button", {
3602
3602
  onClick: (be) => st(he),
3603
3603
  class: "p-1.5 text-gray-600 hover:text-red-600 hover:bg-red-50 rounded transition-colors"
3604
3604
  }, [
3605
- Y(R(Wt), { class: "h-4 w-4" })
3605
+ Y(P(Wt), { class: "h-4 w-4" })
3606
3606
  ], 8, Yi)
3607
3607
  ])
3608
3608
  ])
@@ -3610,7 +3610,7 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3610
3610
  ], 2)
3611
3611
  ])
3612
3612
  ]),
3613
- Y(R(ln), {
3613
+ Y(P(ln), {
3614
3614
  visible: J.value,
3615
3615
  title: ae.value,
3616
3616
  size: "lg",
@@ -3618,7 +3618,7 @@ const wi = /* @__PURE__ */ Ne(hi, [["render", xi]]), ki = { class: "bg-white rou
3618
3618
  teleport: "#modal"
3619
3619
  }, {
3620
3620
  default: tt(() => [
3621
- Y(Ot, {
3621
+ Y(Pt, {
3622
3622
  schema: ne.value,
3623
3623
  values: xe.value,
3624
3624
  "onUpdate:values": le[1] || (le[1] = (re) => xe.value = re),
@@ -3962,12 +3962,12 @@ const ku = ["title"], $u = {
3962
3962
  pointerEvents: "none",
3963
3963
  zIndex: "9999"
3964
3964
  }), document.body.appendChild(N);
3965
- const Pe = F.getBoundingClientRect();
3966
- N.style.left = `${Pe.right + window.scrollX + ie}px`, N.style.top = `${Pe.top + window.scrollY + (Pe.height - N.offsetHeight) / 2}px`;
3967
- }, Re = () => {
3965
+ const Re = F.getBoundingClientRect();
3966
+ N.style.left = `${Re.right + window.scrollX + ie}px`, N.style.top = `${Re.top + window.scrollY + (Re.height - N.offsetHeight) / 2}px`;
3967
+ }, Pe = () => {
3968
3968
  N?.parentNode && N.parentNode.removeChild(N), N = null;
3969
3969
  };
3970
- F.addEventListener("mouseenter", Me), F.addEventListener("mouseleave", Re), Object.assign(F, { tooltipRightHandlers: { show: Me, hide: Re } });
3970
+ F.addEventListener("mouseenter", Me), F.addEventListener("mouseleave", Pe), Object.assign(F, { tooltipRightHandlers: { show: Me, hide: Pe } });
3971
3971
  },
3972
3972
  unmounted(F) {
3973
3973
  if (typeof document > "u") return;
@@ -4002,11 +4002,11 @@ const ku = ["title"], $u = {
4002
4002
  pe($, (F) => {
4003
4003
  F.includes(C.value) || (C.value = F[0]);
4004
4004
  });
4005
- const y = L(""), g = L(!1), x = L(null), V = L(null), b = L(null), M = L(null), w = L([]), T = L(null), P = L(!1), I = L([]), q = h(
4006
- () => (C.value === "address" || C.value === "nominatim") && P.value
4007
- ), H = h(() => n.config?.addressDebounceMs ?? 1e3);
4005
+ const y = L(""), g = L(!1), x = L(null), V = L(null), b = L(null), M = L(null), k = L([]), T = L(null), R = L(!1), I = L([]), W = h(
4006
+ () => (C.value === "address" || C.value === "nominatim") && R.value
4007
+ ), q = h(() => n.config?.addressDebounceMs ?? 1e3);
4008
4008
  let X = null;
4009
- const Z = L(!1), ue = h(() => y.value.trim().length > 0 ? w.value : I.value), ae = h(() => y.value.trim().length ? `Знайдено ${w.value.length}` : "Історія пошуку"), J = h(() => y.value.trim().length ? "Нічого не знайдено" : "Історія порожня");
4009
+ const Z = L(!1), ue = h(() => y.value.trim().length > 0 ? k.value : I.value), ae = h(() => y.value.trim().length ? `Знайдено ${k.value.length}` : "Історія пошуку"), J = h(() => y.value.trim().length ? "Нічого не знайдено" : "Історія порожня");
4010
4010
  function K() {
4011
4011
  if (typeof window > "u") return [];
4012
4012
  try {
@@ -4038,32 +4038,32 @@ const ku = ["title"], $u = {
4038
4038
  ne.left = `${ie}px`, ne.top = `${Me}px`, ne.width = `${N}px`, ne.display = "block";
4039
4039
  }
4040
4040
  const ke = () => {
4041
- q.value && xe();
4041
+ W.value && xe();
4042
4042
  };
4043
4043
  function Ge() {
4044
4044
  X && (clearTimeout(X), X = null);
4045
4045
  }
4046
4046
  pe(C, () => {
4047
- y.value = "", g.value = !1, w.value = [], P.value = !1, Ge(), Z.value = !1;
4048
- }), pe(q, (F) => {
4047
+ y.value = "", g.value = !1, k.value = [], R.value = !1, Ge(), Z.value = !1;
4048
+ }), pe(W, (F) => {
4049
4049
  F ? Je(() => {
4050
4050
  xe();
4051
4051
  }) : ne.display = "none";
4052
4052
  }), pe(y, (F) => {
4053
4053
  if (C.value !== "address" && C.value !== "nominatim") {
4054
- w.value = [], Ge();
4054
+ k.value = [], Ge();
4055
4055
  return;
4056
4056
  }
4057
4057
  if (!F.trim()) {
4058
- w.value = [], P.value = I.value.length > 0, Ge();
4058
+ k.value = [], R.value = I.value.length > 0, Ge();
4059
4059
  return;
4060
4060
  }
4061
- Ge(), P.value = !0, X = window.setTimeout(() => {
4061
+ Ge(), R.value = !0, X = window.setTimeout(() => {
4062
4062
  Oe(F).catch((j) => {
4063
4063
  const N = j?.message || "Помилка пошуку адреси";
4064
4064
  Ce({ type: "error", title: "Пошук адреси", message: N });
4065
4065
  });
4066
- }, H.value);
4066
+ }, q.value);
4067
4067
  });
4068
4068
  function ze(F) {
4069
4069
  const j = [];
@@ -4080,7 +4080,7 @@ const ku = ["title"], $u = {
4080
4080
  ze(j?.target), C.value = F;
4081
4081
  }
4082
4082
  function Le() {
4083
- y.value = "", w.value = [], P.value = !1, Z.value = !1;
4083
+ y.value = "", k.value = [], R.value = !1, Z.value = !1;
4084
4084
  }
4085
4085
  function we(F) {
4086
4086
  const j = F.target;
@@ -4088,9 +4088,9 @@ const ku = ["title"], $u = {
4088
4088
  const N = x.value;
4089
4089
  N && !N.contains(j) && (ze(j), g.value = !1);
4090
4090
  }
4091
- if (q.value) {
4091
+ if (W.value) {
4092
4092
  const N = T.value, ie = M.value;
4093
- N && !N.contains(j) && (!ie || !ie.contains(j)) && (P.value = !1);
4093
+ N && !N.contains(j) && (!ie || !ie.contains(j)) && (R.value = !1);
4094
4094
  }
4095
4095
  }
4096
4096
  Xe(() => {
@@ -4127,14 +4127,14 @@ const ku = ["title"], $u = {
4127
4127
  if (ie.length < 2) return null;
4128
4128
  const Me = ie.slice(0, 2).map(Number);
4129
4129
  if (!Me.every((ct) => Number.isFinite(ct))) return null;
4130
- let [Re, qe] = Me, Pe = Re, it = qe;
4130
+ let [Pe, qe] = Me, Re = Pe, it = qe;
4131
4131
  const Tt = (ct) => Math.abs(ct) <= 90, Et = (ct) => Math.abs(ct) <= 180;
4132
- if (!Tt(Pe) || !Et(it))
4133
- if (Tt(it) && Et(Pe))
4134
- Pe = qe, it = Re;
4132
+ if (!Tt(Re) || !Et(it))
4133
+ if (Tt(it) && Et(Re))
4134
+ Re = qe, it = Pe;
4135
4135
  else
4136
4136
  return null;
4137
- return { lat: Pe, lng: it };
4137
+ return { lat: Re, lng: it };
4138
4138
  }
4139
4139
  function at(F) {
4140
4140
  const j = F?.result || F?.data || F;
@@ -4153,10 +4153,10 @@ const ku = ["title"], $u = {
4153
4153
  }
4154
4154
  function yt(F) {
4155
4155
  return (Array.isArray(F?.features) ? F.features : []).map((N, ie) => {
4156
- const Me = N?.geometry?.coordinates, Re = Number(Me?.[0]), qe = Number(Me?.[1]);
4157
- if (!Number.isFinite(qe) || !Number.isFinite(Re)) return null;
4158
- const Pe = N?.properties || {}, it = Pe?.geocoding?.label || Pe?.display_name || Pe?.label || "Адреса";
4159
- return { id: String(Pe?.geocoding?.place_id || Pe?.place_id || ie), title: it, lat: qe, lng: Re };
4156
+ const Me = N?.geometry?.coordinates, Pe = Number(Me?.[0]), qe = Number(Me?.[1]);
4157
+ if (!Number.isFinite(qe) || !Number.isFinite(Pe)) return null;
4158
+ const Re = N?.properties || {}, it = Re?.geocoding?.label || Re?.display_name || Re?.label || "Адреса";
4159
+ return { id: String(Re?.geocoding?.place_id || Re?.place_id || ie), title: it, lat: qe, lng: Pe };
4160
4160
  }).filter((N) => !!N);
4161
4161
  }
4162
4162
  function st(F) {
@@ -4166,23 +4166,23 @@ const ku = ["title"], $u = {
4166
4166
  const j = Number(F);
4167
4167
  return Number.isFinite(j) ? j : null;
4168
4168
  }
4169
- function z(F) {
4169
+ function H(F) {
4170
4170
  const j = Ie(F.lng) ?? Ie(F.lon) ?? Ie(F.longitude) ?? Ie(F.x), N = Ie(F.lat) ?? Ie(F.latitude) ?? Ie(F.y);
4171
4171
  if (j != null && N != null)
4172
4172
  return { lat: N, lng: j };
4173
4173
  const ie = F?.geometry?.coordinates ?? F?.geom_centroid?.coordinates ?? F?.centroid?.coordinates ?? F?.geojson?.geometry?.coordinates ?? F?.geom?.coordinates;
4174
4174
  if (Array.isArray(ie) && ie.length >= 2) {
4175
- const Me = Ie(ie[0]), Re = Ie(ie[1]);
4176
- if (Me != null && Re != null) return { lat: Re, lng: Me };
4175
+ const Me = Ie(ie[0]), Pe = Ie(ie[1]);
4176
+ if (Me != null && Pe != null) return { lat: Pe, lng: Me };
4177
4177
  }
4178
4178
  return null;
4179
4179
  }
4180
4180
  function le(F) {
4181
4181
  return (Array.isArray(F?.data) ? F.data : []).map((N, ie) => {
4182
- const Me = z(N), Re = String(
4182
+ const Me = H(N), Pe = String(
4183
4183
  N.text ?? N.title ?? N.label ?? N.name ?? N.address ?? N.display_name ?? N.id ?? "Адреса"
4184
4184
  ), qe = String(N.id ?? N.code ?? N.value ?? ie);
4185
- return Me ? { id: qe, title: Re, ...Me } : { id: qe, title: Re };
4185
+ return Me ? { id: qe, title: Pe, ...Me } : { id: qe, title: Pe };
4186
4186
  }).filter((N) => !!N?.title);
4187
4187
  }
4188
4188
  function re(F) {
@@ -4216,7 +4216,7 @@ const ku = ["title"], $u = {
4216
4216
  return yt(Me);
4217
4217
  }
4218
4218
  async function Oe(F) {
4219
- if (w.value = [], Ge(), C.value === "address") {
4219
+ if (k.value = [], Ge(), C.value === "address") {
4220
4220
  if (!d()) {
4221
4221
  Ce({ type: "warning", title: "Пошук адреси", message: "Не налаштовано addressSuggest" });
4222
4222
  return;
@@ -4226,7 +4226,7 @@ const ku = ["title"], $u = {
4226
4226
  Ce({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
4227
4227
  return;
4228
4228
  }
4229
- w.value = ie;
4229
+ k.value = ie;
4230
4230
  return;
4231
4231
  }
4232
4232
  const j = await be(F);
@@ -4234,7 +4234,7 @@ const ku = ["title"], $u = {
4234
4234
  Ce({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
4235
4235
  return;
4236
4236
  }
4237
- w.value = j;
4237
+ k.value = j;
4238
4238
  }
4239
4239
  async function je(F) {
4240
4240
  if (st(F)) {
@@ -4254,7 +4254,7 @@ const ku = ["title"], $u = {
4254
4254
  }
4255
4255
  }
4256
4256
  function E() {
4257
- C.value !== "address" && C.value !== "nominatim" || !y.value.trim().length && !I.value.length || (P.value = !0, Je(() => {
4257
+ C.value !== "address" && C.value !== "nominatim" || !y.value.trim().length && !I.value.length || (R.value = !0, Je(() => {
4258
4258
  xe();
4259
4259
  }));
4260
4260
  }
@@ -4262,7 +4262,7 @@ const ku = ["title"], $u = {
4262
4262
  const N = F.replace(/\s+/g, "").split(":");
4263
4263
  if (N.length !== 4) return !1;
4264
4264
  const ie = [10, 2, 3, 4];
4265
- return N.every((Me, Re) => Me.length === ie[Re] && /^\d+$/.test(Me));
4265
+ return N.every((Me, Pe) => Me.length === ie[Pe] && /^\d+$/.test(Me));
4266
4266
  }
4267
4267
  function A(F) {
4268
4268
  a("goToCoordinates", [F.lat, F.lng]), Z.value = !0;
@@ -4305,8 +4305,8 @@ const ku = ["title"], $u = {
4305
4305
  if (!Me.length)
4306
4306
  Ce({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
4307
4307
  else {
4308
- const Re = Me[0];
4309
- A(Re);
4308
+ const Pe = Me[0];
4309
+ A(Pe);
4310
4310
  }
4311
4311
  } catch (j) {
4312
4312
  const N = j?.message || "Помилка пошуку";
@@ -4443,7 +4443,7 @@ const ku = ["title"], $u = {
4443
4443
  ])
4444
4444
  ], -1))
4445
4445
  ]),
4446
- q.value ? (i(), ye(el, {
4446
+ W.value ? (i(), ye(el, {
4447
4447
  key: 2,
4448
4448
  to: "body"
4449
4449
  }, [
@@ -4459,7 +4459,7 @@ const ku = ["title"], $u = {
4459
4459
  type: "button",
4460
4460
  class: "text-gray-400 hover:text-gray-600",
4461
4461
  "aria-label": "Закрити",
4462
- onClick: j[2] || (j[2] = (N) => P.value = !1)
4462
+ onClick: j[2] || (j[2] = (N) => R.value = !1)
4463
4463
  }, " ✕ ")
4464
4464
  ]),
4465
4465
  c("div", Lu, [
@@ -4477,7 +4477,7 @@ const ku = ["title"], $u = {
4477
4477
  ], 32)
4478
4478
  ], 512));
4479
4479
  }
4480
- }), Ou = /* @__PURE__ */ Ne(Bu, [["__scopeId", "data-v-f64a89a8"]]), Ru = { class: "pt-1 border-t border-gray-100" }, Pu = { class: "space-y-1" }, Nu = /* @__PURE__ */ ce({
4480
+ }), Ou = /* @__PURE__ */ Ne(Bu, [["__scopeId", "data-v-f64a89a8"]]), Pu = { class: "pt-1 border-t border-gray-100" }, Ru = { class: "space-y-1" }, Nu = /* @__PURE__ */ ce({
4481
4481
  __name: "AddCoordinates",
4482
4482
  emits: ["submit", "cancel"],
4483
4483
  setup(e, { emit: t }) {
@@ -4489,9 +4489,9 @@ const ku = ["title"], $u = {
4489
4489
  }, o = () => {
4490
4490
  n.value = null, a.value = null, l("cancel");
4491
4491
  };
4492
- return (d, p) => (i(), f("div", Ru, [
4492
+ return (d, p) => (i(), f("div", Pu, [
4493
4493
  p[2] || (p[2] = c("p", { class: "text-xs text-gray-600 mb-1" }, "Додати точку за координатами:", -1)),
4494
- c("div", Pu, [
4494
+ c("div", Ru, [
4495
4495
  Se(c("input", {
4496
4496
  "onUpdate:modelValue": p[0] || (p[0] = (v) => n.value = v),
4497
4497
  type: "number",
@@ -4543,7 +4543,7 @@ const ku = ["title"], $u = {
4543
4543
  class: "flex-1 px-2 py-1.5 bg-blue-500 hover:bg-blue-600 text-white text-xs font-medium rounded transition-colors duration-150 flex items-center justify-center gap-1",
4544
4544
  onClick: l[0] || (l[0] = (n) => t.$emit("click"))
4545
4545
  }, [
4546
- Y(R(wt), {
4546
+ Y(P(wt), {
4547
4547
  size: 12,
4548
4548
  "stroke-width": 2
4549
4549
  }),
@@ -4558,7 +4558,7 @@ const ku = ["title"], $u = {
4558
4558
  class: "w-full px-2 py-1.5 bg-rose-500 hover:bg-rose-600 text-white text-xs font-medium rounded transition-colors duration-150 flex items-center justify-center gap-1",
4559
4559
  onClick: l[0] || (l[0] = (n) => t.$emit("click"))
4560
4560
  }, [
4561
- Y(R(Wt), {
4561
+ Y(P(Wt), {
4562
4562
  size: 12,
4563
4563
  "stroke-width": 2
4564
4564
  }),
@@ -4573,7 +4573,7 @@ const ku = ["title"], $u = {
4573
4573
  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",
4574
4574
  onClick: l[0] || (l[0] = (n) => t.$emit("click"))
4575
4575
  }, [
4576
- Y(R(Ra), {
4576
+ Y(P(Pa), {
4577
4577
  size: 12,
4578
4578
  "stroke-width": 2
4579
4579
  }),
@@ -4626,7 +4626,7 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4626
4626
  n("delete", l.id);
4627
4627
  };
4628
4628
  return (_, C) => (i(), f("div", qu, [
4629
- Y(R(zn), {
4629
+ Y(P(zn), {
4630
4630
  size: 12,
4631
4631
  "stroke-width": 2,
4632
4632
  class: "text-gray-400 flex-shrink-0"
@@ -4731,10 +4731,10 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4731
4731
  ], r = () => {
4732
4732
  l.value = !l.value;
4733
4733
  }, s = (y, g) => {
4734
- const x = (H) => H * Math.PI / 180, V = x(g.lat - y.lat), b = x(g.lng - y.lng), M = x(y.lat), w = x(g.lat), T = Math.sin(V / 2), P = Math.sin(b / 2);
4734
+ const x = (q) => q * Math.PI / 180, V = x(g.lat - y.lat), b = x(g.lng - y.lng), M = x(y.lat), k = x(g.lat), T = Math.sin(V / 2), R = Math.sin(b / 2);
4735
4735
  return 6371e3 * (2 * Math.asin(
4736
4736
  Math.sqrt(
4737
- T * T + Math.cos(M) * Math.cos(w) * P * P
4737
+ T * T + Math.cos(M) * Math.cos(k) * R * R
4738
4738
  )
4739
4739
  ));
4740
4740
  }, o = h(() => {
@@ -4749,14 +4749,14 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4749
4749
  }), d = h(() => o.value >= 1e3 ? `${Ut(o.value / 1e3)} км` : `${Ut(o.value)} м`);
4750
4750
  function p(y) {
4751
4751
  if (y.length < 3) return 0;
4752
- const g = y[0].lat, x = y[0].lng, V = (M, w) => {
4752
+ const g = y[0].lat, x = y[0].lng, V = (M, k) => {
4753
4753
  const T = (M - g) * 110574;
4754
- return { x: (w - x) * 111320 * Math.cos(g * Math.PI / 180), y: T };
4754
+ return { x: (k - x) * 111320 * Math.cos(g * Math.PI / 180), y: T };
4755
4755
  };
4756
4756
  let b = 0;
4757
4757
  for (let M = 0; M < y.length; M++) {
4758
- const w = (M + 1) % y.length, T = V(y[M].lat, y[M].lng), P = V(y[w].lat, y[w].lng);
4759
- b += T.x * P.y - T.y * P.x;
4758
+ const k = (M + 1) % y.length, T = V(y[M].lat, y[M].lng), R = V(y[k].lat, y[k].lng);
4759
+ b += T.x * R.y - T.y * R.x;
4760
4760
  }
4761
4761
  return Math.abs(b) * 0.5;
4762
4762
  }
@@ -4789,7 +4789,7 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4789
4789
  ), (y, g) => (i(), f("div", Yu, [
4790
4790
  c("button", Zu, [
4791
4791
  c("span", Ju, [
4792
- Y(R(Ht), {
4792
+ Y(P(Ht), {
4793
4793
  size: 12,
4794
4794
  "stroke-width": 2.5
4795
4795
  })
@@ -4800,7 +4800,7 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4800
4800
  c("div", Qu, [
4801
4801
  c("button", ed, [
4802
4802
  c("span", td, [
4803
- Y(R(Ht), {
4803
+ Y(P(Ht), {
4804
4804
  size: 12,
4805
4805
  "stroke-width": 2.5
4806
4806
  })
@@ -4826,7 +4826,7 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4826
4826
  ]),
4827
4827
  c("div", sd, [
4828
4828
  c("span", id, [
4829
- Y(R(Ht), {
4829
+ Y(P(Ht), {
4830
4830
  size: 12,
4831
4831
  "stroke-width": 2.5
4832
4832
  })
@@ -4855,7 +4855,7 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4855
4855
  setup(e) {
4856
4856
  return (t, l) => (i(), f("div", fd, [
4857
4857
  c("div", md, [
4858
- Y(R(Ht), {
4858
+ Y(P(Ht), {
4859
4859
  size: 16,
4860
4860
  "stroke-width": 2,
4861
4861
  class: "text-blue-600 flex-shrink-0 mt-0.5"
@@ -4967,17 +4967,17 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4967
4967
  a.value = [], o.value && (o.value = !1, n("shape-closed-change", !1)), C();
4968
4968
  }, M = (X) => {
4969
4969
  x(X);
4970
- }, w = (X) => {
4970
+ }, k = (X) => {
4971
4971
  V(X);
4972
4972
  }, T = () => {
4973
4973
  s.value = !0, n("add-request");
4974
- }, P = (X) => {
4974
+ }, R = (X) => {
4975
4975
  g(X), s.value = !1;
4976
4976
  }, I = () => {
4977
4977
  s.value = !1;
4978
- }, q = () => {
4978
+ }, W = () => {
4979
4979
  v.value && (o.value = !0, n("complete"), n("shape-closed-change", !0));
4980
- }, H = () => {
4980
+ }, q = () => {
4981
4981
  b(), s.value = !1, n("close");
4982
4982
  };
4983
4983
  return t({
@@ -4988,7 +4988,7 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4988
4988
  c("div", kd, [
4989
4989
  c("div", $d, [
4990
4990
  c("div", Cd, [
4991
- Y(R(Hn), {
4991
+ Y(P(Hn), {
4992
4992
  size: 14,
4993
4993
  "stroke-width": 2,
4994
4994
  class: "text-white"
@@ -4999,9 +4999,9 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4999
4999
  c("button", {
5000
5000
  class: "w-5 h-5 flex items-center justify-center rounded hover:bg-white/20 transition-colors",
5001
5001
  "aria-label": "Закрити",
5002
- onClick: H
5002
+ onClick: q
5003
5003
  }, [
5004
- Y(R(kt), {
5004
+ Y(P(kt), {
5005
5005
  size: 14,
5006
5006
  "stroke-width": 2,
5007
5007
  class: "text-white"
@@ -5032,7 +5032,7 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5032
5032
  points: a.value,
5033
5033
  "is-shape-closed": o.value,
5034
5034
  onUpdatePoint: M,
5035
- onDeletePoint: w
5035
+ onDeletePoint: k
5036
5036
  }, null, 8, ["points", "is-shape-closed"])) : (i(), ye(pd, { key: 0 }))
5037
5037
  ], 64)) : (i(), f("div", Sd, [
5038
5038
  r.value ? (i(), ye(bd, {
@@ -5049,12 +5049,12 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5049
5049
  })),
5050
5050
  v.value ? (i(), ye(zu, {
5051
5051
  key: 1,
5052
- onClick: q
5052
+ onClick: W
5053
5053
  })) : U("", !0)
5054
5054
  ]),
5055
5055
  s.value ? (i(), ye(Nu, {
5056
5056
  key: 0,
5057
- onSubmit: P,
5057
+ onSubmit: R,
5058
5058
  onCancel: I
5059
5059
  })) : U("", !0),
5060
5060
  r.value ? (i(), ye(Uu, {
@@ -5075,10 +5075,10 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5075
5075
  },
5076
5076
  setup(e) {
5077
5077
  function t(y, g) {
5078
- const x = (P) => P * Math.PI / 180, V = x(g.lat - y.lat), b = x(g.lng - y.lng), M = x(y.lat), w = x(g.lat);
5078
+ const x = (R) => R * Math.PI / 180, V = x(g.lat - y.lat), b = x(g.lng - y.lng), M = x(y.lat), k = x(g.lat);
5079
5079
  return 6371e3 * (2 * Math.asin(
5080
5080
  Math.sqrt(
5081
- Math.sin(V / 2) ** 2 + Math.cos(M) * Math.cos(w) * Math.sin(b / 2) ** 2
5081
+ Math.sin(V / 2) ** 2 + Math.cos(M) * Math.cos(k) * Math.sin(b / 2) ** 2
5082
5082
  )
5083
5083
  ));
5084
5084
  }
@@ -5093,21 +5093,21 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5093
5093
  const V = x ?? "general", b = [];
5094
5094
  let M = 0;
5095
5095
  b.push(0);
5096
- for (let w = 1; w < y.length; w++)
5097
- M += t(y[w - 1].coords, y[w].coords), b.push(M);
5096
+ for (let k = 1; k < y.length; k++)
5097
+ M += t(y[k - 1].coords, y[k].coords), b.push(M);
5098
5098
  return g && y.length >= 2 && (M += t(y[y.length - 1].coords, y[0].coords)), {
5099
5099
  type: "FeatureCollection",
5100
- features: y.map((w, T) => {
5101
- const P = V === "general" ? T === 0 ? "0" : l(b[T]) : T === 0 ? "0" : l(
5100
+ features: y.map((k, T) => {
5101
+ const R = V === "general" ? T === 0 ? "0" : l(b[T]) : T === 0 ? "0" : l(
5102
5102
  t(y[T - 1].coords, y[T].coords)
5103
5103
  );
5104
5104
  return {
5105
5105
  type: "Feature",
5106
5106
  geometry: {
5107
5107
  type: "Point",
5108
- coordinates: [w.coords.lng, w.coords.lat]
5108
+ coordinates: [k.coords.lng, k.coords.lat]
5109
5109
  },
5110
- properties: { id: w.id, index: T + 1, label: P }
5110
+ properties: { id: k.id, index: T + 1, label: R }
5111
5111
  };
5112
5112
  })
5113
5113
  };
@@ -5118,14 +5118,14 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5118
5118
  for (let V = 0; V < y.length; V++) {
5119
5119
  const b = V === y.length - 1 && g ? 0 : V + 1;
5120
5120
  if (b >= y.length) break;
5121
- const M = y[V].coords, w = y[b].coords, T = t(M, w);
5121
+ const M = y[V].coords, k = y[b].coords, T = t(M, k);
5122
5122
  x.push({
5123
5123
  type: "Feature",
5124
5124
  geometry: {
5125
5125
  type: "LineString",
5126
5126
  coordinates: [
5127
5127
  [M.lng, M.lat],
5128
- [w.lng, w.lat]
5128
+ [k.lng, k.lat]
5129
5129
  ]
5130
5130
  },
5131
5131
  properties: { distance: l(T) }
@@ -5244,11 +5244,11 @@ const qu = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5244
5244
  }
5245
5245
  function _(y) {
5246
5246
  if (!y) return;
5247
- const g = y.getSource(dt), x = y.getSource(Dt), V = y.getSource(At), b = y.getSource(It), M = n.points, w = n.labelMode ?? "general";
5247
+ const g = y.getSource(dt), x = y.getSource(Dt), V = y.getSource(At), b = y.getSource(It), M = n.points, k = n.labelMode ?? "general";
5248
5248
  g && g.setData(
5249
- r(M, n.isShapeClosed, w)
5249
+ r(M, n.isShapeClosed, k)
5250
5250
  ), x && x.setData(o(M, n.isShapeClosed)), V && V.setData(d(M)), b && b.setData(
5251
- w === "topoint" ? s(M, n.isShapeClosed) : a()
5251
+ k === "topoint" ? s(M, n.isShapeClosed) : a()
5252
5252
  );
5253
5253
  }
5254
5254
  function C() {
@@ -5313,7 +5313,7 @@ const Fd = {
5313
5313
  }, Ed = { class: "flex items-center gap-1" }, Bd = ["disabled"], Od = {
5314
5314
  key: 0,
5315
5315
  class: "absolute z-[1600] mt-1 min-w-[120px] bg-white border border-gray-300 shadow-lg rounded-lg text-sm overflow-hidden"
5316
- }, Rd = ["disabled"], Pd = ["disabled"], Nd = { class: "mt-4 flex justify-end gap-2" }, jd = ["disabled"], Ud = { class: "absolute top-4 right-4 z-[1000]" }, zd = { class: "flex flex-col gap-[2px]" }, Hd = ["disabled"], qd = ["disabled"], Wd = ["disabled"], Kd = ["disabled"], Gd = { 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" }, Yd = { class: "space-y-0.5" }, Zd = { class: "text-gray-500" }, Jd = { class: "text-gray-900 text-right break-all" }, Xd = { class: "absolute left-4 bottom-[36px] z-[1000]" }, Qd = { class: "flex flex-col gap-2" }, ec = {
5316
+ }, Pd = ["disabled"], Rd = ["disabled"], Nd = { class: "mt-4 flex justify-end gap-2" }, jd = ["disabled"], Ud = { class: "absolute top-4 right-4 z-[1000]" }, zd = { class: "flex flex-col gap-[2px]" }, Hd = ["disabled"], qd = ["disabled"], Wd = ["disabled"], Kd = ["disabled"], Gd = { 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" }, Yd = { class: "space-y-0.5" }, Zd = { class: "text-gray-500" }, Jd = { class: "text-gray-900 text-right break-all" }, Xd = { class: "absolute left-4 bottom-[36px] z-[1000]" }, Qd = { class: "flex flex-col gap-2" }, ec = {
5317
5317
  key: 0,
5318
5318
  class: "bg-white/95 border border-gray-200 rounded-md shadow-sm px-3 py-2 text-xs text-gray-700 min-w-[200px]"
5319
5319
  }, tc = { class: "flex flex-col gap-1" }, lc = ["checked", "disabled", "onChange"], nc = { class: "text-gray-700 text-xs font-medium" }, ac = { 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" }, oc = {
@@ -5356,9 +5356,9 @@ const Fd = {
5356
5356
  },
5357
5357
  emits: ["update:modelValue", "valueSelected"],
5358
5358
  setup(e, { emit: t }) {
5359
- const l = e, n = t, a = Rn(), r = h(() => {
5360
- const u = a?.multiple, m = a?.multi, k = (S) => S === "" || S === !0 || S === "true" || S === 1 || S === "1";
5361
- return !!l.multi || !!l.multiple || k(m) || k(u);
5359
+ const l = e, n = t, a = Pn(), r = h(() => {
5360
+ const u = a?.multiple, m = a?.multi, w = (S) => S === "" || S === !0 || S === "true" || S === 1 || S === "1";
5361
+ return !!l.multi || !!l.multiple || w(m) || w(u);
5362
5362
  }), s = h(() => !!l.disabled), o = L(!1), d = L(null), p = L(0), v = L(""), $ = L(null), _ = L([]), C = L(null), y = L(null), g = Id({
5363
5363
  onActivate() {
5364
5364
  if (G)
@@ -5374,23 +5374,23 @@ const Fd = {
5374
5374
  function x() {
5375
5375
  g.toggleRuler();
5376
5376
  }
5377
- const V = jn(), b = V?.appContext?.config?.globalProperties?.$settings ?? {}, M = b?.map ?? {}, w = V?.vnode?.props ?? {};
5377
+ const V = jn(), b = V?.appContext?.config?.globalProperties?.$settings ?? {}, M = b?.map ?? {}, k = V?.vnode?.props ?? {};
5378
5378
  function T(u) {
5379
- return Object.prototype.hasOwnProperty.call(w, u) || Object.prototype.hasOwnProperty.call(
5380
- w,
5379
+ return Object.prototype.hasOwnProperty.call(k, u) || Object.prototype.hasOwnProperty.call(
5380
+ k,
5381
5381
  u.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)
5382
5382
  );
5383
5383
  }
5384
- const P = Array.isArray(M.center) && M.center.length === 2 ? M.center : Array.isArray(b.center) && b.center.length === 2 ? b.center : [30, 50], I = typeof M.zoom == "number" ? M.zoom : typeof b.zoom == "number" ? b.zoom : typeof b.defaultZoom == "number" ? b.defaultZoom : 10, q = h(
5384
+ const R = Array.isArray(M.center) && M.center.length === 2 ? M.center : Array.isArray(b.center) && b.center.length === 2 ? b.center : [30, 50], I = typeof M.zoom == "number" ? M.zoom : typeof b.zoom == "number" ? b.zoom : typeof b.defaultZoom == "number" ? b.defaultZoom : 10, W = h(
5385
5385
  () => T("center") ? l.center : M.center ?? l.center
5386
- ), H = h(
5386
+ ), q = h(
5387
5387
  () => T("zoom") ? l.zoom : M.zoom ?? l.zoom
5388
5388
  ), X = h(
5389
5389
  () => T("katottg") ? String(l.katottg ?? "") : String(M.katottg ?? l.katottg ?? "")
5390
5390
  ), Z = h(() => T("layers") ? l.layers ?? [] : M.layers ?? l.layers ?? []), ue = h(() => T("bounds") ? l.bounds : M.bounds ?? l.bounds), ae = L(
5391
- Array.isArray(q.value) && q.value.length === 2 ? [...q.value] : P
5391
+ Array.isArray(W.value) && W.value.length === 2 ? [...W.value] : R
5392
5392
  ), J = L(
5393
- typeof H.value == "number" ? H.value : I
5393
+ typeof q.value == "number" ? q.value : I
5394
5394
  ), K = L(l.modelValue), B = L(null), te = L(null), ne = L([]), xe = L(!1), ke = L(!1), Ge = L([]), ze = L({
5395
5395
  coordinates: "",
5396
5396
  format: "decimal",
@@ -5454,7 +5454,7 @@ const Fd = {
5454
5454
  polygon: !0,
5455
5455
  rectangle: !0
5456
5456
  };
5457
- const m = new Set(st.value.map((k) => k.toLowerCase()));
5457
+ const m = new Set(st.value.map((w) => w.toLowerCase()));
5458
5458
  return {
5459
5459
  search: m.has("search"),
5460
5460
  import: m.has("import"),
@@ -5466,27 +5466,27 @@ const Fd = {
5466
5466
  ruler: m.has("ruler")
5467
5467
  };
5468
5468
  });
5469
- function z(u) {
5469
+ function H(u) {
5470
5470
  if (typeof u != "string" || !u.trim()) return "";
5471
5471
  if (/^https?:\/\//i.test(u)) return u;
5472
- const m = window?.location?.origin ?? "", k = u.replace(/^\/+/, "");
5473
- return k ? m ? `${m}/${k}` : `/${k}` : m;
5472
+ const m = window?.location?.origin ?? "", w = u.replace(/^\/+/, "");
5473
+ return w ? m ? `${m}/${w}` : `/${w}` : m;
5474
5474
  }
5475
5475
  function le() {
5476
5476
  const u = Array.isArray(M.basemaps) && M.basemaps.length ? M.basemaps : b.basemaps;
5477
5477
  if (Array.isArray(u) && u.length) {
5478
- const k = u.map((S, D) => {
5479
- const W = String(S?.key ?? S?.id ?? S?.name ?? `b${D}`), fe = z(String(S?.url ?? ""));
5478
+ const w = u.map((S, D) => {
5479
+ const z = String(S?.key ?? S?.id ?? S?.name ?? `b${D}`), fe = H(String(S?.url ?? ""));
5480
5480
  if (!fe) return null;
5481
- const ge = typeof S?.preview == "string" && S.preview ? z(S.preview) : "";
5482
- return [W, { ...S, url: fe, preview: ge }];
5481
+ const ge = typeof S?.preview == "string" && S.preview ? H(S.preview) : "";
5482
+ return [z, { ...S, url: fe, preview: ge }];
5483
5483
  }).filter(
5484
5484
  (S) => Array.isArray(S) && S.length === 2
5485
5485
  ).reduce(
5486
- (S, [D, W]) => (S[D] = W, S),
5486
+ (S, [D, z]) => (S[D] = z, S),
5487
5487
  {}
5488
5488
  );
5489
- if (Object.keys(k).length) return k;
5489
+ if (Object.keys(w).length) return w;
5490
5490
  }
5491
5491
  return {
5492
5492
  voyager: {
@@ -5511,25 +5511,25 @@ const Fd = {
5511
5511
  if (typeof window > "u") return null;
5512
5512
  const u = window;
5513
5513
  if (u[wl]) return u[wl];
5514
- const m = (W) => {
5515
- if (Array.from(document.styleSheets).some((Ye) => Ye?.href?.includes(W))) return;
5514
+ const m = (z) => {
5515
+ if (Array.from(document.styleSheets).some((Ye) => Ye?.href?.includes(z))) return;
5516
5516
  const ge = document.createElement("link");
5517
- ge.rel = "stylesheet", ge.href = W, document.head.appendChild(ge);
5518
- }, k = async () => {
5519
- const W = new Function("u", "return import(u)"), fe = await W("https://esm.sh/maplibre-gl@3.6.2"), ge = fe?.default ?? fe;
5517
+ ge.rel = "stylesheet", ge.href = z, document.head.appendChild(ge);
5518
+ }, w = async () => {
5519
+ const z = new Function("u", "return import(u)"), fe = await z("https://esm.sh/maplibre-gl@3.6.2"), ge = fe?.default ?? fe;
5520
5520
  if (!ge) throw new Error("maplibre esm fallback failed");
5521
5521
  window.maplibregl = ge, window.mapboxgl = ge;
5522
- const Ye = await W("https://esm.sh/@mapbox/mapbox-gl-draw@1.5.0"), ut = Ye?.default ?? Ye;
5522
+ const Ye = await z("https://esm.sh/@mapbox/mapbox-gl-draw@1.5.0"), ut = Ye?.default ?? Ye;
5523
5523
  if (!ut) throw new Error("mapbox draw esm fallback failed");
5524
5524
  window.MapboxDraw = ut;
5525
5525
  }, D = (async () => {
5526
- m("https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css"), m("https://unpkg.com/@mapbox/mapbox-gl-draw@1.5.0/dist/mapbox-gl-draw.css"), (!window.maplibregl || !window.MapboxDraw) && await k();
5527
- const W = window.maplibregl, fe = window.MapboxDraw;
5528
- if (!W) throw new Error("maplibregl not available after load");
5526
+ m("https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css"), m("https://unpkg.com/@mapbox/mapbox-gl-draw@1.5.0/dist/mapbox-gl-draw.css"), (!window.maplibregl || !window.MapboxDraw) && await w();
5527
+ const z = window.maplibregl, fe = window.MapboxDraw;
5528
+ if (!z) throw new Error("maplibregl not available after load");
5529
5529
  if (!fe) throw new Error("MapboxDraw not available after load");
5530
- return { maplibregl: W, MapboxDraw: fe };
5531
- })().catch((W) => {
5532
- throw delete u[wl], W;
5530
+ return { maplibregl: z, MapboxDraw: fe };
5531
+ })().catch((z) => {
5532
+ throw delete u[wl], z;
5533
5533
  });
5534
5534
  return u[wl] = D, D;
5535
5535
  }
@@ -5552,7 +5552,7 @@ const Fd = {
5552
5552
  ]
5553
5553
  };
5554
5554
  }
5555
- let E = null, se = null, A = null, G = null, F = [], j = null, N = null, ie = null, Me = !1, Re = !1, qe = !1, Pe = null;
5555
+ let E = null, se = null, A = null, G = null, F = [], j = null, N = null, ie = null, Me = !1, Pe = !1, qe = !1, Re = null;
5556
5556
  function it() {
5557
5557
  return {
5558
5558
  onSetup() {
@@ -5580,14 +5580,14 @@ const Fd = {
5580
5580
  },
5581
5581
  onMouseMove(u, m) {
5582
5582
  if (!u.startPoint) return;
5583
- const [k, S] = u.startPoint, D = m.lngLat.lng, W = m.lngLat.lat;
5583
+ const [w, S] = u.startPoint, D = m.lngLat.lng, z = m.lngLat.lat;
5584
5584
  u.rectangle.setCoordinates([
5585
5585
  [
5586
- [k, S],
5586
+ [w, S],
5587
5587
  [D, S],
5588
- [D, W],
5589
- [k, W],
5590
- [k, S]
5588
+ [D, z],
5589
+ [w, z],
5590
+ [w, S]
5591
5591
  ]
5592
5592
  ]);
5593
5593
  },
@@ -5604,14 +5604,14 @@ const Fd = {
5604
5604
  ]);
5605
5605
  return;
5606
5606
  }
5607
- const [k, S] = u.startPoint, D = m.lngLat.lng, W = m.lngLat.lat;
5608
- return Math.abs(k - D) > 0 && Math.abs(S - W) > 0 ? (u.rectangle.setCoordinates([
5607
+ const [w, S] = u.startPoint, D = m.lngLat.lng, z = m.lngLat.lat;
5608
+ return Math.abs(w - D) > 0 && Math.abs(S - z) > 0 ? (u.rectangle.setCoordinates([
5609
5609
  [
5610
- [k, S],
5610
+ [w, S],
5611
5611
  [D, S],
5612
- [D, W],
5613
- [k, W],
5614
- [k, S]
5612
+ [D, z],
5613
+ [w, z],
5614
+ [w, S]
5615
5615
  ]
5616
5616
  ]), this.map.fire("draw.create", { features: [u.rectangle.toGeoJSON()] }), this.changeMode("simple_select", { featureIds: [u.rectangle.id] })) : (this.deleteFeature([u.rectangle.id], { silent: !0 }), u.hasCoordinates = !1, this.changeMode("simple_select"));
5617
5617
  },
@@ -5620,9 +5620,9 @@ const Fd = {
5620
5620
  onTrash(u) {
5621
5621
  this.deleteFeature([u.rectangle.id], { silent: !0 }), this.changeMode("simple_select");
5622
5622
  },
5623
- toDisplayFeatures(u, m, k) {
5623
+ toDisplayFeatures(u, m, w) {
5624
5624
  const S = m.properties.id === u.rectangle.id;
5625
- S && !u.hasCoordinates || (m.properties.active = S ? "true" : "false", k(m));
5625
+ S && !u.hasCoordinates || (m.properties.active = S ? "true" : "false", w(m));
5626
5626
  }
5627
5627
  };
5628
5628
  }
@@ -5766,76 +5766,76 @@ const Fd = {
5766
5766
  const m = String(u?.url ?? "").trim();
5767
5767
  if (!m) return "";
5768
5768
  if (/^https?:\/\//i.test(m)) return m;
5769
- const k = window.location?.origin ?? "", S = m.replace(/^\/+/, "");
5770
- return `${k}/${S}`;
5769
+ const w = window.location?.origin ?? "", S = m.replace(/^\/+/, "");
5770
+ return `${w}/${S}`;
5771
5771
  }
5772
5772
  function $t(u) {
5773
5773
  u && He.value?.layerId !== u || (He.value = null);
5774
5774
  }
5775
5775
  function ll(u, m = {}) {
5776
- return u.popup === !1 ? [] : Array.isArray(u.popup) ? u.popup.length ? u.popup.map((k) => {
5777
- const S = k?.field || k?.name;
5776
+ return u.popup === !1 ? [] : Array.isArray(u.popup) ? u.popup.length ? u.popup.map((w) => {
5777
+ const S = w?.field || w?.name;
5778
5778
  if (!S) return null;
5779
5779
  const D = m[S];
5780
- return D == null || D === "" ? null : { key: k.label || S, value: String(D) };
5781
- }).filter(Boolean) : [] : Object.entries(m).slice(0, 5).map(([k, S]) => ({ key: k, value: S == null ? "—" : String(S) }));
5780
+ return D == null || D === "" ? null : { key: w.label || S, value: String(D) };
5781
+ }).filter(Boolean) : [] : Object.entries(m).slice(0, 5).map(([w, S]) => ({ key: w, value: S == null ? "—" : String(S) }));
5782
5782
  }
5783
5783
  function Gt(u) {
5784
5784
  if (!Array.isArray(u)) return [];
5785
- const m = (S) => Array.isArray(S) && S.length >= 2 && Number.isFinite(Number(S[0])) && Number.isFinite(Number(S[1])), k = (S) => {
5785
+ const m = (S) => Array.isArray(S) && S.length >= 2 && Number.isFinite(Number(S[0])) && Number.isFinite(Number(S[1])), w = (S) => {
5786
5786
  if (!S.length) return S;
5787
- const D = S[0], W = S[S.length - 1];
5788
- return !W || D[0] !== W[0] || D[1] !== W[1] ? [...S, D] : S;
5787
+ const D = S[0], z = S[S.length - 1];
5788
+ return !z || D[0] !== z[0] || D[1] !== z[1] ? [...S, D] : S;
5789
5789
  };
5790
5790
  if (u.length && m(u[0])) {
5791
5791
  const S = u.map((D) => [Number(D[0]), Number(D[1])]).filter(m);
5792
- return S.length ? [k(S)] : [];
5792
+ return S.length ? [w(S)] : [];
5793
5793
  }
5794
5794
  return u.length && Array.isArray(u[0]) && m(u[0][0]) ? u.map(
5795
- (D) => Array.isArray(D) ? D.map((W) => [Number(W[0]), Number(W[1])]) : []
5796
- ).filter((D) => D.length).map(k) : u.length && Array.isArray(u[0]) && Array.isArray(u[0][0]) && m(u[0][0][0]) ? u.flatMap((D) => Array.isArray(D) ? D : []).map(
5797
- (D) => Array.isArray(D) ? D.map((W) => [Number(W[0]), Number(W[1])]) : []
5798
- ).filter((D) => D.length).map(k) : [];
5795
+ (D) => Array.isArray(D) ? D.map((z) => [Number(z[0]), Number(z[1])]) : []
5796
+ ).filter((D) => D.length).map(w) : u.length && Array.isArray(u[0]) && Array.isArray(u[0][0]) && m(u[0][0][0]) ? u.flatMap((D) => Array.isArray(D) ? D : []).map(
5797
+ (D) => Array.isArray(D) ? D.map((z) => [Number(z[0]), Number(z[1])]) : []
5798
+ ).filter((D) => D.length).map(w) : [];
5799
5799
  }
5800
5800
  function El(u) {
5801
- const m = u.style ?? {}, k = m.color ?? "#3b82f6";
5802
- if (!m.colorAttr || !m.colorSet) return k;
5801
+ const m = u.style ?? {}, w = m.color ?? "#3b82f6";
5802
+ if (!m.colorAttr || !m.colorSet) return w;
5803
5803
  const S = Object.keys(m.colorSet);
5804
- if (!S.length) return k;
5804
+ if (!S.length) return w;
5805
5805
  const D = ["match", ["to-string", ["get", m.colorAttr]]];
5806
- return S.forEach((W) => {
5807
- D.push(String(W), m.colorSet?.[W] ?? k);
5808
- }), D.push(k), D;
5806
+ return S.forEach((z) => {
5807
+ D.push(String(z), m.colorSet?.[z] ?? w);
5808
+ }), D.push(w), D;
5809
5809
  }
5810
5810
  function Yt(u) {
5811
5811
  if (!A) return;
5812
- u.handlers.forEach((k) => {
5812
+ u.handlers.forEach((w) => {
5813
5813
  try {
5814
- A.off(k.type, k.layerId, k.handler);
5814
+ A.off(w.type, w.layerId, w.handler);
5815
5815
  } catch {
5816
5816
  }
5817
- }), u.handlers = [], [...u.layerIds, ...u.boundsIds].forEach((k) => {
5818
- A.getLayer(k) && A.removeLayer(k);
5817
+ }), u.handlers = [], [...u.layerIds, ...u.boundsIds].forEach((w) => {
5818
+ A.getLayer(w) && A.removeLayer(w);
5819
5819
  }), A.getSource(u.sourceId) && A.removeSource(u.sourceId);
5820
5820
  const m = `vs-ov-bounds-src-${u.id}`;
5821
5821
  A.getSource(m) && A.removeSource(m), $t(u.id);
5822
5822
  }
5823
5823
  function Bl(u, m) {
5824
5824
  if (!A) return [];
5825
- const k = `vs-ov-bounds-src-${m}`, S = `vs-ov-bounds-line-${m}`, D = u.bounds ?? ue.value ?? ne.value, W = Gt(D);
5826
- if (!W.length) return [];
5825
+ const w = `vs-ov-bounds-src-${m}`, S = `vs-ov-bounds-line-${m}`, D = u.bounds ?? ue.value ?? ne.value, z = Gt(D);
5826
+ if (!z.length) return [];
5827
5827
  const fe = {
5828
5828
  type: "FeatureCollection",
5829
- features: W.map((ge) => ({
5829
+ features: z.map((ge) => ({
5830
5830
  type: "Feature",
5831
5831
  properties: {},
5832
5832
  geometry: { type: "LineString", coordinates: ge }
5833
5833
  }))
5834
5834
  };
5835
- return A.getSource(k) && A.removeSource(k), A.addSource(k, { type: "geojson", data: fe }), A.addLayer({
5835
+ return A.getSource(w) && A.removeSource(w), A.addSource(w, { type: "geojson", data: fe }), A.addLayer({
5836
5836
  id: S,
5837
5837
  type: "line",
5838
- source: k,
5838
+ source: w,
5839
5839
  paint: {
5840
5840
  "line-color": u.style?.stroke ?? u.style?.color ?? "#2563eb",
5841
5841
  "line-width": u.style?.width ?? 2,
@@ -5847,14 +5847,14 @@ const Fd = {
5847
5847
  function Mt(u) {
5848
5848
  if (!A) return;
5849
5849
  Yt(u);
5850
- const m = u.config, k = Kt(m);
5851
- if (!k) return;
5850
+ const m = u.config, w = Kt(m);
5851
+ if (!w) return;
5852
5852
  const S = [], D = [];
5853
- if (/\.v(?:m)?t(?:\?|$)/i.test(k) || /\.pbf(?:\?|$)/i.test(k)) {
5853
+ if (/\.v(?:m)?t(?:\?|$)/i.test(w) || /\.pbf(?:\?|$)/i.test(w)) {
5854
5854
  const ge = m.sourceLayer || m.layer || m.service_layer || m.dataset?.layer || m.id;
5855
5855
  A.addSource(u.sourceId, {
5856
5856
  type: "vector",
5857
- tiles: [k]
5857
+ tiles: [w]
5858
5858
  });
5859
5859
  const Ye = String(m.style?.type ?? "polygon").toLowerCase(), ut = El(m), bt = m.style?.opacity ?? 0.5;
5860
5860
  if (Ye === "point") {
@@ -5910,7 +5910,7 @@ const Fd = {
5910
5910
  } else {
5911
5911
  A.addSource(u.sourceId, {
5912
5912
  type: "raster",
5913
- tiles: [k],
5913
+ tiles: [w],
5914
5914
  tileSize: 256
5915
5915
  });
5916
5916
  const ge = `vs-ov-raster-${u.id}`;
@@ -5950,14 +5950,14 @@ const Fd = {
5950
5950
  A.getLayer(ge) && A.setLayoutProperty(ge, "visibility", fe);
5951
5951
  });
5952
5952
  }
5953
- function Pt() {
5953
+ function Nt() {
5954
5954
  if (!A) return;
5955
5955
  const m = {
5956
5956
  type: "FeatureCollection",
5957
- features: Gt(ue.value ?? ne.value).map((k) => ({
5957
+ features: Gt(ue.value ?? ne.value).map((w) => ({
5958
5958
  type: "Feature",
5959
5959
  properties: {},
5960
- geometry: { type: "LineString", coordinates: k }
5960
+ geometry: { type: "LineString", coordinates: w }
5961
5961
  }))
5962
5962
  };
5963
5963
  A.getSource(kl) ? A.getSource(kl).setData(m) : A.addSource(kl, { type: "geojson", data: m }), A.getLayer($l) || A.addLayer({
@@ -5977,20 +5977,20 @@ const Fd = {
5977
5977
  const m = we[u];
5978
5978
  if (!m) return;
5979
5979
  m.visible = !m.visible;
5980
- const k = m.visible ? "visible" : "none";
5980
+ const w = m.visible ? "visible" : "none";
5981
5981
  [...m.layerIds, ...m.boundsIds].forEach((S) => {
5982
- A.getLayer(S) && A.setLayoutProperty(S, "visibility", k);
5982
+ A.getLayer(S) && A.setLayoutProperty(S, "visibility", w);
5983
5983
  }), Ct(), m.visible || $t(u);
5984
5984
  }
5985
5985
  function Ct() {
5986
5986
  if (!A) return;
5987
- const u = [], m = [], k = [], S = [];
5987
+ const u = [], m = [], w = [], S = [];
5988
5988
  _e.value.forEach((fe) => {
5989
5989
  const ge = we[fe];
5990
5990
  if (!ge) return;
5991
5991
  const Ye = String(ge.config?.url ?? ""), ut = /\.v(?:m)?t(?:\?|$)/i.test(Ye), bt = /\.png(?:\?|$)/i.test(Ye);
5992
- ut ? k.push(...ge.layerIds) : bt ? u.push(...ge.layerIds) : m.push(...ge.layerIds), S.push(...ge.boundsIds);
5993
- }), [...u, ...m, ...k, ...S].forEach(
5992
+ ut ? w.push(...ge.layerIds) : bt ? u.push(...ge.layerIds) : m.push(...ge.layerIds), S.push(...ge.boundsIds);
5993
+ }), [...u, ...m, ...w, ...S].forEach(
5994
5994
  (fe) => {
5995
5995
  A.getLayer(fe) && A.moveLayer(fe);
5996
5996
  }
@@ -6002,14 +6002,14 @@ const Fd = {
6002
6002
  if (!re[u] || (be.value = u, !A)) return;
6003
6003
  const m = Et();
6004
6004
  if (!m) return;
6005
- const k = A.getCenter?.(), S = A.getZoom?.(), D = G?.getAll?.();
6005
+ const w = A.getCenter?.(), S = A.getZoom?.(), D = G?.getAll?.();
6006
6006
  A.setStyle(je(m)), A.once("style.load", () => {
6007
- if (A && (k && Number.isFinite(S) && A.jumpTo({ center: [k.lng, k.lat], zoom: S }), Pt(), _e.value.forEach((W) => {
6008
- const fe = we[W];
6007
+ if (A && (w && Number.isFinite(S) && A.jumpTo({ center: [w.lng, w.lat], zoom: S }), Nt(), _e.value.forEach((z) => {
6008
+ const fe = we[z];
6009
6009
  fe && Mt(fe);
6010
6010
  }), Ct(), D?.features?.length && G))
6011
6011
  try {
6012
- D.features.forEach((W) => G.add(W)), p.value = D.features.length;
6012
+ D.features.forEach((z) => G.add(z)), p.value = D.features.length;
6013
6013
  } catch {
6014
6014
  p.value = 0;
6015
6015
  }
@@ -6042,15 +6042,15 @@ const Fd = {
6042
6042
  }
6043
6043
  function We(u) {
6044
6044
  if (!u) return [];
6045
- const m = (D, W) => {
6045
+ const m = (D, z) => {
6046
6046
  if (!D?.type) return [];
6047
- const fe = { ...W ?? {} };
6047
+ const fe = { ...z ?? {} };
6048
6048
  return D.type === "MultiPoint" && Array.isArray(D.coordinates) ? D.coordinates.map((ge) => ee({ type: "Point", coordinates: ge })).map((ge) => ({ ...ge, properties: fe })) : D.type === "MultiLineString" && Array.isArray(D.coordinates) ? D.coordinates.map((ge) => ee({ type: "LineString", coordinates: ge })).map((ge) => ({ ...ge, properties: fe })) : D.type === "MultiPolygon" && Array.isArray(D.coordinates) ? D.coordinates.map((ge) => ee({ type: "Polygon", coordinates: ge })).map((ge) => ({ ...ge, properties: fe })) : D.type === "GeometryCollection" && Array.isArray(D.geometries) ? D.geometries.flatMap((ge) => m(ge, fe)) : [{ type: "Feature", properties: fe, geometry: me(D) }];
6049
- }, k = (D) => {
6049
+ }, w = (D) => {
6050
6050
  if (!D) return null;
6051
6051
  if (D.type === "Feature") {
6052
- const W = Fe(D);
6053
- return W ? m(W.geometry, W.properties) : null;
6052
+ const z = Fe(D);
6053
+ return z ? m(z.geometry, z.properties) : null;
6054
6054
  }
6055
6055
  return D.geom?.type && Array.isArray(D.geom.coordinates) ? m(
6056
6056
  {
@@ -6061,23 +6061,23 @@ const Fd = {
6061
6061
  ) : D.type === "GeometryCollection" && Array.isArray(D.geometries) ? m(D, D.properties ?? {}) : typeof D.type == "string" && Array.isArray(D.coordinates) ? m(me(D), D.properties ?? {}) : null;
6062
6062
  };
6063
6063
  if (u.type === "FeatureCollection")
6064
- return (u.features ?? []).flatMap(k).filter(Boolean);
6064
+ return (u.features ?? []).flatMap(w).filter(Boolean);
6065
6065
  if (Array.isArray(u))
6066
6066
  return u.flatMap(
6067
- (D) => D?.type === "FeatureCollection" ? We(D) : [k(D)]
6067
+ (D) => D?.type === "FeatureCollection" ? We(D) : [w(D)]
6068
6068
  ).flat().filter(Boolean);
6069
- const S = k(u);
6069
+ const S = w(u);
6070
6070
  return S ? Array.isArray(S) ? S : [S] : [];
6071
6071
  }
6072
6072
  function ot(u) {
6073
6073
  if (!u.length) return null;
6074
6074
  if (!r.value)
6075
6075
  return me(u[0]?.geometry ?? null);
6076
- const m = u.map((W) => me(W?.geometry)).filter(Boolean);
6077
- return m.every((W) => W?.type === "Point") ? { type: "MultiPoint", coordinates: m.map((W) => W.coordinates) } : m.every((W) => W?.type === "LineString") ? {
6076
+ const m = u.map((z) => me(z?.geometry)).filter(Boolean);
6077
+ return m.every((z) => z?.type === "Point") ? { type: "MultiPoint", coordinates: m.map((z) => z.coordinates) } : m.every((z) => z?.type === "LineString") ? {
6078
6078
  type: "MultiLineString",
6079
- coordinates: m.map((W) => W.coordinates)
6080
- } : m.every((W) => W?.type === "Polygon") ? { type: "MultiPolygon", coordinates: m.map((W) => W.coordinates) } : { type: "GeometryCollection", geometries: m };
6079
+ coordinates: m.map((z) => z.coordinates)
6080
+ } : m.every((z) => z?.type === "Polygon") ? { type: "MultiPolygon", coordinates: m.map((z) => z.coordinates) } : { type: "GeometryCollection", geometries: m };
6081
6081
  }
6082
6082
  function Ze(u) {
6083
6083
  if (!u) return "__null__";
@@ -6089,8 +6089,8 @@ const Fd = {
6089
6089
  }
6090
6090
  function ft(u, m) {
6091
6091
  if (!Array.isArray(u) || !Array.isArray(m) || u.length < 2 || m.length < 2) return !1;
6092
- const k = 1e-12;
6093
- return Math.abs(Number(u[0]) - Number(m[0])) < k && Math.abs(Number(u[1]) - Number(m[1])) < k;
6092
+ const w = 1e-12;
6093
+ return Math.abs(Number(u[0]) - Number(m[0])) < w && Math.abs(Number(u[1]) - Number(m[1])) < w;
6094
6094
  }
6095
6095
  function ht(u, m) {
6096
6096
  if (!Array.isArray(u) || u.length < 4) return null;
@@ -6099,27 +6099,27 @@ const Fd = {
6099
6099
  }
6100
6100
  function mt(u, m) {
6101
6101
  if (!Array.isArray(u) || u.length < 2 || !Number.isInteger(m) || m < 0 || m >= u.length || u.length <= 2) return null;
6102
- const k = u.slice();
6103
- return k.splice(m, 1), k.length < 2 ? null : k;
6102
+ const w = u.slice();
6103
+ return w.splice(m, 1), w.length < 2 ? null : w;
6104
6104
  }
6105
6105
  function _t(u, m) {
6106
- const k = me(u);
6107
- if (!k || !Array.isArray(m)) return null;
6108
- if (k.type === "LineString") {
6109
- const [S] = m, D = mt(k.coordinates, S);
6110
- return D ? (k.coordinates = D, k) : null;
6106
+ const w = me(u);
6107
+ if (!w || !Array.isArray(m)) return null;
6108
+ if (w.type === "LineString") {
6109
+ const [S] = m, D = mt(w.coordinates, S);
6110
+ return D ? (w.coordinates = D, w) : null;
6111
6111
  }
6112
- if (k.type === "MultiLineString") {
6113
- const [S, D] = m, W = k.coordinates?.[S], fe = mt(W, D);
6114
- return fe ? (k.coordinates[S] = fe, k) : null;
6112
+ if (w.type === "MultiLineString") {
6113
+ const [S, D] = m, z = w.coordinates?.[S], fe = mt(z, D);
6114
+ return fe ? (w.coordinates[S] = fe, w) : null;
6115
6115
  }
6116
- if (k.type === "Polygon") {
6117
- const [S, D] = m, W = k.coordinates?.[S], fe = ht(W, D);
6118
- return fe ? (k.coordinates[S] = fe, k) : null;
6116
+ if (w.type === "Polygon") {
6117
+ const [S, D] = m, z = w.coordinates?.[S], fe = ht(z, D);
6118
+ return fe ? (w.coordinates[S] = fe, w) : null;
6119
6119
  }
6120
- if (k.type === "MultiPolygon") {
6121
- const [S, D, W] = m, fe = k.coordinates?.[S]?.[D], ge = ht(fe, W);
6122
- return ge ? (k.coordinates[S][D] = ge, k) : null;
6120
+ if (w.type === "MultiPolygon") {
6121
+ const [S, D, z] = m, fe = w.coordinates?.[S]?.[D], ge = ht(fe, z);
6122
+ return ge ? (w.coordinates[S][D] = ge, w) : null;
6123
6123
  }
6124
6124
  return null;
6125
6125
  }
@@ -6127,7 +6127,7 @@ const Fd = {
6127
6127
  return u ? u.split(".").map((m) => Number(m)).filter((m) => Number.isInteger(m) && m >= 0) : [];
6128
6128
  }
6129
6129
  function Zt(u) {
6130
- return !G || !u ? null : typeof G.get == "function" ? G.get(u) ?? null : G.getAll?.()?.features?.find((k) => String(k?.id ?? "") === u) ?? null;
6130
+ return !G || !u ? null : typeof G.get == "function" ? G.get(u) ?? null : G.getAll?.()?.features?.find((w) => String(w?.id ?? "") === u) ?? null;
6131
6131
  }
6132
6132
  function fn(u) {
6133
6133
  const m = u?.properties?.id ?? u?.id;
@@ -6139,20 +6139,20 @@ const Fd = {
6139
6139
  [u.x - 8, u.y - 8],
6140
6140
  [u.x + 8, u.y + 8]
6141
6141
  ], S = A.queryRenderedFeatures(m).find((D) => {
6142
- const W = String(D?.properties?.meta ?? "");
6143
- return W && W !== "feature" ? !1 : !!fn(D);
6142
+ const z = String(D?.properties?.meta ?? "");
6143
+ return z && z !== "feature" ? !1 : !!fn(D);
6144
6144
  });
6145
6145
  return fn(S);
6146
6146
  }
6147
6147
  function ia(u, m) {
6148
6148
  if (!G || !u || !m.length) return;
6149
- const k = Zt(u);
6150
- if (!k?.geometry) return;
6151
- const S = _t(k.geometry, m);
6149
+ const w = Zt(u);
6150
+ if (!w?.geometry) return;
6151
+ const S = _t(w.geometry, m);
6152
6152
  if (!S) return;
6153
6153
  const D = {
6154
- ...k,
6155
- id: k.id ?? u,
6154
+ ...w,
6155
+ id: w.id ?? u,
6156
6156
  geometry: S
6157
6157
  };
6158
6158
  Le = !0, ve = !0;
@@ -6161,41 +6161,41 @@ const Fd = {
6161
6161
  } finally {
6162
6162
  ve = !1, Le = !1;
6163
6163
  }
6164
- Nt(), Lt();
6164
+ Bt(), Lt();
6165
6165
  }
6166
6166
  function ua(u) {
6167
6167
  if (!A || !G || s.value || g.isRulerActive.value || v.value !== "edit") return;
6168
6168
  const m = u?.point;
6169
6169
  if (!m) return;
6170
- const k = [
6170
+ const w = [
6171
6171
  [m.x - 8, m.y - 8],
6172
6172
  [m.x + 8, m.y + 8]
6173
- ], D = A.queryRenderedFeatures(k).find(
6173
+ ], D = A.queryRenderedFeatures(w).find(
6174
6174
  (fe) => fe?.properties?.meta === "vertex" && fe?.properties?.parent && fe?.properties?.coord_path
6175
6175
  );
6176
6176
  if (!D) return;
6177
6177
  u?.originalEvent?.preventDefault?.(), u?.originalEvent?.stopPropagation?.();
6178
- const W = pt(String(D.properties.coord_path));
6179
- W.length && ia(String(D.properties.parent), W);
6178
+ const z = pt(String(D.properties.coord_path));
6179
+ z.length && ia(String(D.properties.parent), z);
6180
6180
  }
6181
6181
  function da(u) {
6182
6182
  const m = gn(u);
6183
6183
  if (!m) return null;
6184
- const [[k, S], [D, W]] = m;
6185
- return { lat: (S + W) / 2, lng: (k + D) / 2 };
6184
+ const [[w, S], [D, z]] = m;
6185
+ return { lat: (S + z) / 2, lng: (w + D) / 2 };
6186
6186
  }
6187
6187
  function mn(u) {
6188
6188
  if (!Array.isArray(u) || u.length < 3) return 0;
6189
6189
  const m = (S, D) => {
6190
- const W = S * 2003750834e-2 / 180, fe = Math.log(Math.tan((90 + D) * Math.PI / 360)) / (Math.PI / 180);
6191
- return [W, fe * 2003750834e-2 / 180];
6190
+ const z = S * 2003750834e-2 / 180, fe = Math.log(Math.tan((90 + D) * Math.PI / 360)) / (Math.PI / 180);
6191
+ return [z, fe * 2003750834e-2 / 180];
6192
6192
  };
6193
- let k = 0;
6193
+ let w = 0;
6194
6194
  for (let S = 0; S < u.length - 1; S += 1) {
6195
- const [D, W] = m(Number(u[S][0]), Number(u[S][1])), [fe, ge] = m(Number(u[S + 1][0]), Number(u[S + 1][1]));
6196
- k += D * ge - fe * W;
6195
+ const [D, z] = m(Number(u[S][0]), Number(u[S][1])), [fe, ge] = m(Number(u[S + 1][0]), Number(u[S + 1][1]));
6196
+ w += D * ge - fe * z;
6197
6197
  }
6198
- return Math.abs(k / 2) / 1e6;
6198
+ return Math.abs(w / 2) / 1e6;
6199
6199
  }
6200
6200
  function ca(u) {
6201
6201
  if (!u?.type || !u?.coordinates) return null;
@@ -6203,12 +6203,12 @@ const Fd = {
6203
6203
  const m = u.coordinates?.[0];
6204
6204
  return Array.isArray(m) ? mn(m) : null;
6205
6205
  }
6206
- return u.type === "MultiPolygon" ? u.coordinates.reduce((m, k) => {
6207
- const S = k?.[0];
6206
+ return u.type === "MultiPolygon" ? u.coordinates.reduce((m, w) => {
6207
+ const S = w?.[0];
6208
6208
  return Array.isArray(S) ? m + mn(S) : m;
6209
6209
  }, 0) : null;
6210
6210
  }
6211
- function Rl(u) {
6211
+ function Pl(u) {
6212
6212
  if (!u) {
6213
6213
  $.value = null;
6214
6214
  return;
@@ -6224,21 +6224,21 @@ const Fd = {
6224
6224
  areaKm2: ca(u)
6225
6225
  };
6226
6226
  }
6227
- function Pl(u) {
6227
+ function Rl(u) {
6228
6228
  if (!u) {
6229
6229
  const S = F[F.length - 1], D = me(S?.geometry ?? null);
6230
- j = D, Rl(D);
6230
+ j = D, Pl(D);
6231
6231
  return;
6232
6232
  }
6233
- const m = F.find((S) => String(S?.id ?? "") === String(u)) ?? null, k = me(m?.geometry ?? null);
6234
- j = k, Rl(k);
6233
+ const m = F.find((S) => String(S?.id ?? "") === String(u)) ?? null, w = me(m?.geometry ?? null);
6234
+ j = w, Pl(w);
6235
6235
  }
6236
6236
  function Nl(u) {
6237
- _.value = (u ?? []).map((m, k) => {
6238
- const S = String(m?.id ?? `feature-${k + 1}`), D = pn(String(m?.geometry?.type ?? "Feature"));
6237
+ _.value = (u ?? []).map((m, w) => {
6238
+ const S = String(m?.id ?? `feature-${w + 1}`), D = pn(String(m?.geometry?.type ?? "Feature"));
6239
6239
  return {
6240
6240
  id: S,
6241
- label: `${D} ${k + 1}`
6241
+ label: `${D} ${w + 1}`
6242
6242
  };
6243
6243
  });
6244
6244
  }
@@ -6264,24 +6264,24 @@ const Fd = {
6264
6264
  }
6265
6265
  function vn(u, m) {
6266
6266
  if (!Array.isArray(u) || !Array.isArray(m) || u.length !== 2 || m.length !== 2) return !1;
6267
- const k = 1e-9;
6268
- return Math.abs(Number(u[0]) - Number(m[0])) < k && Math.abs(Number(u[1]) - Number(m[1])) < k;
6267
+ const w = 1e-9;
6268
+ return Math.abs(Number(u[0]) - Number(m[0])) < w && Math.abs(Number(u[1]) - Number(m[1])) < w;
6269
6269
  }
6270
6270
  function gn(u) {
6271
6271
  if (!u) return null;
6272
- let m = 1 / 0, k = 1 / 0, S = -1 / 0, D = -1 / 0;
6273
- const W = (fe) => {
6272
+ let m = 1 / 0, w = 1 / 0, S = -1 / 0, D = -1 / 0;
6273
+ const z = (fe) => {
6274
6274
  if (Array.isArray(fe)) {
6275
6275
  if (fe.length >= 2 && Number.isFinite(fe[0]) && Number.isFinite(fe[1])) {
6276
6276
  const ge = Number(fe[0]), Ye = Number(fe[1]);
6277
- m = Math.min(m, ge), k = Math.min(k, Ye), S = Math.max(S, ge), D = Math.max(D, Ye);
6277
+ m = Math.min(m, ge), w = Math.min(w, Ye), S = Math.max(S, ge), D = Math.max(D, Ye);
6278
6278
  return;
6279
6279
  }
6280
- fe.forEach(W);
6280
+ fe.forEach(z);
6281
6281
  }
6282
6282
  };
6283
- return W(u.coordinates), !Number.isFinite(m) || !Number.isFinite(k) ? null : [
6284
- [m, k],
6283
+ return z(u.coordinates), !Number.isFinite(m) || !Number.isFinite(w) ? null : [
6284
+ [m, w],
6285
6285
  [S, D]
6286
6286
  ];
6287
6287
  }
@@ -6289,9 +6289,9 @@ const Fd = {
6289
6289
  if (!A || !u) return;
6290
6290
  const m = gn(u);
6291
6291
  if (!m) return;
6292
- const [[k, S], [D, W]] = m;
6293
- if (k === D && S === W) {
6294
- A.easeTo({ center: [k, S], zoom: Math.max(J.value, 14) });
6292
+ const [[w, S], [D, z]] = m;
6293
+ if (w === D && S === z) {
6294
+ A.easeTo({ center: [w, S], zoom: Math.max(J.value, 14) });
6295
6295
  return;
6296
6296
  }
6297
6297
  A.fitBounds(m, { padding: 30, duration: 250, maxZoom: 18 });
@@ -6306,17 +6306,17 @@ const Fd = {
6306
6306
  }
6307
6307
  function nl() {
6308
6308
  if (!G) return null;
6309
- const m = G.getAll?.()?.features ?? [], k = (W) => !!W && m.some((fe) => String(fe?.id ?? "") === String(W ?? "")), S = G.getSelectedIds?.();
6309
+ const m = G.getAll?.()?.features ?? [], w = (z) => !!z && m.some((fe) => String(fe?.id ?? "") === String(z ?? "")), S = G.getSelectedIds?.();
6310
6310
  if (Array.isArray(S) && S.length > 0) {
6311
- const W = S[0];
6312
- return W != null ? String(W) : null;
6311
+ const z = S[0];
6312
+ return z != null ? String(z) : null;
6313
6313
  }
6314
- if (k(ie)) return String(ie);
6314
+ if (w(ie)) return String(ie);
6315
6315
  if (!m.length) return null;
6316
6316
  const D = r.value ? m[m.length - 1] : m[0];
6317
6317
  return D?.id !== void 0 && D?.id !== null ? String(D.id) : null;
6318
6318
  }
6319
- function Nt() {
6319
+ function Bt() {
6320
6320
  if (!G) return;
6321
6321
  const u = G.getAll();
6322
6322
  if (p.value = u?.features?.length ?? 0, !u?.features?.length) {
@@ -6324,9 +6324,9 @@ const Fd = {
6324
6324
  return;
6325
6325
  }
6326
6326
  const m = (u.features ?? []).map(Fe).filter(Boolean);
6327
- if (F = m, Nl(m), ie = nl(), Pl(ie), !ve) {
6328
- const k = ot(m);
6329
- N = Ze(k), n("update:modelValue", k);
6327
+ if (F = m, Nl(m), ie = nl(), Rl(ie), !ve) {
6328
+ const w = ot(m);
6329
+ N = Ze(w), n("update:modelValue", w);
6330
6330
  }
6331
6331
  }
6332
6332
  function pl() {
@@ -6335,15 +6335,15 @@ const Fd = {
6335
6335
  }
6336
6336
  function vl(u) {
6337
6337
  if (!G) return;
6338
- const m = We(u), k = r.value ? m : m.slice(0, 1);
6339
- ve = !0, pl(), k.forEach((W) => {
6338
+ const m = We(u), w = r.value ? m : m.slice(0, 1);
6339
+ ve = !0, pl(), w.forEach((z) => {
6340
6340
  try {
6341
- G.add(W);
6341
+ G.add(z);
6342
6342
  } catch {
6343
6343
  }
6344
- }), ve = !1, F = (G.getAll?.()?.features ?? k).map(Fe).filter(Boolean), Nl(F), ie = null;
6344
+ }), ve = !1, F = (G.getAll?.()?.features ?? w).map(Fe).filter(Boolean), Nl(F), ie = null;
6345
6345
  const D = me(F[F.length - 1]?.geometry ?? null);
6346
- j = me(D), jl(), Rl(D), D && (yn(D), s.value || Lt());
6346
+ j = me(D), jl(), Pl(D), D && (yn(D), s.value || Lt());
6347
6347
  }
6348
6348
  function fa() {
6349
6349
  G && (ve = !0, pl(), F.forEach((u) => {
@@ -6351,7 +6351,7 @@ const Fd = {
6351
6351
  G.add(u);
6352
6352
  } catch {
6353
6353
  }
6354
- }), ve = !1, Nl(F), jl(), Pl(ie));
6354
+ }), ve = !1, Nl(F), jl(), Rl(ie));
6355
6355
  }
6356
6356
  function Jt() {
6357
6357
  if (G) {
@@ -6379,10 +6379,10 @@ const Fd = {
6379
6379
  }
6380
6380
  function Lt(u) {
6381
6381
  if (s.value || !G || !G.getAll()?.features?.length) return;
6382
- const k = u || nl();
6383
- if (k)
6382
+ const w = u || nl();
6383
+ if (w)
6384
6384
  try {
6385
- G.changeMode("direct_select", { featureId: k }), ie = k, Pl(ie), v.value = "edit";
6385
+ G.changeMode("direct_select", { featureId: w }), ie = w, Rl(ie), v.value = "edit";
6386
6386
  } catch {
6387
6387
  v.value = "";
6388
6388
  }
@@ -6396,7 +6396,7 @@ const Fd = {
6396
6396
  const u = nl();
6397
6397
  if (u)
6398
6398
  try {
6399
- Me = !0, G.delete(u), Me = !1, Nt();
6399
+ Me = !0, G.delete(u), Me = !1, Bt();
6400
6400
  const m = nl();
6401
6401
  m ? Lt(m) : Jt();
6402
6402
  return;
@@ -6413,7 +6413,7 @@ const Fd = {
6413
6413
  function ga(u) {
6414
6414
  if (!A || !E) return;
6415
6415
  const m = [u[1], u[0]];
6416
- Pe || (Pe = new E.Marker({ color: "#2563eb" })), Pe.setLngLat(m).addTo(A), A.easeTo({ center: m, zoom: 13, duration: 250 });
6416
+ Re || (Re = new E.Marker({ color: "#2563eb" })), Re.setLngLat(m).addTo(A), A.easeTo({ center: m, zoom: 13, duration: 250 });
6417
6417
  }
6418
6418
  function ya() {
6419
6419
  s.value || B.value?.click();
@@ -6449,7 +6449,7 @@ const Fd = {
6449
6449
  Ge.value = [], vl({
6450
6450
  type: "Polygon",
6451
6451
  coordinates: [u.ring]
6452
- }), Nt(), ke.value = !1, u.wasClosedAutomatically && Ce({
6452
+ }), Bt(), ke.value = !1, u.wasClosedAutomatically && Ce({
6453
6453
  type: "info",
6454
6454
  title: "Імпорт координат",
6455
6455
  message: "Полігон був автоматично замкнений (перша і остання точки різнилися)."
@@ -6458,12 +6458,12 @@ const Fd = {
6458
6458
  function $a(u) {
6459
6459
  if (!u.length) return;
6460
6460
  const m = 5;
6461
- u.slice(0, m).forEach((k) => {
6462
- const S = k.line > 0 ? `Рядок ${k.line}` : "Загальна помилка";
6461
+ u.slice(0, m).forEach((w) => {
6462
+ const S = w.line > 0 ? `Рядок ${w.line}` : "Загальна помилка";
6463
6463
  Ce({
6464
6464
  type: "warning",
6465
6465
  title: "Імпорт координат",
6466
- message: `${S} — ${k.message}`
6466
+ message: `${S} — ${w.message}`
6467
6467
  });
6468
6468
  }), u.length > m && Ce({
6469
6469
  type: "warning",
@@ -6474,8 +6474,8 @@ const Fd = {
6474
6474
  function Ca(u) {
6475
6475
  if (s.value || !G) return;
6476
6476
  xe.value = !1;
6477
- const m = u.target, k = m.files?.[0];
6478
- if (!k) return;
6477
+ const m = u.target, w = m.files?.[0];
6478
+ if (!w) return;
6479
6479
  const S = new FileReader();
6480
6480
  S.onload = () => {
6481
6481
  try {
@@ -6488,7 +6488,7 @@ const Fd = {
6488
6488
  });
6489
6489
  return;
6490
6490
  }
6491
- vl(D), Nt();
6491
+ vl(D), Bt();
6492
6492
  } catch {
6493
6493
  Ce({
6494
6494
  type: "error",
@@ -6504,12 +6504,12 @@ const Fd = {
6504
6504
  title: "Імпорт файлу",
6505
6505
  message: "Помилка читання файлу."
6506
6506
  }), m.value = "";
6507
- }, S.readAsText(k);
6507
+ }, S.readAsText(w);
6508
6508
  }
6509
6509
  function _a() {
6510
6510
  if (s.value || !G) return;
6511
- const u = G.getAll(), m = new Blob([JSON.stringify(u, null, 2)], { type: "application/json" }), k = URL.createObjectURL(m), S = document.createElement("a");
6512
- S.href = k, S.download = "data.geojson", S.click(), URL.revokeObjectURL(k);
6511
+ const u = G.getAll(), m = new Blob([JSON.stringify(u, null, 2)], { type: "application/json" }), w = URL.createObjectURL(m), S = document.createElement("a");
6512
+ S.href = w, S.download = "data.geojson", S.click(), URL.revokeObjectURL(w);
6513
6513
  }
6514
6514
  return Xe(async () => {
6515
6515
  if (window.addEventListener("click", hn, !0), !d.value) return;
@@ -6537,51 +6537,55 @@ const Fd = {
6537
6537
  trash: !1
6538
6538
  },
6539
6539
  styles: Tt
6540
- }), A.addControl(G), A.on("click", (k) => {
6540
+ }), A.addControl(G), A.on("click", (w) => {
6541
6541
  if (g.isRulerActive.value) {
6542
- const D = k?.lngLat;
6542
+ const D = w?.lngLat;
6543
6543
  if (!D) return;
6544
6544
  y.value?.addPoint?.({ lat: D.lat, lng: D.lng });
6545
6545
  return;
6546
6546
  }
6547
6547
  if (!G || s.value || v.value !== "edit") return;
6548
- const S = sa(k?.point);
6548
+ const S = sa(w?.point);
6549
6549
  !S || S === ie || requestAnimationFrame(() => {
6550
6550
  !G || s.value || Lt(S);
6551
6551
  });
6552
6552
  }), A.on("draw.create", () => {
6553
6553
  if (G && !g.isRulerActive.value) {
6554
6554
  if (!r.value) {
6555
- const k = G.getAll();
6556
- if (k.features.length > 1) {
6557
- const S = k.features[k.features.length - 1];
6558
- ve = !0, k.features.slice(0, -1).forEach((D) => G.delete(D.id)), ve = !1, S && (ve = !0, G.add(S), ve = !1);
6555
+ const w = G.getAll();
6556
+ if (w.features.length > 1) {
6557
+ const S = w.features[w.features.length - 1];
6558
+ ve = !0, w.features.slice(0, -1).forEach((D) => G.delete(D.id)), ve = !1, S && (ve = !0, G.add(S), ve = !1);
6559
6559
  }
6560
6560
  }
6561
- Nt(), Lt();
6561
+ Bt(), Lt();
6562
6562
  }
6563
- }), A.on("draw.update", (k) => {
6564
- if (!Re && !g.isRulerActive.value) {
6565
- if (k?.action === "move") {
6566
- if (Re = !0, fa(), Re = !1, v.value === "edit") {
6567
- const S = nl(), D = S ? Zt(S) : G?.getAll?.()?.features?.[0];
6568
- if (D?.id)
6569
- try {
6570
- G.changeMode("direct_select", { featureId: D.id }), ie = String(D.id);
6571
- } catch {
6572
- v.value = "";
6573
- }
6574
- }
6563
+ }), A.on("draw.update", (w) => {
6564
+ if (Pe || g.isRulerActive.value) return;
6565
+ const S = Array.isArray(w?.features) ? w.features : [], D = w?.action === "move" && S.length > 0 && S.every((z) => z?.geometry?.type === "Point");
6566
+ if (w?.action === "move") {
6567
+ if (D) {
6568
+ Bt();
6575
6569
  return;
6576
6570
  }
6577
- Nt();
6571
+ if (Pe = !0, fa(), Pe = !1, v.value === "edit") {
6572
+ const z = nl(), fe = z ? Zt(z) : G?.getAll?.()?.features?.[0];
6573
+ if (fe?.id)
6574
+ try {
6575
+ G.changeMode("direct_select", { featureId: fe.id }), ie = String(fe.id);
6576
+ } catch {
6577
+ v.value = "";
6578
+ }
6579
+ }
6580
+ return;
6578
6581
  }
6582
+ Bt();
6579
6583
  }), A.on("draw.delete", () => {
6580
- Le || Me || g.isRulerActive.value || v.value === "marker" || v.value === "polyline" || v.value === "polygon" || v.value === "rectangle" || (Nt(), G?.getAll?.()?.features?.length || (ie = null), v.value = "", Jt());
6581
- }), A.on("draw.selectionchange", (k) => {
6582
- if (!G || Re || g.isRulerActive.value || v.value === "marker" || v.value === "polyline" || v.value === "polygon" || v.value === "rectangle")
6584
+ Le || Me || g.isRulerActive.value || v.value === "marker" || v.value === "polyline" || v.value === "polygon" || v.value === "rectangle" || (Bt(), G?.getAll?.()?.features?.length || (ie = null), v.value = "", Jt());
6585
+ }), A.on("draw.selectionchange", (w) => {
6586
+ if (!G || Pe || g.isRulerActive.value || v.value === "marker" || v.value === "polyline" || v.value === "polygon" || v.value === "rectangle")
6583
6587
  return;
6584
- const S = k?.features?.[0]?.id !== void 0 && k?.features?.[0]?.id !== null ? String(k.features[0].id) : null;
6588
+ const S = w?.features?.[0]?.id !== void 0 && w?.features?.[0]?.id !== null ? String(w.features[0].id) : null;
6585
6589
  if (!s.value && S) {
6586
6590
  if (v.value === "edit" && ie === S) return;
6587
6591
  requestAnimationFrame(() => {
@@ -6589,11 +6593,11 @@ const Fd = {
6589
6593
  });
6590
6594
  return;
6591
6595
  }
6592
- const D = G.getSelectedIds?.(), W = Array.isArray(D) && D.length > 0 ? String(D[0]) : null;
6593
- if (!s.value && W) {
6594
- if (v.value === "edit" && ie === W) return;
6596
+ const D = G.getSelectedIds?.(), z = Array.isArray(D) && D.length > 0 ? String(D[0]) : null;
6597
+ if (!s.value && z) {
6598
+ if (v.value === "edit" && ie === z) return;
6595
6599
  requestAnimationFrame(() => {
6596
- !G || s.value || Lt(W);
6600
+ !G || s.value || Lt(z);
6597
6601
  });
6598
6602
  return;
6599
6603
  }
@@ -6602,13 +6606,13 @@ const Fd = {
6602
6606
  } catch {
6603
6607
  }
6604
6608
  }), K.value !== void 0) {
6605
- const k = K.value;
6609
+ const w = K.value;
6606
6610
  K.value = void 0, requestAnimationFrame(() => {
6607
- G && vl(k);
6611
+ G && vl(w);
6608
6612
  });
6609
6613
  }
6610
- Pt(), _e.value.forEach((k) => {
6611
- const S = we[k];
6614
+ Nt(), _e.value.forEach((w) => {
6615
+ const S = we[w];
6612
6616
  S && Mt(S);
6613
6617
  }), Ct();
6614
6618
  }
@@ -6618,7 +6622,7 @@ const Fd = {
6618
6622
  }), ul(() => {
6619
6623
  g.isRulerActive.value && g.closeRuler(), window.removeEventListener("click", hn, !0), Object.values(we).forEach((u) => {
6620
6624
  A && Yt(u);
6621
- }), $t(), Pe?.remove && Pe.remove(), Pe = null, A?.remove && A.remove(), A = null, G = null, C.value = null;
6625
+ }), $t(), Re?.remove && Re.remove(), Re = null, A?.remove && A.remove(), A = null, G = null, C.value = null;
6622
6626
  }), pe(
6623
6627
  () => l.modelValue,
6624
6628
  (u) => {
@@ -6628,8 +6632,8 @@ const Fd = {
6628
6632
  }
6629
6633
  const m = ot(
6630
6634
  (r.value ? We(u) : We(u).slice(0, 1)) || []
6631
- ), k = Ze(m);
6632
- if (N && k === N) {
6635
+ ), w = Ze(m);
6636
+ if (N && w === N) {
6633
6637
  N = null;
6634
6638
  return;
6635
6639
  }
@@ -6639,11 +6643,11 @@ const Fd = {
6639
6643
  ), pe(
6640
6644
  () => Z.value,
6641
6645
  (u) => {
6642
- const m = Array.isArray(u) ? u : [], k = [], S = /* @__PURE__ */ new Set();
6643
- m.forEach((D, W) => {
6646
+ const m = Array.isArray(u) ? u : [], w = [], S = /* @__PURE__ */ new Set();
6647
+ m.forEach((D, z) => {
6644
6648
  if (!D) return;
6645
- const fe = ct(D, W);
6646
- k.push(fe), S.add(fe);
6649
+ const fe = ct(D, z);
6650
+ w.push(fe), S.add(fe);
6647
6651
  const ge = { ...D, id: fe }, Ye = we[fe], ut = Ye?.visible ?? !!ge.visible;
6648
6652
  Ye && A && Yt(Ye), we[fe] = {
6649
6653
  id: fe,
@@ -6656,18 +6660,18 @@ const Fd = {
6656
6660
  };
6657
6661
  }), Object.keys(we).forEach((D) => {
6658
6662
  if (S.has(D)) return;
6659
- const W = we[D];
6660
- W && A && Yt(W), delete we[D];
6661
- }), _e.value = k, A && (_e.value.forEach((D) => {
6662
- const W = we[D];
6663
- W && Mt(W);
6663
+ const z = we[D];
6664
+ z && A && Yt(z), delete we[D];
6665
+ }), _e.value = w, A && (_e.value.forEach((D) => {
6666
+ const z = we[D];
6667
+ z && Mt(z);
6664
6668
  }), Ct());
6665
6669
  },
6666
6670
  { immediate: !0, deep: !0 }
6667
6671
  ), pe(
6668
6672
  () => ue.value,
6669
6673
  () => {
6670
- A && (Pt(), _e.value.forEach((u) => {
6674
+ A && (Nt(), _e.value.forEach((u) => {
6671
6675
  const m = we[u];
6672
6676
  m && Mt(m);
6673
6677
  }), Ct());
@@ -6677,9 +6681,9 @@ const Fd = {
6677
6681
  () => X.value,
6678
6682
  async (u) => {
6679
6683
  if (ne.value = [], !u) {
6680
- A && (Pt(), _e.value.forEach((m) => {
6681
- const k = we[m];
6682
- k && Mt(k);
6684
+ A && (Nt(), _e.value.forEach((m) => {
6685
+ const w = we[m];
6686
+ w && Mt(w);
6683
6687
  }), Ct());
6684
6688
  return;
6685
6689
  }
@@ -6692,25 +6696,25 @@ const Fd = {
6692
6696
  console.error("Failed to fetch KATOTTG bounds", m);
6693
6697
  } finally {
6694
6698
  if (!A) return;
6695
- Pt(), _e.value.forEach((m) => {
6696
- const k = we[m];
6697
- k && Mt(k);
6699
+ Nt(), _e.value.forEach((m) => {
6700
+ const w = we[m];
6701
+ w && Mt(w);
6698
6702
  }), Ct();
6699
6703
  }
6700
6704
  },
6701
6705
  { immediate: !0 }
6702
6706
  ), pe(
6703
- () => q.value,
6707
+ () => W.value,
6704
6708
  (u) => {
6705
6709
  if (!Array.isArray(u) || u.length !== 2) return;
6706
6710
  const m = [Number(u[0]), Number(u[1])];
6707
6711
  if (vn(ae.value, m) || (ae.value = [...m], !A)) return;
6708
- const k = A.getCenter?.();
6709
- k && vn([k.lng, k.lat], ae.value) || A.easeTo({ center: [ae.value[0], ae.value[1]] });
6712
+ const w = A.getCenter?.();
6713
+ w && vn([w.lng, w.lat], ae.value) || A.easeTo({ center: [ae.value[0], ae.value[1]] });
6710
6714
  },
6711
6715
  { deep: !0 }
6712
6716
  ), pe(
6713
- () => H.value,
6717
+ () => q.value,
6714
6718
  (u) => {
6715
6719
  typeof u == "number" && (J.value = u, A && A.setZoom(u));
6716
6720
  }
@@ -6758,7 +6762,7 @@ const Fd = {
6758
6762
  disabled: s.value
6759
6763
  }, [
6760
6764
  m[8] || (m[8] = Ue(" Імпорт ", -1)),
6761
- Y(R(dl), {
6765
+ Y(P(dl), {
6762
6766
  class: Q(["h-4 w-4 transition-transform", { "rotate-180": xe.value }])
6763
6767
  }, null, 8, ["class"])
6764
6768
  ], 8, Bd),
@@ -6782,7 +6786,7 @@ const Fd = {
6782
6786
  class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",
6783
6787
  onClick: _a,
6784
6788
  disabled: s.value || p.value === 0
6785
- }, " Експорт ", 8, Rd)) : U("", !0)
6789
+ }, " Експорт ", 8, Pd)) : U("", !0)
6786
6790
  ]),
6787
6791
  c("input", {
6788
6792
  ref_key: "importRef",
@@ -6792,21 +6796,21 @@ const Fd = {
6792
6796
  accept: ".json,.geojson",
6793
6797
  class: "hidden",
6794
6798
  disabled: s.value
6795
- }, null, 40, Pd)
6799
+ }, null, 40, Rd)
6796
6800
  ])) : U("", !0)
6797
6801
  ])) : U("", !0),
6798
- Y(R(ln), {
6802
+ Y(P(ln), {
6799
6803
  visible: ke.value,
6800
- "onUpdate:visible": m[1] || (m[1] = (k) => ke.value = k),
6804
+ "onUpdate:visible": m[1] || (m[1] = (w) => ke.value = w),
6801
6805
  title: "Імпорт координат полігону",
6802
6806
  size: "lg",
6803
6807
  teleport: "#modal"
6804
6808
  }, {
6805
6809
  default: tt(() => [
6806
- Y(Ot, {
6810
+ Y(Pt, {
6807
6811
  schema: de,
6808
6812
  values: ze.value,
6809
- "onUpdate:values": m[0] || (m[0] = (k) => ze.value = k)
6813
+ "onUpdate:values": m[0] || (m[0] = (w) => ze.value = w)
6810
6814
  }, null, 8, ["values"]),
6811
6815
  c("div", Nd, [
6812
6816
  c("button", {
@@ -6830,16 +6834,16 @@ const Fd = {
6830
6834
  key: 0,
6831
6835
  class: Q(["vs-btn", { "vs-active": v.value === "marker" }]),
6832
6836
  title: "Point",
6833
- onClick: m[2] || (m[2] = (k) => gl("marker")),
6837
+ onClick: m[2] || (m[2] = (w) => gl("marker")),
6834
6838
  disabled: s.value
6835
6839
  }, [
6836
- Y(R(zn), { class: "h-4 w-4" })
6840
+ Y(P(zn), { class: "h-4 w-4" })
6837
6841
  ], 10, Hd)) : U("", !0),
6838
6842
  Ie.value.line ? (i(), f("button", {
6839
6843
  key: 1,
6840
6844
  class: Q(["vs-btn", { "vs-active": v.value === "polyline" }]),
6841
6845
  title: "Line",
6842
- onClick: m[3] || (m[3] = (k) => gl("polyline")),
6846
+ onClick: m[3] || (m[3] = (w) => gl("polyline")),
6843
6847
  disabled: s.value
6844
6848
  }, [
6845
6849
  Y(tu)
@@ -6848,7 +6852,7 @@ const Fd = {
6848
6852
  key: 2,
6849
6853
  class: Q(["vs-btn", { "vs-active": v.value === "polygon" }]),
6850
6854
  title: "Polygon",
6851
- onClick: m[4] || (m[4] = (k) => gl("polygon")),
6855
+ onClick: m[4] || (m[4] = (w) => gl("polygon")),
6852
6856
  disabled: s.value
6853
6857
  }, [
6854
6858
  Y(ou)
@@ -6857,43 +6861,43 @@ const Fd = {
6857
6861
  key: 3,
6858
6862
  class: Q(["vs-btn", { "vs-active": v.value === "rectangle" }]),
6859
6863
  title: "Rectangle",
6860
- onClick: m[5] || (m[5] = (k) => gl("rectangle")),
6864
+ onClick: m[5] || (m[5] = (w) => gl("rectangle")),
6861
6865
  disabled: s.value
6862
6866
  }, [
6863
6867
  Y(uu)
6864
6868
  ], 10, Kd)) : U("", !0),
6865
6869
  Ie.value.ruler ? (i(), f("button", {
6866
6870
  key: 4,
6867
- class: Q(["vs-btn mt-3", { "vs-active": R(g).isRulerActive.value }]),
6871
+ class: Q(["vs-btn mt-3", { "vs-active": P(g).isRulerActive.value }]),
6868
6872
  title: "Ruler",
6869
6873
  onClick: x
6870
6874
  }, [
6871
- Y(R(Hn), { class: "h-4 w-4" })
6875
+ Y(P(Hn), { class: "h-4 w-4" })
6872
6876
  ], 2)) : U("", !0),
6873
6877
  c("button", {
6874
6878
  class: "vs-btn mt-5",
6875
- onClick: m[6] || (m[6] = (k) => o.value = !o.value),
6879
+ onClick: m[6] || (m[6] = (w) => o.value = !o.value),
6876
6880
  title: "Full Screen"
6877
6881
  }, [
6878
- Y(R(Pa), { class: "h-4 w-4" })
6882
+ Y(P(Ra), { class: "h-4 w-4" })
6879
6883
  ])
6880
6884
  ])
6881
6885
  ]),
6882
- Ie.value.ruler && R(g).isRulerActive.value ? (i(), ye(Dd, {
6886
+ Ie.value.ruler && P(g).isRulerActive.value ? (i(), ye(Dd, {
6883
6887
  key: 1,
6884
6888
  ref_key: "rulerPanelRefEl",
6885
6889
  ref: y,
6886
- onClose: m[7] || (m[7] = (k) => R(g).closeRuler()),
6887
- onTabChange: R(g).onRulerTabChange,
6888
- onPointsChange: R(g).onRulerPointsChange,
6889
- onShapeClosedChange: R(g).onRulerShapeClosedChange
6890
+ onClose: m[7] || (m[7] = (w) => P(g).closeRuler()),
6891
+ onTabChange: P(g).onRulerTabChange,
6892
+ onPointsChange: P(g).onRulerPointsChange,
6893
+ onShapeClosedChange: P(g).onRulerShapeClosedChange
6890
6894
  }, null, 8, ["onTabChange", "onPointsChange", "onShapeClosedChange"])) : U("", !0),
6891
- Ie.value.ruler && R(g).isRulerActive.value && R(g).hasRulerPoints.value ? (i(), ye(Ad, {
6895
+ Ie.value.ruler && P(g).isRulerActive.value && P(g).hasRulerPoints.value ? (i(), ye(Ad, {
6892
6896
  key: 2,
6893
6897
  map: C.value,
6894
- points: R(g).rulerPoints.value,
6895
- "is-shape-closed": R(g).rulerShapeClosed.value,
6896
- "label-mode": R(g).rulerActiveTab.value
6898
+ points: P(g).rulerPoints.value,
6899
+ "is-shape-closed": P(g).rulerShapeClosed.value,
6900
+ "label-mode": P(g).rulerActiveTab.value
6897
6901
  }, null, 8, ["map", "points", "is-shape-closed", "label-mode"])) : U("", !0),
6898
6902
  at.value.length ? (i(), f("div", {
6899
6903
  key: 3,
@@ -6902,12 +6906,12 @@ const Fd = {
6902
6906
  }, [
6903
6907
  c("div", Gd, [
6904
6908
  c("dl", Yd, [
6905
- (i(!0), f($e, null, De(at.value, (k) => (i(), f("div", {
6906
- key: `${k.key}-${k.value}`,
6909
+ (i(!0), f($e, null, De(at.value, (w) => (i(), f("div", {
6910
+ key: `${w.key}-${w.value}`,
6907
6911
  class: "flex justify-between gap-2"
6908
6912
  }, [
6909
- c("dt", Zd, oe(k.key), 1),
6910
- c("dd", Jd, oe(k.value), 1)
6913
+ c("dt", Zd, oe(w.key), 1),
6914
+ c("dd", Jd, oe(w.value), 1)
6911
6915
  ]))), 128))
6912
6916
  ])
6913
6917
  ])
@@ -6915,24 +6919,24 @@ const Fd = {
6915
6919
  c("div", Xd, [
6916
6920
  c("div", Qd, [
6917
6921
  Y(pu, {
6918
- basemaps: R(re),
6922
+ basemaps: P(re),
6919
6923
  onOnLayerChange: O
6920
6924
  }, null, 8, ["basemaps"]),
6921
6925
  Be.value.length ? (i(), f("div", ec, [
6922
6926
  m[9] || (m[9] = c("p", { class: "font-semibold text-[11px] uppercase tracking-wide text-gray-500 mb-2" }, "Шари", -1)),
6923
6927
  c("div", tc, [
6924
- (i(!0), f($e, null, De(Be.value, (k) => (i(), f("label", {
6925
- key: k.id,
6928
+ (i(!0), f($e, null, De(Be.value, (w) => (i(), f("label", {
6929
+ key: w.id,
6926
6930
  class: "flex items-center gap-2 cursor-pointer select-none"
6927
6931
  }, [
6928
6932
  c("input", {
6929
6933
  type: "checkbox",
6930
6934
  class: "rounded border-gray-300 text-blue-600 focus:ring-blue-500",
6931
- checked: k.visible,
6935
+ checked: w.visible,
6932
6936
  disabled: s.value,
6933
- onChange: (S) => Ol(k.id)
6937
+ onChange: (S) => Ol(w.id)
6934
6938
  }, null, 40, lc),
6935
- c("span", nc, oe(k.config.title || k.config.name || k.id), 1)
6939
+ c("span", nc, oe(w.config.title || w.config.name || w.id), 1)
6936
6940
  ]))), 128))
6937
6941
  ])
6938
6942
  ])) : U("", !0)
@@ -6943,18 +6947,18 @@ const Fd = {
6943
6947
  c("div", rc, [
6944
6948
  c("div", sc, [
6945
6949
  m[10] || (m[10] = Ue(" Тип: ", -1)),
6946
- _.value.length <= 1 ? (i(), f("span", ic, oe($.value ? pn($.value.type) : _.value[0]?.label || "—"), 1)) : (i(!0), f($e, { key: 1 }, De(_.value, (k, S) => (i(), f($e, {
6947
- key: k.id
6950
+ _.value.length <= 1 ? (i(), f("span", ic, oe($.value ? pn($.value.type) : _.value[0]?.label || "—"), 1)) : (i(!0), f($e, { key: 1 }, De(_.value, (w, S) => (i(), f($e, {
6951
+ key: w.id
6948
6952
  }, [
6949
6953
  c("button", {
6950
6954
  type: "button",
6951
6955
  class: Q([
6952
6956
  "font-bold underline-offset-2",
6953
- k.id === R(ie) ? "text-blue-700 underline" : "text-gray-700 hover:text-blue-700 hover:underline"
6957
+ w.id === P(ie) ? "text-blue-700 underline" : "text-gray-700 hover:text-blue-700 hover:underline"
6954
6958
  ]),
6955
- onClick: (D) => ma(k.id),
6959
+ onClick: (D) => ma(w.id),
6956
6960
  disabled: s.value
6957
- }, oe(k.label), 11, uc),
6961
+ }, oe(w.label), 11, uc),
6958
6962
  S < _.value.length - 1 ? (i(), f("span", dc, ", ")) : U("", !0)
6959
6963
  ], 64))), 128))
6960
6964
  ])
@@ -6977,7 +6981,7 @@ const Fd = {
6977
6981
  onClick: va,
6978
6982
  disabled: s.value
6979
6983
  }, [
6980
- Y(R(Na), { class: "h-3 w-3" })
6984
+ Y(P(Na), { class: "h-3 w-3" })
6981
6985
  ], 8, yc),
6982
6986
  c("button", {
6983
6987
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
@@ -6985,7 +6989,7 @@ const Fd = {
6985
6989
  onClick: pa,
6986
6990
  disabled: s.value
6987
6991
  }, [
6988
- Y(R(Wt), { class: "h-4 w-4" })
6992
+ Y(P(Wt), { class: "h-4 w-4" })
6989
6993
  ], 8, hc)
6990
6994
  ])
6991
6995
  ])) : U("", !0)
@@ -6993,7 +6997,7 @@ const Fd = {
6993
6997
  ], 2)
6994
6998
  ], 8, ["disabled"]));
6995
6999
  }
6996
- }), xc = /* @__PURE__ */ Ne(bc, [["__scopeId", "data-v-a014563c"]]), wc = ["data-focus"], kc = { class: "flex items-center" }, $c = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Cc = ["onClick", "aria-label"], _c = {
7000
+ }), xc = /* @__PURE__ */ Ne(bc, [["__scopeId", "data-v-d18ff937"]]), wc = ["data-focus"], kc = { class: "flex items-center" }, $c = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Cc = ["onClick", "aria-label"], _c = {
6997
7001
  key: 0,
6998
7002
  class: "absolute text-gray-500 truncate pl-2"
6999
7003
  }, Sc = { class: "flex-1 min-w-[2px]" }, Vc = ["placeholder"], Mc = { class: "flex items-center shrink-0" }, Lc = ["disabled"], Dc = /* @__PURE__ */ ce({
@@ -7019,26 +7023,26 @@ const Fd = {
7019
7023
  lt(l.style);
7020
7024
  const a = L(null), r = L(null), s = L(null), o = L(!1), d = L(""), p = Ee(e, "modelValue"), v = h(() => l.placeholder || "Add tag…"), $ = h(() => p.value?.length === 0 && d.value === ""), _ = h(() => !l.disabled && p.value?.length > 0), C = h(() => l.disabled), y = async () => {
7021
7025
  C.value || await Je(() => s.value?.focus());
7022
- }, g = (P) => {
7023
- const I = P.trim();
7026
+ }, g = (R) => {
7027
+ const I = R.trim();
7024
7028
  I !== "" && (!p.value || !Array.isArray(p.value) ? p.value = [I] : l.unique ? p.value.includes(I) || (p.value = [...p.value, I]) : p.value = [...p.value, I], d.value = "");
7025
7029
  }, x = () => {
7026
- const P = d.value;
7027
- P.trim() !== "" && g(P), d.value = "";
7028
- }, V = (P) => {
7030
+ const R = d.value;
7031
+ R.trim() !== "" && g(R), d.value = "";
7032
+ }, V = (R) => {
7029
7033
  const I = p.value.slice();
7030
- I.splice(P, 1), n("update:modelValue", I);
7034
+ I.splice(R, 1), n("update:modelValue", I);
7031
7035
  }, b = () => {
7032
7036
  n("update:modelValue", []);
7033
7037
  }, M = () => {
7034
7038
  C.value || (o.value = !0);
7035
- }, w = () => {
7039
+ }, k = () => {
7036
7040
  o.value = !1, !C.value && x();
7037
- }, T = (P) => {
7038
- const { key: I } = P;
7039
- I === "Enter" ? (P.preventDefault(), x()) : I === "Backspace" && d.value === "" && p.value.length > 0 && V(p.value.length - 1);
7041
+ }, T = (R) => {
7042
+ const { key: I } = R;
7043
+ I === "Enter" ? (R.preventDefault(), x()) : I === "Backspace" && d.value === "" && p.value.length > 0 && V(p.value.length - 1);
7040
7044
  };
7041
- return (P, I) => (i(), f("div", {
7045
+ return (R, I) => (i(), f("div", {
7042
7046
  class: "flex gap-1 w-full",
7043
7047
  ref_key: "root",
7044
7048
  ref: a,
@@ -7065,20 +7069,20 @@ const Fd = {
7065
7069
  ref_key: "chipsRef",
7066
7070
  ref: r
7067
7071
  }, [
7068
- (i(!0), f($e, null, De(p.value, (q, H) => (i(), f("div", {
7069
- key: H,
7072
+ (i(!0), f($e, null, De(p.value, (W, q) => (i(), f("div", {
7073
+ key: q,
7070
7074
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
7071
7075
  }, [
7072
7076
  c("div", kc, [
7073
- c("div", $c, oe(q), 1)
7077
+ c("div", $c, oe(W), 1)
7074
7078
  ]),
7075
7079
  c("div", {
7076
7080
  role: "button",
7077
7081
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
7078
- onClick: Te((X) => V(H), ["stop"]),
7079
- "aria-label": `Remove ${q}`
7082
+ onClick: Te((X) => V(q), ["stop"]),
7083
+ "aria-label": `Remove ${W}`
7080
7084
  }, [
7081
- Y(R(kt), {
7085
+ Y(P(kt), {
7082
7086
  "aria-hidden": "true",
7083
7087
  focusable: "false",
7084
7088
  class: "inline-block h-4 w-4"
@@ -7099,9 +7103,9 @@ const Fd = {
7099
7103
  type: "text",
7100
7104
  tabindex: "0",
7101
7105
  "aria-label": "Add tag",
7102
- "onUpdate:modelValue": I[0] || (I[0] = (q) => d.value = q),
7106
+ "onUpdate:modelValue": I[0] || (I[0] = (W) => d.value = W),
7103
7107
  onFocus: M,
7104
- onBlur: w,
7108
+ onBlur: k,
7105
7109
  onKeydown: T,
7106
7110
  placeholder: p.value && p.value.length ? "" : void 0
7107
7111
  }, null, 40, Vc)), [
@@ -7118,7 +7122,7 @@ const Fd = {
7118
7122
  disabled: C.value,
7119
7123
  onClick: Te(b, ["stop"])
7120
7124
  }, [
7121
- Y(R(kt), { class: "h-4 w-4" })
7125
+ Y(P(kt), { class: "h-4 w-4" })
7122
7126
  ], 8, Lc)) : U("", !0)
7123
7127
  ])
7124
7128
  ], 10, wc)
@@ -7200,7 +7204,7 @@ const Fd = {
7200
7204
  }, " Gen ")
7201
7205
  ]));
7202
7206
  }
7203
- }), Tc = /* @__PURE__ */ Ne(Fc, [["__scopeId", "data-v-cb7b2b74"]]), Ec = { class: "relative flex gap-1 bg-white w-full" }, Bc = ["disabled", "placeholder"], Oc = ["disabled"], Rc = { key: 0 }, Pc = { key: 1 }, Nc = /* @__PURE__ */ ce({
7207
+ }), Tc = /* @__PURE__ */ Ne(Fc, [["__scopeId", "data-v-cb7b2b74"]]), Ec = { class: "relative flex gap-1 bg-white w-full" }, Bc = ["disabled", "placeholder"], Oc = ["disabled"], Pc = { key: 0 }, Rc = { key: 1 }, Nc = /* @__PURE__ */ ce({
7204
7208
  __name: "vs-input-codegen",
7205
7209
  props: /* @__PURE__ */ Ae({
7206
7210
  table: {},
@@ -7263,7 +7267,7 @@ const Fd = {
7263
7267
  disabled: n.value || e.disabled || !r.value,
7264
7268
  onClick: o
7265
7269
  }, [
7266
- n.value ? (i(), f("span", Pc, "...")) : (i(), f("span", Rc, "Gen"))
7270
+ n.value ? (i(), f("span", Rc, "...")) : (i(), f("span", Pc, "Gen"))
7267
7271
  ], 8, Oc)
7268
7272
  ]));
7269
7273
  }
@@ -7330,33 +7334,33 @@ const Fd = {
7330
7334
  key: b.id,
7331
7335
  class: Q(["flex items-center gap-2 w-full", { "opacity-50": p.value === M }]),
7332
7336
  draggable: "true",
7333
- onDragstart: (w) => $(M),
7337
+ onDragstart: (k) => $(M),
7334
7338
  onDragover: V[0] || (V[0] = Te(() => {
7335
7339
  }, ["prevent"])),
7336
- onDrop: (w) => _(M)
7340
+ onDrop: (k) => _(M)
7337
7341
  }, [
7338
7342
  c("button", qc, [
7339
- Y(R(Xt), { class: "h-4 w-4" })
7343
+ Y(P(Xt), { class: "h-4 w-4" })
7340
7344
  ]),
7341
7345
  c("div", Wc, [
7342
7346
  Y(rl, {
7343
7347
  modelValue: b.key,
7344
- "onUpdate:modelValue": (w) => b.key = w,
7348
+ "onUpdate:modelValue": (k) => b.key = k,
7345
7349
  placeholder: "Ключ"
7346
7350
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
7347
7351
  ]),
7348
7352
  c("div", Kc, [
7349
7353
  Y(rl, {
7350
7354
  modelValue: b.value,
7351
- "onUpdate:modelValue": (w) => b.value = w,
7355
+ "onUpdate:modelValue": (k) => b.value = k,
7352
7356
  placeholder: "Значення"
7353
7357
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
7354
7358
  ]),
7355
7359
  c("button", {
7356
- onClick: (w) => g(b.id),
7360
+ onClick: (k) => g(b.id),
7357
7361
  class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
7358
7362
  }, [
7359
- Y(R(kt), { class: "h-4 w-4" })
7363
+ Y(P(kt), { class: "h-4 w-4" })
7360
7364
  ], 8, Gc)
7361
7365
  ], 42, Hc))), 128))
7362
7366
  ], 512),
@@ -7368,8 +7372,8 @@ const Fd = {
7368
7372
  disabled: C.value,
7369
7373
  class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
7370
7374
  }, [
7371
- Y(R(wt), { class: "h-4 w-4" }),
7372
- Ue(" " + oe(R(s)), 1)
7375
+ Y(P(wt), { class: "h-4 w-4" }),
7376
+ Ue(" " + oe(P(s)), 1)
7373
7377
  ], 8, Jc)
7374
7378
  ])
7375
7379
  ]));
@@ -7441,44 +7445,44 @@ const Fd = {
7441
7445
  key: b.id,
7442
7446
  class: Q(["flex items-center gap-2 w-full", { "opacity-50": a.value === M }]),
7443
7447
  draggable: "true",
7444
- onDragstart: (w) => y(M),
7448
+ onDragstart: (k) => y(M),
7445
7449
  onDragover: V[0] || (V[0] = Te(() => {
7446
7450
  }, ["prevent"])),
7447
- onDrop: (w) => g(M)
7451
+ onDrop: (k) => g(M)
7448
7452
  }, [
7449
7453
  c("button", {
7450
7454
  class: "cursor-move",
7451
7455
  type: "button",
7452
7456
  disabled: r.value
7453
7457
  }, [
7454
- Y(R(Xt), { class: "h-4 w-4" })
7458
+ Y(P(Xt), { class: "h-4 w-4" })
7455
7459
  ], 8, nf),
7456
7460
  c("div", af, [
7457
7461
  e.inputType === "text" ? (i(), ye(rl, {
7458
7462
  key: 0,
7459
7463
  modelValue: b.value,
7460
- "onUpdate:modelValue": (w) => b.value = w,
7464
+ "onUpdate:modelValue": (k) => b.value = k,
7461
7465
  disabled: r.value,
7462
7466
  placeholder: s.value
7463
7467
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : U("", !0),
7464
7468
  e.inputType === "tel" ? (i(), ye(Gn, {
7465
7469
  key: 1,
7466
7470
  modelValue: b.value,
7467
- "onUpdate:modelValue": (w) => b.value = w,
7471
+ "onUpdate:modelValue": (k) => b.value = k,
7468
7472
  disabled: r.value,
7469
7473
  placeholder: s.value
7470
7474
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : U("", !0),
7471
7475
  e.inputType === "email" ? (i(), ye(Kn, {
7472
7476
  key: 2,
7473
7477
  modelValue: b.value,
7474
- "onUpdate:modelValue": (w) => b.value = w,
7478
+ "onUpdate:modelValue": (k) => b.value = k,
7475
7479
  disabled: r.value,
7476
7480
  placeholder: s.value
7477
7481
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : U("", !0),
7478
7482
  e.inputType === "mask" ? (i(), ye(an, {
7479
7483
  key: 3,
7480
7484
  modelValue: b.value,
7481
- "onUpdate:modelValue": (w) => b.value = w,
7485
+ "onUpdate:modelValue": (k) => b.value = k,
7482
7486
  mask: e.mask,
7483
7487
  disabled: r.value,
7484
7488
  placeholder: s.value
@@ -7486,11 +7490,11 @@ const Fd = {
7486
7490
  ]),
7487
7491
  c("button", {
7488
7492
  type: "button",
7489
- onClick: (w) => C(b.id),
7493
+ onClick: (k) => C(b.id),
7490
7494
  disabled: r.value,
7491
7495
  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"
7492
7496
  }, [
7493
- Y(R(kt), { class: "h-4 w-4" })
7497
+ Y(P(kt), { class: "h-4 w-4" })
7494
7498
  ], 8, of)
7495
7499
  ], 42, lf))), 128))
7496
7500
  ], 512),
@@ -7502,7 +7506,7 @@ const Fd = {
7502
7506
  disabled: $.value,
7503
7507
  class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
7504
7508
  }, [
7505
- Y(R(wt), { class: "h-4 w-4" }),
7509
+ Y(P(wt), { class: "h-4 w-4" }),
7506
7510
  Ue(" " + oe(o.value), 1)
7507
7511
  ], 8, uf)
7508
7512
  ])
@@ -7533,7 +7537,7 @@ const Fd = {
7533
7537
  "onUpdate:modelValue": d[0] || (d[0] = (p) => r.value = p),
7534
7538
  disabled: s.value,
7535
7539
  ref: "color",
7536
- class: Q(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [e.modelValue ? "" : "text-opacity-50", R(n)].join(" ")]),
7540
+ class: Q(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [e.modelValue ? "" : "text-opacity-50", P(n)].join(" ")]),
7537
7541
  style: { border: "1px solid #CFD9E0" }
7538
7542
  }, null, 10, mf), [
7539
7543
  [Ke, r.value]
@@ -7586,7 +7590,7 @@ const Fd = {
7586
7590
  step: e.step,
7587
7591
  disabled: p.value,
7588
7592
  ref: "range",
7589
- class: Q(["w-full cursor-pointer accent-blue-500", [e.modelValue ? "" : "text-opacity-50", R(n)].join(" ")])
7593
+ class: Q(["w-full cursor-pointer accent-blue-500", [e.modelValue ? "" : "text-opacity-50", P(n)].join(" ")])
7590
7594
  }, null, 10, yf), [
7591
7595
  [Ke, s.value]
7592
7596
  ]),
@@ -7719,7 +7723,7 @@ const Fd = {
7719
7723
  placeholder: e.placeholder,
7720
7724
  disabled: e.disabled,
7721
7725
  name: `${e.name}[${V - 1}]`,
7722
- class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [R(a), { "!border-red-600": e.error }]]),
7726
+ class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [P(a), { "!border-red-600": e.error }]]),
7723
7727
  style: {
7724
7728
  border: "1px solid #CFD9E0"
7725
7729
  }
@@ -7730,7 +7734,7 @@ const Fd = {
7730
7734
  onInput: (b) => _(b, V - 1),
7731
7735
  placeholder: o.value,
7732
7736
  disabled: s.value,
7733
- class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [R(a), { "!border-red-600": e.error }]]),
7737
+ class: Q(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [P(a), { "!border-red-600": e.error }]]),
7734
7738
  style: {
7735
7739
  border: "1px solid #CFD9E0"
7736
7740
  }
@@ -7741,7 +7745,7 @@ const Fd = {
7741
7745
  onClick: Te(C, ["stop"]),
7742
7746
  class: "cursor-pointer shrink-0 w-[38px] text-green-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"
7743
7747
  }, [
7744
- Y(R(wt), { class: "h-4 w-4" })
7748
+ Y(P(wt), { class: "h-4 w-4" })
7745
7749
  ])) : U("", !0),
7746
7750
  !e.disabled && l.value > 1 && e.isAdded ? (i(), f("button", {
7747
7751
  key: 3,
@@ -7749,7 +7753,7 @@ const Fd = {
7749
7753
  onClick: Te((b) => y(V - 1), ["stop"]),
7750
7754
  class: "cursor-pointer shrink-0 w-[38px] text-red-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"
7751
7755
  }, [
7752
- Y(R(kt), { class: "h-4 w-4" })
7756
+ Y(P(kt), { class: "h-4 w-4" })
7753
7757
  ], 8, kf)) : U("", !0)
7754
7758
  ]))), 128))
7755
7759
  ], 2));
@@ -7790,10 +7794,10 @@ const Fd = {
7790
7794
  setup(e, { emit: t }) {
7791
7795
  const l = e, n = t, a = Ee(e, "modelValue"), r = L([]), s = L(l.options ?? []), o = L({}), d = L({}), p = L({ keyword: "", parent: null }), v = L(""), $ = L(!1), _ = L(null), C = L(null), y = L(null), g = L(null), x = L(null), V = L({});
7792
7796
  let b = !1, M = !1;
7793
- const w = nt("values"), T = h(() => !!l.disabled), P = h(() => l.placeholder ?? "Оберіть значення"), I = h(() => l.search !== !1), q = h(() => {
7797
+ const k = nt("values"), T = h(() => !!l.disabled), R = h(() => l.placeholder ?? "Оберіть значення"), I = h(() => l.search !== !1), W = h(() => {
7794
7798
  const E = l.parent ?? l.parentValue;
7795
7799
  return E ? String(E) : "";
7796
- }), H = h(() => q.value ? w?.value?.[q.value] ?? null : null), X = (E) => E == null ? "__null__" : String(E), Z = (E) => {
7800
+ }), q = h(() => W.value ? k?.value?.[W.value] ?? null : null), X = (E) => E == null ? "__null__" : String(E), Z = (E) => {
7797
7801
  if (!E) return "";
7798
7802
  const se = E.label ?? E.text ?? E.name ?? E.ua ?? E.en;
7799
7803
  return se ? String(se) : E.id !== void 0 && E.id !== null ? String(E.id) : "";
@@ -7834,7 +7838,7 @@ const Fd = {
7834
7838
  const se = K();
7835
7839
  if (!se) return [];
7836
7840
  const A = new URLSearchParams();
7837
- A.set("json", "1"), E && A.set("key", E), l.start === 1 && A.set("start", "1"), H.value !== null && H.value !== void 0 && H.value !== "" && A.set("parent", String(H.value));
7841
+ A.set("json", "1"), E && A.set("key", E), l.start === 1 && A.set("start", "1"), q.value !== null && q.value !== void 0 && q.value !== "" && A.set("parent", String(q.value));
7838
7842
  try {
7839
7843
  return (await (await fetch(`${se}?${A.toString()}`)).json())?.data ?? [];
7840
7844
  } catch {
@@ -7845,7 +7849,7 @@ const Fd = {
7845
7849
  const se = K();
7846
7850
  if (!se) return [];
7847
7851
  const A = Array.from(new Set(E.map((F) => X(F)))), G = new URLSearchParams();
7848
- G.set("json", "1"), G.set("val", A.join(",")), l.start === 1 && G.set("start", "1"), H.value !== null && H.value !== void 0 && H.value !== "" && G.set("parent", String(H.value));
7852
+ G.set("json", "1"), G.set("val", A.join(",")), l.start === 1 && G.set("start", "1"), q.value !== null && q.value !== void 0 && q.value !== "" && G.set("parent", String(q.value));
7849
7853
  try {
7850
7854
  const N = (await (await fetch(`${se}?${G.toString()}`)).json())?.data ?? [];
7851
7855
  return xe(N), N;
@@ -7854,7 +7858,7 @@ const Fd = {
7854
7858
  }
7855
7859
  }, ze = async (E = "", { force: se = !1 } = {}) => {
7856
7860
  if (!l.data) return;
7857
- const A = H.value ?? null;
7861
+ const A = q.value ?? null;
7858
7862
  if (!se && p.value.keyword === E && p.value.parent === A && s.value.length > 0) return;
7859
7863
  p.value = { keyword: E, parent: A };
7860
7864
  const F = await ke(E);
@@ -7868,18 +7872,18 @@ const Fd = {
7868
7872
  l.data && await ze(E, { force: !0 });
7869
7873
  }, 250), Le = L(null), we = () => {
7870
7874
  if (!y.value) return;
7871
- const E = y.value.getBoundingClientRect(), se = window.innerHeight ?? document.documentElement.clientHeight, A = window.innerWidth ?? document.documentElement.clientWidth, G = 8, F = 8, j = l.maxHeight ?? 280, N = se - E.bottom - F - G, ie = E.top - F - G, Me = N >= ie, Re = Math.max(A - G * 2, 0);
7875
+ const E = y.value.getBoundingClientRect(), se = window.innerHeight ?? document.documentElement.clientHeight, A = window.innerWidth ?? document.documentElement.clientWidth, G = 8, F = 8, j = l.maxHeight ?? 280, N = se - E.bottom - F - G, ie = E.top - F - G, Me = N >= ie, Pe = Math.max(A - G * 2, 0);
7872
7876
  let { width: qe } = E;
7873
- Re > 0 && qe > Re && (qe = Re);
7874
- let { left: Pe } = E;
7875
- Pe + qe + G > A && (Pe = A - qe - G), Pe = Math.max(Pe, G);
7877
+ Pe > 0 && qe > Pe && (qe = Pe);
7878
+ let { left: Re } = E;
7879
+ Re + qe + G > A && (Re = A - qe - G), Re = Math.max(Re, G);
7876
7880
  const it = Math.min(
7877
7881
  j,
7878
7882
  Math.max(Me ? N : ie, 50)
7879
7883
  );
7880
7884
  V.value = {
7881
7885
  position: "fixed",
7882
- left: `${Pe}px`,
7886
+ left: `${Re}px`,
7883
7887
  width: `${qe}px`,
7884
7888
  maxHeight: `${it}px`,
7885
7889
  transform: Me ? "none" : "translateY(-100%)",
@@ -7920,9 +7924,9 @@ const Fd = {
7920
7924
  if (E.key === "Enter") {
7921
7925
  E.preventDefault();
7922
7926
  const se = J.value[0];
7923
- se && z(se);
7927
+ se && H(se);
7924
7928
  }
7925
- }, z = (E) => {
7929
+ }, H = (E) => {
7926
7930
  if (!E) return;
7927
7931
  const se = X(E.id);
7928
7932
  if (ae.value.has(se)) return;
@@ -7988,7 +7992,7 @@ const Fd = {
7988
7992
  E && (await ze(v.value.trim()), await Oe());
7989
7993
  }, { immediate: !0 });
7990
7994
  const je = L(!1);
7991
- return pe(H, async () => {
7995
+ return pe(q, async () => {
7992
7996
  if (l.data) {
7993
7997
  if (!je.value) {
7994
7998
  je.value = !0;
@@ -8029,7 +8033,7 @@ const Fd = {
8029
8033
  ref_key: "inputRef",
8030
8034
  ref: x,
8031
8035
  "onUpdate:modelValue": se[0] || (se[0] = (A) => v.value = A),
8032
- placeholder: P.value,
8036
+ placeholder: R.value,
8033
8037
  disabled: T.value,
8034
8038
  readonly: !I.value,
8035
8039
  onFocus: se[1] || (se[1] = () => _e("focus")),
@@ -8042,7 +8046,7 @@ const Fd = {
8042
8046
  class: Q(["text-stone-400 transition-transform duration-150", $.value ? "rotate-180" : ""]),
8043
8047
  "aria-hidden": "true"
8044
8048
  }, [
8045
- Y(R(dl), { class: "h-4 w-4" })
8049
+ Y(P(dl), { class: "h-4 w-4" })
8046
8050
  ], 2)
8047
8051
  ], 10, Cf),
8048
8052
  (i(), ye(el, { to: "body" }, [
@@ -8060,7 +8064,7 @@ const Fd = {
8060
8064
  key: X(A.id),
8061
8065
  type: "button",
8062
8066
  class: "w-full px-3 py-2 text-left text-sm text-stone-900 hover:bg-stone-100 disabled:opacity-50",
8063
- onClick: Te((G) => z(A), ["stop"]),
8067
+ onClick: Te((G) => H(A), ["stop"]),
8064
8068
  disabled: T.value
8065
8069
  }, oe(Z(A)), 9, Vf))), 128)),
8066
8070
  J.value.length === 0 ? (i(), f("p", Mf, " Немає варіантів ")) : U("", !0)
@@ -8088,7 +8092,7 @@ const Fd = {
8088
8092
  disabled: T.value,
8089
8093
  "aria-label": "Перетягнути"
8090
8094
  }, [
8091
- Y(R(Xt), { class: "h-4 w-4" })
8095
+ Y(P(Xt), { class: "h-4 w-4" })
8092
8096
  ], 8, Af),
8093
8097
  c("div", {
8094
8098
  class: "flex-1 text-sm text-stone-900",
@@ -8101,14 +8105,14 @@ const Fd = {
8101
8105
  onClick: Te((F) => re(A.id), ["stop"]),
8102
8106
  "aria-label": `Видалити ${A.text}`
8103
8107
  }, [
8104
- Y(R(kt), { class: "h-4 w-4" })
8108
+ Y(P(kt), { class: "h-4 w-4" })
8105
8109
  ], 8, Ff)
8106
8110
  ], 42, Df))), 128)),
8107
8111
  r.value.length === 0 ? (i(), f("p", Tf, "Немає вибраних значень")) : U("", !0)
8108
8112
  ])
8109
8113
  ], 512));
8110
8114
  }
8111
- }), Hl = /* @__PURE__ */ Ne(Ef, [["__scopeId", "data-v-5fa5a4b9"]]), Bf = { class: "flex items-center gap-2 w-full" }, Of = { class: "relative flex-1" }, Rf = ["placeholder", "disabled", "onKeydown"], Pf = ["disabled"], Nf = {
8115
+ }), Hl = /* @__PURE__ */ Ne(Ef, [["__scopeId", "data-v-5fa5a4b9"]]), Bf = { class: "flex items-center gap-2 w-full" }, Of = { class: "relative flex-1" }, Pf = ["placeholder", "disabled", "onKeydown"], Rf = ["disabled"], Nf = {
8112
8116
  key: 0,
8113
8117
  class: "fixed inset-0 z-[1000] flex items-center justify-center bg-black/50"
8114
8118
  }, jf = { class: "bg-white text-gray-900 rounded-lg shadow-lg w-[480px] max-h-[80vh] overflow-y-auto" }, Uf = { class: "p-3 border-b font-semibold text-gray-900 flex justify-between items-center" }, zf = ["onClick"], Hf = {
@@ -8151,20 +8155,20 @@ const Fd = {
8151
8155
  if (!I) return null;
8152
8156
  if (Array.isArray(I)) return I;
8153
8157
  if (typeof I == "string") {
8154
- const q = I.split(",").map((H) => H.trim()).filter(Boolean);
8155
- return q.length !== 4 ? null : q.map(Number);
8158
+ const W = I.split(",").map((q) => q.trim()).filter(Boolean);
8159
+ return W.length !== 4 ? null : W.map(Number);
8156
8160
  }
8157
8161
  return null;
8158
8162
  }, g = h(() => {
8159
8163
  const I = y(n.bbox);
8160
8164
  if (!I || I.length !== 4) return null;
8161
- const q = I.map(Number);
8162
- return q.some((H) => Number.isNaN(H)) ? null : q;
8165
+ const W = I.map(Number);
8166
+ return W.some((q) => Number.isNaN(q)) ? null : W;
8163
8167
  }), x = h(() => {
8164
8168
  const I = g.value;
8165
8169
  if (!I) return "";
8166
- const [q, H, X, Z] = I;
8167
- return `${q},${Math.max(H, Z)},${X},${Math.min(H, Z)}`;
8170
+ const [W, q, X, Z] = I;
8171
+ return `${W},${Math.max(q, Z)},${X},${Math.min(q, Z)}`;
8168
8172
  });
8169
8173
  h(() => x.value ? "1" : "0");
8170
8174
  const V = nt("values");
@@ -8174,16 +8178,16 @@ const Fd = {
8174
8178
  async function M() {
8175
8179
  const I = (o.value || "").trim();
8176
8180
  if (!I) return;
8177
- let q = I;
8181
+ let W = I;
8178
8182
  if (n.includes?.length && V?.value) {
8179
8183
  const X = n.includes.map((Z) => V.value?.[Z]).filter(Boolean);
8180
- X.length && (q = `${X.join(", ")}, ${I}`);
8184
+ X.length && (W = `${X.join(", ")}, ${I}`);
8181
8185
  }
8182
- const H = P(q);
8183
- if (H) {
8186
+ const q = R(W);
8187
+ if (q) {
8184
8188
  d.value = !0;
8185
8189
  try {
8186
- const Z = await (await fetch(H)).json();
8190
+ const Z = await (await fetch(q)).json();
8187
8191
  p.value = Array.isArray(Z) ? Z : [], v.value = !0;
8188
8192
  } catch (X) {
8189
8193
  console.error("Address search error:", X);
@@ -8192,47 +8196,47 @@ const Fd = {
8192
8196
  }
8193
8197
  }
8194
8198
  }
8195
- function w() {
8199
+ function k() {
8196
8200
  v.value = !v.value;
8197
8201
  }
8198
8202
  function T(I) {
8199
8203
  if (!I) return;
8200
8204
  v.value = !1;
8201
- const q = parseFloat(I.lat), X = {
8205
+ const W = parseFloat(I.lat), X = {
8202
8206
  type: "Point",
8203
- coordinates: [parseFloat(I.lon), q]
8207
+ coordinates: [parseFloat(I.lon), W]
8204
8208
  };
8205
8209
  n.geom && V?.value && (V.value[n.geom] = X), a("update:geom", X);
8206
8210
  }
8207
- function P(I) {
8211
+ function R(I) {
8208
8212
  if (!n.api) return "";
8209
- const q = {
8213
+ const W = {
8210
8214
  value: encodeURIComponent(I),
8211
8215
  bbox: g.value ? g.value.join(",") : ""
8212
8216
  };
8213
- return n.api.replace(l, (H, X) => q[X.trim()] ?? "");
8217
+ return n.api.replace(l, (q, X) => W[X.trim()] ?? "");
8214
8218
  }
8215
- return (I, q) => (i(), f("div", Bf, [
8219
+ return (I, W) => (i(), f("div", Bf, [
8216
8220
  c("div", Of, [
8217
8221
  Se(c("input", {
8218
8222
  type: "text",
8219
- "onUpdate:modelValue": q[0] || (q[0] = (H) => o.value = H),
8223
+ "onUpdate:modelValue": W[0] || (W[0] = (q) => o.value = q),
8220
8224
  placeholder: _.value,
8221
8225
  disabled: C.value,
8222
- class: Q(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [R(r), { "!border-red-600": n.error }]]),
8226
+ class: Q(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [P(r), { "!border-red-600": n.error }]]),
8223
8227
  style: { border: "1px solid #CFD9E0" },
8224
8228
  onKeydown: La(Te(b, ["prevent"]), ["enter"])
8225
- }, null, 42, Rf), [
8229
+ }, null, 42, Pf), [
8226
8230
  [Ke, o.value]
8227
8231
  ]),
8228
8232
  p.value.length ? (i(), f("button", {
8229
8233
  key: 0,
8230
8234
  type: "button",
8231
8235
  class: "absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-blue-600",
8232
- onClick: w,
8236
+ onClick: k,
8233
8237
  title: "Show search results"
8234
8238
  }, [
8235
- Y(R(Ht), { class: "h-4 w-4" })
8239
+ Y(P(Ht), { class: "h-4 w-4" })
8236
8240
  ])) : U("", !0)
8237
8241
  ]),
8238
8242
  c("button", {
@@ -8241,33 +8245,33 @@ const Fd = {
8241
8245
  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]",
8242
8246
  disabled: d.value || !o.value?.trim()
8243
8247
  }, [
8244
- d.value ? (i(), ye(R(ja), {
8248
+ d.value ? (i(), ye(P(ja), {
8245
8249
  key: 1,
8246
8250
  class: "h-5 w-5 animate-spin text-gray-400"
8247
- })) : (i(), ye(R(tn), {
8251
+ })) : (i(), ye(P(tn), {
8248
8252
  key: 0,
8249
8253
  class: "h-4 w-4"
8250
8254
  }))
8251
- ], 8, Pf),
8255
+ ], 8, Rf),
8252
8256
  (i(), ye(el, { to: "body" }, [
8253
8257
  v.value ? (i(), f("div", Nf, [
8254
8258
  c("div", jf, [
8255
8259
  c("div", Uf, [
8256
- q[2] || (q[2] = c("span", null, "Search results", -1)),
8260
+ W[2] || (W[2] = c("span", null, "Search results", -1)),
8257
8261
  c("button", {
8258
8262
  class: "text-gray-500 hover:text-blue-600",
8259
- onClick: q[1] || (q[1] = (H) => v.value = !1),
8263
+ onClick: W[1] || (W[1] = (q) => v.value = !1),
8260
8264
  title: "Close"
8261
8265
  }, [
8262
- Y(R(kt), { class: "h-4 w-4" })
8266
+ Y(P(kt), { class: "h-4 w-4" })
8263
8267
  ])
8264
8268
  ]),
8265
8269
  c("ul", null, [
8266
- (i(!0), f($e, null, De(p.value, (H, X) => (i(), f("li", {
8270
+ (i(!0), f($e, null, De(p.value, (q, X) => (i(), f("li", {
8267
8271
  key: X,
8268
- onClick: (Z) => T(H),
8272
+ onClick: (Z) => T(q),
8269
8273
  class: "px-3 py-2 cursor-pointer hover:bg-gray-100 border-b text-sm"
8270
- }, oe(H.display_name), 9, zf))), 128))
8274
+ }, oe(q.display_name), 9, zf))), 128))
8271
8275
  ]),
8272
8276
  p.value.length ? U("", !0) : (i(), f("div", Hf, " No results found "))
8273
8277
  ])
@@ -8340,7 +8344,7 @@ const Fd = {
8340
8344
  key: a.value[b],
8341
8345
  class: "flex items-center gap-3"
8342
8346
  }, [
8343
- Y(Ot, {
8347
+ Y(Pt, {
8344
8348
  schema: s.value,
8345
8349
  layout: "inline",
8346
8350
  navigation: !1,
@@ -8354,7 +8358,7 @@ const Fd = {
8354
8358
  onClick: (M) => C(b),
8355
8359
  disabled: d.value
8356
8360
  }, [
8357
- Y(R(Wt), { class: "h-4 w-4" })
8361
+ Y(P(Wt), { class: "h-4 w-4" })
8358
8362
  ], 8, Gf)
8359
8363
  ]))), 128)),
8360
8364
  n.value.length === 0 ? (i(), f("div", Yf, oe(t.emptyLabel), 1)) : U("", !0)
@@ -8365,7 +8369,7 @@ const Fd = {
8365
8369
  onClick: _,
8366
8370
  disabled: !o.value
8367
8371
  }, [
8368
- Y(R(wt), { class: "h-4 w-4" }),
8372
+ Y(P(wt), { class: "h-4 w-4" }),
8369
8373
  Ue(" " + oe(t.addButtonText), 1)
8370
8374
  ], 8, Zf)
8371
8375
  ]));
@@ -8405,10 +8409,10 @@ const Fd = {
8405
8409
  const t = e, l = Ee(e, "modelValue"), n = L([]), a = L([]), r = L(0), s = L(null), o = L(null), d = L(null), p = h(() => t.groupLabel ?? "Group"), v = h(() => t.emptyLabel ?? "Ще немає груп"), $ = h(() => t.schema?.map((de) => ({
8406
8410
  ...de,
8407
8411
  disabled: t.disabled || de.disabled
8408
- })) ?? []), _ = h(() => $.value.map((de) => H(de))), C = h(() => t.view === "accordion"), y = h(() => !!(t.collapsible || C.value)), g = h(() => t.draggable !== !1), x = h(() => t.disabled ? !1 : t.maxGroups ? l.value.length < t.maxGroups : !0), V = h(() => t.disabled || l.value.length <= (t.minGroups || 0));
8412
+ })) ?? []), _ = h(() => $.value.map((de) => q(de))), C = h(() => t.view === "accordion"), y = h(() => !!(t.collapsible || C.value)), g = h(() => t.draggable !== !1), x = h(() => t.disabled ? !1 : t.maxGroups ? l.value.length < t.maxGroups : !0), V = h(() => t.disabled || l.value.length <= (t.minGroups || 0));
8409
8413
  pe(() => l.value.length, () => {
8410
- b(), M(), w();
8411
- }, { immediate: !0 }), pe(() => t.schema, w, { immediate: !0, deep: !0 }), pe(() => t.view, () => {
8414
+ b(), M(), k();
8415
+ }, { immediate: !0 }), pe(() => t.schema, k, { immediate: !0, deep: !0 }), pe(() => t.view, () => {
8412
8416
  M();
8413
8417
  }, { immediate: !0 });
8414
8418
  function b() {
@@ -8419,7 +8423,7 @@ const Fd = {
8419
8423
  const de = l.value.length;
8420
8424
  C.value ? de === 0 ? r.value = -1 : r.value >= de ? r.value = de - 1 : r.value < 0 && (r.value = 0) : a.value.length < de ? a.value = [...a.value, ...Array.from({ length: de - a.value.length }, () => !1)] : a.value.length > de && a.value.splice(de);
8421
8425
  }
8422
- function w() {
8426
+ function k() {
8423
8427
  if (!t.minGroups || l.value.length >= t.minGroups) return;
8424
8428
  const de = t.minGroups - l.value.length, ve = Array.from({ length: de }, T);
8425
8429
  l.value = [...l.value, ...ve], M();
@@ -8430,13 +8434,13 @@ const Fd = {
8430
8434
  de[ve.name] = ve?.default ?? null;
8431
8435
  }), de;
8432
8436
  }
8433
- function P() {
8437
+ function R() {
8434
8438
  x.value && (l.value = [...l.value, T()], b(), M());
8435
8439
  }
8436
8440
  function I(de) {
8437
- V.value || (l.value = l.value.filter((ve, Le) => Le !== de), b(), C.value ? r.value >= l.value.length && (r.value = l.value.length - 1) : a.value.splice(de, 1), w());
8441
+ V.value || (l.value = l.value.filter((ve, Le) => Le !== de), b(), C.value ? r.value >= l.value.length && (r.value = l.value.length - 1) : a.value.splice(de, 1), k());
8438
8442
  }
8439
- function q(de) {
8443
+ function W(de) {
8440
8444
  if (t.disabled) return;
8441
8445
  const ve = JSON.parse(JSON.stringify(l.value[de] ?? {}));
8442
8446
  l.value = [
@@ -8445,7 +8449,7 @@ const Fd = {
8445
8449
  ...l.value.slice(de + 1)
8446
8450
  ], b(), C.value ? r.value > de && (r.value += 1) : a.value.splice(de + 1, 0, a.value[de] ?? !1);
8447
8451
  }
8448
- function H(de) {
8452
+ function q(de) {
8449
8453
  return {
8450
8454
  ...de
8451
8455
  };
@@ -8540,7 +8544,7 @@ const Fd = {
8540
8544
  ]])
8541
8545
  }, [
8542
8546
  c("div", tm, [
8543
- g.value ? (i(), ye(R(Xt), {
8547
+ g.value ? (i(), ye(P(Xt), {
8544
8548
  key: 0,
8545
8549
  class: "h-4 w-4 text-gray-400",
8546
8550
  "aria-hidden": "true"
@@ -8551,7 +8555,7 @@ const Fd = {
8551
8555
  class: "rounded-full p-1 text-gray-500 transition hover:bg-gray-100",
8552
8556
  onClick: (_e) => Z(we)
8553
8557
  }, [
8554
- Y(R(dl), {
8558
+ Y(P(dl), {
8555
8559
  class: Q(["h-4 w-4 transition", X(we) ? "-rotate-90" : "rotate-0"])
8556
8560
  }, null, 8, ["class"])
8557
8561
  ], 8, lm)) : U("", !0),
@@ -8562,11 +8566,11 @@ const Fd = {
8562
8566
  type: "button",
8563
8567
  class: "p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",
8564
8568
  title: t.duplicateTitle,
8565
- onClick: (_e) => q(we),
8569
+ onClick: (_e) => W(we),
8566
8570
  disabled: t.disabled,
8567
8571
  draggable: "false"
8568
8572
  }, [
8569
- Y(R(Ua), { class: "h-4 w-4" })
8573
+ Y(P(Ua), { class: "h-4 w-4" })
8570
8574
  ], 8, om),
8571
8575
  c("button", {
8572
8576
  type: "button",
@@ -8576,14 +8580,14 @@ const Fd = {
8576
8580
  disabled: V.value,
8577
8581
  draggable: "false"
8578
8582
  }, [
8579
- Y(R(Wt), { class: "h-4 w-4" })
8583
+ Y(P(Wt), { class: "h-4 w-4" })
8580
8584
  ], 8, rm)
8581
8585
  ])
8582
8586
  ], 2),
8583
8587
  Se(c("div", {
8584
8588
  class: Q(t.view === "accordion" ? "p-6" : "pt-6")
8585
8589
  }, [
8586
- Y(Ot, {
8590
+ Y(Pt, {
8587
8591
  class: "vs-dataform__form",
8588
8592
  schema: _.value,
8589
8593
  layout: "inline",
@@ -8601,10 +8605,10 @@ const Fd = {
8601
8605
  c("button", {
8602
8606
  type: "button",
8603
8607
  class: "flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",
8604
- onClick: P,
8608
+ onClick: R,
8605
8609
  disabled: !x.value
8606
8610
  }, [
8607
- Y(R(wt), { class: "h-4 w-4" }),
8611
+ Y(P(wt), { class: "h-4 w-4" }),
8608
8612
  Ue(" " + oe(t.addButtonText), 1)
8609
8613
  ], 8, im)
8610
8614
  ]));
@@ -8641,42 +8645,42 @@ const Fd = {
8641
8645
  return o = y.monaco, Promise.resolve(o);
8642
8646
  if (y[Cl]) return y[Cl];
8643
8647
  const x = (async () => {
8644
- const V = (w) => {
8645
- if (Array.from(document.styleSheets || []).some((I) => I?.href?.includes(w))) return;
8646
- const P = document.createElement("link");
8647
- P.rel = "stylesheet", P.href = w, document.head.appendChild(P);
8648
- }, b = (w) => {
8649
- if (y[jt]?.[w]) return y[jt][w];
8648
+ const V = (k) => {
8649
+ if (Array.from(document.styleSheets || []).some((I) => I?.href?.includes(k))) return;
8650
+ const R = document.createElement("link");
8651
+ R.rel = "stylesheet", R.href = k, document.head.appendChild(R);
8652
+ }, b = (k) => {
8653
+ if (y[jt]?.[k]) return y[jt][k];
8650
8654
  y[jt] ||= {};
8651
- const T = Array.from(document.scripts).find((P) => P.src === w);
8652
- return T ? (y[jt][w] = new Promise((P, I) => {
8653
- const q = T.readyState;
8654
- if (T.dataset.loaded === "true" || q === "loaded" || q === "complete") {
8655
- P();
8655
+ const T = Array.from(document.scripts).find((R) => R.src === k);
8656
+ return T ? (y[jt][k] = new Promise((R, I) => {
8657
+ const W = T.readyState;
8658
+ if (T.dataset.loaded === "true" || W === "loaded" || W === "complete") {
8659
+ R();
8656
8660
  return;
8657
8661
  }
8658
8662
  T.addEventListener("load", () => {
8659
- T.dataset.loaded = "true", P();
8660
- }, { once: !0 }), T.addEventListener("error", (H) => I(H), { once: !0 });
8661
- }), y[jt][w]) : (y[jt][w] = new Promise((P, I) => {
8662
- const q = document.createElement("script");
8663
- q.src = w, q.async = !0, q.onload = () => {
8664
- q.dataset.loaded = "true", P();
8665
- }, q.onerror = (H) => I(H), document.body.appendChild(q);
8666
- }), y[jt][w]);
8663
+ T.dataset.loaded = "true", R();
8664
+ }, { once: !0 }), T.addEventListener("error", (q) => I(q), { once: !0 });
8665
+ }), y[jt][k]) : (y[jt][k] = new Promise((R, I) => {
8666
+ const W = document.createElement("script");
8667
+ W.src = k, W.async = !0, W.onload = () => {
8668
+ W.dataset.loaded = "true", R();
8669
+ }, W.onerror = (q) => I(q), document.body.appendChild(W);
8670
+ }), y[jt][k]);
8667
8671
  }, M = "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.0/min/vs";
8668
- return V(`${M}/editor/editor.main.min.css`), await b(`${M}/loader.min.js`), y[_l] || (y[_l] = new Promise((w, T) => {
8672
+ return V(`${M}/editor/editor.main.min.css`), await b(`${M}/loader.min.js`), y[_l] || (y[_l] = new Promise((k, T) => {
8669
8673
  window.require.config({
8670
8674
  paths: { vs: M }
8671
8675
  }), window.require(
8672
8676
  ["vs/editor/editor.main"],
8673
8677
  () => {
8674
- o = window.monaco, y.monaco = o, w(o);
8678
+ o = window.monaco, y.monaco = o, k(o);
8675
8679
  },
8676
- (P) => T(P)
8680
+ (R) => T(R)
8677
8681
  );
8678
- }).catch((w) => {
8679
- throw delete y[_l], w;
8682
+ }).catch((k) => {
8683
+ throw delete y[_l], k;
8680
8684
  })), y[_l];
8681
8685
  })().catch((V) => {
8682
8686
  throw delete y[Cl], V;
@@ -8843,23 +8847,23 @@ const Fd = {
8843
8847
  emits: /* @__PURE__ */ Ae(["value-selected"], ["update:modelValue"]),
8844
8848
  setup(e, { emit: t }) {
8845
8849
  const l = e, n = Ee(e, "modelValue"), a = t, r = h(() => mo[`${l.layout}`]), s = ["label", "placeholder", "info", "description", "text", "html"], o = L(b()), d = h(() => g(l.item, o.value)), p = h(() => fm?.[`vs-input-${l.item.type}`]), v = nt("field-props"), $ = h(() => {
8846
- const w = R(p);
8847
- if (!w) return /* @__PURE__ */ new Set();
8848
- const T = w.props ?? w.__vccOpts?.props;
8850
+ const k = P(p);
8851
+ if (!k) return /* @__PURE__ */ new Set();
8852
+ const T = k.props ?? k.__vccOpts?.props;
8849
8853
  if (!T) return /* @__PURE__ */ new Set();
8850
- const P = Array.isArray(T) ? T : Object.keys(T);
8851
- return new Set(P);
8854
+ const R = Array.isArray(T) ? T : Object.keys(T);
8855
+ return new Set(R);
8852
8856
  }), _ = ["min", "max", "step"], C = h(() => {
8853
- const w = { ...d.value ?? {} }, T = l.item?.name;
8854
- T && v?.value?.[T] && Object.assign(w, v.value[T]);
8855
- const P = $.value;
8857
+ const k = { ...d.value ?? {} }, T = l.item?.name;
8858
+ T && v?.value?.[T] && Object.assign(k, v.value[T]);
8859
+ const R = $.value;
8856
8860
  let I;
8857
- return P.size ? I = Object.fromEntries(Object.entries(w).filter(([q]) => P.has(q))) : I = w, _.forEach((q) => {
8858
- const H = w[q];
8859
- H != null && (I[q] = H);
8861
+ return R.size ? I = Object.fromEntries(Object.entries(k).filter(([W]) => R.has(W))) : I = k, _.forEach((W) => {
8862
+ const q = k[W];
8863
+ q != null && (I[W] = q);
8860
8864
  }), I;
8861
- }), y = (w) => {
8862
- const T = typeof w == "object" && w !== null ? w : { value: w };
8865
+ }), y = (k) => {
8866
+ const T = typeof k == "object" && k !== null ? k : { value: k };
8863
8867
  a("value-selected", {
8864
8868
  ...T,
8865
8869
  name: T.name ?? l.item?.name
@@ -8870,31 +8874,31 @@ const Fd = {
8870
8874
  }), ul(() => {
8871
8875
  window.removeEventListener("storage", M);
8872
8876
  });
8873
- function g(w, T) {
8874
- if (!w) return {};
8875
- const P = { ...w };
8877
+ function g(k, T) {
8878
+ if (!k) return {};
8879
+ const R = { ...k };
8876
8880
  return s.forEach((I) => {
8877
- const q = V(w, I, T);
8878
- q != null && (P[I] = q);
8879
- }), Array.isArray(w.options) && (P.options = w.options.map((I) => x(I, T))), P;
8880
- }
8881
- function x(w, T) {
8882
- if (!w) return w;
8883
- const P = { ...w }, I = V(w, "label", T), q = V(w, "text", T);
8884
- return I != null && (P.label = I), q != null ? P.text = q : I != null && (P.text = I), P;
8885
- }
8886
- function V(w, T, P) {
8887
- const I = `${T}:${P}`;
8888
- if (w?.[I] != null) return w[I];
8889
- if (T === "label" && w?.[P] != null) return w[P];
8890
- if (w?.[T] != null) return w[T];
8881
+ const W = V(k, I, T);
8882
+ W != null && (R[I] = W);
8883
+ }), Array.isArray(k.options) && (R.options = k.options.map((I) => x(I, T))), R;
8884
+ }
8885
+ function x(k, T) {
8886
+ if (!k) return k;
8887
+ const R = { ...k }, I = V(k, "label", T), W = V(k, "text", T);
8888
+ return I != null && (R.label = I), W != null ? R.text = W : I != null && (R.text = I), R;
8889
+ }
8890
+ function V(k, T, R) {
8891
+ const I = `${T}:${R}`;
8892
+ if (k?.[I] != null) return k[I];
8893
+ if (T === "label" && k?.[R] != null) return k[R];
8894
+ if (k?.[T] != null) return k[T];
8891
8895
  if (T === "label") {
8892
- if (w?.ua != null) return w.ua;
8893
- if (w?.en != null) return w.en;
8896
+ if (k?.ua != null) return k.ua;
8897
+ if (k?.en != null) return k.en;
8894
8898
  }
8895
8899
  if (T === "text" || T === "html") {
8896
- if (w?.ua != null) return w.ua;
8897
- if (w?.en != null) return w.en;
8900
+ if (k?.ua != null) return k.ua;
8901
+ if (k?.en != null) return k.en;
8898
8902
  }
8899
8903
  return null;
8900
8904
  }
@@ -8904,7 +8908,7 @@ const Fd = {
8904
8908
  function M() {
8905
8909
  o.value = b();
8906
8910
  }
8907
- return (w, T) => (i(), ye(rt(r.value), {
8911
+ return (k, T) => (i(), ye(rt(r.value), {
8908
8912
  ua: d.value.ua,
8909
8913
  error: l.error || "",
8910
8914
  item: d.value,
@@ -8916,9 +8920,9 @@ const Fd = {
8916
8920
  class: Q(["flex w-full", `${l.item.type}-component`])
8917
8921
  }, [
8918
8922
  c("div", pm, [
8919
- (i(), ye(rt(p.value), Bt(C.value, {
8923
+ (i(), ye(rt(p.value), Ot(C.value, {
8920
8924
  modelValue: n.value,
8921
- "onUpdate:modelValue": T[0] || (T[0] = (P) => n.value = P),
8925
+ "onUpdate:modelValue": T[0] || (T[0] = (R) => n.value = R),
8922
8926
  onValueSelected: y
8923
8927
  }), null, 16, ["modelValue"])),
8924
8928
  d.value.description && l.layout !== "settings" ? (i(), f("p", {
@@ -8927,7 +8931,7 @@ const Fd = {
8927
8931
  innerHTML: d.value.description
8928
8932
  }, null, 8, vm)) : U("", !0)
8929
8933
  ]),
8930
- d.value.behavior?.api && d.value.behavior?.button ? (i(), ye(mm, Bt({ key: 0 }, d.value.behavior, { value: n.value }), null, 16, ["value"])) : U("", !0)
8934
+ d.value.behavior?.api && d.value.behavior?.button ? (i(), ye(mm, Ot({ key: 0 }, d.value.behavior, { value: n.value }), null, 16, ["value"])) : U("", !0)
8931
8935
  ], 2)
8932
8936
  ]),
8933
8937
  _: 1
@@ -8954,11 +8958,11 @@ const Fd = {
8954
8958
  return { width: ue, minWidth: ue };
8955
8959
  });
8956
8960
  let p = null, v = 0, $ = 0, _ = null, C = null, y = null;
8957
- const g = () => H(), x = () => b();
8961
+ const g = () => q(), x = () => b();
8958
8962
  pe(
8959
8963
  () => l.target,
8960
8964
  async (Z) => {
8961
- if (P(), !Z) {
8965
+ if (R(), !Z) {
8962
8966
  _ = null, n.value = [], a.value = "";
8963
8967
  return;
8964
8968
  }
@@ -8978,7 +8982,7 @@ const Fd = {
8978
8982
  ), Xe(() => {
8979
8983
  l.scrollContainer || V(null), b();
8980
8984
  }), Rt(() => {
8981
- P(), V(null, !0), _ = null, typeof window < "u" && (v && window.cancelAnimationFrame(v), $ && window.cancelAnimationFrame($));
8985
+ R(), V(null, !0), _ = null, typeof window < "u" && (v && window.cancelAnimationFrame(v), $ && window.cancelAnimationFrame($));
8982
8986
  });
8983
8987
  function V(Z, ue = !1) {
8984
8988
  if (y && (y(), y = null), ue) {
@@ -9006,7 +9010,7 @@ const Fd = {
9006
9010
  const B = J.textContent?.trim() ?? "";
9007
9011
  if (!B) return;
9008
9012
  let te = (J.getAttribute("id") ?? "").trim();
9009
- te || (te = w(B) || `heading-${K + 1}`);
9013
+ te || (te = k(B) || `heading-${K + 1}`);
9010
9014
  let ne = te, xe = 1;
9011
9015
  for (; ue.has(ne); )
9012
9016
  ne = `${te}-${xe += 1}`;
@@ -9015,15 +9019,15 @@ const Fd = {
9015
9019
  text: B,
9016
9020
  level: J.tagName.toLowerCase() === "h1" ? 1 : 2
9017
9021
  });
9018
- }), n.value = ae, ae.length || (a.value = ""), q();
9022
+ }), n.value = ae, ae.length || (a.value = ""), W();
9019
9023
  }
9020
- function w(Z) {
9024
+ function k(Z) {
9021
9025
  return Z.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
9022
9026
  }
9023
9027
  function T(Z) {
9024
- !Z || !s.value || typeof MutationObserver > "u" || (P(), p = new MutationObserver(() => b()), p.observe(Z, { childList: !0, subtree: !0 }));
9028
+ !Z || !s.value || typeof MutationObserver > "u" || (R(), p = new MutationObserver(() => b()), p.observe(Z, { childList: !0, subtree: !0 }));
9025
9029
  }
9026
- function P() {
9030
+ function R() {
9027
9031
  p && (p.disconnect(), p = null);
9028
9032
  }
9029
9033
  function I(Z) {
@@ -9033,7 +9037,7 @@ const Fd = {
9033
9037
  const ae = Z.getBoundingClientRect(), J = ue.getBoundingClientRect();
9034
9038
  return ae.top - J.top + ue.scrollTop;
9035
9039
  }
9036
- function q() {
9040
+ function W() {
9037
9041
  if (!s.value || !n.value.length) return;
9038
9042
  const Z = C, ue = (Z ? Z.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), ae = (Z ? Z.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), J = ue + ae;
9039
9043
  let K = null;
@@ -9048,9 +9052,9 @@ const Fd = {
9048
9052
  const B = Z ? Z.scrollHeight - Z.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
9049
9053
  ue + 5 >= B && (K = n.value[n.value.length - 1].id), K && (a.value = K);
9050
9054
  }
9051
- function H() {
9055
+ function q() {
9052
9056
  s.value && ($ && window.cancelAnimationFrame($), $ = window.requestAnimationFrame(() => {
9053
- q(), $ = 0;
9057
+ W(), $ = 0;
9054
9058
  }));
9055
9059
  }
9056
9060
  function X(Z) {
@@ -9219,8 +9223,8 @@ function Im(e, t, l = !1) {
9219
9223
  return;
9220
9224
  }
9221
9225
  let b = !1, M = null;
9222
- V.forEach((w) => {
9223
- const T = Dm(e.value[$.name], w);
9226
+ V.forEach((k) => {
9227
+ const T = Dm(e.value[$.name], k);
9224
9228
  T && (b = !0, !M && typeof T == "string" && (M = T));
9225
9229
  }), b && M ? a.value[$.name] = M : delete a.value[$.name];
9226
9230
  }
@@ -9240,7 +9244,7 @@ const Fm = { class: "flex w-full h-full min-h-0 gap-6" }, Tm = {
9240
9244
  "data-orientation": "horizontal",
9241
9245
  role: "none",
9242
9246
  class: "mt-1 shrink-0 h-[1px] w-full bg-slate-100 dark:bg-slate-600"
9243
- }, Ot = /* @__PURE__ */ ce({
9247
+ }, Pt = /* @__PURE__ */ ce({
9244
9248
  __name: "vs-compact-form",
9245
9249
  props: /* @__PURE__ */ Ae({
9246
9250
  schema: { default: () => [] },
@@ -9272,7 +9276,7 @@ const Fm = { class: "flex w-full h-full min-h-0 gap-6" }, Tm = {
9272
9276
  validate: v,
9273
9277
  reset: $,
9274
9278
  visibleSchema: _
9275
- } = Im(d, a.schema, Da(a, "disabled")), C = L(null), y = L(null), g = L({}), x = h(() => a.navigation), V = h(() => a.navWidth), b = h(() => a.style?.columns), M = Object.freeze({ container: 12, label: 3 }), w = h(() => a.columns ?? b.value ?? M), T = h(() => a.columns != null || b.value != null), P = h(() => T.value ? "horizontal" : a.layout), I = (J) => J?.columns ? "horizontal" : P.value, q = (J) => J?.columns ?? w.value, H = () => {
9279
+ } = Im(d, a.schema, Da(a, "disabled")), C = L(null), y = L(null), g = L({}), x = h(() => a.navigation), V = h(() => a.navWidth), b = h(() => a.style?.columns), M = Object.freeze({ container: 12, label: 3 }), k = h(() => a.columns ?? b.value ?? M), T = h(() => a.columns != null || b.value != null), R = h(() => T.value ? "horizontal" : a.layout), I = (J) => J?.columns ? "horizontal" : R.value, W = (J) => J?.columns ?? k.value, q = () => {
9276
9280
  !a.formId && d.value && delete d.value.id, n("update:modelValue", d.value), v(), n("handle-submit", d.value);
9277
9281
  }, X = (J) => {
9278
9282
  n("value-selected", J);
@@ -9321,10 +9325,10 @@ const Fm = { class: "flex w-full h-full min-h-0 gap-6" }, Tm = {
9321
9325
  c("form", {
9322
9326
  ref_key: "formRef",
9323
9327
  ref: C,
9324
- onSubmit: Te(H, ["prevent"]),
9325
- class: Q(["grid grid-cols-12 p-1", P.value === "default" ? "gap-6" : "gap-4"])
9328
+ onSubmit: Te(q, ["prevent"]),
9329
+ class: Q(["grid grid-cols-12 p-1", R.value === "default" ? "gap-6" : "gap-4"])
9326
9330
  }, [
9327
- (i(!0), f($e, null, De(R(_), (B, te) => (i(), f("div", {
9331
+ (i(!0), f($e, null, De(P(_), (B, te) => (i(), f("div", {
9328
9332
  key: B.name,
9329
9333
  class: Q(I(B) === "horizontal" ? "col-span-12" : `col-span-${B.col || 12}`)
9330
9334
  }, [
@@ -9332,17 +9336,17 @@ const Fm = { class: "flex w-full h-full min-h-0 gap-6" }, Tm = {
9332
9336
  style: Ve(e.style),
9333
9337
  item: B,
9334
9338
  layout: I(B),
9335
- columns: q(B),
9339
+ columns: W(B),
9336
9340
  "model-value": d.value[B.name],
9337
9341
  "onUpdate:modelValue": (ne) => {
9338
9342
  if (B.name === "id" && !e.formId) return;
9339
9343
  const xe = d.value[B.name];
9340
9344
  Z(xe, ne) || (d.value[B.name] = ne);
9341
9345
  },
9342
- error: R(p)[B.name],
9346
+ error: P(p)[B.name],
9343
9347
  onValueSelected: X
9344
9348
  }, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
9345
- I(B) === "settings" && te + 1 !== R(_).length ? (i(), f("div", Tm)) : U("", !0)
9349
+ I(B) === "settings" && te + 1 !== P(_).length ? (i(), f("div", Tm)) : U("", !0)
9346
9350
  ], 2))), 128))
9347
9351
  ], 34)
9348
9352
  ], 512),
@@ -9354,7 +9358,7 @@ const Fm = { class: "flex w-full h-full min-h-0 gap-6" }, Tm = {
9354
9358
  }, null, 8, ["target", "scroll-container", "enabled", "width"])
9355
9359
  ]));
9356
9360
  }
9357
- }), Em = { class: "relative" }, Bm = { class: "w-full h-full fixed top-0 start-0 bg-black bg-opacity-50" }, Om = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Rm = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Pm = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Nm = { class: "p-4 mim-h-0 h-full overflow-auto" }, jm = /* @__PURE__ */ ce({
9361
+ }), Em = { class: "relative" }, Bm = { class: "w-full h-full fixed top-0 start-0 bg-black bg-opacity-50" }, Om = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, Pm = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Rm = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Nm = { class: "p-4 mim-h-0 h-full overflow-auto" }, jm = /* @__PURE__ */ ce({
9358
9362
  __name: "modal-edit",
9359
9363
  props: {
9360
9364
  schema: {},
@@ -9503,19 +9507,19 @@ const Fm = { class: "flex w-full h-full min-h-0 gap-6" }, Tm = {
9503
9507
  }), (g, x) => (i(), f("div", Em, [
9504
9508
  c("div", Bm, [
9505
9509
  c("div", Om, [
9506
- c("div", Rm, [
9507
- c("h3", Pm, oe(d.value === "add" ? "Додати" : "Змінити"), 1),
9510
+ c("div", Pm, [
9511
+ c("h3", Rm, oe(d.value === "add" ? "Додати" : "Змінити"), 1),
9508
9512
  c("button", {
9509
9513
  onClick: y,
9510
9514
  type: "button",
9511
9515
  class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
9512
9516
  }, [
9513
9517
  x[2] || (x[2] = c("span", { class: "sr-only" }, "Close", -1)),
9514
- Y(R(kt), { class: "h-4 w-4 flex-shrink-0" })
9518
+ Y(P(kt), { class: "h-4 w-4 flex-shrink-0" })
9515
9519
  ])
9516
9520
  ]),
9517
9521
  c("div", Nm, [
9518
- a.value ? (i(), ye(Ot, {
9522
+ a.value ? (i(), ye(Pt, {
9519
9523
  key: 0,
9520
9524
  schema: a.value,
9521
9525
  values: r.value,
@@ -10053,10 +10057,10 @@ const kp = /* @__PURE__ */ Ne(xp, [["render", wp]]), $p = ce({
10053
10057
  })), o = h(() => e.customWeekdays?.length === 7 ? e.customWeekdays : null), d = h(() => {
10054
10058
  const x = e.weekStartsOn, V = o.value;
10055
10059
  if (V)
10056
- return Array.from({ length: 7 }).map((M, w) => V[(x + w) % 7]);
10060
+ return Array.from({ length: 7 }).map((M, k) => V[(x + k) % 7]);
10057
10061
  const b = l.value(e.weekdayFormat);
10058
- return Array.from(Array(7)).map((M, w) => (x + w) % 7).map((M) => Qm(/* @__PURE__ */ new Date(), M, e.weekStartsOn)).map(b);
10059
- }), p = (x, V, b, M) => M?.dates?.some((w) => Ll(x, w)) || M?.predicate?.(x) ? !1 : !V && !b ? !0 : !(V && sl(x, qt(V)) || b && il(x, ml(b))), v = h(() => {
10062
+ return Array.from(Array(7)).map((M, k) => (x + k) % 7).map((M) => Qm(/* @__PURE__ */ new Date(), M, e.weekStartsOn)).map(b);
10063
+ }), p = (x, V, b, M) => M?.dates?.some((k) => Ll(x, k)) || M?.predicate?.(x) ? !1 : !V && !b ? !0 : !(V && sl(x, qt(V)) || b && il(x, ml(b))), v = h(() => {
10060
10064
  const x = /* @__PURE__ */ new Date(), V = l.value(e.format);
10061
10065
  return Ym(s.value).map(
10062
10066
  (b) => ({
@@ -10492,13 +10496,13 @@ const Ip = /* @__PURE__ */ Ne(Sp, [["render", Ap], ["__scopeId", "data-v-43e01bf
10492
10496
  a.value = K, e.minimumView === "year" ? (x("none"), t("update:modelValue", K)) : n.value = "month";
10493
10497
  }, M = (K) => {
10494
10498
  a.value = K, e.minimumView === "month" ? (x("none"), t("update:modelValue", K)) : n.value = "day";
10495
- }, w = (K) => {
10499
+ }, k = (K) => {
10496
10500
  a.value = K, e.minimumView === "day" ? (x("none"), t("update:modelValue", K)) : n.value = "time";
10497
10501
  }, T = (K) => {
10498
10502
  x("none"), t("update:modelValue", K);
10499
- }, P = () => {
10503
+ }, R = () => {
10500
10504
  e.clearable && (x("none"), t("update:modelValue", null), a.value = e.startingViewDate);
10501
- }, I = () => s.value = !0, q = () => x(Z.value), H = () => {
10505
+ }, I = () => s.value = !0, W = () => x(Z.value), q = () => {
10502
10506
  s.value = !1, x();
10503
10507
  }, X = (K) => {
10504
10508
  const B = K.keyCode ? K.keyCode : K.which;
@@ -10518,8 +10522,8 @@ const Ip = /* @__PURE__ */ Ne(Sp, [["render", Ap], ["__scopeId", "data-v-43e01bf
10518
10522
  Object.entries(K ?? {}).filter(([B, te]) => B.startsWith("--"))
10519
10523
  ), ae = h(() => e.weekDayNames?.length === 7 ? e.weekDayNames : void 0);
10520
10524
  return {
10521
- blur: H,
10522
- focus: q,
10525
+ blur: q,
10526
+ focus: W,
10523
10527
  click: I,
10524
10528
  input: o,
10525
10529
  inputRef: r,
@@ -10528,27 +10532,27 @@ const Ip = /* @__PURE__ */ Ne(Sp, [["render", Ap], ["__scopeId", "data-v-43e01bf
10528
10532
  updatePageDate: V,
10529
10533
  selectYear: b,
10530
10534
  selectMonth: M,
10531
- selectDay: w,
10535
+ selectDay: k,
10532
10536
  selectTime: T,
10533
10537
  keyUp: X,
10534
10538
  normalizedWeekdayNames: ae,
10535
10539
  viewShown: n,
10536
10540
  goBackFromTimepicker: () => e.startingView === "time" && e.minimumView === "time" ? null : n.value = "day",
10537
- clearModelValue: P,
10541
+ clearModelValue: R,
10538
10542
  initialView: Z,
10539
10543
  log: (K) => console.log(K),
10540
10544
  variables: ue
10541
10545
  };
10542
10546
  }
10543
10547
  }), Ep = { class: "v3dp__input_wrapper" }, Bp = ["readonly", "placeholder", "disabled", "tabindex"], Op = { class: "v3dp__clearable" };
10544
- function Rp(e, t, l, n, a, r) {
10548
+ function Pp(e, t, l, n, a, r) {
10545
10549
  const s = gt("year-picker"), o = gt("month-picker"), d = gt("day-picker"), p = gt("time-picker");
10546
10550
  return i(), f("div", {
10547
10551
  class: "v3dp__datepicker",
10548
10552
  style: Ve(e.variables(e.$attrs.style))
10549
10553
  }, [
10550
10554
  c("div", Ep, [
10551
- Se(c("input", Bt({
10555
+ Se(c("input", Ot({
10552
10556
  type: "text",
10553
10557
  ref: "inputRef",
10554
10558
  readonly: !e.typeable,
@@ -10626,7 +10630,7 @@ function Rp(e, t, l, n, a, r) {
10626
10630
  ])
10627
10631
  ], 4);
10628
10632
  }
10629
- const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10633
+ const Rp = /* @__PURE__ */ Ne(Tp, [["render", Pp]]), Np = /* @__PURE__ */ ce({
10630
10634
  __name: "vs-input-date2",
10631
10635
  props: {
10632
10636
  clearable: { type: Boolean, default: !0 },
@@ -10666,7 +10670,7 @@ const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10666
10670
  l.modelValue ?? p.value,
10667
10671
  r.value
10668
10672
  ) || void 0,
10669
- set: (B) => n("update:modelValue", w(B, r.value))
10673
+ set: (B) => n("update:modelValue", k(B, r.value))
10670
10674
  }), $ = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], _ = h(() => {
10671
10675
  if (l.dayNames?.length)
10672
10676
  return l.dayNames.length === 7 ? l.dayNames : $;
@@ -10708,7 +10712,7 @@ const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10708
10712
  },
10709
10713
  { immediate: !0 }
10710
10714
  ), ol(() => {
10711
- l.now && !l.modelValue && !b.value && (n("update:modelValue", w(/* @__PURE__ */ new Date(), r.value)), b.value = !0);
10715
+ l.now && !l.modelValue && !b.value && (n("update:modelValue", k(/* @__PURE__ */ new Date(), r.value)), b.value = !0);
10712
10716
  });
10713
10717
  function M(B, te) {
10714
10718
  if (!B) return null;
@@ -10717,11 +10721,11 @@ const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10717
10721
  if (typeof B != "string") return null;
10718
10722
  switch (te) {
10719
10723
  case "datetime":
10720
- return q(B);
10724
+ return W(B);
10721
10725
  case "time":
10722
10726
  return Z(B);
10723
10727
  case "month":
10724
- return H(B);
10728
+ return q(B);
10725
10729
  case "year":
10726
10730
  return X(B);
10727
10731
  case "week":
@@ -10730,15 +10734,15 @@ const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10730
10734
  return I(B);
10731
10735
  }
10732
10736
  }
10733
- function w(B, te) {
10737
+ function k(B, te) {
10734
10738
  if (!B) return null;
10735
10739
  const ne = B instanceof Date ? B : M(B, te);
10736
10740
  if (!ne) return null;
10737
10741
  switch (te) {
10738
10742
  case "datetime":
10739
- return `${T(ne)}T${P(ne)}`;
10743
+ return `${T(ne)}T${R(ne)}`;
10740
10744
  case "time":
10741
- return P(ne);
10745
+ return R(ne);
10742
10746
  case "month":
10743
10747
  return `${ne.getFullYear()}-${K(ne.getMonth() + 1)}`;
10744
10748
  case "year":
@@ -10754,7 +10758,7 @@ const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10754
10758
  function T(B) {
10755
10759
  return `${B.getFullYear()}-${K(B.getMonth() + 1)}-${K(B.getDate())}`;
10756
10760
  }
10757
- function P(B) {
10761
+ function R(B) {
10758
10762
  return `${K(B.getHours())}:${K(B.getMinutes())}`;
10759
10763
  }
10760
10764
  function I(B) {
@@ -10763,11 +10767,11 @@ const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10763
10767
  const [ne, xe, ke] = te.map(Number);
10764
10768
  return !ne || !xe || !ke ? null : new Date(ne, xe - 1, ke);
10765
10769
  }
10766
- function q(B) {
10770
+ function W(B) {
10767
10771
  const te = B.includes("T") ? B : B.replace(" ", "T"), ne = new Date(te);
10768
10772
  return Number.isNaN(ne.getTime()) ? null : ne;
10769
10773
  }
10770
- function H(B) {
10774
+ function q(B) {
10771
10775
  const [te, ne] = B.split("-").map(Number);
10772
10776
  return !te || Number.isNaN(ne) ? null : new Date(te, (ne || 1) - 1, 1);
10773
10777
  }
@@ -10805,7 +10809,7 @@ const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10805
10809
  class: Q(["vs-date-picker", l.customClass]),
10806
10810
  style: Ve(V.value)
10807
10811
  }, [
10808
- Y(Pp, {
10812
+ Y(Rp, {
10809
10813
  modelValue: v.value,
10810
10814
  "onUpdate:modelValue": te[0] || (te[0] = (ne) => v.value = ne),
10811
10815
  placeholder: o.value,
@@ -10856,8 +10860,8 @@ const Pp = /* @__PURE__ */ Ne(Tp, [["render", Rp]]), Np = /* @__PURE__ */ ce({
10856
10860
  }
10857
10861
  });
10858
10862
  });
10859
- Ot.install = function(t) {
10860
- t.component("VForm", Ot), Object.assign(t.config.globalProperties, {
10863
+ Pt.install = function(t) {
10864
+ t.component("VForm", Pt), Object.assign(t.config.globalProperties, {
10861
10865
  $form: On
10862
10866
  }), t.provide("form", On), window.v3plugin || (window.v3plugin = {});
10863
10867
  };
@@ -10872,7 +10876,7 @@ export {
10872
10876
  xc as H,
10873
10877
  Hl as V,
10874
10878
  Ne as _,
10875
- Ot as a,
10879
+ Pt as a,
10876
10880
  cm as b,
10877
10881
  jm as c,
10878
10882
  qf as d,