@opengis/gis 0.2.129 → 0.2.130

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.
Files changed (24) hide show
  1. package/dist/{CardIcon-DgpYeKbG.js → CardIcon-BeZkp0PF.js} +1 -1
  2. package/dist/{EntityTablePage-DNdVavT4.js → EntityTablePage-A1oEJgB4.js} +1 -1
  3. package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DQnIBCpE.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-Wr8oJ-ni.js} +24 -22
  4. package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-Cg2y4sIa.js → HeaderActions.vue_vue_type_script_setup_true_lang-6BnXldBs.js} +345 -321
  5. package/dist/{MapSettings-CHF3VpUu.js → MapSettings-EmXkXJ90.js} +12 -12
  6. package/dist/{RastersTablePage-Ci3P3r4c.js → RastersTablePage-Cgecxbky.js} +1 -1
  7. package/dist/cartocss-C29B9mz3.js +1024 -0
  8. package/dist/{import-utils-ElncWVJV.js → import-utils-CFjQD50e.js} +1 -1
  9. package/dist/{index-UGx54M0Q.js → index-1vaLWtnh.js} +377 -386
  10. package/dist/index.css +1 -1
  11. package/dist/index.js +4 -4
  12. package/dist/index.umd.cjs +41 -41
  13. package/dist/raster-DFuH49fc.js +792 -0
  14. package/dist/{register-BfNUPbey.js → register-COO0Y_MS.js} +3 -3
  15. package/dist/{service-DsykdHry.js → service-DagZaIev.js} +911 -879
  16. package/dist/{vs-datatable-D6g7tjZo.js → vs-datatable-BaMRTZVi.js} +1 -1
  17. package/package.json +2 -2
  18. package/server/routes/gis/cartocss/get.cartocss.js +11 -2
  19. package/server/routes/gis/registers/add.registry.js +3 -4
  20. package/server/routes/gis/registers/funcs/columns.js +2 -4
  21. package/server/routes/mapnik/controllers/pretile.js +7 -9
  22. package/server/routes/mapnik/functions/cartoBounds.js +6 -2
  23. package/dist/cartocss-BsaIlSRb.js +0 -894
  24. package/dist/raster-BDWEafwx.js +0 -663
