@opengis/form 0.1.13 → 0.1.15

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,4 +1,4 @@
1
- import { defineComponent as me, ref as V, createElementBlock as m, openBlock as u, Fragment as Me, createElementVNode as c, createBlock as be, renderSlot as ut, createVNode as Z, unref as z, Teleport as Xt, createCommentVNode as Y, normalizeStyle as Ee, toDisplayString as de, computed as h, inject as Je, mergeProps as nn, createTextVNode as et, normalizeProps as Pl, guardReactiveProps as Ol, onMounted as at, onUnmounted as bn, normalizeClass as re, mergeModels as Re, useModel as ze, withDirectives as Oe, vModelText as ot, useAttrs as Pa, vModelCheckbox as Oa, resolveDynamicComponent as ht, withCtx as rt, withModifiers as Te, onBeforeUnmount as At, watch as pe, vModelRadio as Ba, renderList as Pe, reactive as Bl, getCurrentInstance as nl, resolveComponent as vt, createSlots as Ra, nextTick as Ze, watchEffect as Rl, vShow as Rt, Transition as ll, isRef as Jn, defineAsyncComponent as jo, createStaticVNode as Nl, useSlots as zo, provide as yn, withKeys as Uo, toRef as Ho } from "vue";
1
+ import { defineComponent as me, ref as V, createElementBlock as m, openBlock as u, Fragment as Me, createElementVNode as c, createBlock as be, renderSlot as ut, createVNode as Z, unref as z, Teleport as Xt, createCommentVNode as Y, normalizeStyle as Ee, toDisplayString as de, computed as h, inject as Je, mergeProps as nn, createTextVNode as et, normalizeProps as Pl, guardReactiveProps as Ol, onMounted as at, onUnmounted as bn, normalizeClass as re, mergeModels as Re, useModel as ze, withDirectives as Oe, vModelText as ot, useAttrs as Pa, vModelCheckbox as Oa, resolveDynamicComponent as ht, withCtx as rt, withModifiers as Te, onBeforeUnmount as Vt, watch as pe, vModelRadio as Ba, renderList as Pe, reactive as Bl, getCurrentInstance as nl, resolveComponent as vt, createSlots as Ra, nextTick as Ze, watchEffect as Rl, vShow as Rt, Transition as ll, isRef as Jn, defineAsyncComponent as jo, createStaticVNode as Nl, useSlots as zo, provide as yn, withKeys as Uo, toRef as Ho } from "vue";
2
2
  import { Info as dn, Check as Na, Mail as Wo, Phone as qo, ChevronRight as Ko, ChevronLeft as Yo, ChevronDown as wn, ChevronUp as Go, X as _t, Clock3 as Xo, CalendarDays as Zo, Table as Jo, FileCode as Qo, FileText as Qn, FileArchive as er, Plus as Tt, Trash2 as an, Eye as jl, Download as al, Upload as ja, Search as ol, GripVertical as hn, Pencil as tr, Circle as nr, MapPin as za, Ruler as Ua, LoaderCircle as el, Minimize as lr, Maximize as ar, ZoomIn as or, Copy as rr } from "lucide-vue-next";
3
3
  import { notify as Ae, VsModal as Mn, modal as sr } from "@opengis/core";
4
4
  function Vl(e, t, n) {
@@ -776,7 +776,7 @@ const Fr = ["placeholder", "disabled"], Er = /* @__PURE__ */ me({
776
776
  l.value = t.unmask ? a.unmaskedValue : a.value;
777
777
  }), a.value = l.value != null ? String(l.value) : "";
778
778
  }
