@thibezer/ui-components-kit 2.14.0 → 2.17.0

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 (106) hide show
  1. package/CHANGELOG.md +63 -9
  2. package/README.md +4 -2
  3. package/dist/botao.cjs +1 -1
  4. package/dist/botao.js +1 -1
  5. package/dist/camadas.cjs +50 -50
  6. package/dist/camadas.js +381 -373
  7. package/dist/campo-texto.cjs +1 -1
  8. package/dist/campo-texto.js +1 -1
  9. package/dist/canvas.cjs +24 -24
  10. package/dist/canvas.js +757 -751
  11. package/dist/card.cjs +1 -1
  12. package/dist/card.js +1 -1
  13. package/dist/components/ui-avatar/ui-avatar.d.ts +7 -0
  14. package/dist/components/ui-barra-ferramentas/ui-paleta-ferramentas.d.ts +2 -0
  15. package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +7 -0
  16. package/dist/components/ui-mapa/ui-mapa.d.ts +1 -0
  17. package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +6 -0
  18. package/dist/components/ui-skeleton/ui-skeleton.d.ts +9 -0
  19. package/dist/components/ui-stat/ui-stat.d.ts +12 -0
  20. package/dist/components/ui-tabela/tabela-corpo.d.ts +5 -0
  21. package/dist/components/ui-tabela/tabela-foco.d.ts +28 -0
  22. package/dist/components/ui-tabela/tabela-orquestrador-dados.d.ts +3 -0
  23. package/dist/components/ui-tabela/tabela-renderizador.d.ts +3 -0
  24. package/dist/components/ui-tabela/tipos.d.ts +7 -1
  25. package/dist/components/ui-tabela/ui-tabela.d.ts +6 -1
  26. package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +2 -1
  27. package/dist/components/ui-tabela-propriedades/propriedades-persistencia.d.ts +63 -0
  28. package/dist/components/ui-tabela-propriedades/propriedades-render-arvore.d.ts +1 -0
  29. package/dist/components/ui-tabela-propriedades/tipos.d.ts +16 -0
  30. package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +40 -1
  31. package/dist/core/degrade.d.ts +34 -0
  32. package/dist/core/index.d.ts +1 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +33 -24
  35. package/dist/cores.cjs +1 -1
  36. package/dist/cores.js +1 -1
  37. package/dist/custom-elements.json +20309 -18611
  38. package/dist/data.cjs +1 -1
  39. package/dist/data.js +89 -79
  40. package/dist/degrade-CIxvOTUv.cjs +1 -0
  41. package/dist/degrade-gDa5sW__.js +119 -0
  42. package/dist/feedback.cjs +1 -1
  43. package/dist/feedback.js +2 -2
  44. package/dist/forms.cjs +1 -1
  45. package/dist/forms.js +2 -2
  46. package/dist/index.cjs +1 -1
  47. package/dist/index.d.ts +1 -0
  48. package/dist/index.js +215 -196
  49. package/dist/mapa.cjs +1 -1
  50. package/dist/mapa.js +1 -1
  51. package/dist/modal.cjs +1 -1
  52. package/dist/modal.js +1 -1
  53. package/dist/register.cjs +1 -1
  54. package/dist/register.js +11 -11
  55. package/dist/seletor-mapa-base.cjs +10 -10
  56. package/dist/seletor-mapa-base.js +34 -28
  57. package/dist/tabela.cjs +1 -1
  58. package/dist/tabela.js +83 -73
  59. package/dist/tipos-elementos.d.ts +33 -3
  60. package/dist/tipos-vue.d.ts +30 -3
  61. package/dist/tools.cjs +1 -1
  62. package/dist/tools.js +1 -1
  63. package/dist/ui-badge-1UU8vT-b.js +198 -0
  64. package/dist/ui-badge-CKKKPdt8.cjs +28 -0
  65. package/dist/ui-badge-DE58YSBY.cjs +28 -0
  66. package/dist/ui-badge-KgmI3jOD.js +201 -0
  67. package/dist/ui-botao-Dz8YvmiA.cjs +12 -0
  68. package/dist/ui-botao-bU_bf6SU.js +166 -0
  69. package/dist/ui-botao-xTbH5mpH.cjs +12 -0
  70. package/dist/ui-botao-zLkcMMyP.js +168 -0
  71. package/dist/ui-campo-texto-DVU_sWV1.cjs +16 -0
  72. package/dist/ui-campo-texto-Dliyt9qr.cjs +16 -0
  73. package/dist/ui-campo-texto-W5M0gNE4.js +377 -0
  74. package/dist/ui-campo-texto-btevggO3.js +379 -0
  75. package/dist/ui-card-BYyYxxY1.cjs +20 -0
  76. package/dist/ui-card-CojoGXaT.js +144 -0
  77. package/dist/ui-card-DFnRp9bl.js +146 -0
  78. package/dist/ui-card-DrWVJQKw.cjs +20 -0
  79. package/dist/ui-controle-cores-Bq_XUrIQ.cjs +32 -0
  80. package/dist/ui-controle-cores-BtA6yzu3.js +291 -0
  81. package/dist/ui-kit.css +1 -1
  82. package/dist/ui-linha-2kY7TNUJ.cjs +38 -0
  83. package/dist/ui-linha-DAz6DBcl.cjs +38 -0
  84. package/dist/ui-linha-DkxwMhD-.js +749 -0
  85. package/dist/ui-linha-KFF86FW5.js +752 -0
  86. package/dist/ui-modal-4nU-tXjO.cjs +18 -0
  87. package/dist/ui-modal-BrXzVZ65.js +216 -0
  88. package/dist/ui-modal-BwB9fksp.js +214 -0
  89. package/dist/ui-modal-lARKzEVZ.cjs +18 -0
  90. package/dist/ui-paleta-ferramentas-Bu6JaT0s.js +1245 -0
  91. package/dist/ui-paleta-ferramentas-D3Jhwt26.cjs +21 -0
  92. package/dist/ui-skeleton-BLEV6h3k.js +653 -0
  93. package/dist/ui-skeleton-B_XTaGrX.cjs +52 -0
  94. package/dist/ui-skeleton-DEHwpDqa.js +648 -0
  95. package/dist/ui-skeleton-sIphhOSx.cjs +52 -0
  96. package/dist/ui-switch-BXIDwC-Y.cjs +66 -0
  97. package/dist/ui-switch-Ctxk-jKS.js +1212 -0
  98. package/dist/ui-switch-DAIgOhqr.cjs +66 -0
  99. package/dist/ui-switch-_F8yubdX.js +1203 -0
  100. package/dist/ui-tabela-propriedades-2bq2nX-b.js +3202 -0
  101. package/dist/ui-tabela-propriedades-8IAYmk3P.cjs +142 -0
  102. package/dist/ui-tabela-propriedades-BoYXzP5Z.js +3191 -0
  103. package/dist/ui-tabela-propriedades-CJyo568n.js +3517 -0
  104. package/dist/ui-tabela-propriedades-CnfW9DZG.cjs +142 -0
  105. package/dist/ui-tabela-propriedades-Wa34hfIr.cjs +142 -0
  106. package/package.json +187 -187
