@opengis/gis 0.2.126 → 0.2.128

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