779
- }), At(() => {
779
+ }), Vt(() => {
780
780
  a?.destroy();
781
781
  }), pe(() => t.mask, (r) => {
782
782
  if (a) {
@@ -912,7 +912,7 @@ const is = { class: "relative w-full bg-white rounded-lg" }, us = { class: "abso
912
912
  i = _(a.value, $), i.on("accept", f), i.on("complete", f);
913
913
  const w = d(o.value);
914
914
  i.unmaskedValue = w;
915
- }), At(() => {
915
+ }), Vt(() => {
916
916
  i?.destroy(), i = null;
917
917
  }), pe(() => t.mask, (_) => {
918
918
  i && i.updateOptions(r(_ || ""));
@@ -1475,7 +1475,7 @@ function Rs(e) {
1475
1475
  const t = Math.floor(e.getFullYear() / 10) * 10 + 9;
1476
1476
  return Tn(new Date(t, 11, 31));
1477
1477
  }
1478
- const Vt = (e) => e.getFullYear(), Rn = (e) => Math.floor(e.getFullYear() / 10) * 10;
1478
+ const Dt = (e) => e.getFullYear(), Rn = (e) => Math.floor(e.getFullYear() / 10) * 10;
1479
1479
  function Ns(e) {
1480
1480
  const t = [];
1481
1481
  let n = cn(e.start);
@@ -1805,19 +1805,19 @@ const cl = /* @__PURE__ */ qe(ei, [["render", si]]), ii = me({
1805
1805
  }
1806
1806
  },
1807
1807
  setup(e, { emit: t }) {
1808
- const n = h(() => Bs(e.pageDate)), l = h(() => Rs(e.pageDate)), o = ($, w, k) => !w && !k ? !0 : !(w && Vt($) < Vt(w) || k && Vt($) > Vt(k)), a = h(() => zs({
1808
+ const n = h(() => Bs(e.pageDate)), l = h(() => Rs(e.pageDate)), o = ($, w, k) => !w && !k ? !0 : !(w && Dt($) < Dt(w) || k && Dt($) > Dt(k)), a = h(() => zs({
1809
1809
  start: n.value,
1810
1810
  end: l.value
1811
1811
  }).map(
1812
1812
  ($) => ({
1813
1813
  value: $,
1814
- key: String(Vt($)),
1815
- display: Vt($),
1816
- selected: !!e.selected && Vt($) === Vt(e.selected),
1814
+ key: String(Dt($)),
1815
+ display: Dt($),
1816
+ selected: !!e.selected && Dt($) === Dt(e.selected),
1817
1817
  disabled: !o($, e.lowerLimit, e.upperLimit)
1818
1818
  })
1819
1819
  )), i = h(() => {
1820
- const $ = Vt(n.value), w = Vt(l.value);
1820
+ const $ = Dt(n.value), w = Dt(l.value);
1821
1821
  return `${$} - ${w}`;
1822
1822
  }), r = h(
1823
1823
  () => e.lowerLimit && (Rn(e.lowerLimit) === Rn(e.pageDate) || An(e.pageDate, e.lowerLimit))
@@ -1901,7 +1901,7 @@ const di = /* @__PURE__ */ qe(ii, [["render", ui]]), ci = me({
1901
1901
  selected: !!e.selected && Il(e.selected, w),
1902
1902
  disabled: !a(w, e.lowerLimit, e.upperLimit)
1903
1903
  })
1904
- )), r = h(() => Vt(n.value)), d = h(
1904
+ )), r = h(() => Dt(n.value)), d = h(
1905
1905
  () => e.lowerLimit && (xa(e.lowerLimit, e.pageDate) || An(e.pageDate, e.lowerLimit))
1906
1906
  ), f = h(
1907
1907
  () => e.upperLimit && (xa(e.upperLimit, e.pageDate) || Vn(e.pageDate, e.upperLimit))
@@ -2464,7 +2464,7 @@ const Vi = /* @__PURE__ */ qe(yi, [["render", Ai]]), jn = ["time", "day", "month
2464
2464
  _.value = !0, v.value && Ze(() => {
2465
2465
  K();
2466
2466
  });
2467
- }), At(() => {
2467
+ }), Vt(() => {
2468
2468
  S();
2469
2469
  }), pe(v, (le) => {
2470
2470
  le ? Ze(() => {
@@ -2577,7 +2577,7 @@ const Vi = /* @__PURE__ */ qe(yi, [["render", Ai]]), jn = ["time", "day", "month
2577
2577
  };
2578
2578
  at(() => {
2579
2579
  window.addEventListener("resize", Ne), window.addEventListener("scroll", Ne, !0), document.addEventListener("pointerdown", We, !0);
2580
- }), At(() => {
2580
+ }), Vt(() => {
2581
2581
  $ !== null && (cancelAnimationFrame($), $ = null), window.removeEventListener("resize", Ne), window.removeEventListener("scroll", Ne, !0), document.removeEventListener("pointerdown", We, !0);
2582
2582
  });
2583
2583
  const We = (le) => {
@@ -3166,7 +3166,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3166
3166
  ])
3167
3167
  ], 8, Gi));
3168
3168
  }
3169
- }), Dt = /* @__PURE__ */ qe(Zi, [["__scopeId", "data-v-b03cac5c"]]), Gl = (e) => e ? e.split(",").map((t) => t.trim().toLowerCase()).filter(Boolean).map((t) => t.startsWith(".") ? t.slice(1) : t) : [], Xl = (e, t) => !t || e.size <= t * 1024 * 1024 ? !0 : (Ae({
3169
+ }), It = /* @__PURE__ */ qe(Zi, [["__scopeId", "data-v-b03cac5c"]]), Gl = (e) => e ? e.split(",").map((t) => t.trim().toLowerCase()).filter(Boolean).map((t) => t.startsWith(".") ? t.slice(1) : t) : [], Xl = (e, t) => !t || e.size <= t * 1024 * 1024 ? !0 : (Ae({
3170
3170
  type: "error",
3171
3171
  title: "Помилка!",
3172
3172
  message: `Файл "${e.name}" занадто великий. Максимальний розмір: ${t} МБ`,
@@ -3320,21 +3320,21 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3320
3320
  onChange: K,
3321
3321
  disabled: i.value || G.disabled
3322
3322
  }, null, 40, Qi),
3323
- $.value ? (u(), be(Dt, {
3323
+ $.value ? (u(), be(It, {
3324
3324
  key: 0,
3325
3325
  item: $.value,
3326
3326
  value: l.value,
3327
3327
  "onUpdate:value": F[0] || (F[0] = (O) => l.value = O)
3328
3328
  }, null, 8, ["item", "value"])) : Y("", !0),
3329
3329
  n.multiple ? (u(), m(Me, { key: 1 }, [
3330
- (u(!0), m(Me, null, Pe(_.value, (O, B) => (u(), be(Dt, {
3330
+ (u(!0), m(Me, null, Pe(_.value, (O, B) => (u(), be(It, {
3331
3331
  key: `${B}-${E(O)}`,
3332
3332
  multiple: !0,
3333
3333
  item: O,
3334
3334
  value: l.value,
3335
3335
  "onUpdate:value": F[1] || (F[1] = (T) => l.value = T)
3336
3336
  }, null, 8, ["item", "value"]))), 128)),
3337
- (u(!0), m(Me, null, Pe(S.value, (O) => (u(), be(Dt, {
3337
+ (u(!0), m(Me, null, Pe(S.value, (O) => (u(), be(It, {
3338
3338
  key: O.key,
3339
3339
  action: "",
3340
3340
  "is-uploading": !0,
@@ -3342,21 +3342,21 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3342
3342
  "progress-percent": O.progressPercent,
3343
3343
  title: O.file.name
3344
3344
  }, null, 8, ["progress-percent", "title"]))), 128)),
3345
- Z(Dt, {
3345
+ Z(It, {
3346
3346
  action: "",
3347
3347
  "is-uploading": !1,
3348
3348
  disabled: G.disabled || i.value,
3349
3349
  title: "Добавить файлы",
3350
3350
  onClick: x
3351
3351
  }, null, 8, ["disabled"])
3352
- ], 64)) : !n.multiple && !C.value ? (u(), be(Dt, {
3352
+ ], 64)) : !n.multiple && !C.value ? (u(), be(It, {
3353
3353
  key: 2,
3354
3354
  action: "",
3355
3355
  "is-uploading": !1,
3356
3356
  disabled: G.disabled || i.value,
3357
3357
  title: "Обновить файл",
3358
3358
  onClick: x
3359
- }, null, 8, ["disabled"])) : C.value ? (u(), be(Dt, {
3359
+ }, null, 8, ["disabled"])) : C.value ? (u(), be(It, {
3360
3360
  key: 3,
3361
3361
  action: "",
3362
3362
  "is-uploading": !0,
@@ -3509,26 +3509,26 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3509
3509
  disabled: o.value || t.disabled,
3510
3510
  onChange: F
3511
3511
  }, null, 40, lu),
3512
- d.value ? (u(!0), m(Me, { key: 0 }, Pe($.value, (T, H) => (u(), be(Dt, {
3512
+ d.value ? (u(!0), m(Me, { key: 0 }, Pe($.value, (T, H) => (u(), be(It, {
3513
3513
  key: `${H}-${E(T)}`,
3514
3514
  multiple: !0,
3515
3515
  item: T,
3516
3516
  value: n.value,
3517
3517
  "onUpdate:value": B[0] || (B[0] = (fe) => n.value = fe)
3518
- }, null, 8, ["item", "value"]))), 128)) : w.value ? (u(), be(Dt, {
3518
+ }, null, 8, ["item", "value"]))), 128)) : w.value ? (u(), be(It, {
3519
3519
  key: 1,
3520
3520
  item: w.value,
3521
3521
  value: n.value,
3522
3522
  "onUpdate:value": B[1] || (B[1] = (T) => n.value = T)
3523
3523
  }, null, 8, ["item", "value"])) : Y("", !0),
3524
- d.value ? (u(!0), m(Me, { key: 2 }, Pe(v.value, (T) => (u(), be(Dt, {
3524
+ d.value ? (u(!0), m(Me, { key: 2 }, Pe(v.value, (T) => (u(), be(It, {
3525
3525
  key: T.key,
3526
3526
  action: "",
3527
3527
  "is-uploading": !0,
3528
3528
  disabled: !0,
3529
3529
  "progress-percent": T.progressPercent,
3530
3530
  title: T.file.name
3531
- }, null, 8, ["progress-percent", "title"]))), 128)) : x.value ? (u(), be(Dt, {
3531
+ }, null, 8, ["progress-percent", "title"]))), 128)) : x.value ? (u(), be(It, {
3532
3532
  key: 3,
3533
3533
  action: "",
3534
3534
  "is-uploading": !0,
@@ -3536,7 +3536,7 @@ const Ri = /* @__PURE__ */ qe(Ii, [["render", Bi]]), Ni = /* @__PURE__ */ me({
3536
3536
  "progress-percent": x.value.progressPercent,
3537
3537
  title: x.value.file.name
3538
3538
  }, null, 8, ["progress-percent", "title"])) : Y("", !0),
3539
- Z(Dt, {
3539
+ Z(It, {
3540
3540
  action: "",
3541
3541
  "is-uploading": !1,
3542
3542
  disabled: t.disabled || o.value,
@@ -3646,7 +3646,7 @@ const uu = { class: "vs-input-file64 flex flex-col gap-2" }, du = { class: "flex
3646
3646
  [() => l.value, _],
3647
3647
  () => b(),
3648
3648
  { immediate: !0, deep: !0 }
3649
- ), At(() => {
3649
+ ), Vt(() => {
3650
3650
  k();
3651
3651
  });
3652
3652
  const C = () => {
@@ -4677,7 +4677,7 @@ const $d = /* @__PURE__ */ me({
4677
4677
  get: () => n.modelValue,
4678
4678
  set: (U) => l("update:modelValue", U)
4679
4679
  });
4680
- !r.value && n.defaultValue && (r.value = n.defaultValue);
4680
+ (r.value === null || r.value === void 0 || r.value === "") && n.defaultValue != null && (r.value = n.defaultValue);
4681
4681
  const d = V(null), f = V(null), _ = V(null), $ = V(null), w = V(!1), k = V(!1), v = V(null), x = V(-1), b = V([]), S = V(""), C = V(null), E = (U) => {
4682
4682
  f.value = U;
4683
4683
  }, D = (U) => {
@@ -4692,7 +4692,7 @@ const $d = /* @__PURE__ */ me({
4692
4692
  if (!B.value.length) return [];
4693
4693
  const U = Le.value, ae = new Map(U.map((_e) => [_e.id?.toString(), _e]));
4694
4694
  return B.value.map((_e) => ae.get(_e?.toString())).filter((_e) => !!_e);
4695
- }), H = h(() => n.placeholder || "Select..."), fe = h(() => he(v.value)), ke = h(() => a.value ? !1 : o.value ? B.value.length > 0 : !!r.value), ee = (U) => o.value ? B.value.some((ae) => ae?.toString() === U?.toString()) : r.value?.toString() === U?.toString(), ne = h(() => {
4695
+ }), H = h(() => n.placeholder || "Select..."), fe = h(() => he(v.value)), ke = h(() => a.value ? !1 : o.value ? B.value.length > 0 : r.value !== null && r.value !== void 0 && r.value !== ""), ee = (U) => o.value ? B.value.some((ae) => ae?.toString() === U?.toString()) : r.value?.toString() === U?.toString(), ne = h(() => {
4696
4696
  let U = Le.value ?? [];
4697
4697
  if (!n.data && S.value.trim() !== "") {
4698
4698
  const ae = S.value.toLowerCase();
@@ -5107,7 +5107,7 @@ const $d = /* @__PURE__ */ me({
5107
5107
  ], 512)
5108
5108
  ], 64));
5109
5109
  }
5110
- }), Ma = /* @__PURE__ */ qe(ec, [["__scopeId", "data-v-49a64961"]]), Jl = (e = "") => `${e}${Math.floor(Math.random() * 1e4)}`, tc = ["disabled", "aria-expanded"], nc = { class: "truncate" }, lc = { class: "py-2 px-4" }, ac = { class: "block font-medium text-[13px] text-foreground" }, oc = { class: "truncate" }, rc = { class: "p-1 border-t border-gray-200" }, sc = { class: "space-y-0.5 max-h-48 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-none [&::-webkit-scrollbar-track]:bg-scrollbar-track [&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb" }, ic = ["onClick"], uc = ["checked"], dc = { class: "shrink-0 size-3.5 flex justify-center items-center" }, cc = {
5110
+ }), Ma = /* @__PURE__ */ qe(ec, [["__scopeId", "data-v-9b686f27"]]), Jl = (e = "") => `${e}${Math.floor(Math.random() * 1e4)}`, tc = ["disabled", "aria-expanded"], nc = { class: "truncate" }, lc = { class: "py-2 px-4" }, ac = { class: "block font-medium text-[13px] text-foreground" }, oc = { class: "truncate" }, rc = { class: "p-1 border-t border-gray-200" }, sc = { class: "space-y-0.5 max-h-48 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-none [&::-webkit-scrollbar-track]:bg-scrollbar-track [&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb" }, ic = ["onClick"], uc = ["checked"], dc = { class: "shrink-0 size-3.5 flex justify-center items-center" }, cc = {
5111
5111
  key: 1,
5112
5112
  class: "shrink-0 size-2 block mx-auto rounded-full bg-secondary/60"
5113
5113
  }, fc = { class: "truncate" }, pc = {
@@ -5380,7 +5380,7 @@ const $d = /* @__PURE__ */ me({
5380
5380
  }),
5381
5381
  emits: ["update:modelValue"],
5382
5382
  setup(e) {
5383
- const t = jo(() => import("./vs-richtext-B7BofYig.js")), n = e, l = ze(e, "modelValue"), o = h(() => !!n.disabled), a = h(() => n.placeholder ?? ""), i = h(() => ({
5383
+ const t = jo(() => import("./vs-richtext-CqABxjuN.js")), n = e, l = ze(e, "modelValue"), o = h(() => !!n.disabled), a = h(() => n.placeholder ?? ""), i = h(() => ({
5384
5384
  height: n.richtextProps.height || "300px",
5385
5385
  format: n.format,
5386
5386
  ...n.richtextProps
@@ -5880,7 +5880,7 @@ const wc = /* @__PURE__ */ qe(yc, [["render", bc]]), xc = { class: "bg-white rou
5880
5880
  }, 8, ["visible", "title"])
5881
5881
  ]));
5882
5882
  }
5883
- }), Jc = /* @__PURE__ */ qe(Zc, [["__scopeId", "data-v-34b73a50"]]), Qc = {}, ef = {
5883
+ }), Jc = /* @__PURE__ */ qe(Zc, [["__scopeId", "data-v-431e019f"]]), Qc = {}, ef = {
5884
5884
  xmlns: "http://www.w3.org/2000/svg",
5885
5885
  viewBox: "0 0 24 24",
5886
5886
  fill: "none",
@@ -6062,7 +6062,7 @@ const vf = ["title", "aria-expanded"], gf = ["src"], yf = { class: "map-layers__
6062
6062
  Q && (await Ze(), T());
6063
6063
  }), at(() => {
6064
6064
  document.addEventListener("click", ge), document.addEventListener("keydown", X), window.addEventListener("resize", T), window.addEventListener("scroll", T, !0);
6065
- }), At(() => {
6065
+ }), Vt(() => {
6066
6066
  document.removeEventListener("click", ge), document.removeEventListener("keydown", X), window.removeEventListener("resize", T), window.removeEventListener("scroll", T, !0);
6067
6067
  }), (Q, ie) => S.value ? (u(), m("div", {
6068
6068
  key: 0,
@@ -6545,7 +6545,7 @@ const Uf = ["title"], Hf = {
6545
6545
  }
6546
6546
  at(() => {
6547
6547
  B.value = X(), window.addEventListener("click", Ie, !0), window.addEventListener("scroll", J, !0), window.addEventListener("resize", J);
6548
- }), At(() => {
6548
+ }), Vt(() => {
6549
6549
  window.removeEventListener("click", Ie, !0), window.removeEventListener("scroll", J, !0), window.removeEventListener("resize", J), N();
6550
6550
  });
6551
6551
  function Le(A) {
@@ -7732,7 +7732,7 @@ const fp = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
7732
7732
  () => l.map,
7733
7733
  () => k(),
7734
7734
  { immediate: !0 }
7735
- ), At(() => {
7735
+ ), Vt(() => {
7736
7736
  $(l.map);
7737
7737
  }), (v, x) => null;
7738
7738
  }
@@ -10567,7 +10567,7 @@ const sm = { class: "vs-map-body" }, im = {
10567
10567
  if (t.inputType === "mask")
10568
10568
  for (let x = 0; x < n.value; x += 1)
10569
10569
  d.value[x] && $(d.value[x], x);
10570
- }), At(() => {
10570
+ }), Vt(() => {
10571
10571
  Object.values(f.value).forEach((x) => {
10572
10572
  x && x.destroy();
10573
10573
  });
@@ -11092,7 +11092,7 @@ const sm = { class: "vs-map-body" }, im = {
11092
11092
  }), d = V(!1), f = V([]), _ = V(!1), $ = V(null);
11093
11093
  pe(_, (F) => {
11094
11094
  typeof document > "u" || (F ? ($.value = document.body.style.overflow, document.body.style.overflow = "hidden") : $.value != null ? (document.body.style.overflow = $.value, $.value = null) : document.body.style.removeProperty("overflow"));
11095
- }), At(() => {
11095
+ }), Vt(() => {
11096
11096
  typeof document > "u" || ($.value != null ? document.body.style.overflow = $.value : document.body.style.removeProperty("overflow"));
11097
11097
  });
11098
11098
  const w = h(() => l.placeholder ?? ""), k = h(() => !!l.disabled), v = (F) => {
@@ -11684,7 +11684,7 @@ const sm = { class: "vs-map-body" }, im = {
11684
11684
  } catch (v) {
11685
11685
  console.error("Failed to load Monaco editor", v);
11686
11686
  }
11687
- }), At(() => {
11687
+ }), Vt(() => {
11688
11688
  i && (i.dispose(), i = null);
11689
11689
  }), t({
11690
11690
  focus: $,
@@ -12065,7 +12065,7 @@ const sm = { class: "vs-map-body" }, im = {
12065
12065
  { immediate: !0 }
12066
12066
  ), at(() => {
12067
12067
  n.scrollContainer || S(null), C();
12068
- }), At(() => {
12068
+ }), Vt(() => {
12069
12069
  G(), S(null, !0), w = null, typeof window < "u" && (_ && window.cancelAnimationFrame(_), $ && window.cancelAnimationFrame($));
12070
12070
  });
12071
12071
  function S(H, fe = !1) {
@@ -12178,7 +12178,7 @@ const sm = { class: "vs-map-body" }, im = {
12178
12178
  ])
12179
12179
  ], 6)) : Y("", !0);
12180
12180
  }
12181
- }), iy = /* @__PURE__ */ qe(sy, [["__scopeId", "data-v-1584a562"]]), It = {
12181
+ }), iy = /* @__PURE__ */ qe(sy, [["__scopeId", "data-v-1584a562"]]), At = {
12182
12182
  required: "Це поле є обов’язковим",
12183
12183
  email: "Неправильний email",
12184
12184
  tel: "Неправильний телефон",
@@ -12186,23 +12186,23 @@ const sm = { class: "vs-map-body" }, im = {
12186
12186
  maxlength: (e) => `Максимальна довжина — ${e} символів`,
12187
12187
  min: (e) => `Значення має бути не менше ${e}`,
12188
12188
  max: (e) => `Значення має бути не більше ${e}`
12189
- }, uy = (e) => typeof e == "string" ? e.trim() ? !1 : It.required : Array.isArray(e) ? e.map((n) => typeof n == "string" ? n.trim() : n).filter((n) => n != null && n !== "").length ? !1 : It.required : typeof e == "number" ? Number?.isNaN(e) ? It?.required : !1 : e ? !1 : It.required, dy = (e) => {
12189
+ }, uy = /* @__PURE__ */ new Set(["select", "inline-select", "array-select"]), dy = (e, t) => typeof e == "string" ? e.trim() ? !1 : At.required : Array.isArray(e) ? e.map((l) => typeof l == "string" ? l.trim() : l).filter((l) => l != null && l !== "").length ? !1 : At.required : typeof e == "number" ? Number?.isNaN(e) ? At?.required : !1 : typeof e == "boolean" ? t && uy.has(t) || e ? !1 : At.required : e ? !1 : At.required, cy = (e) => {
12190
12190
  const t = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
12191
- return e ? t.test(e) ? !1 : It.email : !1;
12192
- }, cy = (e, t) => {
12191
+ return e ? t.test(e) ? !1 : At.email : !1;
12192
+ }, fy = (e, t) => {
12193
12193
  if (!e) return !1;
12194
12194
  const n = String(e).trim();
12195
- if (!/^\+[1-9]\d{1,14}$/.test(n)) return It.tel;
12195
+ if (!/^\+[1-9]\d{1,14}$/.test(n)) return At.tel;
12196
12196
  const a = (typeof t?.digits == "number" && Number.isFinite(t.digits) && t.digits > 0 ? t.digits : tn(Gt)) || tn(Gt);
12197
- return n.length - 1 !== a ? It.tel : !1;
12198
- }, io = (e) => e == null ? 0 : typeof e == "string" ? e.trim().length : Array.isArray(e) ? e.length : typeof e == "number" ? e.toString().length : String(e).length, fy = (e, t) => {
12197
+ return n.length - 1 !== a ? At.tel : !1;
12198
+ }, io = (e) => e == null ? 0 : typeof e == "string" ? e.trim().length : Array.isArray(e) ? e.length : typeof e == "number" ? e.toString().length : String(e).length, py = (e, t) => {
12199
12199
  if (e == null) return !1;
12200
12200
  const n = Number(t?.value ?? t?.length);
12201
- return Number.isFinite(n) && io(e) < n ? t?.message || It.minlength(n) : !1;
12202
- }, py = (e, t) => {
12201
+ return Number.isFinite(n) && io(e) < n ? t?.message || At.minlength(n) : !1;
12202
+ }, my = (e, t) => {
12203
12203
  if (e == null || e === "") return !1;
12204
12204
  const n = Number(t?.value ?? t?.length);
12205
- return Number.isFinite(n) && io(e) > n ? t?.message || It.maxlength(n) : !1;
12205
+ return Number.isFinite(n) && io(e) > n ? t?.message || At.maxlength(n) : !1;
12206
12206
  }, tl = (e) => {
12207
12207
  if (typeof e == "number") return e;
12208
12208
  if (typeof e == "string") {
@@ -12210,19 +12210,19 @@ const sm = { class: "vs-map-body" }, im = {
12210
12210
  return t ? Number(t) : Number.NaN;
12211
12211
  }
12212
12212
  return Number(e);
12213
- }, my = (e, t) => {
12213
+ }, vy = (e, t) => {
12214
12214
  if (e == null || e === "") return !1;
12215
12215
  const n = Number(t?.value);
12216
12216
  if (!Number.isFinite(n)) return !1;
12217
12217
  const l = tl(e);
12218
- return Number.isFinite(l) && l < n ? t?.message || It.min(n) : !1;
12219
- }, vy = (e, t) => {
12218
+ return Number.isFinite(l) && l < n ? t?.message || At.min(n) : !1;
12219
+ }, gy = (e, t) => {
12220
12220
  if (e == null || e === "") return !1;
12221
12221
  const n = Number(t?.value);
12222
12222
  if (!Number.isFinite(n)) return !1;
12223
12223
  const l = tl(e);
12224
- return Number.isFinite(l) && l > n ? t?.message || It.max(n) : !1;
12225
- }, gy = (e, t, n) => {
12224
+ return Number.isFinite(l) && l > n ? t?.message || At.max(n) : !1;
12225
+ }, yy = (e, t, n) => {
12226
12226
  if (e == null || e === "") return !1;
12227
12227
  const l = t?.field;
12228
12228
  if (!l || !n) return !1;
@@ -12230,39 +12230,39 @@ const sm = { class: "vs-map-body" }, im = {
12230
12230
  if (o == null || o === "") return !1;
12231
12231
  const a = tl(e), i = tl(o);
12232
12232
  return !Number.isFinite(a) || !Number.isFinite(i) ? !1 : a > i ? t?.message || `Значення має бути не більше ${i}` : !1;
12233
- }, yy = (e, t) => {
12233
+ }, hy = (e, t) => {
12234
12234
  const n = t.pattern ?? t.regexp, l = typeof n == "string" ? new RegExp(n) : n;
12235
12235
  if (Array.isArray(e)) {
12236
12236
  const o = e.filter(Boolean);
12237
12237
  return o.length === 0 || o.every((a) => l.test(a)) ? !1 : t.message;
12238
12238
  }
12239
12239
  return !l.test(e) && e ? t.message : !1;
12240
- }, hy = (e, t) => !1, by = (e, t, n) => {
12240
+ }, by = (e, t) => !1, wy = (e, t, n, l) => {
12241
12241
  switch (typeof t == "string" ? t : t.type) {
12242
12242
  case "required":
12243
- return uy(e);
12243
+ return dy(e, l);
12244
12244
  case "email":
12245
- return dy(e);
12245
+ return cy(e);
12246
12246
  case "tel":
12247
- return cy(e, typeof t == "object" ? t : void 0);
12247
+ return fy(e, typeof t == "object" ? t : void 0);
12248
12248
  case "regexp":
12249
- return yy(e, t);
12249
+ return hy(e, t);
12250
12250
  case "minlength":
12251
- return fy(e, t);
12252
- case "maxlength":
12253
12251
  return py(e, t);
12254
- case "min":
12252
+ case "maxlength":
12255
12253
  return my(e, t);
12256
- case "max":
12254
+ case "min":
12257
12255
  return vy(e, t);
12256
+ case "max":
12257
+ return gy(e, t);
12258
12258
  case "maxField":
12259
- return gy(e, t, n);
12259
+ return yy(e, t, n);
12260
12260
  case "custom":
12261
- return hy();
12261
+ return by();
12262
12262
  default:
12263
12263
  return !1;
12264
12264
  }
12265
- }, wy = {
12265
+ }, xy = {
12266
12266
  autocomplete: "select",
12267
12267
  combobox: "select",
12268
12268
  datepicker: "date",
@@ -12278,7 +12278,7 @@ const sm = { class: "vs-map-body" }, im = {
12278
12278
  };
12279
12279
  function Fa(e) {
12280
12280
  const t = e?.toLowerCase();
12281
- return wy[t] || t;
12281
+ return xy[t] || t;
12282
12282
  }
12283
12283
  function El(e, t = !1) {
12284
12284
  if (Array.isArray(e)) {
@@ -12309,7 +12309,7 @@ function El(e, t = !1) {
12309
12309
  l[1].type?.includes("list") && (o.multiple = !0), !o.api && l[1].data && (o.api = `/api/suggest/${l[1].data}`), Array.isArray(o.schema) && (o.schema = El(o.schema, o.disabled)), n.push(o);
12310
12310
  }), n;
12311
12311
  }
12312
- function xy(e, t, n = !1) {
12312
+ function ky(e, t, n = !1) {
12313
12313
  const l = h(() => El(
12314
12314
  (Array.isArray(t), t),
12315
12315
  typeof n == "boolean" ? n : n.value
@@ -12339,7 +12339,12 @@ function xy(e, t, n = !1) {
12339
12339
  }
12340
12340
  let E = !1, D = null;
12341
12341
  C.forEach((K) => {
12342
- const G = by(e.value[w.name], K, e.value);
12342
+ const G = wy(
12343
+ e.value[w.name],
12344
+ K,
12345
+ e.value,
12346
+ w.type
12347
+ );
12343
12348
  G && (E = !0, !D && typeof G == "string" && (D = G));
12344
12349
  }), E && D ? o.value[w.name] = D : delete o.value[w.name];
12345
12350
  }
@@ -12368,7 +12373,7 @@ function xy(e, t, n = !1) {
12368
12373
  visibleSchema: _
12369
12374
  };
12370
12375
  }
12371
- const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12376
+ const _y = { class: "flex w-full h-full min-h-0 gap-6" }, $y = {
12372
12377
  key: 0,
12373
12378
  "data-orientation": "horizontal",
12374
12379
  role: "none",
@@ -12406,7 +12411,7 @@ const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12406
12411
  validate: $,
12407
12412
  reset: w,
12408
12413
  visibleSchema: k
12409
- } = xy(f, o.schema, Ho(o, "disabled")), v = V(null), x = V(null), b = V({}), S = h(() => o.navigation), C = h(() => o.navWidth), E = h(() => o.style?.columns), D = Object.freeze({ container: 12, label: 3 }), K = h(() => o.columns ?? E.value ?? D), G = h(() => o.columns != null || E.value != null), F = h(() => G.value ? "horizontal" : o.layout), O = (X) => X?.columns ? "horizontal" : F.value, B = (X) => X?.columns ?? K.value, T = h(() => {
12414
+ } = ky(f, o.schema, Ho(o, "disabled")), v = V(null), x = V(null), b = V({}), S = h(() => o.navigation), C = h(() => o.navWidth), E = h(() => o.style?.columns), D = Object.freeze({ container: 12, label: 3 }), K = h(() => o.columns ?? E.value ?? D), G = h(() => o.columns != null || E.value != null), F = h(() => G.value ? "horizontal" : o.layout), O = (X) => X?.columns ? "horizontal" : F.value, B = (X) => X?.columns ?? K.value, T = h(() => {
12410
12415
  const X = {}, Q = (ie) => {
12411
12416
  if (!ie) return;
12412
12417
  (Array.isArray(ie) ? ie.map((j, J) => ({ key: String(J), entry: j })) : typeof ie == "object" ? Object.entries(ie).map(([j, J]) => ({ key: j, entry: J })) : []).forEach(({ key: j, entry: J }) => {
@@ -12459,7 +12464,7 @@ const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12459
12464
  ne(X);
12460
12465
  },
12461
12466
  { immediate: !0, deep: !0 }
12462
- ), yn("form", i), yn("values", f), Je("form-root-values", null) || yn("form-root-values", f), yn("field-props", b), yn("schema-by-name", T), (X, Q) => (u(), m("div", ky, [
12467
+ ), yn("form", i), yn("values", f), Je("form-root-values", null) || yn("form-root-values", f), yn("field-props", b), yn("schema-by-name", T), (X, Q) => (u(), m("div", _y, [
12463
12468
  c("div", {
12464
12469
  class: "flex-1 min-h-0 overflow-y-auto overflow-x-visible",
12465
12470
  ref_key: "formScrollContainer",
@@ -12489,7 +12494,7 @@ const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12489
12494
  error: z(_)[ie.name],
12490
12495
  onValueSelected: fe
12491
12496
  }, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
12492
- O(ie) === "settings" && he + 1 !== z(k).length ? (u(), m("div", _y)) : Y("", !0)
12497
+ O(ie) === "settings" && he + 1 !== z(k).length ? (u(), m("div", $y)) : Y("", !0)
12493
12498
  ], 2))), 128))
12494
12499
  ], 34)
12495
12500
  ], 512),
@@ -12501,7 +12506,7 @@ const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12501
12506
  }, null, 8, ["target", "scroll-container", "enabled", "width"])
12502
12507
  ]));
12503
12508
  }
12504
- }), $y = { class: "relative" }, Sy = { class: "w-full h-full fixed top-0 start-0 bg-black bg-opacity-50" }, Cy = { 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" }, My = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Ly = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Ay = { class: "p-4 mim-h-0 h-full overflow-auto" }, Vy = /* @__PURE__ */ me({
12509
+ }), Sy = { class: "relative" }, Cy = { class: "w-full h-full fixed top-0 start-0 bg-black bg-opacity-50" }, My = { 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" }, Ly = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Ay = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Vy = { class: "p-4 mim-h-0 h-full overflow-auto" }, Dy = /* @__PURE__ */ me({
12505
12510
  __name: "modal-edit",
12506
12511
  props: {
12507
12512
  schema: {},
@@ -12659,11 +12664,11 @@ const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12659
12664
  message: b.message || "Unexpected error"
12660
12665
  }), console.error(b);
12661
12666
  }
12662
- }), (b, S) => (u(), m("div", $y, [
12663
- c("div", Sy, [
12664
- c("div", Cy, [
12665
- c("div", My, [
12666
- c("h3", Ly, de(f.value === "add" ? "Додати" : "Змінити"), 1),
12667
+ }), (b, S) => (u(), m("div", Sy, [
12668
+ c("div", Cy, [
12669
+ c("div", My, [
12670
+ c("div", Ly, [
12671
+ c("h3", Ay, de(f.value === "add" ? "Додати" : "Змінити"), 1),
12667
12672
  c("button", {
12668
12673
  onClick: x,
12669
12674
  type: "button",
@@ -12673,7 +12678,7 @@ const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12673
12678
  Z(z(_t), { class: "h-4 w-4 flex-shrink-0" })
12674
12679
  ])
12675
12680
  ]),
12676
- c("div", Ay, [
12681
+ c("div", Vy, [
12677
12682
  o.value ? (u(), be(Nt, {
12678
12683
  key: 0,
12679
12684
  schema: o.value,
@@ -12700,15 +12705,15 @@ const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12700
12705
  ])
12701
12706
  ]));
12702
12707
  }
12703
- }), Dy = zl.form.richtext, Iy = Ul.form.richtext, Py = {
12708
+ }), Iy = zl.form.richtext, Ty = Ul.form.richtext, Oy = {
12704
12709
  en: {
12705
12710
  form: {
12706
- richtext: Dy
12711
+ richtext: Iy
12707
12712
  }
12708
12713
  },
12709
12714
  uk: {
12710
12715
  form: {
12711
- richtext: Iy
12716
+ richtext: Ty
12712
12717
  }
12713
12718
  }
12714
12719
  }, Ea = (e = { mode: "edit", schema: null }) => new Promise((t) => {
@@ -12718,7 +12723,7 @@ const ky = { class: "flex w-full h-full min-h-0 gap-6" }, _y = {
12718
12723
  visible: !0,
12719
12724
  size: "medium",
12720
12725
  closeClickBack: !0,
12721
- content: Vy,
12726
+ content: Dy,
12722
12727
  contentProps: {
12723
12728
  ...e,
12724
12729
  onClose: () => {
@@ -12741,8 +12746,8 @@ export {
12741
12746
  Ml as C,
12742
12747
  vc as D,
12743
12748
  gc as E,
12744
- Dy as F,
12745
- Iy as G,
12749
+ Iy as F,
12750
+ Ty as G,
12746
12751
  Jc as H,
12747
12752
  lv as I,
12748
12753
  pv as J,
@@ -12758,7 +12763,7 @@ export {
12758
12763
  Nt as a,
12759
12764
  Gg as b,
12760
12765
  Vl as c,
12761
- Vy as d,
12766
+ Dy as d,
12762
12767
  Ln as e,
12763
12768
  Br as f,
12764
12769
  Wa as g,
@@ -12772,7 +12777,7 @@ export {
12772
12777
  Zv as o,
12773
12778
  wa as p,
12774
12779
  ji as q,
12775
- Py as r,
12780
+ Oy as r,
12776
12781
  eu as s,
12777
12782
  $l as t,
12778
12783
  Cl as u,