@@ -1,8 +1,8 @@
1
- import { openBlock as m, createElementBlock as v, createElementVNode as s, defineComponent as Y, normalizeClass as we, createVNode as L, createBlock as le, unref as C, defineAsyncComponent as W, ref as b, watch as pe, computed as f, createTextVNode as ke, Fragment as ae, renderList as ue, toDisplayString as z, withCtx as J, nextTick as xe, onMounted as ze, onUnmounted as Ve, withModifiers as Ce, Teleport as Ee, normalizeStyle as Me, createCommentVNode as X } from "vue";
2
- import { _ as Le } from "./index-UGx54M0Q.js";
3
- import { Settings as Te, BrushCleaning as ce, SquareCode as me, Pencil as Se } from "lucide-vue-next";
4
- import { notify as D } from "@opengis/core";
5
- const $e = {}, Ue = {
1
+ import { openBlock as c, createElementBlock as v, createElementVNode as n, defineComponent as ee, normalizeClass as oe, createVNode as U, createBlock as re, unref as M, defineAsyncComponent as K, ref as y, watch as de, computed as b, createTextVNode as pe, Fragment as se, renderList as be, toDisplayString as V, createCommentVNode as q, withCtx as Z, nextTick as ke, onMounted as Ve, onUnmounted as ze, withModifiers as Ce, Teleport as Ee, normalizeStyle as Me } from "vue";
2
+ import { _ as Le } from "./index-1vaLWtnh.js";
3
+ import { Settings as Se, BrushCleaning as ye, SquareCode as fe, Pencil as Te } from "lucide-vue-next";
4
+ import { notify as H } from "@opengis/core";
5
+ const $e = {}, Ie = {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  width: "24",
8
8
  height: "24",
@@ -14,15 +14,15 @@ const $e = {}, Ue = {
14
14
  "stroke-linejoin": "round",
15
15
  class: "inline-block shrink-0"
16
16
  };
17
- function Ie(l, h) {
18
- return m(), v("svg", Ue, [...h[0] || (h[0] = [
19
- s("path", { d: "M8 3 4 7l4 4" }, null, -1),
20
- s("path", { d: "M4 7h16" }, null, -1),
21
- s("path", { d: "m16 21 4-4-4-4" }, null, -1),
22
- s("path", { d: "M20 17H4" }, null, -1)
17
+ function Ue(l, z) {
18
+ return c(), v("svg", Ie, [...z[0] || (z[0] = [
19
+ n("path", { d: "M8 3 4 7l4 4" }, null, -1),
20
+ n("path", { d: "M4 7h16" }, null, -1),
21
+ n("path", { d: "m16 21 4-4-4-4" }, null, -1),
22
+ n("path", { d: "M20 17H4" }, null, -1)
23
23
  ])]);
24
24
  }
25
- const je = /* @__PURE__ */ Le($e, [["render", Ie]]), Ae = ["aria-label"], bt = /* @__PURE__ */ Y({
25
+ const Be = /* @__PURE__ */ Le($e, [["render", Ue]]), Ne = ["aria-label"], bt = /* @__PURE__ */ ee({
26
26
  __name: "PanelToggleButton",
27
27
  props: {
28
28
  open: { type: Boolean },
@@ -30,30 +30,30 @@ const je = /* @__PURE__ */ Le($e, [["render", Ie]]), Ae = ["aria-label"], bt = /
30
30
  },
31
31
  emits: ["toggle"],
32
32
  setup(l) {
33
- return (h, u) => (m(), v("button", {
33
+ return (z, m) => (c(), v("button", {
34
34
  type: "button",
35
- onClick: u[0] || (u[0] = (B) => h.$emit("toggle")),
36
- class: we([
35
+ onClick: m[0] || (m[0] = (j) => z.$emit("toggle")),
36
+ class: oe([
37
37
  "absolute right-0 w-5 h-9 shrink-0 rounded-l-lg inline-flex items-center justify-center",
38
38
  "text-gray-600 hover:bg-gray-100 hover:text-gray-800 transition border border-gray-100 shadow-md bg-white z-[21]",
39
39
  l.topClass
40
40
  ]),
41
41
  "aria-label": l.open ? "Закрити панель" : "Відкрити панель"
42
42
  }, [
43
- L(je, { class: "h-3 w-3" })
44
- ], 10, Ae));
43
+ U(Be, { class: "h-3 w-3" })
44
+ ], 10, Ne));
45
45
  }
46
- }), ft = /* @__PURE__ */ Y({
46
+ }), yt = /* @__PURE__ */ ee({
47
47
  __name: "SettingsIcon",
48
48
  setup(l) {
49
- return (h, u) => (m(), le(C(Te), {
49
+ return (z, m) => (c(), re(M(Se), {
50
50
  size: 16,
51
51
  class: "lucide lucide-settings"
52
52
  }));
53
53
  }
54
54
  });
55
- function Fe(l) {
56
- const h = [
55
+ function je(l) {
56
+ const m = (e) => typeof e != "number" || Number.isNaN(e) ? "" : Number(e.toFixed(5)).toFixed(5), j = [
57
57
  {
58
58
  name: "description",
59
59
  type: "textarea",
@@ -88,10 +88,10 @@ function Fe(l) {
88
88
  col: 6,
89
89
  data: "yes_no"
90
90
  }
91
- ], u = (e, _) => {
92
- const j = Array.isArray(e == null ? void 0 : e.config) ? e.config[0] : null;
93
- return l.normalizeValue(j == null ? void 0 : j[_]);
94
- }, B = (e) => !Array.isArray(e == null ? void 0 : e.bounds) || e.bounds.length < 4 ? "" : e.bounds.map((_) => String(_)).join(", "), y = (e) => !Array.isArray(e == null ? void 0 : e.bounds) || e.bounds.length < 4 ? "" : e.bounds.map((_) => String(_)).join(", "), H = (e) => !Array.isArray(e == null ? void 0 : e.bands) || !e.bands.length ? "" : e.bands.join(", "), p = (e) => typeof e != "boolean" ? "" : e ? "Так" : "Ні", T = [
91
+ ], p = (e, h) => {
92
+ const x = Array.isArray(e == null ? void 0 : e.config) ? e.config[0] : null;
93
+ return l.normalizeValue(x == null ? void 0 : x[h]);
94
+ }, R = (e) => !Array.isArray(e == null ? void 0 : e.bounds) || e.bounds.length < 4 ? "" : e.bounds.map((h) => m(h)).filter(Boolean).join(", "), d = (e) => !Array.isArray(e == null ? void 0 : e.extent) || e.extent.length < 4 ? "" : e.extent.map((h) => m(h)).filter(Boolean).join(", "), F = (e) => !Array.isArray(e == null ? void 0 : e.bands) || !e.bands.length ? "" : e.bands.join(", "), w = (e) => typeof e != "boolean" ? "" : e ? "Так" : "Ні", L = [
95
95
  { label: "Група", value: (e) => l.normalizeValue((e == null ? void 0 : e.group_name) ?? l.resolvedGroupName ?? (e == null ? void 0 : e.group_id)) },
96
96
  { label: "Статус", value: (e) => l.normalizeValue(l.statusLabel(e)) },
97
97
  { label: "Видимість", value: (e) => l.normalizeValue(l.visibilityLabel(e)) },
@@ -118,10 +118,10 @@ function Fe(l) {
118
118
  ];
119
119
  return {
120
120
  service: {
121
- general: T,
121
+ general: L,
122
122
  meta: S,
123
123
  edit: [
124
- ...h,
124
+ ...j,
125
125
  { name: "service_key", type: "text", label: "Ключ сервісу", col: 6 },
126
126
  { name: "producer", type: "text", label: "Виробник", col: 6 },
127
127
  { name: "category", type: "text", label: "Категорія", col: 6 },
@@ -134,10 +134,10 @@ function Fe(l) {
134
134
  ]
135
135
  },
136
136
  dataset: {
137
- general: T,
137
+ general: L,
138
138
  meta: S,
139
139
  edit: [
140
- ...h,
140
+ ...j,
141
141
  { name: "service_key", type: "text", label: "Ключ сервісу", col: 6 },
142
142
  { name: "producer", type: "text", label: "Виробник", col: 6 },
143
143
  { name: "category", type: "text", label: "Категорія", col: 6 },
@@ -156,17 +156,16 @@ function Fe(l) {
156
156
  { label: "Формат", value: (e) => l.normalizeValue(e == null ? void 0 : e.extension) },
157
157
  { label: "SRID", value: (e) => l.normalizeValue(e == null ? void 0 : e.srid) },
158
158
  { label: "Файл джерела", value: (e) => l.normalizeValue(e == null ? void 0 : e.source_path) },
159
- { label: "Кеш", value: (e) => p(e == null ? void 0 : e.cache) },
160
- { label: "XML", value: (e) => p(e == null ? void 0 : e.xml) }
159
+ { label: "Кеш", value: (e) => w(e == null ? void 0 : e.cache) },
160
+ { label: "XML", value: (e) => w(e == null ? void 0 : e.xml) }
161
161
  ],
162
162
  meta: [
163
- { label: "Tile URL", value: (e) => l.normalizeValue(e == null ? void 0 : e.url) },
164
- { label: "Extent", value: (e) => y(e) },
163
+ { label: "Bounds", value: (e) => d(e) },
165
164
  { label: "Розмір", value: (e) => l.normalizeValue(e == null ? void 0 : e.total_size) },
166
165
  { label: "Ширина", value: (e) => l.normalizeValue(e == null ? void 0 : e.width) },
167
166
  { label: "Висота", value: (e) => l.normalizeValue(e == null ? void 0 : e.height) },
168
167
  { label: "Кількість каналів", value: (e) => l.normalizeValue(e == null ? void 0 : e.bands_count) },
169
- { label: "Канали", value: (e) => H(e) },
168
+ { label: "Канали", value: (e) => F(e) },
170
169
  { label: "Роздільна здатність", value: (e) => l.normalizeValue(e == null ? void 0 : e.resolution) },
171
170
  { label: "Глибина кольору", value: (e) => l.normalizeValue(e == null ? void 0 : e.color_depth) },
172
171
  { label: "Стиснення", value: (e) => l.normalizeValue(e == null ? void 0 : e.compression) },
@@ -208,19 +207,14 @@ function Fe(l) {
208
207
  { label: "Статус", value: (e) => l.normalizeValue(l.statusLabel(e)) },
209
208
  { label: "Видимість", value: (e) => l.normalizeValue(l.visibilityLabel(e)) },
210
209
  { label: "Ключ CartoCSS", value: (e) => l.normalizeValue(e == null ? void 0 : e.cartocss_key) },
211
- { label: "Таблиця джерела", value: (e) => u(e, "table") || l.normalizeValue(e == null ? void 0 : e.source_path) },
212
- { label: "Ключ набору", value: (e) => u(e, "key") },
213
- { label: "Авто-картка", value: (e) => p(e == null ? void 0 : e.card_auto) },
214
- { label: "Інфо по кліку", value: (e) => p(e == null ? void 0 : e.info) },
215
- { label: "Статичний", value: (e) => p(e == null ? void 0 : e.is_static) }
210
+ { label: "Таблиця джерела", value: (e) => p(e, "table") || l.normalizeValue(e == null ? void 0 : e.source_path) },
211
+ { label: "Ключ набору", value: (e) => p(e, "key") },
212
+ { label: "Авто-картка", value: (e) => w(e == null ? void 0 : e.card_auto) },
213
+ { label: "Інфо по кліку", value: (e) => w(e == null ? void 0 : e.info) },
214
+ { label: "Статичний", value: (e) => w(e == null ? void 0 : e.is_static) }
216
215
  ],
217
216
  meta: [
218
- { label: "Tile URL", value: (e) => l.normalizeValue(e == null ? void 0 : e.url) },
219
- { label: "Bounds", value: (e) => B(e) },
220
- { label: "SRID", value: (e) => u(e, "srid") },
221
- { label: "Таблиця картки", value: (e) => l.normalizeValue(e == null ? void 0 : e.card_table) },
222
- { label: "Min zoom", value: (e) => u(e, "minzoom") },
223
- { label: "Max zoom", value: (e) => u(e, "maxzoom") }
217
+ { label: "Bounds", value: (e) => R(e) }
224
218
  ],
225
219
  edit: [
226
220
  {
@@ -261,69 +255,66 @@ function Fe(l) {
261
255
  }
262
256
  };
263
257
  }
264
- const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" }, Ne = { class: "border border-gray-200 rounded-lg p-4" }, De = {
258
+ const Fe = { class: "flex-1 overflow-y-auto p-4" }, Ae = { class: "space-y-4" }, Re = { class: "border border-gray-200 rounded-lg p-4" }, De = {
265
259
  key: 0,
266
260
  class: "grid grid-cols-2 gap-2"
267
- }, He = { class: "text-xs text-gray-500 mb-1" }, Oe = { class: "text-sm font-semibold text-gray-900" }, Pe = {
261
+ }, Oe = { class: "text-xs text-gray-500 mb-1" }, He = { class: "text-sm font-semibold text-gray-900" }, Pe = {
268
262
  key: 1,
269
263
  class: "text-sm text-gray-700 leading-relaxed"
270
- }, Ge = { class: "border border-gray-200 rounded-lg p-4" }, qe = { class: "text-sm text-gray-700 leading-relaxed" }, Qe = { class: "border border-gray-200 rounded-lg p-4" }, Xe = {
271
- key: 0,
272
- class: "grid grid-cols-2 gap-2"
273
- }, We = { class: "text-xs text-gray-500 mb-1" }, Je = { class: "text-sm font-semibold text-gray-900" }, Ye = {
264
+ }, Ge = { class: "border border-gray-200 rounded-lg p-4" }, qe = { class: "text-sm text-gray-700 leading-relaxed" }, Qe = { class: "border border-gray-200 rounded-lg p-4" }, Xe = { class: "flex items-center justify-between mb-3" }, We = { class: "text-xs text-gray-500 mb-1" }, Je = { class: "text-sm font-semibold text-gray-900" }, Ye = {
274
265
  key: 1,
275
266
  class: "text-sm text-gray-700 leading-relaxed"
276
- }, Ke = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, Ze = ["disabled"], et = ["disabled"], M = "-", yt = /* @__PURE__ */ Y({
267
+ }, Ke = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, Ze = ["disabled"], et = ["disabled"], I = "-", ft = /* @__PURE__ */ ee({
277
268
  __name: "MetaDataTab",
278
269
  props: {
279
270
  data: {},
280
271
  entityId: {},
281
272
  entityType: {}
282
273
  },
283
- emits: ["saved"],
284
- setup(l, { emit: h }) {
285
- const u = W(() => import("@opengis/core").then((t) => t.VsModal)), B = W(() => import("@opengis/form")), y = l, H = h, p = b(null);
286
- async function T(t) {
274
+ emits: ["saved", "editCssBounds"],
275
+ setup(l, { emit: z }) {
276
+ const m = K(() => import("@opengis/core").then((t) => t.VsModal)), j = K(() => import("@opengis/form")), p = l, R = z, d = y(null);
277
+ async function F(t) {
287
278
  var a;
288
279
  try {
289
- const n = await fetch("/api/suggest/gis.group_list");
290
- if (!n.ok) return null;
291
- const V = (a = (await n.json()).data) == null ? void 0 : a.find((N) => String(N.id) === String(t));
292
- return (V == null ? void 0 : V.text) ?? null;
280
+ const o = await fetch("/api/suggest/gis.group_list");
281
+ if (!o.ok) return null;
282
+ const E = (a = (await o.json()).data) == null ? void 0 : a.find((O) => String(O.id) === String(t));
283
+ return (E == null ? void 0 : E.text) ?? null;
293
284
  } catch {
294
285
  return null;
295
286
  }
296
287
  }
297
- pe(
298
- () => y.data,
288
+ de(
289
+ () => p.data,
299
290
  async (t) => {
300
- if (p.value = null, (t == null ? void 0 : t.group_id) != null) {
301
- const a = await T(String(t.group_id));
302
- p.value = a;
291
+ if (d.value = null, (t == null ? void 0 : t.group_id) != null) {
292
+ const a = await F(String(t.group_id));
293
+ d.value = a;
303
294
  }
304
295
  },
305
296
  { immediate: !0 }
306
297
  );
307
- function S(t) {
308
- if (!t || typeof t != "string") return M;
298
+ function w(t) {
299
+ if (!t || typeof t != "string") return I;
309
300
  try {
310
301
  const a = new Date(t);
311
- return Number.isNaN(a.getTime()) ? M : a.toLocaleDateString("uk-UA", {
302
+ return Number.isNaN(a.getTime()) ? I : a.toLocaleDateString("uk-UA", {
312
303
  day: "numeric",
313
304
  month: "long",
314
305
  year: "numeric"
315
306
  });
316
307
  } catch {
317
- return M;
308
+ return I;
318
309
  }
319
310
  }
320
- function e(t) {
321
- return typeof (t == null ? void 0 : t.is_active) == "boolean" ? t.is_active ? "Активний" : "Неактивний" : typeof (t == null ? void 0 : t.enabled) == "boolean" ? t.enabled ? "Активний" : "Неактивний" : M;
311
+ function L(t) {
312
+ return typeof (t == null ? void 0 : t.is_active) == "boolean" ? t.is_active ? "Активний" : "Неактивний" : typeof (t == null ? void 0 : t.enabled) == "boolean" ? t.enabled ? "Активний" : "Неактивний" : I;
322
313
  }
323
- function _(t) {
324
- return typeof (t == null ? void 0 : t.is_public) != "boolean" ? M : t.is_public ? "Публічний" : "Приватний";
314
+ function S(t) {
315
+ return typeof (t == null ? void 0 : t.is_public) != "boolean" ? I : t.is_public ? "Публічний" : "Приватний";
325
316
  }
326
- function j(t) {
317
+ function e(t) {
327
318
  if (t == null) return "";
328
319
  if (Array.isArray(t)) return t.filter(Boolean).join(", ");
329
320
  if (typeof t == "boolean") return t ? "Так" : "Ні";
@@ -331,29 +322,29 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
331
322
  const a = String(t).trim();
332
323
  return a === "" ? "" : a;
333
324
  }
334
- function A(t, a) {
335
- return a.map((n) => ({ label: n.label, value: n.value(t) })).filter((n) => n.value && n.value !== M);
325
+ function h(t, a) {
326
+ return a.map((o) => ({ label: o.label, value: o.value(t) })).filter((o) => o.value && o.value !== I);
336
327
  }
337
- const F = f(() => A(y.data, g().general)), $ = f(() => {
328
+ const x = b(() => h(p.data, N().general)), B = b(() => {
338
329
  var a;
339
- const t = (a = y.data) == null ? void 0 : a.description;
340
- return t != null && t !== "" ? t : M;
341
- }), U = f(() => A(y.data, g().meta)), w = b(!1), I = b({}), k = b(null), x = b(!1);
342
- function g() {
343
- const t = Fe({
344
- resolvedGroupName: p.value,
345
- normalizeValue: j,
346
- statusLabel: e,
347
- visibilityLabel: _,
348
- formatDate: S
330
+ const t = (a = p.data) == null ? void 0 : a.description;
331
+ return t != null && t !== "" ? t : I;
332
+ }), T = b(() => h(p.data, N().meta)), A = b(() => T.value.length === 1 ? "grid-cols-1" : "grid-cols-2"), P = b(() => p.entityType === "css" || p.entityType === "raster"), k = y(!1), C = y({}), f = y(null), _ = y(!1);
333
+ function N() {
334
+ const t = je({
335
+ resolvedGroupName: d.value,
336
+ normalizeValue: e,
337
+ statusLabel: L,
338
+ visibilityLabel: S,
339
+ formatDate: w
349
340
  });
350
- return t[y.entityType || "service"] || t.service;
341
+ return t[p.entityType || "service"] || t.service;
351
342
  }
352
- const E = f(() => g().edit);
353
- function O() {
354
- const t = y.data, a = {};
355
- for (const n of g().edit)
356
- switch (n.name) {
343
+ const Q = b(() => N().edit);
344
+ function te() {
345
+ const t = p.data, a = {};
346
+ N().edit.forEach((o) => {
347
+ switch (o.name) {
357
348
  case "group_id":
358
349
  a.group_id = (t == null ? void 0 : t.group_id) != null ? String(t.group_id) : "";
359
350
  break;
@@ -382,61 +373,67 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
382
373
  a.card_auto = (t == null ? void 0 : t.card_auto) ?? !1;
383
374
  break;
384
375
  default:
385
- a[n.name] = (t == null ? void 0 : t[n.name]) ?? "";
376
+ a[o.name] = (t == null ? void 0 : t[o.name]) ?? "";
386
377
  break;
387
378
  }
388
- I.value = a, k.value = null, w.value = !0;
379
+ }), C.value = a, f.value = null, k.value = !0;
389
380
  }
390
- async function K() {
381
+ function X() {
382
+ R("editCssBounds");
383
+ }
384
+ function W(t) {
385
+ return p.entityType === "raster" && t === "Bounds";
386
+ }
387
+ async function J() {
391
388
  var t, a;
392
- if (!(!y.entityId || !y.entityType)) {
393
- if (k.value) {
394
- const n = (a = (t = k.value).validate) == null ? void 0 : a.call(t);
395
- if (n) {
396
- D({
389
+ if (!(!p.entityId || !p.entityType)) {
390
+ if (f.value) {
391
+ const o = (a = (t = f.value).validate) == null ? void 0 : a.call(t);
392
+ if (o) {
393
+ H({
397
394
  type: "warning",
398
395
  title: "Валідація",
399
- message: Object.entries(n).map(([R, V]) => `${R}: ${V}`).join(`
396
+ message: Object.entries(o).map(([D, E]) => `${D}: ${E}`).join(`
400
397
  `)
401
398
  });
402
399
  return;
403
400
  }
404
401
  }
405
- x.value = !0;
402
+ _.value = !0;
406
403
  try {
407
- const n = new Set(E.value.map((P) => P.name)), R = Object.fromEntries(
408
- Object.entries(I.value).filter(([P]) => n.has(P))
409
- ), V = y.entityType === "css" ? {
410
- url: `/api/gis-css/${encodeURIComponent(y.entityId)}`,
404
+ const o = new Set(Q.value.map(($) => $.name)), D = Object.fromEntries(
405
+ Object.entries(C.value).filter(([$]) => o.has($))
406
+ ), E = p.entityType === "css" ? {
407
+ url: `/api/gis-css/${encodeURIComponent(p.entityId)}`,
411
408
  method: "POST"
412
409
  } : {
413
- url: `/api/gis-metadata/${encodeURIComponent(y.entityType)}/${encodeURIComponent(y.entityId)}`,
410
+ url: `/api/gis-metadata/${encodeURIComponent(p.entityType)}/${encodeURIComponent(p.entityId)}`,
414
411
  method: "POST"
415
- }, N = await fetch(V.url, {
416
- method: V.method,
412
+ }, O = await fetch(E.url, {
413
+ method: E.method,
417
414
  headers: { "Content-Type": "application/json" },
418
- body: JSON.stringify(R)
415
+ body: JSON.stringify(D)
419
416
  });
420
- if (!N.ok) throw new Error(`Failed to save metadata: ${N.status}`);
421
- D({ type: "success", title: "Збережено", message: "Метадані оновлено" }), w.value = !1, H("saved");
422
- } catch (n) {
423
- console.error("Failed to save metadata", n), D({ type: "error", title: "Помилка", message: "Не вдалося зберегти метадані" });
417
+ if (!O.ok) throw new Error(`Failed to save metadata: ${O.status}`);
418
+ H({ type: "success", title: "Збережено", message: "Метадані оновлено" }), k.value = !1, R("saved");
419
+ } catch (o) {
420
+ console.error("Failed to save metadata", o), H({ type: "error", title: "Помилка", message: "Не вдалося зберегти метадані" });
424
421
  } finally {
425
- x.value = !1;
422
+ _.value = !1;
426
423
  }
427
424
  }
428
425
  }
429
- return (t, a) => (m(), v("div", Re, [
430
- s("div", Be, [
431
- s("div", Ne, [
432
- s("div", { class: "flex items-center justify-between mb-3" }, [
433
- a[5] || (a[5] = s("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider" }, " Загальна інформація ", -1)),
434
- s("button", {
426
+ return (t, a) => (c(), v("div", Fe, [
427
+ n("div", Ae, [
428
+ n("div", Re, [
429
+ n("div", { class: "flex items-center justify-between mb-3" }, [
430
+ a[5] || (a[5] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider" }, " Загальна інформація ", -1)),
431
+ n("button", {
435
432
  type: "button",
436
- onClick: O,
433
+ onClick: te,
437
434
  class: "inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-medium transition-colors bg-sky-50 text-sky-600 hover:bg-sky-100"
438
435
  }, [...a[4] || (a[4] = [
439
- s("svg", {
436
+ n("svg", {
440
437
  xmlns: "http://www.w3.org/2000/svg",
441
438
  class: "h-3.5 w-3.5",
442
439
  fill: "none",
@@ -444,72 +441,99 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
444
441
  stroke: "currentColor",
445
442
  "stroke-width": "2"
446
443
  }, [
447
- s("path", {
444
+ n("path", {
448
445
  "stroke-linecap": "round",
449
446
  "stroke-linejoin": "round",
450
447
  d: "M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
451
448
  })
452
449
  ], -1),
453
- ke(" Редагувати ", -1)
450
+ pe(" Редагувати ", -1)
454
451
  ])])
455
452
  ]),
456
- F.value.length ? (m(), v("div", De, [
457
- (m(!0), v(ae, null, ue(F.value, (n) => (m(), v("div", {
458
- key: n.label,
453
+ x.value.length ? (c(), v("div", De, [
454
+ (c(!0), v(se, null, be(x.value, (o) => (c(), v("div", {
455
+ key: o.label,
459
456
  class: "bg-gray-50 rounded-md p-2 border border-gray-100"
460
457
  }, [
461
- s("p", He, z(n.label), 1),
462
- s("p", Oe, z(n.value), 1)
458
+ n("p", Oe, V(o.label), 1),
459
+ n("p", He, V(o.value), 1)
463
460
  ]))), 128))
464
- ])) : (m(), v("p", Pe, z(M)))
461
+ ])) : (c(), v("p", Pe, V(I)))
465
462
  ]),
466
- s("div", Ge, [
467
- a[6] || (a[6] = s("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3" }, " Повний опис ", -1)),
468
- s("p", qe, z($.value), 1)
463
+ n("div", Ge, [
464
+ a[6] || (a[6] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3" }, " Повний опис ", -1)),
465
+ n("p", qe, V(B.value), 1)
469
466
  ]),
470
- s("div", Qe, [
471
- a[7] || (a[7] = s("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3" }, " Метадані ", -1)),
472
- U.value.length ? (m(), v("div", Xe, [
473
- (m(!0), v(ae, null, ue(U.value, (n) => (m(), v("div", {
474
- key: n.label,
475
- class: "bg-gray-50 rounded-md p-2 border border-gray-100"
467
+ n("div", Qe, [
468
+ n("div", Xe, [
469
+ a[8] || (a[8] = n("h2", { class: "text-xs font-semibold text-gray-500 uppercase tracking-wider" }, " Метадані ", -1)),
470
+ P.value ? (c(), v("button", {
471
+ key: 0,
472
+ type: "button",
473
+ class: "inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-medium transition-colors bg-sky-50 text-sky-600 hover:bg-sky-100",
474
+ onClick: X
475
+ }, [...a[7] || (a[7] = [
476
+ n("svg", {
477
+ xmlns: "http://www.w3.org/2000/svg",
478
+ class: "h-3.5 w-3.5",
479
+ fill: "none",
480
+ viewBox: "0 0 24 24",
481
+ stroke: "currentColor",
482
+ "stroke-width": "2"
483
+ }, [
484
+ n("path", {
485
+ "stroke-linecap": "round",
486
+ "stroke-linejoin": "round",
487
+ d: "M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
488
+ })
489
+ ], -1),
490
+ pe(" Редагувати ", -1)
491
+ ])])) : q("", !0)
492
+ ]),
493
+ T.value.length ? (c(), v("div", {
494
+ key: 0,
495
+ class: oe([A.value, "grid gap-2"])
496
+ }, [
497
+ (c(!0), v(se, null, be(T.value, (o) => (c(), v("div", {
498
+ key: o.label,
499
+ class: oe(["bg-gray-50 rounded-md p-2 border border-gray-100", { "col-span-2": W(o.label) }])
476
500
  }, [
477
- s("p", We, z(n.label), 1),
478
- s("p", Je, z(n.value), 1)
479
- ]))), 128))
480
- ])) : (m(), v("p", Ye, z(M)))
501
+ n("p", We, V(o.label), 1),
502
+ n("p", Je, V(o.value), 1)
503
+ ], 2))), 128))
504
+ ], 2)) : (c(), v("p", Ye, V(I)))
481
505
  ])
482
506
  ]),
483
- L(C(u), {
507
+ U(M(m), {
484
508
  teleport: "#modal",
485
- visible: w.value,
486
- "onUpdate:visible": a[3] || (a[3] = (n) => w.value = n),
509
+ visible: k.value,
510
+ "onUpdate:visible": a[3] || (a[3] = (o) => k.value = o),
487
511
  title: "Редагування метаданих",
488
512
  size: "lg"
489
513
  }, {
490
- footer: J(() => [
491
- s("div", Ke, [
492
- s("button", {
514
+ footer: Z(() => [
515
+ n("div", Ke, [
516
+ n("button", {
493
517
  type: "button",
494
518
  class: "px-4 py-2 rounded bg-gray-100 text-gray-700 text-sm",
495
- disabled: x.value,
496
- onClick: a[2] || (a[2] = (n) => w.value = !1)
519
+ disabled: _.value,
520
+ onClick: a[2] || (a[2] = (o) => k.value = !1)
497
521
  }, " Скасувати ", 8, Ze),
498
- s("button", {
522
+ n("button", {
499
523
  type: "button",
500
524
  class: "px-4 py-2 rounded bg-blue-600 text-white text-sm",
501
- disabled: x.value,
502
- onClick: K
503
- }, z(x.value ? "Збереження…" : "Зберегти"), 9, et)
525
+ disabled: _.value,
526
+ onClick: J
527
+ }, V(_.value ? "Збереження…" : "Зберегти"), 9, et)
504
528
  ])
505
529
  ]),
506
- default: J(() => [
507
- L(C(B), {
508
- values: I.value,
509
- "onUpdate:values": a[0] || (a[0] = (n) => I.value = n),
510
- form: k.value,
511
- "onUpdate:form": a[1] || (a[1] = (n) => k.value = n),
512
- schema: E.value
530
+ default: Z(() => [
531
+ U(M(j), {
532
+ values: C.value,
533
+ "onUpdate:values": a[0] || (a[0] = (o) => C.value = o),
534
+ form: f.value,
535
+ "onUpdate:form": a[1] || (a[1] = (o) => f.value = o),
536
+ schema: Q.value
513
537
  }, null, 8, ["values", "form", "schema"])
514
538
  ]),
515
539
  _: 1
@@ -522,7 +546,7 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
522
546
  }, ot = {
523
547
  key: 1,
524
548
  class: "py-6 px-4 text-sm text-red-600"
525
- }, rt = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, st = ["disabled"], it = ["disabled"], ut = 192, ve = 8, q = 8, gt = /* @__PURE__ */ Y({
549
+ }, rt = { class: "flex justify-end gap-2 px-4 py-3 border-t border-gray-100 w-full" }, st = ["disabled"], it = ["disabled"], ut = 192, ge = 8, G = 8, gt = /* @__PURE__ */ ee({
526
550
  __name: "HeaderActions",
527
551
  props: {
528
552
  entityId: {},
@@ -537,113 +561,113 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
537
561
  clearTilesHandler: {}
538
562
  },
539
563
  emits: ["saved"],
540
- setup(l, { emit: h }) {
541
- const u = l, B = h, y = W(
542
- () => import("@opengis/core").then((o) => o.VsModal)
543
- ), H = W(() => import("@opengis/form")), p = b(!1), T = b(null), S = b(null), e = b(null), _ = b(null), j = f(() => _.value ? {
564
+ setup(l, { emit: z }) {
565
+ const m = l, j = z, p = K(
566
+ () => import("@opengis/core").then((r) => r.VsModal)
567
+ ), R = K(() => import("@opengis/form")), d = y(!1), F = y(null), w = y(null), L = y(null), S = y(null), e = b(() => S.value ? {
544
568
  position: "fixed",
545
- top: `${_.value.top}px`,
546
- left: `${_.value.left}px`
569
+ top: `${S.value.top}px`,
570
+ left: `${S.value.left}px`
547
571
  } : {});
548
- pe(p, (o) => {
549
- o && xe(Z);
572
+ de(d, (r) => {
573
+ r && ke(le);
550
574
  });
551
- const A = b(!1), F = b(null), $ = b({}), U = b(null), w = b(""), I = b(!1), k = b(!1), x = b(null), g = f(() => u.entityId || ""), E = (o, r) => o ? typeof o == "function" ? o(r) : typeof o != "string" ? "" : o.includes(":id") ? r ? o.replace(":id", encodeURIComponent(r)) : "" : o : "", O = f(() => {
552
- var o;
553
- return (o = u.table) == null ? void 0 : o.trim();
554
- }), K = f(() => {
555
- if (u.formEndpoint) return u.formEndpoint;
556
- if (O.value)
557
- return (o) => `/api/form/${O.value}/${o}`;
558
- }), t = f(() => {
559
- if (u.saveEndpoint) return u.saveEndpoint;
560
- if (O.value)
561
- return (o) => `/api/table/${o}`;
562
- }), a = f(
563
- () => E(K.value, g.value)
564
- ), n = f(() => u.saveEndpoint ? E(u.saveEndpoint, g.value) : x.value ? `/api/table/${encodeURIComponent(x.value)}` : E(t.value, g.value)), R = f(
565
- () => E("/api/gis-clear-rtile/:id", g.value)
566
- ), V = f(
567
- () => E("/api/gis-xml/:id", g.value)
568
- ), N = f(
569
- () => E("/api/gis-pretile/:id?zoom=10&max=12", g.value)
570
- ), P = f(() => {
571
- var c, d, i;
572
- const o = (d = (c = u.entityInfo) == null ? void 0 : c.name) == null ? void 0 : d.trim();
573
- if (o) return `Редагування ${o}`;
574
- const r = (i = u.entityLabel) == null ? void 0 : i.trim();
575
- return r ? `Редагування ${r}` : "Редагування";
576
- }), be = f(() => u.editButtonText || "Редагувати"), fe = f(() => (u.saveMethod || "POST").toUpperCase());
577
- function ye() {
578
- p.value || Z(), p.value = !p.value;
575
+ const h = y(!1), x = y(null), B = y({}), T = y(null), A = y(""), P = y(!1), k = y(!1), C = y(null), f = b(() => m.entityId || ""), _ = (r, s) => r ? typeof r == "function" ? r(s) : typeof r != "string" ? "" : r.includes(":id") ? s ? r.replace(":id", encodeURIComponent(s)) : "" : r : "", N = b(() => {
576
+ var r;
577
+ return (r = m.table) == null ? void 0 : r.trim();
578
+ }), Q = b(() => {
579
+ if (m.formEndpoint) return m.formEndpoint;
580
+ if (N.value)
581
+ return (r) => `/api/form/${N.value}/${r}`;
582
+ }), te = b(() => {
583
+ if (m.saveEndpoint) return m.saveEndpoint;
584
+ if (N.value)
585
+ return (r) => `/api/table/${r}`;
586
+ }), X = b(
587
+ () => _(Q.value, f.value)
588
+ ), W = b(() => m.saveEndpoint ? _(m.saveEndpoint, f.value) : C.value ? `/api/table/${encodeURIComponent(C.value)}` : _(te.value, f.value)), J = b(
589
+ () => _("/api/gis-clear-rtile/:id", f.value)
590
+ ), t = b(
591
+ () => _("/api/gis-xml/:id", f.value)
592
+ ), a = b(
593
+ () => _("/api/gis-pretile/:id?zoom=10&max=12", f.value)
594
+ ), o = b(() => {
595
+ var u, g, i;
596
+ const r = (g = (u = m.entityInfo) == null ? void 0 : u.name) == null ? void 0 : g.trim();
597
+ if (r) return `Редагування ${r}`;
598
+ const s = (i = m.entityLabel) == null ? void 0 : i.trim();
599
+ return s ? `Редагування ${s}` : "Редагування";
600
+ }), D = b(() => m.editButtonText || "Редагувати"), E = b(() => (m.saveMethod || "POST").toUpperCase());
601
+ function O() {
602
+ d.value || le(), d.value = !d.value;
579
603
  }
580
- function G() {
581
- p.value = !1;
604
+ function $() {
605
+ d.value = !1;
582
606
  }
583
- async function ge() {
584
- const o = u.clearTilesHandler;
585
- !o || !g.value || (G(), await o(g.value));
607
+ async function he() {
608
+ const r = m.clearTilesHandler;
609
+ !r || !f.value || ($(), await r(f.value));
586
610
  }
587
- function Z() {
588
- var ie;
589
- if (typeof window > "u" || !S.value) return;
590
- const o = S.value.getBoundingClientRect(), r = window.innerWidth, c = window.innerHeight, d = o.left, i = Math.max(
591
- r - ut - q,
592
- q
593
- ), ee = Math.min(Math.max(d, q), i), te = ((ie = e.value) == null ? void 0 : ie.offsetHeight) ?? 0, re = o.bottom + ve;
594
- let se = re;
595
- if (te && re + te > c - q) {
596
- const _e = o.top - ve - te;
597
- se = Math.max(_e, q);
611
+ function le() {
612
+ var ve;
613
+ if (typeof window > "u" || !w.value) return;
614
+ const r = w.value.getBoundingClientRect(), s = window.innerWidth, u = window.innerHeight, g = r.left, i = Math.max(
615
+ s - ut - G,
616
+ G
617
+ ), ae = Math.min(Math.max(g, G), i), ne = ((ve = L.value) == null ? void 0 : ve.offsetHeight) ?? 0, ce = r.bottom + ge;
618
+ let me = ce;
619
+ if (ne && ce + ne > u - G) {
620
+ const xe = r.top - ge - ne;
621
+ me = Math.max(xe, G);
598
622
  }
599
- _.value = { top: se, left: ee };
623
+ S.value = { top: me, left: ae };
600
624
  }
601
- function ne(o) {
602
- var c, d;
603
- if (!T.value && !e.value) return;
604
- const r = o.target;
605
- r && ((c = T.value) != null && c.contains(r) || (d = e.value) != null && d.contains(r)) || (p.value = !1);
625
+ function ie(r) {
626
+ var u, g;
627
+ if (!F.value && !L.value) return;
628
+ const s = r.target;
629
+ s && ((u = F.value) != null && u.contains(s) || (g = L.value) != null && g.contains(s)) || (d.value = !1);
606
630
  }
607
- function Q() {
608
- p.value && Z();
631
+ function Y() {
632
+ d.value && le();
609
633
  }
610
- ze(() => {
611
- window.addEventListener("click", ne), window.addEventListener("resize", Q), window.addEventListener("scroll", Q, !0);
612
- }), Ve(() => {
613
- window.removeEventListener("click", ne), window.removeEventListener("resize", Q), window.removeEventListener("scroll", Q, !0);
634
+ Ve(() => {
635
+ window.addEventListener("click", ie), window.addEventListener("resize", Y), window.addEventListener("scroll", Y, !0);
636
+ }), ze(() => {
637
+ window.removeEventListener("click", ie), window.removeEventListener("resize", Y), window.removeEventListener("scroll", Y, !0);
614
638
  });
615
- async function de() {
616
- var o, r, c;
617
- if (!(!g.value || !a.value)) {
618
- G(), A.value = !0, I.value = !0, w.value = "", F.value = null, $.value = {}, x.value = null;
639
+ async function _e() {
640
+ var r, s, u;
641
+ if (!(!f.value || !X.value)) {
642
+ $(), h.value = !0, P.value = !0, A.value = "", x.value = null, B.value = {}, C.value = null;
619
643
  try {
620
- const d = await fetch(a.value);
621
- if (!d.ok)
622
- throw new Error(`Failed to load form: ${d.status}`);
623
- const i = await d.json();
624
- $.value = (i == null ? void 0 : i.data) || {}, F.value = (i == null ? void 0 : i.schema) || null;
625
- const ee = typeof (i == null ? void 0 : i.token) == "string" && i.token || typeof ((o = i == null ? void 0 : i.tokens) == null ? void 0 : o.edit) == "string" && i.tokens.edit || typeof ((r = i == null ? void 0 : i.tokens) == null ? void 0 : r.edit_token) == "string" && i.tokens.edit_token || typeof ((c = i == null ? void 0 : i.data) == null ? void 0 : c.token) == "string" && i.data.token || null;
626
- x.value = ee, U.value = null;
627
- } catch (d) {
628
- console.error("Failed to load edit form", d), w.value = "Не вдалося завантажити форму редагування";
644
+ const g = await fetch(X.value);
645
+ if (!g.ok)
646
+ throw new Error(`Failed to load form: ${g.status}`);
647
+ const i = await g.json();
648
+ B.value = (i == null ? void 0 : i.data) || {}, x.value = (i == null ? void 0 : i.schema) || null;
649
+ const ae = typeof (i == null ? void 0 : i.token) == "string" && i.token || typeof ((r = i == null ? void 0 : i.tokens) == null ? void 0 : r.edit) == "string" && i.tokens.edit || typeof ((s = i == null ? void 0 : i.tokens) == null ? void 0 : s.edit_token) == "string" && i.tokens.edit_token || typeof ((u = i == null ? void 0 : i.data) == null ? void 0 : u.token) == "string" && i.data.token || null;
650
+ C.value = ae, T.value = null;
651
+ } catch (g) {
652
+ console.error("Failed to load edit form", g), A.value = "Не вдалося завантажити форму редагування";
629
653
  } finally {
630
- I.value = !1;
654
+ P.value = !1;
631
655
  }
632
656
  }
633
657
  }
634
- function oe() {
635
- A.value = !1, F.value = null, w.value = "", x.value = null;
658
+ function ue() {
659
+ h.value = !1, x.value = null, A.value = "", C.value = null;
636
660
  }
637
- async function he() {
638
- var o, r;
639
- if (!(!g.value || !n.value)) {
640
- if (U.value) {
641
- const c = (r = (o = U.value).validate) == null ? void 0 : r.call(o);
642
- if (c) {
643
- D({
661
+ async function we() {
662
+ var r, s;
663
+ if (!(!f.value || !W.value)) {
664
+ if (T.value) {
665
+ const u = (s = (r = T.value).validate) == null ? void 0 : s.call(r);
666
+ if (u) {
667
+ H({
644
668
  type: "warning",
645
669
  title: "Validation",
646
- message: Object.entries(c).map(([d, i]) => `${d}: ${i}`).join(`
670
+ message: Object.entries(u).map(([g, i]) => `${g}: ${i}`).join(`
647
671
  `)
648
672
  });
649
673
  return;
@@ -651,19 +675,19 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
651
675
  }
652
676
  k.value = !0;
653
677
  try {
654
- const c = await fetch(n.value, {
655
- method: fe.value,
678
+ const u = await fetch(W.value, {
679
+ method: E.value,
656
680
  headers: { "Content-Type": "application/json" },
657
- body: JSON.stringify($.value)
681
+ body: JSON.stringify(B.value)
658
682
  });
659
- if (!c.ok) throw new Error(`Failed to save: ${c.status}`);
660
- D({
683
+ if (!u.ok) throw new Error(`Failed to save: ${u.status}`);
684
+ H({
661
685
  type: "success",
662
686
  title: "Збережено",
663
687
  message: "Зміни збережено"
664
- }), B("saved", $.value), oe();
665
- } catch (c) {
666
- console.error("Failed to save edit form", c), D({
688
+ }), j("saved", B.value), ue();
689
+ } catch (u) {
690
+ console.error("Failed to save edit form", u), H({
667
691
  type: "error",
668
692
  title: "Помилка",
669
693
  message: "Не вдалося зберегти зміни"
@@ -673,27 +697,27 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
673
697
  }
674
698
  }
675
699
  }
676
- return (o, r) => (m(), v("div", {
700
+ return (r, s) => (c(), v("div", {
677
701
  ref_key: "root",
678
- ref: T,
702
+ ref: F,
679
703
  class: "relative flex items-center"
680
704
  }, [
681
- s("button", {
705
+ n("button", {
682
706
  ref_key: "triggerButton",
683
- ref: S,
707
+ ref: w,
684
708
  type: "button",
685
- onClick: Ce(ye, ["stop"]),
709
+ onClick: Ce(O, ["stop"]),
686
710
  class: "flex items-center justify-center w-9 h-9 hover:rounded-md hover:border hover:border-gray-200 bg-white text-gray-600 hover:bg-gray-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-500",
687
711
  "aria-label": "Дії"
688
- }, [...r[3] || (r[3] = [
689
- s("svg", {
712
+ }, [...s[3] || (s[3] = [
713
+ n("svg", {
690
714
  xmlns: "http://www.w3.org/2000/svg",
691
715
  class: "h-5 w-5",
692
716
  fill: "none",
693
717
  viewBox: "0 0 24 24",
694
718
  stroke: "currentColor"
695
719
  }, [
696
- s("path", {
720
+ n("path", {
697
721
  "stroke-linecap": "round",
698
722
  "stroke-linejoin": "round",
699
723
  "stroke-width": "2",
@@ -701,113 +725,113 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
701
725
  })
702
726
  ], -1)
703
727
  ])], 512),
704
- (m(), le(Ee, { to: "body" }, [
705
- p.value ? (m(), v("div", {
728
+ (c(), re(Ee, { to: "body" }, [
729
+ d.value ? (c(), v("div", {
706
730
  key: 0,
707
731
  ref_key: "menuContainer",
708
- ref: e,
709
- style: Me(j.value),
732
+ ref: L,
733
+ style: Me(e.value),
710
734
  class: "absolute top-0 left-0 mt-2 w-48 rounded-xl border border-gray-200 bg-white shadow-lg text-sm z-[1000]"
711
735
  }, [
712
- R.value || l.clearTilesHandler ? (m(), v(ae, { key: 0 }, [
713
- l.clearTilesHandler ? (m(), v("button", {
736
+ J.value || l.clearTilesHandler ? (c(), v(se, { key: 0 }, [
737
+ l.clearTilesHandler ? (c(), v("button", {
714
738
  key: 0,
715
739
  type: "button",
716
740
  class: "flex items-center gap-2 w-full px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
717
- onClick: ge
741
+ onClick: he
718
742
  }, [
719
- L(C(ce), {
743
+ U(M(ye), {
720
744
  size: 16,
721
745
  class: "lucide lucide-brush-cleaning text-gray-500"
722
746
  }),
723
- r[4] || (r[4] = s("span", null, "Очистити тайли", -1))
724
- ])) : (m(), v("a", {
747
+ s[4] || (s[4] = n("span", null, "Очистити тайли", -1))
748
+ ])) : (c(), v("a", {
725
749
  key: 1,
726
- href: R.value,
750
+ href: J.value,
727
751
  target: "_blank",
728
752
  rel: "noreferrer",
729
753
  class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
730
- onClick: G
754
+ onClick: $
731
755
  }, [
732
- L(C(ce), {
756
+ U(M(ye), {
733
757
  size: 16,
734
758
  class: "lucide lucide-brush-cleaning text-gray-500"
735
759
  }),
736
- r[5] || (r[5] = s("span", null, "Очистити тайли", -1))
760
+ s[5] || (s[5] = n("span", null, "Очистити тайли", -1))
737
761
  ], 8, tt))
738
- ], 64)) : X("", !0),
739
- l.showXmlItem ? (m(), v("a", {
762
+ ], 64)) : q("", !0),
763
+ l.showXmlItem ? (c(), v("a", {
740
764
  key: 1,
741
- href: V.value,
765
+ href: t.value,
742
766
  target: "_blank",
743
767
  rel: "noreferrer",
744
768
  class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
745
- onClick: G
769
+ onClick: $
746
770
  }, [
747
- L(C(me), {
771
+ U(M(fe), {
748
772
  size: 16,
749
773
  class: "lucide lucide-square-code text-gray-500"
750
774
  }),
751
- r[6] || (r[6] = s("span", null, "Створити XML", -1))
752
- ], 8, lt)) : X("", !0),
753
- l.showXmlItem ? (m(), v("a", {
775
+ s[6] || (s[6] = n("span", null, "Створити XML", -1))
776
+ ], 8, lt)) : q("", !0),
777
+ l.showXmlItem ? (c(), v("a", {
754
778
  key: 2,
755
- href: N.value,
779
+ href: a.value,
756
780
  target: "_blank",
757
781
  rel: "noreferrer",
758
782
  class: "flex items-center gap-2 px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-t-xl",
759
- onClick: G
783
+ onClick: $
760
784
  }, [
761
- L(C(me), {
785
+ U(M(fe), {
762
786
  size: 16,
763
787
  class: "lucide lucide-square-code text-gray-500"
764
788
  }),
765
- r[7] || (r[7] = s("span", null, "Pretile", -1))
766
- ], 8, at)) : X("", !0),
767
- s("button", {
789
+ s[7] || (s[7] = n("span", null, "Pretile", -1))
790
+ ], 8, at)) : q("", !0),
791
+ n("button", {
768
792
  type: "button",
769
793
  class: "flex items-center gap-2 w-full px-4 py-2 text-left text-gray-700 hover:bg-slate-50 hover:rounded-b-xl",
770
- onClick: de
794
+ onClick: _e
771
795
  }, [
772
- L(C(Se), {
796
+ U(M(Te), {
773
797
  size: 16,
774
798
  class: "lucide lucide-pencil text-gray-500"
775
799
  }),
776
- s("span", null, z(be.value), 1)
800
+ n("span", null, V(D.value), 1)
777
801
  ])
778
- ], 4)) : X("", !0)
802
+ ], 4)) : q("", !0)
779
803
  ])),
780
- L(C(y), {
804
+ U(M(p), {
781
805
  teleport: "#modal",
782
- visible: A.value,
783
- "onUpdate:visible": r[2] || (r[2] = (c) => A.value = c),
784
- title: P.value,
806
+ visible: h.value,
807
+ "onUpdate:visible": s[2] || (s[2] = (u) => h.value = u),
808
+ title: o.value,
785
809
  size: "lg"
786
810
  }, {
787
- footer: J(() => [
788
- s("div", rt, [
789
- s("button", {
811
+ footer: Z(() => [
812
+ n("div", rt, [
813
+ n("button", {
790
814
  type: "button",
791
815
  class: "px-4 py-2 rounded bg-gray-100 text-gray-700",
792
- onClick: oe,
816
+ onClick: ue,
793
817
  disabled: k.value
794
818
  }, " Скасувати ", 8, st),
795
- s("button", {
819
+ n("button", {
796
820
  type: "button",
797
821
  class: "px-4 py-2 rounded bg-blue-600 text-white",
798
- onClick: he,
822
+ onClick: we,
799
823
  disabled: k.value
800
- }, z(k.value ? "Зберігається…" : "Зберегти"), 9, it)
824
+ }, V(k.value ? "Зберігається…" : "Зберегти"), 9, it)
801
825
  ])
802
826
  ]),
803
- default: J(() => [
804
- I.value ? (m(), v("div", nt, " Завантаження форми редагування… ")) : w.value ? (m(), v("div", ot, z(w.value), 1)) : (m(), le(C(H), {
827
+ default: Z(() => [
828
+ P.value ? (c(), v("div", nt, " Завантаження форми редагування… ")) : A.value ? (c(), v("div", ot, V(A.value), 1)) : (c(), re(M(R), {
805
829
  key: 2,
806
- values: $.value,
807
- "onUpdate:values": r[0] || (r[0] = (c) => $.value = c),
808
- form: U.value,
809
- "onUpdate:form": r[1] || (r[1] = (c) => U.value = c),
810
- schema: F.value
830
+ values: B.value,
831
+ "onUpdate:values": s[0] || (s[0] = (u) => B.value = u),
832
+ form: T.value,
833
+ "onUpdate:form": s[1] || (s[1] = (u) => T.value = u),
834
+ schema: x.value
811
835
  }, null, 8, ["values", "form", "schema"]))
812
836
  ]),
813
837
  _: 1
@@ -818,6 +842,6 @@ const Re = { class: "flex-1 overflow-y-auto p-4" }, Be = { class: "space-y-4" },
818
842
  export {
819
843
  gt as _,
820
844
  bt as a,
821
- yt as b,
822
- ft as c
845
+ ft as b,
846
+ yt as c
823
847
  };