package/dist/canvas.js CHANGED
@@ -1,15 +1,16 @@
1
- var Li = Object.defineProperty;
2
- var Ci = (a, t, e) => t in a ? Li(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
- var f = (a, t, e) => Ci(a, typeof t != "symbol" ? t + "" : t, e);
1
+ var Ci = Object.defineProperty;
2
+ var Si = (a, t, e) => t in a ? Ci(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
+ var f = (a, t, e) => Si(a, typeof t != "symbol" ? t + "" : t, e);
4
4
  /* empty css */
5
5
  import y from "leaflet";
6
- import { e as T, p as V, r as It, b as Tt, a as Zt, o as Wt, c as oo, l as Si, d as Mi, f as io } from "./leaflet-DOq10gfg.js";
6
+ import { e as T, p as V, r as It, b as Tt, a as Zt, o as Wt, c as oo, l as Mi, d as Ai, f as io } from "./leaflet-DOq10gfg.js";
7
7
  import { f as bt, a as Ue } from "./alvo-digitavel-CzCvNVQ3.js";
8
- import { p as Ai, c as wi, n as xt, e as Xt, m as ao, a as Kt, b as it, d as Ze, f as Pt, g as We, h as Ho, i as Xe, j as Lt, k as zi, l as ot, C as Ke, o as Yt, I as Ei, s as mt, q as ct, v as ki, M as Ii, Z as no, r as Ti, t as _i, u as Di, w as so, x as ro, A as qi, y as Dt, z as Te, B as co, D as $i, E as Fi, F as lo, G as Oi, H as dt, J as ht, K as Ct, L as Z, R as Ye, N as Ni, O as Go, P as Ri, Q as Bi, S as Vi, T as ji } from "./motor-By2te6PZ.js";
9
- import { U as Ur, V as Zr, W as Wr, X as Xr, Y as Kr, _ as Yr, $ as Qr, a0 as Jr, a1 as tc, a2 as ec, a3 as oc, a4 as ic, a5 as ac, a6 as nc, a7 as sc, a8 as rc, a9 as cc, aa as lc, ab as dc, ac as hc, ad as uc, ae as pc, af as fc, ag as mc, ah as gc, ai as vc, aj as yc, ak as bc, al as xc } from "./motor-By2te6PZ.js";
8
+ import { p as wi, c as zi, n as xt, e as Xt, m as ao, a as Kt, b as it, d as Ze, f as Pt, g as We, h as Go, i as Xe, j as Lt, k as Ei, l as ot, C as Ke, o as Yt, I as ki, s as mt, q as ct, v as Ii, M as Ti, Z as no, r as Di, t as _i, u as qi, w as so, x as ro, A as $i, y as _t, z as Te, B as co, D as Fi, E as Oi, F as lo, G as Ni, H as dt, J as ht, K as Ct, L as Z, R as Ye, N as Ri, O as Uo, P as Bi, Q as Vi, S as ji, T as Hi } from "./motor-By2te6PZ.js";
9
+ import { U as Kr, V as Yr, W as Qr, X as Jr, Y as tc, _ as ec, $ as oc, a0 as ic, a1 as ac, a2 as nc, a3 as sc, a4 as rc, a5 as cc, a6 as lc, a7 as dc, a8 as hc, a9 as uc, aa as pc, ab as fc, ac as mc, ad as gc, ae as vc, af as yc, ag as bc, ah as xc, ai as Pc, aj as Lc, ak as Cc, al as Sc } from "./motor-By2te6PZ.js";
10
10
  import { L as Qt } from "./listener-bag-DQgv7OON.js";
11
- import { d as Hi, S as Gi } from "./ssr-safe-5cWfJP-s.js";
12
- const ho = {
11
+ import { d as Gi, S as Ui } from "./ssr-safe-5cWfJP-s.js";
12
+ import { A as Zi, a as ho, e as Wi } from "./degrade-gDa5sW__.js";
13
+ const uo = {
13
14
  perimetroWeight: 1,
14
15
  fechamentoWeight: 1,
15
16
  vizinhoWeight: 1,
@@ -38,11 +39,11 @@ const ho = {
38
39
  try {
39
40
  const t = typeof localStorage < "u" ? localStorage.getItem("gerencigeo_mapa_config") : null;
40
41
  if (t)
41
- return { ...ho, ...JSON.parse(t) };
42
+ return { ...uo, ...JSON.parse(t) };
42
43
  } catch (t) {
43
44
  console.error("Erro ao carregar configurações do mapa", t);
44
45
  }
45
- return { ...ho };
46
+ return { ...uo };
46
47
  }
47
48
  saveConfig(t) {
48
49
  this.config = { ...this.config, ...t }, typeof localStorage < "u" && localStorage.setItem("gerencigeo_mapa_config", JSON.stringify(this.config));
@@ -52,14 +53,14 @@ const ho = {
52
53
  }
53
54
  };
54
55
  f(lt, "instance");
55
- let _e = lt;
56
- const Qe = "sob-demanda", Ui = 700;
56
+ let De = lt;
57
+ const Qe = "sob-demanda", Xi = 700;
57
58
  function Jt(a) {
58
59
  const t = typeof a == "string" ? a.trim().toLowerCase() : "";
59
60
  return t === "automatico" || t === "desligado" || t === "sob-demanda" ? t : Qe;
60
61
  }
61
62
  const Vt = /* @__PURE__ */ new WeakMap();
62
- function Zi(a) {
63
+ function Ki(a) {
63
64
  const t = a && typeof a == "object" ? a.options : void 0;
64
65
  return !!t && t.closeButton !== void 0 && t.autoPan !== void 0;
65
66
  }
@@ -67,7 +68,7 @@ function Je(a, t) {
67
68
  const e = a ? Vt.get(a) : void 0;
68
69
  return e ? e.liberar(t) : t();
69
70
  }
70
- class Wi {
71
+ class Yi {
71
72
  constructor(t, e = Qe) {
72
73
  f(this, "liberados", 0);
73
74
  /** Verdadeiro durante o despacho síncrono de um clique no mapa (o Leaflet abre popups dentro dele). */
@@ -86,7 +87,7 @@ class Wi {
86
87
  this.map = t, this.modoAtual = e, this.original = t.addLayer;
87
88
  const o = this;
88
89
  t.addLayer = function(n) {
89
- return Zi(n) ? o.aoAbrir(this, n) : o.original.call(this, n);
90
+ return Ki(n) ? o.aoAbrir(this, n) : o.original.call(this, n);
90
91
  }, this.container = typeof t.getContainer == "function" ? t.getContainer() : null, (i = this.container) == null || i.addEventListener("click", this.marcarClique, !0), Vt.set(t, this);
91
92
  }
92
93
  get modo() {
@@ -124,14 +125,14 @@ class Wi {
124
125
  return (r = e.openPopup) == null ? void 0 : r.call(e, typeof e.getLatLng == "function" || s == null ? void 0 : s.latlng);
125
126
  });
126
127
  };
127
- o = setTimeout(i, Ui), e.on("dblclick", n), this.pendentes.set(e, i);
128
+ o = setTimeout(i, Xi), e.on("dblclick", n), this.pendentes.set(e, i);
128
129
  }
129
130
  cancelarPendentes() {
130
131
  for (const t of [...this.pendentes.values()]) t();
131
132
  this.pendentes.clear();
132
133
  }
133
134
  }
134
- async function Xi(a, t, e, o) {
135
+ async function Qi(a, t, e, o) {
135
136
  const i = a.getSize(), n = a.getBounds(), s = n.getSouthWest(), r = n.getNorthEast(), c = `${s.lng},${s.lat},${r.lng},${r.lat}`;
136
137
  let l = 0, d = 0;
137
138
  try {
@@ -238,13 +239,13 @@ async function Xi(a, t, e, o) {
238
239
  u.style.cursor = "";
239
240
  }
240
241
  }
241
- function Ki(a, t) {
242
+ function Ji(a, t) {
242
243
  if (!a) return;
243
244
  const e = Math.floor(a.getZoom()), o = Math.max(e, 12), i = Math.min(e + 1, 19), n = t.pad(0.2), s = ["mt0", "mt1", "mt2", "mt3"];
244
245
  let r = 0;
245
246
  const c = 32;
246
247
  for (let l = o; l <= i && r < c; l++) {
247
- const d = n.getNorthWest(), h = n.getSouthEast(), u = uo(d.lng, l), m = uo(h.lng, l), g = po(d.lat, l), p = po(h.lat, l);
248
+ const d = n.getNorthWest(), h = n.getSouthEast(), u = po(d.lng, l), m = po(h.lng, l), g = fo(d.lat, l), p = fo(h.lat, l);
248
249
  for (let v = u; v <= m && r < c; v++)
249
250
  for (let M = g; M <= p && r < c; M++) {
250
251
  const C = `https://${s[(v + M) % s.length]}.google.com/vt/lyrs=s,h&x=${v}&y=${M}&z=${l}`, P = new Image();
@@ -252,33 +253,33 @@ function Ki(a, t) {
252
253
  }
253
254
  }
254
255
  }
255
- function uo(a, t) {
256
+ function po(a, t) {
256
257
  return Math.floor((a + 180) / 360 * Math.pow(2, t));
257
258
  }
258
- function po(a, t) {
259
+ function fo(a, t) {
259
260
  const e = a * Math.PI / 180;
260
261
  return Math.floor(
261
262
  (1 - Math.log(Math.tan(e) + 1 / Math.cos(e)) / Math.PI) / 2 * Math.pow(2, t)
262
263
  );
263
264
  }
264
- const Yi = {
265
+ const ta = {
265
266
  zoomSnap: 0.25,
266
267
  zoomDelta: 0.5,
267
268
  wheelPxPerZoomLevel: 90
268
269
  };
269
- function Qi(a, t) {
270
+ function ea(a, t) {
270
271
  const e = a;
271
272
  return !e || !t || e._popup !== t ? !1 : (e._popup = null, !0);
272
273
  }
273
- function Ji(a) {
274
+ function oa(a) {
274
275
  a.on("popupclose", (t) => {
275
- Qi(a, t.popup);
276
+ ea(a, t.popup);
276
277
  });
277
278
  }
278
- class ta {
279
+ class ia {
279
280
  constructor(t) {
280
281
  f(this, "map", null);
281
- f(this, "configManager", _e.getInstance());
282
+ f(this, "configManager", De.getInstance());
282
283
  f(this, "config", this.configManager.getConfig());
283
284
  f(this, "apiBaseUrl", "/api");
284
285
  f(this, "bancoPontosGroup", y.layerGroup());
@@ -321,8 +322,8 @@ class ta {
321
322
  scrollWheelZoom: !0,
322
323
  preferCanvas: this.config.preferCanvas !== void 0 ? this.config.preferCanvas : !0,
323
324
  zoomControl: !1,
324
- ...Yi
325
- }).setView([-23.7661, -53.3204], 14), this.popups = new Wi(this.map, this.modoPopups), this.listenConfigBroadcast(), this.applyMapStyles(), Ji(this.map), !this.map.getPane("sigefPane")) {
325
+ ...ta
326
+ }).setView([-23.7661, -53.3204], 14), this.popups = new Yi(this.map, this.modoPopups), this.listenConfigBroadcast(), this.applyMapStyles(), oa(this.map), !this.map.getPane("sigefPane")) {
326
327
  const i = this.map.createPane("sigefPane");
327
328
  i.style.zIndex = "390";
328
329
  }
@@ -401,13 +402,13 @@ class ta {
401
402
  }
402
403
  }
403
404
  preCarregarTilesRegiao(t) {
404
- Ki(this.map, t);
405
+ Ji(this.map, t);
405
406
  }
406
407
  async consultarSigef(t) {
407
- this.map && await Xi(this.map, t, this.apiBaseUrl, this.sigefState);
408
+ this.map && await Qi(this.map, t, this.apiBaseUrl, this.sigefState);
408
409
  }
409
410
  }
410
- const ea = [
411
+ const aa = [
411
412
  "verticesPane",
412
413
  "perimetroPane",
413
414
  "overlayPane",
@@ -418,7 +419,7 @@ const ea = [
418
419
  "pane-homologados",
419
420
  "pane-homologados-pontos"
420
421
  ];
421
- class oa {
422
+ class na {
422
423
  constructor(t, e, o) {
423
424
  f(this, "map");
424
425
  f(this, "mapContainer");
@@ -433,7 +434,7 @@ class oa {
433
434
  this.selectionDiv || (this.selectionDiv = document.createElement("div"), this.selectionDiv.className = "cad-selection-box", this.selectionDiv.style.position = "absolute", this.selectionDiv.style.zIndex = "9999", this.selectionDiv.style.pointerEvents = "none", this.selectionDiv.style.display = "none", this.selectionDiv.style.borderRadius = "2px", this.mapContainer.style.position = "relative", this.mapContainer.appendChild(this.selectionDiv));
434
435
  }
435
436
  setPanesPointerEvents(t) {
436
- ea.forEach((e) => {
437
+ aa.forEach((e) => {
437
438
  const o = this.map.getPane(e);
438
439
  o && (o.style.pointerEvents = t);
439
440
  });
@@ -448,7 +449,7 @@ class oa {
448
449
  this.selectionDiv.style.left = `${Math.round(r)}px`, this.selectionDiv.style.top = `${Math.round(c)}px`, this.selectionDiv.style.width = `${Math.round(n)}px`, this.selectionDiv.style.height = `${Math.round(s)}px`, t.ctrlKey || t.metaKey ? (this.selectionDiv.style.background = "rgba(239, 68, 68, 0.22)", this.selectionDiv.style.border = o >= this.selectStartPos.x ? "1px solid #ef4444" : "1px dashed #ef4444") : o >= this.selectStartPos.x ? (this.selectionDiv.style.background = "rgba(14, 116, 144, 0.22)", this.selectionDiv.style.border = "1px solid #06b6d4") : (this.selectionDiv.style.background = "rgba(16, 185, 129, 0.22)", this.selectionDiv.style.border = "1px dashed #10b981");
449
450
  }
450
451
  finalizarSelecao(t, e, o) {
451
- var b, x, L, A, z, S, E, I, _;
452
+ var b, x, L, A, z, S, E, I, D;
452
453
  if (!this.isSelecting) return !1;
453
454
  this.isSelecting = !1, this.selectionDiv && (this.selectionDiv.style.display = "none"), this.map.closePopup();
454
455
  try {
@@ -459,8 +460,8 @@ class oa {
459
460
  if (c < 4 && l < 4) {
460
461
  const k = t.target;
461
462
  if (k && ((x = k.classList) != null && x.contains("leaflet-container") || k.id === "mapa-triagem" || (L = k.closest) != null && L.call(k, ".leaflet-pane"))) {
462
- const $ = ((A = k.closest) == null ? void 0 : A.call(k, ".custom-leaflet-marker")) || ((z = k.closest) == null ? void 0 : z.call(k, ".custom-div-icon")), D = t.ctrlKey || t.metaKey || t.shiftKey;
463
- !$ && !D && o();
463
+ const $ = ((A = k.closest) == null ? void 0 : A.call(k, ".custom-leaflet-marker")) || ((z = k.closest) == null ? void 0 : z.call(k, ".custom-div-icon")), _ = t.ctrlKey || t.metaKey || t.shiftKey;
464
+ !$ && !_ && o();
464
465
  }
465
466
  return !1;
466
467
  }
@@ -472,17 +473,17 @@ class oa {
472
473
  y2: Math.max(this.selectStartPoint.y, r.y)
473
474
  }, h = r.x >= this.selectStartPoint.x ? "window" : "crossing", u = !!(t.ctrlKey || t.metaKey), m = !!t.shiftKey, g = m ? "adicionar" : u ? "subtrair" : "substituir";
474
475
  (E = (S = this.ctx).selecionarFeicoesNaCaixa) == null || E.call(S, d, h, g);
475
- const p = ((I = this.ctx.mapaController) == null ? void 0 : I.getMarkers()) || [], v = ((_ = this.ctx.mapaController) == null ? void 0 : _.getVizinhosMarkers()) || [], M = [], w = [], C = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vertices"), P = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vizinhos");
476
+ const p = ((I = this.ctx.mapaController) == null ? void 0 : I.getMarkers()) || [], v = ((D = this.ctx.mapaController) == null ? void 0 : D.getVizinhosMarkers()) || [], M = [], w = [], C = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vertices"), P = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vizinhos");
476
477
  return C && p.forEach((k) => {
477
478
  const $ = k.pontoId;
478
479
  if (!$) return;
479
- const D = this.map.latLngToContainerPoint(k.getLatLng());
480
- D.x >= d.x1 && D.x <= d.x2 && D.y >= d.y1 && D.y <= d.y2 && M.push($);
480
+ const _ = this.map.latLngToContainerPoint(k.getLatLng());
481
+ _.x >= d.x1 && _.x <= d.x2 && _.y >= d.y1 && _.y <= d.y2 && M.push($);
481
482
  }), P && v.forEach((k) => {
482
483
  const $ = k.pontoId;
483
484
  if (!$) return;
484
- const D = this.map.latLngToContainerPoint(k.getLatLng());
485
- D.x >= d.x1 && D.x <= d.x2 && D.y >= d.y1 && D.y <= d.y2 && w.push($);
485
+ const _ = this.map.latLngToContainerPoint(k.getLatLng());
486
+ _.x >= d.x1 && _.x <= d.x2 && _.y >= d.y1 && _.y <= d.y2 && w.push($);
486
487
  }), m ? (M.forEach((k) => {
487
488
  this.ctx.selectedPontoIds.includes(k) || this.ctx.selectedPontoIds.push(k);
488
489
  }), w.forEach((k) => {
@@ -499,32 +500,32 @@ class oa {
499
500
  function gt(a) {
500
501
  return `pane-${a}`;
501
502
  }
502
- const Uo = ["poligono", "linha", "ponto", "texto"];
503
- function Zo(a, t) {
503
+ const Zo = ["poligono", "linha", "ponto", "texto"];
504
+ function Wo(a, t) {
504
505
  return `${gt(a)}-${t}`;
505
506
  }
506
507
  function U(a, t, e) {
507
- const o = a.getPane(gt(t)) ?? a.createPane(gt(t)), i = Zo(t, e);
508
+ const o = a.getPane(gt(t)) ?? a.createPane(gt(t)), i = Wo(t, e);
508
509
  if (!a.getPane(i)) {
509
510
  const n = a.createPane(i, o);
510
- n.style.zIndex = String((Uo.indexOf(e) + 1) * 100);
511
+ n.style.zIndex = String((Zo.indexOf(e) + 1) * 100);
511
512
  }
512
513
  return i;
513
514
  }
514
- const fo = "ui-canvas-hit-test-estilo", de = 6, ia = 4, aa = 4, qt = { poligono: 1, linha: 2, ponto: 3, texto: 3 };
515
- function na(a) {
515
+ const mo = "ui-canvas-hit-test-estilo", de = 6, sa = 4, ra = 4, qt = { poligono: 1, linha: 2, ponto: 3, texto: 3 };
516
+ function ca(a) {
516
517
  var i;
517
518
  const t = a.getRootNode(), e = t instanceof ShadowRoot ? t : document.head;
518
- if ((i = e.querySelector) != null && i.call(e, `#${fo}`)) return;
519
+ if ((i = e.querySelector) != null && i.call(e, `#${mo}`)) return;
519
520
  const o = document.createElement("style");
520
- o.id = fo, o.textContent = ".leaflet-pane > canvas { pointer-events: none !important; }", e.appendChild(o);
521
+ o.id = mo, o.textContent = ".leaflet-pane > canvas { pointer-events: none !important; }", e.appendChild(o);
521
522
  }
522
523
  const te = /* @__PURE__ */ new WeakMap();
523
- function Wo(a, t, e) {
524
+ function Xo(a, t, e) {
524
525
  let o = te.get(a);
525
526
  o || (o = /* @__PURE__ */ new Map(), te.set(a, o)), o.set(t, e);
526
527
  }
527
- function Xo(a, t, e) {
528
+ function Ko(a, t, e) {
528
529
  const o = te.get(a);
529
530
  (o == null ? void 0 : o.get(t)) === e && o.delete(t);
530
531
  }
@@ -532,7 +533,7 @@ function he(a, t) {
532
533
  var e, o;
533
534
  return t + (((e = a.options) == null ? void 0 : e.stroke) === !1 ? 0 : (((o = a.options) == null ? void 0 : o.weight) ?? 0) / 2);
534
535
  }
535
- function sa(a, t, e) {
536
+ function la(a, t, e) {
536
537
  let o = 1 / 0;
537
538
  for (const i of a) {
538
539
  for (let n = 1; n < i.length; n++)
@@ -541,40 +542,40 @@ function sa(a, t, e) {
541
542
  }
542
543
  return o;
543
544
  }
544
- function ra(a) {
545
+ function da(a) {
545
546
  const t = a._pxBounds;
546
547
  return t ? (t.max.x - t.min.x) * (t.max.y - t.min.y) : 0;
547
548
  }
548
- function ca(a, t, e) {
549
+ function ha(a, t, e) {
549
550
  var o, i, n;
550
551
  if (!((o = a.options) != null && o.interactive)) return null;
551
552
  if (a._point && a._radius !== void 0) {
552
- const s = a._radius, r = a._radiusY ?? a._radius, c = a._point.distanceTo(t), l = (s + r) / 2, d = e === "ponto" ? ia : he(a, de);
553
+ const s = a._radius, r = a._radiusY ?? a._radius, c = a._point.distanceTo(t), l = (s + r) / 2, d = e === "ponto" ? sa : he(a, de);
553
554
  return a.options.fill !== !1 && e === "poligono" ? c <= l + 1 ? 0 : null : e === "ponto" ? c <= l + d ? c : null : Math.abs(c - l) <= d ? Math.abs(c - l) : null;
554
555
  }
555
556
  if (a._parts) {
556
- const s = a instanceof y.Polygon, r = sa(a._parts, t, s);
557
+ const s = a instanceof y.Polygon, r = la(a._parts, t, s);
557
558
  return e === "linha" ? r <= he(a, de) ? r : null : s && ((i = a._containsPoint) != null && i.call(a, t)) ? 0 : r <= he(a, de) ? r : null;
558
559
  }
559
560
  return (n = a._containsPoint) != null && n.call(a, t) ? 0 : null;
560
561
  }
561
- function la(a) {
562
+ function ua(a) {
562
563
  const t = [];
563
564
  for (let e = a._drawFirst; e; e = e.next) t.push(e.layer);
564
565
  return t;
565
566
  }
566
- function Ko(a, t, e) {
567
+ function Yo(a, t, e) {
567
568
  var s;
568
569
  const o = a._paneRenderers;
569
570
  if (!o) return [];
570
571
  const i = t.filter((r) => r.visivel && r.interativo && !r.bloqueada).sort((r, c) => c.zIndex - r.zIndex), n = [];
571
572
  for (const r of i) {
572
- for (const l of Uo) {
573
- const d = o[Zo(r.id, l)];
573
+ for (const l of Zo) {
574
+ const d = o[Wo(r.id, l)];
574
575
  if (d)
575
- for (const h of la(d).reverse()) {
576
- const u = ca(h, e, l);
577
- u !== null && n.push({ camada: r, tipo: l, alvo: h, distancia: u, area: ra(h) });
576
+ for (const h of ua(d).reverse()) {
577
+ const u = ha(h, e, l);
578
+ u !== null && n.push({ camada: r, tipo: l, alvo: h, distancia: u, area: da(h) });
578
579
  }
579
580
  }
580
581
  const c = (s = te.get(a)) == null ? void 0 : s.get(r.id);
@@ -587,17 +588,17 @@ function Ko(a, t, e) {
587
588
  }
588
589
  return n.sort((r, c) => qt[r.tipo] !== qt[c.tipo] ? qt[c.tipo] - qt[r.tipo] : r.camada.zIndex !== c.camada.zIndex ? c.camada.zIndex - r.camada.zIndex : r.tipo === "poligono" && r.area !== c.area ? r.area - c.area : 0);
589
590
  }
590
- const De = /* @__PURE__ */ new WeakMap();
591
- function da(a, t, e) {
592
- const o = e.map((s) => s.chave === void 0 ? String(y.Util.stamp(s.alvo)) : `${y.Util.stamp(s.alvo)}:${s.chave}`), i = De.get(a);
591
+ const _e = /* @__PURE__ */ new WeakMap();
592
+ function pa(a, t, e) {
593
+ const o = e.map((s) => s.chave === void 0 ? String(y.Util.stamp(s.alvo)) : `${y.Util.stamp(s.alvo)}:${s.chave}`), i = _e.get(a);
593
594
  let n = 0;
594
- return i && Math.hypot(i.x - t.x, i.y - t.y) <= aa && i.ids.length === o.length && i.ids.every((s, r) => s === o[r]) && (n = (i.indice + 1) % e.length), De.set(a, { x: t.x, y: t.y, ids: o, indice: n }), e[n];
595
+ return i && Math.hypot(i.x - t.x, i.y - t.y) <= ra && i.ids.length === o.length && i.ids.every((s, r) => s === o[r]) && (n = (i.indice + 1) % e.length), _e.set(a, { x: t.x, y: t.y, ids: o, indice: n }), e[n];
595
596
  }
596
- function ha(a, t, e) {
597
- const o = a.mouseEventToLayerPoint(e), i = Ko(a, t, o);
597
+ function fa(a, t, e) {
598
+ const o = a.mouseEventToLayerPoint(e), i = Yo(a, t, o);
598
599
  if (i.length === 0)
599
- return De.delete(a), !1;
600
- const n = da(a, o, i);
600
+ return _e.delete(a), !1;
601
+ const n = pa(a, o, i);
601
602
  return n.alvo.fire(
602
603
  e.type,
603
604
  {
@@ -610,11 +611,11 @@ function ha(a, t, e) {
610
611
  !0
611
612
  ), !0;
612
613
  }
613
- function Ir(a, t, e) {
614
- return Ko(a, t, a.mouseEventToLayerPoint(e))[0] ?? null;
614
+ function qr(a, t, e) {
615
+ return Yo(a, t, a.mouseEventToLayerPoint(e))[0] ?? null;
615
616
  }
616
- const mo = ".cad-vertex-handle, .cad-vertex-ghost, .cad-bezier-handle, #cm-vertex-edit-hud, #cm-draw-hud";
617
- class ua {
617
+ const go = ".cad-vertex-handle, .cad-vertex-ghost, .cad-bezier-handle, #cm-vertex-edit-hud, #cm-draw-hud";
618
+ class ma {
618
619
  constructor(t) {
619
620
  f(this, "ctx");
620
621
  f(this, "map", null);
@@ -636,7 +637,7 @@ class ua {
636
637
  var e, o;
637
638
  if (!(!this.map || !this.mapContainer))
638
639
  if (t.touches.length === 1) {
639
- if ((o = (e = t.target) == null ? void 0 : e.closest) != null && o.call(e, mo)) {
640
+ if ((o = (e = t.target) == null ? void 0 : e.closest) != null && o.call(e, go)) {
640
641
  this.isTouchPanning = !1;
641
642
  return;
642
643
  }
@@ -662,7 +663,7 @@ class ua {
662
663
  });
663
664
  f(this, "handleClick", (t) => {
664
665
  var e, o, i, n, s, r;
665
- !this.map || !this.ctx.layerManager || (o = (e = this.ctx).ferramentaAtiva) != null && o.call(e) || (n = (i = this.ctx).edicaoAtiva) != null && n.call(i) || (r = (s = t.target) == null ? void 0 : s.closest) != null && r.call(s, ".leaflet-marker-icon") || ha(this.map, this.ctx.layerManager.getLayers(), t);
666
+ !this.map || !this.ctx.layerManager || (o = (e = this.ctx).ferramentaAtiva) != null && o.call(e) || (n = (i = this.ctx).edicaoAtiva) != null && n.call(i) || (r = (s = t.target) == null ? void 0 : s.closest) != null && r.call(s, ".leaflet-marker-icon") || fa(this.map, this.ctx.layerManager.getLayers(), t);
666
667
  });
667
668
  f(this, "handleMouseDown", (t) => {
668
669
  var o, i, n, s, r, c, l;
@@ -678,7 +679,7 @@ class ua {
678
679
  return;
679
680
  }
680
681
  if (t.button === 0) {
681
- if ((i = (o = t.target) == null ? void 0 : o.closest) != null && i.call(o, mo) || (s = (n = this.ctx).ferramentaAtiva) != null && s.call(n) || (c = (r = this.ctx).edicaoAtiva) != null && c.call(r) || (this.selectionHappened = !1, this.ctx.mapaController && this.ctx.mapaController.modoCliqueSequencialAtivo))
682
+ if ((i = (o = t.target) == null ? void 0 : o.closest) != null && i.call(o, go) || (s = (n = this.ctx).ferramentaAtiva) != null && s.call(n) || (c = (r = this.ctx).edicaoAtiva) != null && c.call(r) || (this.selectionHappened = !1, this.ctx.mapaController && this.ctx.mapaController.modoCliqueSequencialAtivo))
682
683
  return;
683
684
  (l = this.selecaoBox) == null || l.iniciarSelecao(t);
684
685
  }
@@ -742,7 +743,7 @@ class ua {
742
743
  };
743
744
  }
744
745
  ativar(t, e) {
745
- this.mapContainer && this.desativar(), this.ctx.mapaController = t, e && (this.ctx.containerHost = e), this.map = t.getMap(), this.map && (this.mapContainer = this.map.getContainer(), this.mapContainer && (this.map.dragging.disable(), this.map.doubleClickZoom.disable(), this.map.boxZoom.disable(), this.selecaoBox = new oa(this.map, this.mapContainer, this.ctx), na(this.mapContainer), this.mapContainer.addEventListener("click", this.handleClick), this.mapContainer.addEventListener("mousedown", this.handleMouseDown), this.mapContainer.addEventListener("mousemove", this.handleMouseMove), window.addEventListener("mouseup", this.handleMouseUp), this.mapContainer.addEventListener("contextmenu", this.handleContextMenu), window.addEventListener("keydown", this.handleKeyDown), window.addEventListener("keyup", this.handleKeyUp), window.addEventListener("blur", this.handleBlur), this.mapContainer.addEventListener("touchstart", this.handleTouchStart, { passive: !1 }), this.mapContainer.addEventListener("touchmove", this.handleTouchMove, { passive: !1 }), this.mapContainer.addEventListener("touchend", this.handleTouchEnd), this.mapContainer.addEventListener("touchcancel", this.handleTouchEnd)));
746
+ this.mapContainer && this.desativar(), this.ctx.mapaController = t, e && (this.ctx.containerHost = e), this.map = t.getMap(), this.map && (this.mapContainer = this.map.getContainer(), this.mapContainer && (this.map.dragging.disable(), this.map.doubleClickZoom.disable(), this.map.boxZoom.disable(), this.selecaoBox = new na(this.map, this.mapContainer, this.ctx), ca(this.mapContainer), this.mapContainer.addEventListener("click", this.handleClick), this.mapContainer.addEventListener("mousedown", this.handleMouseDown), this.mapContainer.addEventListener("mousemove", this.handleMouseMove), window.addEventListener("mouseup", this.handleMouseUp), this.mapContainer.addEventListener("contextmenu", this.handleContextMenu), window.addEventListener("keydown", this.handleKeyDown), window.addEventListener("keyup", this.handleKeyUp), window.addEventListener("blur", this.handleBlur), this.mapContainer.addEventListener("touchstart", this.handleTouchStart, { passive: !1 }), this.mapContainer.addEventListener("touchmove", this.handleTouchMove, { passive: !1 }), this.mapContainer.addEventListener("touchend", this.handleTouchEnd), this.mapContainer.addEventListener("touchcancel", this.handleTouchEnd)));
746
747
  }
747
748
  desativar() {
748
749
  this.mapContainer && (this.mapContainer.removeEventListener("click", this.handleClick), this.mapContainer.removeEventListener("mousedown", this.handleMouseDown), this.mapContainer.removeEventListener("mousemove", this.handleMouseMove), this.mapContainer.removeEventListener("contextmenu", this.handleContextMenu), this.mapContainer.removeEventListener("touchstart", this.handleTouchStart), this.mapContainer.removeEventListener("touchmove", this.handleTouchMove), this.mapContainer.removeEventListener("touchend", this.handleTouchEnd), this.mapContainer.removeEventListener("touchcancel", this.handleTouchEnd)), window.removeEventListener("mouseup", this.handleMouseUp), window.removeEventListener("keydown", this.handleKeyDown), window.removeEventListener("keyup", this.handleKeyUp), window.removeEventListener("blur", this.handleBlur), this.isSpacePressed = !1, this.isSpacePanning = !1, this.cancelarSupressaoClique(), this.selecaoBox && (this.selecaoBox.destruir(), this.selecaoBox = null), this.map && (this.map.dragging.enable(), this.map.doubleClickZoom.enable(), this.map.boxZoom.enable()), this.mapContainer = null, this.isPanning = !1, this.isTouchPanning = !1;
@@ -797,7 +798,7 @@ class R {
797
798
  }
798
799
  }
799
800
  f(R, "renderers", /* @__PURE__ */ new Map());
800
- class pa {
801
+ class ga {
801
802
  render(t, e, o) {
802
803
  var l, d, h, u;
803
804
  let i = 16;
@@ -827,7 +828,7 @@ class pa {
827
828
  e.hasLayer(t) && e.removeLayer(t);
828
829
  }
829
830
  }
830
- class fa {
831
+ class va {
831
832
  render(t, e, o) {
832
833
  var l, d, h, u;
833
834
  const i = ((l = t.dados) == null ? void 0 : l.url) || "https://acervofundiario.incra.gov.br/i3geo/ogc.php", n = ((d = t.dados) == null ? void 0 : d.layers) || "certificada_sigef_particular_pr", s = ((h = t.dados) == null ? void 0 : h.format) || "image/png", r = ((u = t.dados) == null ? void 0 : u.attribution) || "INCRA/SIGEF";
@@ -853,7 +854,7 @@ class fa {
853
854
  e.hasLayer(t) && e.removeLayer(t);
854
855
  }
855
856
  }
856
- function Yo(a, t, e) {
857
+ function Qo(a, t, e) {
857
858
  const o = a.estilo.espessuraLinha || e.config.perimetroWeight || 2, i = e.graphicScale.lineScaleMultiplier || 1;
858
859
  if (a.estilo.scaleMode === "world") {
859
860
  const n = a.estilo.dimensaoMetros || 0.3, s = t.getCenter(), r = t.getZoom(), c = 40075016686e-3 * Math.abs(Math.cos(s.lat * Math.PI / 180)) / Math.pow(2, r + 8), l = n / (c > 0 ? c : 1);
@@ -874,9 +875,9 @@ function ut(a, t, e, o, i) {
874
875
  interactive: !1
875
876
  }).addTo(a);
876
877
  }
877
- function go(a, t, e, o, i) {
878
+ function vo(a, t, e, o, i) {
878
879
  var g, p, v, M, w, C, P, b;
879
- const n = a.id === "homologados", s = ((g = a.dados) == null ? void 0 : g.conexoes) ?? (Array.isArray(a.dados) && a.dados.length > 0 && "origemId" in a.dados[0] ? a.dados : null), r = ((p = a.dados) == null ? void 0 : p.segmentos) || o.segmentos || [], c = ((v = a.dados) == null ? void 0 : v.pontos) || (n ? o.bancoPontos || [] : o.pontos) || [], l = Yo(a, e, o), d = 1, h = a.interativo && !a.bloqueada, u = [];
880
+ const n = a.id === "homologados", s = ((g = a.dados) == null ? void 0 : g.conexoes) ?? (Array.isArray(a.dados) && a.dados.length > 0 && "origemId" in a.dados[0] ? a.dados : null), r = ((p = a.dados) == null ? void 0 : p.segmentos) || o.segmentos || [], c = ((v = a.dados) == null ? void 0 : v.pontos) || (n ? o.bancoPontos || [] : o.pontos) || [], l = Qo(a, e, o), d = 1, h = a.interativo && !a.bloqueada, u = [];
880
881
  c.forEach((x) => {
881
882
  const L = V(x.lat ?? x.latitude ?? x.y, x.lon ?? x.lng ?? x.longitude ?? x.x);
882
883
  L && u.push({ ...x, lat: L.lat, lon: L.lon });
@@ -895,10 +896,10 @@ function go(a, t, e, o, i) {
895
896
  };
896
897
  if (s && Array.isArray(s)) {
897
898
  s.forEach((x) => {
898
- var z, S, E, I, _, k, $;
899
+ var z, S, E, I, D, k, $;
899
900
  const L = m(x.origemId), A = m(x.destinoId);
900
901
  if (L && A && L.lat && L.lon && A.lat && A.lon) {
901
- const D = x.tipoLinha === "tracejada" || ((z = x.estilo) == null ? void 0 : z.tipoLinha) === "tracejada", q = ((S = x.estilo) == null ? void 0 : S.cor) || ((E = x.estilo) == null ? void 0 : E.color) || a.estilo.corPrimaria || "#00f5a0", N = ((I = x.estilo) == null ? void 0 : I.espessura) || ((_ = x.estilo) == null ? void 0 : _.weight) || l, F = [[L.lat, L.lon], [A.lat, A.lon]], B = D ? "6, 6" : a.estilo.dashArray;
902
+ const _ = x.tipoLinha === "tracejada" || ((z = x.estilo) == null ? void 0 : z.tipoLinha) === "tracejada", q = ((S = x.estilo) == null ? void 0 : S.cor) || ((E = x.estilo) == null ? void 0 : E.color) || a.estilo.corPrimaria || "#00f5a0", N = ((I = x.estilo) == null ? void 0 : I.espessura) || ((D = x.estilo) == null ? void 0 : D.weight) || l, F = [[L.lat, L.lon], [A.lat, A.lon]], B = _ ? "6, 6" : a.estilo.dashArray;
902
903
  ut(t, F, N, i, B);
903
904
  const O = y.polyline(F, {
904
905
  color: q,
@@ -934,9 +935,9 @@ function go(a, t, e, o, i) {
934
935
  Object.entries(L).forEach(([S, E]) => {
935
936
  const I = Wt(E);
936
937
  if (I.length < 2) return;
937
- const _ = I.map(($) => [$.lat, $.lon]);
938
- ut(t, _, l, i, a.estilo.dashArray);
939
- const k = y.polyline(_, {
938
+ const D = I.map(($) => [$.lat, $.lon]);
939
+ ut(t, D, l, i, a.estilo.dashArray);
940
+ const k = y.polyline(D, {
940
941
  color: z,
941
942
  weight: l,
942
943
  opacity: d,
@@ -949,8 +950,8 @@ function go(a, t, e, o, i) {
949
950
  <div style="font-weight:700; font-size:12px; margin-bottom:3px; color:#ffffff;">Polilinha: Grupo ${T(S)}</div>
950
951
  <div style="font-size:11px; color:rgba(255, 255, 255, 0.65);">Vértices: ${I.length}</div>
951
952
  </div>
952
- `, { className: "compact-popup", maxWidth: 220 }), k.addTo(t), A && _.length >= 3) {
953
- const $ = _[_.length - 1], D = _[0], q = [$, D];
953
+ `, { className: "compact-popup", maxWidth: 220 }), k.addTo(t), A && D.length >= 3) {
954
+ const $ = D[D.length - 1], _ = D[0], q = [$, _];
954
955
  ut(t, q, l, i, "4, 4"), y.polyline(q, {
955
956
  color: z,
956
957
  weight: l,
@@ -968,9 +969,9 @@ function go(a, t, e, o, i) {
968
969
  var z;
969
970
  const L = u.find((S) => String(S.id) === String(x.ponto_inicio_id)), A = u.find((S) => String(S.id) === String(x.ponto_fim_id));
970
971
  if (L && A && L.lat && L.lon && A.lat && A.lon) {
971
- const S = x.tipo_limite_sigef || x.tipo_limite || "", E = x.metodo_posicionamento_sigef || x.metodo_posicionamento || "", I = S === "LA1" ? "#10b981" : S === "LN1" ? "#3b82f6" : "#00f5a0", _ = x.id != null ? x.id : `${x.ponto_inicio_id}-${x.ponto_fim_id}`, k = o.selectedSegmentoId != null && (String(o.selectedSegmentoId) === String(x.id) || String(o.selectedSegmentoId) === String(_)), $ = k ? "#facc15" : a.estilo.corPrimaria || I, D = [[L.lat, L.lon], [A.lat, A.lon]], q = k ? l + 3 : l, N = S === "LN1" ? "6, 6" : a.estilo.dashArray;
972
- ut(t, D, k ? q + 2 : q, i, N);
973
- const F = y.polyline(D, {
972
+ const S = x.tipo_limite_sigef || x.tipo_limite || "", E = x.metodo_posicionamento_sigef || x.metodo_posicionamento || "", I = S === "LA1" ? "#10b981" : S === "LN1" ? "#3b82f6" : "#00f5a0", D = x.id != null ? x.id : `${x.ponto_inicio_id}-${x.ponto_fim_id}`, k = o.selectedSegmentoId != null && (String(o.selectedSegmentoId) === String(x.id) || String(o.selectedSegmentoId) === String(D)), $ = k ? "#facc15" : a.estilo.corPrimaria || I, _ = [[L.lat, L.lon], [A.lat, A.lon]], q = k ? l + 3 : l, N = S === "LN1" ? "6, 6" : a.estilo.dashArray;
973
+ ut(t, _, k ? q + 2 : q, i, N);
974
+ const F = y.polyline(_, {
974
975
  color: $,
975
976
  weight: q,
976
977
  opacity: k ? 1 : d,
@@ -978,9 +979,9 @@ function go(a, t, e, o, i) {
978
979
  pane: i,
979
980
  interactive: h
980
981
  });
981
- if (F.segmentoId = _, F.segmento = x, h) {
982
+ if (F.segmentoId = D, F.segmento = x, h) {
982
983
  F.on("click", (G) => {
983
- G && G.originalEvent && G.originalEvent.stopPropagation(), o.onSegmentoClick && o.onSegmentoClick(_, x, {
984
+ G && G.originalEvent && G.originalEvent.stopPropagation(), o.onSegmentoClick && o.onSegmentoClick(D, x, {
984
985
  lat: (L.lat + A.lat) / 2,
985
986
  lon: (L.lon + A.lon) / 2
986
987
  });
@@ -1010,16 +1011,16 @@ function go(a, t, e, o, i) {
1010
1011
  Object.values(A).forEach((E) => {
1011
1012
  const I = Wt(E);
1012
1013
  if (I.length < 2) return;
1013
- const _ = I.map(($) => [$.lat, $.lon]);
1014
- if (ut(t, _, l, i, S), y.polyline(_, {
1014
+ const D = I.map(($) => [$.lat, $.lon]);
1015
+ if (ut(t, D, l, i, S), y.polyline(D, {
1015
1016
  color: z,
1016
1017
  weight: l,
1017
1018
  opacity: d,
1018
1019
  dashArray: S,
1019
1020
  pane: i,
1020
1021
  interactive: h
1021
- }).addTo(t), _.length >= 3) {
1022
- const $ = _[_.length - 1], D = _[0], q = n ? "6, 8" : "4, 4", N = [$, D];
1022
+ }).addTo(t), D.length >= 3) {
1023
+ const $ = D[D.length - 1], _ = D[0], q = n ? "6, 8" : "4, 4", N = [$, _];
1023
1024
  ut(t, N, l, i, q), y.polyline(N, {
1024
1025
  color: z,
1025
1026
  weight: l,
@@ -1032,16 +1033,16 @@ function go(a, t, e, o, i) {
1032
1033
  });
1033
1034
  }
1034
1035
  }
1035
- class ma {
1036
+ class ya {
1036
1037
  constructor() {
1037
1038
  f(this, "zoomListenerMap", /* @__PURE__ */ new WeakMap());
1038
1039
  }
1039
1040
  render(t, e, o) {
1040
1041
  const i = y.layerGroup(), n = U(e, t.id, "linha");
1041
- go(t, i, e, o, n);
1042
+ vo(t, i, e, o, n);
1042
1043
  const s = () => {
1043
1044
  if (t.estilo.scaleMode === "world") {
1044
- const r = Yo(t, e, o);
1045
+ const r = Qo(t, e, o);
1045
1046
  i.eachLayer((c) => {
1046
1047
  c.setStyle && c.setStyle({ weight: r });
1047
1048
  });
@@ -1050,7 +1051,7 @@ class ma {
1050
1051
  return e.on("zoomend", s), this.zoomListenerMap.set(i, s), i;
1051
1052
  }
1052
1053
  update(t, e, o, i, n) {
1053
- (o.opacidade !== void 0 || o.estilo !== void 0 || o.dados !== void 0 || o.interativo !== void 0 || o.bloqueada !== void 0) && (e.clearLayers(), go(t, e, n, i, U(n, t.id, "linha")));
1054
+ (o.opacidade !== void 0 || o.estilo !== void 0 || o.dados !== void 0 || o.interativo !== void 0 || o.bloqueada !== void 0) && (e.clearLayers(), vo(t, e, n, i, U(n, t.id, "linha")));
1054
1055
  }
1055
1056
  destroy(t, e) {
1056
1057
  const o = this.zoomListenerMap.get(t);
@@ -1061,12 +1062,12 @@ const qe = 300;
1061
1062
  function $e(a) {
1062
1063
  return a > qe ? "compacta" : "normal";
1063
1064
  }
1064
- function Qo(a, t) {
1065
+ function Jo(a, t) {
1065
1066
  if (a <= qe) return 1;
1066
1067
  const e = Math.max(0.7, 1 - 0.3 * Math.log10(a / qe)), o = t >= 18 ? 1 : t >= 16 ? 0.92 : t >= 14 ? 0.82 : 0.72;
1067
1068
  return Math.max(0.6, e * o);
1068
1069
  }
1069
- function ga(a) {
1070
+ function ba(a) {
1070
1071
  if (!a) return "#00f5a0";
1071
1072
  const t = a.trim();
1072
1073
  if (t.startsWith("#") || t.startsWith("rgb") || t.startsWith("hsl") || t.startsWith("var("))
@@ -1089,7 +1090,7 @@ function ga(a) {
1089
1090
  if (t.includes(o)) return i;
1090
1091
  return "#00f5a0";
1091
1092
  }
1092
- function vo(a) {
1093
+ function yo(a) {
1093
1094
  return a.replace(/[&<>"']/g, (t) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[t]);
1094
1095
  }
1095
1096
  const ue = {
@@ -1100,21 +1101,21 @@ const ue = {
1100
1101
  x: ["M2 2L10 10", "M10 2L2 10"]
1101
1102
  };
1102
1103
  function ee(a, t, e, o = "", i = "", n = !1, s = {}) {
1103
- const r = n || o.includes("ponto-selecionado") || o.includes("cad-marker-selected"), c = s.densidade === "compacta", l = vo(ga(e)), d = t + 6, h = r ? `color-mix(in srgb, ${l} 38%, #000000)` : l, u = r ? 1 : c ? 0.72 : 0.9, m = r ? "rgba(255,255,255,0.95)" : c ? "rgba(0,0,0,0.55)" : "rgba(0,0,0,0.7)", g = r ? 1.3 : c ? 0.8 : 1, p = r ? "rgba(255,255,255,0.9)" : "rgba(0,0,0,0.6)", v = (L, A, z, S = "") => `class="${L}" stroke="${A}" stroke-width="${z}" vector-effect="non-scaling-stroke" ${S}`, M = a in ue ? `<polygon points="${ue[a]}" style="fill:${h}" fill-opacity="${u}" stroke-linejoin="round" ${v("cad-pt-contorno", m, g)} />` : a in pe ? pe[a].map(
1104
+ const r = n || o.includes("ponto-selecionado") || o.includes("cad-marker-selected"), c = s.densidade === "compacta", l = yo(ba(e)), d = t + 6, h = r ? `color-mix(in srgb, ${l} 38%, #000000)` : l, u = r ? 1 : c ? 0.72 : 0.9, m = r ? "rgba(255,255,255,0.95)" : c ? "rgba(0,0,0,0.55)" : "rgba(0,0,0,0.7)", g = r ? 1.3 : c ? 0.8 : 1, p = r ? "rgba(255,255,255,0.9)" : "rgba(0,0,0,0.6)", v = (L, A, z, S = "") => `class="${L}" stroke="${A}" stroke-width="${z}" vector-effect="non-scaling-stroke" ${S}`, M = a in ue ? `<polygon points="${ue[a]}" style="fill:${h}" fill-opacity="${u}" stroke-linejoin="round" ${v("cad-pt-contorno", m, g)} />` : a in pe ? pe[a].map(
1104
1105
  (L) => (
1105
1106
  // Traço = halo escuro (contraste sobre satélite) + traço colorido por cima
1106
1107
  `<path d="${L}" fill="none" stroke-linecap="round" ${v("cad-pt-halo", p, c ? 2.6 : 3.4)} /><path d="${L}" fill="none" stroke-linecap="round" ${v("cad-pt-traco", r ? h : l, c ? 1.3 : 1.8, `stroke-opacity="${r ? 1 : c ? 0.9 : 1}"`)} />`
1107
1108
  )
1108
1109
  ).join("") : a === "square" ? `<rect x="1.2" y="1.2" width="9.6" height="9.6" rx="1.4" style="fill:${h}" fill-opacity="${u}" ${v("cad-pt-contorno", m, g)} />` : `<circle cx="6" cy="6" r="5.2" style="fill:${h}" fill-opacity="${u}" ${v("cad-pt-contorno", m, g)} />`, w = !c && !r && !(a in pe) ? a in ue ? "" : a === "square" ? '<rect x="2.2" y="2.2" width="7.6" height="7.6" rx="0.9" fill="none" stroke="rgba(255,255,255,0.45)" stroke-width="0.8" vector-effect="non-scaling-stroke" />' : '<circle cx="6" cy="6" r="4.3" fill="none" stroke="rgba(255,255,255,0.45)" stroke-width="0.8" vector-effect="non-scaling-stroke" />' : "", C = a === "circle-dot" ? '<circle cx="6" cy="6" r="1.7" fill="#ffffff" stroke="rgba(0,0,0,0.45)" stroke-width="0.6" vector-effect="non-scaling-stroke" />' : "", P = `cad-pt ${c ? "cad-pt-compacto" : ""} ${e} ${o} ${r ? "ponto-selecionado" : ""}`.replace(/\s+/g, " ").trim(), b = t;
1109
1110
  return `
1110
- <div ${i ? `id="${vo(i)}"` : ""} class="${P}" style="display:flex; align-items:center; justify-content:center; width:${d}px; height:${d}px; position:relative; pointer-events:auto; background:none !important;">
1111
+ <div ${i ? `id="${yo(i)}"` : ""} class="${P}" style="display:flex; align-items:center; justify-content:center; width:${d}px; height:${d}px; position:relative; pointer-events:auto; background:none !important;">
1111
1112
  <svg width="${b}" height="${b}" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" style="overflow:visible; display:block;">
1112
1113
  ${M}${w}${C}
1113
1114
  </svg>
1114
1115
  </div>
1115
1116
  `;
1116
1117
  }
1117
- class va {
1118
+ class xa {
1118
1119
  constructor() {
1119
1120
  f(this, "zoomListenerMap", /* @__PURE__ */ new WeakMap());
1120
1121
  }
@@ -1154,7 +1155,7 @@ class va {
1154
1155
  const c = t.estilo.dimensaoMetros || 0.25, l = e.getCenter(), d = e.getZoom(), h = 40075016686e-3 * Math.abs(Math.cos(l.lat * Math.PI / 180)) / Math.pow(2, d + 8), u = c / (h > 0 ? h : 1);
1155
1156
  return Math.max(3, Math.round(u * s));
1156
1157
  }
1157
- const r = Qo(n, e.getZoom());
1158
+ const r = Jo(n, e.getZoom());
1158
1159
  return Math.max(r < 1 ? 5 : 4, Math.round(i * s * r));
1159
1160
  }
1160
1161
  rebuildPoints(t, e, o, i, n) {
@@ -1173,13 +1174,13 @@ class va {
1173
1174
  interactive: c
1174
1175
  });
1175
1176
  if (L && S.setZIndexOffset(2e3), S.pontoId = g.id, S.layerId = t.id, S.isVizinho = l, S.baseSize = x, S.shapeStyle = P, S.markerBg = b, S.isSelected = L, S.densTotal = u, S.tamanhoPx = A, c) {
1176
- const E = d ? "Vértice Homologado SIGEF" : l ? "Confrontante (Importado)" : C ? "Base Homologada PPP" : w ? "Base de Campo (Translação)" : "Vértice de Perímetro", I = g.acoes || t.acoes || ((M = t.dados) == null ? void 0 : M.acoes) || [], _ = It(I, g.id);
1177
+ const E = d ? "Vértice Homologado SIGEF" : l ? "Confrontante (Importado)" : C ? "Base Homologada PPP" : w ? "Base de Campo (Translação)" : "Vértice de Perímetro", I = g.acoes || t.acoes || ((M = t.dados) == null ? void 0 : M.acoes) || [], D = It(I, g.id);
1177
1178
  S.bindPopup(`
1178
1179
  <div style="font-family:var(--ui-fonte-base, sans-serif); color:rgba(255, 255, 255, 0.9); line-height:1.3;">
1179
1180
  <div style="font-weight:700; font-size:13px; margin-bottom:4px; color:#ffffff;">${T(g.nome_vertice || String(g.id))}</div>
1180
1181
  <div style="font-size:11px; color:rgba(255, 255, 255, 0.65);">${T(E)} · ${T(g.tipo_ponto || g.tipo || "Vértice")}</div>
1181
1182
  <div style="font-size:11px; color:rgba(255, 255, 255, 0.45); font-family:var(--ui-fonte-codigo, monospace); margin-top:4px;">Lat ${Number(p).toFixed(6)} &nbsp; Lon ${Number(v).toFixed(6)}</div>
1182
- ${_}
1183
+ ${D}
1183
1184
  </div>
1184
1185
  `, {
1185
1186
  className: "compact-popup",
@@ -1202,7 +1203,7 @@ class va {
1202
1203
  o && (e.off("zoomend", o), this.zoomListenerMap.delete(t)), t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
1203
1204
  }
1204
1205
  }
1205
- class ya {
1206
+ class Pa {
1206
1207
  render(t, e, o) {
1207
1208
  const i = y.layerGroup();
1208
1209
  return this.rebuildPolygons(t, i, o, e), i;
@@ -1211,9 +1212,9 @@ class ya {
1211
1212
  var m, g;
1212
1213
  const n = U(i, t.id, "poligono"), s = U(i, t.id, "ponto"), c = (((m = t.dados) == null ? void 0 : m.poligonos) ?? (Array.isArray(t.dados) ? t.dados : null)) || ((g = t.dados) == null ? void 0 : g.confrontantes) || o.confrontantes || [], l = t.interativo && !t.bloqueada, d = t.estilo.corPrimaria || "#a855f7", h = t.estilo.espessuraLinha || 1, u = 1;
1213
1214
  c.forEach((p) => {
1214
- var L, A, z, S, E, I, _, k, $, D;
1215
+ var L, A, z, S, E, I, D, k, $, _;
1215
1216
  if (!p) return;
1216
- const v = ((L = p.estilo) == null ? void 0 : L.cor) || ((A = p.estilo) == null ? void 0 : A.color) || d, M = ((z = p.estilo) == null ? void 0 : z.espessura) || ((S = p.estilo) == null ? void 0 : S.weight) || h, w = ((E = p.estilo) == null ? void 0 : E.opacidade) ?? u, C = ((I = p.estilo) == null ? void 0 : I.fillColor) || v, P = ((_ = p.estilo) == null ? void 0 : _.fillOpacity) ?? Math.min(0.14, w * 0.1), b = ((k = p.estilo) == null ? void 0 : k.dashArray) || t.estilo.dashArray || "4, 6";
1217
+ const v = ((L = p.estilo) == null ? void 0 : L.cor) || ((A = p.estilo) == null ? void 0 : A.color) || d, M = ((z = p.estilo) == null ? void 0 : z.espessura) || ((S = p.estilo) == null ? void 0 : S.weight) || h, w = ((E = p.estilo) == null ? void 0 : E.opacidade) ?? u, C = ((I = p.estilo) == null ? void 0 : I.fillColor) || v, P = ((D = p.estilo) == null ? void 0 : D.fillOpacity) ?? Math.min(0.14, w * 0.1), b = ((k = p.estilo) == null ? void 0 : k.dashArray) || t.estilo.dashArray || "4, 6";
1217
1218
  if (p.coordenadas && Array.isArray(p.coordenadas) && p.coordenadas.length >= 3) {
1218
1219
  const q = Array.isArray(p.coordenadas[0]) && Array.isArray(p.coordenadas[0][0]);
1219
1220
  let N;
@@ -1278,7 +1279,7 @@ class ya {
1278
1279
  interactive: l
1279
1280
  });
1280
1281
  if (j.poligonoId = p.id, j.layerId = t.id, l) {
1281
- const G = p.acoes || t.acoes || ((D = t.dados) == null ? void 0 : D.acoes) || [], K = It(G, p.id);
1282
+ const G = p.acoes || t.acoes || ((_ = t.dados) == null ? void 0 : _.acoes) || [], K = It(G, p.id);
1282
1283
  j.bindPopup(`
1283
1284
  <div style="font-family:var(--ui-fonte-base, sans-serif); color:rgba(255, 255, 255, 0.9); line-height:1.3; min-width:180px;">
1284
1285
  <div style="font-weight:700; font-size:12px; color:#c084fc; margin-bottom:3px; border-bottom:1px solid rgba(255,255,255,0.1); padding-bottom:3px;">${N}</div>
@@ -1342,7 +1343,7 @@ class ya {
1342
1343
  t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
1343
1344
  }
1344
1345
  }
1345
- class ba {
1346
+ class La {
1346
1347
  constructor() {
1347
1348
  f(this, "moveListenerMap", /* @__PURE__ */ new WeakMap());
1348
1349
  }
@@ -1381,7 +1382,7 @@ class ba {
1381
1382
  o && (e.off("zoomend moveend", o), this.moveListenerMap.delete(t)), t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
1382
1383
  }
1383
1384
  }
1384
- function Jo(a, t) {
1385
+ function ti(a, t) {
1385
1386
  var s, r;
1386
1387
  const e = a._nosCurva, o = a._renderer, i = a._map;
1387
1388
  if (!e || e.length < 2 || !o || !i) return !1;
@@ -1390,15 +1391,15 @@ function Jo(a, t) {
1390
1391
  if (!o._drawing || !((s = a._parts) != null && s.length)) return !0;
1391
1392
  const c = o._ctx;
1392
1393
  c.beginPath();
1393
- for (const l of Ai(e, t)) {
1394
+ for (const l of wi(e, t)) {
1394
1395
  const d = l.pts.map(n);
1395
1396
  l.cmd === "M" ? c.moveTo(d[0].x, d[0].y) : l.cmd === "L" ? c.lineTo(d[0].x, d[0].y) : c.bezierCurveTo(d[0].x, d[0].y, d[1].x, d[1].y, d[2].x, d[2].y);
1396
1397
  }
1397
1398
  return t && c.closePath(), o._fillStroke(c, a), !0;
1398
1399
  }
1399
- return o._setPath ? (o._setPath(a, (r = a._parts) != null && r.length ? wi(e, t, n) : "M0 0"), !0) : !1;
1400
+ return o._setPath ? (o._setPath(a, (r = a._parts) != null && r.length ? zi(e, t, n) : "M0 0"), !0) : !1;
1400
1401
  }
1401
- class ti extends y.Polyline {
1402
+ class ei extends y.Polyline {
1402
1403
  constructor() {
1403
1404
  super(...arguments);
1404
1405
  f(this, "_nosCurva", null);
@@ -1408,10 +1409,10 @@ class ti extends y.Polyline {
1408
1409
  this._nosCurva = e;
1409
1410
  }
1410
1411
  _updatePath() {
1411
- Jo(this, !1) || y.Polyline.prototype._updatePath.call(this);
1412
+ ti(this, !1) || y.Polyline.prototype._updatePath.call(this);
1412
1413
  }
1413
1414
  }
1414
- class ei extends y.Polygon {
1415
+ class oi extends y.Polygon {
1415
1416
  constructor() {
1416
1417
  super(...arguments);
1417
1418
  f(this, "_nosCurva", null);
@@ -1420,16 +1421,16 @@ class ei extends y.Polygon {
1420
1421
  this._nosCurva = e;
1421
1422
  }
1422
1423
  _updatePath() {
1423
- Jo(this, !0) || y.Polygon.prototype._updatePath.call(this);
1424
+ ti(this, !0) || y.Polygon.prototype._updatePath.call(this);
1424
1425
  }
1425
1426
  }
1426
1427
  function to(a, t) {
1427
1428
  const e = xt(a);
1428
1429
  if (!e) return null;
1429
- const o = a.tipo === "Polygon" ? new ei(a.aneis[0], t) : new ti(a.coordenadas, t);
1430
+ const o = a.tipo === "Polygon" ? new oi(a.aneis[0], t) : new ei(a.coordenadas, t);
1430
1431
  return o.definirCurva(e), o;
1431
1432
  }
1432
- function oi(a, t) {
1433
+ function ii(a, t) {
1433
1434
  a.definirCurva(xt(t)), a.setLatLngs(t.tipo === "Polygon" ? t.aneis[0] : t.coordenadas);
1434
1435
  }
1435
1436
  function vt(a) {
@@ -1442,7 +1443,7 @@ function Fe(a, t) {
1442
1443
  function yt(a, t) {
1443
1444
  return [t.lat0 + a[1] / t.mLat, t.lon0 + a[0] / t.mLng];
1444
1445
  }
1445
- function ii(a, t) {
1446
+ function ai(a, t) {
1446
1447
  const e = (o) => {
1447
1448
  let i = !1;
1448
1449
  for (let n = 0, s = o.length - 1; n < o.length; s = n++) {
@@ -1453,7 +1454,7 @@ function ii(a, t) {
1453
1454
  };
1454
1455
  return !t[0] || !e(t[0]) ? !1 : !t.slice(1).some(e);
1455
1456
  }
1456
- function ai(a, t, e, o) {
1457
+ function ni(a, t, e, o) {
1457
1458
  const i = t[0] - a[0], n = t[1] - a[1], s = o[0] - e[0], r = o[1] - e[1], c = i * r - n * s;
1458
1459
  if (Math.abs(c) < 1e-12) return null;
1459
1460
  const l = ((e[0] - a[0]) * r - (e[1] - a[1]) * s) / c, d = ((e[0] - a[0]) * n - (e[1] - a[1]) * i) / c;
@@ -1467,17 +1468,17 @@ function oe(a) {
1467
1468
  }
1468
1469
  return Math.abs(t) / 2;
1469
1470
  }
1470
- function xa(a, t) {
1471
+ function Ca(a, t) {
1471
1472
  if (a.length < 3 || t.length < 2) return null;
1472
- const e = vt(a[0]), o = a.map((s) => Fe(s, e)), i = t.map((s) => Fe(s, e)), n = ni(o, i, 0);
1473
+ const e = vt(a[0]), o = a.map((s) => Fe(s, e)), i = t.map((s) => Fe(s, e)), n = si(o, i, 0);
1473
1474
  return n && n.length >= 2 ? n.map((s) => s.map((r) => yt(r, e))) : null;
1474
1475
  }
1475
- function ni(a, t, e) {
1476
+ function si(a, t, e) {
1476
1477
  if (e > 8) return null;
1477
1478
  const o = a.length, i = [];
1478
1479
  for (let b = 0; b < t.length - 1; b++)
1479
1480
  for (let x = 0; x < o; x++) {
1480
- const L = ai(t[b], t[b + 1], a[x], a[(x + 1) % o]);
1481
+ const L = ni(t[b], t[b + 1], a[x], a[(x + 1) % o]);
1481
1482
  L && i.push({
1482
1483
  tLinha: b + L.t,
1483
1484
  tAnel: x + L.u,
@@ -1503,7 +1504,7 @@ function ni(a, t, e) {
1503
1504
  if (i.length > 2 && P.length >= 2) {
1504
1505
  const b = [];
1505
1506
  for (const x of C) {
1506
- const L = ni(x, P, e + 1);
1507
+ const L = si(x, P, e + 1);
1507
1508
  L ? b.push(...L) : b.push(x);
1508
1509
  }
1509
1510
  return b;
@@ -1514,7 +1515,7 @@ function St(a, t) {
1514
1515
  return a.map((e) => Fe(e, t));
1515
1516
  }
1516
1517
  const tt = (a, t) => Math.hypot(a[0] - t[0], a[1] - t[1]);
1517
- function Pa(a, t = 0) {
1518
+ function Sa(a, t = 0) {
1518
1519
  if (a.length === 0 || a.some((n) => n.length < 2)) return null;
1519
1520
  const e = vt(a[0][0]), o = a.slice(1).map((n) => St(n, e));
1520
1521
  let i = St(a[0], e);
@@ -1535,20 +1536,20 @@ function Pa(a, t = 0) {
1535
1536
  }
1536
1537
  return i.map((n) => yt(n, e));
1537
1538
  }
1538
- function La(a, t, e, o) {
1539
- const i = ai(a, t, e, o);
1539
+ function Ma(a, t, e, o) {
1540
+ const i = ni(a, t, e, o);
1540
1541
  return !!i && i.t > 1e-9 && i.t < 1 - 1e-9 && i.u > 1e-9;
1541
1542
  }
1542
- function Ca(a, t) {
1543
+ function Aa(a, t) {
1543
1544
  for (let e = 0; e < a.length; e++)
1544
1545
  for (let o = 0; o < t.length; o++)
1545
- if (La(a[e], a[(e + 1) % a.length], t[o], t[(o + 1) % t.length])) return !0;
1546
+ if (Ma(a[e], a[(e + 1) % a.length], t[o], t[(o + 1) % t.length])) return !0;
1546
1547
  return !1;
1547
1548
  }
1548
- function Sa(a, t, e = 0) {
1549
+ function wa(a, t, e = 0) {
1549
1550
  if (a.length < 3 || t.length < 3) return null;
1550
1551
  const o = vt(a[0]), i = St(a, o), n = St(t, o);
1551
- if (Ca(i, n)) return null;
1552
+ if (Aa(i, n)) return null;
1552
1553
  let s = { i: 0, j: 0, d: 1 / 0 };
1553
1554
  for (let d = 0; d < i.length; d++)
1554
1555
  for (let h = 0; h < n.length; h++) {
@@ -1561,11 +1562,11 @@ function Sa(a, t, e = 0) {
1561
1562
  for (let d = 0; d <= n.length; d++) l.push(n[(c + d) % n.length]);
1562
1563
  return l.map((d) => yt(d, o));
1563
1564
  }
1564
- const yo = 16;
1565
- function bo(a, t, e, o) {
1565
+ const bo = 16;
1566
+ function xo(a, t, e, o) {
1566
1567
  const i = [];
1567
- for (let n = 0; n <= yo; n++) {
1568
- const s = e + (o - e) * n / yo;
1568
+ for (let n = 0; n <= bo; n++) {
1569
+ const s = e + (o - e) * n / bo;
1569
1570
  i.push([a[0] + t * Math.cos(s), a[1] + t * Math.sin(s)]);
1570
1571
  }
1571
1572
  return i;
@@ -1590,7 +1591,7 @@ function fe(a, t, e) {
1590
1591
  }
1591
1592
  return i;
1592
1593
  }
1593
- function Ma(a) {
1594
+ function za(a) {
1594
1595
  let t = 0;
1595
1596
  for (let e = 0; e < a.length; e++) {
1596
1597
  const [o, i] = a[e], [n, s] = a[(e + 1) % a.length];
@@ -1598,7 +1599,7 @@ function Ma(a) {
1598
1599
  }
1599
1600
  return t > 0;
1600
1601
  }
1601
- function Aa(a, t) {
1602
+ function Ea(a, t) {
1602
1603
  if (!Number.isFinite(t) || t === 0) return null;
1603
1604
  if (a.tipo === "Point" || a.tipo === "Text" || a.tipo === "Circle") {
1604
1605
  const e = a.tipo === "Circle" ? a.centro : a.coordenada, o = a.tipo === "Circle" ? a.raioMetros + t : t;
@@ -1608,7 +1609,7 @@ function Aa(a, t) {
1608
1609
  }
1609
1610
  if (a.tipo === "LineString") {
1610
1611
  if (t < 0 || a.coordenadas.length < 2 || Xt(a)) return null;
1611
- const e = vt(a.coordenadas[0]), o = St(a.coordenadas, e), i = fe(o, t, !1), n = fe([...o].reverse(), t, !1), s = o[o.length - 1], r = o[0], c = Math.atan2(s[1] - o[o.length - 2][1], s[0] - o[o.length - 2][0]), l = Math.atan2(r[1] - o[1][1], r[0] - o[1][0]), d = bo(s, t, c + Math.PI / 2, c - Math.PI / 2), h = bo(r, t, l + Math.PI / 2, l - Math.PI / 2);
1612
+ const e = vt(a.coordenadas[0]), o = St(a.coordenadas, e), i = fe(o, t, !1), n = fe([...o].reverse(), t, !1), s = o[o.length - 1], r = o[0], c = Math.atan2(s[1] - o[o.length - 2][1], s[0] - o[o.length - 2][0]), l = Math.atan2(r[1] - o[1][1], r[0] - o[1][0]), d = xo(s, t, c + Math.PI / 2, c - Math.PI / 2), h = xo(r, t, l + Math.PI / 2, l - Math.PI / 2);
1612
1613
  return [...i, ...d, ...n, ...h].map((u) => yt(u, e));
1613
1614
  }
1614
1615
  if (a.tipo === "Polygon") {
@@ -1616,13 +1617,13 @@ function Aa(a, t) {
1616
1617
  if (!e || e.length < 3) return null;
1617
1618
  const o = vt(e[0]);
1618
1619
  let i = St(e, o);
1619
- Ma(i) && (i = [...i].reverse());
1620
+ za(i) && (i = [...i].reverse());
1620
1621
  const s = fe(i, -t, !0);
1621
1622
  return s.length < 3 || t < 0 && oe(s) >= oe(i) ? null : s.map((r) => yt(r, o));
1622
1623
  }
1623
1624
  return null;
1624
1625
  }
1625
- function wa(a, t, e) {
1626
+ function ka(a, t, e) {
1626
1627
  const o = (i) => {
1627
1628
  const n = Ze(i[0]), s = e / n.lat, r = t / Math.max(n.lng, 1);
1628
1629
  return [i[0] + s, i[1] + r];
@@ -1644,21 +1645,21 @@ function wa(a, t, e) {
1644
1645
  }
1645
1646
  }
1646
1647
  }
1647
- const xo = { m: 1, km: 1e3, ft: 0.3048, mi: 1609.344 }, Po = { m2: 1, ha: 1e4, km2: 1e6, ac: 4046.8564224, alqueire: 24200 };
1648
- function Tr(a, t, e) {
1649
- return a * xo[t] / xo[e];
1650
- }
1651
- function _r(a, t, e) {
1648
+ const Po = { m: 1, km: 1e3, ft: 0.3048, mi: 1609.344 }, Lo = { m2: 1, ha: 1e4, km2: 1e6, ac: 4046.8564224, alqueire: 24200 };
1649
+ function $r(a, t, e) {
1652
1650
  return a * Po[t] / Po[e];
1653
1651
  }
1654
- function Dr(a, t, e = 2) {
1652
+ function Fr(a, t, e) {
1653
+ return a * Lo[t] / Lo[e];
1654
+ }
1655
+ function Or(a, t, e = 2) {
1655
1656
  const o = t === "lat" ? a < 0 ? "S" : "N" : a < 0 ? "O" : "L", i = Math.abs(a);
1656
1657
  let n = Math.floor(i), s = Math.floor((i - n) * 60), r = Number(((i - n - s / 60) * 3600).toFixed(e));
1657
1658
  r >= 60 && (r = 0, s += 1), s >= 60 && (s = 0, n += 1);
1658
1659
  const c = r.toFixed(e).padStart(e ? e + 3 : 2, "0");
1659
1660
  return `${n}°${String(s).padStart(2, "0")}'${c}"${o}`;
1660
1661
  }
1661
- function qr(a) {
1662
+ function Nr(a) {
1662
1663
  var u;
1663
1664
  if (typeof a != "string") return null;
1664
1665
  const t = a.trim().toUpperCase().replace(",", "."), e = (u = /[NSLEOW]$/.exec(t)) == null ? void 0 : u[0], o = t.replace(/[NSLEOW]$/, "").trim(), i = o.match(/-?\d+(?:\.\d+)?/g);
@@ -1668,7 +1669,7 @@ function qr(a) {
1668
1669
  let h = c + l / 60 + d / 3600;
1669
1670
  return (n.startsWith("-") || e === "S" || e === "O" || e === "W") && (h = -h), h;
1670
1671
  }
1671
- function $r(a, t) {
1672
+ function Rr(a, t) {
1672
1673
  return Pt(a, t);
1673
1674
  }
1674
1675
  function me(a, t, e) {
@@ -1680,14 +1681,14 @@ function me(a, t, e) {
1680
1681
  propriedades: { ...a.propriedades }
1681
1682
  };
1682
1683
  }
1683
- const za = 5e3;
1684
+ const Ia = 5e3;
1684
1685
  function re(a) {
1685
1686
  return a.tipo === "Polygon" ? 3 : a.tipo === "LineString" ? 2 : 1;
1686
1687
  }
1687
- function Lo(a, t = !1) {
1688
+ function Co(a, t = !1) {
1688
1689
  if (a.bloqueada || t) return "bloqueada";
1689
1690
  const e = a.geometria;
1690
- return e.tipo !== "Point" && e.tipo !== "LineString" && e.tipo !== "Polygon" && e.tipo !== "Circle" ? "tipo-nao-suportado" : e.tipo === "Polygon" && e.aneis.length !== 1 ? "poligono-com-furos" : Xt(e) ? "multiparte" : X(e).length > za ? "muitos-vertices" : null;
1691
+ return e.tipo !== "Point" && e.tipo !== "LineString" && e.tipo !== "Polygon" && e.tipo !== "Circle" ? "tipo-nao-suportado" : e.tipo === "Polygon" && e.aneis.length !== 1 ? "poligono-com-furos" : Xt(e) ? "multiparte" : X(e).length > Ia ? "muitos-vertices" : null;
1691
1692
  }
1692
1693
  function X(a) {
1693
1694
  return a.tipo === "Point" ? [a.coordenada] : a.tipo === "LineString" ? a.coordenadas : a.tipo === "Polygon" ? a.aneis[0] ?? [] : [];
@@ -1695,24 +1696,24 @@ function X(a) {
1695
1696
  function ce(a, t) {
1696
1697
  return a.tipo === "Point" ? { tipo: "Point", coordenada: t[0] } : a.tipo === "LineString" ? { tipo: "LineString", coordenadas: t } : a.tipo === "Polygon" ? { tipo: "Polygon", aneis: [t] } : a;
1697
1698
  }
1698
- function Fr(a, t, e) {
1699
+ function Br(a, t, e) {
1699
1700
  const o = X(a).slice();
1700
1701
  return t < 0 || t >= o.length ? a : (o[t] = e, ce(a, o));
1701
1702
  }
1702
- function Ea(a, t, e) {
1703
+ function Ta(a, t, e) {
1703
1704
  if (a.tipo !== "LineString" && a.tipo !== "Polygon") return a;
1704
1705
  const o = X(a).slice();
1705
1706
  return t < 0 || t >= o.length ? a : (o.splice(t + 1, 0, e), ce(a, o));
1706
1707
  }
1707
- function ka(a, t) {
1708
+ function Da(a, t) {
1708
1709
  if (a.tipo !== "LineString" && a.tipo !== "Polygon") return null;
1709
1710
  const e = X(a);
1710
1711
  return t < 0 || t >= e.length || e.length <= re(a) ? null : ce(a, e.filter((o, i) => i !== t));
1711
1712
  }
1712
- function si(a, t) {
1713
+ function ri(a, t) {
1713
1714
  return [(a[0] + t[0]) / 2, (a[1] + t[1]) / 2];
1714
1715
  }
1715
- function ri(a) {
1716
+ function ci(a) {
1716
1717
  const t = X(a).length, e = [];
1717
1718
  if (a.tipo !== "LineString" && a.tipo !== "Polygon") return e;
1718
1719
  for (let o = 0; o < t - 1; o++) e.push([o, o + 1]);
@@ -1721,21 +1722,21 @@ function ri(a) {
1721
1722
  function Y(a) {
1722
1723
  return (a.tipo === "LineString" || a.tipo === "Polygon") && a.curva && a.curva.length >= re(a) ? a.curva : null;
1723
1724
  }
1724
- const Ia = 0.5;
1725
- function Ta(a, t) {
1725
+ const _a = 0.5;
1726
+ function qa(a, t) {
1726
1727
  return [a[0], a[1] + t / Math.max(Ze(a[0]).lng, 1)];
1727
1728
  }
1728
1729
  function pt(a) {
1729
1730
  var t;
1730
- return a.tipo === "Circle" ? [a.centro, Ta(a.centro, a.raioMetros)] : ((t = Y(a)) == null ? void 0 : t.map((e) => e.ponto)) ?? X(a);
1731
+ return a.tipo === "Circle" ? [a.centro, qa(a.centro, a.raioMetros)] : ((t = Y(a)) == null ? void 0 : t.map((e) => e.ponto)) ?? X(a);
1731
1732
  }
1732
1733
  function Mt(a, t) {
1733
1734
  const e = a.tipo === "Polygon", o = Lt(t, e);
1734
1735
  return e ? { tipo: "Polygon", aneis: [o], curva: t } : { tipo: "LineString", coordenadas: o, curva: t };
1735
1736
  }
1736
- function Co(a, t) {
1737
+ function So(a, t) {
1737
1738
  if (a.tipo === "Circle")
1738
- return t.length < 2 ? a : { ...a, centro: t[0], raioMetros: Math.max(Ia, Pt(t[0], t[1])) };
1739
+ return t.length < 2 ? a : { ...a, centro: t[0], raioMetros: Math.max(_a, Pt(t[0], t[1])) };
1739
1740
  const e = Y(a);
1740
1741
  if (!e || e.length !== t.length) return ce(a, t);
1741
1742
  const o = e.map((i, n) => {
@@ -1747,11 +1748,11 @@ function Co(a, t) {
1747
1748
  function ft(a, t, e) {
1748
1749
  return [a[0] + (t[0] - a[0]) * e, a[1] + (t[1] - a[1]) * e];
1749
1750
  }
1750
- function _a(a, t, e) {
1751
+ function $a(a, t, e) {
1751
1752
  const [o, i] = We(a, t);
1752
1753
  let n = 0.5, s = 1 / 0;
1753
1754
  for (let r = 1; r < 64; r++) {
1754
- const c = r / 64, l = Ho(a.ponto, o, i, t.ponto, c), d = (l[0] - e[0]) ** 2 + (l[1] - e[1]) ** 2;
1755
+ const c = r / 64, l = Go(a.ponto, o, i, t.ponto, c), d = (l[0] - e[0]) ** 2 + (l[1] - e[1]) ** 2;
1755
1756
  d < s && (s = d, n = c);
1756
1757
  }
1757
1758
  return n;
@@ -1760,59 +1761,59 @@ function kt(a, t, e) {
1760
1761
  const o = Y(a);
1761
1762
  if (!o) {
1762
1763
  const s = X(a);
1763
- return si(s[t], s[e]);
1764
+ return ri(s[t], s[e]);
1764
1765
  }
1765
1766
  const [i, n] = We(o[t], o[e]);
1766
- return Ho(o[t].ponto, i, n, o[e].ponto, 0.5);
1767
+ return Go(o[t].ponto, i, n, o[e].ponto, 0.5);
1767
1768
  }
1768
- function ci(a) {
1769
+ function li(a) {
1769
1770
  const t = Y(a);
1770
- if (!t) return ri(a);
1771
+ if (!t) return ci(a);
1771
1772
  const e = [];
1772
1773
  for (let o = 0; o < t.length - 1; o++) e.push([o, o + 1]);
1773
1774
  return a.tipo === "Polygon" && t.length > 2 && e.push([t.length - 1, 0]), e;
1774
1775
  }
1775
- function Da(a, t, e) {
1776
+ function Fa(a, t, e) {
1776
1777
  const o = Y(a);
1777
- if (!o) return Ea(a, t, e);
1778
+ if (!o) return Ta(a, t, e);
1778
1779
  if (t < 0 || t >= o.length) return a;
1779
1780
  const i = (t + 1) % o.length, n = o[t], s = o[i], r = n.saida === void 0 && s.entrada === void 0;
1780
1781
  let c, l = n, d = s;
1781
1782
  if (r)
1782
1783
  c = { ponto: e };
1783
1784
  else {
1784
- const u = _a(n, s, e), [m, g] = We(n, s), p = ft(n.ponto, m, u), v = ft(m, g, u), M = ft(g, s.ponto, u), w = ft(p, v, u), C = ft(v, M, u);
1785
+ const u = $a(n, s, e), [m, g] = We(n, s), p = ft(n.ponto, m, u), v = ft(m, g, u), M = ft(g, s.ponto, u), w = ft(p, v, u), C = ft(v, M, u);
1785
1786
  c = { ponto: ft(w, C, u), entrada: w, saida: C }, l = { ...n, saida: p }, d = { ...s, entrada: M };
1786
1787
  }
1787
1788
  const h = o.slice();
1788
1789
  return h[t] = l, h[i] = d, h.splice(t + 1, 0, c), Mt(a, h);
1789
1790
  }
1790
- function qa(a, t) {
1791
+ function Oa(a, t) {
1791
1792
  const e = Y(a);
1792
- return e ? t < 0 || t >= e.length || e.length <= re(a) ? null : Mt(a, e.filter((o, i) => i !== t)) : ka(a, t);
1793
+ return e ? t < 0 || t >= e.length || e.length <= re(a) ? null : Mt(a, e.filter((o, i) => i !== t)) : Da(a, t);
1793
1794
  }
1794
- function _t(a) {
1795
+ function Dt(a) {
1795
1796
  return a.tipo !== "LineString" && a.tipo !== "Polygon" ? null : Y(a) ?? X(a).map((t) => ({ ponto: [t[0], t[1]] }));
1796
1797
  }
1797
- const $a = 40;
1798
- function Fa(a, t, e) {
1799
- const o = _t(a);
1798
+ const Na = 40;
1799
+ function Ra(a, t, e) {
1800
+ const o = Dt(a);
1800
1801
  if (!o || t < 0 || t >= o.length) return null;
1801
1802
  const i = a.tipo === "Polygon", n = o.length, s = e === "saida" ? t < n - 1 ? o[t + 1] : i ? o[0] : null : t > 0 ? o[t - 1] : i ? o[n - 1] : null;
1802
1803
  if (!s) return null;
1803
1804
  const r = o[t].ponto;
1804
1805
  return [r[0] + (s.ponto[0] - r[0]) / 3, r[1] + (s.ponto[1] - r[1]) / 3];
1805
1806
  }
1806
- function Oa(a, t, e, o, i = !0) {
1807
- const n = _t(a);
1807
+ function Ba(a, t, e, o, i = !0) {
1808
+ const n = Dt(a);
1808
1809
  if (!n || t < 0 || t >= n.length) return a;
1809
1810
  const s = { ...n[t], [e]: o };
1810
1811
  i && (s[e === "saida" ? "entrada" : "saida"] = Xe(s.ponto, o));
1811
1812
  const r = n.slice();
1812
1813
  return r[t] = s, Mt(a, r);
1813
1814
  }
1814
- function Na(a, t) {
1815
- const e = _t(a);
1815
+ function Va(a, t) {
1816
+ const e = Dt(a);
1816
1817
  if (!e || t < 0 || t >= e.length) return a;
1817
1818
  const o = e[t], i = e.slice();
1818
1819
  if (o.entrada || o.saida)
@@ -1829,12 +1830,12 @@ function Na(a, t) {
1829
1830
  }
1830
1831
  return i[t] = { ponto: l, saida: [l[0] + d, l[1] + h], entrada: [l[0] - d, l[1] - h] }, Mt(a, i);
1831
1832
  }
1832
- const Ra = 6, ge = (a, t) => Math.hypot(a.x - t.x, a.y - t.y);
1833
- function So(a, t, e) {
1833
+ const ja = 6, ge = (a, t) => Math.hypot(a.x - t.x, a.y - t.y);
1834
+ function Mo(a, t, e) {
1834
1835
  const o = e.x - t.x, i = e.y - t.y, n = o * o + i * i, s = n === 0 ? 0 : Math.max(0, Math.min(1, ((a.x - t.x) * o + (a.y - t.y) * i) / n));
1835
1836
  return Math.hypot(a.x - (t.x + s * o), a.y - (t.y + s * i));
1836
1837
  }
1837
- function Ba(a, t) {
1838
+ function Ha(a, t) {
1838
1839
  const e = a.geometria;
1839
1840
  if (e.tipo !== "Polygon") return 0;
1840
1841
  let o = 1 / 0, i = -1 / 0, n = 1 / 0, s = -1 / 0;
@@ -1844,7 +1845,7 @@ function Ba(a, t) {
1844
1845
  }
1845
1846
  return (i - o) * (s - n);
1846
1847
  }
1847
- function le(a, t, e, o = Ra) {
1848
+ function le(a, t, e, o = ja) {
1848
1849
  let i = null, n = null, s = null;
1849
1850
  for (const r of t) {
1850
1851
  if (r.excluida || r.oculta) continue;
@@ -1856,7 +1857,7 @@ function le(a, t, e, o = Ra) {
1856
1857
  let l = 1 / 0;
1857
1858
  for (const d of it(c)) {
1858
1859
  const h = d.map(e);
1859
- for (let u = 1; u < h.length; u++) l = Math.min(l, So(a, h[u - 1], h[u]));
1860
+ for (let u = 1; u < h.length; u++) l = Math.min(l, Mo(a, h[u - 1], h[u]));
1860
1861
  }
1861
1862
  l <= o && (!n || l < n.d) && (n = { f: r, d: l });
1862
1863
  } else if (c.tipo === "Circle") {
@@ -1868,21 +1869,21 @@ function le(a, t, e, o = Ra) {
1868
1869
  } else {
1869
1870
  const l = c.aneis[0].map(e);
1870
1871
  let d = 1 / 0;
1871
- for (const [u, m] of ri(c)) d = Math.min(d, So(a, l[u], l[m]));
1872
- if (ii([a.y, a.x], [l.map((u) => [u.y, u.x]), ...c.aneis.slice(1).map((u) => u.map(e).map((m) => [m.y, m.x]))]) || d <= o) {
1873
- const u = Ba(r, e);
1872
+ for (const [u, m] of ci(c)) d = Math.min(d, Mo(a, l[u], l[m]));
1873
+ if (ai([a.y, a.x], [l.map((u) => [u.y, u.x]), ...c.aneis.slice(1).map((u) => u.map(e).map((m) => [m.y, m.x]))]) || d <= o) {
1874
+ const u = Ha(r, e);
1874
1875
  (!s || u < s.a) && (s = { f: r, a: u });
1875
1876
  }
1876
1877
  }
1877
1878
  }
1878
1879
  return (i == null ? void 0 : i.f) ?? (n == null ? void 0 : n.f) ?? (s == null ? void 0 : s.f) ?? null;
1879
1880
  }
1880
- const Ft = 0.1, Va = 2, ja = typeof requestAnimationFrame == "function" ? (a) => {
1881
+ const Ft = 0.1, Ga = 2, Ua = typeof requestAnimationFrame == "function" ? (a) => {
1881
1882
  requestAnimationFrame(a);
1882
1883
  } : (a) => {
1883
1884
  setTimeout(a, 16);
1884
1885
  };
1885
- class Ha extends y.Layer {
1886
+ class Za extends y.Layer {
1886
1887
  constructor(e, o) {
1887
1888
  super();
1888
1889
  f(this, "canvas", null);
@@ -1906,7 +1907,7 @@ class Ha extends y.Layer {
1906
1907
  }
1907
1908
  /** Pede um redesenho no próximo quadro (vários pedidos viram um só). */
1908
1909
  solicitarRedesenho() {
1909
- this.agendado || !this.vivo || (this.agendado = !0, ja(() => {
1910
+ this.agendado || !this.vivo || (this.agendado = !0, Ua(() => {
1910
1911
  this.agendado = !1, this.vivo && this.redesenhar();
1911
1912
  }));
1912
1913
  }
@@ -1920,18 +1921,18 @@ class Ha extends y.Layer {
1920
1921
  try {
1921
1922
  const i = e.getSize(), n = Math.ceil(i.x * (1 + 2 * Ft)), s = Math.ceil(i.y * (1 + 2 * Ft));
1922
1923
  if (!(n > 0 && s > 0)) return;
1923
- const r = Math.min(Va, typeof window < "u" && window.devicePixelRatio || 1), c = e.containerPointToLayerPoint([-i.x * Ft, -i.y * Ft]).round();
1924
+ const r = Math.min(Ga, typeof window < "u" && window.devicePixelRatio || 1), c = e.containerPointToLayerPoint([-i.x * Ft, -i.y * Ft]).round();
1924
1925
  (o.width !== Math.round(n * r) || o.height !== Math.round(s * r)) && (o.width = Math.round(n * r), o.height = Math.round(s * r)), o.style.width = `${n}px`, o.style.height = `${s}px`, y.DomUtil.setPosition(o, c), o.style.display = "";
1925
1926
  const l = o.getContext("2d");
1926
1927
  if (!l) return;
1927
1928
  l.setTransform(r, 0, 0, r, 0, 0), l.clearRect(0, 0, n, s);
1928
1929
  const d = e.getPixelOrigin().add(c);
1929
- this.ultimaPintura = zi(l, this.obterMarcas(), e.getZoom(), d.x, d.y, n, s);
1930
+ this.ultimaPintura = Ei(l, this.obterMarcas(), e.getZoom(), d.x, d.y, n, s);
1930
1931
  } catch {
1931
1932
  }
1932
1933
  }
1933
1934
  }
1934
- const li = /* @__PURE__ */ new WeakMap(), Oe = {
1935
+ const di = /* @__PURE__ */ new WeakMap(), Oe = {
1935
1936
  tower: '<path d="M12 2 L8 22 M12 2 L16 22 M9.5 12 H14.5 M8.7 17 H15.3 M12 2 L9.5 12 L14.5 12 Z" />',
1936
1937
  tree: '<path d="M12 22 V14 M12 3 L5 14 H19 Z" />',
1937
1938
  warning: '<path d="M12 3 L22 20 H2 Z M12 9 V14 M12 17 V17.5" />',
@@ -1963,7 +1964,7 @@ function Ht(a, t, e = !1) {
1963
1964
  html: `<span style="${c}${d}">${T(i)}</span>`
1964
1965
  });
1965
1966
  }
1966
- function di(a, t) {
1967
+ function hi(a, t) {
1967
1968
  const e = a < 10 ? 30 : a < 100 ? 38 : 46, o = ot(t.corPrimaria, Ke);
1968
1969
  return y.divIcon({
1969
1970
  className: "custom-leaflet-marker cad-feicao-cluster",
@@ -1987,16 +1988,16 @@ function Ne(a, t) {
1987
1988
  interactive: t
1988
1989
  };
1989
1990
  }
1990
- const Ga = 150, Ua = 100, ve = 300, ye = 0.75, Za = 20, Wa = 0.3, be = typeof requestAnimationFrame == "function" ? (a) => {
1991
+ const Wa = 150, Xa = 100, ve = 300, ye = 0.75, Ka = 20, Ya = 0.3, be = typeof requestAnimationFrame == "function" ? (a) => {
1991
1992
  requestAnimationFrame(a);
1992
1993
  } : (a) => {
1993
1994
  setTimeout(a, 16);
1994
1995
  };
1995
- class Xa {
1996
+ class Qa {
1996
1997
  constructor() {
1997
1998
  f(this, "estados", /* @__PURE__ */ new WeakMap());
1998
1999
  /** Por definição de camada (uma por componente), para a seleção sobreviver à recriação do grupo. */
1999
- f(this, "selecionadas", li);
2000
+ f(this, "selecionadas", di);
2000
2001
  f(this, "tokenLote", /* @__PURE__ */ new WeakMap());
2001
2002
  }
2002
2003
  render(t, e, o) {
@@ -2067,7 +2068,7 @@ class Xa {
2067
2068
  map: o,
2068
2069
  context: i,
2069
2070
  loja: /* @__PURE__ */ new Map(),
2070
- indice: new Ei(),
2071
+ indice: new ki(),
2071
2072
  revisao: 0,
2072
2073
  revisaoBase: 0,
2073
2074
  listaSincronizada: null,
@@ -2109,7 +2110,7 @@ class Xa {
2109
2110
  h.add(p.id), s.loja.get(p.id) !== p && d.add(p.id);
2110
2111
  const u = [...s.loja.keys()].filter((p) => !h.has(p));
2111
2112
  if (d.size > 0 || u.length > 0) {
2112
- if (s.revisao++, s.revisaoBase++, s.lod.clear(), s.loja.size === 0 || d.size + u.length > l.length * Wa)
2113
+ if (s.revisao++, s.revisaoBase++, s.lod.clear(), s.loja.size === 0 || d.size + u.length > l.length * Ya)
2113
2114
  s.indice.construir(l);
2114
2115
  else {
2115
2116
  for (const p of l) d.has(p.id) && s.indice.atualizar(p);
@@ -2170,10 +2171,10 @@ class Xa {
2170
2171
  }
2171
2172
  /** Há geometria grande demais para o zoom atual? Só então vale redesenhar ao mudar de zoom. */
2172
2173
  ressimplificar(t, e) {
2173
- return t.zoomDesenho === e || ki(t.feicao.geometria) < Ii ? !1 : e < no || t.zoomDesenho < no;
2174
+ return t.zoomDesenho === e || Ii(t.feicao.geometria) < Ti ? !1 : e < no || t.zoomDesenho < no;
2174
2175
  }
2175
2176
  paraDesenho(t, e) {
2176
- const o = Ti(t.geometria, e);
2177
+ const o = Di(t.geometria, e);
2177
2178
  return o === t.geometria ? t : { ...t, geometria: o };
2178
2179
  }
2179
2180
  /** Vai para a tela? Não oculta e visível pela regra oficial × prévia. */
@@ -2219,7 +2220,7 @@ class Xa {
2219
2220
  lat: (i.minLat + i.maxLat) / 2,
2220
2221
  lon: (i.minLon + i.maxLon) / 2,
2221
2222
  cor: s,
2222
- lado: Di(so(i, o)),
2223
+ lado: qi(so(i, o)),
2223
2224
  fonte: e
2224
2225
  };
2225
2226
  }
@@ -2247,7 +2248,7 @@ class Xa {
2247
2248
  return;
2248
2249
  }
2249
2250
  if (!t.camadaMarcas) {
2250
- const e = U(t.map, t.layerDef.id, "poligono"), o = new Ha(e, () => t.marcas.values());
2251
+ const e = U(t.map, t.layerDef.id, "poligono"), o = new Za(e, () => t.marcas.values());
2251
2252
  t.camadaMarcas = o, o.addTo(t.map), o.on("click", (i) => {
2252
2253
  var r, c;
2253
2254
  const { feicaoHit: n, originalEvent: s } = i;
@@ -2257,7 +2258,7 @@ class Xa {
2257
2258
  aditivo: !!(s && s.shiftKey),
2258
2259
  subtrativo: !!(s && (s.ctrlKey || s.metaKey))
2259
2260
  });
2260
- }), t.fonteHit = this.fonteDeMarcas(t, o), Wo(t.map, t.layerDef.id, t.fonteHit);
2261
+ }), t.fonteHit = this.fonteDeMarcas(t, o), Xo(t.map, t.layerDef.id, t.fonteHit);
2261
2262
  }
2262
2263
  t.camadaMarcas.solicitarRedesenho();
2263
2264
  }
@@ -2285,7 +2286,7 @@ class Xa {
2285
2286
  const p = i.latLngToContainerPoint(g);
2286
2287
  return { x: p.x, y: p.y };
2287
2288
  }, u = i.getZoom(), m = [];
2288
- for (let g = 0; g < Za && d.length > 0; g++) {
2289
+ for (let g = 0; g < Ka && d.length > 0; g++) {
2289
2290
  const p = le({ x: n.x, y: n.y }, d, h);
2290
2291
  if (!p) break;
2291
2292
  d.splice(d.indexOf(p), 1);
@@ -2303,7 +2304,7 @@ class Xa {
2303
2304
  };
2304
2305
  }
2305
2306
  descartarMarcas(t) {
2306
- t.fonteHit && Xo(t.map, t.layerDef.id, t.fonteHit), t.fonteHit = null, t.camadaMarcas && (t.map.removeLayer(t.camadaMarcas), t.camadaMarcas = null), t.marcas.clear();
2307
+ t.fonteHit && Ko(t.map, t.layerDef.id, t.fonteHit), t.fonteHit = null, t.camadaMarcas && (t.map.removeLayer(t.camadaMarcas), t.camadaMarcas = null), t.marcas.clear();
2307
2308
  }
2308
2309
  /**
2309
2310
  * Cria a camada Leaflet da feição ou remenda a que existe (e só se algo mudou). `'estilo'` só troca o estilo.
@@ -2358,7 +2359,7 @@ class Xa {
2358
2359
  return t.agrupador = null, null;
2359
2360
  const i = t.agrupador;
2360
2361
  if (i && i.zoom === e && t.agrupadorRev === t.revisaoBase) return i;
2361
- const n = new qi(e, (s) => t.map.project(y.latLng(s[0], s[1]), e));
2362
+ const n = new $i(e, (s) => t.map.project(y.latLng(s[0], s[1]), e));
2362
2363
  for (const s of t.loja.values())
2363
2364
  s.geometria.tipo === "Point" && o(s) && n.inserir({ id: s.id, coordenada: s.geometria.coordenada });
2364
2365
  return t.agrupador = n, t.agrupadorRev = t.revisaoBase, n;
@@ -2395,7 +2396,7 @@ class Xa {
2395
2396
  for (const z of b.membros.values()) {
2396
2397
  if (c != null && c.has(z.id)) continue;
2397
2398
  const S = e.indice.caixaDe(z.id);
2398
- (!u || S && Dt(S, u)) && g.add(z.id);
2399
+ (!u || S && _t(S, u)) && g.add(z.id);
2399
2400
  break;
2400
2401
  }
2401
2402
  if (!(h && !h.contains([b.somaLat / L, b.somaLon / L])) && A >= 2) {
@@ -2447,7 +2448,7 @@ class Xa {
2447
2448
  const S = !!(g != null && g.has(L));
2448
2449
  if (!S && M) {
2449
2450
  const E = e.indice.caixaDe(L);
2450
- if (!E || !Dt(E, M)) {
2451
+ if (!E || !_t(E, M)) {
2451
2452
  this.tirarEntrada(t, e, L), e.marcas.delete(L);
2452
2453
  return;
2453
2454
  }
@@ -2472,31 +2473,31 @@ class Xa {
2472
2473
  for (const L of P) {
2473
2474
  const A = m.celula(L);
2474
2475
  if (!A || A.membros.size < 2) {
2475
- if (this.tirarCluster(t, e, L), A) for (const D of A.membros.keys()) C(D, x.has(D));
2476
+ if (this.tirarCluster(t, e, L), A) for (const _ of A.membros.keys()) C(_, x.has(_));
2476
2477
  continue;
2477
2478
  }
2478
2479
  const z = A.membros.size;
2479
2480
  let S = A.somaLat, E = A.somaLon, I = 0;
2480
- for (const D of A.membros.values())
2481
- g != null && g.has(D.id) && (I++, S -= D.coordenada[0], E -= D.coordenada[1]);
2482
- const _ = z - I;
2483
- for (const D of A.membros.values())
2484
- g != null && g.has(D.id) || _ === 1 ? C(D.id, x.has(D.id)) : this.tirarEntrada(t, e, D.id);
2481
+ for (const _ of A.membros.values())
2482
+ g != null && g.has(_.id) && (I++, S -= _.coordenada[0], E -= _.coordenada[1]);
2483
+ const D = z - I;
2484
+ for (const _ of A.membros.values())
2485
+ g != null && g.has(_.id) || D === 1 ? C(_.id, x.has(_.id)) : this.tirarEntrada(t, e, _.id);
2485
2486
  const k = [A.somaLat / z, A.somaLon / z];
2486
- if (v && !v.contains(k) || _ < 2) {
2487
+ if (v && !v.contains(k) || D < 2) {
2487
2488
  this.tirarCluster(t, e, L);
2488
2489
  continue;
2489
2490
  }
2490
- const $ = [S / _, E / _];
2491
+ const $ = [S / D, E / D];
2491
2492
  this.colocarCluster(t, e, L, {
2492
2493
  coordenada: $,
2493
2494
  total: z,
2494
- assinatura: `${L}:${z}:${_}:${$[0].toFixed(7)}:${$[1].toFixed(7)}`
2495
+ assinatura: `${L}:${z}:${D}:${$[0].toFixed(7)}:${$[1].toFixed(7)}`
2495
2496
  });
2496
2497
  }
2497
2498
  }
2498
2499
  criarMarcadorCluster(t, e, o, i) {
2499
- const n = di(e, i.layerDef.estilo), s = y.marker(t, {
2500
+ const n = hi(e, i.layerDef.estilo), s = y.marker(t, {
2500
2501
  icon: n,
2501
2502
  pane: U(i.map, i.layerDef.id, "ponto"),
2502
2503
  keyboard: !1
@@ -2534,7 +2535,7 @@ class Xa {
2534
2535
  }
2535
2536
  if (!w && u) {
2536
2537
  const P = o.indice.caixaDe(v);
2537
- if (!P || !Dt(P, u)) {
2538
+ if (!P || !_t(P, u)) {
2538
2539
  this.tirarEntrada(t, o, v), o.marcas.delete(v);
2539
2540
  return;
2540
2541
  }
@@ -2543,17 +2544,17 @@ class Xa {
2543
2544
  const C = w ? o.entradas.get(v) : void 0;
2544
2545
  C && "bringToFront" in C.layer && C.layer.bringToFront();
2545
2546
  }, p = (this.tokenLote.get(t) ?? 0) + 1;
2546
- if (this.tokenLote.set(t, p), s.length <= Ga)
2547
+ if (this.tokenLote.set(t, p), s.length <= Wa)
2547
2548
  s.forEach(g);
2548
2549
  else {
2549
2550
  const v = l ? this.caixaDe(r.getBounds()) : null, M = (b) => {
2550
2551
  if (!v) return !0;
2551
2552
  const x = o.indice.caixaDe(b);
2552
- return !x || Dt(x, v);
2553
+ return !x || _t(x, v);
2553
2554
  }, w = s.filter(M), C = s.filter((b) => !M(b));
2554
2555
  w.forEach(g);
2555
2556
  const P = () => {
2556
- this.tokenLote.get(t) !== p || !o.vivo || (C.splice(0, Ua).forEach(g), C.length > 0 ? be(P) : this.sincronizarMarcas(o));
2557
+ this.tokenLote.get(t) !== p || !o.vivo || (C.splice(0, Xa).forEach(g), C.length > 0 ? be(P) : this.sincronizarMarcas(o));
2557
2558
  };
2558
2559
  C.length > 0 && be(P);
2559
2560
  }
@@ -2611,7 +2612,7 @@ class Xa {
2611
2612
  remendar(t, e, o, i, n) {
2612
2613
  var c, l;
2613
2614
  const s = e.geometria, r = this.estiloVetor(e, o, i, n);
2614
- (t instanceof ti || t instanceof ei) && xt(s) ? (oi(t, s), t.setStyle(r)) : s.tipo === "Polygon" ? (t.setLatLngs(s.aneis.length === 1 ? s.aneis[0] : s.aneis), t.setStyle(r)) : s.tipo === "LineString" ? (t.setLatLngs(s.partes && s.partes.length > 1 ? it(s) : s.coordenadas), t.setStyle(r)) : s.tipo === "Circle" ? (t.setLatLng(s.centro), t.setRadius(s.raioMetros), t.setStyle(r)) : s.tipo === "Point" && t instanceof y.CircleMarker ? (t.setLatLng(s.coordenada), t.setRadius(co(e, o.estilo)), t.setStyle(r)) : t instanceof y.Marker && (t.setLatLng(s.tipo === "Point" || s.tipo === "Text" ? s.coordenada : t.getLatLng()), t.setIcon(s.tipo === "Text" ? this.iconeTexto(e, o, n) : this.iconeSvg(e, o, n)), s.tipo === "Text" && (i && !e.bloqueada ? (c = t.dragging) == null || c.enable() : (l = t.dragging) == null || l.disable())), this.aplicarRotulo(t, e);
2615
+ (t instanceof ei || t instanceof oi) && xt(s) ? (ii(t, s), t.setStyle(r)) : s.tipo === "Polygon" ? (t.setLatLngs(s.aneis.length === 1 ? s.aneis[0] : s.aneis), t.setStyle(r)) : s.tipo === "LineString" ? (t.setLatLngs(s.partes && s.partes.length > 1 ? it(s) : s.coordenadas), t.setStyle(r)) : s.tipo === "Circle" ? (t.setLatLng(s.centro), t.setRadius(s.raioMetros), t.setStyle(r)) : s.tipo === "Point" && t instanceof y.CircleMarker ? (t.setLatLng(s.coordenada), t.setRadius(co(e, o.estilo)), t.setStyle(r)) : t instanceof y.Marker && (t.setLatLng(s.tipo === "Point" || s.tipo === "Text" ? s.coordenada : t.getLatLng()), t.setIcon(s.tipo === "Text" ? this.iconeTexto(e, o, n) : this.iconeSvg(e, o, n)), s.tipo === "Text" && (i && !e.bloqueada ? (c = t.dragging) == null || c.enable() : (l = t.dragging) == null || l.disable())), this.aplicarRotulo(t, e);
2615
2616
  }
2616
2617
  /** Só o estilo (seleção): sem `setLatLngs`, que reprojetaria e recalcularia limites da forma. */
2617
2618
  restilizar(t, e, o, i, n) {
@@ -2629,7 +2630,7 @@ class Xa {
2629
2630
  t.unbindTooltip();
2630
2631
  return;
2631
2632
  }
2632
- const i = $i(e, o.campoRotulo);
2633
+ const i = Fi(e, o.campoRotulo);
2633
2634
  if (!i) {
2634
2635
  t.unbindTooltip();
2635
2636
  return;
@@ -2661,20 +2662,20 @@ class Xa {
2661
2662
  });
2662
2663
  }
2663
2664
  }
2664
- const Ka = "rgba(255,255,255,0.9)";
2665
- function Ya(a) {
2665
+ const Ja = "rgba(255,255,255,0.9)";
2666
+ function tn(a) {
2666
2667
  if (!a) return [];
2667
2668
  const t = a.split(/[\s,]+/).map(Number).filter((e) => Number.isFinite(e) && e >= 0);
2668
2669
  return t.length > 0 && t.some((e) => e > 0) ? t.length % 2 === 1 ? [...t, ...t] : t : [];
2669
2670
  }
2670
- const Q = (a) => Number.isFinite(a), Qa = /* @__PURE__ */ new Set(["marca", "poligono", "circulo", "linha", "ponto"]);
2671
- function Mo(a) {
2671
+ const Q = (a) => Number.isFinite(a), en = /* @__PURE__ */ new Set(["marca", "poligono", "circulo", "linha", "ponto"]);
2672
+ function Ao(a) {
2672
2673
  let t = 0;
2673
2674
  if (a)
2674
- for (const e of a.itens) Qa.has(e.forma) && t++;
2675
+ for (const e of a.itens) en.has(e.forma) && t++;
2675
2676
  return t;
2676
2677
  }
2677
- class hi {
2678
+ class ui {
2678
2679
  constructor(t) {
2679
2680
  f(this, "destaques", /* @__PURE__ */ new Set());
2680
2681
  f(this, "destruido", !1);
@@ -2796,7 +2797,7 @@ class hi {
2796
2797
  for (const [s, r] of this.agrupar(e)) {
2797
2798
  const c = n && s.preencher && s.opacidadePreenchimento > 0, l = s.traco && s.peso > 0;
2798
2799
  if (!(!c && !l)) {
2799
- c && (t.fillStyle = s.corPreenchimento), l && (t.strokeStyle = s.cor, t.lineWidth = s.peso, t.setLineDash(this.semTracejado ? [] : Ya(s.dash)), t.lineDashOffset = this.semTracejado ? 0 : s.deslocamentoDash ?? 0, t.lineCap = s.terminacao ?? "round", t.lineJoin = s.juncao ?? "round"), i.chamadas += 3;
2800
+ c && (t.fillStyle = s.corPreenchimento), l && (t.strokeStyle = s.cor, t.lineWidth = s.peso, t.setLineDash(this.semTracejado ? [] : tn(s.dash)), t.lineDashOffset = this.semTracejado ? 0 : s.deslocamentoDash ?? 0, t.lineCap = s.terminacao ?? "round", t.lineJoin = s.juncao ?? "round"), i.chamadas += 3;
2800
2801
  for (const d of r)
2801
2802
  t.beginPath(), this.caminho(t, d, o), c && (t.globalAlpha = s.opacidadePreenchimento, t.fill(), i.preenchimentos++, i.chamadas++), l && (t.globalAlpha = s.opacidadeTraco ?? 1, t.stroke(), i.tracos++, i.chamadas++);
2802
2803
  }
@@ -2804,10 +2805,10 @@ class hi {
2804
2805
  }
2805
2806
  /** Halo de destaque (hover): traço claro, mais grosso, por baixo do desenho normal. */
2806
2807
  halo(t, e, o, i) {
2807
- t.strokeStyle = Ka, t.lineWidth = Math.max(e.estilo.peso, 1) + 4, t.globalAlpha = 0.9, t.setLineDash([]), t.lineCap = "round", t.lineJoin = "round", t.beginPath(), this.caminho(t, e, o), t.stroke(), i.tracos++, i.chamadas += 4;
2808
+ t.strokeStyle = Ja, t.lineWidth = Math.max(e.estilo.peso, 1) + 4, t.globalAlpha = 0.9, t.setLineDash([]), t.lineCap = "round", t.lineJoin = "round", t.beginPath(), this.caminho(t, e, o), t.stroke(), i.tracos++, i.chamadas += 4;
2808
2809
  }
2809
2810
  }
2810
- function Ja(a, t, e, o) {
2811
+ function on(a, t, e, o) {
2811
2812
  const i = [], n = Math.abs(e), s = Math.abs(o);
2812
2813
  return n > 0 && i.push({ x: e > 0 ? a - n : 0, y: 0, largura: n, altura: t }), s > 0 && i.push({ x: e > 0 ? 0 : n, y: o > 0 ? t - s : 0, largura: a - n, altura: s }), i;
2813
2814
  }
@@ -2884,7 +2885,7 @@ const se = class se extends y.Canvas {
2884
2885
  let m = null, g = !1;
2885
2886
  if (u && i && i.mundo) {
2886
2887
  const p = r.x - i.mundo.x, v = r.y - i.mundo.y;
2887
- !this.branco && this.itens <= this.limiteRepintar ? g = !0 : Math.abs(p) < d.x && Math.abs(v) < d.y && ((p !== 0 || v !== 0) && !this.branco && (l.save(), l.setTransform(1, 0, 0, 1, 0, 0), l.globalCompositeOperation = "copy", l.drawImage(c, -p * h, -v * h), l.restore()), m = Ja(d.x, d.y, p, v));
2888
+ !this.branco && this.itens <= this.limiteRepintar ? g = !0 : Math.abs(p) < d.x && Math.abs(v) < d.y && ((p !== 0 || v !== 0) && !this.branco && (l.save(), l.setTransform(1, 0, 0, 1, 0, 0), l.globalCompositeOperation = "copy", l.drawImage(c, -p * h, -v * h), l.restore()), m = on(d.x, d.y, p, v));
2888
2889
  }
2889
2890
  !m && !g && ((!this.branco || c.width !== h * d.x || c.height !== h * d.y) && (c.width = h * d.x, c.height = h * d.y), this.branco = !0, c.style.width = `${d.x}px`, c.style.height = `${d.y}px`, this.conteudoValido = !1), this.regioesDaVez = m, this.mundoMin = r, l.setTransform(1, 0, 0, 1, 0, 0), this.fire("update");
2890
2891
  }
@@ -2935,7 +2936,7 @@ const se = class se extends y.Canvas {
2935
2936
  */
2936
2937
  f(se, "limiteRepintar", 500);
2937
2938
  let ie = se;
2938
- const Ao = Object.freeze({
2939
+ const wo = Object.freeze({
2939
2940
  alta: Object.freeze({
2940
2941
  nivel: "alta",
2941
2942
  renderizadorPadrao: "leaflet",
@@ -2981,16 +2982,16 @@ function xe(a) {
2981
2982
  return t === "media" || t === "média" ? "media" : t === "baixa" ? "baixa" : "alta";
2982
2983
  }
2983
2984
  function Re(a) {
2984
- return Ao[a] ?? Ao.alta;
2985
+ return wo[a] ?? wo.alta;
2985
2986
  }
2986
2987
  function Pe(a, t) {
2987
2988
  return a == null ? t.renderizadorPadrao : String(a).trim().toLowerCase() === "canvas" ? "canvas" : "leaflet";
2988
2989
  }
2989
- const wo = /* @__PURE__ */ new WeakMap();
2990
- function tn(a, t) {
2990
+ const zo = /* @__PURE__ */ new WeakMap();
2991
+ function an(a, t) {
2991
2992
  try {
2992
2993
  if (!a || typeof a != "object" || !a.options) return;
2993
- let e = wo.get(a);
2994
+ let e = zo.get(a);
2994
2995
  e || (e = {
2995
2996
  zoomAnimated: a._zoomAnimated,
2996
2997
  fadeAnimated: a._fadeAnimated,
@@ -2998,26 +2999,26 @@ function tn(a, t) {
2998
2999
  fadeAnimation: a.options.fadeAnimation,
2999
3000
  markerZoomAnimation: a.options.markerZoomAnimation,
3000
3001
  inertia: a.options.inertia
3001
- }, wo.set(a, e));
3002
+ }, zo.set(a, e));
3002
3003
  const o = a.options;
3003
3004
  o.zoomSnap = t.zoomSnap, o.zoomDelta = t.zoomDelta, t.animacoes ? (o.zoomAnimation = e.zoomAnimation, o.fadeAnimation = e.fadeAnimation, o.markerZoomAnimation = e.markerZoomAnimation, a._zoomAnimated = e.zoomAnimated, a._fadeAnimated = e.fadeAnimated) : (o.zoomAnimation = !1, o.fadeAnimation = !1, o.markerZoomAnimation = !1, a._zoomAnimated = !1, a._fadeAnimated = !1), o.inertia = t.inercia ? e.inertia : !1;
3004
3005
  } catch {
3005
3006
  }
3006
3007
  }
3007
- const Be = "cad-formas-sobreposicao", en = "7000", Ot = 8, on = 8, an = 20, Ve = typeof requestAnimationFrame == "function" ? (a) => {
3008
+ const Be = "cad-formas-sobreposicao", nn = "7000", Ot = 8, sn = 8, rn = 20, Ve = typeof requestAnimationFrame == "function" ? (a) => {
3008
3009
  requestAnimationFrame(a);
3009
3010
  } : (a) => {
3010
3011
  setTimeout(a, 16);
3011
- }, nn = /* @__PURE__ */ new Set(["icone", "texto", "cluster", "rotulo", "curva"]), et = /* @__PURE__ */ new WeakMap();
3012
+ }, cn = /* @__PURE__ */ new Set(["icone", "texto", "cluster", "rotulo", "curva"]), et = /* @__PURE__ */ new WeakMap();
3012
3013
  function rt(a) {
3013
3014
  return { caixa: a.caixa, zoom: a.zoom, larguraPx: a.larguraPx, alturaPx: a.alturaPx, dpr: a.dpr, origemPx: a.origemPx };
3014
3015
  }
3015
- const sn = (a) => !!a._loaded;
3016
- function rn(a) {
3016
+ const ln = (a) => !!a._loaded;
3017
+ function dn(a) {
3017
3018
  const t = et.get(a);
3018
3019
  if (t) return t;
3019
3020
  const e = { estados: /* @__PURE__ */ new Set(), quadro: null, agendado: !1, noMapa: !1 };
3020
- return e.pintor = new hi({
3021
+ return e.pintor = new ui({
3021
3022
  camada: () => null,
3022
3023
  sobreposicao: () => e.quadro ? { ctx: e.quadro.ctx, largura: e.quadro.larguraPx, altura: e.quadro.alturaPx, dpr: e.quadro.dpr } : null
3023
3024
  }), e.canvas = new ie({ pane: Be, padding: 0.1 }, (o) => {
@@ -3031,11 +3032,11 @@ function rn(a) {
3031
3032
  return o.branco && n.length === 0 ? !1 : (e.pintor.desenhar({ vista: i, origem: o.origemPx, camadas: n }, i, { alvo: "sobreposicao" }), n.length > 0);
3032
3033
  }), et.set(a, e), e;
3033
3034
  }
3034
- function cn(a, t) {
3035
+ function hn(a, t) {
3035
3036
  t.noMapa || (t.noMapa = !0, a.whenReady(() => {
3036
3037
  if (!a.getPane(Be)) {
3037
3038
  const e = a.createPane(Be);
3038
- e.style.zIndex = en, e.style.pointerEvents = "none";
3039
+ e.style.zIndex = nn, e.style.pointerEvents = "none";
3039
3040
  }
3040
3041
  et.get(a) === t && a.addLayer(t.canvas);
3041
3042
  }));
@@ -3045,7 +3046,7 @@ function Nt(a) {
3045
3046
  a.agendado = !1, a.noMapa && a.canvas.pintar();
3046
3047
  }));
3047
3048
  }
3048
- function ln(a) {
3049
+ function un(a) {
3049
3050
  var t;
3050
3051
  try {
3051
3052
  return ((t = a.qualidade) == null ? void 0 : t.call(a)) ?? Re("alta");
@@ -3053,29 +3054,29 @@ function ln(a) {
3053
3054
  return Re("alta");
3054
3055
  }
3055
3056
  }
3056
- class dn {
3057
+ class pn {
3057
3058
  constructor() {
3058
3059
  f(this, "estados", /* @__PURE__ */ new WeakMap());
3059
3060
  /** Por definição de camada, para a seleção sobreviver à recriação do grupo (ocultar e exibir a camada). */
3060
- f(this, "selecionadas", li);
3061
+ f(this, "selecionadas", di);
3061
3062
  }
3062
3063
  // ---------------------------------------------------------------- ILayerRenderer
3063
3064
  render(t, e, o) {
3064
- const i = y.layerGroup(), n = new Fi(), s = ln(o);
3065
+ const i = y.layerGroup(), n = new Oi(), s = un(o);
3065
3066
  n.definirQualidade({ limiteMarcaPx: s.limiteMarcaPx, toleranciaPx: s.toleranciaPx });
3066
3067
  const r = o.regraVersoes;
3067
3068
  r && n.definirRegra((h, u) => r.visivel(h, u)), n.definirCamada(this.defMotor(t)), n.definirFeicoes(t.id, this.feicoesDe(t));
3068
3069
  const c = this.selecionadas.get(t);
3069
3070
  c && n.selecionar(t.id, c);
3070
3071
  const l = { layerDef: t, map: e, context: o, grupo: i, motor: n, interativo: t.interativo && !t.bloqueada, quadro: null, dom: /* @__PURE__ */ new Map(), fonteHit: null, agendado: !1, agendadoDom: !1, vivo: !0, ultima: null };
3071
- l.pintor = new hi({
3072
+ l.pintor = new ui({
3072
3073
  camada: () => l.quadro ? { ctx: l.quadro.ctx, largura: l.quadro.larguraPx, altura: l.quadro.alturaPx, dpr: l.quadro.dpr } : null,
3073
3074
  sobreposicao: () => null
3074
3075
  }), l.pintor.definirTracejado(s.tracejado), e.getPane(gt(t.id)) || e.createPane(gt(t.id)), l.base = new ie({ pane: gt(t.id), padding: 0.1, incremental: !0, dprMaximo: s.dprMaximo }, (h) => this.pintarBase(l, h)), this.estados.set(i, l), e.whenReady(() => {
3075
3076
  l.vivo && i.addLayer(l.base);
3076
3077
  });
3077
- const d = rn(e);
3078
- return d.pintor.definirTracejado(s.tracejado), d.canvas.definirDprMaximo(s.dprMaximo), d.estados.add(l), cn(e, d), this.registrarHit(l), i;
3078
+ const d = dn(e);
3079
+ return d.pintor.definirTracejado(s.tracejado), d.canvas.definirDprMaximo(s.dprMaximo), d.estados.add(l), hn(e, d), this.registrarHit(l), i;
3079
3080
  }
3080
3081
  update(t, e, o, i, n) {
3081
3082
  var r;
@@ -3098,7 +3099,7 @@ class dn {
3098
3099
  destroy(t, e) {
3099
3100
  const o = t, i = this.estados.get(o);
3100
3101
  if (i) {
3101
- i.vivo = !1, i.fonteHit && Xo(i.map, i.layerDef.id, i.fonteHit), i.fonteHit = null;
3102
+ i.vivo = !1, i.fonteHit && Ko(i.map, i.layerDef.id, i.fonteHit), i.fonteHit = null;
3102
3103
  const n = et.get(i.map);
3103
3104
  n && (n.estados.delete(i), Nt(n)), i.pintor.destruir(), i.dom.clear();
3104
3105
  }
@@ -3216,7 +3217,7 @@ class dn {
3216
3217
  }
3217
3218
  /** A vista de uma faixa exposta no pan incremental (a origem continua sendo a do canvas inteiro). */
3218
3219
  vistaDaFaixa(t, e) {
3219
- const o = on, [i, n] = lo(t.origemPx.x + e.x - o, t.origemPx.y + e.y - o, t.zoom), [s, r] = lo(t.origemPx.x + e.x + e.largura + o, t.origemPx.y + e.y + e.altura + o, t.zoom);
3220
+ const o = sn, [i, n] = lo(t.origemPx.x + e.x - o, t.origemPx.y + e.y - o, t.zoom), [s, r] = lo(t.origemPx.x + e.x + e.largura + o, t.origemPx.y + e.y + e.altura + o, t.zoom);
3220
3221
  return {
3221
3222
  ...rt(t),
3222
3223
  larguraPx: e.largura,
@@ -3237,13 +3238,13 @@ class dn {
3237
3238
  if (e.regioes) {
3238
3239
  i = 0;
3239
3240
  for (const r of e.regioes) {
3240
- const c = this.vistaDaFaixa(e, r), l = t.motor.listaDesenho(c, { camadas: [o], parte: "canvas" }), d = Mo(l.camadas[0]);
3241
+ const c = this.vistaDaFaixa(e, r), l = t.motor.listaDesenho(c, { camadas: [o], parte: "canvas" }), d = Ao(l.camadas[0]);
3241
3242
  d !== 0 && (t.pintor.desenhar(l, c, { limpar: !1, recorte: r }), i += d);
3242
3243
  }
3243
3244
  const s = t.motor.listaDesenho(rt(e), { camadas: [o], parte: "dom" }).camadas[0];
3244
3245
  s && this.sincronizarDom(t, s);
3245
3246
  } else {
3246
- const s = rt(e), r = t.motor.listaDesenho(s, { camadas: [o] }), c = r.camadas[0] ?? null, l = Mo(c);
3247
+ const s = rt(e), r = t.motor.listaDesenho(s, { camadas: [o] }), c = r.camadas[0] ?? null, l = Ao(c);
3247
3248
  c ? l === 0 && e.branco ? i = 0 : (t.pintor.desenhar(r, s), i = l) : i = !e.branco, t.ultima = c, c && this.sincronizarDom(t, c);
3248
3249
  }
3249
3250
  const n = et.get(t.map);
@@ -3264,7 +3265,7 @@ class dn {
3264
3265
  sincronizarDom(t, e) {
3265
3266
  const o = /* @__PURE__ */ new Set();
3266
3267
  for (const i of e.itens) {
3267
- if (!nn.has(i.forma)) continue;
3268
+ if (!cn.has(i.forma)) continue;
3268
3269
  const n = `${i.forma}:${i.id}`;
3269
3270
  o.add(n);
3270
3271
  try {
@@ -3317,7 +3318,7 @@ class dn {
3317
3318
  const u = o.total ?? 0, m = `${o.id}:${u}:${o.restantes ?? 0}:${o.coordenada[0].toFixed(7)}:${o.coordenada[1].toFixed(7)}`;
3318
3319
  if ((c == null ? void 0 : c.assinatura) === m) return;
3319
3320
  c && s.removeLayer(c.layer);
3320
- const g = y.marker(o.coordenada, { icon: di(u, l), pane: U(i, n.id, "ponto"), keyboard: !1 });
3321
+ const g = y.marker(o.coordenada, { icon: hi(u, l), pane: U(i, n.id, "ponto"), keyboard: !1 });
3321
3322
  g.bindTooltip(`${u} feições agrupadas`, { direction: "top" }), g.on("click", () => {
3322
3323
  const p = t.motor.membrosDoCluster(n.id, o.id);
3323
3324
  p.length > 0 && i.fitBounds(y.latLngBounds(p.map((v) => v.coordenada)), { padding: [60, 60], maxZoom: 18 });
@@ -3343,7 +3344,7 @@ class dn {
3343
3344
  const u = r.geometria, m = (p) => Ne(Te(r, l, p), t.interativo);
3344
3345
  if (c) {
3345
3346
  const p = c.layer;
3346
- c.fonte !== r ? (oi(p, u), p.setStyle(m(o.selecionada)), c.fonte = r, c.selecionada = o.selecionada) : c.selecionada !== o.selecionada && (p.setStyle(m(o.selecionada)), c.selecionada = o.selecionada);
3347
+ c.fonte !== r ? (ii(p, u), p.setStyle(m(o.selecionada)), c.fonte = r, c.selecionada = o.selecionada) : c.selecionada !== o.selecionada && (p.setStyle(m(o.selecionada)), c.selecionada = o.selecionada);
3347
3348
  return;
3348
3349
  }
3349
3350
  const g = to(u, { ...m(o.selecionada), pane: U(i, n.id, u.tipo === "Polygon" ? "poligono" : "linha") });
@@ -3377,7 +3378,7 @@ class dn {
3377
3378
  alvo: t.base,
3378
3379
  consultar: (o) => {
3379
3380
  const { map: i, layerDef: n, motor: s } = t;
3380
- if (!t.vivo || !t.interativo || !n.visivel || !sn(i)) return [];
3381
+ if (!t.vivo || !t.interativo || !n.visivel || !ln(i)) return [];
3381
3382
  const r = i.layerPointToContainerPoint(o), c = i.containerPointToLatLng([r.x - Ot, r.y + Ot]), l = i.containerPointToLatLng([r.x + Ot, r.y - Ot]), d = {
3382
3383
  minLat: Math.min(c.lat, l.lat),
3383
3384
  maxLat: Math.max(c.lat, l.lat),
@@ -3392,7 +3393,7 @@ class dn {
3392
3393
  const p = i.latLngToContainerPoint(g);
3393
3394
  return { x: p.x, y: p.y };
3394
3395
  }, m = [];
3395
- for (let g = 0; g < an && h.length > 0; g++) {
3396
+ for (let g = 0; g < rn && h.length > 0; g++) {
3396
3397
  const p = le({ x: r.x, y: r.y }, h, u);
3397
3398
  if (!p) break;
3398
3399
  h.splice(h.indexOf(p), 1);
@@ -3411,7 +3412,7 @@ class dn {
3411
3412
  return m;
3412
3413
  }
3413
3414
  };
3414
- t.fonteHit = e, Wo(t.map, t.layerDef.id, e), t.base.on("click", (o) => {
3415
+ t.fonteHit = e, Xo(t.map, t.layerDef.id, e), t.base.on("click", (o) => {
3415
3416
  var r, c;
3416
3417
  const { feicaoHit: i, originalEvent: n } = o;
3417
3418
  if (!i || !t.vivo) return;
@@ -3425,18 +3426,18 @@ class dn {
3425
3426
  });
3426
3427
  }
3427
3428
  }
3428
- function hn(a) {
3429
+ function fn(a) {
3429
3430
  return String(a ?? "").trim().toLowerCase() === "canvas" ? "canvas" : "leaflet";
3430
3431
  }
3431
- class un {
3432
- constructor(t = new Xa(), e = new dn()) {
3432
+ class mn {
3433
+ constructor(t = new Qa(), e = new pn()) {
3433
3434
  f(this, "roteamento", /* @__PURE__ */ new WeakMap());
3434
3435
  this.leaflet = t, this.canvas = e;
3435
3436
  }
3436
3437
  modo(t) {
3437
3438
  var e;
3438
3439
  try {
3439
- return hn((e = t.renderizador) == null ? void 0 : e.call(t));
3440
+ return fn((e = t.renderizador) == null ? void 0 : e.call(t));
3440
3441
  } catch {
3441
3442
  return "leaflet";
3442
3443
  }
@@ -3481,14 +3482,14 @@ class un {
3481
3482
  this.de(t).aplicarSelecao(t, e);
3482
3483
  }
3483
3484
  }
3484
- R.register("tile", new pa());
3485
- R.register("wms", new fa());
3486
- R.register("vetorial-linhas", new ma());
3487
- R.register("vetorial-pontos", new va());
3488
- R.register("vetorial-poligonos", new ya());
3489
- R.register("grid", new ba());
3490
- R.register("feicoes", new un());
3491
- const zo = [
3485
+ R.register("tile", new ga());
3486
+ R.register("wms", new va());
3487
+ R.register("vetorial-linhas", new ya());
3488
+ R.register("vetorial-pontos", new xa());
3489
+ R.register("vetorial-poligonos", new Pa());
3490
+ R.register("grid", new La());
3491
+ R.register("feicoes", new mn());
3492
+ const Eo = [
3492
3493
  {
3493
3494
  id: "satelite",
3494
3495
  nome: "Satélite Google Híbrido",
@@ -3612,11 +3613,11 @@ const zo = [
3612
3613
  scaleMode: "screen"
3613
3614
  }
3614
3615
  }
3615
- ], pn = /* @__PURE__ */ new Set(["tile", "wms", "grid"]);
3616
+ ], gn = /* @__PURE__ */ new Set(["tile", "wms", "grid"]);
3616
3617
  function Le(a, t) {
3617
3618
  return typeof a == "number" && Number.isFinite(a) ? Math.max(0, Math.min(1, a)) : t;
3618
3619
  }
3619
- class fn {
3620
+ class vn {
3620
3621
  constructor(t) {
3621
3622
  f(this, "layers", []);
3622
3623
  f(this, "layerInstances", /* @__PURE__ */ new Map());
@@ -3627,7 +3628,7 @@ class fn {
3627
3628
  // cada um mudava o contexto e recriava todas as camadas. Agora as mudanças de contexto do mesmo tick
3628
3629
  // viram um único render (em microtask), antecipado por qualquer leitura/alteração das instâncias.
3629
3630
  f(this, "renderPendente", !1);
3630
- this.layers = (t || zo).map((e) => ({ ...e, estilo: { ...e.estilo } }));
3631
+ this.layers = (t || Eo).map((e) => ({ ...e, estilo: { ...e.estilo } }));
3631
3632
  }
3632
3633
  /**
3633
3634
  * Remove as camadas que o kit traz de fábrica (satélite, SIGEF, homologados, perímetro, vizinhos, vértices, grade).
@@ -3635,7 +3636,7 @@ class fn {
3635
3636
  */
3636
3637
  descartarCamadasPadrao() {
3637
3638
  if (this.map) return;
3638
- const t = new Set(zo.map((e) => e.id));
3639
+ const t = new Set(Eo.map((e) => e.id));
3639
3640
  this.layers = this.layers.filter((e) => !t.has(e.id) || e.tipo === "feicoes");
3640
3641
  }
3641
3642
  attachMap(t, e) {
@@ -3650,7 +3651,7 @@ class fn {
3650
3651
  }
3651
3652
  renderAllLayers(t = !1) {
3652
3653
  this.renderPendente = !1, !(!this.map || !this.context) && (this.layers.forEach((e) => {
3653
- if (!(t && pn.has(e.tipo) && e.visivel && this.layerInstances.has(e.id))) {
3654
+ if (!(t && gn.has(e.tipo) && e.visivel && this.layerInstances.has(e.id))) {
3654
3655
  if (this.layerInstances.has(e.id)) {
3655
3656
  const o = this.layerInstances.get(e.id), i = R.get(e.tipo);
3656
3657
  i && i.destroy(o, this.map), this.layerInstances.delete(e.id);
@@ -3871,7 +3872,7 @@ class fn {
3871
3872
  }), this.layerInstances.clear()), this.map = null, this.context = null, this.listeners = [];
3872
3873
  }
3873
3874
  }
3874
- function ui(a, t) {
3875
+ function pi(a, t) {
3875
3876
  var s, r;
3876
3877
  if (t == null) return null;
3877
3878
  const e = String(t).trim(), o = (c) => c ? (c.lon = c.lng, c) : null, n = a.getMarkers().find((c) => {
@@ -3974,12 +3975,12 @@ function ui(a, t) {
3974
3975
  }
3975
3976
  return null;
3976
3977
  }
3977
- function mn(a, t, e, o) {
3978
+ function yn(a, t, e, o) {
3978
3979
  var m, g;
3979
3980
  je(t, a.getMap());
3980
3981
  const i = a.getMap();
3981
3982
  if (!i) return;
3982
- const n = ui(a, e);
3983
+ const n = pi(a, e);
3983
3984
  if (!n) {
3984
3985
  console.warn(`[ui-canvas-cad] Elemento com identificador "${e}" não encontrado para destaque.`);
3985
3986
  return;
@@ -4015,7 +4016,7 @@ function mn(a, t, e, o) {
4015
4016
  function je(a, t) {
4016
4017
  a.destaqueTimeoutId !== null && (window.clearTimeout(a.destaqueTimeoutId), a.destaqueTimeoutId = null), a.destaqueMarker && (t && t.hasLayer(a.destaqueMarker) ? t.removeLayer(a.destaqueMarker) : typeof a.destaqueMarker.remove == "function" && a.destaqueMarker.remove(), a.destaqueMarker = null);
4017
4018
  }
4018
- function gn(a, t) {
4019
+ function bn(a, t) {
4019
4020
  const e = /* @__PURE__ */ new Map();
4020
4021
  a.forEach((i) => {
4021
4022
  const n = i.lat ?? i.latitude ?? i.y, s = i.lon ?? i.lng ?? i.longitude ?? i.x, r = V(n, s);
@@ -4041,7 +4042,7 @@ function gn(a, t) {
4041
4042
  });
4042
4043
  }), Array.from(o.values()).filter((i) => i.pontos && i.pontos.length > 0 || !!i.poligono_wkt);
4043
4044
  }
4044
- function vn(a, t) {
4045
+ function xn(a, t) {
4045
4046
  const e = /* @__PURE__ */ new Map();
4046
4047
  return t.forEach((o) => {
4047
4048
  o.id !== void 0 && o.id !== null && o.pontos && o.pontos.length > 0 && e.set(o.id, o.pontos);
@@ -4050,7 +4051,7 @@ function vn(a, t) {
4050
4051
  return i !== void 0 && (!o.pontos || o.pontos.length === 0) && e.has(i) ? { ...o, pontos: e.get(i) } : { ...o };
4051
4052
  });
4052
4053
  }
4053
- function yn(a, t, e = !1) {
4054
+ function Pn(a, t, e = !1) {
4054
4055
  let o = [...a];
4055
4056
  e && t && t.forEach((n) => {
4056
4057
  n.pontos && o.push(...n.pontos);
@@ -4061,7 +4062,7 @@ function yn(a, t, e = !1) {
4061
4062
  }).filter((n) => n !== null);
4062
4063
  return i.length === 1 ? { single: i[0] } : i.length > 1 ? { bounds: y.latLngBounds(i) } : null;
4063
4064
  }
4064
- function bn(a, t) {
4065
+ function Ln(a, t) {
4065
4066
  var n;
4066
4067
  (n = t == null ? void 0 : t.flushRender) == null || n.call(t);
4067
4068
  const e = [], o = /* @__PURE__ */ new Set(), i = (s) => {
@@ -4073,14 +4074,14 @@ function bn(a, t) {
4073
4074
  i(s), typeof s.eachLayer == "function" && s.eachLayer(i);
4074
4075
  }), e;
4075
4076
  }
4076
- function xn(a, t, e = "vertices", o) {
4077
+ function Cn(a, t, e = "vertices", o) {
4077
4078
  const i = t || [];
4078
4079
  a.layerManager.getOrCreateLayer(e, "vetorial-pontos", "Pontos / Vértices"), e === "vertices" && (a.context.pontos = i, a.canvasInteracao.ctx.pontosList = i, o && (a.customMarkerClickCallback = (n) => {
4079
4080
  const s = i.find((r) => String(r.id) === String(n)) || { id: n, lat: 0, lon: 0 };
4080
4081
  o(s);
4081
4082
  })), a.layerManager.setLayerData(e, { pontos: i, onClique: o }), a.layerManager.setLayerVisibility(e, !0);
4082
4083
  }
4083
- function Pn(a, t, e = "linhas") {
4084
+ function Sn(a, t, e = "linhas") {
4084
4085
  const o = t || [];
4085
4086
  a.layerManager.getOrCreateLayer(e, "vetorial-linhas", "Conexões / Linhas"), (e === "linhas" || e === "perimetro") && (a.context.segmentos = o.map((i) => ({
4086
4087
  ponto_inicio_id: Number(i.origemId) || 0,
@@ -4088,7 +4089,7 @@ function Pn(a, t, e = "linhas") {
4088
4089
  tipo_limite_sigef: i.tipoLinha === "tracejada" ? "LN1" : "LA1"
4089
4090
  }))), a.layerManager.setLayerData(e, { conexoes: o }), a.layerManager.setLayerVisibility(e, !0);
4090
4091
  }
4091
- function Ln(a, t, e = !0, o = "polilinha", i) {
4092
+ function Mn(a, t, e = !0, o = "polilinha", i) {
4092
4093
  const n = t || [];
4093
4094
  a.layerManager.getOrCreateLayer(o, "vetorial-linhas", "Polilinhas"), (o === "polilinha" || o === "perimetro") && (a.context.pontos = n, a.context.segmentos = [], a.canvasInteracao.ctx.pontosList = n);
4094
4095
  const s = i || a.chaveGrupo || a.context.chaveGrupo;
@@ -4099,11 +4100,11 @@ function Ln(a, t, e = !0, o = "polilinha", i) {
4099
4100
  chaveGrupo: s
4100
4101
  }), a.layerManager.setLayerVisibility(o, !0);
4101
4102
  }
4102
- function Cn(a, t, e = "poligonos") {
4103
+ function An(a, t, e = "poligonos") {
4103
4104
  const o = t || [];
4104
4105
  a.layerManager.getOrCreateLayer(e, "vetorial-poligonos", "Polígonos"), a.layerManager.setLayerData(e, { poligonos: o }), a.layerManager.setLayerVisibility(e, !0);
4105
4106
  }
4106
- function Sn(a, t, e) {
4107
+ function wn(a, t, e) {
4107
4108
  const o = t || [];
4108
4109
  if (e != null) {
4109
4110
  const i = e || [];
@@ -4114,7 +4115,7 @@ function Sn(a, t, e) {
4114
4115
  ...e != null ? { pontos: a.context.pontos } : {}
4115
4116
  });
4116
4117
  }
4117
- function Mn(a, t = !1) {
4118
+ function zn(a, t = !1) {
4118
4119
  a.context.pontos = [], a.context.segmentos = [], a.context.confrontantes = [], a.canvasInteracao.ctx.pontosList = [], a.canvasInteracao.limparSelecao();
4119
4120
  const e = {
4120
4121
  pontos: [],
@@ -4123,21 +4124,21 @@ function Mn(a, t = !1) {
4123
4124
  };
4124
4125
  t || (a.context.bancoPontos = [], e.bancoPontos = []), a.layerManager.updateContext(e);
4125
4126
  }
4126
- function Eo(a) {
4127
+ function ko(a) {
4127
4128
  return a != null && !isNaN(Number(a)) && String(a).trim() !== "" ? Number(a) : a;
4128
4129
  }
4129
- function An(a, t) {
4130
+ function En(a, t) {
4130
4131
  var r, c;
4131
4132
  const e = a.core.map, o = a.layerManager.getLayerDef(t.layerId), i = t.baseSize || 8, n = ((r = a.context.graphicScale) == null ? void 0 : r.markerScaleMultiplier) || 1;
4132
4133
  if (e && ((c = o == null ? void 0 : o.estilo) == null ? void 0 : c.scaleMode) === "world") {
4133
4134
  const l = o.estilo.dimensaoMetros || 0.25, d = e.getCenter(), h = e.getZoom(), u = 40075016686e-3 * Math.abs(Math.cos(d.lat * Math.PI / 180)) / Math.pow(2, h + 8), m = l / (u > 0 ? u : 1);
4134
4135
  return Math.max(3, Math.round(m * n));
4135
4136
  }
4136
- const s = Qo(t.densTotal || 0, (e == null ? void 0 : e.getZoom()) ?? 18);
4137
+ const s = Jo(t.densTotal || 0, (e == null ? void 0 : e.getZoom()) ?? 18);
4137
4138
  return Math.max(s < 1 ? 5 : 4, Math.round(i * n * s));
4138
4139
  }
4139
- function wn(a, t, e, o, i) {
4140
- const n = An(a, e), s = a.context.config.enableAnimations ? "cad-pt-anim" : "", r = ee(
4140
+ function kn(a, t, e, o, i) {
4141
+ const n = En(a, e), s = a.context.config.enableAnimations ? "cad-pt-anim" : "", r = ee(
4141
4142
  e.shapeStyle,
4142
4143
  n,
4143
4144
  e.markerBg,
@@ -4152,7 +4153,7 @@ function wn(a, t, e, o, i) {
4152
4153
  iconSize: [n + 6, n + 6]
4153
4154
  }));
4154
4155
  }
4155
- function zn(a) {
4156
+ function In(a) {
4156
4157
  const t = a.context.selectedPontoIds || [], e = a.canvasInteracao.ctx.selectedVizinhoPontoIds || [], o = /* @__PURE__ */ new Set([
4157
4158
  ...t.map(String),
4158
4159
  ...e.map(String)
@@ -4162,12 +4163,12 @@ function zn(a) {
4162
4163
  if (s == null) continue;
4163
4164
  const r = o.has(String(s));
4164
4165
  if (n.isSelected === r) continue;
4165
- n.isSelected = r, i.setZIndexOffset(r ? 2e3 : 0), n.shapeStyle && n.baseSize && n.markerBg && wn(a, i, n, s, r);
4166
+ n.isSelected = r, i.setZIndexOffset(r ? 2e3 : 0), n.shapeStyle && n.baseSize && n.markerBg && kn(a, i, n, s, r);
4166
4167
  const c = i.getElement();
4167
4168
  c && (r ? c.classList.add("cad-marker-selected", "ponto-selecionado") : c.classList.remove("cad-marker-selected", "ponto-selecionado"));
4168
4169
  }
4169
4170
  }
4170
- class En {
4171
+ class Tn {
4171
4172
  constructor(t) {
4172
4173
  f(this, "core");
4173
4174
  f(this, "layerManager");
@@ -4183,7 +4184,7 @@ class En {
4183
4184
  destaqueMarker: null,
4184
4185
  destaqueTimeoutId: null
4185
4186
  });
4186
- this.core = new ta(this), this.layerManager = new fn(t), this.canvasInteracao = new ua({
4187
+ this.core = new ia(this), this.layerManager = new vn(t), this.canvasInteracao = new ma({
4187
4188
  mapaController: this,
4188
4189
  layerManager: this.layerManager
4189
4190
  }), this.context = {
@@ -4200,7 +4201,7 @@ class En {
4200
4201
  },
4201
4202
  onMarkerClick: (e, o) => {
4202
4203
  if (this.modoCliqueSequencialAtivo || this.context.modoSequencial) return;
4203
- const i = Eo(e);
4204
+ const i = ko(e);
4204
4205
  if (this.customMarkerClickCallback)
4205
4206
  try {
4206
4207
  this.customMarkerClickCallback(i, o);
@@ -4248,16 +4249,16 @@ class En {
4248
4249
  this.context.confrontantes = e, this.layerManager.updateContext({ confrontantes: e });
4249
4250
  }
4250
4251
  plotarPontos(t, e = "vertices", o) {
4251
- xn(this, t, e, o);
4252
+ Cn(this, t, e, o);
4252
4253
  }
4253
4254
  plotarConexoes(t, e = "linhas") {
4254
- Pn(this, t, e);
4255
+ Sn(this, t, e);
4255
4256
  }
4256
4257
  plotarPolilinhaSequencial(t, e = !0, o = "polilinha", i) {
4257
- Ln(this, t, e, o, i);
4258
+ Mn(this, t, e, o, i);
4258
4259
  }
4259
4260
  plotarPoligonos(t, e = "poligonos") {
4260
- Cn(this, t, e);
4261
+ An(this, t, e);
4261
4262
  }
4262
4263
  limparCamadas(t) {
4263
4264
  this.layerManager.clearLayers(t), (!t || t.length === 0) && this.canvasInteracao.limparSelecao();
@@ -4279,7 +4280,7 @@ class En {
4279
4280
  e && (this.customMarkerClickCallback = e), this.setPontos(t || []);
4280
4281
  }
4281
4282
  plotSegmentos(t, e) {
4282
- Sn(this, t, e);
4283
+ wn(this, t, e);
4283
4284
  }
4284
4285
  plotPolilinhaTemporaria(t) {
4285
4286
  const e = t || [];
@@ -4290,15 +4291,15 @@ class En {
4290
4291
  this.setBancoPontos(e), this.layerManager.setLayerVisibility("homologados", !0), this.layerManager.setLayerVisibility("homologados-pontos", !0);
4291
4292
  }
4292
4293
  plotPontosVizinhos(t) {
4293
- const e = gn(t || [], this.context.confrontantes || []);
4294
+ const e = bn(t || [], this.context.confrontantes || []);
4294
4295
  this.setConfrontantes(e), this.layerManager.setLayerVisibility("vizinhos", !0);
4295
4296
  }
4296
4297
  plotPoligonosVizinhos(t) {
4297
- const e = vn(t || [], this.context.confrontantes || []);
4298
+ const e = xn(t || [], this.context.confrontantes || []);
4298
4299
  this.setConfrontantes(e), this.layerManager.setLayerVisibility("vizinhos", !0);
4299
4300
  }
4300
4301
  clearOverlays(t = !1) {
4301
- Mn(this, t);
4302
+ zn(this, t);
4302
4303
  }
4303
4304
  setGraphicScale(t) {
4304
4305
  this.layerManager.setGraphicScale(t);
@@ -4316,11 +4317,11 @@ class En {
4316
4317
  const s = this.core.map;
4317
4318
  s.setView(i.getLatLng(), e), Je(s, () => i.openPopup());
4318
4319
  }
4319
- const n = Eo(t);
4320
+ const n = ko(t);
4320
4321
  this.canvasInteracao.ctx.selectedPontoIds = [n], this.canvasInteracao.ctx.lastSelectedPontoId = n, this.context.selectedPontoIds = [n], this.atualizarDestaqueMarcadores();
4321
4322
  }
4322
4323
  atualizarDestaqueMarcadores() {
4323
- zn(this);
4324
+ In(this);
4324
4325
  }
4325
4326
  selectSegmento(t) {
4326
4327
  const e = t != null ? String(t) : null;
@@ -4328,7 +4329,7 @@ class En {
4328
4329
  }
4329
4330
  fitBounds(t, e = [40, 40], o = !1) {
4330
4331
  if (!this.core.map) return;
4331
- const i = yn(t || this.context.pontos || [], this.context.confrontantes, o);
4332
+ const i = Pn(t || this.context.pontos || [], this.context.confrontantes, o);
4332
4333
  if (i) {
4333
4334
  i.single ? this.core.map.setView(i.single, 18) : i.bounds && (this.core.map.fitBounds(i.bounds, { padding: e }), this.core.map.once("moveend", () => {
4334
4335
  this.core.preCarregarTilesRegiao(i.bounds);
@@ -4340,7 +4341,7 @@ class En {
4340
4341
  }
4341
4342
  }
4342
4343
  getMarkers() {
4343
- return bn(this.core.map, this.layerManager);
4344
+ return Ln(this.core.map, this.layerManager);
4344
4345
  }
4345
4346
  getVizinhosMarkers() {
4346
4347
  return this.getMarkers().filter((t) => !!t.isVizinho);
@@ -4349,10 +4350,10 @@ class En {
4349
4350
  return this.destaqueState.destaqueMarker !== null;
4350
4351
  }
4351
4352
  localizarCoordenadasElemento(t) {
4352
- return ui(this, t);
4353
+ return pi(this, t);
4353
4354
  }
4354
4355
  destacarElemento(t, e) {
4355
- mn(this, this.destaqueState, t, e);
4356
+ yn(this, this.destaqueState, t, e);
4356
4357
  }
4357
4358
  limparDestaque() {
4358
4359
  je(this.destaqueState, this.getMap());
@@ -4370,7 +4371,7 @@ class En {
4370
4371
  return this.core.map;
4371
4372
  }
4372
4373
  }
4373
- function kn(a, t, e, o) {
4374
+ function Dn(a, t, e, o) {
4374
4375
  if (!a) return;
4375
4376
  if (a.querySelectorAll(".layer-item").length === t.length) {
4376
4377
  t.forEach((n) => {
@@ -4450,21 +4451,21 @@ function kn(a, t, e, o) {
4450
4451
  });
4451
4452
  });
4452
4453
  }
4453
- function In(a) {
4454
+ function _n(a) {
4454
4455
  return a.context.selectedPontoIds || a.canvasInteracao.ctx.selectedPontoIds || [];
4455
4456
  }
4456
- function pi(a, t) {
4457
+ function fi(a, t) {
4457
4458
  a.canvasInteracao.ctx.selectedPontoIds = [...t], a.context.selectedPontoIds = [...t];
4458
4459
  }
4459
4460
  function eo(a) {
4460
4461
  const t = a;
4461
4462
  return (t == null ? void 0 : t.originalEvent) || t || {};
4462
4463
  }
4463
- function Tn(a) {
4464
+ function qn(a) {
4464
4465
  const t = a, e = eo(a), o = typeof e.composedPath == "function" ? e.composedPath() : [];
4465
4466
  return o.length > 0 ? o[0] : e.target || (t == null ? void 0 : t.target) || null;
4466
4467
  }
4467
- function _n(a, t, e) {
4468
+ function $n(a, t, e) {
4468
4469
  var n, s, r, c;
4469
4470
  if (t) return { x: Math.round(t.x), y: Math.round(t.y) };
4470
4471
  const o = a;
@@ -4479,21 +4480,21 @@ function _n(a, t, e) {
4479
4480
  y: Math.round((i.clientY ?? 0) - e.top)
4480
4481
  };
4481
4482
  }
4482
- function Dn(a, t) {
4483
+ function Fn(a, t) {
4483
4484
  const e = t || (a == null ? void 0 : a.latlng);
4484
4485
  return e && typeof e.lat == "number" ? { lat: e.lat, lng: e.lng ?? e.lon ?? 0 } : null;
4485
4486
  }
4486
- function qn(a, t, e, o) {
4487
+ function On(a, t, e, o) {
4487
4488
  var g, p;
4488
4489
  if (a.modoSequencial || a.controller.canvasInteracao.selectionHappened || a.controller.canvasInteracao.panHappened || a.mouseMovedSinceDown) return !1;
4489
- const i = eo(t), n = Tn(t);
4490
+ const i = eo(t), n = qn(t);
4490
4491
  if (n) {
4491
4492
  const v = '.custom-leaflet-marker, .leaflet-marker-icon, .leaflet-interactive, .compact-popup, .leaflet-popup, .ui-popup-btn, .cad-btn-tool, .qgis-layer-panel, [class*="leaflet-marker"], [class*="leaflet-popup"]';
4492
4493
  if (((g = n.matches) == null ? void 0 : g.call(n, v)) || ((p = n.closest) == null ? void 0 : p.call(n, v))) return !1;
4493
4494
  }
4494
4495
  const s = a.controller.getMap();
4495
4496
  if (!s || !a.mapContainer) return !1;
4496
- const r = _n(t, o, a.mapContainer.getBoundingClientRect()), l = Dn(t, e) ?? s.containerPointToLatLng(y.point(r.x, r.y)), d = l.lat, h = l.lng, u = a.controller.layerManager ? a.controller.layerManager.getLayers().filter((v) => v.visivel).map((v) => v.id) : [], m = i;
4497
+ const r = $n(t, o, a.mapContainer.getBoundingClientRect()), l = Fn(t, e) ?? s.containerPointToLatLng(y.point(r.x, r.y)), d = l.lat, h = l.lng, u = a.controller.layerManager ? a.controller.layerManager.getLayers().filter((v) => v.visivel).map((v) => v.id) : [], m = i;
4497
4498
  return a.host.dispatchEvent(new CustomEvent("ui-canvas-clique", {
4498
4499
  detail: {
4499
4500
  coordenadas: {
@@ -4511,7 +4512,7 @@ function qn(a, t, e, o) {
4511
4512
  composed: !0
4512
4513
  })), !0;
4513
4514
  }
4514
- function $n(a, t, e, o) {
4515
+ function Nn(a, t, e, o) {
4515
4516
  const i = o || a.obterElementoPorId(e);
4516
4517
  a.host.dispatchEvent(new CustomEvent("ui-acao-popup", {
4517
4518
  detail: {
@@ -4523,7 +4524,7 @@ function $n(a, t, e, o) {
4523
4524
  composed: !0
4524
4525
  })), a.fecharPopup();
4525
4526
  }
4526
- function Fn(a, t, e, o, i, n, s) {
4527
+ function Rn(a, t, e, o, i, n, s) {
4527
4528
  let r = o || a.obterElementoPorId(t), c = i;
4528
4529
  if (!c && r) {
4529
4530
  const l = r, d = l.lat ?? l.latitude ?? 0, h = l.lon ?? l.lng ?? l.longitude ?? 0;
@@ -4564,12 +4565,12 @@ function Fn(a, t, e, o, i, n, s) {
4564
4565
  composed: !0
4565
4566
  }));
4566
4567
  }
4567
- function On(a, t, e, o, i) {
4568
+ function Bn(a, t, e, o, i) {
4568
4569
  if (a.modoSequencial) {
4569
4570
  a.fecharPopup();
4570
4571
  return;
4571
4572
  }
4572
- if (a.controller.canvasInteracao.ctx.selectedPontoIds = [], a.controller.canvasInteracao.ctx.selectedVizinhoPontoIds = [], a.controller.canvasInteracao.ctx.lastSelectedPontoId = null, pi(a.controller, []), a.controller.atualizarDestaqueMarcadores(), a.controller.selectSegmento(t), i)
4573
+ if (a.controller.canvasInteracao.ctx.selectedPontoIds = [], a.controller.canvasInteracao.ctx.selectedVizinhoPontoIds = [], a.controller.canvasInteracao.ctx.lastSelectedPontoId = null, fi(a.controller, []), a.controller.atualizarDestaqueMarcadores(), a.controller.selectSegmento(t), i)
4573
4574
  try {
4574
4575
  i(t, e);
4575
4576
  } catch (n) {
@@ -4596,7 +4597,7 @@ function On(a, t, e, o, i) {
4596
4597
  composed: !0
4597
4598
  }));
4598
4599
  }
4599
- function Nn(a, t) {
4600
+ function Vn(a, t) {
4600
4601
  let e = null, o = null, i = 0, n = 0;
4601
4602
  function s() {
4602
4603
  var d;
@@ -4632,7 +4633,7 @@ function Nn(a, t) {
4632
4633
  invalidateSizeSafely: s
4633
4634
  };
4634
4635
  }
4635
- class Rn {
4636
+ class jn {
4636
4637
  constructor(t) {
4637
4638
  f(this, "canal", null);
4638
4639
  f(this, "contexto");
@@ -4693,7 +4694,7 @@ class Rn {
4693
4694
  }
4694
4695
  }
4695
4696
  }
4696
- class Bn {
4697
+ class Hn {
4697
4698
  constructor(t) {
4698
4699
  f(this, "contexto");
4699
4700
  f(this, "uiListeners", new Qt());
@@ -4756,7 +4757,7 @@ class Bn {
4756
4757
  this.uiListeners.cleanup();
4757
4758
  }
4758
4759
  }
4759
- class Vn {
4760
+ class Gn {
4760
4761
  constructor(t) {
4761
4762
  f(this, "contexto");
4762
4763
  f(this, "_pontos", []);
@@ -4856,16 +4857,16 @@ class Vn {
4856
4857
  return this.contexto.obterController().getVizinhosMarkers();
4857
4858
  }
4858
4859
  }
4859
- const jn = ':host{display:block;width:100%;height:520px;position:relative;border-radius:var(--ui-raio-lg, 10px);overflow:hidden;box-shadow:0 10px 30px -5px #0009;border:1px solid rgba(255,255,255,.1);background:#080d0a;color:#fff;font-family:var(--ui-fonte-base, "Inter", sans-serif);user-select:none;-webkit-user-select:none}*,*:before,*:after{box-sizing:border-box}.cad-root{position:relative;width:100%;height:100%;display:flex;overflow:hidden}.cad-map-container{width:100%;height:100%;background:#080d0a;z-index:1}.qgis-layer-panel{position:absolute;top:12px;left:12px;z-index:var(--ui-z-workspace-hud, 500);width:290px;max-height:calc(100% - 24px);background:#0a120eeb;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.15);border-radius:8px;box-shadow:0 20px 40px #000000b3;display:flex;flex-direction:column;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .25s ease;overflow:hidden}.qgis-layer-panel.collapsed{transform:translate(-310px);opacity:0;pointer-events:none}.layer-panel-header{padding:10px 14px;background:#ffffff08;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:space-between}.layer-panel-title{font-size:12px;font-weight:700;letter-spacing:.5px;color:#00f5a0;display:flex;align-items:center;gap:6px;text-transform:uppercase}.layer-panel-close{background:transparent;border:none;color:#ffffff80;cursor:pointer;padding:2px;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;transition:all .15s}.layer-panel-close:hover{color:#fff;background:#ffffff1a}.layer-panel-body{padding:8px 10px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;max-height:400px}.layer-panel-body::-webkit-scrollbar{width:5px}.layer-panel-body::-webkit-scrollbar-track{background:transparent}.layer-panel-body::-webkit-scrollbar-thumb{background:#fff3;border-radius:var(--ui-raio-sm, 4px)}.layer-panel-body::-webkit-scrollbar-thumb:hover{background:#00f5a066}.layer-item{background:transparent;border:none;border-bottom:1px solid rgba(255,255,255,.08);border-radius:0;padding:4px;display:flex;flex-direction:column;gap:3px;transition:background .15s ease}.layer-item:last-child{border-bottom:none}.layer-item:hover{background:#ffffff08;border-radius:var(--ui-raio-sm, 4px)}.layer-item-row{display:flex;align-items:center;justify-content:space-between;min-height:18px}.layer-item-label{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:600;line-height:1.2;color:#ffffffe6;cursor:pointer;-webkit-user-select:none;user-select:none}.layer-chk-visibility{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:14px;height:14px;border:1px solid rgba(255,255,255,.4);border-radius:3px;background:#0006;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;position:relative;transition:all .15s ease;flex-shrink:0;margin:0}.layer-chk-visibility:hover{border-color:#00f5a0}.layer-chk-visibility:checked{background:#00f5a0;border-color:#00f5a0}.layer-chk-visibility:checked:after{content:"";width:3.5px;height:7px;border:solid #04150c;border-width:0 1.5px 1.5px 0;transform:rotate(45deg) translateY(-.5px);display:block}.layer-item-actions{display:flex;align-items:center;gap:4px}.btn-layer-action{background:transparent;border:none;color:#fff6;cursor:pointer;padding:2px;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:all .15s}.btn-layer-action:hover{color:#00f5a0;background:#ffffff14}.btn-layer-action.active{color:#f43f5e;background:#f43f5e26}.layer-controls-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:9.5px;line-height:1;color:#ffffff80;padding-left:21px}.layer-opacity-slider{flex:1;height:3px;margin:0;border-radius:2px;background:#ffffff26;accent-color:#00f5a0;cursor:pointer}.scale-mode-pill{font-size:8.5px;font-weight:600;padding:1px 6px;border-radius:6px;background:#ffffff0f;color:#ffffffb3;cursor:pointer;border:1px solid rgba(255,255,255,.1);transition:all .15s;line-height:1.2}.scale-mode-pill:hover{border-color:#00f5a0;color:#00f5a0;background:#00f5a01a}:host([sem-painel-camadas]) .qgis-layer-panel,:host([sem-painel-camadas]) #btn-toggle-layers,:host([sem-barra-rapida]) .cad-quick-toolbar{display:none!important}.cad-quick-toolbar{position:absolute;top:12px;right:12px;z-index:var(--ui-z-workspace-hud, 500);display:flex;flex-direction:column;gap:6px;background:#0c1510eb;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.15);border-radius:8px;padding:5px;box-shadow:0 10px 25px -5px #0009}.cad-btn-tool{background:transparent;border:none;color:#fff9;cursor:pointer;padding:7px;border-radius:5px;display:flex;align-items:center;justify-content:center;transition:all .15s}.cad-btn-tool:hover{background:#ffffff1a;color:#fff}.cad-btn-tool.active{background:#00f5a026;color:#00f5a0;border:1px solid rgba(0,245,160,.3)}.cad-selection-box{pointer-events:none;box-sizing:border-box}.custom-leaflet-marker{cursor:pointer}.custom-leaflet-marker:hover{z-index:1800!important}.custom-leaflet-marker .cad-pt svg{transition:transform .12s ease-out}.custom-leaflet-marker:hover .cad-pt svg{transform:scale(1.3)}.leaflet-popup-content-wrapper{background:#0f1712!important;color:#f8fafc!important;border:1px solid rgba(255,255,255,.15)!important;border-radius:8px!important;box-shadow:0 10px 25px #0009!important;padding:0!important;backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important}.leaflet-popup-tip{background:#0f1712!important;border:1px solid rgba(255,255,255,.15)!important;box-shadow:none!important}.leaflet-popup-close-button{color:#fff9!important;padding:6px!important;transition:color .15s ease}.leaflet-popup-close-button:hover{color:#fff!important}.leaflet-popup-content{margin:12px 14px!important;line-height:1.4;font-family:inherit;color:#f8fafc}.compact-popup .leaflet-popup-content{margin:10px 12px!important}.ui-popup-actions-footer{display:flex;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);justify-content:flex-end;align-items:center;flex-wrap:wrap}.ui-popup-btn{display:inline-flex;align-items:center;justify-content:center;font-family:inherit;font-size:11px;font-weight:500;padding:4px 9px;border-radius:var(--ui-raio-borda, 6px);cursor:pointer;transition:all .15s ease;border:1px solid transparent;outline:none;line-height:1.25;-webkit-user-select:none;user-select:none}.ui-popup-btn-primary{background:var(--ui-cor-primaria, #00f5a0);color:#080d0a;font-weight:600;border-color:var(--ui-cor-primaria, #00f5a0)}.ui-popup-btn-primary:hover{filter:brightness(1.1);box-shadow:0 0 10px #00f5a059}.ui-popup-btn-secondary{background:#ffffff14;color:#fff;border-color:#ffffff2e}.ui-popup-btn-secondary:hover{background:#ffffff29;border-color:#ffffff4d}.ui-popup-btn-destrutivo{background:#ef444426;color:#f87171;border-color:#ef444459}.ui-popup-btn-destrutivo:hover{background:#ef444440;border-color:#ef444499;color:#fff}@media (max-width: 520px){.qgis-layer-panel{top:8px;left:8px;right:8px;width:auto;max-height:calc(100% - 16px)}.qgis-layer-panel.collapsed{transform:translateY(-115%)}.layer-panel-close{min-width:36px;min-height:36px;font-size:16px}.layer-action-btn{min-width:32px;min-height:32px}}.cad-destaque-marker-container{pointer-events:none!important;background:transparent!important;border:none!important;overflow:visible!important}.cad-destaque-marker-container *{pointer-events:none!important}.cad-pulse-highlight{position:relative;width:52px;height:52px;display:flex;align-items:center;justify-content:center;pointer-events:none!important;user-select:none;-webkit-user-select:none}.cad-pulse-core{position:absolute;width:12px;height:12px;border-radius:50%;background-color:var(--cad-pulse-cor, #00f5a0);border:2px solid #ffffff;box-sizing:border-box;pointer-events:none!important}.cad-pulse-ring{position:absolute;width:100%;height:100%;border-radius:50%;border:2px solid var(--cad-pulse-cor, #00f5a0);background-color:color-mix(in srgb,var(--cad-pulse-cor, #00f5a0) 14%,transparent);box-sizing:border-box;pointer-events:none!important;opacity:0;animation:cad-pulse-ping 1.8s cubic-bezier(0,0,.2,1) infinite}.cad-pulse-ring.ring-2{animation-delay:.9s}@keyframes cad-pulse-ping{0%{transform:scale(.3);opacity:.9}70%{opacity:.35}to{transform:scale(1);opacity:0}}@media (prefers-reduced-motion: reduce){.cad-pulse-ring{animation:none;opacity:.6;transform:scale(.6)}}.cad-marker-selected,.ponto-selecionado{z-index:2000!important}@media (prefers-reduced-motion: reduce){.custom-leaflet-marker .cad-pt svg{transition:none}}.ui-popup-actions-footer{margin-top:8px;padding-top:6px;border-top:1px solid rgba(255,255,255,.12);display:flex;gap:6px;flex-wrap:wrap}.ui-popup-btn{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;font-size:11px;font-weight:600;border-radius:var(--ui-raio-sm, 4px);border:1px solid rgba(255,255,255,.15);background:#ffffff14;color:#fff;cursor:pointer;line-height:1.2;transition:all .15s ease;-webkit-user-select:none;user-select:none}.ui-popup-btn:hover{background:#ffffff2e;border-color:#ffffff4d}.ui-popup-btn-primary{background:#00f5a0;color:#06130b;border-color:#00f5a0}.ui-popup-btn-primary:hover{background:#10ffad;box-shadow:0 0 8px #00f5a066}.ui-popup-btn-danger{background:#f43f5e33;color:#f43f5e;border-color:#f43f5e66}.ui-popup-btn-danger:hover{background:#f43f5e59;color:#fff}.cad-draw-toolbar{right:auto;left:12px;max-height:calc(100% - 24px);overflow-y:auto}.cad-draw-btn{font:600 11px var(--ui-fonte-base, sans-serif);padding:5px 9px;white-space:nowrap;justify-content:flex-start}.cad-ferramenta-ativa .leaflet-marker-icon{pointer-events:none!important}.cad-aviso{position:absolute;top:12px;left:50%;transform:translate(-50%);z-index:calc(var(--ui-z-workspace-hud, 500) + 1);box-sizing:border-box;max-width:min(calc(100% - 200px),460px);padding:8px 14px;border-radius:var(--ui-raio-borda, 6px);border:1px solid var(--ui-cor-aviso, #f59e0b);background:#0c1510f2;color:var(--ui-cor-texto, #ffffff);font:600 12px var(--ui-fonte-base, sans-serif);line-height:1.35;box-shadow:0 10px 25px -5px #0009;pointer-events:none}.cad-aviso[hidden]{display:none}.cad-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.cad-coordenadas-hud{position:absolute;bottom:8px;right:12px;z-index:var(--ui-z-workspace-hud, 500);display:flex;align-items:center;gap:8px;padding:3px 8px;background:#0a120ee0;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.12);border-radius:var(--ui-raio-sm, 4px);font-family:var(--ui-fonte-codigo, monospace);font-size:11px;color:#ffffffd9;pointer-events:none;-webkit-user-select:none;user-select:none;box-shadow:0 4px 12px #0006}:host([sem-hud-coordenadas]) .cad-coordenadas-hud{display:none!important}.cad-coordenadas-hud .cad-coord-fuso{color:#00f5a0;font-weight:700;padding:1px 4px;background:#00f5a01f;border-radius:2px}.cad-coordenadas-hud .cad-coord-utm{color:#fffffff2;font-weight:500}.cad-coordenadas-hud .cad-coord-geo{color:#fff9;font-size:10px}';
4860
- function Hn() {
4860
+ const Un = ':host{display:block;width:100%;height:520px;position:relative;border-radius:var(--ui-raio-lg, 10px);overflow:hidden;box-shadow:0 10px 30px -5px #0009;border:1px solid rgba(255,255,255,.1);background:var(--ui-degrade-interno, var(--ui-canvas-cad-fundo, #080d0a));color:#fff;font-family:var(--ui-fonte-base, "Inter", sans-serif);user-select:none;-webkit-user-select:none}*,*:before,*:after{box-sizing:border-box}.cad-root{position:relative;width:100%;height:100%;display:flex;overflow:hidden}.cad-map-container{width:100%;height:100%;background:var(--ui-canvas-cad-viewport-fundo, #080d0a);z-index:1}.qgis-layer-panel{position:absolute;top:12px;left:12px;z-index:var(--ui-z-workspace-hud, 500);width:290px;max-height:calc(100% - 24px);background:var(--ui-degrade-interno, var(--ui-canvas-cad-camadas-fundo, rgba(10, 18, 14, .92)));backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.15);border-radius:8px;box-shadow:0 20px 40px #000000b3;display:flex;flex-direction:column;transition:transform .25s cubic-bezier(.16,1,.3,1),opacity .25s ease;overflow:hidden}.qgis-layer-panel.collapsed{transform:translate(-310px);opacity:0;pointer-events:none}.layer-panel-header{padding:10px 14px;background:#ffffff08;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;justify-content:space-between}.layer-panel-title{font-size:12px;font-weight:700;letter-spacing:.5px;color:#00f5a0;display:flex;align-items:center;gap:6px;text-transform:uppercase}.layer-panel-close{background:transparent;border:none;color:#ffffff80;cursor:pointer;padding:2px;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;transition:all .15s}.layer-panel-close:hover{color:#fff;background:#ffffff1a}.layer-panel-body{padding:8px 10px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;max-height:400px}.layer-panel-body::-webkit-scrollbar{width:5px}.layer-panel-body::-webkit-scrollbar-track{background:transparent}.layer-panel-body::-webkit-scrollbar-thumb{background:#fff3;border-radius:var(--ui-raio-sm, 4px)}.layer-panel-body::-webkit-scrollbar-thumb:hover{background:#00f5a066}.layer-item{background:transparent;border:none;border-bottom:1px solid rgba(255,255,255,.08);border-radius:0;padding:4px;display:flex;flex-direction:column;gap:3px;transition:background .15s ease}.layer-item:last-child{border-bottom:none}.layer-item:hover{background:#ffffff08;border-radius:var(--ui-raio-sm, 4px)}.layer-item-row{display:flex;align-items:center;justify-content:space-between;min-height:18px}.layer-item-label{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:600;line-height:1.2;color:#ffffffe6;cursor:pointer;-webkit-user-select:none;user-select:none}.layer-chk-visibility{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:14px;height:14px;border:1px solid rgba(255,255,255,.4);border-radius:3px;background:#0006;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;position:relative;transition:all .15s ease;flex-shrink:0;margin:0}.layer-chk-visibility:hover{border-color:#00f5a0}.layer-chk-visibility:checked{background:#00f5a0;border-color:#00f5a0}.layer-chk-visibility:checked:after{content:"";width:3.5px;height:7px;border:solid #04150c;border-width:0 1.5px 1.5px 0;transform:rotate(45deg) translateY(-.5px);display:block}.layer-item-actions{display:flex;align-items:center;gap:4px}.btn-layer-action{background:transparent;border:none;color:#fff6;cursor:pointer;padding:2px;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:all .15s}.btn-layer-action:hover{color:#00f5a0;background:#ffffff14}.btn-layer-action.active{color:#f43f5e;background:#f43f5e26}.layer-controls-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:9.5px;line-height:1;color:#ffffff80;padding-left:21px}.layer-opacity-slider{flex:1;height:3px;margin:0;border-radius:2px;background:#ffffff26;accent-color:#00f5a0;cursor:pointer}.scale-mode-pill{font-size:8.5px;font-weight:600;padding:1px 6px;border-radius:6px;background:#ffffff0f;color:#ffffffb3;cursor:pointer;border:1px solid rgba(255,255,255,.1);transition:all .15s;line-height:1.2}.scale-mode-pill:hover{border-color:#00f5a0;color:#00f5a0;background:#00f5a01a}:host([sem-painel-camadas]) .qgis-layer-panel,:host([sem-painel-camadas]) #btn-toggle-layers,:host([sem-barra-rapida]) .cad-quick-toolbar{display:none!important}.cad-quick-toolbar{position:absolute;top:12px;right:12px;z-index:var(--ui-z-workspace-hud, 500);display:flex;flex-direction:column;gap:6px;background:#0c1510eb;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.15);border-radius:8px;padding:5px;box-shadow:0 10px 25px -5px #0009}.cad-btn-tool{background:transparent;border:none;color:#fff9;cursor:pointer;padding:7px;border-radius:5px;display:flex;align-items:center;justify-content:center;transition:all .15s}.cad-btn-tool:hover{background:#ffffff1a;color:#fff}.cad-btn-tool.active{background:#00f5a026;color:#00f5a0;border:1px solid rgba(0,245,160,.3)}.cad-selection-box{pointer-events:none;box-sizing:border-box}.custom-leaflet-marker{cursor:pointer}.custom-leaflet-marker:hover{z-index:1800!important}.custom-leaflet-marker .cad-pt svg{transition:transform .12s ease-out}.custom-leaflet-marker:hover .cad-pt svg{transform:scale(1.3)}.leaflet-popup-content-wrapper{background:#0f1712!important;color:#f8fafc!important;border:1px solid rgba(255,255,255,.15)!important;border-radius:8px!important;box-shadow:0 10px 25px #0009!important;padding:0!important;backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important}.leaflet-popup-tip{background:#0f1712!important;border:1px solid rgba(255,255,255,.15)!important;box-shadow:none!important}.leaflet-popup-close-button{color:#fff9!important;padding:6px!important;transition:color .15s ease}.leaflet-popup-close-button:hover{color:#fff!important}.leaflet-popup-content{margin:12px 14px!important;line-height:1.4;font-family:inherit;color:#f8fafc}.compact-popup .leaflet-popup-content{margin:10px 12px!important}.ui-popup-actions-footer{display:flex;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);justify-content:flex-end;align-items:center;flex-wrap:wrap}.ui-popup-btn{display:inline-flex;align-items:center;justify-content:center;font-family:inherit;font-size:11px;font-weight:500;padding:4px 9px;border-radius:var(--ui-raio-borda, 6px);cursor:pointer;transition:all .15s ease;border:1px solid transparent;outline:none;line-height:1.25;-webkit-user-select:none;user-select:none}.ui-popup-btn-primary{background:var(--ui-cor-primaria, #00f5a0);color:#080d0a;font-weight:600;border-color:var(--ui-cor-primaria, #00f5a0)}.ui-popup-btn-primary:hover{filter:brightness(1.1);box-shadow:0 0 10px #00f5a059}.ui-popup-btn-secondary{background:#ffffff14;color:#fff;border-color:#ffffff2e}.ui-popup-btn-secondary:hover{background:#ffffff29;border-color:#ffffff4d}.ui-popup-btn-destrutivo{background:#ef444426;color:#f87171;border-color:#ef444459}.ui-popup-btn-destrutivo:hover{background:#ef444440;border-color:#ef444499;color:#fff}@media (max-width: 520px){.qgis-layer-panel{top:8px;left:8px;right:8px;width:auto;max-height:calc(100% - 16px)}.qgis-layer-panel.collapsed{transform:translateY(-115%)}.layer-panel-close{min-width:36px;min-height:36px;font-size:16px}.layer-action-btn{min-width:32px;min-height:32px}}.cad-destaque-marker-container{pointer-events:none!important;background:transparent!important;border:none!important;overflow:visible!important}.cad-destaque-marker-container *{pointer-events:none!important}.cad-pulse-highlight{position:relative;width:52px;height:52px;display:flex;align-items:center;justify-content:center;pointer-events:none!important;user-select:none;-webkit-user-select:none}.cad-pulse-core{position:absolute;width:12px;height:12px;border-radius:50%;background:var(--cad-pulse-cor, #00f5a0);border:2px solid #ffffff;box-sizing:border-box;pointer-events:none!important}.cad-pulse-ring{position:absolute;width:100%;height:100%;border-radius:50%;border:2px solid var(--cad-pulse-cor, #00f5a0);background:color-mix(in srgb,var(--cad-pulse-cor, #00f5a0) 14%,transparent);box-sizing:border-box;pointer-events:none!important;opacity:0;animation:cad-pulse-ping 1.8s cubic-bezier(0,0,.2,1) infinite}.cad-pulse-ring.ring-2{animation-delay:.9s}@keyframes cad-pulse-ping{0%{transform:scale(.3);opacity:.9}70%{opacity:.35}to{transform:scale(1);opacity:0}}@media (prefers-reduced-motion: reduce){.cad-pulse-ring{animation:none;opacity:.6;transform:scale(.6)}}.cad-marker-selected,.ponto-selecionado{z-index:2000!important}@media (prefers-reduced-motion: reduce){.custom-leaflet-marker .cad-pt svg{transition:none}}.ui-popup-actions-footer{margin-top:8px;padding-top:6px;border-top:1px solid rgba(255,255,255,.12);display:flex;gap:6px;flex-wrap:wrap}.ui-popup-btn{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;font-size:11px;font-weight:600;border-radius:var(--ui-raio-sm, 4px);border:1px solid rgba(255,255,255,.15);background:#ffffff14;color:#fff;cursor:pointer;line-height:1.2;transition:all .15s ease;-webkit-user-select:none;user-select:none}.ui-popup-btn:hover{background:#ffffff2e;border-color:#ffffff4d}.ui-popup-btn-primary{background:#00f5a0;color:#06130b;border-color:#00f5a0}.ui-popup-btn-primary:hover{background:#10ffad;box-shadow:0 0 8px #00f5a066}.ui-popup-btn-danger{background:#f43f5e33;color:#f43f5e;border-color:#f43f5e66}.ui-popup-btn-danger:hover{background:#f43f5e59;color:#fff}.cad-draw-toolbar{right:auto;left:12px;max-height:calc(100% - 24px);overflow-y:auto}.cad-draw-btn{font:600 11px var(--ui-fonte-base, sans-serif);padding:5px 9px;white-space:nowrap;justify-content:flex-start}.cad-ferramenta-ativa .leaflet-marker-icon{pointer-events:none!important}.cad-aviso{position:absolute;top:12px;left:50%;transform:translate(-50%);z-index:calc(var(--ui-z-workspace-hud, 500) + 1);box-sizing:border-box;max-width:min(calc(100% - 200px),460px);padding:8px 14px;border-radius:var(--ui-raio-borda, 6px);border:1px solid var(--ui-cor-aviso, #f59e0b);background:#0c1510f2;color:var(--ui-cor-texto, #ffffff);font:600 12px var(--ui-fonte-base, sans-serif);line-height:1.35;box-shadow:0 10px 25px -5px #0009;pointer-events:none}.cad-aviso[hidden]{display:none}.cad-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.cad-coordenadas-hud{position:absolute;bottom:8px;right:12px;z-index:var(--ui-z-workspace-hud, 500);display:flex;align-items:center;gap:8px;padding:3px 8px;background:#0a120ee0;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.12);border-radius:var(--ui-raio-sm, 4px);font-family:var(--ui-fonte-codigo, monospace);font-size:11px;color:#ffffffd9;pointer-events:none;-webkit-user-select:none;user-select:none;box-shadow:0 4px 12px #0006}:host([sem-hud-coordenadas]) .cad-coordenadas-hud{display:none!important}.cad-coordenadas-hud .cad-coord-fuso{color:#00f5a0;font-weight:700;padding:1px 4px;background:#00f5a01f;border-radius:2px}.cad-coordenadas-hud .cad-coord-utm{color:#fffffff2;font-weight:500}.cad-coordenadas-hud .cad-coord-geo{color:#fff9;font-size:10px}';
4861
+ function Zn() {
4861
4862
  return `
4862
4863
  <style>
4863
- ${Si}
4864
- ${jn}
4864
+ ${Mi}
4865
+ ${Un}
4865
4866
  </style>
4866
- <div class="cad-root" id="cad-root" role="region" aria-label="Mapa CAD">
4867
- <div class="cad-map-container" id="cad-map-container"></div>
4868
- <div class="qgis-layer-panel collapsed" id="qgis-layer-panel">
4867
+ <div class="cad-root" id="cad-root" part="base" role="region" aria-label="Mapa CAD">
4868
+ <div class="cad-map-container" id="cad-map-container" part="viewport"></div>
4869
+ <div class="qgis-layer-panel collapsed" id="qgis-layer-panel" part="camadas">
4869
4870
  <div class="layer-panel-header">
4870
4871
  <div class="layer-panel-title">
4871
4872
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></svg>
@@ -4901,7 +4902,7 @@ function Hn() {
4901
4902
  </div>
4902
4903
  `;
4903
4904
  }
4904
- function Gn(a, t, e, o) {
4905
+ function Wn(a, t, e, o) {
4905
4906
  if (e !== o) {
4906
4907
  if (t === "sat-opacity") {
4907
4908
  const i = parseFloat(o);
@@ -4929,7 +4930,7 @@ function Gn(a, t, e, o) {
4929
4930
  }
4930
4931
  }
4931
4932
  }
4932
- function fi(a) {
4933
+ function mi(a) {
4933
4934
  const t = a;
4934
4935
  if (!t || !t._leaflet_id) return !1;
4935
4936
  try {
@@ -4939,9 +4940,9 @@ function fi(a) {
4939
4940
  }
4940
4941
  return !0;
4941
4942
  }
4942
- function Un(a) {
4943
+ function Xn(a) {
4943
4944
  if (!a.mapContainer) return;
4944
- if (a.controller.getMap() || fi(a.mapContainer), a.controller.init(a.mapContainer, a.shadow), a.toolbarPainel.vincularEventos(), a.renderLayersUI(), a.host.hasAttribute("modo-sequencial") && (a.controller.modoCliqueSequencialAtivo = !0, a.controller.context.modoSequencial = !0), a.host.hasAttribute("chave-grupo")) {
4945
+ if (a.controller.getMap() || mi(a.mapContainer), a.controller.init(a.mapContainer, a.shadow), a.toolbarPainel.vincularEventos(), a.renderLayersUI(), a.host.hasAttribute("modo-sequencial") && (a.controller.modoCliqueSequencialAtivo = !0, a.controller.context.modoSequencial = !0), a.host.hasAttribute("chave-grupo")) {
4945
4946
  const o = a.host.getAttribute("chave-grupo");
4946
4947
  o && (a.host.chaveGrupo = o);
4947
4948
  }
@@ -4962,7 +4963,7 @@ function Un(a) {
4962
4963
  });
4963
4964
  const t = a.controller.context.onMarkerClick;
4964
4965
  a.controller.context.onMarkerClick = (o, i, n, s) => {
4965
- Fn(
4966
+ Rn(
4966
4967
  a.obterContextoEventos(),
4967
4968
  o,
4968
4969
  i,
@@ -4972,7 +4973,7 @@ function Un(a) {
4972
4973
  a.colecoesDados.customMarkerClickHandler
4973
4974
  );
4974
4975
  }, a.controller.context.onSegmentoClick = (o, i, n) => {
4975
- On(
4976
+ Bn(
4976
4977
  a.obterContextoEventos(),
4977
4978
  o,
4978
4979
  i,
@@ -4988,12 +4989,12 @@ function Un(a) {
4988
4989
  a.invalidateSizeSafely();
4989
4990
  }, 150);
4990
4991
  }
4991
- const Zn = {
4992
+ const Kn = {
4992
4993
  "sem-camada": "Escolha uma camada de desenho antes de usar esta ferramenta.",
4993
4994
  "camada-invalida": "A camada de desenho não é uma camada de feições.",
4994
4995
  "camada-bloqueada": "A camada de desenho está bloqueada.",
4995
4996
  "geometria-invalida": "Não foi possível criar a figura: a geometria é inválida."
4996
- }, Wn = {
4997
+ }, Yn = {
4997
4998
  bloqueada: "Esta feição (ou a camada dela) está bloqueada e não pode ser editada.",
4998
4999
  "poligono-com-furos": "Polígono com furos não pode ser editado no mapa.",
4999
5000
  multiparte: "Feição com várias partes não pode ser editada no mapa.",
@@ -5002,57 +5003,57 @@ const Zn = {
5002
5003
  inexistente: "A feição não existe mais.",
5003
5004
  "sem-selecao": "Selecione uma feição para editar os vértices."
5004
5005
  };
5005
- function mi(a, t, e) {
5006
+ function gi(a, t, e) {
5006
5007
  return typeof t == "string" && Object.prototype.hasOwnProperty.call(a, t) ? a[t] : e;
5007
5008
  }
5008
- function Xn(a) {
5009
- return mi(Zn, a, "Não foi possível ativar a ferramenta de desenho.");
5009
+ function Qn(a) {
5010
+ return gi(Kn, a, "Não foi possível ativar a ferramenta de desenho.");
5010
5011
  }
5011
- function Kn(a) {
5012
- return mi(Wn, a, "Não foi possível editar os vértices desta feição.");
5012
+ function Jn(a) {
5013
+ return gi(Yn, a, "Não foi possível editar os vértices desta feição.");
5013
5014
  }
5014
- function Yn(a) {
5015
+ function ts(a) {
5015
5016
  a.querySelectorAll(".cad-quick-toolbar .cad-btn-tool, .layer-panel-close").forEach((t) => {
5016
5017
  const e = t.getAttribute("title");
5017
5018
  e && !t.hasAttribute("aria-label") && t.setAttribute("aria-label", e);
5018
5019
  });
5019
5020
  }
5020
- function ko(a, t) {
5021
+ function Io(a, t) {
5021
5022
  const e = a.getElementById("btn-toggle-snap");
5022
5023
  e == null || e.classList.toggle("active", t), e == null || e.setAttribute("aria-pressed", String(t));
5023
5024
  }
5024
- function Qn(a) {
5025
+ function es(a) {
5025
5026
  return a <= 0 ? "Nenhuma feição selecionada" : a === 1 ? "1 feição selecionada" : `${a} feições selecionadas`;
5026
5027
  }
5027
- function Jn(a) {
5028
+ function os(a) {
5028
5029
  return a ? `Ferramenta ${a} ativa` : "Ferramenta desativada";
5029
5030
  }
5030
5031
  function Ce(a, t) {
5031
5032
  const e = a.getElementById("cad-status");
5032
5033
  e && e.textContent !== t && (e.textContent = t);
5033
5034
  }
5034
- const ts = 5e3;
5035
- function es(a, t, e) {
5035
+ const is = 5e3;
5036
+ function as(a, t, e) {
5036
5037
  const o = a.getElementById("cad-aviso");
5037
5038
  return o ? (e !== void 0 && window.clearTimeout(e), o.textContent = t, o.hidden = !1, window.setTimeout(() => {
5038
5039
  o.hidden = !0, o.textContent = "";
5039
- }, ts)) : e;
5040
+ }, is)) : e;
5040
5041
  }
5041
- function os(a, t) {
5042
+ function ns(a, t) {
5042
5043
  let e;
5043
5044
  const o = (c) => (l) => {
5044
5045
  var h;
5045
5046
  if (a.hasAttribute("sem-avisos")) return;
5046
5047
  const d = c((h = l.detail) == null ? void 0 : h.motivo);
5047
- Ce(t, d), e = es(t, d, e);
5048
- }, i = o(Xn), n = o(Kn), s = (c) => {
5048
+ Ce(t, d), e = as(t, d, e);
5049
+ }, i = o(Qn), n = o(Jn), s = (c) => {
5049
5050
  var d;
5050
5051
  const l = (d = c.detail) == null ? void 0 : d.feicoes;
5051
- Ce(t, Qn(Array.isArray(l) ? l.length : 0));
5052
+ Ce(t, es(Array.isArray(l) ? l.length : 0));
5052
5053
  }, r = (c) => {
5053
5054
  var d;
5054
5055
  const l = ((d = c.detail) == null ? void 0 : d.ferramenta) ?? null;
5055
- Ce(t, Jn(l));
5056
+ Ce(t, os(l));
5056
5057
  };
5057
5058
  return a.addEventListener("cad-selecao", s), a.addEventListener("cad-ferramenta", r), a.addEventListener("cad-desenho-recusado", i), a.addEventListener("cad-edicao-recusada", n), () => {
5058
5059
  a.removeEventListener("cad-selecao", s), a.removeEventListener("cad-ferramenta", r), a.removeEventListener("cad-desenho-recusado", i), a.removeEventListener("cad-edicao-recusada", n), e !== void 0 && window.clearTimeout(e), e = void 0;
@@ -5072,23 +5073,23 @@ function W(a, t) {
5072
5073
  const i = V(e, o, t);
5073
5074
  return !i || !Number.isFinite(i.lat) || !Number.isFinite(i.lon) ? null : [i.lat, i.lon];
5074
5075
  }
5075
- function is(a, t) {
5076
+ function ss(a, t) {
5076
5077
  return a[0] === t[0] && a[1] === t[1];
5077
5078
  }
5078
- function gi(a, t) {
5079
+ function vi(a, t) {
5079
5080
  const e = a.map((o) => W(o, t)).filter((o) => o !== null);
5080
- return e.length > 1 && is(e[0], e[e.length - 1]) && e.pop(), e.length >= 3 ? e : null;
5081
+ return e.length > 1 && ss(e[0], e[e.length - 1]) && e.pop(), e.length >= 3 ? e : null;
5081
5082
  }
5082
- function Io(a, t) {
5083
+ function To(a, t) {
5083
5084
  const e = a.map((o) => W(o, t)).filter((o) => o !== null);
5084
5085
  return e.length >= 2 ? e : null;
5085
5086
  }
5086
- function as(a, t) {
5087
+ function rs(a, t) {
5087
5088
  if (!Array.isArray(a) || a.length === 0) return null;
5088
- const o = (Array.isArray(a[0]) && Array.isArray(a[0][0]) ? a : [a]).map((i) => gi(i, t));
5089
+ const o = (Array.isArray(a[0]) && Array.isArray(a[0][0]) ? a : [a]).map((i) => vi(i, t));
5089
5090
  return o.some((i) => i === null) ? null : o;
5090
5091
  }
5091
- function Or(a, t) {
5092
+ function Vr(a, t) {
5092
5093
  const e = V(a.lat, a.lon);
5093
5094
  return e ? {
5094
5095
  id: String(a.id),
@@ -5097,7 +5098,7 @@ function Or(a, t) {
5097
5098
  propriedades: { ...a }
5098
5099
  } : null;
5099
5100
  }
5100
- function Nr(a, t, e) {
5101
+ function jr(a, t, e) {
5101
5102
  const o = t.get(String(a.ponto_inicio_id)), i = t.get(String(a.ponto_fim_id));
5102
5103
  if (!o || !i) return null;
5103
5104
  const n = V(o.lat, o.lon), s = V(i.lat, i.lon);
@@ -5111,14 +5112,14 @@ function Nr(a, t, e) {
5111
5112
  propriedades: { ...a }
5112
5113
  };
5113
5114
  }
5114
- function Rr(a, t) {
5115
+ function Hr(a, t) {
5115
5116
  if (!a.poligono_wkt) return null;
5116
5117
  const e = /POLYGON\s*\(\s*\(\s*(.*?)\s*\)\s*\)/i.exec(a.poligono_wkt);
5117
5118
  if (!e) return null;
5118
5119
  const o = e[1].split(",").map((n) => {
5119
5120
  const [s, r] = n.trim().split(/\s+/);
5120
5121
  return [r, s];
5121
- }), i = gi(o);
5122
+ }), i = vi(o);
5122
5123
  return i ? {
5123
5124
  id: String(a.id ?? a.nome ?? ""),
5124
5125
  camadaId: t,
@@ -5126,8 +5127,8 @@ function Rr(a, t) {
5126
5127
  propriedades: { nome: a.nome, nome_propriedade: a.nome_propriedade }
5127
5128
  } : null;
5128
5129
  }
5129
- function To(a, t) {
5130
- const e = Oi(a);
5130
+ function Do(a, t) {
5131
+ const e = Ni(a);
5131
5132
  if (!e) return null;
5132
5133
  const o = [];
5133
5134
  for (const i of e) {
@@ -5138,11 +5139,11 @@ function To(a, t) {
5138
5139
  }
5139
5140
  return o;
5140
5141
  }
5141
- const ns = /* @__PURE__ */ new Set(["Point", "LineString", "Polygon", "Circle", "Text"]);
5142
+ const cs = /* @__PURE__ */ new Set(["Point", "LineString", "Polygon", "Circle", "Text"]);
5142
5143
  function Se(a, t, e) {
5143
5144
  if (!a || typeof a != "object") return null;
5144
5145
  const o = a, i = o.geometria;
5145
- if (!i || !ns.has(i.tipo) || o.id === void 0 || o.id === null || o.id === "") return null;
5146
+ if (!i || !cs.has(i.tipo) || o.id === void 0 || o.id === null || o.id === "") return null;
5146
5147
  let n = null;
5147
5148
  switch (i.tipo) {
5148
5149
  case "Point": {
@@ -5156,21 +5157,21 @@ function Se(a, t, e) {
5156
5157
  break;
5157
5158
  }
5158
5159
  case "LineString": {
5159
- const r = Array.isArray(i.partes) ? i.partes.map((l) => Array.isArray(l) ? Io(l, e) : null).filter((l) => l !== null) : [];
5160
+ const r = Array.isArray(i.partes) ? i.partes.map((l) => Array.isArray(l) ? To(l, e) : null).filter((l) => l !== null) : [];
5160
5161
  if (r.length > 0)
5161
5162
  n = Kt(r);
5162
5163
  else {
5163
- const l = Array.isArray(i.coordenadas) ? Io(i.coordenadas, e) : null;
5164
+ const l = Array.isArray(i.coordenadas) ? To(i.coordenadas, e) : null;
5164
5165
  l && (n = Kt([l]));
5165
5166
  }
5166
- const c = r.length <= 1 ? To(i.curva, e) : null;
5167
+ const c = r.length <= 1 ? Do(i.curva, e) : null;
5167
5168
  n && n.tipo === "LineString" && c && c.length >= 2 && (n = { tipo: "LineString", coordenadas: Lt(c, !1), curva: c });
5168
5169
  break;
5169
5170
  }
5170
5171
  case "Polygon": {
5171
- const r = Array.isArray(i.aneis) ? as(i.aneis, e) : null;
5172
+ const r = Array.isArray(i.aneis) ? rs(i.aneis, e) : null;
5172
5173
  r && (n = { tipo: "Polygon", aneis: r });
5173
- const c = r && r.length === 1 ? To(i.curva, e) : null;
5174
+ const c = r && r.length === 1 ? Do(i.curva, e) : null;
5174
5175
  n && c && c.length >= 3 && (n = { tipo: "Polygon", aneis: [Lt(c, !0)], curva: c });
5175
5176
  break;
5176
5177
  }
@@ -5193,18 +5194,18 @@ function Se(a, t, e) {
5193
5194
  };
5194
5195
  return o.oculta && (s.oculta = !0), (typeof o.entidadeId == "string" || typeof o.entidadeId == "number") && (s.entidadeId = String(o.entidadeId)), s.status = mt({ ...s, status: o.status }), s;
5195
5196
  }
5196
- const Me = "cad-cursores", ss = /^#[0-9a-f]{3,8}$/i, rs = "#94a3b8";
5197
+ const Me = "cad-cursores", ls = /^#[0-9a-f]{3,8}$/i, ds = "#94a3b8";
5197
5198
  function He(a) {
5198
- return typeof a == "string" && ss.test(a.trim()) ? a.trim() : rs;
5199
+ return typeof a == "string" && ls.test(a.trim()) ? a.trim() : ds;
5199
5200
  }
5200
- const cs = '<svg width="18" height="18" viewBox="0 0 24 24" style="display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))"><path d="M3 2 L3 19 L8 14.5 L11.5 22 L14.5 20.5 L11 13.5 L18 13 Z" fill="currentColor" stroke="#fff" stroke-width="1.2" stroke-linejoin="round"/></svg>';
5201
+ const hs = '<svg width="18" height="18" viewBox="0 0 24 24" style="display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))"><path d="M3 2 L3 19 L8 14.5 L11.5 22 L14.5 20.5 L11 13.5 L18 13 Z" fill="currentColor" stroke="#fff" stroke-width="1.2" stroke-linejoin="round"/></svg>';
5201
5202
  function _o(a) {
5202
5203
  const t = document.createElement("div");
5203
- t.style.cssText = `color:${He(a.cor)};position:relative;pointer-events:none`, t.innerHTML = cs;
5204
+ t.style.cssText = `color:${He(a.cor)};position:relative;pointer-events:none`, t.innerHTML = hs;
5204
5205
  const e = document.createElement("span");
5205
5206
  return e.textContent = String(a.nome ?? a.id), e.style.cssText = `position:absolute;left:16px;top:14px;white-space:nowrap;font:600 11px sans-serif;color:#fff;background:${He(a.cor)};padding:1px 5px;border-radius:3px;max-width:160px;overflow:hidden;text-overflow:ellipsis`, t.appendChild(e), y.divIcon({ className: "custom-leaflet-marker cad-cursor-remoto", iconSize: [18, 18], iconAnchor: [3, 2], html: t });
5206
5207
  }
5207
- class ls {
5208
+ class us {
5208
5209
  constructor(t) {
5209
5210
  f(this, "marcadores", /* @__PURE__ */ new Map());
5210
5211
  this.obterMapa = t;
@@ -5232,7 +5233,7 @@ class ls {
5232
5233
  }
5233
5234
  }
5234
5235
  const At = (a) => `${a.camadaId}\0${a.id}`;
5235
- class ds {
5236
+ class ps {
5236
5237
  constructor(t) {
5237
5238
  f(this, "itens", /* @__PURE__ */ new Map());
5238
5239
  this.dep = t;
@@ -5319,13 +5320,13 @@ class ds {
5319
5320
  this.dep.aoSelecionar(o), o.length <= 1 && this.dep.aoSelecionarUma(o[0] ?? null);
5320
5321
  }
5321
5322
  }
5322
- const hs = {
5323
+ const fs = {
5323
5324
  Point: "Ponto",
5324
5325
  LineString: "Linha",
5325
5326
  Polygon: "Polígono",
5326
5327
  Circle: "Círculo",
5327
5328
  Text: "Texto"
5328
- }, us = /* @__PURE__ */ new Set([
5329
+ }, ms = /* @__PURE__ */ new Set([
5329
5330
  "name",
5330
5331
  "nome",
5331
5332
  "category",
@@ -5338,7 +5339,7 @@ const hs = {
5338
5339
  "data",
5339
5340
  "created_at",
5340
5341
  "criadoEm"
5341
- ]), Do = 6;
5342
+ ]), qo = 6;
5342
5343
  function wt(a, t) {
5343
5344
  var e;
5344
5345
  for (const o of t) {
@@ -5347,11 +5348,11 @@ function wt(a, t) {
5347
5348
  }
5348
5349
  return "";
5349
5350
  }
5350
- function ps(a) {
5351
+ function gs(a) {
5351
5352
  const t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(a), e = t ? new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3])) : new Date(a);
5352
5353
  return Number.isNaN(e.getTime()) ? a : e.toLocaleDateString("pt-BR");
5353
5354
  }
5354
- function fs(a) {
5355
+ function vs(a) {
5355
5356
  const t = typeof a == "object" ? JSON.stringify(a) : String(a);
5356
5357
  return t.length > 80 ? `${t.slice(0, 77)}...` : t;
5357
5358
  }
@@ -5371,7 +5372,7 @@ function ae(a) {
5371
5372
  }
5372
5373
  }
5373
5374
  }
5374
- function ms(a) {
5375
+ function ys(a) {
5375
5376
  const t = a.geometria, e = [], o = dt(t), i = ht(t);
5376
5377
  if (t.tipo === "Polygon")
5377
5378
  e.push(["Área", Ct(o ?? 0)], ["Perímetro", Z(i ?? 0)]), e.push(["Vértices", String(t.aneis.reduce((r, c) => r + c.length, 0))]);
@@ -5382,7 +5383,7 @@ function ms(a) {
5382
5383
  const [n, s] = ae(a);
5383
5384
  return e.push(["Coordenadas", `${n.toFixed(6)}, ${s.toFixed(6)}`]), e;
5384
5385
  }
5385
- class gs {
5386
+ class bs {
5386
5387
  constructor(t) {
5387
5388
  f(this, "popup", null);
5388
5389
  f(this, "feicaoAtual", null);
@@ -5426,7 +5427,7 @@ class gs {
5426
5427
  return M && (C.style.cssText = M), w !== void 0 && (C.textContent = w), C;
5427
5428
  }, n = i("div", "font-family:var(--ui-fonte-base,sans-serif);color:rgba(255,255,255,.9);line-height:1.35;min-width:200px;border-left:3px solid " + o + ";padding-left:8px");
5428
5429
  n.className = "cad-feicao-popup", n.appendChild(i("div", "font-weight:700;font-size:13px;margin-bottom:1px", wt(t, ["name", "nome"]) || t.id));
5429
- const s = wt(t, ["category", "categoria"]), r = [hs[t.geometria.tipo], (e == null ? void 0 : e.nome) ?? t.camadaId, s].filter(Boolean).join(" · ");
5430
+ const s = wt(t, ["category", "categoria"]), r = [fs[t.geometria.tipo], (e == null ? void 0 : e.nome) ?? t.camadaId, s].filter(Boolean).join(" · ");
5430
5431
  n.appendChild(i("div", "font-size:11px;color:rgba(255,255,255,.6);margin-bottom:4px", r));
5431
5432
  const c = wt(t, ["description", "descricao"]);
5432
5433
  c && n.appendChild(i("div", "font-size:11px;margin-bottom:4px", c));
@@ -5438,12 +5439,12 @@ class gs {
5438
5439
  }
5439
5440
  return M;
5440
5441
  };
5441
- n.appendChild(l(ms(t)));
5442
- const d = Object.entries(t.propriedades ?? {}).filter(([v, M]) => !us.has(v) && M !== void 0 && M !== null && M !== "");
5443
- d.length > 0 && (n.appendChild(l(d.slice(0, Do).map(([v, M]) => [v, fs(M)]))), d.length > Do && n.appendChild(i("div", "font-size:10px;color:rgba(255,255,255,.55);margin-bottom:4px", `${d.length} atributos`)));
5442
+ n.appendChild(l(ys(t)));
5443
+ const d = Object.entries(t.propriedades ?? {}).filter(([v, M]) => !ms.has(v) && M !== void 0 && M !== null && M !== "");
5444
+ d.length > 0 && (n.appendChild(l(d.slice(0, qo).map(([v, M]) => [v, vs(M)]))), d.length > qo && n.appendChild(i("div", "font-size:10px;color:rgba(255,255,255,.55);margin-bottom:4px", `${d.length} atributos`)));
5444
5445
  const h = wt(t, ["author", "autor"]), u = wt(t, ["date", "data", "created_at", "criadoEm"]);
5445
5446
  if (h || u) {
5446
- const v = [h, u ? ps(u) : ""].filter(Boolean).join(" · ");
5447
+ const v = [h, u ? gs(u) : ""].filter(Boolean).join(" · ");
5447
5448
  n.appendChild(i("div", "font-size:10px;color:rgba(255,255,255,.55);margin-bottom:4px", v));
5448
5449
  }
5449
5450
  const m = i("div", "display:flex;gap:4px;flex-wrap:wrap;margin-top:6px"), g = [["inspecionar", "Inspecionar"], ["zoom", "Zoom"]];
@@ -5457,7 +5458,7 @@ class gs {
5457
5458
  return n.appendChild(m), n;
5458
5459
  }
5459
5460
  }
5460
- class vs {
5461
+ class xs {
5461
5462
  constructor(t) {
5462
5463
  f(this, "_ligado", !0);
5463
5464
  f(this, "_altSegurado", !1);
@@ -5514,7 +5515,7 @@ class vs {
5514
5515
  }
5515
5516
  }
5516
5517
  const H = "feicoes";
5517
- class ys {
5518
+ class Ps {
5518
5519
  constructor(t) {
5519
5520
  this.p = t;
5520
5521
  }
@@ -5539,7 +5540,7 @@ class ys {
5539
5540
  let c = !1;
5540
5541
  for (const l of r) {
5541
5542
  if (l.geometria.tipo !== "Polygon") continue;
5542
- const d = xa(l.geometria.aneis[0], t);
5543
+ const d = Ca(l.geometria.aneis[0], t);
5543
5544
  if (!d) continue;
5544
5545
  this.p.divisaoAtiva() && this.p.estaSelecionada({ camadaId: l.camadaId, id: l.id }) && this.p.encerrarDesenho(), this.p.removerFeicao(l.camadaId, l.id);
5545
5546
  const h = [];
@@ -5559,7 +5560,7 @@ class ys {
5559
5560
  gerarBuffer(t, e, o, i = {}) {
5560
5561
  const n = this.p.buscar(t, e);
5561
5562
  if (!n) return null;
5562
- const s = Aa(n.geometria, o);
5563
+ const s = Ea(n.geometria, o);
5563
5564
  if (!s) return null;
5564
5565
  const r = i.camadaDestino ?? t, c = this.p.adicionarFeicao(r, {
5565
5566
  id: i.id ?? this.p.idLivre(r, `${e}-buffer`),
@@ -5573,7 +5574,7 @@ class ys {
5573
5574
  duplicarFeicao(t, e, o = {}, i = {}) {
5574
5575
  const n = this.p.buscar(t, e);
5575
5576
  if (!n) return null;
5576
- const s = wa(n.geometria, o.lesteM ?? 0, o.norteM ?? 0), r = this.p.adicionarFeicao(t, me(n, i.id ?? this.p.idLivre(t, `${e}-copia`), s));
5577
+ const s = ka(n.geometria, o.lesteM ?? 0, o.norteM ?? 0), r = this.p.adicionarFeicao(t, me(n, i.id ?? this.p.idLivre(t, `${e}-copia`), s));
5577
5578
  return r && this.p.emitir("cad-feicao-criada", { camadaId: t, feicao: r }), r;
5578
5579
  }
5579
5580
  /**
@@ -5595,12 +5596,12 @@ class ys {
5595
5596
  let l = null;
5596
5597
  if (s.every((h) => h.geometria.tipo === "LineString")) {
5597
5598
  if (s.some((m) => Xt(m.geometria))) return i("multiparte");
5598
- const h = s.map((m) => m.geometria.coordenadas), u = Pa(h, c);
5599
+ const h = s.map((m) => m.geometria.coordenadas), u = Sa(h, c);
5599
5600
  u && (l = Kt([u]));
5600
5601
  } else if (s.every((h) => h.geometria.tipo === "Polygon" && h.geometria.aneis.length === 1)) {
5601
5602
  let h = s[0].geometria.aneis[0];
5602
5603
  for (const u of s.slice(1))
5603
- h = h ? Sa(h, u.geometria.aneis[0], c) : null;
5604
+ h = h ? wa(h, u.geometria.aneis[0], c) : null;
5604
5605
  h && (l = { tipo: "Polygon", aneis: [h] });
5605
5606
  } else
5606
5607
  return i("tipos-incompativeis");
@@ -5614,7 +5615,7 @@ class ys {
5614
5615
  return this.p.emitir("cad-feicao-unida", { origens: s, resultado: d }), d;
5615
5616
  }
5616
5617
  }
5617
- class bs {
5618
+ class Ls {
5618
5619
  constructor(t, e) {
5619
5620
  f(this, "cacheOficiais", /* @__PURE__ */ new WeakMap());
5620
5621
  this.p = t, this.regra = e;
@@ -5674,14 +5675,14 @@ class bs {
5674
5675
  }
5675
5676
  }
5676
5677
  }
5677
- class xs {
5678
+ class Cs {
5678
5679
  constructor(t) {
5679
5680
  this.p = t;
5680
5681
  }
5681
5682
  limitesDe(t) {
5682
5683
  let e = 1 / 0, o = 1 / 0, i = -1 / 0, n = -1 / 0;
5683
5684
  for (const s of t) {
5684
- const [[r, c], [l, d]] = Ni(s.geometria);
5685
+ const [[r, c], [l, d]] = Ri(s.geometria);
5685
5686
  r < e && (e = r), c < o && (o = c), l > i && (i = l), d > n && (n = d);
5686
5687
  }
5687
5688
  return Number.isFinite(e) ? [[e, o], [i, n]] : null;
@@ -5716,23 +5717,23 @@ class xs {
5716
5717
  return !o || o.tipo !== H ? !1 : (o.visivel || e.setLayerVisibility(t, !0), this.enquadrar(this.p.lista(t).filter((i) => this.p.desenhada(i))));
5717
5718
  }
5718
5719
  }
5719
- const qo = 36, Ps = 0.45;
5720
- function Ls(a, t) {
5720
+ const $o = 36, Ss = 0.45;
5721
+ function Ms(a, t) {
5721
5722
  const e = Math.abs(t[0] - a[0]), o = Math.abs(t[1] - a[1]);
5722
5723
  if (e === 0 && o === 0) return null;
5723
5724
  const i = [];
5724
- for (let n = 0; n < qo; n++) {
5725
- const s = n * 2 * Math.PI / qo;
5725
+ for (let n = 0; n < $o; n++) {
5726
+ const s = n * 2 * Math.PI / $o;
5726
5727
  i.push([a[0] + e * Math.sin(s), a[1] + o * Math.cos(s)]);
5727
5728
  }
5728
5729
  return i;
5729
5730
  }
5730
- function vi(a, t) {
5731
+ function yi(a, t) {
5731
5732
  const e = Math.cos(a[0] * Math.PI / 180) || 1, o = t[0] - a[0], i = (t[1] - a[1]) * e, n = Math.hypot(o, i);
5732
5733
  return n === 0 ? null : { raio: n, inicio: Math.atan2(o, i), cosLat: e };
5733
5734
  }
5734
- function Cs(a, t, e = 6) {
5735
- const o = vi(a, t);
5735
+ function As(a, t, e = 6) {
5736
+ const o = yi(a, t);
5736
5737
  if (!o || e < 3) return null;
5737
5738
  const i = [];
5738
5739
  for (let n = 0; n < e; n++) {
@@ -5741,12 +5742,12 @@ function Cs(a, t, e = 6) {
5741
5742
  }
5742
5743
  return i;
5743
5744
  }
5744
- function Ss(a, t, e = 5) {
5745
- const o = vi(a, t);
5745
+ function ws(a, t, e = 5) {
5746
+ const o = yi(a, t);
5746
5747
  if (!o || e < 3) return null;
5747
5748
  const i = e * 2, n = [];
5748
5749
  for (let s = 0; s < i; s++) {
5749
- const r = s % 2 === 0 ? o.raio : o.raio * Ps, c = o.inicio + s * 2 * Math.PI / i;
5750
+ const r = s % 2 === 0 ? o.raio : o.raio * Ss, c = o.inicio + s * 2 * Math.PI / i;
5750
5751
  n.push([a[0] + r * Math.sin(c), a[1] + r * Math.cos(c) / o.cosLat]);
5751
5752
  }
5752
5753
  return n;
@@ -5768,7 +5769,7 @@ const Ge = [
5768
5769
  "selecao-laco",
5769
5770
  "conta-gotas"
5770
5771
  ], Ae = 2;
5771
- function yi(a) {
5772
+ function bi(a) {
5772
5773
  return typeof a == "string" && Ge.includes(a);
5773
5774
  }
5774
5775
  function ne(a) {
@@ -5780,11 +5781,11 @@ function Gt(a) {
5780
5781
  return t.alca ? (e.saida = t.alca, e.entrada = ne(t)) : t.entrada && (e.entrada = t.entrada), e;
5781
5782
  });
5782
5783
  }
5783
- function Ms(a) {
5784
+ function zs(a) {
5784
5785
  return Lt(Gt(a), !1);
5785
5786
  }
5786
5787
  function we(a, t) {
5787
- const e = Ri(a);
5788
+ const e = Bi(a);
5788
5789
  if (t) {
5789
5790
  const i = e ? Lt(a, !0) : a.map((n) => n.ponto);
5790
5791
  return e ? { tipo: "Polygon", aneis: [i], curva: a } : { tipo: "Polygon", aneis: [i] };
@@ -5792,10 +5793,10 @@ function we(a, t) {
5792
5793
  const o = e ? Lt(a, !1) : a.map((i) => i.ponto);
5793
5794
  return e ? { tipo: "LineString", coordenadas: o, curva: a } : { tipo: "LineString", coordenadas: o };
5794
5795
  }
5795
- const As = (a, t) => a[0] === t[0] && a[1] === t[1], $o = {
5796
- elipse: Ls,
5797
- "poligono-regular": (a, t) => Cs(a, t, 6),
5798
- estrela: (a, t) => Ss(a, t, 5)
5796
+ const Es = (a, t) => a[0] === t[0] && a[1] === t[1], Fo = {
5797
+ elipse: Ms,
5798
+ "poligono-regular": (a, t) => As(a, t, 6),
5799
+ estrela: (a, t) => ws(a, t, 5)
5799
5800
  };
5800
5801
  class ze {
5801
5802
  constructor(t, e = !1) {
@@ -5858,7 +5859,7 @@ class ze {
5858
5859
  case "estrela": {
5859
5860
  if (this.pontos.length === 0)
5860
5861
  return this.pontos.push(t), {};
5861
- const e = $o[this.ferramenta](this.pontos[0], t);
5862
+ const e = Fo[this.ferramenta](this.pontos[0], t);
5862
5863
  return e ? { concluida: { tipo: "Polygon", aneis: [e] } } : { aviso: "Clique num ponto diferente do centro." };
5863
5864
  }
5864
5865
  case "caneta":
@@ -5866,7 +5867,7 @@ class ze {
5866
5867
  case "conta-gotas":
5867
5868
  return {};
5868
5869
  default:
5869
- return this.pontos.length > 0 && As(this.pontos[this.pontos.length - 1], t) ? {} : (this.pontos.push(t), {});
5870
+ return this.pontos.length > 0 && Es(this.pontos[this.pontos.length - 1], t) ? {} : (this.pontos.push(t), {});
5870
5871
  }
5871
5872
  }
5872
5873
  /** Caneta: arrastar logo após colocar a âncora define a alça de saída (a de entrada é o espelho). */
@@ -5895,7 +5896,7 @@ class ze {
5895
5896
  }
5896
5897
  /** Vértices da linha/anel em construção, incluindo a curva da caneta. */
5897
5898
  vertices() {
5898
- return this.ferramenta === "caneta" ? Ms(this.ancoras) : this.pontos;
5899
+ return this.ferramenta === "caneta" ? zs(this.ancoras) : this.pontos;
5899
5900
  }
5900
5901
  retangulo(t, e) {
5901
5902
  return t[0] === e[0] || t[1] === e[1] ? null : { tipo: "Polygon", aneis: [[[t[0], t[1]], [t[0], e[1]], [e[0], e[1]], [e[0], t[1]]]] };
@@ -5920,7 +5921,7 @@ class ze {
5920
5921
  case "poligono-regular":
5921
5922
  case "estrela": {
5922
5923
  if (this.pontos.length !== 1 || !t) return null;
5923
- const e = $o[this.ferramenta](this.pontos[0], t);
5924
+ const e = Fo[this.ferramenta](this.pontos[0], t);
5924
5925
  return e ? { tipo: "Polygon", aneis: [e] } : null;
5925
5926
  }
5926
5927
  case "ponto":
@@ -5947,31 +5948,31 @@ class ze {
5947
5948
  /** Medida em andamento: comprimento (linha) ou comprimento do contorno (área), em metros. */
5948
5949
  comprimentoMetros() {
5949
5950
  const t = this.cursor && this.nos > 0 ? [...this.vertices(), this.cursor] : this.vertices();
5950
- return Go(t, !1);
5951
+ return Uo(t, !1);
5951
5952
  }
5952
5953
  }
5953
- const ws = { topo: 0, base: 16, esquerda: 0, direita: 0 }, zs = 16, Es = 0.92, Ee = {
5954
+ const ks = { topo: 0, base: 16, esquerda: 0, direita: 0 }, Is = 16, Ts = 0.92, Ee = {
5954
5955
  topo: "--cad-hud-topo",
5955
5956
  base: "--cad-hud-base",
5956
5957
  esquerda: "--cad-hud-esquerda",
5957
5958
  direita: "--cad-hud-direita"
5958
- }, bi = "position:absolute;box-sizing:border-box;z-index:10000;left:calc(var(--cad-hud-esquerda,0px) + (100% - var(--cad-hud-esquerda,0px) - var(--cad-hud-direita,0px)) / 2);bottom:var(--cad-hud-base,16px);transform:translateX(-50%);width:max-content;max-width:min(92%, calc(100% - var(--cad-hud-esquerda,0px) - var(--cad-hud-direita,0px) - 16px));max-height:calc(100% - var(--cad-hud-topo,0px) - var(--cad-hud-base,16px) - 8px);overflow:hidden;display:flex;flex-wrap:wrap;";
5959
- function Br(a, t, e = {}) {
5960
- const o = { ...ws, ...e }, i = Math.max(0, a - o.esquerda - o.direita);
5959
+ }, xi = "position:absolute;box-sizing:border-box;z-index:10000;left:calc(var(--cad-hud-esquerda,0px) + (100% - var(--cad-hud-esquerda,0px) - var(--cad-hud-direita,0px)) / 2);bottom:var(--cad-hud-base,16px);transform:translateX(-50%);width:max-content;max-width:min(92%, calc(100% - var(--cad-hud-esquerda,0px) - var(--cad-hud-direita,0px) - 16px));max-height:calc(100% - var(--cad-hud-topo,0px) - var(--cad-hud-base,16px) - 8px);overflow:hidden;display:flex;flex-wrap:wrap;";
5960
+ function Gr(a, t, e = {}) {
5961
+ const o = { ...ks, ...e }, i = Math.max(0, a - o.esquerda - o.direita);
5961
5962
  return {
5962
5963
  centroX: o.esquerda + i / 2,
5963
5964
  base: o.base,
5964
- larguraMax: Math.max(0, Math.min(a * Es, i - zs)),
5965
+ larguraMax: Math.max(0, Math.min(a * Ts, i - Is)),
5965
5966
  alturaMax: Math.max(0, t - o.topo - o.base - 8)
5966
5967
  };
5967
5968
  }
5968
- function ks(a, t) {
5969
+ function Ds(a, t) {
5969
5970
  for (const e of Object.keys(Ee)) {
5970
5971
  const o = t[e];
5971
5972
  typeof o == "number" && Number.isFinite(o) && o >= 0 ? a.style.setProperty(Ee[e], `${o}px`) : a.style.removeProperty(Ee[e]);
5972
5973
  }
5973
5974
  }
5974
- const Is = "cm-draw-hud", Fo = "cad-ferramenta-ativa", J = "cad-desenho", nt = "#22d3ee", Ts = 4, _s = 450, Ds = 10, qs = 8, $s = 2500, Fs = {
5975
+ const _s = "cm-draw-hud", Oo = "cad-ferramenta-ativa", J = "cad-desenho", nt = "#22d3ee", qs = 4, $s = 450, Fs = 10, Os = 8, Ns = 2500, Rs = {
5975
5976
  ponto: "Ponto",
5976
5977
  linha: "Linha",
5977
5978
  poligono: "Polígono",
@@ -5987,7 +5988,7 @@ const Is = "cm-draw-hud", Fo = "cad-ferramenta-ativa", J = "cad-desenho", nt = "
5987
5988
  dividir: "Dividir polígono",
5988
5989
  "selecao-laco": "Seleção por laço",
5989
5990
  "conta-gotas": "Conta-gotas"
5990
- }, Os = {
5991
+ }, Bs = {
5991
5992
  ponto: "Clique para colocar",
5992
5993
  linha: "Clique nos vértices · Enter ou duplo clique conclui",
5993
5994
  poligono: "Clique nos vértices · Enter ou duplo clique conclui",
@@ -6004,7 +6005,7 @@ const Is = "cm-draw-hud", Fo = "cad-ferramenta-ativa", J = "cad-desenho", nt = "
6004
6005
  "selecao-laco": "Desenhe o laço · Enter ou 1º ponto fecha e seleciona",
6005
6006
  "conta-gotas": "Clique numa feição para copiar o estilo"
6006
6007
  };
6007
- class Ns {
6008
+ class Vs {
6008
6009
  constructor(t) {
6009
6010
  f(this, "sessao", null);
6010
6011
  f(this, "fechar", !1);
@@ -6102,7 +6103,7 @@ class Ns {
6102
6103
  const i = this.dep.map;
6103
6104
  this.fechar = !!e.fechar, this.sessao = new ze(t, this.fechar), i.getPane(J) || (i.createPane(J).style.zIndex = "8500"), this.grupo = y.layerGroup().addTo(i), this.marcas = y.layerGroup().addTo(this.grupo);
6104
6105
  const n = i.getContainer();
6105
- n.classList.add(Fo), n.style.cursor = t === "conta-gotas" ? "copy" : "crosshair", i.on("click", this.aoClicar), i.on("dblclick", this.aoDuploClique), i.on("mousemove", this.aoMover), i.on("mousedown", this.aoPressionar), window.addEventListener("mouseup", this.aoSoltar), window.addEventListener("keydown", this.aoTecla), this.montarHud(), this.atualizar();
6106
+ n.classList.add(Oo), n.style.cursor = t === "conta-gotas" ? "copy" : "crosshair", i.on("click", this.aoClicar), i.on("dblclick", this.aoDuploClique), i.on("mousemove", this.aoMover), i.on("mousedown", this.aoPressionar), window.addEventListener("mouseup", this.aoSoltar), window.addEventListener("keydown", this.aoTecla), this.montarHud(), this.atualizar();
6106
6107
  }
6107
6108
  /** Desliga a ferramenta ativa (idempotente). A medição pronta continua na tela. */
6108
6109
  desativar() {
@@ -6119,7 +6120,7 @@ class Ns {
6119
6120
  const t = this.dep.map;
6120
6121
  t.off("click", this.aoClicar), t.off("dblclick", this.aoDuploClique), t.off("mousemove", this.aoMover), t.off("mousedown", this.aoPressionar), window.removeEventListener("mouseup", this.aoSoltar), window.removeEventListener("keydown", this.aoTecla);
6121
6122
  const e = t.getContainer();
6122
- e.classList.remove(Fo), e.style.cursor = "", (o = this.grupo) == null || o.remove(), this.grupo = null, this.previa = null, this.marcas = null, this.marcadorSnap = null, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = null, (i = this.hud) == null || i.remove(), this.hud = null, this.campoTexto = null, this.sessao = null, this.arrastando = null, this.ultimoClique = null;
6123
+ e.classList.remove(Oo), e.style.cursor = "", (o = this.grupo) == null || o.remove(), this.grupo = null, this.previa = null, this.marcas = null, this.marcadorSnap = null, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = null, (i = this.hud) == null || i.remove(), this.hud = null, this.campoTexto = null, this.sessao = null, this.arrastando = null, this.ultimoClique = null;
6123
6124
  }
6124
6125
  // ---- entrada ----
6125
6126
  coordenada(t) {
@@ -6130,7 +6131,7 @@ class Ns {
6130
6131
  return o ? (this.mostrarSnap(o.coordenada), o.coordenada) : (this.esconderSnap(), e);
6131
6132
  }
6132
6133
  repetido(t) {
6133
- const e = this.ultimoClique, o = Date.now(), i = t.containerPoint, n = !!e && Math.hypot(e.x - i.x, e.y - i.y) <= Ts && o - e.t <= _s;
6134
+ const e = this.ultimoClique, o = Date.now(), i = t.containerPoint, n = !!e && Math.hypot(e.x - i.x, e.y - i.y) <= qs && o - e.t <= $s;
6134
6135
  return this.ultimoClique = { x: i.x, y: i.y, t: o }, n;
6135
6136
  }
6136
6137
  /** Com 3+ vértices, um clique perto do primeiro fecha a figura em polígono. */
@@ -6138,7 +6139,7 @@ class Ns {
6138
6139
  const e = this.sessao, o = e == null ? void 0 : e.primeiro;
6139
6140
  if (!e || !o || !e.fechaNoPrimeiro) return !1;
6140
6141
  const i = this.dep.map.latLngToContainerPoint(o);
6141
- if (Math.hypot(i.x - t.containerPoint.x, i.y - t.containerPoint.y) > Ds) return !1;
6142
+ if (Math.hypot(i.x - t.containerPoint.x, i.y - t.containerPoint.y) > Fs) return !1;
6142
6143
  const n = e.concluirFechando();
6143
6144
  return n && this.finalizar(n), !!n;
6144
6145
  }
@@ -6148,7 +6149,7 @@ class Ns {
6148
6149
  if (!e) return null;
6149
6150
  const o = this.dep.map, i = (n) => {
6150
6151
  const s = o.latLngToContainerPoint(n);
6151
- return Math.hypot(s.x - t.containerPoint.x, s.y - t.containerPoint.y) <= qs;
6152
+ return Math.hypot(s.x - t.containerPoint.x, s.y - t.containerPoint.y) <= Os;
6152
6153
  };
6153
6154
  for (let n = e.ancoras.length - 1; n >= 0; n--) {
6154
6155
  const s = e.ancoras[n];
@@ -6174,7 +6175,7 @@ class Ns {
6174
6175
  const e = (o = this.hud) == null ? void 0 : o.querySelector('[data-campo="aviso"]');
6175
6176
  e && (e.textContent = t, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = setTimeout(() => {
6176
6177
  e.textContent = "", this.avisoTimer = null;
6177
- }, $s));
6178
+ }, Ns));
6178
6179
  }
6179
6180
  /**
6180
6181
  * Botão direito com a ferramenta ativa: conclui se já dá figura; senão desfaz o último vértice;
@@ -6275,7 +6276,7 @@ class Ns {
6275
6276
  const c = {
6276
6277
  tipo: e === "medir-area" ? "area" : "distancia",
6277
6278
  pontos: i,
6278
- comprimentoM: Go(i, !1)
6279
+ comprimentoM: Uo(i, !1)
6279
6280
  };
6280
6281
  if (t.tipo === "Polygon")
6281
6282
  c.areaM2 = dt(t) ?? 0, c.perimetroM = ht(t) ?? 0;
@@ -6307,14 +6308,14 @@ class Ns {
6307
6308
  const t = this.sessao;
6308
6309
  if (!t) return;
6309
6310
  const e = document.createElement("div");
6310
- e.id = Is, e.style.cssText = bi + "gap:10px;align-items:center;padding:6px 12px;border-radius:8px;background:rgba(15,23,42,.92);color:#fff;font:12px var(--ui-fonte-base,sans-serif);border:1px solid rgba(255,255,255,.2);pointer-events:auto";
6311
+ e.id = _s, e.style.cssText = xi + "gap:10px;align-items:center;padding:6px 12px;border-radius:8px;background:rgba(15,23,42,.92);color:#fff;font:12px var(--ui-fonte-base,sans-serif);border:1px solid rgba(255,255,255,.2);pointer-events:auto";
6311
6312
  const o = (c) => {
6312
6313
  const l = document.createElement("span");
6313
6314
  return l.dataset.campo = c, l;
6314
6315
  }, i = document.createElement("strong");
6315
- i.textContent = Fs[t.ferramenta];
6316
+ i.textContent = Rs[t.ferramenta];
6316
6317
  const n = o("dica");
6317
- n.style.opacity = ".7", n.textContent = Os[t.ferramenta];
6318
+ n.style.opacity = ".7", n.textContent = Bs[t.ferramenta];
6318
6319
  const s = (c, l, d = !1) => {
6319
6320
  const h = document.createElement("button");
6320
6321
  return h.type = "button", h.textContent = c, h.style.cssText = `padding:3px 10px;border-radius:4px;border:1px solid ${d ? nt : "rgba(255,255,255,.3)"};background:${d ? nt : "transparent"};color:${d ? "#111" : "#fff"};cursor:pointer;font-weight:600`, h.addEventListener("click", l), h;
@@ -6348,8 +6349,8 @@ class Ns {
6348
6349
  (e = this.sessao) == null || e.mover(t), this.atualizar();
6349
6350
  }
6350
6351
  }
6351
- const Rs = ["tipoLinha", "escalaTipoLinha", "deslocamentoTracejado", "opacidadeTraco", "terminacaoTraco", "juncaoTraco"], Bs = /* @__PURE__ */ new Set(["ponto", "linha", "poligono", "retangulo", "elipse", "poligono-regular", "estrela", "circulo", "texto", "caneta"]);
6352
- class Vs {
6352
+ const js = ["tipoLinha", "escalaTipoLinha", "deslocamentoTracejado", "opacidadeTraco", "terminacaoTraco", "juncaoTraco"], Hs = /* @__PURE__ */ new Set(["ponto", "linha", "poligono", "retangulo", "elipse", "poligono-regular", "estrela", "circulo", "texto", "caneta"]);
6353
+ class Gs {
6353
6354
  constructor(t) {
6354
6355
  f(this, "desenho", null);
6355
6356
  f(this, "camadaDesenho", null);
@@ -6400,15 +6401,15 @@ class Vs {
6400
6401
  }
6401
6402
  ativarFerramenta(t, e = {}) {
6402
6403
  var n, s;
6403
- if (!yi(t)) return { ok: !1, motivo: "ferramenta-invalida" };
6404
+ if (!bi(t)) return { ok: !1, motivo: "ferramenta-invalida" };
6404
6405
  const o = this.p.obterMapa();
6405
6406
  if (!o) return { ok: !1, motivo: "sem-mapa" };
6406
- if (Bs.has(t)) {
6407
+ if (Hs.has(t)) {
6407
6408
  const r = this.motivoCamadaDesenhoInvalida();
6408
6409
  if (r)
6409
6410
  return this.p.emitir("cad-desenho-recusado", { ferramenta: t, motivo: r }), { ok: !1, motivo: r };
6410
6411
  }
6411
- this.p.prepararDesenho(), this.desenho || (this.desenho = new Ns({
6412
+ this.p.prepararDesenho(), this.desenho || (this.desenho = new Vs({
6412
6413
  map: o,
6413
6414
  buscarSnap: (r) => this.p.buscarSnapEm(r),
6414
6415
  snapAtivo: () => this.p.snapAtivo(),
@@ -6497,11 +6498,11 @@ class Vs {
6497
6498
  }
6498
6499
  const s = this.p.obterLayerManager().getLayerDef(n.camadaId), r = n.estilo ?? {}, c = {}, l = r.corTraco ?? (s == null ? void 0 : s.estilo.corPrimaria);
6499
6500
  l && (c.corTraco = l), r.corPreenchimento && (c.corPreenchimento = r.corPreenchimento), r.espessuraTraco !== void 0 && (c.espessuraTraco = r.espessuraTraco), r.opacidadePreenchimento !== void 0 && (c.opacidadePreenchimento = r.opacidadePreenchimento), r.dashArray && (c.dashArray = r.dashArray);
6500
- for (const d of Rs) r[d] !== void 0 && (c[d] = r[d]);
6501
+ for (const d of js) r[d] !== void 0 && (c[d] = r[d]);
6501
6502
  this.estiloDesenho = { ...this.estiloDesenho, ...c }, this.p.emitir("cad-conta-gotas", { cor: l ?? r.corPreenchimento ?? "", feicao: n, estilo: c });
6502
6503
  }
6503
6504
  }
6504
- class js {
6505
+ class Us {
6505
6506
  constructor(t) {
6506
6507
  /** id -> posição na lista da camada (válido enquanto `lista` for a lista atual); evita varrer a camada a cada consulta. */
6507
6508
  f(this, "posicoes", /* @__PURE__ */ new Map());
@@ -6595,12 +6596,12 @@ class js {
6595
6596
  I === void 0 || C[I] === null || (C[I] = null, P.push(E), i.removidas++, x = !0);
6596
6597
  }
6597
6598
  c.forEach((S, E) => {
6598
- const I = S && typeof S == "object" && S.id !== void 0 && S.id !== null ? String(S.id) : "", _ = w.get(I), k = _ === void 0 ? null : C[_], $ = k ? this.mesclar(k, S, t, !!o.substituirPropriedades) : null;
6599
- if (!$ || _ === void 0) {
6599
+ const I = S && typeof S == "object" && S.id !== void 0 && S.id !== null ? String(S.id) : "", D = w.get(I), k = D === void 0 ? null : C[D], $ = k ? this.mesclar(k, S, t, !!o.substituirPropriedades) : null;
6600
+ if (!$ || D === void 0) {
6600
6601
  i.recusadas.push(I || d(S, E));
6601
6602
  return;
6602
6603
  }
6603
- C[_] = $, b.push($), s.push($), i.atualizadas++;
6604
+ C[D] = $, b.push($), s.push($), i.atualizadas++;
6604
6605
  });
6605
6606
  for (const S of m) {
6606
6607
  const E = w.get(S.id);
@@ -6611,8 +6612,8 @@ class js {
6611
6612
  return g.setLayerData(t, z), delete z.delta, x ? this.posicoes.delete(t) : this.posicoes.set(t, { lista: L, pos: w }), this.p.aposDados(), u({ resultado: i, adicionadas: n, atualizadas: s });
6612
6613
  }
6613
6614
  }
6614
- const Hs = "cm-vertex-edit-hud", st = "cad-edicao-vertices", Rt = "#facc15", ke = "#f472b6", Gs = "#22d3ee", Us = 600, Zs = 100, Ws = 24, Xs = 2500, Ie = (a, t) => a === t || JSON.stringify(a) === JSON.stringify(t);
6615
- class Ks {
6615
+ const Zs = "cm-vertex-edit-hud", st = "cad-edicao-vertices", Rt = "#facc15", ke = "#f472b6", Ws = "#22d3ee", Xs = 600, Ks = 100, Ys = 24, Qs = 2500, Ie = (a, t) => a === t || JSON.stringify(a) === JSON.stringify(t);
6616
+ class Js {
6616
6617
  constructor(t) {
6617
6618
  f(this, "feicaoAtual", null);
6618
6619
  /** Feição como foi gravada pela última vez (base do histórico). */
@@ -6738,7 +6739,7 @@ class Ks {
6738
6739
  }
6739
6740
  // ---- construção ----
6740
6741
  geometriaAtual() {
6741
- return Co(this.feicaoAtual.geometria, this.pts);
6742
+ return So(this.feicaoAtual.geometria, this.pts);
6742
6743
  }
6743
6744
  feicaoComPontos() {
6744
6745
  return { ...this.feicaoAtual, geometria: this.geometriaAtual() };
@@ -6759,7 +6760,7 @@ class Ks {
6759
6760
  const n = this.criarAlca(o, i);
6760
6761
  this.alcas.push(n), this.grupo.addLayer(n);
6761
6762
  }), this.criarAlcasBezier(), t.tipo !== "Point")
6762
- for (const [o, i] of ci(this.geometriaAtual())) {
6763
+ for (const [o, i] of li(this.geometriaAtual())) {
6763
6764
  if (!this.segmentoLongoNaTela(o, i)) continue;
6764
6765
  const n = this.criarFantasma(o, i);
6765
6766
  this.fantasmas.push(n), this.grupo.addLayer(n.marker);
@@ -6771,7 +6772,7 @@ class Ks {
6771
6772
  const o = this.pts[t], i = this.pts[e];
6772
6773
  if (!o || !i) return !1;
6773
6774
  const n = this.dep.map.latLngToContainerPoint(o), s = this.dep.map.latLngToContainerPoint(i);
6774
- return Math.hypot(n.x - s.x, n.y - s.y) >= Ws;
6775
+ return Math.hypot(n.x - s.x, n.y - s.y) >= Ys;
6775
6776
  }
6776
6777
  icone(t, e, o) {
6777
6778
  return y.divIcon({
@@ -6781,7 +6782,7 @@ class Ks {
6781
6782
  });
6782
6783
  }
6783
6784
  iconeAlca(t) {
6784
- const e = this.ehCirculo && t === 1, o = this.selecionado === t, i = o ? Gs : Rt, n = o ? "2px solid #fff;box-shadow:0 0 0 2px #0e7490" : "2px solid #111";
6785
+ const e = this.ehCirculo && t === 1, o = this.selecionado === t, i = o ? Ws : Rt, n = o ? "2px solid #fff;box-shadow:0 0 0 2px #0e7490" : "2px solid #111";
6785
6786
  return this.icone("cad-vertex-handle", 12, `background:${i};border:${n};border-radius:${e ? "50%" : "2px"};cursor:${e ? "ew-resize" : "move"}`);
6786
6787
  }
6787
6788
  criarAlca(t, e) {
@@ -6803,7 +6804,7 @@ class Ks {
6803
6804
  }), o.on("contextmenu", (i) => {
6804
6805
  y.DomEvent.preventDefault(i.originalEvent), y.DomEvent.stopPropagation(i.originalEvent), this.excluir(e);
6805
6806
  }), o.on("dblclick", (i) => {
6806
- y.DomEvent.stopPropagation(i.originalEvent), !(Date.now() - this.ultimaInsercao < Us) && this.alternarSuave(e);
6807
+ y.DomEvent.stopPropagation(i.originalEvent), !(Date.now() - this.ultimaInsercao < Xs) && this.alternarSuave(e);
6807
6808
  }), o;
6808
6809
  }
6809
6810
  detectarRetanguloDe(t) {
@@ -6834,8 +6835,8 @@ class Ks {
6834
6835
  var s, r;
6835
6836
  const i = (r = (s = Y(t)) == null ? void 0 : s[e]) == null ? void 0 : r[o];
6836
6837
  if (i) return { pos: i, latente: !1 };
6837
- if (this.pts.length > $a) return null;
6838
- const n = Fa(t, e, o);
6838
+ if (this.pts.length > Na) return null;
6839
+ const n = Ra(t, e, o);
6839
6840
  return n ? { pos: n, latente: !0 } : null;
6840
6841
  }
6841
6842
  iconeDaAlca(t) {
@@ -6848,7 +6849,7 @@ class Ks {
6848
6849
  /** Cria os marcadores das alças do nó que ainda não têm (reais, ou latentes nos nós de canto e nas poligonais). */
6849
6850
  completarAlcasDoNo(t) {
6850
6851
  var i;
6851
- const e = this.feicaoAtual && this.geometriaAtual(), o = e && ((i = _t(e)) == null ? void 0 : i[t]);
6852
+ const e = this.feicaoAtual && this.geometriaAtual(), o = e && ((i = Dt(e)) == null ? void 0 : i[t]);
6852
6853
  if (!(!e || !o || !this.grupo))
6853
6854
  for (const n of ["entrada", "saida"]) {
6854
6855
  const s = this.posicaoDaAlca(e, t, n);
@@ -6873,7 +6874,7 @@ class Ks {
6873
6874
  }
6874
6875
  /** Reposiciona marcadores e hastes de todas as alças conforme a geometria atual. */
6875
6876
  sincronizarAlcasBezier() {
6876
- const t = this.feicaoAtual && this.geometriaAtual(), e = t && _t(t);
6877
+ const t = this.feicaoAtual && this.geometriaAtual(), e = t && Dt(t);
6877
6878
  if (!(!t || !e))
6878
6879
  for (const o of this.alcasBezier) {
6879
6880
  const i = this.posicaoDaAlca(t, o.i, o.qual);
@@ -6885,13 +6886,13 @@ class Ks {
6885
6886
  aoArrastarAlca(t, e) {
6886
6887
  const o = this.feicaoAtual;
6887
6888
  if (!o) return;
6888
- const { lat: i, lng: n } = t.marker.getLatLng(), s = Oa(o.geometria, t.i, t.qual, [i, n], e);
6889
+ const { lat: i, lng: n } = t.marker.getLatLng(), s = Ba(o.geometria, t.i, t.qual, [i, n], e);
6889
6890
  this.feicaoAtual = { ...o, geometria: s }, this.completarAlcasDoNo(t.i), this.sincronizarAlcasBezier(), this.dep.previsualizar(this.feicaoAtual), this.atualizarHud();
6890
6891
  }
6891
6892
  alternarSuave(t) {
6892
6893
  const e = this.feicaoAtual;
6893
6894
  if (!e) return;
6894
- const o = Na(e.geometria, t);
6895
+ const o = Va(e.geometria, t);
6895
6896
  o !== e.geometria && (this.feicaoAtual = { ...e, geometria: o }, this.reconstruir(), this.dep.previsualizar(this.feicaoAtual), this.confirmar(this.feicaoAtual));
6896
6897
  }
6897
6898
  criarFantasma(t, e) {
@@ -6952,10 +6953,10 @@ class Ks {
6952
6953
  comInsercao(t, e) {
6953
6954
  const o = this.feicaoAtual;
6954
6955
  if (!o || this.pts.length === 0) return null;
6955
- const i = this.geometriaAtual(), n = kt(i, t, (t + 1) % this.pts.length), s = Da(i, t, n);
6956
+ const i = this.geometriaAtual(), n = kt(i, t, (t + 1) % this.pts.length), s = Fa(i, t, n);
6956
6957
  if (s === i) return null;
6957
6958
  const r = pt(s).map((c) => [c[0], c[1]]);
6958
- return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && (r[t + 1] = e), { feicao: { ...o, geometria: Co(s, r) }, pts: r };
6959
+ return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && (r[t + 1] = e), { feicao: { ...o, geometria: So(s, r) }, pts: r };
6959
6960
  }
6960
6961
  inserir(t, e) {
6961
6962
  const o = this.comInsercao(t, e);
@@ -6968,7 +6969,7 @@ class Ks {
6968
6969
  /** Grava o gesto: guarda a geometria anterior no histórico (se mudou) e avisa quem escuta. */
6969
6970
  confirmar(t) {
6970
6971
  const e = this.base;
6971
- e && !Ie(e.geometria, t.geometria) && (this.historico.push(e), this.historico.length > Zs && this.historico.shift(), this.refeitos = []), this.feicaoAtual = t, this.base = t, this.gravar(t), this.atualizarBotoes();
6972
+ e && !Ie(e.geometria, t.geometria) && (this.historico.push(e), this.historico.length > Ks && this.historico.shift(), this.refeitos = []), this.feicaoAtual = t, this.base = t, this.gravar(t), this.atualizarBotoes();
6972
6973
  }
6973
6974
  gravar(t) {
6974
6975
  this.gravando = !0;
@@ -6980,7 +6981,7 @@ class Ks {
6980
6981
  }
6981
6982
  excluir(t) {
6982
6983
  if (!this.feicaoAtual) return !1;
6983
- const o = this.geometriaAtual(), i = qa(o, t);
6984
+ const o = this.geometriaAtual(), i = Oa(o, t);
6984
6985
  if (!i)
6985
6986
  return o.tipo === "Circle" ? this.avisar("Círculo: mova o centro ou a borda (não há nós para excluir).") : o.tipo === "Point" ? this.avisar("Um ponto tem um único nó.") : this.avisar(`Mínimo de ${re(o)} nós: não dá para excluir mais.`), !1;
6986
6987
  this.pts = pt(i).map((s) => [s[0], s[1]]), this.retangulo = !1, this.selecionado = null, this.reconstruir();
@@ -7036,7 +7037,7 @@ class Ks {
7036
7037
  montarHud() {
7037
7038
  var d;
7038
7039
  const t = this.dep.map.getContainer(), e = document.createElement("div");
7039
- e.id = Hs, e.style.cssText = bi + "gap:8px;align-items:center;padding:4px 10px;border-radius:8px;background:rgba(15,23,42,.92);color:#fff;font:11px var(--ui-fonte-base,sans-serif);border:1px solid rgba(255,255,255,.2);pointer-events:auto";
7040
+ e.id = Zs, e.style.cssText = xi + "gap:8px;align-items:center;padding:4px 10px;border-radius:8px;background:rgba(15,23,42,.92);color:#fff;font:11px var(--ui-fonte-base,sans-serif);border:1px solid rgba(255,255,255,.2);pointer-events:auto";
7040
7041
  const o = (h) => {
7041
7042
  const u = document.createElement("span");
7042
7043
  return u.dataset.campo = h, u;
@@ -7070,7 +7071,7 @@ class Ks {
7070
7071
  const e = (o = this.hud) == null ? void 0 : o.querySelector('[data-campo="aviso"]');
7071
7072
  e && (e.textContent = t, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = setTimeout(() => {
7072
7073
  e.textContent = "", this.avisoTimer = null;
7073
- }, Xs));
7074
+ }, Qs));
7074
7075
  }
7075
7076
  atualizarHud(t) {
7076
7077
  if (!this.hud || !this.feicaoAtual) return;
@@ -7100,7 +7101,7 @@ class Ks {
7100
7101
  i && (i.setLatLng(e), this.aoArrastar(i, t, o), i.fire("dragend"));
7101
7102
  }
7102
7103
  }
7103
- class Ys {
7104
+ class tr {
7104
7105
  constructor(t) {
7105
7106
  f(this, "editor", null);
7106
7107
  f(this, "pararDeVigiarCamada", null);
@@ -7131,13 +7132,13 @@ class Ys {
7131
7132
  var d, h, u;
7132
7133
  const o = this.p.buscar(t, e);
7133
7134
  if (!o || o.excluida) return { ok: !1, motivo: "inexistente" };
7134
- const i = this.p.obterLayerManager().getLayerDef(t), n = Lo(o, !!(i != null && i.bloqueada));
7135
+ const i = this.p.obterLayerManager().getLayerDef(t), n = Co(o, !!(i != null && i.bloqueada));
7135
7136
  if (n)
7136
7137
  return this.p.emitir("cad-edicao-recusada", { motivo: n, feicao: o }), { ok: !1, motivo: n };
7137
7138
  const s = this.p.obterMapa();
7138
7139
  if (!s) return { ok: !1, motivo: "sem-mapa" };
7139
7140
  this.p.desativarFerramenta(), (d = this.editor) == null || d.parar(), this.p.aplicarMargensHud(), this.p.selecionarUma({ camadaId: t, id: e }), this.p.fecharPopup();
7140
- const r = this.p.obterLayerManager(), c = R.get(H), l = new Ks({
7141
+ const r = this.p.obterLayerManager(), c = R.get(H), l = new Js({
7141
7142
  map: s,
7142
7143
  snapLigado: () => this.p.snapAtivo(),
7143
7144
  alternarSnap: () => this.p.alternarSnap(),
@@ -7173,7 +7174,7 @@ class Ys {
7173
7174
  const t = this.p.selecionadas();
7174
7175
  if (t.length !== 1) return null;
7175
7176
  const e = this.p.obterLayerManager().getLayerDef(t[0].camadaId);
7176
- return Lo(t[0], !!(e != null && e.bloqueada)) === null ? t[0] : null;
7177
+ return Co(t[0], !!(e != null && e.bloqueada)) === null ? t[0] : null;
7177
7178
  }
7178
7179
  /** Enter: edita a única feição selecionada, se ela for editável. Devolve se a edição começou. */
7179
7180
  editarSelecionada() {
@@ -7197,13 +7198,13 @@ class Ys {
7197
7198
  (t = this.editor) == null || t.parar();
7198
7199
  }
7199
7200
  }
7200
- const xi = 10, zt = (a, t) => Math.hypot(a.x - t.x, a.y - t.y);
7201
- function Oo(a, t, e) {
7201
+ const Pi = 10, zt = (a, t) => Math.hypot(a.x - t.x, a.y - t.y);
7202
+ function No(a, t, e) {
7202
7203
  const o = e.x - t.x, i = e.y - t.y, n = o * o + i * i, s = n === 0 ? 0 : Math.max(0, Math.min(1, ((a.x - t.x) * o + (a.y - t.y) * i) / n));
7203
7204
  return { t: s, d: Math.hypot(a.x - (t.x + s * o), a.y - (t.y + s * i)) };
7204
7205
  }
7205
- function Qs(a, t, e, o = {}, i) {
7206
- const n = o.toleranciaPx ?? xi, s = o.vertice !== !1, r = o.meio !== !1, c = o.aresta !== !1;
7206
+ function er(a, t, e, o = {}, i) {
7207
+ const n = o.toleranciaPx ?? Pi, s = o.vertice !== !1, r = o.meio !== !1, c = o.aresta !== !1;
7207
7208
  let l = null, d = null, h = null;
7208
7209
  const u = (m, g) => !m || g.distanciaPx < m.distanciaPx ? g : m;
7209
7210
  for (const m of t) {
@@ -7224,14 +7225,14 @@ function Qs(a, t, e, o = {}, i) {
7224
7225
  b <= n && (l = u(l, { tipo: "vertice", coordenada: P.ponto, distanciaPx: b, ...v }));
7225
7226
  }
7226
7227
  if (r)
7227
- for (const [P, b] of ci(p)) {
7228
+ for (const [P, b] of li(p)) {
7228
7229
  const x = kt(p, P, b), L = zt(a, e(x));
7229
7230
  L <= n && (d = u(d, { tipo: "meio", coordenada: x, distanciaPx: L, ...v }));
7230
7231
  }
7231
7232
  if (c) {
7232
7233
  const P = X(p), b = P.map(e), x = p.tipo === "Polygon" && P.length > 2 ? P.length : P.length - 1;
7233
7234
  for (let L = 0; L < x; L++) {
7234
- const A = L, z = (L + 1) % P.length, { t: S, d: E } = Oo(a, b[A], b[z]);
7235
+ const A = L, z = (L + 1) % P.length, { t: S, d: E } = No(a, b[A], b[z]);
7235
7236
  if (E <= n) {
7236
7237
  const I = [P[A][0] + S * (P[z][0] - P[A][0]), P[A][1] + S * (P[z][1] - P[A][1])];
7237
7238
  h = u(h, { tipo: "aresta", coordenada: I, distanciaPx: E, ...v });
@@ -7255,14 +7256,14 @@ function Qs(a, t, e, o = {}, i) {
7255
7256
  const z = A, S = (A + 1) % P.length;
7256
7257
  if (!(C !== void 0 && (z === C || S === C)) && !(g && C === void 0)) {
7257
7258
  if (r) {
7258
- const E = si(P[z], P[S]), I = zt(a, e(E));
7259
+ const E = ri(P[z], P[S]), I = zt(a, e(E));
7259
7260
  I <= n && (d = u(d, { tipo: "meio", coordenada: E, distanciaPx: I, ...v }));
7260
7261
  }
7261
7262
  if (c) {
7262
- const { t: E, d: I } = Oo(a, x[z], x[S]);
7263
+ const { t: E, d: I } = No(a, x[z], x[S]);
7263
7264
  if (I <= n) {
7264
- const _ = [P[z][0] + E * (P[S][0] - P[z][0]), P[z][1] + E * (P[S][1] - P[z][1])];
7265
- h = u(h, { tipo: "aresta", coordenada: _, distanciaPx: I, ...v });
7265
+ const D = [P[z][0] + E * (P[S][0] - P[z][0]), P[z][1] + E * (P[S][1] - P[z][1])];
7266
+ h = u(h, { tipo: "aresta", coordenada: D, distanciaPx: I, ...v });
7266
7267
  }
7267
7268
  }
7268
7269
  }
@@ -7271,7 +7272,7 @@ function Qs(a, t, e, o = {}, i) {
7271
7272
  }
7272
7273
  return l ?? d ?? h;
7273
7274
  }
7274
- class Js {
7275
+ class or {
7275
7276
  constructor(t) {
7276
7277
  this.p = t;
7277
7278
  }
@@ -7296,8 +7297,8 @@ class Js {
7296
7297
  buscarSnapEm(t, e) {
7297
7298
  const o = this.p.obterMapa();
7298
7299
  if (!o) return null;
7299
- const i = o.latLngToContainerPoint(t), n = this.candidatasEm(t, xi);
7300
- return Qs({ x: i.x, y: i.y }, n, (s) => o.latLngToContainerPoint(s), {}, e);
7300
+ const i = o.latLngToContainerPoint(t), n = this.candidatasEm(t, Pi);
7301
+ return er({ x: i.x, y: i.y }, n, (s) => o.latLngToContainerPoint(s), {}, e);
7301
7302
  }
7302
7303
  feicaoSob(t, e) {
7303
7304
  const o = this.p.obterMapa();
@@ -7306,7 +7307,7 @@ class Js {
7306
7307
  return { feicao: le({ x: n.x, y: n.y }, this.candidatasEm(r, 8), (l) => o.latLngToContainerPoint(l)), coordenada: r };
7307
7308
  }
7308
7309
  }
7309
- class tr {
7310
+ class ir {
7310
7311
  constructor(t) {
7311
7312
  f(this, "hoverId", null);
7312
7313
  f(this, "hoverAgendado", !1);
@@ -7351,11 +7352,11 @@ class tr {
7351
7352
  this.hoverId = null;
7352
7353
  }
7353
7354
  }
7354
- const er = 111320;
7355
+ const ar = 111320;
7355
7356
  function Et(a, t) {
7356
7357
  return a.x >= t.x1 && a.x <= t.x2 && a.y >= t.y1 && a.y <= t.y2;
7357
7358
  }
7358
- function No(a, t, e) {
7359
+ function Ro(a, t, e) {
7359
7360
  let o = 0, i = 1;
7360
7361
  const n = t.x - a.x, s = t.y - a.y, r = [-n, n, -s, s], c = [a.x - e.x1, e.x2 - a.x, a.y - e.y1, e.y2 - a.y];
7361
7362
  for (let l = 0; l < 4; l++)
@@ -7373,7 +7374,7 @@ function No(a, t, e) {
7373
7374
  }
7374
7375
  return !0;
7375
7376
  }
7376
- function Ro(a, t) {
7377
+ function Bo(a, t) {
7377
7378
  let e = !1;
7378
7379
  for (let o = 0, i = t.length - 1; o < t.length; i = o++) {
7379
7380
  const n = t[o], s = t[i];
@@ -7381,15 +7382,15 @@ function Ro(a, t) {
7381
7382
  }
7382
7383
  return e;
7383
7384
  }
7384
- function Bo(a, t, e) {
7385
- for (let o = 1; o < a.length; o++) if (No(a[o - 1], a[o], t)) return !0;
7386
- return e && a.length > 2 && No(a[a.length - 1], a[0], t);
7385
+ function Vo(a, t, e) {
7386
+ for (let o = 1; o < a.length; o++) if (Ro(a[o - 1], a[o], t)) return !0;
7387
+ return e && a.length > 2 && Ro(a[a.length - 1], a[0], t);
7387
7388
  }
7388
- function or(a, t, e) {
7389
- const o = e(a), i = e([a[0] + t / er, a[1]]);
7389
+ function nr(a, t, e) {
7390
+ const o = e(a), i = e([a[0] + t / ar, a[1]]);
7390
7391
  return Math.hypot(i.x - o.x, i.y - o.y);
7391
7392
  }
7392
- function ir(a, t, e, o) {
7393
+ function sr(a, t, e, o) {
7393
7394
  if (a.oculta) return !1;
7394
7395
  const i = a.geometria, n = o === "window";
7395
7396
  switch (i.tipo) {
@@ -7398,18 +7399,18 @@ function ir(a, t, e, o) {
7398
7399
  return Et(e(i.coordenada), t);
7399
7400
  case "LineString": {
7400
7401
  const s = it(i).map((r) => r.map(e));
7401
- return n ? s.every((r) => r.every((c) => Et(c, t))) : s.some((r) => r.some((c) => Et(c, t)) || Bo(r, t, !1));
7402
+ return n ? s.every((r) => r.every((c) => Et(c, t))) : s.some((r) => r.some((c) => Et(c, t)) || Vo(r, t, !1));
7402
7403
  }
7403
7404
  case "Polygon": {
7404
7405
  const s = i.aneis.map((l) => l.map(e)), r = s[0];
7405
7406
  if (!r) return !1;
7406
7407
  if (n) return r.every((l) => Et(l, t));
7407
- if (s.some((l) => l.some((d) => Et(d, t)) || Bo(l, t, !0))) return !0;
7408
+ if (s.some((l) => l.some((d) => Et(d, t)) || Vo(l, t, !0))) return !0;
7408
7409
  const c = { x: t.x1, y: t.y1 };
7409
- return Ro(c, r) && !s.slice(1).some((l) => Ro(c, l));
7410
+ return Bo(c, r) && !s.slice(1).some((l) => Bo(c, l));
7410
7411
  }
7411
7412
  case "Circle": {
7412
- const s = e(i.centro), r = or(i.centro, i.raioMetros, e);
7413
+ const s = e(i.centro), r = nr(i.centro, i.raioMetros, e);
7413
7414
  if (n)
7414
7415
  return s.x - r >= t.x1 && s.x + r <= t.x2 && s.y - r >= t.y1 && s.y + r <= t.y2;
7415
7416
  const c = Math.max(t.x1, Math.min(s.x, t.x2)), l = Math.max(t.y1, Math.min(s.y, t.y2));
@@ -7417,9 +7418,9 @@ function ir(a, t, e, o) {
7417
7418
  }
7418
7419
  }
7419
7420
  }
7420
- function ar(a, t) {
7421
+ function rr(a, t) {
7421
7422
  if (t.length < 3 || a.oculta) return !1;
7422
- const e = (i) => ii(i, [t]), o = a.geometria;
7423
+ const e = (i) => ai(i, [t]), o = a.geometria;
7423
7424
  switch (o.tipo) {
7424
7425
  case "Point":
7425
7426
  case "Text":
@@ -7437,7 +7438,7 @@ function ar(a, t) {
7437
7438
  }
7438
7439
  }
7439
7440
  }
7440
- class nr {
7441
+ class cr {
7441
7442
  constructor(t) {
7442
7443
  this.p = t;
7443
7444
  }
@@ -7447,7 +7448,7 @@ class nr {
7447
7448
  for (const o of this.p.obterLayerManager().getActiveSelectableLayers())
7448
7449
  if (o.tipo === H)
7449
7450
  for (const i of this.p.lista(o.id))
7450
- this.p.desenhada(i) && ar(i, t) && e.push({ camadaId: o.id, id: i.id });
7451
+ this.p.desenhada(i) && rr(i, t) && e.push({ camadaId: o.id, id: i.id });
7451
7452
  this.p.desativarFerramenta(), this.p.selecionar(e);
7452
7453
  }
7453
7454
  /** Caixa de seleção: só feições de camadas visíveis, interativas e desbloqueadas, com toque geométrico real. */
@@ -7458,19 +7459,19 @@ class nr {
7458
7459
  for (const r of this.p.obterLayerManager().getActiveSelectableLayers())
7459
7460
  if (r.tipo === H)
7460
7461
  for (const c of this.p.lista(r.id))
7461
- this.p.desenhada(c) && ir(c, t, n, e) && s.push({ camadaId: r.id, id: c.id });
7462
+ this.p.desenhada(c) && sr(c, t, n, e) && s.push({ camadaId: r.id, id: c.id });
7462
7463
  o === "adicionar" ? this.p.adicionar ? this.p.adicionar(s) : this.p.alternarVarias(s) : o === "subtrair" ? this.p.subtrair ? this.p.subtrair(s) : this.p.alternarVarias(s) : o === !0 ? this.p.alternarVarias(s) : this.p.selecionar(s);
7463
7464
  }
7464
7465
  }
7465
- function sr(a) {
7466
+ function lr(a) {
7466
7467
  return a.key !== "Enter" || a.defaultPrevented || a.ctrlKey || a.metaKey || a.altKey || a.shiftKey ? !1 : !bt(a) && !Ue(a);
7467
7468
  }
7468
- class rr {
7469
+ class dr {
7469
7470
  constructor(t) {
7470
7471
  f(this, "ouvintes", new Qt());
7471
7472
  f(this, "aoTecla", (t) => {
7472
7473
  try {
7473
- if (!sr(t) || this.p.ocupado() || !this.p.atalhosValem()) return;
7474
+ if (!lr(t) || this.p.ocupado() || !this.p.atalhosValem()) return;
7474
7475
  this.p.editarSelecionada() && t.preventDefault();
7475
7476
  } catch (e) {
7476
7477
  console.error("[ui-canvas-cad] falha no atalho Enter da edição", e);
@@ -7486,7 +7487,7 @@ class rr {
7486
7487
  this.ouvintes.cleanup();
7487
7488
  }
7488
7489
  }
7489
- class cr {
7490
+ class hr {
7490
7491
  constructor(t) {
7491
7492
  f(this, "operacoes");
7492
7493
  f(this, "selecao");
@@ -7506,22 +7507,22 @@ class cr {
7506
7507
  /** Aceita a coordenada (0, 0) exata nas feições de entrada (atributo `aceitar-origem`). */
7507
7508
  f(this, "aceitarOrigem", !1);
7508
7509
  f(this, "opcoesPopup", { copiarParaAreaDeTransferencia: !0 });
7509
- this.contexto = t, this.repositorio = new js({
7510
+ this.contexto = t, this.repositorio = new Us({
7510
7511
  obterLayerManager: () => this.contexto.obterLayerManager(),
7511
7512
  opcoesNormalizacao: () => this.opcoesNormalizacao(),
7512
7513
  aposDados: () => this.aposDados()
7513
- }), this.consulta = new Js({
7514
+ }), this.consulta = new or({
7514
7515
  obterMapa: () => this.contexto.obterMapa(),
7515
7516
  obterLayerManager: () => this.contexto.obterLayerManager(),
7516
7517
  desenhada: (e) => this.desenhada(e)
7517
- }), this.ponteiro = new tr({
7518
+ }), this.ponteiro = new ir({
7518
7519
  emitir: (e, o, i) => this.contexto.emitir(e, o, i),
7519
7520
  feicaoSob: (e, o) => this.consulta.feicaoSob(e, o),
7520
7521
  interacaoAtiva: () => this.ferramentas.ativo || this.edicao.editando,
7521
7522
  popupNoDuploClique: () => this.modoPopups() !== "desligado",
7522
7523
  botaoDireitoDaFerramenta: () => this.ferramentas.ativo ? (this.ferramentas.botaoDireito(), !0) : !1,
7523
7524
  abrirPopup: (e) => this.popup.abrir(e)
7524
- }), this.regiao = new nr({
7525
+ }), this.regiao = new cr({
7525
7526
  obterMapa: () => this.contexto.obterMapa(),
7526
7527
  obterLayerManager: () => this.contexto.obterLayerManager(),
7527
7528
  lista: (e) => this.lista(e),
@@ -7531,7 +7532,7 @@ class cr {
7531
7532
  adicionar: (e) => this.selecao.adicionar(e),
7532
7533
  subtrair: (e) => this.selecao.subtrair(e),
7533
7534
  alternarVarias: (e) => this.selecao.alternarVarias(e)
7534
- }), this.edicao = new Ys({
7535
+ }), this.edicao = new tr({
7535
7536
  obterMapa: () => this.contexto.obterMapa(),
7536
7537
  obterLayerManager: () => this.contexto.obterLayerManager(),
7537
7538
  emitir: (e, o) => this.contexto.emitir(e, o),
@@ -7554,17 +7555,17 @@ class cr {
7554
7555
  snapAtivo: () => this.snap.ativo,
7555
7556
  alternarSnap: () => this.snap.alternar(),
7556
7557
  buscarSnapEm: (e, o) => this.buscarSnapEm(e, o)
7557
- }), this.teclado = new rr({
7558
+ }), this.teclado = new dr({
7558
7559
  ocupado: () => this.edicao.editando || this.ferramentas.ativo,
7559
7560
  atalhosValem: () => this.atalhosValem(),
7560
7561
  editarSelecionada: () => this.edicao.editarSelecionada()
7561
- }), this.versoes = new bs({
7562
+ }), this.versoes = new Ls({
7562
7563
  obterLayerManager: () => this.contexto.obterLayerManager(),
7563
7564
  emitir: (e, o) => this.contexto.emitir(e, o),
7564
7565
  buscar: (e, o) => this.buscar(e, o),
7565
7566
  lista: (e) => this.lista(e),
7566
7567
  aposDados: () => this.aposDados()
7567
- }, t.regra ?? new Ye()), this.ferramentas = new Vs({
7568
+ }, t.regra ?? new Ye()), this.ferramentas = new Gs({
7568
7569
  obterMapa: () => this.contexto.obterMapa(),
7569
7570
  obterLayerManager: () => this.contexto.obterLayerManager(),
7570
7571
  emitir: (e, o, i) => this.contexto.emitir(e, o, i),
@@ -7583,14 +7584,14 @@ class cr {
7583
7584
  dividirComLinha: (e) => this.dividirComLinha(e),
7584
7585
  selecionarNoLaco: (e) => this.selecionarNoLaco(e),
7585
7586
  candidatasEm: (e, o) => this.candidatasEm(e, o)
7586
- }), this.camera = new xs({
7587
+ }), this.camera = new Cs({
7587
7588
  obterMapa: () => this.contexto.obterMapa(),
7588
7589
  obterLayerManager: () => this.contexto.obterLayerManager(),
7589
7590
  buscar: (e, o) => this.buscar(e, o),
7590
7591
  lista: (e) => this.lista(e),
7591
7592
  desenhada: (e) => this.desenhada(e),
7592
7593
  garantirVisivel: (e) => this.versoes.garantirVisivel(e)
7593
- }), this.operacoes = new ys({
7594
+ }), this.operacoes = new Ps({
7594
7595
  emitir: (e, o) => this.contexto.emitir(e, o),
7595
7596
  obterLayerManager: () => this.contexto.obterLayerManager(),
7596
7597
  buscar: (e, o) => this.buscar(e, o),
@@ -7603,18 +7604,18 @@ class cr {
7603
7604
  estaSelecionada: (e) => this.selecao.contem(e),
7604
7605
  divisaoAtiva: () => this.ferramentas.ferramentaAtiva === "dividir",
7605
7606
  encerrarDesenho: () => this.ferramentas.desativarFerramenta()
7606
- }), this.cursores = new ls(() => this.contexto.obterMapa()), this.snap = new vs({
7607
+ }), this.cursores = new us(() => this.contexto.obterMapa()), this.snap = new xs({
7607
7608
  aplica: () => this.atalhosValem(),
7608
7609
  aoMudar: (e) => {
7609
7610
  var o, i;
7610
7611
  this.contexto.emitir("cad-snap", e), this.edicao.atualizarSnapNoHud(), (i = (o = this.contexto).aoSnapMudar) == null || i.call(o, e.ligado);
7611
7612
  }
7612
- }), this.popup = new gs({
7613
+ }), this.popup = new bs({
7613
7614
  obterMapa: () => this.contexto.obterMapa(),
7614
7615
  obterCamada: (e) => this.contexto.obterLayerManager().getLayerDef(e),
7615
7616
  aoAcao: (e, o) => this.tratarAcaoPopup(e, o),
7616
7617
  liberar: (e) => this.contexto.liberarPopups ? this.contexto.liberarPopups(e) : e()
7617
- }), this.selecao = new ds({
7618
+ }), this.selecao = new ps({
7618
7619
  obterFeicao: (e) => this.buscar(e.camadaId, e.id),
7619
7620
  aplicarVisual: (e, o) => {
7620
7621
  const i = this.contexto.obterLayerManager().getLayerInstance(e), n = R.get(H);
@@ -7751,7 +7752,7 @@ class cr {
7751
7752
  }
7752
7753
  aplicarMargensHud() {
7753
7754
  const t = this.contexto.obterMapa();
7754
- t && ks(t.getContainer(), this.margensHud);
7755
+ t && Ds(t.getContainer(), this.margensHud);
7755
7756
  }
7756
7757
  // ---- versões (oficial × prévia) ----
7757
7758
  // ---- versões (oficial × prévia) ----
@@ -7963,7 +7964,7 @@ class cr {
7963
7964
  return this.operacoes.juntarFeicoes(t, e, o);
7964
7965
  }
7965
7966
  }
7966
- const Vo = {
7967
+ const jo = {
7967
7968
  ponto: "Ponto",
7968
7969
  linha: "Linha",
7969
7970
  poligono: "Polígono",
@@ -7980,19 +7981,19 @@ const Vo = {
7980
7981
  "selecao-laco": "Laço",
7981
7982
  "conta-gotas": "Cor"
7982
7983
  };
7983
- function lr(a) {
7984
+ function ur(a) {
7984
7985
  if (!a) return [];
7985
7986
  const t = a.split(/[\s,]+/).map((o) => o.trim().toLowerCase()).filter(Boolean);
7986
7987
  if (t.includes("todas")) return [...Ge];
7987
- const e = new Set(t.filter(yi));
7988
+ const e = new Set(t.filter(bi));
7988
7989
  return Ge.filter((o) => e.has(o));
7989
7990
  }
7990
- function dr(a) {
7991
+ function pr(a) {
7991
7992
  if (!a) return !1;
7992
7993
  const t = a.split(/[\s,]+/).map((e) => e.trim().toLowerCase());
7993
7994
  return t.includes("todas") || t.includes("editar");
7994
7995
  }
7995
- class hr {
7996
+ class fr {
7996
7997
  constructor(t) {
7997
7998
  f(this, "barra", null);
7998
7999
  f(this, "editando", !1);
@@ -8007,7 +8008,7 @@ class hr {
8007
8008
  i.className = "cad-quick-toolbar cad-draw-toolbar", i.setAttribute("role", "toolbar"), i.setAttribute("aria-label", "Ferramentas de desenho");
8008
8009
  for (const s of t) {
8009
8010
  const r = document.createElement("button");
8010
- r.type = "button", r.className = "cad-btn-tool cad-draw-btn", r.dataset.ferramenta = s, r.textContent = Vo[s], r.title = Vo[s], r.setAttribute("aria-pressed", "false"), r.addEventListener("click", () => this.ctx.aoEscolher(s)), i.appendChild(r);
8011
+ r.type = "button", r.className = "cad-btn-tool cad-draw-btn", r.dataset.ferramenta = s, r.textContent = jo[s], r.title = jo[s], r.setAttribute("aria-pressed", "false"), r.addEventListener("click", () => this.ctx.aoEscolher(s)), i.appendChild(r);
8011
8012
  }
8012
8013
  if (o) {
8013
8014
  const s = document.createElement("button");
@@ -8034,8 +8035,8 @@ class hr {
8034
8035
  (t = this.barra) == null || t.remove(), this.barra = null;
8035
8036
  }
8036
8037
  }
8037
- const ur = "data-cad-estilos-externos";
8038
- function pr(a) {
8038
+ const mr = "data-cad-estilos-externos";
8039
+ function gr(a) {
8039
8040
  try {
8040
8041
  return Array.from(a.cssRules, (t) => t.cssText).join(`
8041
8042
  `);
@@ -8043,10 +8044,10 @@ function pr(a) {
8043
8044
  return "";
8044
8045
  }
8045
8046
  }
8046
- function fr(a) {
8047
- return typeof a == "string" ? a.trim() ? [a] : [] : Array.isArray(a) ? a.map((t) => typeof t == "string" ? t : pr(t)).filter((t) => t.trim() !== "") : [];
8047
+ function vr(a) {
8048
+ return typeof a == "string" ? a.trim() ? [a] : [] : Array.isArray(a) ? a.map((t) => typeof t == "string" ? t : gr(t)).filter((t) => t.trim() !== "") : [];
8048
8049
  }
8049
- class mr {
8050
+ class yr {
8050
8051
  constructor(t) {
8051
8052
  f(this, "textos", []);
8052
8053
  f(this, "adotadas", []);
@@ -8058,7 +8059,7 @@ class mr {
8058
8059
  return this.textos;
8059
8060
  }
8060
8061
  definir(t) {
8061
- this.textos = fr(t), this.aplicar();
8062
+ this.textos = vr(t), this.aplicar();
8062
8063
  }
8063
8064
  /** Tira as folhas do shadow root, mantendo o pedido para `aplicar()` depois. */
8064
8065
  limpar() {
@@ -8078,7 +8079,7 @@ class mr {
8078
8079
  this.adotadas = [];
8079
8080
  }
8080
8081
  const e = document.createElement("style");
8081
- e.setAttribute(ur, ""), e.textContent = this.textos.join(`
8082
+ e.setAttribute(mr, ""), e.textContent = this.textos.join(`
8082
8083
  `), this.shadow.appendChild(e), this.fallback = e;
8083
8084
  }
8084
8085
  remover() {
@@ -8087,7 +8088,7 @@ class mr {
8087
8088
  this.adotadas.length > 0 && Array.isArray(t.adoptedStyleSheets) && (t.adoptedStyleSheets = t.adoptedStyleSheets.filter((o) => !this.adotadas.includes(o))), this.adotadas = [], (e = this.fallback) == null || e.remove(), this.fallback = null;
8088
8089
  }
8089
8090
  }
8090
- const Pi = {
8091
+ const Li = {
8091
8092
  "linha-cor": "cor",
8092
8093
  "linha-espessura": "espessura",
8093
8094
  "linha-tipo": "tipo",
@@ -8107,22 +8108,22 @@ const Pi = {
8107
8108
  opacidade: "opacidadeTraco",
8108
8109
  terminacao: "terminacaoTraco",
8109
8110
  juncao: "juncaoTraco"
8110
- }, gr = 100, vr = /^\s*\d+(\.\d+)?([\s,]+\d+(\.\d+)?)*\s*$/;
8111
- function yr(a) {
8112
- return Object.prototype.hasOwnProperty.call(Pi, a);
8111
+ }, br = 100, xr = /^\s*\d+(\.\d+)?([\s,]+\d+(\.\d+)?)*\s*$/;
8112
+ function Pr(a) {
8113
+ return Object.prototype.hasOwnProperty.call(Li, a);
8113
8114
  }
8114
8115
  const Bt = (a) => {
8115
8116
  const t = typeof a == "number" ? a : typeof a == "string" && a.trim() !== "" ? Number(a) : NaN;
8116
8117
  return Number.isFinite(t) ? t : void 0;
8117
8118
  };
8118
- function br(a, t) {
8119
+ function Lr(a, t) {
8119
8120
  if (t != null)
8120
8121
  switch (a) {
8121
8122
  case "cor":
8122
8123
  return (typeof t == "string" ? ot(t, "") : "") || void 0;
8123
8124
  case "espessura": {
8124
8125
  const e = Bt(t);
8125
- return e !== void 0 && e >= 0 ? Math.min(gr, e) : void 0;
8126
+ return e !== void 0 && e >= 0 ? Math.min(br, e) : void 0;
8126
8127
  }
8127
8128
  case "escala": {
8128
8129
  const e = Bt(t);
@@ -8135,28 +8136,28 @@ function br(a, t) {
8135
8136
  return e !== void 0 ? Math.min(1, Math.max(0, e)) : void 0;
8136
8137
  }
8137
8138
  case "tipo":
8138
- return ji(t);
8139
+ return Hi(t);
8139
8140
  case "tracejado":
8140
- return typeof t == "string" && vr.test(t) ? t.trim() : void 0;
8141
+ return typeof t == "string" && xr.test(t) ? t.trim() : void 0;
8141
8142
  case "terminacao":
8142
- return Vi(t) ? t : void 0;
8143
+ return ji(t) ? t : void 0;
8143
8144
  case "juncao":
8144
- return Bi(t) ? t : void 0;
8145
+ return Vi(t) ? t : void 0;
8145
8146
  default:
8146
8147
  return;
8147
8148
  }
8148
8149
  }
8149
- function jo(a, t) {
8150
+ function Ho(a, t) {
8150
8151
  const e = { ...a };
8151
8152
  if (!t || typeof t != "object") return e;
8152
8153
  for (const o of Object.keys(Ut)) {
8153
8154
  if (!Object.prototype.hasOwnProperty.call(t, o)) continue;
8154
- const i = br(o, t[o]);
8155
+ const i = Lr(o, t[o]);
8155
8156
  i === void 0 ? delete e[Ut[o]] : e[Ut[o]] = i;
8156
8157
  }
8157
8158
  return e;
8158
8159
  }
8159
- function xr(a) {
8160
+ function Cr(a) {
8160
8161
  const t = {};
8161
8162
  for (const [e, o] of Object.entries(Ut)) {
8162
8163
  const i = a[o];
@@ -8164,10 +8165,10 @@ function xr(a) {
8164
8165
  }
8165
8166
  return t;
8166
8167
  }
8167
- function Pr(a, t) {
8168
- return { [Pi[a]]: t };
8168
+ function Sr(a, t) {
8169
+ return { [Li[a]]: t };
8169
8170
  }
8170
- class Lr extends Gi {
8171
+ class Mr extends Ui {
8171
8172
  constructor() {
8172
8173
  super();
8173
8174
  f(this, "shadow");
@@ -8192,7 +8193,7 @@ class Lr extends Gi {
8192
8193
  f(this, "_chaveGrupo");
8193
8194
  f(this, "_zonaProjecao", 22);
8194
8195
  f(this, "hudCoordAgendado", !1);
8195
- this.shadow = this.attachShadow({ mode: "open" }), this.controller = new En(), this.controladorTamanho = Nn(this, this.controller), this.shadow.innerHTML = Hn(), this.estilosExternos = new mr(this.shadow), this.mapContainer = this.shadow.getElementById("cad-map-container"), this.layersPanel = this.shadow.getElementById("qgis-layer-panel"), this.toolbarPainel = new Bn({
8196
+ this.shadow = this.attachShadow({ mode: "open" }), this.controller = new Tn(), this.controladorTamanho = Vn(this, this.controller), this.shadow.innerHTML = Zn(), this.estilosExternos = new yr(this.shadow), this.mapContainer = this.shadow.getElementById("cad-map-container"), this.layersPanel = this.shadow.getElementById("qgis-layer-panel"), this.toolbarPainel = new Hn({
8196
8197
  shadow: this.shadow,
8197
8198
  mapContainer: this.mapContainer,
8198
8199
  layersPanel: this.layersPanel,
@@ -8203,18 +8204,18 @@ class Lr extends Gi {
8203
8204
  onToggleSnap: () => this.feicoes.alternarSnap(),
8204
8205
  onTratarCliqueCanvas: (n) => this.tratarCliqueLivreCanvas(n),
8205
8206
  onDispararAcaoPopup: (n, s) => this.dispararAcaoPopup(n, s)
8206
- }), this.broadcastConfig = new Rn({
8207
+ }), this.broadcastConfig = new jn({
8207
8208
  host: this,
8208
8209
  controller: this.controller,
8209
8210
  mapContainer: this.mapContainer,
8210
8211
  setLayerOpacity: (n, s) => this.setLayerOpacity(n, s)
8211
- }), this.colecoesDados = new Vn({
8212
+ }), this.colecoesDados = new Gn({
8212
8213
  obterController: () => this.controller,
8213
8214
  obterChaveGrupo: () => this.chaveGrupo,
8214
8215
  setLayerVisibility: (n, s) => this.setLayerVisibility(n, s)
8215
8216
  });
8216
8217
  const e = new Ye(), o = this.controller.context, i = this.controller.canvasInteracao.ctx;
8217
- Object.assign(o, { regraVersoes: e, renderizador: () => this.renderizador, qualidade: () => this.perfilQualidade }), this.feicoes = new cr({
8218
+ Object.assign(o, { regraVersoes: e, renderizador: () => this.renderizador, qualidade: () => this.perfilQualidade }), this.feicoes = new hr({
8218
8219
  obterLayerManager: () => this.controller.layerManager,
8219
8220
  obterMapa: () => this.controller.getMap(),
8220
8221
  regra: e,
@@ -8224,7 +8225,7 @@ class Lr extends Gi {
8224
8225
  this.barraFerramentas.marcar(n);
8225
8226
  },
8226
8227
  aoSnapMudar: (n) => {
8227
- ko(this.shadow, n);
8228
+ Io(this.shadow, n);
8228
8229
  },
8229
8230
  aoEdicao: (n) => {
8230
8231
  this.barraFerramentas.marcarEdicao(n);
@@ -8239,7 +8240,7 @@ class Lr extends Gi {
8239
8240
  const r = this.feicoes.tratarAcaoCamada(n, s);
8240
8241
  r && this.dispatchEvent(new CustomEvent(r, { detail: s, bubbles: !0, composed: !0 }));
8241
8242
  }
8242
- }), this.barraFerramentas = new hr({
8243
+ }), this.barraFerramentas = new fr({
8243
8244
  raiz: this.shadow.getElementById("cad-root"),
8244
8245
  aoEscolher: (n) => {
8245
8246
  this.feicoes.alternarFerramenta(n);
@@ -8253,7 +8254,7 @@ class Lr extends Gi {
8253
8254
  edicaoAtiva: () => this.feicoes.editando,
8254
8255
  aoLimparSelecao: () => this.feicoes.aoPedirLimpeza(),
8255
8256
  selecionarFeicoesNaCaixa: (n, s, r) => this.feicoes.selecionarNaCaixa(n, s, r)
8256
- }), Yn(this.shadow), ko(this.shadow, !0);
8257
+ }), ts(this.shadow), Io(this.shadow, !0);
8257
8258
  }
8258
8259
  static get observedAttributes() {
8259
8260
  return [
@@ -8285,7 +8286,8 @@ class Lr extends Gi {
8285
8286
  "linha-deslocamento",
8286
8287
  "linha-opacidade",
8287
8288
  "linha-terminacao",
8288
- "linha-juncao"
8289
+ "linha-juncao",
8290
+ ...Zi
8289
8291
  ];
8290
8292
  }
8291
8293
  connectedCallback() {
@@ -8301,7 +8303,7 @@ class Lr extends Gi {
8301
8303
  this.ponteiroSobre = !0;
8302
8304
  }), this.hoverListeners.add(this, "mouseleave", () => {
8303
8305
  this.ponteiroSobre = !1;
8304
- }), this.montarBarra(this.getAttribute("ferramentas")), this.broadcastConfig.conectar(), (o = this.desligarAnuncios) == null || o.call(this), this.desligarAnuncios = os(this, this.shadow), this.estilosExternos.aplicar(), this.initTimeout = window.setTimeout(() => {
8306
+ }), this.montarBarra(this.getAttribute("ferramentas")), this.broadcastConfig.conectar(), (o = this.desligarAnuncios) == null || o.call(this), this.desligarAnuncios = ns(this, this.shadow), this.estilosExternos.aplicar(), ho(this, this.layersPanel), this.initTimeout = window.setTimeout(() => {
8305
8307
  this.initTimeout = void 0, this.inicializarAgora();
8306
8308
  }, 0);
8307
8309
  }
@@ -8314,14 +8316,14 @@ class Lr extends Gi {
8314
8316
  if (!s || !this.mapContainer) return;
8315
8317
  const r = this.mapContainer.getBoundingClientRect(), c = y.point(o - r.left, i - r.top), l = s.containerPointToLatLng(c);
8316
8318
  if (!l || !Number.isFinite(l.lat) || !Number.isFinite(l.lng)) return;
8317
- const d = Mi(l.lat, l.lng, this.zonaProjecao), h = this.shadow.getElementById("cad-coord-fuso"), u = this.shadow.getElementById("cad-coord-utm"), m = this.shadow.getElementById("cad-coord-geo");
8319
+ const d = Ai(l.lat, l.lng, this.zonaProjecao), h = this.shadow.getElementById("cad-coord-fuso"), u = this.shadow.getElementById("cad-coord-utm"), m = this.shadow.getElementById("cad-coord-geo");
8318
8320
  h && d && (h.textContent = `${d.fuso}${d.hemisferio}`), u && d && (u.textContent = `E: ${io(d.este, 2)} m | N: ${io(d.norte, 2)} m`), m && (m.textContent = `Lat: ${l.lat.toFixed(6)}° Lon: ${l.lng.toFixed(6)}°`);
8319
8321
  };
8320
8322
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(n) : setTimeout(n, 16);
8321
8323
  }
8322
8324
  montarBarra(e) {
8323
8325
  var o;
8324
- (o = this.barraFerramentas) == null || o.montar(lr(e), dr(e));
8326
+ (o = this.barraFerramentas) == null || o.montar(ur(e), pr(e));
8325
8327
  }
8326
8328
  /** Único canvas da página: os atalhos valem em qualquer lugar (comportamento de sempre). Com vários, só no que está sob o mouse ou com foco. */
8327
8329
  ehUnicoCanvas() {
@@ -8339,7 +8341,7 @@ class Lr extends Gi {
8339
8341
  }
8340
8342
  destroy() {
8341
8343
  var e;
8342
- this.initTimeout && (window.clearTimeout(this.initTimeout), this.initTimeout = void 0), this.controladorTamanho.disconnect(), this.estilosExternos.limpar(), this.feicoes.pararEdicao(), this.feicoes.desativarFerramenta(), this.feicoes.limparMedicao(), this.feicoes.desconectarTeclado(), this.feicoes.destruir(), this.hoverListeners.cleanup(), (e = this.desligarAnuncios) == null || e.call(this), this.desligarAnuncios = null, this.broadcastConfig.desconectar(), this.limparDestaque(), this.toolbarPainel.limpar(), this.layerItemListeners.cleanup(), this.controller.destroy(), fi(this.mapContainer);
8344
+ this.initTimeout && (window.clearTimeout(this.initTimeout), this.initTimeout = void 0), this.controladorTamanho.disconnect(), this.estilosExternos.limpar(), this.feicoes.pararEdicao(), this.feicoes.desativarFerramenta(), this.feicoes.limparMedicao(), this.feicoes.desconectarTeclado(), this.feicoes.destruir(), this.hoverListeners.cleanup(), (e = this.desligarAnuncios) == null || e.call(this), this.desligarAnuncios = null, this.broadcastConfig.desconectar(), this.limparDestaque(), this.toolbarPainel.limpar(), this.layerItemListeners.cleanup(), this.controller.destroy(), mi(this.mapContainer);
8343
8345
  }
8344
8346
  disconnectedCallback() {
8345
8347
  this.destroy();
@@ -8349,6 +8351,10 @@ class Lr extends Gi {
8349
8351
  }
8350
8352
  attributeChangedCallback(e, o, i) {
8351
8353
  var n, s, r, c, l, d, h, u, m, g;
8354
+ if (Wi(e)) {
8355
+ ho(this, this.layersPanel);
8356
+ return;
8357
+ }
8352
8358
  if (e === "sem-atalho-snap") {
8353
8359
  (n = this.feicoes) == null || n.definirAtalhoSnap(i === null);
8354
8360
  return;
@@ -8372,8 +8378,8 @@ class Lr extends Gi {
8372
8378
  this.aplicarQualidadeAoMapa(), (l = this.controller) == null || l.layerManager.recriarCamadasDoTipo("feicoes");
8373
8379
  return;
8374
8380
  }
8375
- if (yr(e)) {
8376
- (d = this.feicoes) == null || d.definirEstiloDesenho(jo(this.feicoes.obterEstiloDesenho(), Pr(e, i)));
8381
+ if (Pr(e)) {
8382
+ (d = this.feicoes) == null || d.definirEstiloDesenho(Ho(this.feicoes.obterEstiloDesenho(), Sr(e, i)));
8377
8383
  return;
8378
8384
  }
8379
8385
  if (e === "aceitar-origem") {
@@ -8384,7 +8390,7 @@ class Lr extends Gi {
8384
8390
  this.montarBarra(i), (u = this.barraFerramentas) == null || u.marcar(((h = this.feicoes) == null ? void 0 : h.ferramentaAtiva) ?? null), (g = this.barraFerramentas) == null || g.marcarEdicao(!!((m = this.feicoes) != null && m.editando));
8385
8391
  return;
8386
8392
  }
8387
- Gn(
8393
+ Wn(
8388
8394
  {
8389
8395
  host: this,
8390
8396
  controller: this.controller,
@@ -8420,7 +8426,7 @@ class Lr extends Gi {
8420
8426
  this.estilosExternos.definir(e);
8421
8427
  }
8422
8428
  initCAD() {
8423
- Un({
8429
+ Xn({
8424
8430
  host: this,
8425
8431
  shadow: this.shadow,
8426
8432
  mapContainer: this.mapContainer,
@@ -8450,11 +8456,11 @@ class Lr extends Gi {
8450
8456
  }
8451
8457
  tratarCliqueLivreCanvas(e, o, i) {
8452
8458
  const n = Date.now();
8453
- n - this.lastCanvasClickTime < 50 || (this.lastCanvasClickTime = n, qn(this.obterContextoEventos(), e, o, i));
8459
+ n - this.lastCanvasClickTime < 50 || (this.lastCanvasClickTime = n, On(this.obterContextoEventos(), e, o, i));
8454
8460
  }
8455
8461
  dispararAcaoPopup(e, o, i) {
8456
8462
  const n = Date.now();
8457
- this.lastPopupActionEmit && this.lastPopupActionEmit.acaoId === e && this.lastPopupActionEmit.elementoId === o && n - this.lastPopupActionEmit.time < 50 || (this.lastPopupActionEmit = { acaoId: e, elementoId: o, time: n }, $n(this.obterContextoEventos(), e, o, i));
8463
+ this.lastPopupActionEmit && this.lastPopupActionEmit.acaoId === e && this.lastPopupActionEmit.elementoId === o && n - this.lastPopupActionEmit.time < 50 || (this.lastPopupActionEmit = { acaoId: e, elementoId: o, time: n }, Nn(this.obterContextoEventos(), e, o, i));
8458
8464
  }
8459
8465
  toggleLayersPanel() {
8460
8466
  this.hasAttribute("sem-painel-camadas") || this.toolbarPainel.toggleLayersPanel();
@@ -8464,7 +8470,7 @@ class Lr extends Gi {
8464
8470
  }
8465
8471
  renderLayersUI() {
8466
8472
  const e = this.shadow.getElementById("layers-list-container");
8467
- kn(e, this.controller.layerManager.getLayers(), this.layerItemListeners, {
8473
+ Dn(e, this.controller.layerManager.getLayers(), this.layerItemListeners, {
8468
8474
  setLayerVisibility: (o, i) => this.setLayerVisibility(o, i),
8469
8475
  setLayerOpacity: (o, i) => this.setLayerOpacity(o, i),
8470
8476
  setLayerBlocked: (o, i) => this.controller.layerManager.setLayerBlocked(o, i),
@@ -8559,7 +8565,7 @@ class Lr extends Gi {
8559
8565
  }
8560
8566
  aplicarQualidadeAoMapa() {
8561
8567
  var e;
8562
- tn((e = this.controller) == null ? void 0 : e.getMap(), this.perfilQualidade);
8568
+ an((e = this.controller) == null ? void 0 : e.getMap(), this.perfilQualidade);
8563
8569
  }
8564
8570
  /**
8565
8571
  * Contadores do desenho de uma camada de feições (`total`, `materializadas`, `desenhadas`, `marcasLOD`, `clusters`,
@@ -8614,11 +8620,11 @@ class Lr extends Gi {
8614
8620
  this.controller.selectPonto(e, o);
8615
8621
  }
8616
8622
  get pontosSelecionados() {
8617
- return In(this.controller);
8623
+ return _n(this.controller);
8618
8624
  }
8619
8625
  set pontosSelecionados(e) {
8620
8626
  const o = Array.isArray(e) ? e : [];
8621
- pi(this.controller, o), this.controller.atualizarDestaqueMarcadores();
8627
+ fi(this.controller, o), this.controller.atualizarDestaqueMarcadores();
8622
8628
  }
8623
8629
  atualizarDestaqueMarcadores() {
8624
8630
  this.controller.atualizarDestaqueMarcadores();
@@ -8791,10 +8797,10 @@ class Lr extends Gi {
8791
8797
  * inválido é ignorado (a opção volta ao padrão). Os atributos `linha-*` fazem o mesmo.
8792
8798
  */
8793
8799
  definirLinhaPadrao(e) {
8794
- this.feicoes.definirEstiloDesenho(jo(this.feicoes.obterEstiloDesenho(), e));
8800
+ this.feicoes.definirEstiloDesenho(Ho(this.feicoes.obterEstiloDesenho(), e));
8795
8801
  }
8796
8802
  obterLinhaPadrao() {
8797
- return xr(this.feicoes.obterEstiloDesenho());
8803
+ return Cr(this.feicoes.obterEstiloDesenho());
8798
8804
  }
8799
8805
  /**
8800
8806
  * Ferramentas: ponto, linha, poligono, retangulo, elipse, poligono-regular, estrela, circulo, texto, caneta,
@@ -8907,8 +8913,8 @@ class Lr extends Gi {
8907
8913
  return this.controller.layerManager;
8908
8914
  }
8909
8915
  }
8910
- Hi("ui-canvas-cad", Lr);
8911
- class Vr {
8916
+ Gi("ui-canvas-cad", Mr);
8917
+ class Ur {
8912
8918
  constructor(t, e) {
8913
8919
  f(this, "polylines", []);
8914
8920
  f(this, "bancoPontosAtivo", !1);
@@ -9051,7 +9057,7 @@ class Vr {
9051
9057
  this.core.map && this.polylines.forEach((t) => this.core.map.removeLayer(t)), this.core.bancoPontosGroup && this.core.bancoPontosGroup.clearLayers(), this.polylines = [];
9052
9058
  }
9053
9059
  }
9054
- class jr {
9060
+ class Zr {
9055
9061
  constructor(t, e) {
9056
9062
  f(this, "markers", []);
9057
9063
  f(this, "vizinhosMarkers", []);
@@ -9190,204 +9196,204 @@ class jr {
9190
9196
  }
9191
9197
  }
9192
9198
  export {
9193
- Pi as ATRIBUTOS_LINHA_PADRAO,
9194
- qi as AgrupadorCluster,
9195
- En as CADMapaController,
9196
- ea as CAD_INTERACTIVE_PANES,
9197
- Ur as CELULA_CLUSTER_PX,
9198
- Fo as CLASSE_FERRAMENTA_ATIVA,
9199
+ Li as ATRIBUTOS_LINHA_PADRAO,
9200
+ $i as AgrupadorCluster,
9201
+ Tn as CADMapaController,
9202
+ aa as CAD_INTERACTIVE_PANES,
9203
+ Kr as CELULA_CLUSTER_PX,
9204
+ Oo as CLASSE_FERRAMENTA_ATIVA,
9199
9205
  Ke as COR_PADRAO,
9200
9206
  Yt as COR_SELECAO,
9201
- bi as CSS_POSICAO_HUD,
9202
- En as CanvasCADController,
9207
+ xi as CSS_POSICAO_HUD,
9208
+ Tn as CanvasCADController,
9203
9209
  ie as CanvasFormas,
9204
- ua as CanvasInteracao,
9205
- fn as CanvasLayerManager,
9206
- Ns as ControleDesenho,
9207
- ls as CursoresRemotos,
9208
- ho as DEFAULT_CONFIG,
9209
- zo as DEFAULT_LAYERS,
9210
- Zr as DadosCamada,
9211
- un as DespachanteFeicoes,
9212
- Ks as EditorVertices,
9210
+ ma as CanvasInteracao,
9211
+ vn as CanvasLayerManager,
9212
+ Vs as ControleDesenho,
9213
+ us as CursoresRemotos,
9214
+ uo as DEFAULT_CONFIG,
9215
+ Eo as DEFAULT_LAYERS,
9216
+ Yr as DadosCamada,
9217
+ mn as DespachanteFeicoes,
9218
+ Js as EditorVertices,
9213
9219
  Ge as FERRAMENTAS,
9214
- zs as FOLGA_HUD,
9215
- Es as FRACAO_LARGURA_HUD,
9216
- gs as FeicaoPopup,
9217
- dn as FeicoesCanvasRenderer,
9218
- Xa as FeicoesLayerRenderer,
9219
- En as GerenciGeoMapaController,
9220
- ba as GridLayerRenderer,
9220
+ Is as FOLGA_HUD,
9221
+ Ts as FRACAO_LARGURA_HUD,
9222
+ bs as FeicaoPopup,
9223
+ pn as FeicoesCanvasRenderer,
9224
+ Qa as FeicoesLayerRenderer,
9225
+ Tn as GerenciGeoMapaController,
9226
+ La as GridLayerRenderer,
9221
9227
  Oe as ICONES_FEICAO,
9222
- Is as ID_HUD_DESENHO,
9223
- Hs as ID_HUD_EDICAO,
9224
- Ei as IndiceEspacial,
9225
- Wr as InternadorEstilos,
9228
+ _s as ID_HUD_DESENHO,
9229
+ Zs as ID_HUD_EDICAO,
9230
+ ki as IndiceEspacial,
9231
+ Qr as InternadorEstilos,
9226
9232
  qe as LIMIAR_DENSIDADE_ALTA,
9227
9233
  ve as LIMITE_CULLING,
9228
- Xr as LIMITE_MARCA_PX,
9234
+ Jr as LIMITE_MARCA_PX,
9229
9235
  R as LayerRendererFactory,
9230
- ws as MARGEM_HUD_PADRAO,
9231
- $a as MAX_NOS_COM_ALCA_LATENTE,
9232
- Kr as MAX_PONTOS_SEM_CLUSTER,
9233
- za as MAX_VERTICES_EDICAO,
9234
- Ii as MIN_VERTICES_SIMPLIFICAR,
9235
- _e as MapaConfigManager,
9236
- ta as MapaCore,
9237
- Vr as MapaLinhas,
9238
- jr as MapaMarcadores,
9239
- Fi as MotorFormas,
9240
- Yr as OPACIDADE_MARCA,
9236
+ ks as MARGEM_HUD_PADRAO,
9237
+ Na as MAX_NOS_COM_ALCA_LATENTE,
9238
+ tc as MAX_PONTOS_SEM_CLUSTER,
9239
+ Ia as MAX_VERTICES_EDICAO,
9240
+ Ti as MIN_VERTICES_SIMPLIFICAR,
9241
+ De as MapaConfigManager,
9242
+ ia as MapaCore,
9243
+ Ur as MapaLinhas,
9244
+ Zr as MapaMarcadores,
9245
+ Oi as MotorFormas,
9246
+ ec as OPACIDADE_MARCA,
9241
9247
  Ee as PROPRIEDADES_HUD,
9242
- hi as PintorCanvas2D,
9248
+ ui as PintorCanvas2D,
9243
9249
  Ae as RAIO_MINIMO_CIRCULO_M,
9244
- Ia as RAIO_MINIMO_EDICAO_CIRCULO_M,
9250
+ _a as RAIO_MINIMO_EDICAO_CIRCULO_M,
9245
9251
  Ye as RegraVersoes,
9246
- ds as SelecaoFeicoes,
9252
+ ps as SelecaoFeicoes,
9247
9253
  ze as SessaoDesenho,
9248
- Qr as TIPOS_LINHA,
9249
- Ra as TOLERANCIA_AMOSTRA_PX,
9254
+ oc as TIPOS_LINHA,
9255
+ ja as TOLERANCIA_AMOSTRA_PX,
9250
9256
  de as TOLERANCIA_LINHA_PX,
9251
- ia as TOLERANCIA_PONTO_PX,
9252
- xi as TOLERANCIA_SNAP_PX,
9253
- pa as TileLayerRenderer,
9254
- Lr as UICanvasCAD,
9255
- ma as VectorLinesLayerRenderer,
9256
- va as VectorPointsLayerRenderer,
9257
- ya as VectorPolygonsLayerRenderer,
9258
- fa as WmsLayerRenderer,
9259
- Jr as ZOOM_DESMEMBRAR,
9257
+ sa as TOLERANCIA_PONTO_PX,
9258
+ Pi as TOLERANCIA_SNAP_PX,
9259
+ ga as TileLayerRenderer,
9260
+ Mr as UICanvasCAD,
9261
+ ya as VectorLinesLayerRenderer,
9262
+ xa as VectorPointsLayerRenderer,
9263
+ Pa as VectorPolygonsLayerRenderer,
9264
+ va as WmsLayerRenderer,
9265
+ ic as ZOOM_DESMEMBRAR,
9260
9266
  no as ZOOM_SEM_SIMPLIFICACAO,
9261
- tc as agruparMarcasPorCor,
9262
- ec as agruparPontos,
9267
+ ac as agruparMarcasPorCor,
9268
+ nc as agruparPontos,
9263
9269
  Zt as agruparPontosPorChave,
9264
- Fa as alcaLatente,
9265
- Na as alternarSuavidade,
9266
- Ms as amostrarBezier,
9267
- ks as aplicarMargensHud,
9270
+ Ra as alcaLatente,
9271
+ Va as alternarSuavidade,
9272
+ zs as amostrarBezier,
9273
+ Ds as aplicarMargensHud,
9268
9274
  dt as areaDaGeometria,
9269
- oc as areaMetros2,
9275
+ sc as areaMetros2,
9270
9276
  Tt as bindPopupAcoesEvents,
9271
- Qs as buscarSnap,
9272
- ic as caixaDaFeicao,
9273
- ac as caixaPx,
9274
- Dt as caixasSeTocam,
9275
- nc as centroDe,
9277
+ er as buscarSnap,
9278
+ rc as caixaDaFeicao,
9279
+ cc as caixaPx,
9280
+ _t as caixasSeTocam,
9281
+ lc as centroDe,
9276
9282
  me as clonarFeicao,
9277
- Co as comPontos,
9283
+ So as comPontos,
9278
9284
  ce as comVertices,
9279
- Go as comprimentoMetros,
9280
- Rr as confrontanteParaFeicao,
9281
- Ko as consultarFeicoesNoPonto,
9282
- Mo as contarItensCanvas,
9283
- _r as converterArea,
9284
- Tr as converterComprimento,
9285
+ Uo as comprimentoMetros,
9286
+ Hr as confrontanteParaFeicao,
9287
+ Yo as consultarFeicoesNoPonto,
9288
+ Ao as contarItensCanvas,
9289
+ Fr as converterArea,
9290
+ $r as converterComprimento,
9285
9291
  ae as coordenadaDeReferencia,
9286
9292
  He as corHexSegura,
9287
9293
  ot as corSegura,
9288
- Nn as criarControladorTamanho,
9294
+ Vn as criarControladorTamanho,
9289
9295
  Kt as criarLinha,
9290
- sc as dashTipoLinha,
9291
- Dr as ddParaDms,
9292
- wa as deslocarGeometria,
9296
+ dc as dashTipoLinha,
9297
+ Or as ddParaDms,
9298
+ ka as deslocarGeometria,
9293
9299
  ro as deveAgrupar,
9294
9300
  so as diagonalPx,
9295
- $r as distanciaEntre,
9301
+ Rr as distanciaEntre,
9296
9302
  Pt as distanciaMetros,
9297
- xa as dividirPoligonoComLinha,
9298
- qr as dmsParaDd,
9299
- yi as ehFerramenta,
9303
+ Ca as dividirPoligonoComLinha,
9304
+ Nr as dmsParaDd,
9305
+ bi as ehFerramenta,
9300
9306
  _i as ehMarca,
9301
9307
  Xt as ehMultilinha,
9302
- rc as ehTipoLinha,
9308
+ hc as ehTipoLinha,
9303
9309
  ct as entidadeDe,
9304
9310
  ne as entradaDaAncora,
9305
- cc as escalaDoZoom,
9306
- lc as escalaLatitude,
9307
- dc as escalaTipoLinhaSegura,
9311
+ uc as escalaDoZoom,
9312
+ pc as escalaLatitude,
9313
+ fc as escalaTipoLinhaSegura,
9308
9314
  T as escapeHtml,
9309
9315
  Te as estiloVetorDe,
9310
9316
  ht as extensaoDaGeometria,
9311
9317
  oo as extrairCentroDeWkt,
9312
- ga as extrairCorPonto,
9313
- Qo as fatorDensidade,
9314
- ir as feicaoNaCaixa,
9315
- ar as feicaoNoLaco,
9318
+ ba as extrairCorPonto,
9319
+ Jo as fatorDensidade,
9320
+ sr as feicaoNaCaixa,
9321
+ rr as feicaoNoLaco,
9316
9322
  le as feicaoNoPonto,
9317
- Ir as feicaoNoTopo,
9323
+ qr as feicaoNoTopo,
9318
9324
  io as formatUTM,
9319
9325
  Ct as formatarArea,
9320
9326
  Z as formatarExtensao,
9321
- na as garantirCanvasSemEventos,
9322
- Aa as gerarBuffer,
9327
+ ca as garantirCanvasSemEventos,
9328
+ Ea as gerarBuffer,
9323
9329
  ee as getPointShapeHtml,
9324
- Da as inserirPonto,
9325
- Ea as inserirVertice,
9326
- Bi as juncaoCanvas,
9327
- Pa as juntarLinhas,
9328
- Sa as juntarPoligonos,
9329
- Di as ladoMarca,
9330
+ Fa as inserirPonto,
9331
+ Ta as inserirVertice,
9332
+ Vi as juncaoCanvas,
9333
+ Sa as juntarLinhas,
9334
+ wa as juntarPoligonos,
9335
+ qi as ladoMarca,
9330
9336
  lo as latLonDoMundo,
9331
- Mi as latLonParaUtm,
9332
- hn as lerModoRenderizador,
9333
- Ni as limitesDaGeometria,
9337
+ Ai as latLonParaUtm,
9338
+ fn as lerModoRenderizador,
9339
+ Ri as limitesDaGeometria,
9334
9340
  Ze as metrosPorGrau,
9335
- hc as metrosPorPixel,
9341
+ mc as metrosPorPixel,
9336
9342
  re as minimoVertices,
9337
9343
  $e as modoDensidade,
9338
- Oa as moverAlca,
9339
- Fr as moverVertice,
9340
- gi as normalizarAnel,
9344
+ Ba as moverAlca,
9345
+ Br as moverVertice,
9346
+ vi as normalizarAnel,
9341
9347
  W as normalizarCoordenada,
9342
9348
  Se as normalizarFeicaoEntrada,
9343
- Io as normalizarLinha,
9344
- as as normalizarPoligono,
9345
- ji as normalizarTipoLinha,
9349
+ To as normalizarLinha,
9350
+ rs as normalizarPoligono,
9351
+ Hi as normalizarTipoLinha,
9346
9352
  Y as nosDe,
9347
9353
  Gt as nosDeAncoras,
9348
- _t as nosOuVertices,
9354
+ Dt as nosOuVertices,
9349
9355
  Wt as ordenarPontosPorSequencia,
9350
9356
  V as parseCoordenada,
9351
- Ya as parseDash,
9357
+ tn as parseDash,
9352
9358
  it as partesDaLinha,
9353
- zi as pintarMarcas,
9354
- Ta as pontoDaBordaDoCirculo,
9355
- si as pontoMedio,
9359
+ Ei as pintarMarcas,
9360
+ qa as pontoDaBordaDoCirculo,
9361
+ ri as pontoMedio,
9356
9362
  kt as pontoMedioDoSegmento,
9357
- ii as pontoNoPoligono,
9358
- Or as pontoParaFeicao,
9363
+ ai as pontoNoPoligono,
9364
+ Vr as pontoParaFeicao,
9359
9365
  pt as pontosDe,
9360
- Br as posicaoHud,
9361
- $n as processarAcaoPopup,
9362
- qn as processarCliqueLivreCanvas,
9363
- uc as projetarCentro,
9364
- pc as projetarEm,
9365
- fc as projetarMercator,
9366
- mc as projetarVertices,
9367
- gc as raioCirculoPx,
9366
+ Gr as posicaoHud,
9367
+ Nn as processarAcaoPopup,
9368
+ On as processarCliqueLivreCanvas,
9369
+ gc as projetarCentro,
9370
+ vc as projetarEm,
9371
+ yc as projetarMercator,
9372
+ bc as projetarVertices,
9373
+ xc as raioCirculoPx,
9368
9374
  co as raioPontoPx,
9369
- Ja as regioesExpostas,
9370
- Wo as registrarFonteHit,
9371
- Xo as removerFonteHit,
9372
- qa as removerPonto,
9373
- ka as removerVertice,
9375
+ on as regioesExpostas,
9376
+ Xo as registrarFonteHit,
9377
+ Ko as removerFonteHit,
9378
+ Oa as removerPonto,
9379
+ Da as removerVertice,
9374
9380
  It as renderPopupAcoesHtml,
9375
- kn as renderizarPainelCamadas,
9376
- ha as resolverCliqueCentral,
9377
- Nr as segmentoParaFeicao,
9378
- ri as segmentosDe,
9379
- ci as segmentosDoEditor,
9380
- vc as simplificarAnel,
9381
- Ti as simplificarGeometria,
9382
- yc as simplificarLinha,
9383
- bc as simplificarPx,
9381
+ Dn as renderizarPainelCamadas,
9382
+ fa as resolverCliqueCentral,
9383
+ jr as segmentoParaFeicao,
9384
+ ci as segmentosDe,
9385
+ li as segmentosDoEditor,
9386
+ Pc as simplificarAnel,
9387
+ Di as simplificarGeometria,
9388
+ Lc as simplificarLinha,
9389
+ Cc as simplificarPx,
9384
9390
  mt as statusDe,
9385
- Vi as terminacaoCanvas,
9386
- $i as textoRotulo,
9387
- xc as toleranciaPorZoom,
9388
- Fn as tratarCliqueMarcador,
9389
- On as tratarCliqueSegmento,
9390
- Lo as verificarEditavel,
9391
- ki as vertices,
9391
+ ji as terminacaoCanvas,
9392
+ Fi as textoRotulo,
9393
+ Sc as toleranciaPorZoom,
9394
+ Rn as tratarCliqueMarcador,
9395
+ Bn as tratarCliqueSegmento,
9396
+ Co as verificarEditavel,
9397
+ Ii as vertices,
9392
9398
  X as verticesDe
9393
9399
  };