@thibezer/ui-components-kit 2.26.0 → 2.26.1

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.
package/dist/canvas.js CHANGED
@@ -1,19 +1,19 @@
1
- var ea = Object.defineProperty;
2
- var oa = (n, t, e) => t in n ? ea(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var f = (n, t, e) => oa(n, typeof t != "symbol" ? t + "" : t, e);
1
+ var aa = Object.defineProperty;
2
+ var ia = (n, t, e) => t in n ? aa(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var f = (n, t, e) => ia(n, typeof t != "symbol" ? t + "" : t, e);
4
4
  /* empty css */
5
- import { o as mt, q as aa, r as ia, p as Rt, C as Bt, n as et, s as De, I as na, u as pt, v as st, w as sa, M as ra, Z as Be, x as ca, y as zt, z as ve, A as Ve, B as la, D as je, a as Ge, h as be, E as da, F as ct, G as lt, H as gt, J as W, i as He, R as _e, K as ha, f as Ao, d as ua, j as vt, l as zo, k as pa, L as fa, N as ma, O as ga } from "./geometria-px-DHMPUsxC.js";
6
- import { P as zr, T as wr, c as Er, Q as kr, S as Ir, U as Tr, V as Dr, W as _r, X as qr, Y as $r, _ as Fr, b as Nr, m as Or, $ as Rr, a0 as Br, a1 as Vr, a2 as jr, a3 as Gr, a4 as Hr, a5 as Ur, a6 as Zr, a7 as Wr } from "./geometria-px-DHMPUsxC.js";
7
- import { pintarMarcas as va, ehMarca as ba, ladoMarca as ya, diagonalPx as Ue, deveAgrupar as Ze, AgrupadorCluster as xa, MotorFormas as Pa } from "./motor.js";
8
- import { CELULA_CLUSTER_PX as Kr, DadosCamada as Yr, LIMITE_MARCA_PX as Qr, MAX_PONTOS_SEM_CLUSTER as Jr, OPACIDADE_MARCA as tc, ZOOM_DESMEMBRAR as ec, agruparMarcasPorCor as oc, agruparPontos as ac, centroDe as ic, projetarMercator as nc } from "./motor.js";
5
+ import { o as mt, q as na, r as sa, p as Rt, C as Bt, n as et, s as _e, I as ra, u as pt, v as st, w as ca, M as la, Z as Ve, x as da, y as zt, z as ve, A as je, B as ha, D as Ge, a as He, h as be, E as ua, F as ct, G as lt, H as gt, J as W, i as Ue, R as qe, K as pa, f as zo, d as fa, j as vt, l as wo, k as ma, L as ga, N as va, O as ba } from "./geometria-px-DHMPUsxC.js";
6
+ import { P as Ir, T as Tr, c as Dr, Q as _r, S as qr, U as $r, V as Fr, W as Nr, X as Or, Y as Rr, _ as Br, b as Vr, m as jr, $ as Gr, a0 as Hr, a1 as Ur, a2 as Zr, a3 as Wr, a4 as Xr, a5 as Kr, a6 as Yr, a7 as Qr } from "./geometria-px-DHMPUsxC.js";
7
+ import { pintarMarcas as ya, ehMarca as xa, ladoMarca as Pa, diagonalPx as Ze, deveAgrupar as We, AgrupadorCluster as La, MotorFormas as Ca } from "./motor.js";
8
+ import { CELULA_CLUSTER_PX as tc, DadosCamada as ec, LIMITE_MARCA_PX as oc, MAX_PONTOS_SEM_CLUSTER as ac, OPACIDADE_MARCA as ic, ZOOM_DESMEMBRAR as nc, agruparMarcasPorCor as sc, agruparPontos as rc, centroDe as cc, projetarMercator as lc } from "./motor.js";
9
9
  import b from "leaflet";
10
- import { e as T, p as V, r as Ct, b as St, a as Vt, o as jt, c as We, l as La, f as Xe } from "./utils-DrHoxxmf.js";
11
- import { K as bt, M as Yt, L as Gt, l as Ca, S as Sa, A as Ma, g as Ke, s as Aa, d as za } from "./kit-base-CBXA66aM.js";
12
- import { E as wa, s as Ea, p as ka, c as Ye, P as wo, d as Ia, e as Jt, f as Ta, h as Da, j as _a, i as qa, k as X, l as yt, n as U, m as dt, o as Eo, q as Q, r as ye, t as ko, u as Qe, v as $a, w as xe, x as Je, y as Fa, M as Na, z as wt, A as Oa, B as Ra, C as Ba, D as to, T as Va, F as ja, G as Ga, H as Ha } from "./feature_caixa-BVc5LenS.js";
13
- import { I as rc, R as cc, J as lc, K as dc, L as hc, N as uc, O as pc, Q as fc, S as mc, U as gc, V as vc, W as bc, X as yc, Y as xc, Z as Pc } from "./feature_caixa-BVc5LenS.js";
14
- import { S as te, e as eo, a as Io, F as oo } from "./feature_desenho-CC8Mp5Gp.js";
15
- import { R as Cc, b as Sc, n as Mc } from "./feature_desenho-CC8Mp5Gp.js";
16
- const ao = {
10
+ import { e as T, p as V, r as Ct, b as St, a as Vt, o as jt, c as Xe, l as Sa, f as Ke } from "./utils-DrHoxxmf.js";
11
+ import { K as bt, M as Yt, L as Gt, l as Ma, S as Aa, A as za, g as Ye, s as wa, d as Ea } from "./kit-base-CBXA66aM.js";
12
+ import { E as ka, s as Ia, p as Ta, c as Qe, P as Eo, d as Da, e as Jt, f as _a, h as qa, j as $a, i as Fa, k as X, l as yt, n as U, m as dt, o as ko, q as Q, r as ye, t as Io, u as Je, v as Na, w as xe, x as to, y as Oa, M as Ra, z as wt, A as Ba, B as Va, C as ja, D as eo, T as Ga, F as Ha, G as Ua, H as Za } from "./feature_caixa-BVc5LenS.js";
13
+ import { I as hc, R as uc, J as pc, K as fc, L as mc, N as gc, O as vc, Q as bc, S as yc, U as xc, V as Pc, W as Lc, X as Cc, Y as Sc, Z as Mc } from "./feature_caixa-BVc5LenS.js";
14
+ import { S as te, e as oo, a as To, F as ao } from "./feature_desenho-CC8Mp5Gp.js";
15
+ import { R as zc, b as wc, n as Ec } from "./feature_desenho-CC8Mp5Gp.js";
16
+ const io = {
17
17
  perimetroWeight: 1,
18
18
  fechamentoWeight: 1,
19
19
  vizinhoWeight: 1,
@@ -42,11 +42,11 @@ const ao = {
42
42
  try {
43
43
  const t = typeof localStorage < "u" ? localStorage.getItem("gerencigeo_mapa_config") : null;
44
44
  if (t)
45
- return { ...ao, ...JSON.parse(t) };
45
+ return { ...io, ...JSON.parse(t) };
46
46
  } catch (t) {
47
47
  console.error("Erro ao carregar configurações do mapa", t);
48
48
  }
49
- return { ...ao };
49
+ return { ...io };
50
50
  }
51
51
  saveConfig(t) {
52
52
  this.config = { ...this.config, ...t }, typeof localStorage < "u" && localStorage.setItem("gerencigeo_mapa_config", JSON.stringify(this.config));
@@ -57,22 +57,22 @@ const ao = {
57
57
  };
58
58
  f(rt, "instance");
59
59
  let Pe = rt;
60
- const qe = "sob-demanda", Ua = 700;
60
+ const $e = "sob-demanda", Wa = 700;
61
61
  function Ht(n) {
62
62
  const t = typeof n == "string" ? n.trim().toLowerCase() : "";
63
- return t === "automatico" || t === "desligado" || t === "sob-demanda" ? t : qe;
63
+ return t === "automatico" || t === "desligado" || t === "sob-demanda" ? t : $e;
64
64
  }
65
65
  const $t = /* @__PURE__ */ new WeakMap();
66
- function Za(n) {
66
+ function Xa(n) {
67
67
  const t = n && typeof n == "object" ? n.options : void 0;
68
68
  return !!t && t.closeButton !== void 0 && t.autoPan !== void 0;
69
69
  }
70
- function $e(n, t) {
70
+ function Fe(n, t) {
71
71
  const e = n ? $t.get(n) : void 0;
72
72
  return e ? e.liberar(t) : t();
73
73
  }
74
- class Wa {
75
- constructor(t, e = qe) {
74
+ class Ka {
75
+ constructor(t, e = $e) {
76
76
  f(this, "liberados", 0);
77
77
  /** Verdadeiro durante o despacho síncrono de um clique no mapa (o Leaflet abre popups dentro dele). */
78
78
  f(this, "emClique", !1);
@@ -90,7 +90,7 @@ class Wa {
90
90
  this.map = t, this.modoAtual = e, this.original = t.addLayer;
91
91
  const o = this;
92
92
  t.addLayer = function(i) {
93
- return Za(i) ? o.aoAbrir(this, i) : o.original.call(this, i);
93
+ return Xa(i) ? o.aoAbrir(this, i) : o.original.call(this, i);
94
94
  }, this.container = typeof t.getContainer == "function" ? t.getContainer() : null, (a = this.container) == null || a.addEventListener("click", this.marcarClique, !0), $t.set(t, this);
95
95
  }
96
96
  get modo() {
@@ -128,14 +128,22 @@ class Wa {
128
128
  return (r = e.openPopup) == null ? void 0 : r.call(e, typeof e.getLatLng == "function" || s == null ? void 0 : s.latlng);
129
129
  });
130
130
  };
131
- o = setTimeout(a, Ua), e.on("dblclick", i), this.pendentes.set(e, a);
131
+ o = setTimeout(a, Wa), e.on("dblclick", i), this.pendentes.set(e, a);
132
132
  }
133
133
  cancelarPendentes() {
134
134
  for (const t of [...this.pendentes.values()]) t();
135
135
  this.pendentes.clear();
136
136
  }
137
137
  }
138
- async function Xa(n, t, e, o) {
138
+ const Do = "https://geoportal.incra.gov.br/geoserver/wms", Le = "geonode:sigef_geo";
139
+ function Ya(n, t, e, o) {
140
+ return `${Do}?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=image/png&TRANSPARENT=true&QUERY_LAYERS=${Le}&LAYERS=${Le}&FEATURE_COUNT=10&INFO_FORMAT=application/json&X=${n}&Y=${t}&WIDTH=${e.x}&HEIGHT=${e.y}&SRS=EPSG:4326&BBOX=${o}`;
141
+ }
142
+ function Qa(n) {
143
+ const t = (n == null ? void 0 : n.properties) ?? {}, e = n == null ? void 0 : n.id, o = e != null && !String(e).startsWith("sigef_geo.") ? String(e) : "";
144
+ return String(t.parcela_codigo || t.co_parcela || t.id_parcela || o || "");
145
+ }
146
+ async function Ja(n, t, e, o) {
139
147
  const a = n.getSize(), i = n.getBounds(), s = i.getSouthWest(), r = i.getNorthEast(), c = `${s.lng},${s.lat},${r.lng},${r.lat}`;
140
148
  let l = 0, d = 0;
141
149
  try {
@@ -148,7 +156,7 @@ async function Xa(n, t, e, o) {
148
156
  } catch {
149
157
  l = 0, d = 0;
150
158
  }
151
- const h = `https://acervofundiario.incra.gov.br/i3geo/ogc.php?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=image/png&TRANSPARENT=true&QUERY_LAYERS=certificada_sigef_particular_pr&LAYERS=certificada_sigef_particular_pr&INFO_FORMAT=application/json&X=${l}&Y=${d}&WIDTH=${a.x}&HEIGHT=${a.y}&SRS=EPSG:4326&BBOX=${c}`, u = n.getContainer();
159
+ const h = Ya(l, d, a, c), u = n.getContainer();
152
160
  u.style.cursor = "wait";
153
161
  const m = b.popup({
154
162
  className: "compact-sigef-popup",
@@ -162,16 +170,16 @@ async function Xa(n, t, e, o) {
162
170
  Consultando...
163
171
  </div>
164
172
  `);
165
- $e(n, () => m.openOn(n)), o.currentAbortController && o.currentAbortController.abort(), o.currentAbortController = new AbortController();
173
+ Fe(n, () => m.openOn(n)), o.currentAbortController && o.currentAbortController.abort(), o.currentAbortController = new AbortController();
166
174
  const g = o.currentAbortController.signal, p = setTimeout(() => {
167
175
  o.currentAbortController && o.currentAbortController.abort();
168
176
  }, 8e3);
169
177
  try {
170
- const y = typeof window < "u" && (window.location.origin.includes("localhost") || window.location.origin.includes("127.0.0.1") || window.location.origin.includes("[::1]")) ? `${e}/proxy/sigef?url=${encodeURIComponent(h)}` : `${window.location.origin}/api.php?action=proxy_sigef&url=${encodeURIComponent(h)}`, A = await fetch(y, { signal: g });
178
+ const y = typeof window < "u" && (window.location.origin.includes("localhost") || window.location.origin.includes("127.0.0.1") || window.location.origin.includes("[::1]")) ? `${e}/proxy/sigef?url=${encodeURIComponent(h)}` : `${window.location.origin}/api.php?action=proxy_sigef&url=${encodeURIComponent(h)}`, M = await fetch(y, { signal: g });
171
179
  clearTimeout(p);
172
180
  let x = null;
173
- if (A.ok) {
174
- const S = await A.text();
181
+ if (M.ok) {
182
+ const S = await M.text();
175
183
  try {
176
184
  x = JSON.parse(S);
177
185
  } catch {
@@ -179,19 +187,19 @@ async function Xa(n, t, e, o) {
179
187
  }
180
188
  }
181
189
  if (x && x.features && x.features.length > 0) {
182
- const S = x.features[0], M = S.properties || {}, P = String(S.id || M.parcela_codigo || M.co_parcela || M.id_parcela || ""), C = String(M.nome_area || M.nome_imovel || "Imóvel Sem Nome");
190
+ const S = x.features[0], A = S.properties || {}, P = Qa(S), C = String(A.nome_area || A.nome_imovel || "Imóvel Sem Nome");
183
191
  if (P) {
184
192
  const z = encodeURIComponent(P), E = `https://sigef.incra.gov.br/geo/exportar/parcela/shp/${z}/`, L = `https://sigef.incra.gov.br/geo/parcela/detalhe/${z}/`, w = document.createElement("div");
185
193
  w.style.cssText = "font-family:var(--ui-fonte-base, sans-serif); color:rgba(255, 255, 255, 0.9); line-height:1.4; min-width:180px;", w.innerHTML = `
186
194
  <div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; padding-bottom:5px; border-bottom:1px solid rgba(255, 255, 255, 0.1);">
187
195
  <span style="font-weight:700; font-size:11px; color:#10b981; text-transform:uppercase; letter-spacing:0.5px;">SIGEF</span>
188
- <span style="font-size:10px; color:rgba(255, 255, 255, 0.5);">${T(M.situacao_informada || M.status || "Certificada")}</span>
196
+ <span style="font-size:10px; color:rgba(255, 255, 255, 0.5);">${T(A.situacao_informada || A.status || "Certificada")}</span>
189
197
  </div>
190
198
  <div style="font-weight:700; font-size:12px; margin-bottom:4px; color:#ffffff; word-break:break-word;">${T(C)}</div>
191
- <div style="font-size:11px; color:rgba(255, 255, 255, 0.7); margin-bottom:2px;">Cód: <span style="font-family:var(--ui-fonte-codigo, monospace);">${T(M.codigo_imovel || "N/A")}</span></div>
199
+ <div style="font-size:11px; color:rgba(255, 255, 255, 0.7); margin-bottom:2px;">Cód: <span style="font-family:var(--ui-fonte-codigo, monospace);">${T(A.codigo_imovel || "N/A")}</span></div>
192
200
  <div style="display:flex; gap:12px; font-size:11px; color:rgba(255, 255, 255, 0.7); margin-bottom:6px;">
193
- <span>Mat: <strong style="color:#ffffff;">${T(M.registro_matricula || M.matricula || "N/A")}</strong></span>
194
- <span>${T(M.data_submissao || "")}</span>
201
+ <span>Mat: <strong style="color:#ffffff;">${T(A.registro_matricula || A.matricula || "N/A")}</strong></span>
202
+ <span>${T(A.data_submissao || "")}</span>
195
203
  </div>
196
204
  <div style="display:flex; flex-direction:column; gap:5px; padding-top:6px; border-top:1px solid rgba(255, 255, 255, 0.1);">
197
205
  <a href="${E}" target="_blank" rel="noopener noreferrer" style="display:flex; align-items:center; justify-content:center; gap:5px; padding:5px 8px; background:rgba(16, 185, 129, 0.15); border:1px solid rgba(16, 185, 129, 0.3); color:#34d399; font-size:11px; font-weight:700; border-radius:5px; text-decoration:none; cursor:pointer;">
@@ -242,13 +250,13 @@ async function Xa(n, t, e, o) {
242
250
  u.style.cursor = "";
243
251
  }
244
252
  }
245
- function Ka(n, t) {
253
+ function ti(n, t) {
246
254
  if (!n) return;
247
255
  const e = Math.floor(n.getZoom()), o = Math.max(e, 12), a = Math.min(e + 1, 19), i = t.pad(0.2), s = ["mt0", "mt1", "mt2", "mt3"];
248
256
  let r = 0;
249
257
  const c = 32;
250
258
  for (let l = o; l <= a && r < c; l++) {
251
- const d = i.getNorthWest(), h = i.getSouthEast(), u = io(d.lng, l), m = io(h.lng, l), g = no(d.lat, l), p = no(h.lat, l);
259
+ const d = i.getNorthWest(), h = i.getSouthEast(), u = no(d.lng, l), m = no(h.lng, l), g = so(d.lat, l), p = so(h.lat, l);
252
260
  for (let v = u; v <= m && r < c; v++)
253
261
  for (let y = g; y <= p && r < c; y++) {
254
262
  const x = `https://${s[(v + y) % s.length]}.google.com/vt/lyrs=s,h&x=${v}&y=${y}&z=${l}`, S = new Image();
@@ -256,30 +264,30 @@ function Ka(n, t) {
256
264
  }
257
265
  }
258
266
  }
259
- function io(n, t) {
267
+ function no(n, t) {
260
268
  return Math.floor((n + 180) / 360 * Math.pow(2, t));
261
269
  }
262
- function no(n, t) {
270
+ function so(n, t) {
263
271
  const e = n * Math.PI / 180;
264
272
  return Math.floor(
265
273
  (1 - Math.log(Math.tan(e) + 1 / Math.cos(e)) / Math.PI) / 2 * Math.pow(2, t)
266
274
  );
267
275
  }
268
- const Ya = {
276
+ const ei = {
269
277
  zoomSnap: 0.25,
270
278
  zoomDelta: 0.5,
271
279
  wheelPxPerZoomLevel: 90
272
280
  };
273
- function Qa(n, t) {
281
+ function oi(n, t) {
274
282
  const e = n;
275
283
  return !e || !t || e._popup !== t ? !1 : (e._popup = null, !0);
276
284
  }
277
- function Ja(n) {
285
+ function ai(n) {
278
286
  n.on("popupclose", (t) => {
279
- Qa(n, t.popup);
287
+ oi(n, t.popup);
280
288
  });
281
289
  }
282
- class ti {
290
+ class ii {
283
291
  constructor(t) {
284
292
  f(this, "map", null);
285
293
  f(this, "configManager", Pe.getInstance());
@@ -293,7 +301,7 @@ class ti {
293
301
  f(this, "sigefState", {});
294
302
  /** Decide quando os popups do mapa abrem (ver `popup_gate.ts`). Existe enquanto houver mapa. */
295
303
  f(this, "popups", null);
296
- f(this, "modoPopups", qe);
304
+ f(this, "modoPopups", $e);
297
305
  this.controller = t;
298
306
  }
299
307
  /** Vale já, ou assim que o mapa for criado (o atributo `popups` pode ser lido antes do mapa existir). */
@@ -325,8 +333,8 @@ class ti {
325
333
  scrollWheelZoom: !0,
326
334
  preferCanvas: this.config.preferCanvas !== void 0 ? this.config.preferCanvas : !0,
327
335
  zoomControl: !1,
328
- ...Ya
329
- }).setView([-23.7661, -53.3204], 14), this.popups = new Wa(this.map, this.modoPopups), this.listenConfigBroadcast(), this.applyMapStyles(), Ja(this.map), !this.map.getPane("sigefPane")) {
336
+ ...ei
337
+ }).setView([-23.7661, -53.3204], 14), this.popups = new Ka(this.map, this.modoPopups), this.listenConfigBroadcast(), this.applyMapStyles(), ai(this.map), !this.map.getPane("sigefPane")) {
330
338
  const a = this.map.createPane("sigefPane");
331
339
  a.style.zIndex = "390";
332
340
  }
@@ -405,13 +413,13 @@ class ti {
405
413
  }
406
414
  }
407
415
  preCarregarTilesRegiao(t) {
408
- Ka(this.map, t);
416
+ ti(this.map, t);
409
417
  }
410
418
  async consultarSigef(t) {
411
- this.map && await Xa(this.map, t, this.apiBaseUrl, this.sigefState);
419
+ this.map && await Ja(this.map, t, this.apiBaseUrl, this.sigefState);
412
420
  }
413
421
  }
414
- const ei = [
422
+ const ni = [
415
423
  "verticesPane",
416
424
  "perimetroPane",
417
425
  "overlayPane",
@@ -422,7 +430,7 @@ const ei = [
422
430
  "pane-homologados",
423
431
  "pane-homologados-pontos"
424
432
  ];
425
- class oi {
433
+ class si {
426
434
  constructor(t, e, o) {
427
435
  f(this, "map");
428
436
  f(this, "mapContainer");
@@ -437,7 +445,7 @@ class oi {
437
445
  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));
438
446
  }
439
447
  setPanesPointerEvents(t) {
440
- ei.forEach((e) => {
448
+ ni.forEach((e) => {
441
449
  const o = this.map.getPane(e);
442
450
  o && (o.style.pointerEvents = t);
443
451
  });
@@ -452,11 +460,11 @@ class oi {
452
460
  this.selectionDiv.style.left = `${Math.round(r)}px`, this.selectionDiv.style.top = `${Math.round(c)}px`, this.selectionDiv.style.width = `${Math.round(i)}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");
453
461
  }
454
462
  finalizarSelecao(t, e, o) {
455
- var M, P, C, z, E, L, w, I, D;
463
+ var A, P, C, z, E, L, w, I, D;
456
464
  if (!this.isSelecting) return !1;
457
465
  this.isSelecting = !1, this.selectionDiv && (this.selectionDiv.style.display = "none"), this.map.closePopup();
458
466
  try {
459
- this.setPanesPointerEvents("auto"), (M = this.ctx.layerManager) == null || M.ensurePanes();
467
+ this.setPanesPointerEvents("auto"), (A = this.ctx.layerManager) == null || A.ensurePanes();
460
468
  } catch {
461
469
  }
462
470
  const a = this.mapContainer.getBoundingClientRect(), i = t.clientX - a.left, s = t.clientY - a.top, r = this.map.mouseEventToContainerPoint(t), c = Math.abs(i - this.selectStartPos.x), l = Math.abs(s - this.selectStartPos.y);
@@ -476,7 +484,7 @@ class oi {
476
484
  y2: Math.max(this.selectStartPoint.y, r.y)
477
485
  }, h = r.x >= this.selectStartPoint.x ? "window" : "crossing", u = !!(t.ctrlKey || t.metaKey), m = !!t.shiftKey, g = m ? "adicionar" : u ? "subtrair" : "substituir";
478
486
  (w = (L = this.ctx).selecionarFeicoesNaCaixa) == null || w.call(L, d, h, g);
479
- const p = ((I = this.ctx.mapaController) == null ? void 0 : I.getMarkers()) || [], v = ((D = this.ctx.mapaController) == null ? void 0 : D.getVizinhosMarkers()) || [], y = [], A = [], x = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vertices"), S = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vizinhos");
487
+ const p = ((I = this.ctx.mapaController) == null ? void 0 : I.getMarkers()) || [], v = ((D = this.ctx.mapaController) == null ? void 0 : D.getVizinhosMarkers()) || [], y = [], M = [], x = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vertices"), S = !this.ctx.layerManager || this.ctx.layerManager.isLayerActiveAndSelectable("vizinhos");
480
488
  return x && p.forEach((k) => {
481
489
  const $ = k.pontoId;
482
490
  if (!$) return;
@@ -486,12 +494,12 @@ class oi {
486
494
  const $ = k.pontoId;
487
495
  if (!$) return;
488
496
  const q = this.map.latLngToContainerPoint(k.getLatLng());
489
- q.x >= d.x1 && q.x <= d.x2 && q.y >= d.y1 && q.y <= d.y2 && A.push($);
497
+ q.x >= d.x1 && q.x <= d.x2 && q.y >= d.y1 && q.y <= d.y2 && M.push($);
490
498
  }), m ? (y.forEach((k) => {
491
499
  this.ctx.selectedPontoIds.includes(k) || this.ctx.selectedPontoIds.push(k);
492
- }), A.forEach((k) => {
500
+ }), M.forEach((k) => {
493
501
  this.ctx.selectedVizinhoPontoIds.includes(k) || this.ctx.selectedVizinhoPontoIds.push(k);
494
- })) : u ? (this.ctx.selectedPontoIds = this.ctx.selectedPontoIds.filter((k) => !y.includes(k)), this.ctx.selectedVizinhoPontoIds = this.ctx.selectedVizinhoPontoIds.filter((k) => !A.includes(k))) : (this.ctx.selectedPontoIds = y, this.ctx.selectedVizinhoPontoIds = A), this.ctx.selectedPontoIds.length > 0 && (this.ctx.lastSelectedPontoId = this.ctx.selectedPontoIds[this.ctx.selectedPontoIds.length - 1]), e(), !0;
502
+ })) : u ? (this.ctx.selectedPontoIds = this.ctx.selectedPontoIds.filter((k) => !y.includes(k)), this.ctx.selectedVizinhoPontoIds = this.ctx.selectedVizinhoPontoIds.filter((k) => !M.includes(k))) : (this.ctx.selectedPontoIds = y, this.ctx.selectedVizinhoPontoIds = M), this.ctx.selectedPontoIds.length > 0 && (this.ctx.lastSelectedPontoId = this.ctx.selectedPontoIds[this.ctx.selectedPontoIds.length - 1]), e(), !0;
495
503
  }
496
504
  cancelarSelecao() {
497
505
  this.isSelecting && (this.isSelecting = !1, this.selectionDiv && (this.selectionDiv.style.display = "none"), this.setPanesPointerEvents("auto"), this.ctx.layerManager && this.ctx.layerManager.ensurePanes());
@@ -503,32 +511,32 @@ class oi {
503
511
  function ft(n) {
504
512
  return `pane-${n}`;
505
513
  }
506
- const To = ["poligono", "linha", "ponto", "texto"];
507
- function Do(n, t) {
514
+ const _o = ["poligono", "linha", "ponto", "texto"];
515
+ function qo(n, t) {
508
516
  return `${ft(n)}-${t}`;
509
517
  }
510
518
  function Z(n, t, e) {
511
- const o = n.getPane(ft(t)) ?? n.createPane(ft(t)), a = Do(t, e);
519
+ const o = n.getPane(ft(t)) ?? n.createPane(ft(t)), a = qo(t, e);
512
520
  if (!n.getPane(a)) {
513
521
  const i = n.createPane(a, o);
514
- i.style.zIndex = String((To.indexOf(e) + 1) * 100);
522
+ i.style.zIndex = String((_o.indexOf(e) + 1) * 100);
515
523
  }
516
524
  return a;
517
525
  }
518
- const so = "ui-canvas-hit-test-estilo", ee = 6, ai = 4, ii = 4, Et = { poligono: 1, linha: 2, ponto: 3, texto: 3 };
519
- function ni(n) {
526
+ const ro = "ui-canvas-hit-test-estilo", ee = 6, ri = 4, ci = 4, Et = { poligono: 1, linha: 2, ponto: 3, texto: 3 };
527
+ function li(n) {
520
528
  var a;
521
529
  const t = n.getRootNode(), e = t instanceof ShadowRoot ? t : document.head;
522
- if ((a = e.querySelector) != null && a.call(e, `#${so}`)) return;
530
+ if ((a = e.querySelector) != null && a.call(e, `#${ro}`)) return;
523
531
  const o = document.createElement("style");
524
- o.id = so, o.textContent = ".leaflet-pane > canvas { pointer-events: none !important; }", e.appendChild(o);
532
+ o.id = ro, o.textContent = ".leaflet-pane > canvas { pointer-events: none !important; }", e.appendChild(o);
525
533
  }
526
534
  const Ut = /* @__PURE__ */ new WeakMap();
527
- function _o(n, t, e) {
535
+ function $o(n, t, e) {
528
536
  let o = Ut.get(n);
529
537
  o || (o = /* @__PURE__ */ new Map(), Ut.set(n, o)), o.set(t, e);
530
538
  }
531
- function qo(n, t, e) {
539
+ function Fo(n, t, e) {
532
540
  const o = Ut.get(n);
533
541
  (o == null ? void 0 : o.get(t)) === e && o.delete(t);
534
542
  }
@@ -536,7 +544,7 @@ function oe(n, t) {
536
544
  var e, o;
537
545
  return t + (((e = n.options) == null ? void 0 : e.stroke) === !1 ? 0 : (((o = n.options) == null ? void 0 : o.weight) ?? 0) / 2);
538
546
  }
539
- function si(n, t, e) {
547
+ function di(n, t, e) {
540
548
  let o = 1 / 0;
541
549
  for (const a of n) {
542
550
  for (let i = 1; i < a.length; i++)
@@ -545,40 +553,40 @@ function si(n, t, e) {
545
553
  }
546
554
  return o;
547
555
  }
548
- function ri(n) {
556
+ function hi(n) {
549
557
  const t = n._pxBounds;
550
558
  return t ? (t.max.x - t.min.x) * (t.max.y - t.min.y) : 0;
551
559
  }
552
- function ci(n, t, e) {
560
+ function ui(n, t, e) {
553
561
  var o, a, i;
554
562
  if (!((o = n.options) != null && o.interactive)) return null;
555
563
  if (n._point && n._radius !== void 0) {
556
- const s = n._radius, r = n._radiusY ?? n._radius, c = n._point.distanceTo(t), l = (s + r) / 2, d = e === "ponto" ? ai : oe(n, ee);
564
+ const s = n._radius, r = n._radiusY ?? n._radius, c = n._point.distanceTo(t), l = (s + r) / 2, d = e === "ponto" ? ri : oe(n, ee);
557
565
  return n.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;
558
566
  }
559
567
  if (n._parts) {
560
- const s = n instanceof b.Polygon, r = si(n._parts, t, s);
568
+ const s = n instanceof b.Polygon, r = di(n._parts, t, s);
561
569
  return e === "linha" ? r <= oe(n, ee) ? r : null : s && ((a = n._containsPoint) != null && a.call(n, t)) ? 0 : r <= oe(n, ee) ? r : null;
562
570
  }
563
571
  return (i = n._containsPoint) != null && i.call(n, t) ? 0 : null;
564
572
  }
565
- function li(n) {
573
+ function pi(n) {
566
574
  const t = [];
567
575
  for (let e = n._drawFirst; e; e = e.next) t.push(e.layer);
568
576
  return t;
569
577
  }
570
- function $o(n, t, e) {
578
+ function No(n, t, e) {
571
579
  var s;
572
580
  const o = n._paneRenderers;
573
581
  if (!o) return [];
574
582
  const a = t.filter((r) => r.visivel && r.interativo && !r.bloqueada).sort((r, c) => c.zIndex - r.zIndex), i = [];
575
583
  for (const r of a) {
576
- for (const l of To) {
577
- const d = o[Do(r.id, l)];
584
+ for (const l of _o) {
585
+ const d = o[qo(r.id, l)];
578
586
  if (d)
579
- for (const h of li(d).reverse()) {
580
- const u = ci(h, e, l);
581
- u !== null && i.push({ camada: r, tipo: l, alvo: h, distancia: u, area: ri(h) });
587
+ for (const h of pi(d).reverse()) {
588
+ const u = ui(h, e, l);
589
+ u !== null && i.push({ camada: r, tipo: l, alvo: h, distancia: u, area: hi(h) });
582
590
  }
583
591
  }
584
592
  const c = (s = Ut.get(n)) == null ? void 0 : s.get(r.id);
@@ -591,17 +599,17 @@ function $o(n, t, e) {
591
599
  }
592
600
  return i.sort((r, c) => Et[r.tipo] !== Et[c.tipo] ? Et[c.tipo] - Et[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);
593
601
  }
594
- const Le = /* @__PURE__ */ new WeakMap();
595
- function di(n, t, e) {
596
- const o = e.map((s) => s.chave === void 0 ? String(b.Util.stamp(s.alvo)) : `${b.Util.stamp(s.alvo)}:${s.chave}`), a = Le.get(n);
602
+ const Ce = /* @__PURE__ */ new WeakMap();
603
+ function fi(n, t, e) {
604
+ const o = e.map((s) => s.chave === void 0 ? String(b.Util.stamp(s.alvo)) : `${b.Util.stamp(s.alvo)}:${s.chave}`), a = Ce.get(n);
597
605
  let i = 0;
598
- return a && Math.hypot(a.x - t.x, a.y - t.y) <= ii && a.ids.length === o.length && a.ids.every((s, r) => s === o[r]) && (i = (a.indice + 1) % e.length), Le.set(n, { x: t.x, y: t.y, ids: o, indice: i }), e[i];
606
+ return a && Math.hypot(a.x - t.x, a.y - t.y) <= ci && a.ids.length === o.length && a.ids.every((s, r) => s === o[r]) && (i = (a.indice + 1) % e.length), Ce.set(n, { x: t.x, y: t.y, ids: o, indice: i }), e[i];
599
607
  }
600
- function hi(n, t, e) {
601
- const o = n.mouseEventToLayerPoint(e), a = $o(n, t, o);
608
+ function mi(n, t, e) {
609
+ const o = n.mouseEventToLayerPoint(e), a = No(n, t, o);
602
610
  if (a.length === 0)
603
- return Le.delete(n), !1;
604
- const i = di(n, o, a);
611
+ return Ce.delete(n), !1;
612
+ const i = fi(n, o, a);
605
613
  return i.alvo.fire(
606
614
  e.type,
607
615
  {
@@ -614,11 +622,11 @@ function hi(n, t, e) {
614
622
  !0
615
623
  ), !0;
616
624
  }
617
- function br(n, t, e) {
618
- return $o(n, t, n.mouseEventToLayerPoint(e))[0] ?? null;
625
+ function Lr(n, t, e) {
626
+ return No(n, t, n.mouseEventToLayerPoint(e))[0] ?? null;
619
627
  }
620
- const ro = ".cad-vertex-handle, .cad-vertex-ghost, .cad-bezier-handle, #cm-vertex-edit-hud, #cm-draw-hud";
621
- class ui {
628
+ const co = ".cad-vertex-handle, .cad-vertex-ghost, .cad-bezier-handle, #cm-vertex-edit-hud, #cm-draw-hud";
629
+ class gi {
622
630
  constructor(t) {
623
631
  f(this, "ctx");
624
632
  f(this, "map", null);
@@ -640,7 +648,7 @@ class ui {
640
648
  var e, o;
641
649
  if (!(!this.map || !this.mapContainer))
642
650
  if (t.touches.length === 1) {
643
- if ((o = (e = t.target) == null ? void 0 : e.closest) != null && o.call(e, ro)) {
651
+ if ((o = (e = t.target) == null ? void 0 : e.closest) != null && o.call(e, co)) {
644
652
  this.isTouchPanning = !1;
645
653
  return;
646
654
  }
@@ -666,7 +674,7 @@ class ui {
666
674
  });
667
675
  f(this, "handleClick", (t) => {
668
676
  var e, o, a, i, s, r;
669
- !this.map || !this.ctx.layerManager || (o = (e = this.ctx).ferramentaAtiva) != null && o.call(e) || (i = (a = this.ctx).edicaoAtiva) != null && i.call(a) || (r = (s = t.target) == null ? void 0 : s.closest) != null && r.call(s, ".leaflet-marker-icon") || hi(this.map, this.ctx.layerManager.getLayers(), t);
677
+ !this.map || !this.ctx.layerManager || (o = (e = this.ctx).ferramentaAtiva) != null && o.call(e) || (i = (a = this.ctx).edicaoAtiva) != null && i.call(a) || (r = (s = t.target) == null ? void 0 : s.closest) != null && r.call(s, ".leaflet-marker-icon") || mi(this.map, this.ctx.layerManager.getLayers(), t);
670
678
  });
671
679
  f(this, "handleMouseDown", (t) => {
672
680
  var o, a, i, s, r, c, l;
@@ -682,7 +690,7 @@ class ui {
682
690
  return;
683
691
  }
684
692
  if (t.button === 0) {
685
- if ((a = (o = t.target) == null ? void 0 : o.closest) != null && a.call(o, ro) || (s = (i = this.ctx).ferramentaAtiva) != null && s.call(i) || (c = (r = this.ctx).edicaoAtiva) != null && c.call(r) || (this.selectionHappened = !1, this.ctx.mapaController && this.ctx.mapaController.modoCliqueSequencialAtivo))
693
+ if ((a = (o = t.target) == null ? void 0 : o.closest) != null && a.call(o, co) || (s = (i = this.ctx).ferramentaAtiva) != null && s.call(i) || (c = (r = this.ctx).edicaoAtiva) != null && c.call(r) || (this.selectionHappened = !1, this.ctx.mapaController && this.ctx.mapaController.modoCliqueSequencialAtivo))
686
694
  return;
687
695
  (l = this.selecaoBox) == null || l.iniciarSelecao(t);
688
696
  }
@@ -746,7 +754,7 @@ class ui {
746
754
  };
747
755
  }
748
756
  ativar(t, e) {
749
- 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 oi(this.map, this.mapContainer, this.ctx), ni(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)));
757
+ 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 si(this.map, this.mapContainer, this.ctx), li(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)));
750
758
  }
751
759
  desativar() {
752
760
  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;
@@ -801,7 +809,7 @@ class R {
801
809
  }
802
810
  }
803
811
  f(R, "renderers", /* @__PURE__ */ new Map());
804
- class pi {
812
+ class vi {
805
813
  render(t, e, o) {
806
814
  var l, d, h, u;
807
815
  let a = 16;
@@ -831,10 +839,10 @@ class pi {
831
839
  e.hasLayer(t) && e.removeLayer(t);
832
840
  }
833
841
  }
834
- class fi {
842
+ class bi {
835
843
  render(t, e, o) {
836
844
  var l, d, h, u;
837
- const a = ((l = t.dados) == null ? void 0 : l.url) || "https://acervofundiario.incra.gov.br/i3geo/ogc.php", i = ((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";
845
+ const a = ((l = t.dados) == null ? void 0 : l.url) || Do, i = ((d = t.dados) == null ? void 0 : d.layers) || Le, s = ((h = t.dados) == null ? void 0 : h.format) || "image/png", r = ((u = t.dados) == null ? void 0 : u.attribution) || "INCRA/SIGEF";
838
846
  return b.tileLayer.wms(a, {
839
847
  layers: i,
840
848
  format: s,
@@ -857,7 +865,7 @@ class fi {
857
865
  e.hasLayer(t) && e.removeLayer(t);
858
866
  }
859
867
  }
860
- function Fo(n, t, e) {
868
+ function Oo(n, t, e) {
861
869
  const o = n.estilo.espessuraLinha || e.config.perimetroWeight || 2, a = e.graphicScale.lineScaleMultiplier || 1;
862
870
  if (n.estilo.scaleMode === "world") {
863
871
  const i = n.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 = i / (c > 0 ? c : 1);
@@ -878,9 +886,9 @@ function ut(n, t, e, o, a) {
878
886
  interactive: !1
879
887
  }).addTo(n);
880
888
  }
881
- function co(n, t, e, o, a) {
882
- var g, p, v, y, A, x, S, M;
883
- const i = n.id === "homologados", s = ((g = n.dados) == null ? void 0 : g.conexoes) ?? (Array.isArray(n.dados) && n.dados.length > 0 && "origemId" in n.dados[0] ? n.dados : null), r = ((p = n.dados) == null ? void 0 : p.segmentos) || o.segmentos || [], c = ((v = n.dados) == null ? void 0 : v.pontos) || (i ? o.bancoPontos || [] : o.pontos) || [], l = Fo(n, e, o), d = 1, h = n.interativo && !n.bloqueada, u = [];
889
+ function lo(n, t, e, o, a) {
890
+ var g, p, v, y, M, x, S, A;
891
+ const i = n.id === "homologados", s = ((g = n.dados) == null ? void 0 : g.conexoes) ?? (Array.isArray(n.dados) && n.dados.length > 0 && "origemId" in n.dados[0] ? n.dados : null), r = ((p = n.dados) == null ? void 0 : p.segmentos) || o.segmentos || [], c = ((v = n.dados) == null ? void 0 : v.pontos) || (i ? o.bancoPontos || [] : o.pontos) || [], l = Oo(n, e, o), d = 1, h = n.interativo && !n.bloqueada, u = [];
884
892
  c.forEach((P) => {
885
893
  const C = V(P.lat ?? P.latitude ?? P.y, P.lon ?? P.lng ?? P.longitude ?? P.x);
886
894
  C && u.push({ ...P, lat: C.lat, lon: C.lon });
@@ -933,7 +941,7 @@ function co(n, t, e, o, a) {
933
941
  });
934
942
  return;
935
943
  }
936
- if ((y = n.dados) != null && y.polilinhaSequencial || ((A = n.dados) == null ? void 0 : A.fechar) !== void 0 && u.length >= 2) {
944
+ if ((y = n.dados) != null && y.polilinhaSequencial || ((M = n.dados) == null ? void 0 : M.fechar) !== void 0 && u.length >= 2) {
937
945
  const P = ((x = n.dados) == null ? void 0 : x.chaveGrupo) || o.chaveGrupo, C = Vt(u, P), z = ((S = n.dados) == null ? void 0 : S.fechar) !== !1, E = n.estilo.corPrimaria || "#00f5a0";
938
946
  Object.entries(C).forEach(([L, w]) => {
939
947
  const I = jt(w);
@@ -1010,7 +1018,7 @@ function co(n, t, e, o, a) {
1010
1018
  else if (u && u.length >= 2) {
1011
1019
  const P = u.filter(
1012
1020
  (w) => w.lat && w.lon && w.tipo_ponto !== "B" && w.tipo !== "B" && w.ignorar_poligono !== 1
1013
- ), C = ((M = n.dados) == null ? void 0 : M.chaveGrupo) || o.chaveGrupo, z = Vt(P, C), E = n.estilo.corPrimaria || (i ? "#f59e0b" : "#10b981"), L = n.estilo.dashArray || (i ? "6, 8" : void 0);
1021
+ ), C = ((A = n.dados) == null ? void 0 : A.chaveGrupo) || o.chaveGrupo, z = Vt(P, C), E = n.estilo.corPrimaria || (i ? "#f59e0b" : "#10b981"), L = n.estilo.dashArray || (i ? "6, 8" : void 0);
1014
1022
  Object.values(z).forEach((w) => {
1015
1023
  const I = jt(w);
1016
1024
  if (I.length < 2) return;
@@ -1036,16 +1044,16 @@ function co(n, t, e, o, a) {
1036
1044
  });
1037
1045
  }
1038
1046
  }
1039
- class mi {
1047
+ class yi {
1040
1048
  constructor() {
1041
1049
  f(this, "zoomListenerMap", /* @__PURE__ */ new WeakMap());
1042
1050
  }
1043
1051
  render(t, e, o) {
1044
1052
  const a = b.layerGroup(), i = Z(e, t.id, "linha");
1045
- co(t, a, e, o, i);
1053
+ lo(t, a, e, o, i);
1046
1054
  const s = () => {
1047
1055
  if (t.estilo.scaleMode === "world") {
1048
- const r = Fo(t, e, o);
1056
+ const r = Oo(t, e, o);
1049
1057
  a.eachLayer((c) => {
1050
1058
  c.setStyle && c.setStyle({ weight: r });
1051
1059
  });
@@ -1054,23 +1062,23 @@ class mi {
1054
1062
  return e.on("zoomend", s), this.zoomListenerMap.set(a, s), a;
1055
1063
  }
1056
1064
  update(t, e, o, a, i) {
1057
- (o.opacidade !== void 0 || o.estilo !== void 0 || o.dados !== void 0 || o.interativo !== void 0 || o.bloqueada !== void 0) && (e.clearLayers(), co(t, e, i, a, Z(i, t.id, "linha")));
1065
+ (o.opacidade !== void 0 || o.estilo !== void 0 || o.dados !== void 0 || o.interativo !== void 0 || o.bloqueada !== void 0) && (e.clearLayers(), lo(t, e, i, a, Z(i, t.id, "linha")));
1058
1066
  }
1059
1067
  destroy(t, e) {
1060
1068
  const o = this.zoomListenerMap.get(t);
1061
1069
  o && (e.off("zoomend", o), this.zoomListenerMap.delete(t)), t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
1062
1070
  }
1063
1071
  }
1064
- const Ce = 300;
1065
- function Se(n) {
1066
- return n > Ce ? "compacta" : "normal";
1072
+ const Se = 300;
1073
+ function Me(n) {
1074
+ return n > Se ? "compacta" : "normal";
1067
1075
  }
1068
- function No(n, t) {
1069
- if (n <= Ce) return 1;
1070
- const e = Math.max(0.7, 1 - 0.3 * Math.log10(n / Ce)), o = t >= 18 ? 1 : t >= 16 ? 0.92 : t >= 14 ? 0.82 : 0.72;
1076
+ function Ro(n, t) {
1077
+ if (n <= Se) return 1;
1078
+ const e = Math.max(0.7, 1 - 0.3 * Math.log10(n / Se)), o = t >= 18 ? 1 : t >= 16 ? 0.92 : t >= 14 ? 0.82 : 0.72;
1071
1079
  return Math.max(0.6, e * o);
1072
1080
  }
1073
- function gi(n) {
1081
+ function xi(n) {
1074
1082
  if (!n) return "#00f5a0";
1075
1083
  const t = n.trim();
1076
1084
  if (t.startsWith("#") || t.startsWith("rgb") || t.startsWith("hsl") || t.startsWith("var("))
@@ -1093,7 +1101,7 @@ function gi(n) {
1093
1101
  if (t.includes(o)) return a;
1094
1102
  return "#00f5a0";
1095
1103
  }
1096
- function lo(n) {
1104
+ function ho(n) {
1097
1105
  return n.replace(/[&<>"']/g, (t) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[t]);
1098
1106
  }
1099
1107
  const ae = {
@@ -1104,21 +1112,21 @@ const ae = {
1104
1112
  x: ["M2 2L10 10", "M10 2L2 10"]
1105
1113
  };
1106
1114
  function Zt(n, t, e, o = "", a = "", i = !1, s = {}) {
1107
- const r = i || o.includes("ponto-selecionado") || o.includes("cad-marker-selected"), c = s.densidade === "compacta", l = lo(gi(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 = (C, z, E, L = "") => `class="${C}" stroke="${z}" stroke-width="${E}" vector-effect="non-scaling-stroke" ${L}`, y = n in ae ? `<polygon points="${ae[n]}" style="fill:${h}" fill-opacity="${u}" stroke-linejoin="round" ${v("cad-pt-contorno", m, g)} />` : n in ie ? ie[n].map(
1115
+ const r = i || o.includes("ponto-selecionado") || o.includes("cad-marker-selected"), c = s.densidade === "compacta", l = ho(xi(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 = (C, z, E, L = "") => `class="${C}" stroke="${z}" stroke-width="${E}" vector-effect="non-scaling-stroke" ${L}`, y = n in ae ? `<polygon points="${ae[n]}" style="fill:${h}" fill-opacity="${u}" stroke-linejoin="round" ${v("cad-pt-contorno", m, g)} />` : n in ie ? ie[n].map(
1108
1116
  (C) => (
1109
1117
  // Traço = halo escuro (contraste sobre satélite) + traço colorido por cima
1110
1118
  `<path d="${C}" fill="none" stroke-linecap="round" ${v("cad-pt-halo", p, c ? 2.6 : 3.4)} /><path d="${C}" 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}"`)} />`
1111
1119
  )
1112
- ).join("") : n === "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)} />`, A = !c && !r && !(n in ie) ? n in ae ? "" : n === "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" />' : "", x = n === "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" />' : "", S = `cad-pt ${c ? "cad-pt-compacto" : ""} ${e} ${o} ${r ? "ponto-selecionado" : ""}`.replace(/\s+/g, " ").trim(), M = t;
1120
+ ).join("") : n === "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)} />`, M = !c && !r && !(n in ie) ? n in ae ? "" : n === "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" />' : "", x = n === "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" />' : "", S = `cad-pt ${c ? "cad-pt-compacto" : ""} ${e} ${o} ${r ? "ponto-selecionado" : ""}`.replace(/\s+/g, " ").trim(), A = t;
1113
1121
  return `
1114
- <div ${a ? `id="${lo(a)}"` : ""} class="${S}" style="display:flex; align-items:center; justify-content:center; width:${d}px; height:${d}px; position:relative; pointer-events:auto; background:none !important;">
1115
- <svg width="${M}" height="${M}" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" style="overflow:visible; display:block;">
1116
- ${y}${A}${x}
1122
+ <div ${a ? `id="${ho(a)}"` : ""} class="${S}" style="display:flex; align-items:center; justify-content:center; width:${d}px; height:${d}px; position:relative; pointer-events:auto; background:none !important;">
1123
+ <svg width="${A}" height="${A}" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" style="overflow:visible; display:block;">
1124
+ ${y}${M}${x}
1117
1125
  </svg>
1118
1126
  </div>
1119
1127
  `;
1120
1128
  }
1121
- class vi {
1129
+ class Pi {
1122
1130
  constructor() {
1123
1131
  f(this, "zoomListenerMap", /* @__PURE__ */ new WeakMap());
1124
1132
  }
@@ -1129,7 +1137,7 @@ class vi {
1129
1137
  a.eachLayer((r) => {
1130
1138
  if (!(r.setIcon && r.baseSize && r.shapeStyle && r.markerBg && r.pontoId !== void 0)) return;
1131
1139
  const c = r.densTotal || 0;
1132
- if (t.estilo.scaleMode !== "world" && Se(c) !== "compacta") return;
1140
+ if (t.estilo.scaleMode !== "world" && Me(c) !== "compacta") return;
1133
1141
  const l = this.calculateSize(t, e, o, r.baseSize, c);
1134
1142
  l !== r.tamanhoPx && (r.tamanhoPx = l, r.setIcon(this.criarIcone(t, o, r.shapeStyle, l, r.markerBg, r.pontoId, !!r.isSelected, c)));
1135
1143
  });
@@ -1144,7 +1152,7 @@ class vi {
1144
1152
  l,
1145
1153
  `map-marker-${t.id}-${s}`,
1146
1154
  r,
1147
- { densidade: Se(c) }
1155
+ { densidade: Me(c) }
1148
1156
  );
1149
1157
  return b.divIcon({
1150
1158
  html: d,
@@ -1158,7 +1166,7 @@ class vi {
1158
1166
  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);
1159
1167
  return Math.max(3, Math.round(u * s));
1160
1168
  }
1161
- const r = No(i, e.getZoom());
1169
+ const r = Ro(i, e.getZoom());
1162
1170
  return Math.max(r < 1 ? 5 : 4, Math.round(a * s * r));
1163
1171
  }
1164
1172
  rebuildPoints(t, e, o, a, i) {
@@ -1168,16 +1176,16 @@ class vi {
1168
1176
  var y;
1169
1177
  const p = g.lat ?? g.latitude, v = g.lon ?? g.lng ?? g.longitude;
1170
1178
  if (p !== void 0 && v !== void 0 && p !== 0 && v !== 0 && !isNaN(Number(p)) && !isNaN(Number(v))) {
1171
- const A = g.tipo_ponto === "B" || g.tipo === "B", x = g.tipo_ponto === "M" || g.tipo === "M";
1172
- let S = t.estilo.estiloMarcador || "x", M = t.estilo.corPrimaria || "bg-mint-vibrant", P = t.estilo.tamanhoMarcador || 7;
1173
- d ? (S = "circle", M = t.estilo.corPrimaria || "#f59e0b", P = 8) : l ? (S = x ? "circle-dot" : t.estilo.estiloMarcador || "cross", M = t.estilo.corPrimaria || "#a855f7", P = x ? 10 : 8) : x ? (M = "#6366f1", S = "circle-dot", P = 10) : A && (M = "#f43f5e", S = "square", P = 9);
1174
- const C = !!(g.selecionado || h.length > 0 && (h.includes(g.id) || h.includes(String(g.id)) || h.includes(Number(g.id)))), z = this.calculateSize(t, o, a, P, u), E = this.criarIcone(t, a, S, z, M, g.id, C, u), L = b.marker([Number(p), Number(v)], {
1179
+ const M = g.tipo_ponto === "B" || g.tipo === "B", x = g.tipo_ponto === "M" || g.tipo === "M";
1180
+ let S = t.estilo.estiloMarcador || "x", A = t.estilo.corPrimaria || "bg-mint-vibrant", P = t.estilo.tamanhoMarcador || 7;
1181
+ d ? (S = "circle", A = t.estilo.corPrimaria || "#f59e0b", P = 8) : l ? (S = x ? "circle-dot" : t.estilo.estiloMarcador || "cross", A = t.estilo.corPrimaria || "#a855f7", P = x ? 10 : 8) : x ? (A = "#6366f1", S = "circle-dot", P = 10) : M && (A = "#f43f5e", S = "square", P = 9);
1182
+ const C = !!(g.selecionado || h.length > 0 && (h.includes(g.id) || h.includes(String(g.id)) || h.includes(Number(g.id)))), z = this.calculateSize(t, o, a, P, u), E = this.criarIcone(t, a, S, z, A, g.id, C, u), L = b.marker([Number(p), Number(v)], {
1175
1183
  icon: E,
1176
1184
  pane: i,
1177
1185
  interactive: c
1178
1186
  });
1179
- if (C && L.setZIndexOffset(2e3), L.pontoId = g.id, L.layerId = t.id, L.isVizinho = l, L.baseSize = P, L.shapeStyle = S, L.markerBg = M, L.isSelected = C, L.densTotal = u, L.tamanhoPx = z, c) {
1180
- const w = d ? "Vértice Homologado SIGEF" : l ? "Confrontante (Importado)" : x ? "Base Homologada PPP" : A ? "Base de Campo (Translação)" : "Vértice de Perímetro", I = g.acoes || t.acoes || ((y = t.dados) == null ? void 0 : y.acoes) || [], D = Ct(I, g.id);
1187
+ if (C && L.setZIndexOffset(2e3), L.pontoId = g.id, L.layerId = t.id, L.isVizinho = l, L.baseSize = P, L.shapeStyle = S, L.markerBg = A, L.isSelected = C, L.densTotal = u, L.tamanhoPx = z, c) {
1188
+ const w = d ? "Vértice Homologado SIGEF" : l ? "Confrontante (Importado)" : x ? "Base Homologada PPP" : M ? "Base de Campo (Translação)" : "Vértice de Perímetro", I = g.acoes || t.acoes || ((y = t.dados) == null ? void 0 : y.acoes) || [], D = Ct(I, g.id);
1181
1189
  L.bindPopup(`
1182
1190
  <div style="font-family:var(--ui-fonte-base, sans-serif); color:rgba(255, 255, 255, 0.9); line-height:1.3;">
1183
1191
  <div style="font-weight:700; font-size:13px; margin-bottom:4px; color:#ffffff;">${T(g.nome_vertice || String(g.id))}</div>
@@ -1206,7 +1214,7 @@ class vi {
1206
1214
  o && (e.off("zoomend", o), this.zoomListenerMap.delete(t)), t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
1207
1215
  }
1208
1216
  }
1209
- class bi {
1217
+ class Li {
1210
1218
  render(t, e, o) {
1211
1219
  const a = b.layerGroup();
1212
1220
  return this.rebuildPolygons(t, a, o, e), a;
@@ -1217,7 +1225,7 @@ class bi {
1217
1225
  c.forEach((p) => {
1218
1226
  var C, z, E, L, w, I, D, k, $, q;
1219
1227
  if (!p) return;
1220
- const v = ((C = p.estilo) == null ? void 0 : C.cor) || ((z = p.estilo) == null ? void 0 : z.color) || d, y = ((E = p.estilo) == null ? void 0 : E.espessura) || ((L = p.estilo) == null ? void 0 : L.weight) || h, A = ((w = p.estilo) == null ? void 0 : w.opacidade) ?? u, x = ((I = p.estilo) == null ? void 0 : I.fillColor) || v, S = ((D = p.estilo) == null ? void 0 : D.fillOpacity) ?? Math.min(0.14, A * 0.1), M = ((k = p.estilo) == null ? void 0 : k.dashArray) || t.estilo.dashArray || "4, 6";
1228
+ const v = ((C = p.estilo) == null ? void 0 : C.cor) || ((z = p.estilo) == null ? void 0 : z.color) || d, y = ((E = p.estilo) == null ? void 0 : E.espessura) || ((L = p.estilo) == null ? void 0 : L.weight) || h, M = ((w = p.estilo) == null ? void 0 : w.opacidade) ?? u, x = ((I = p.estilo) == null ? void 0 : I.fillColor) || v, S = ((D = p.estilo) == null ? void 0 : D.fillOpacity) ?? Math.min(0.14, M * 0.1), A = ((k = p.estilo) == null ? void 0 : k.dashArray) || t.estilo.dashArray || "4, 6";
1221
1229
  if (p.coordenadas && Array.isArray(p.coordenadas) && p.coordenadas.length >= 3) {
1222
1230
  const _ = Array.isArray(p.coordenadas[0]) && Array.isArray(p.coordenadas[0][0]);
1223
1231
  let F;
@@ -1233,8 +1241,8 @@ class bi {
1233
1241
  const N = b.polygon(F, {
1234
1242
  color: v,
1235
1243
  weight: y,
1236
- opacity: A,
1237
- dashArray: M,
1244
+ opacity: M,
1245
+ dashArray: A,
1238
1246
  fillColor: x,
1239
1247
  fillOpacity: S,
1240
1248
  lineJoin: "round",
@@ -1273,8 +1281,8 @@ class bi {
1273
1281
  const O = B.length === 1 ? B[0] : B, j = b.polygon(O, {
1274
1282
  color: v,
1275
1283
  weight: y,
1276
- opacity: A,
1277
- dashArray: M,
1284
+ opacity: M,
1285
+ dashArray: A,
1278
1286
  fillColor: x,
1279
1287
  fillOpacity: S,
1280
1288
  lineJoin: "round",
@@ -1346,7 +1354,7 @@ class bi {
1346
1354
  t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
1347
1355
  }
1348
1356
  }
1349
- class yi {
1357
+ class Ci {
1350
1358
  constructor() {
1351
1359
  f(this, "moveListenerMap", /* @__PURE__ */ new WeakMap());
1352
1360
  }
@@ -1354,19 +1362,19 @@ class yi {
1354
1362
  const a = b.layerGroup(), i = `pane-${t.id}`, s = () => {
1355
1363
  if (a.clearLayers(), !t.visivel) return;
1356
1364
  if (e.getZoom() > 20) {
1357
- const c = e.getBounds(), l = c.getSouth(), d = c.getNorth(), h = c.getWest(), u = c.getEast(), m = e.getCenter(), g = 8999e-9, p = Math.cos(m.lat * Math.PI / 180), v = g / (p > 0.1 ? p : 1), y = Math.floor((d - l) / g), A = Math.floor((u - h) / v);
1358
- if (y < 200 && A < 200) {
1365
+ const c = e.getBounds(), l = c.getSouth(), d = c.getNorth(), h = c.getWest(), u = c.getEast(), m = e.getCenter(), g = 8999e-9, p = Math.cos(m.lat * Math.PI / 180), v = g / (p > 0.1 ? p : 1), y = Math.floor((d - l) / g), M = Math.floor((u - h) / v);
1366
+ if (y < 200 && M < 200) {
1359
1367
  const x = Math.ceil(l / g) * g;
1360
- for (let M = x; M <= d; M += g)
1361
- b.polyline([[M, h], [M, u]], {
1368
+ for (let A = x; A <= d; A += g)
1369
+ b.polyline([[A, h], [A, u]], {
1362
1370
  color: t.estilo.corPrimaria || "rgba(0, 245, 160, 0.18)",
1363
1371
  weight: t.estilo.espessuraLinha || 0.6,
1364
1372
  interactive: !1,
1365
1373
  pane: i
1366
1374
  }).addTo(a);
1367
1375
  const S = Math.ceil(h / v) * v;
1368
- for (let M = S; M <= u; M += v)
1369
- b.polyline([[l, M], [d, M]], {
1376
+ for (let A = S; A <= u; A += v)
1377
+ b.polyline([[l, A], [d, A]], {
1370
1378
  color: t.estilo.corPrimaria || "rgba(0, 245, 160, 0.18)",
1371
1379
  weight: t.estilo.espessuraLinha || 0.6,
1372
1380
  interactive: !1,
@@ -1385,7 +1393,7 @@ class yi {
1385
1393
  o && (e.off("zoomend moveend", o), this.moveListenerMap.delete(t)), t.clearLayers(), e.hasLayer(t) && e.removeLayer(t);
1386
1394
  }
1387
1395
  }
1388
- function Oo(n, t) {
1396
+ function Bo(n, t) {
1389
1397
  var s, r;
1390
1398
  const e = n._nosCurva, o = n._renderer, a = n._map;
1391
1399
  if (!e || e.length < 2 || !o || !a) return !1;
@@ -1394,15 +1402,15 @@ function Oo(n, t) {
1394
1402
  if (!o._drawing || !((s = n._parts) != null && s.length)) return !0;
1395
1403
  const c = o._ctx;
1396
1404
  c.beginPath();
1397
- for (const l of aa(e, t)) {
1405
+ for (const l of na(e, t)) {
1398
1406
  const d = l.pts.map(i);
1399
1407
  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);
1400
1408
  }
1401
1409
  return t && c.closePath(), o._fillStroke(c, n), !0;
1402
1410
  }
1403
- return o._setPath ? (o._setPath(n, (r = n._parts) != null && r.length ? ia(e, t, i) : "M0 0"), !0) : !1;
1411
+ return o._setPath ? (o._setPath(n, (r = n._parts) != null && r.length ? sa(e, t, i) : "M0 0"), !0) : !1;
1404
1412
  }
1405
- class Ro extends b.Polyline {
1413
+ class Vo extends b.Polyline {
1406
1414
  constructor() {
1407
1415
  super(...arguments);
1408
1416
  f(this, "_nosCurva", null);
@@ -1412,10 +1420,10 @@ class Ro extends b.Polyline {
1412
1420
  this._nosCurva = e;
1413
1421
  }
1414
1422
  _updatePath() {
1415
- Oo(this, !1) || b.Polyline.prototype._updatePath.call(this);
1423
+ Bo(this, !1) || b.Polyline.prototype._updatePath.call(this);
1416
1424
  }
1417
1425
  }
1418
- class Bo extends b.Polygon {
1426
+ class jo extends b.Polygon {
1419
1427
  constructor() {
1420
1428
  super(...arguments);
1421
1429
  f(this, "_nosCurva", null);
@@ -1424,24 +1432,24 @@ class Bo extends b.Polygon {
1424
1432
  this._nosCurva = e;
1425
1433
  }
1426
1434
  _updatePath() {
1427
- Oo(this, !0) || b.Polygon.prototype._updatePath.call(this);
1435
+ Bo(this, !0) || b.Polygon.prototype._updatePath.call(this);
1428
1436
  }
1429
1437
  }
1430
- function Fe(n, t) {
1438
+ function Ne(n, t) {
1431
1439
  const e = mt(n);
1432
1440
  if (!e) return null;
1433
- const o = n.tipo === "Polygon" ? new Bo(n.aneis[0], t) : new Ro(n.coordenadas, t);
1441
+ const o = n.tipo === "Polygon" ? new jo(n.aneis[0], t) : new Vo(n.coordenadas, t);
1434
1442
  return o.definirCurva(e), o;
1435
1443
  }
1436
- function Vo(n, t) {
1444
+ function Go(n, t) {
1437
1445
  n.definirCurva(mt(t)), n.setLatLngs(t.tipo === "Polygon" ? t.aneis[0] : t.coordenadas);
1438
1446
  }
1439
- const xi = 6, ne = (n, t) => Math.hypot(n.x - t.x, n.y - t.y);
1440
- function ho(n, t, e) {
1447
+ const Si = 6, ne = (n, t) => Math.hypot(n.x - t.x, n.y - t.y);
1448
+ function uo(n, t, e) {
1441
1449
  const o = e.x - t.x, a = e.y - t.y, i = o * o + a * a, s = i === 0 ? 0 : Math.max(0, Math.min(1, ((n.x - t.x) * o + (n.y - t.y) * a) / i));
1442
1450
  return Math.hypot(n.x - (t.x + s * o), n.y - (t.y + s * a));
1443
1451
  }
1444
- function Pi(n, t) {
1452
+ function Mi(n, t) {
1445
1453
  const e = n.geometria;
1446
1454
  if (e.tipo !== "Polygon") return 0;
1447
1455
  let o = 1 / 0, a = -1 / 0, i = 1 / 0, s = -1 / 0;
@@ -1451,7 +1459,7 @@ function Pi(n, t) {
1451
1459
  }
1452
1460
  return (a - o) * (s - i);
1453
1461
  }
1454
- function Qt(n, t, e, o = xi, a = wa) {
1462
+ function Qt(n, t, e, o = Si, a = ka) {
1455
1463
  let i = null, s = null, r = null;
1456
1464
  for (const c of t) {
1457
1465
  if (c.excluida || c.oculta) continue;
@@ -1463,7 +1471,7 @@ function Qt(n, t, e, o = xi, a = wa) {
1463
1471
  let d = 1 / 0;
1464
1472
  for (const h of Rt(l)) {
1465
1473
  const u = h.map(e);
1466
- for (let m = 1; m < u.length; m++) d = Math.min(d, ho(n, u[m - 1], u[m]));
1474
+ for (let m = 1; m < u.length; m++) d = Math.min(d, uo(n, u[m - 1], u[m]));
1467
1475
  }
1468
1476
  d <= o && (!s || d < s.d) && (s = { f: c, d });
1469
1477
  } else if (l.tipo === "Circle") {
@@ -1475,21 +1483,21 @@ function Qt(n, t, e, o = xi, a = wa) {
1475
1483
  } else {
1476
1484
  const d = l.aneis[0].map(e);
1477
1485
  let h = 1 / 0;
1478
- for (const [m, g] of Ea(l)) h = Math.min(h, ho(n, d[m], d[g]));
1479
- if (ka([n.y, n.x], [d.map((m) => [m.y, m.x]), ...l.aneis.slice(1).map((m) => m.map(e).map((g) => [g.y, g.x]))]) || h <= o) {
1480
- const m = Pi(c, e);
1486
+ for (const [m, g] of Ia(l)) h = Math.min(h, uo(n, d[m], d[g]));
1487
+ if (Ta([n.y, n.x], [d.map((m) => [m.y, m.x]), ...l.aneis.slice(1).map((m) => m.map(e).map((g) => [g.y, g.x]))]) || h <= o) {
1488
+ const m = Mi(c, e);
1481
1489
  (!r || m < r.a) && (r = { f: c, a: m });
1482
1490
  }
1483
1491
  }
1484
1492
  }
1485
1493
  return (i == null ? void 0 : i.f) ?? (s == null ? void 0 : s.f) ?? (r == null ? void 0 : r.f) ?? null;
1486
1494
  }
1487
- const kt = 0.1, Li = 2, Ci = typeof requestAnimationFrame == "function" ? (n) => {
1495
+ const kt = 0.1, Ai = 2, zi = typeof requestAnimationFrame == "function" ? (n) => {
1488
1496
  requestAnimationFrame(n);
1489
1497
  } : (n) => {
1490
1498
  setTimeout(n, 16);
1491
1499
  };
1492
- class Si extends b.Layer {
1500
+ class wi extends b.Layer {
1493
1501
  constructor(e, o) {
1494
1502
  super();
1495
1503
  f(this, "canvas", null);
@@ -1513,7 +1521,7 @@ class Si extends b.Layer {
1513
1521
  }
1514
1522
  /** Pede um redesenho no próximo quadro (vários pedidos viram um só). */
1515
1523
  solicitarRedesenho() {
1516
- this.agendado || !this.vivo || (this.agendado = !0, Ci(() => {
1524
+ this.agendado || !this.vivo || (this.agendado = !0, zi(() => {
1517
1525
  this.agendado = !1, this.vivo && this.redesenhar();
1518
1526
  }));
1519
1527
  }
@@ -1527,18 +1535,18 @@ class Si extends b.Layer {
1527
1535
  try {
1528
1536
  const a = e.getSize(), i = Math.ceil(a.x * (1 + 2 * kt)), s = Math.ceil(a.y * (1 + 2 * kt));
1529
1537
  if (!(i > 0 && s > 0)) return;
1530
- const r = Math.min(Li, typeof window < "u" && window.devicePixelRatio || 1), c = e.containerPointToLayerPoint([-a.x * kt, -a.y * kt]).round();
1538
+ const r = Math.min(Ai, typeof window < "u" && window.devicePixelRatio || 1), c = e.containerPointToLayerPoint([-a.x * kt, -a.y * kt]).round();
1531
1539
  (o.width !== Math.round(i * r) || o.height !== Math.round(s * r)) && (o.width = Math.round(i * r), o.height = Math.round(s * r)), o.style.width = `${i}px`, o.style.height = `${s}px`, b.DomUtil.setPosition(o, c), o.style.display = "";
1532
1540
  const l = o.getContext("2d");
1533
1541
  if (!l) return;
1534
1542
  l.setTransform(r, 0, 0, r, 0, 0), l.clearRect(0, 0, i, s);
1535
1543
  const d = e.getPixelOrigin().add(c);
1536
- this.ultimaPintura = va(l, this.obterMarcas(), e.getZoom(), d.x, d.y, i, s);
1544
+ this.ultimaPintura = ya(l, this.obterMarcas(), e.getZoom(), d.x, d.y, i, s);
1537
1545
  } catch {
1538
1546
  }
1539
1547
  }
1540
1548
  }
1541
- const jo = /* @__PURE__ */ new WeakMap(), Me = {
1549
+ const Ho = /* @__PURE__ */ new WeakMap(), Ae = {
1542
1550
  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" />',
1543
1551
  tree: '<path d="M12 22 V14 M12 3 L5 14 H19 Z" />',
1544
1552
  warning: '<path d="M12 3 L22 20 H2 Z M12 9 V14 M12 17 V17.5" />',
@@ -1546,7 +1554,7 @@ const jo = /* @__PURE__ */ new WeakMap(), Me = {
1546
1554
  boundary: '<path d="M12 2 L22 12 L12 22 L2 12 Z" />'
1547
1555
  };
1548
1556
  function Ft(n, t, e = !1) {
1549
- const o = n.estilo ?? {}, a = o.tamanhoIcone ?? t.tamanhoMarcador, i = typeof a == "number" && Number.isFinite(a) && a > 0 ? a : 22, s = e ? Bt : et(o.corTraco ?? o.corPreenchimento ?? t.corPrimaria, De), r = Number.isFinite(o.rotacaoIcone) ? o.rotacaoIcone : 0, c = Me[o.icone ?? ""] ?? "";
1557
+ const o = n.estilo ?? {}, a = o.tamanhoIcone ?? t.tamanhoMarcador, i = typeof a == "number" && Number.isFinite(a) && a > 0 ? a : 22, s = e ? Bt : et(o.corTraco ?? o.corPreenchimento ?? t.corPrimaria, _e), r = Number.isFinite(o.rotacaoIcone) ? o.rotacaoIcone : 0, c = Ae[o.icone ?? ""] ?? "";
1550
1558
  return b.divIcon({
1551
1559
  className: `custom-leaflet-marker${e ? " cad-feicao-selecionada" : ""}`,
1552
1560
  iconSize: [i, i],
@@ -1570,15 +1578,15 @@ function Nt(n, t, e = !1) {
1570
1578
  html: `<span style="${c}${d}">${T(a)}</span>`
1571
1579
  });
1572
1580
  }
1573
- function Go(n, t) {
1574
- const e = n < 10 ? 30 : n < 100 ? 38 : 46, o = et(t.corPrimaria, De);
1581
+ function Uo(n, t) {
1582
+ const e = n < 10 ? 30 : n < 100 ? 38 : 46, o = et(t.corPrimaria, _e);
1575
1583
  return b.divIcon({
1576
1584
  className: "custom-leaflet-marker cad-feicao-cluster",
1577
1585
  iconSize: [e, e],
1578
1586
  html: `<div style="width:${e}px;height:${e}px;border-radius:50%;background:${o};opacity:.9;border:2px solid rgba(255,255,255,.85);display:flex;align-items:center;justify-content:center;color:#fff;font:700 12px sans-serif;text-shadow:0 0 2px #000">${n}</div>`
1579
1587
  });
1580
1588
  }
1581
- function Ae(n, t) {
1589
+ function ze(n, t) {
1582
1590
  return {
1583
1591
  color: n.cor,
1584
1592
  stroke: n.traco,
@@ -1594,16 +1602,16 @@ function Ae(n, t) {
1594
1602
  interactive: t
1595
1603
  };
1596
1604
  }
1597
- const Mi = 150, Ai = 100, se = 300, re = 0.75, zi = 20, wi = 0.3, ce = typeof requestAnimationFrame == "function" ? (n) => {
1605
+ const Ei = 150, ki = 100, se = 300, re = 0.75, Ii = 20, Ti = 0.3, ce = typeof requestAnimationFrame == "function" ? (n) => {
1598
1606
  requestAnimationFrame(n);
1599
1607
  } : (n) => {
1600
1608
  setTimeout(n, 16);
1601
1609
  };
1602
- class Ei {
1610
+ class Di {
1603
1611
  constructor() {
1604
1612
  f(this, "estados", /* @__PURE__ */ new WeakMap());
1605
1613
  /** Por definição de camada (uma por componente), para a seleção sobreviver à recriação do grupo. */
1606
- f(this, "selecionadas", jo);
1614
+ f(this, "selecionadas", Ho);
1607
1615
  f(this, "tokenLote", /* @__PURE__ */ new WeakMap());
1608
1616
  }
1609
1617
  render(t, e, o) {
@@ -1674,7 +1682,7 @@ class Ei {
1674
1682
  map: o,
1675
1683
  context: a,
1676
1684
  loja: /* @__PURE__ */ new Map(),
1677
- indice: new na(),
1685
+ indice: new ra(),
1678
1686
  revisao: 0,
1679
1687
  revisaoBase: 0,
1680
1688
  listaSincronizada: null,
@@ -1716,7 +1724,7 @@ class Ei {
1716
1724
  h.add(p.id), s.loja.get(p.id) !== p && d.add(p.id);
1717
1725
  const u = [...s.loja.keys()].filter((p) => !h.has(p));
1718
1726
  if (d.size > 0 || u.length > 0) {
1719
- if (s.revisao++, s.revisaoBase++, s.lod.clear(), s.loja.size === 0 || d.size + u.length > l.length * wi)
1727
+ if (s.revisao++, s.revisaoBase++, s.lod.clear(), s.loja.size === 0 || d.size + u.length > l.length * Ti)
1720
1728
  s.indice.construir(l);
1721
1729
  else {
1722
1730
  for (const p of l) d.has(p.id) && s.indice.atualizar(p);
@@ -1752,11 +1760,11 @@ class Ei {
1752
1760
  if (!p || p.excluida || pt(p) !== "oficial") return;
1753
1761
  const y = st(p);
1754
1762
  c.has(y) || c.set(y, e.oficiais.has(y));
1755
- const A = (e.contOficiais.get(y) ?? 0) + v;
1756
- A <= 0 ? (e.contOficiais.delete(y), e.oficiais.delete(y)) : (e.contOficiais.set(y, A), e.oficiais.add(y));
1763
+ const M = (e.contOficiais.get(y) ?? 0) + v;
1764
+ M <= 0 ? (e.contOficiais.delete(y), e.oficiais.delete(y)) : (e.contOficiais.set(y, M), e.oficiais.add(y));
1757
1765
  }, d = [], h = [], u = (p, v) => {
1758
- const y = st(p), A = (e.contPrevias.get(y) ?? 0) + v;
1759
- A <= 0 ? e.contPrevias.delete(y) : e.contPrevias.set(y, A);
1766
+ const y = st(p), M = (e.contPrevias.get(y) ?? 0) + v;
1767
+ M <= 0 ? e.contPrevias.delete(y) : e.contPrevias.set(y, M);
1760
1768
  }, m = (p) => {
1761
1769
  const v = i.get(p);
1762
1770
  v && (e.lod.delete(p), pt(v) === "previa" && (e.nPrevias--, u(v, -1)), l(v, -1), r(v) && e.nPontos--, i.delete(p), e.indice.remover(p), s == null || s.delete(p), h.push(p));
@@ -1777,10 +1785,10 @@ class Ei {
1777
1785
  }
1778
1786
  /** Há geometria grande demais para o zoom atual? Só então vale redesenhar ao mudar de zoom. */
1779
1787
  ressimplificar(t, e) {
1780
- return t.zoomDesenho === e || sa(t.feicao.geometria) < ra ? !1 : e < Be || t.zoomDesenho < Be;
1788
+ return t.zoomDesenho === e || ca(t.feicao.geometria) < la ? !1 : e < Ve || t.zoomDesenho < Ve;
1781
1789
  }
1782
1790
  paraDesenho(t, e) {
1783
- const o = ca(t.geometria, e);
1791
+ const o = da(t.geometria, e);
1784
1792
  return o === t.geometria ? t : { ...t, geometria: o };
1785
1793
  }
1786
1794
  /** Vai para a tela? Não oculta e visível pela regra oficial × prévia. */
@@ -1814,19 +1822,19 @@ class Ei {
1814
1822
  const s = t.lod.get(e.id);
1815
1823
  if (s !== void 0) return s;
1816
1824
  t.avaliacoesLOD++;
1817
- const r = ba(t.indice.caixaDe(e.id), o);
1825
+ const r = xa(t.indice.caixaDe(e.id), o);
1818
1826
  return t.lod.set(e.id, r), r;
1819
1827
  }
1820
1828
  novaMarca(t, e, o) {
1821
1829
  const a = t.indice.caixaDe(e.id);
1822
1830
  if (!a) return null;
1823
- const i = e.estilo ?? {}, s = et(i.corPreenchimento ?? i.corTraco ?? t.layerDef.estilo.corPrimaria, De);
1831
+ const i = e.estilo ?? {}, s = et(i.corPreenchimento ?? i.corTraco ?? t.layerDef.estilo.corPrimaria, _e);
1824
1832
  return {
1825
1833
  id: e.id,
1826
1834
  lat: (a.minLat + a.maxLat) / 2,
1827
1835
  lon: (a.minLon + a.maxLon) / 2,
1828
1836
  cor: s,
1829
- lado: ya(Ue(a, o)),
1837
+ lado: Pa(Ze(a, o)),
1830
1838
  fonte: e
1831
1839
  };
1832
1840
  }
@@ -1854,7 +1862,7 @@ class Ei {
1854
1862
  return;
1855
1863
  }
1856
1864
  if (!t.camadaMarcas) {
1857
- const e = Z(t.map, t.layerDef.id, "poligono"), o = new Si(e, () => t.marcas.values());
1865
+ const e = Z(t.map, t.layerDef.id, "poligono"), o = new wi(e, () => t.marcas.values());
1858
1866
  t.camadaMarcas = o, o.addTo(t.map), o.on("click", (a) => {
1859
1867
  var r, c;
1860
1868
  const { feicaoHit: i, originalEvent: s } = a;
@@ -1864,7 +1872,7 @@ class Ei {
1864
1872
  aditivo: !!(s && s.shiftKey),
1865
1873
  subtrativo: !!(s && (s.ctrlKey || s.metaKey))
1866
1874
  });
1867
- }), t.fonteHit = this.fonteDeMarcas(t, o), _o(t.map, t.layerDef.id, t.fonteHit);
1875
+ }), t.fonteHit = this.fonteDeMarcas(t, o), $o(t.map, t.layerDef.id, t.fonteHit);
1868
1876
  }
1869
1877
  t.camadaMarcas.solicitarRedesenho();
1870
1878
  }
@@ -1892,11 +1900,11 @@ class Ei {
1892
1900
  const p = a.latLngToContainerPoint(g);
1893
1901
  return { x: p.x, y: p.y };
1894
1902
  }, u = a.getZoom(), m = [];
1895
- for (let g = 0; g < zi && d.length > 0; g++) {
1903
+ for (let g = 0; g < Ii && d.length > 0; g++) {
1896
1904
  const p = Qt({ x: i.x, y: i.y }, d, h);
1897
1905
  if (!p) break;
1898
1906
  d.splice(d.indexOf(p), 1);
1899
- const v = Ue(t.indice.caixaDe(p.id) ?? l, u);
1907
+ const v = Ze(t.indice.caixaDe(p.id) ?? l, u);
1900
1908
  m.push({
1901
1909
  feicao: p,
1902
1910
  chave: p.id,
@@ -1910,7 +1918,7 @@ class Ei {
1910
1918
  };
1911
1919
  }
1912
1920
  descartarMarcas(t) {
1913
- t.fonteHit && qo(t.map, t.layerDef.id, t.fonteHit), t.fonteHit = null, t.camadaMarcas && (t.map.removeLayer(t.camadaMarcas), t.camadaMarcas = null), t.marcas.clear();
1921
+ t.fonteHit && Fo(t.map, t.layerDef.id, t.fonteHit), t.fonteHit = null, t.camadaMarcas && (t.map.removeLayer(t.camadaMarcas), t.camadaMarcas = null), t.marcas.clear();
1914
1922
  }
1915
1923
  /**
1916
1924
  * Cria a camada Leaflet da feição ou remenda a que existe (e só se algo mudou). `'estilo'` só troca o estilo.
@@ -1961,18 +1969,18 @@ class Ei {
1961
1969
  for (const r of t.loja.values()) r.geometria.tipo === "Point" && o(r) && s++;
1962
1970
  t.nPontos = s, t.nPontosRev = t.revisaoBase;
1963
1971
  }
1964
- if (!Ze(t.nPontos, e))
1972
+ if (!We(t.nPontos, e))
1965
1973
  return t.agrupador = null, null;
1966
1974
  const a = t.agrupador;
1967
1975
  if (a && a.zoom === e && t.agrupadorRev === t.revisaoBase) return a;
1968
- const i = new xa(e, (s) => t.map.project(b.latLng(s[0], s[1]), e));
1976
+ const i = new La(e, (s) => t.map.project(b.latLng(s[0], s[1]), e));
1969
1977
  for (const s of t.loja.values())
1970
1978
  s.geometria.tipo === "Point" && o(s) && i.inserir({ id: s.id, coordenada: s.geometria.coordenada });
1971
1979
  return t.agrupador = i, t.agrupadorRev = t.revisaoBase, i;
1972
1980
  }
1973
1981
  /** Calcula o que deve estar desenhado e ajusta as camadas Leaflet (cria, remenda, remove). */
1974
1982
  reconciliar(t, e, o, a) {
1975
- var A;
1983
+ var M;
1976
1984
  const { map: i, layerDef: s, loja: r } = e, c = this.selecionadas.get(s), l = this.estaCarregado(i), d = l ? i.getZoom() : 0, h = l && r.size > se ? i.getBounds().pad(re) : null, u = h ? this.caixaDe(h) : null;
1977
1985
  e.culling = h !== null;
1978
1986
  const m = u ? e.indice.consultar(u) : r.keys(), g = new Set(m);
@@ -1988,25 +1996,25 @@ class Ei {
1988
1996
  const x = /* @__PURE__ */ new Map();
1989
1997
  if (c)
1990
1998
  for (const S of c) {
1991
- const M = v.chaveDoPonto(S), P = M === void 0 || (A = v.celula(M)) == null ? void 0 : A.membros.get(S);
1992
- if (M !== void 0 && P) {
1993
- const C = x.get(M);
1994
- C ? C.push(P) : x.set(M, [P]);
1999
+ const A = v.chaveDoPonto(S), P = A === void 0 || (M = v.celula(A)) == null ? void 0 : M.membros.get(S);
2000
+ if (A !== void 0 && P) {
2001
+ const C = x.get(A);
2002
+ C ? C.push(P) : x.set(A, [P]);
1995
2003
  }
1996
2004
  }
1997
- for (const [S, M] of v.celulasAgrupadas()) {
2005
+ for (const [S, A] of v.celulasAgrupadas()) {
1998
2006
  const P = x.get(S);
1999
2007
  if (P) for (const E of P) g.add(E.id);
2000
- const C = M.membros.size, z = C - ((P == null ? void 0 : P.length) ?? 0);
2008
+ const C = A.membros.size, z = C - ((P == null ? void 0 : P.length) ?? 0);
2001
2009
  if (z === 1)
2002
- for (const E of M.membros.values()) {
2010
+ for (const E of A.membros.values()) {
2003
2011
  if (c != null && c.has(E.id)) continue;
2004
2012
  const L = e.indice.caixaDe(E.id);
2005
2013
  (!u || L && zt(L, u)) && g.add(E.id);
2006
2014
  break;
2007
2015
  }
2008
- if (!(h && !h.contains([M.somaLat / C, M.somaLon / C])) && z >= 2) {
2009
- let E = M.somaLat, L = M.somaLon;
2016
+ if (!(h && !h.contains([A.somaLat / C, A.somaLon / C])) && z >= 2) {
2017
+ let E = A.somaLat, L = A.somaLon;
2010
2018
  if (P) for (const I of P)
2011
2019
  E -= I.coordenada[0], L -= I.coordenada[1];
2012
2020
  const w = [E / z, L / z];
@@ -2040,12 +2048,12 @@ class Ei {
2040
2048
  this.reconciliarParcialInterno(t, e, o, a, i), this.sincronizarMarcas(e);
2041
2049
  }
2042
2050
  reconciliarParcialInterno(t, e, o, a, i) {
2043
- const { map: s, layerDef: r, loja: c } = e, l = this.estaCarregado(s), d = l ? s.getZoom() : 0, h = l && c.size > se, u = l && Ze(e.nPontos, d), m = e.agrupador;
2051
+ const { map: s, layerDef: r, loja: c } = e, l = this.estaCarregado(s), d = l ? s.getZoom() : 0, h = l && c.size > se, u = l && We(e.nPontos, d), m = e.agrupador;
2044
2052
  if (i || h !== e.culling || u !== (m !== null) || m !== null && (m.zoom !== d || e.agrupadorRev !== e.revisaoBase)) {
2045
2053
  this.reconciliar(t, e, !1, new Set(o));
2046
2054
  return;
2047
2055
  }
2048
- const g = this.selecionadas.get(r), p = (C) => this.desenhavel(e, C), v = h ? s.getBounds().pad(re) : null, y = v ? this.caixaDe(v) : null, A = l ? d : -1, x = (C, z) => {
2056
+ const g = this.selecionadas.get(r), p = (C) => this.desenhavel(e, C), v = h ? s.getBounds().pad(re) : null, y = v ? this.caixaDe(v) : null, M = l ? d : -1, x = (C, z) => {
2049
2057
  const E = c.get(C);
2050
2058
  if (!E || !p(E)) {
2051
2059
  this.tirarEntrada(t, e, C), e.marcas.delete(C);
@@ -2059,8 +2067,8 @@ class Ei {
2059
2067
  return;
2060
2068
  }
2061
2069
  }
2062
- this.colocarFeicao(t, e, E, d, A, L, z);
2063
- }, S = /* @__PURE__ */ new Set(), M = [];
2070
+ this.colocarFeicao(t, e, E, d, M, L, z);
2071
+ }, S = /* @__PURE__ */ new Set(), A = [];
2064
2072
  for (const C of a) {
2065
2073
  this.tirarEntrada(t, e, C), e.marcas.delete(C);
2066
2074
  const z = m == null ? void 0 : m.remover(C);
@@ -2071,9 +2079,9 @@ class Ei {
2071
2079
  const z = c.get(C);
2072
2080
  if (!z) continue;
2073
2081
  const E = m == null ? void 0 : m.remover(C);
2074
- E !== void 0 && S.add(E), m && z.geometria.tipo === "Point" && p(z) ? S.add(m.inserir({ id: C, coordenada: z.geometria.coordenada })) : M.push(C);
2082
+ E !== void 0 && S.add(E), m && z.geometria.tipo === "Point" && p(z) ? S.add(m.inserir({ id: C, coordenada: z.geometria.coordenada })) : A.push(C);
2075
2083
  }
2076
- for (const C of M) x(C, !0);
2084
+ for (const C of A) x(C, !0);
2077
2085
  if (!m) return;
2078
2086
  const P = new Set(o);
2079
2087
  for (const C of S) {
@@ -2103,7 +2111,7 @@ class Ei {
2103
2111
  }
2104
2112
  }
2105
2113
  criarMarcadorCluster(t, e, o, a) {
2106
- const i = Go(e, a.layerDef.estilo), s = b.marker(t, {
2114
+ const i = Uo(e, a.layerDef.estilo), s = b.marker(t, {
2107
2115
  icon: i,
2108
2116
  pane: Z(a.map, a.layerDef.id, "ponto"),
2109
2117
  keyboard: !1
@@ -2134,33 +2142,33 @@ class Ei {
2134
2142
  }), g = (v) => {
2135
2143
  const y = c.get(v);
2136
2144
  if (!y) return;
2137
- const A = i.has(v);
2145
+ const M = i.has(v);
2138
2146
  if (!this.desenhavel(o, y)) {
2139
2147
  this.tirarEntrada(t, o, v), o.marcas.delete(v);
2140
2148
  return;
2141
2149
  }
2142
- if (!A && u) {
2150
+ if (!M && u) {
2143
2151
  const S = o.indice.caixaDe(v);
2144
2152
  if (!S || !zt(S, u)) {
2145
2153
  this.tirarEntrada(t, o, v), o.marcas.delete(v);
2146
2154
  return;
2147
2155
  }
2148
2156
  }
2149
- this.colocarFeicao(t, o, y, d, h, A, "estilo");
2150
- const x = A ? o.entradas.get(v) : void 0;
2157
+ this.colocarFeicao(t, o, y, d, h, M, "estilo");
2158
+ const x = M ? o.entradas.get(v) : void 0;
2151
2159
  x && "bringToFront" in x.layer && x.layer.bringToFront();
2152
2160
  }, p = (this.tokenLote.get(t) ?? 0) + 1;
2153
- if (this.tokenLote.set(t, p), s.length <= Mi)
2161
+ if (this.tokenLote.set(t, p), s.length <= Ei)
2154
2162
  s.forEach(g);
2155
2163
  else {
2156
- const v = l ? this.caixaDe(r.getBounds()) : null, y = (M) => {
2164
+ const v = l ? this.caixaDe(r.getBounds()) : null, y = (A) => {
2157
2165
  if (!v) return !0;
2158
- const P = o.indice.caixaDe(M);
2166
+ const P = o.indice.caixaDe(A);
2159
2167
  return !P || zt(P, v);
2160
- }, A = s.filter(y), x = s.filter((M) => !y(M));
2161
- A.forEach(g);
2168
+ }, M = s.filter(y), x = s.filter((A) => !y(A));
2169
+ M.forEach(g);
2162
2170
  const S = () => {
2163
- this.tokenLote.get(t) !== p || !o.vivo || (x.splice(0, Ai).forEach(g), x.length > 0 ? ce(S) : this.sincronizarMarcas(o));
2171
+ this.tokenLote.get(t) !== p || !o.vivo || (x.splice(0, ki).forEach(g), x.length > 0 ? ce(S) : this.sincronizarMarcas(o));
2164
2172
  };
2165
2173
  x.length > 0 && ce(S);
2166
2174
  }
@@ -2169,7 +2177,7 @@ class Ei {
2169
2177
  formaDe(t) {
2170
2178
  var o;
2171
2179
  const e = t.geometria;
2172
- return e.tipo === "Point" ? `Point:${(o = t.estilo) != null && o.icone && Me[t.estilo.icone] ? t.estilo.icone : ""}` : mt(e) ? `${e.tipo}:curva` : e.tipo;
2180
+ return e.tipo === "Point" ? `Point:${(o = t.estilo) != null && o.icone && Ae[t.estilo.icone] ? t.estilo.icone : ""}` : mt(e) ? `${e.tipo}:curva` : e.tipo;
2173
2181
  }
2174
2182
  paneDe(t) {
2175
2183
  switch (t.geometria.tipo) {
@@ -2185,11 +2193,11 @@ class Ei {
2185
2193
  }
2186
2194
  }
2187
2195
  estiloVetor(t, e, o, a = !1) {
2188
- return Ae(ve(t, e.estilo, a), o);
2196
+ return ze(ve(t, e.estilo, a), o);
2189
2197
  }
2190
2198
  criar(t, e, o, a, i) {
2191
2199
  var d;
2192
- const s = Z(o, e.id, this.paneDe(t)), r = t.geometria, c = this.estiloVetor(t, e, a, i), l = Fe(r, { ...c, pane: s });
2200
+ const s = Z(o, e.id, this.paneDe(t)), r = t.geometria, c = this.estiloVetor(t, e, a, i), l = Ne(r, { ...c, pane: s });
2193
2201
  if (l) return l;
2194
2202
  switch (r.tipo) {
2195
2203
  case "Polygon":
@@ -2200,9 +2208,9 @@ class Ei {
2200
2208
  return b.polyline(r.partes && r.partes.length > 1 ? Rt(r) : r.coordenadas, { ...c, pane: s });
2201
2209
  case "Point": {
2202
2210
  const h = (d = t.estilo) == null ? void 0 : d.icone;
2203
- return h && Me[h] ? b.marker(r.coordenada, { icon: this.iconeSvg(t, e, i), pane: s, interactive: a }) : b.circleMarker(r.coordenada, {
2211
+ return h && Ae[h] ? b.marker(r.coordenada, { icon: this.iconeSvg(t, e, i), pane: s, interactive: a }) : b.circleMarker(r.coordenada, {
2204
2212
  ...c,
2205
- radius: Ve(t, e.estilo),
2213
+ radius: je(t, e.estilo),
2206
2214
  pane: s
2207
2215
  });
2208
2216
  }
@@ -2218,7 +2226,7 @@ class Ei {
2218
2226
  remendar(t, e, o, a, i) {
2219
2227
  var c, l;
2220
2228
  const s = e.geometria, r = this.estiloVetor(e, o, a, i);
2221
- (t instanceof Ro || t instanceof Bo) && mt(s) ? (Vo(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 ? Rt(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 b.CircleMarker ? (t.setLatLng(s.coordenada), t.setRadius(Ve(e, o.estilo)), t.setStyle(r)) : t instanceof b.Marker && (t.setLatLng(s.tipo === "Point" || s.tipo === "Text" ? s.coordenada : t.getLatLng()), t.setIcon(s.tipo === "Text" ? this.iconeTexto(e, o, i) : this.iconeSvg(e, o, i)), s.tipo === "Text" && (a && !e.bloqueada ? (c = t.dragging) == null || c.enable() : (l = t.dragging) == null || l.disable())), this.aplicarRotulo(t, e);
2229
+ (t instanceof Vo || t instanceof jo) && mt(s) ? (Go(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 ? Rt(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 b.CircleMarker ? (t.setLatLng(s.coordenada), t.setRadius(je(e, o.estilo)), t.setStyle(r)) : t instanceof b.Marker && (t.setLatLng(s.tipo === "Point" || s.tipo === "Text" ? s.coordenada : t.getLatLng()), t.setIcon(s.tipo === "Text" ? this.iconeTexto(e, o, i) : this.iconeSvg(e, o, i)), s.tipo === "Text" && (a && !e.bloqueada ? (c = t.dragging) == null || c.enable() : (l = t.dragging) == null || l.disable())), this.aplicarRotulo(t, e);
2222
2230
  }
2223
2231
  /** Só o estilo (seleção): sem `setLatLngs`, que reprojetaria e recalcularia limites da forma. */
2224
2232
  restilizar(t, e, o, a, i) {
@@ -2236,7 +2244,7 @@ class Ei {
2236
2244
  t.unbindTooltip();
2237
2245
  return;
2238
2246
  }
2239
- const a = la(e, o.campoRotulo);
2247
+ const a = ha(e, o.campoRotulo);
2240
2248
  if (!a) {
2241
2249
  t.unbindTooltip();
2242
2250
  return;
@@ -2268,7 +2276,7 @@ class Ei {
2268
2276
  });
2269
2277
  }
2270
2278
  }
2271
- function ki(n, t, e, o) {
2279
+ function _i(n, t, e, o) {
2272
2280
  const a = [], i = Math.abs(e), s = Math.abs(o);
2273
2281
  return i > 0 && a.push({ x: e > 0 ? n - i : 0, y: 0, largura: i, altura: t }), s > 0 && a.push({ x: e > 0 ? 0 : i, y: o > 0 ? t - s : 0, largura: n - i, altura: s }), a;
2274
2282
  }
@@ -2345,7 +2353,7 @@ const Kt = class Kt extends b.Canvas {
2345
2353
  let m = null, g = !1;
2346
2354
  if (u && a && a.mundo) {
2347
2355
  const p = r.x - a.mundo.x, v = r.y - a.mundo.y;
2348
- !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 = ki(d.x, d.y, p, v));
2356
+ !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 = _i(d.x, d.y, p, v));
2349
2357
  }
2350
2358
  !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");
2351
2359
  }
@@ -2396,7 +2404,7 @@ const Kt = class Kt extends b.Canvas {
2396
2404
  */
2397
2405
  f(Kt, "limiteRepintar", 500);
2398
2406
  let Wt = Kt;
2399
- const uo = Object.freeze({
2407
+ const po = Object.freeze({
2400
2408
  alta: Object.freeze({
2401
2409
  nivel: "alta",
2402
2410
  renderizadorPadrao: "leaflet",
@@ -2441,17 +2449,17 @@ function le(n) {
2441
2449
  const t = String(n ?? "").trim().toLowerCase();
2442
2450
  return t === "media" || t === "média" ? "media" : t === "baixa" ? "baixa" : "alta";
2443
2451
  }
2444
- function ze(n) {
2445
- return uo[n] ?? uo.alta;
2452
+ function we(n) {
2453
+ return po[n] ?? po.alta;
2446
2454
  }
2447
2455
  function de(n, t) {
2448
2456
  return n == null ? t.renderizadorPadrao : String(n).trim().toLowerCase() === "canvas" ? "canvas" : "leaflet";
2449
2457
  }
2450
- const po = /* @__PURE__ */ new WeakMap();
2451
- function Ii(n, t) {
2458
+ const fo = /* @__PURE__ */ new WeakMap();
2459
+ function qi(n, t) {
2452
2460
  try {
2453
2461
  if (!n || typeof n != "object" || !n.options) return;
2454
- let e = po.get(n);
2462
+ let e = fo.get(n);
2455
2463
  e || (e = {
2456
2464
  zoomAnimated: n._zoomAnimated,
2457
2465
  fadeAnimated: n._fadeAnimated,
@@ -2459,29 +2467,29 @@ function Ii(n, t) {
2459
2467
  fadeAnimation: n.options.fadeAnimation,
2460
2468
  markerZoomAnimation: n.options.markerZoomAnimation,
2461
2469
  inertia: n.options.inertia
2462
- }, po.set(n, e));
2470
+ }, fo.set(n, e));
2463
2471
  const o = n.options;
2464
2472
  o.zoomSnap = t.zoomSnap, o.zoomDelta = t.zoomDelta, t.animacoes ? (o.zoomAnimation = e.zoomAnimation, o.fadeAnimation = e.fadeAnimation, o.markerZoomAnimation = e.markerZoomAnimation, n._zoomAnimated = e.zoomAnimated, n._fadeAnimated = e.fadeAnimated) : (o.zoomAnimation = !1, o.fadeAnimation = !1, o.markerZoomAnimation = !1, n._zoomAnimated = !1, n._fadeAnimated = !1), o.inertia = t.inercia ? e.inertia : !1;
2465
2473
  } catch {
2466
2474
  }
2467
2475
  }
2468
- const we = "cad-formas-sobreposicao", Ti = "7000", It = 8, Di = 8, _i = 20, Ee = typeof requestAnimationFrame == "function" ? (n) => {
2476
+ const Ee = "cad-formas-sobreposicao", $i = "7000", It = 8, Fi = 8, Ni = 20, ke = typeof requestAnimationFrame == "function" ? (n) => {
2469
2477
  requestAnimationFrame(n);
2470
2478
  } : (n) => {
2471
2479
  setTimeout(n, 16);
2472
- }, qi = /* @__PURE__ */ new Set(["icone", "texto", "cluster", "rotulo", "curva"]), tt = /* @__PURE__ */ new WeakMap();
2480
+ }, Oi = /* @__PURE__ */ new Set(["icone", "texto", "cluster", "rotulo", "curva"]), tt = /* @__PURE__ */ new WeakMap();
2473
2481
  function nt(n) {
2474
2482
  return { caixa: n.caixa, zoom: n.zoom, larguraPx: n.larguraPx, alturaPx: n.alturaPx, dpr: n.dpr, origemPx: n.origemPx };
2475
2483
  }
2476
- const $i = (n) => !!n._loaded;
2477
- function Fi(n) {
2484
+ const Ri = (n) => !!n._loaded;
2485
+ function Bi(n) {
2478
2486
  const t = tt.get(n);
2479
2487
  if (t) return t;
2480
2488
  const e = { estados: /* @__PURE__ */ new Set(), quadro: null, agendado: !1, noMapa: !1 };
2481
- return e.pintor = new wo({
2489
+ return e.pintor = new Eo({
2482
2490
  camada: () => null,
2483
2491
  sobreposicao: () => e.quadro ? { ctx: e.quadro.ctx, largura: e.quadro.larguraPx, altura: e.quadro.alturaPx, dpr: e.quadro.dpr } : null
2484
- }), e.canvas = new Wt({ pane: we, padding: 0.1 }, (o) => {
2492
+ }), e.canvas = new Wt({ pane: Ee, padding: 0.1 }, (o) => {
2485
2493
  e.quadro = o;
2486
2494
  const a = nt(o), i = [];
2487
2495
  for (const s of [...e.estados].sort((r, c) => r.layerDef.zIndex - c.layerDef.zIndex)) {
@@ -2492,51 +2500,51 @@ function Fi(n) {
2492
2500
  return o.branco && i.length === 0 ? !1 : (e.pintor.desenhar({ vista: a, origem: o.origemPx, camadas: i }, a, { alvo: "sobreposicao" }), i.length > 0);
2493
2501
  }), tt.set(n, e), e;
2494
2502
  }
2495
- function Ni(n, t) {
2503
+ function Vi(n, t) {
2496
2504
  t.noMapa || (t.noMapa = !0, n.whenReady(() => {
2497
- if (!n.getPane(we)) {
2498
- const e = n.createPane(we);
2499
- e.style.zIndex = Ti, e.style.pointerEvents = "none";
2505
+ if (!n.getPane(Ee)) {
2506
+ const e = n.createPane(Ee);
2507
+ e.style.zIndex = $i, e.style.pointerEvents = "none";
2500
2508
  }
2501
2509
  tt.get(n) === t && n.addLayer(t.canvas);
2502
2510
  }));
2503
2511
  }
2504
2512
  function Tt(n) {
2505
- n.agendado || (n.agendado = !0, Ee(() => {
2513
+ n.agendado || (n.agendado = !0, ke(() => {
2506
2514
  n.agendado = !1, n.noMapa && n.canvas.pintar();
2507
2515
  }));
2508
2516
  }
2509
- function Oi(n) {
2517
+ function ji(n) {
2510
2518
  var t;
2511
2519
  try {
2512
- return ((t = n.qualidade) == null ? void 0 : t.call(n)) ?? ze("alta");
2520
+ return ((t = n.qualidade) == null ? void 0 : t.call(n)) ?? we("alta");
2513
2521
  } catch {
2514
- return ze("alta");
2522
+ return we("alta");
2515
2523
  }
2516
2524
  }
2517
- class Ri {
2525
+ class Gi {
2518
2526
  constructor() {
2519
2527
  f(this, "estados", /* @__PURE__ */ new WeakMap());
2520
2528
  /** Por definição de camada, para a seleção sobreviver à recriação do grupo (ocultar e exibir a camada). */
2521
- f(this, "selecionadas", jo);
2529
+ f(this, "selecionadas", Ho);
2522
2530
  }
2523
2531
  // ---------------------------------------------------------------- ILayerRenderer
2524
2532
  render(t, e, o) {
2525
- const a = b.layerGroup(), i = new Pa(), s = Oi(o);
2533
+ const a = b.layerGroup(), i = new Ca(), s = ji(o);
2526
2534
  i.definirQualidade({ limiteMarcaPx: s.limiteMarcaPx, toleranciaPx: s.toleranciaPx });
2527
2535
  const r = o.regraVersoes;
2528
2536
  r && i.definirRegra((h, u) => r.visivel(h, u)), i.definirCamada(this.defMotor(t)), i.definirFeicoes(t.id, this.feicoesDe(t));
2529
2537
  const c = this.selecionadas.get(t);
2530
2538
  c && i.selecionar(t.id, c);
2531
2539
  const l = { layerDef: t, map: e, context: o, grupo: a, motor: i, interativo: t.interativo && !t.bloqueada, quadro: null, dom: /* @__PURE__ */ new Map(), fonteHit: null, agendado: !1, agendadoDom: !1, vivo: !0, ultima: null };
2532
- l.pintor = new wo({
2540
+ l.pintor = new Eo({
2533
2541
  camada: () => l.quadro ? { ctx: l.quadro.ctx, largura: l.quadro.larguraPx, altura: l.quadro.alturaPx, dpr: l.quadro.dpr } : null,
2534
2542
  sobreposicao: () => null
2535
2543
  }), l.pintor.definirTracejado(s.tracejado), e.getPane(ft(t.id)) || e.createPane(ft(t.id)), l.base = new Wt({ pane: ft(t.id), padding: 0.1, incremental: !0, dprMaximo: s.dprMaximo }, (h) => this.pintarBase(l, h)), this.estados.set(a, l), e.whenReady(() => {
2536
2544
  l.vivo && a.addLayer(l.base);
2537
2545
  });
2538
- const d = Fi(e);
2539
- return d.pintor.definirTracejado(s.tracejado), d.canvas.definirDprMaximo(s.dprMaximo), d.estados.add(l), Ni(e, d), this.registrarHit(l), a;
2546
+ const d = Bi(e);
2547
+ return d.pintor.definirTracejado(s.tracejado), d.canvas.definirDprMaximo(s.dprMaximo), d.estados.add(l), Vi(e, d), this.registrarHit(l), a;
2540
2548
  }
2541
2549
  update(t, e, o, a, i) {
2542
2550
  var r;
@@ -2559,7 +2567,7 @@ class Ri {
2559
2567
  destroy(t, e) {
2560
2568
  const o = t, a = this.estados.get(o);
2561
2569
  if (a) {
2562
- a.vivo = !1, a.fonteHit && qo(a.map, a.layerDef.id, a.fonteHit), a.fonteHit = null;
2570
+ a.vivo = !1, a.fonteHit && Fo(a.map, a.layerDef.id, a.fonteHit), a.fonteHit = null;
2563
2571
  const i = tt.get(a.map);
2564
2572
  i && (i.estados.delete(a), Tt(i)), a.pintor.destruir(), a.dom.clear();
2565
2573
  }
@@ -2656,13 +2664,13 @@ class Ri {
2656
2664
  return Array.isArray(o) ? o : [];
2657
2665
  }
2658
2666
  pedirBase(t) {
2659
- t.agendado || !t.vivo || (t.agendado = !0, Ee(() => {
2667
+ t.agendado || !t.vivo || (t.agendado = !0, ke(() => {
2660
2668
  t.agendado = !1, t.vivo && t.base.pintar();
2661
2669
  }));
2662
2670
  }
2663
2671
  /** Sincroniza só os marcadores DOM com a vista atual (clusters, ícones, textos, rótulos), sem repintar o canvas. */
2664
2672
  pedirDom(t) {
2665
- t.agendadoDom || !t.vivo || (t.agendadoDom = !0, Ee(() => {
2673
+ t.agendadoDom || !t.vivo || (t.agendadoDom = !0, ke(() => {
2666
2674
  if (t.agendadoDom = !1, !t.vivo) return;
2667
2675
  const e = t.base.quadroAtual();
2668
2676
  if (!e) return;
@@ -2677,7 +2685,7 @@ class Ri {
2677
2685
  }
2678
2686
  /** A vista de uma faixa exposta no pan incremental (a origem continua sendo a do canvas inteiro). */
2679
2687
  vistaDaFaixa(t, e) {
2680
- const o = Di, [a, i] = je(t.origemPx.x + e.x - o, t.origemPx.y + e.y - o, t.zoom), [s, r] = je(t.origemPx.x + e.x + e.largura + o, t.origemPx.y + e.y + e.altura + o, t.zoom);
2688
+ const o = Fi, [a, i] = Ge(t.origemPx.x + e.x - o, t.origemPx.y + e.y - o, t.zoom), [s, r] = Ge(t.origemPx.x + e.x + e.largura + o, t.origemPx.y + e.y + e.altura + o, t.zoom);
2681
2689
  return {
2682
2690
  ...nt(t),
2683
2691
  larguraPx: e.largura,
@@ -2698,13 +2706,13 @@ class Ri {
2698
2706
  if (e.regioes) {
2699
2707
  a = 0;
2700
2708
  for (const r of e.regioes) {
2701
- const c = this.vistaDaFaixa(e, r), l = t.motor.listaDesenho(c, { camadas: [o], parte: "canvas" }), d = Ye(l.camadas[0]);
2709
+ const c = this.vistaDaFaixa(e, r), l = t.motor.listaDesenho(c, { camadas: [o], parte: "canvas" }), d = Qe(l.camadas[0]);
2702
2710
  d !== 0 && (t.pintor.desenhar(l, c, { limpar: !1, recorte: r }), a += d);
2703
2711
  }
2704
2712
  const s = t.motor.listaDesenho(nt(e), { camadas: [o], parte: "dom" }).camadas[0];
2705
2713
  s && this.sincronizarDom(t, s);
2706
2714
  } else {
2707
- const s = nt(e), r = t.motor.listaDesenho(s, { camadas: [o] }), c = r.camadas[0] ?? null, l = Ye(c);
2715
+ const s = nt(e), r = t.motor.listaDesenho(s, { camadas: [o] }), c = r.camadas[0] ?? null, l = Qe(c);
2708
2716
  c ? l === 0 && e.branco ? a = 0 : (t.pintor.desenhar(r, s), a = l) : a = !e.branco, t.ultima = c, c && this.sincronizarDom(t, c);
2709
2717
  }
2710
2718
  const i = tt.get(t.map);
@@ -2725,7 +2733,7 @@ class Ri {
2725
2733
  sincronizarDom(t, e) {
2726
2734
  const o = /* @__PURE__ */ new Set();
2727
2735
  for (const a of e.itens) {
2728
- if (!qi.has(a.forma)) continue;
2736
+ if (!Oi.has(a.forma)) continue;
2729
2737
  const i = `${a.forma}:${a.id}`;
2730
2738
  o.add(i);
2731
2739
  try {
@@ -2766,11 +2774,11 @@ class Ri {
2766
2774
  keyboard: !1
2767
2775
  });
2768
2776
  u.on("click", (m) => this.acao(t, r, m)), u.on("dragend", () => {
2769
- var y, A;
2777
+ var y, M;
2770
2778
  const m = t.motor.feicao(i.id, r.id) ?? r;
2771
2779
  if (m.geometria.tipo !== "Text") return;
2772
2780
  const { lat: g, lng: p } = u.getLatLng(), v = { ...m, geometria: { ...m.geometria, coordenada: [g, p] } };
2773
- (A = (y = t.context).onLayerAction) == null || A.call(y, "feicao-movida", { camadaId: i.id, feicao: v });
2781
+ (M = (y = t.context).onLayerAction) == null || M.call(y, "feicao-movida", { camadaId: i.id, feicao: v });
2774
2782
  }), s.addLayer(u), t.dom.set(e, { layer: u, fonte: r, selecionada: o.selecionada, assinatura: "" });
2775
2783
  return;
2776
2784
  }
@@ -2778,7 +2786,7 @@ class Ri {
2778
2786
  const u = o.total ?? 0, m = `${o.id}:${u}:${o.restantes ?? 0}:${o.coordenada[0].toFixed(7)}:${o.coordenada[1].toFixed(7)}`;
2779
2787
  if ((c == null ? void 0 : c.assinatura) === m) return;
2780
2788
  c && s.removeLayer(c.layer);
2781
- const g = b.marker(o.coordenada, { icon: Go(u, l), pane: Z(a, i.id, "ponto"), keyboard: !1 });
2789
+ const g = b.marker(o.coordenada, { icon: Uo(u, l), pane: Z(a, i.id, "ponto"), keyboard: !1 });
2782
2790
  g.bindTooltip(`${u} feições agrupadas`, { direction: "top" }), g.on("click", () => {
2783
2791
  const p = t.motor.membrosDoCluster(i.id, o.id);
2784
2792
  p.length > 0 && a.fitBounds(b.latLngBounds(p.map((v) => v.coordenada)), { padding: [60, 60], maxZoom: 18 });
@@ -2801,13 +2809,13 @@ class Ri {
2801
2809
  return;
2802
2810
  }
2803
2811
  if (o.forma === "curva" && r) {
2804
- const u = r.geometria, m = (p) => Ae(ve(r, l, p), t.interativo);
2812
+ const u = r.geometria, m = (p) => ze(ve(r, l, p), t.interativo);
2805
2813
  if (c) {
2806
2814
  const p = c.layer;
2807
- c.fonte !== r ? (Vo(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);
2815
+ c.fonte !== r ? (Go(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);
2808
2816
  return;
2809
2817
  }
2810
- const g = Fe(u, { ...m(o.selecionada), pane: Z(a, i.id, u.tipo === "Polygon" ? "poligono" : "linha") });
2818
+ const g = Ne(u, { ...m(o.selecionada), pane: Z(a, i.id, u.tipo === "Polygon" ? "poligono" : "linha") });
2811
2819
  if (!g || !mt(u)) return;
2812
2820
  g.on("click", (p) => this.acao(t, r, p)), s.addLayer(g), t.dom.set(e, { layer: g, fonte: r, selecionada: o.selecionada, assinatura: "" });
2813
2821
  }
@@ -2825,7 +2833,7 @@ class Ri {
2825
2833
  c && c.selecionada !== a && this.trocarIcone(c, o, i, a);
2826
2834
  }
2827
2835
  const s = t.dom.get(`curva:${e}`);
2828
- s && s.selecionada !== a && (s.layer.setStyle(Ae(ve(o, i, a), t.interativo)), s.selecionada = a);
2836
+ s && s.selecionada !== a && (s.layer.setStyle(ze(ve(o, i, a), t.interativo)), s.selecionada = a);
2829
2837
  }
2830
2838
  // ---------------------------------------------------------------- hit-test central
2831
2839
  /**
@@ -2838,7 +2846,7 @@ class Ri {
2838
2846
  alvo: t.base,
2839
2847
  consultar: (o) => {
2840
2848
  const { map: a, layerDef: i, motor: s } = t;
2841
- if (!t.vivo || !t.interativo || !i.visivel || !$i(a)) return [];
2849
+ if (!t.vivo || !t.interativo || !i.visivel || !Ri(a)) return [];
2842
2850
  const r = a.layerPointToContainerPoint(o), c = a.containerPointToLatLng([r.x - It, r.y + It]), l = a.containerPointToLatLng([r.x + It, r.y - It]), d = {
2843
2851
  minLat: Math.min(c.lat, l.lat),
2844
2852
  maxLat: Math.max(c.lat, l.lat),
@@ -2853,13 +2861,13 @@ class Ri {
2853
2861
  const p = a.latLngToContainerPoint(g);
2854
2862
  return { x: p.x, y: p.y };
2855
2863
  }, m = [];
2856
- for (let g = 0; g < _i && h.length > 0; g++) {
2864
+ for (let g = 0; g < Ni && h.length > 0; g++) {
2857
2865
  const p = Qt({ x: r.x, y: r.y }, h, u);
2858
2866
  if (!p) break;
2859
2867
  h.splice(h.indexOf(p), 1);
2860
2868
  const v = s.caixaDe(i.id, p.id), y = v ? (() => {
2861
- const A = a.latLngToContainerPoint([v.minLat, v.minLon]), x = a.latLngToContainerPoint([v.maxLat, v.maxLon]);
2862
- return Math.abs(x.x - A.x) * Math.abs(x.y - A.y);
2869
+ const M = a.latLngToContainerPoint([v.minLat, v.minLon]), x = a.latLngToContainerPoint([v.maxLat, v.maxLon]);
2870
+ return Math.abs(x.x - M.x) * Math.abs(x.y - M.y);
2863
2871
  })() : 0;
2864
2872
  m.push({
2865
2873
  feicao: p,
@@ -2872,7 +2880,7 @@ class Ri {
2872
2880
  return m;
2873
2881
  }
2874
2882
  };
2875
- t.fonteHit = e, _o(t.map, t.layerDef.id, e), t.base.on("click", (o) => {
2883
+ t.fonteHit = e, $o(t.map, t.layerDef.id, e), t.base.on("click", (o) => {
2876
2884
  var r, c;
2877
2885
  const { feicaoHit: a, originalEvent: i } = o;
2878
2886
  if (!a || !t.vivo) return;
@@ -2886,18 +2894,18 @@ class Ri {
2886
2894
  });
2887
2895
  }
2888
2896
  }
2889
- function Bi(n) {
2897
+ function Hi(n) {
2890
2898
  return String(n ?? "").trim().toLowerCase() === "canvas" ? "canvas" : "leaflet";
2891
2899
  }
2892
- class Vi {
2893
- constructor(t = new Ei(), e = new Ri()) {
2900
+ class Ui {
2901
+ constructor(t = new Di(), e = new Gi()) {
2894
2902
  f(this, "roteamento", /* @__PURE__ */ new WeakMap());
2895
2903
  this.leaflet = t, this.canvas = e;
2896
2904
  }
2897
2905
  modo(t) {
2898
2906
  var e;
2899
2907
  try {
2900
- return Bi((e = t.renderizador) == null ? void 0 : e.call(t));
2908
+ return Hi((e = t.renderizador) == null ? void 0 : e.call(t));
2901
2909
  } catch {
2902
2910
  return "leaflet";
2903
2911
  }
@@ -2942,14 +2950,14 @@ class Vi {
2942
2950
  this.de(t).aplicarSelecao(t, e);
2943
2951
  }
2944
2952
  }
2945
- R.register("tile", new pi());
2946
- R.register("wms", new fi());
2947
- R.register("vetorial-linhas", new mi());
2948
- R.register("vetorial-pontos", new vi());
2949
- R.register("vetorial-poligonos", new bi());
2950
- R.register("grid", new yi());
2951
- R.register("feicoes", new Vi());
2952
- const fo = [
2953
+ R.register("tile", new vi());
2954
+ R.register("wms", new bi());
2955
+ R.register("vetorial-linhas", new yi());
2956
+ R.register("vetorial-pontos", new Pi());
2957
+ R.register("vetorial-poligonos", new Li());
2958
+ R.register("grid", new Ci());
2959
+ R.register("feicoes", new Ui());
2960
+ const mo = [
2953
2961
  {
2954
2962
  id: "satelite",
2955
2963
  nome: "Satélite Google Híbrido",
@@ -3073,11 +3081,11 @@ const fo = [
3073
3081
  scaleMode: "screen"
3074
3082
  }
3075
3083
  }
3076
- ], ji = /* @__PURE__ */ new Set(["tile", "wms", "grid"]);
3084
+ ], Zi = /* @__PURE__ */ new Set(["tile", "wms", "grid"]);
3077
3085
  function he(n, t) {
3078
3086
  return typeof n == "number" && Number.isFinite(n) ? Math.max(0, Math.min(1, n)) : t;
3079
3087
  }
3080
- class Gi {
3088
+ class Wi {
3081
3089
  constructor(t) {
3082
3090
  f(this, "layers", []);
3083
3091
  f(this, "layerInstances", /* @__PURE__ */ new Map());
@@ -3088,7 +3096,7 @@ class Gi {
3088
3096
  // cada um mudava o contexto e recriava todas as camadas. Agora as mudanças de contexto do mesmo tick
3089
3097
  // viram um único render (em microtask), antecipado por qualquer leitura/alteração das instâncias.
3090
3098
  f(this, "renderPendente", !1);
3091
- this.layers = (t || fo).map((e) => ({ ...e, estilo: { ...e.estilo } }));
3099
+ this.layers = (t || mo).map((e) => ({ ...e, estilo: { ...e.estilo } }));
3092
3100
  }
3093
3101
  /**
3094
3102
  * Remove as camadas que o kit traz de fábrica (satélite, SIGEF, homologados, perímetro, vizinhos, vértices, grade).
@@ -3096,7 +3104,7 @@ class Gi {
3096
3104
  */
3097
3105
  descartarCamadasPadrao() {
3098
3106
  if (this.map) return;
3099
- const t = new Set(fo.map((e) => e.id));
3107
+ const t = new Set(mo.map((e) => e.id));
3100
3108
  this.layers = this.layers.filter((e) => !t.has(e.id) || e.tipo === "feicoes");
3101
3109
  }
3102
3110
  attachMap(t, e) {
@@ -3111,7 +3119,7 @@ class Gi {
3111
3119
  }
3112
3120
  renderAllLayers(t = !1) {
3113
3121
  this.renderPendente = !1, !(!this.map || !this.context) && (this.layers.forEach((e) => {
3114
- if (!(t && ji.has(e.tipo) && e.visivel && this.layerInstances.has(e.id))) {
3122
+ if (!(t && Zi.has(e.tipo) && e.visivel && this.layerInstances.has(e.id))) {
3115
3123
  if (this.layerInstances.has(e.id)) {
3116
3124
  const o = this.layerInstances.get(e.id), a = R.get(e.tipo);
3117
3125
  a && a.destroy(o, this.map), this.layerInstances.delete(e.id);
@@ -3332,7 +3340,7 @@ class Gi {
3332
3340
  }), this.layerInstances.clear()), this.map = null, this.context = null, this.listeners = [];
3333
3341
  }
3334
3342
  }
3335
- function Ho(n, t) {
3343
+ function Zo(n, t) {
3336
3344
  var s, r;
3337
3345
  if (t == null) return null;
3338
3346
  const e = String(t).trim(), o = (c) => c ? (c.lon = c.lng, c) : null, i = n.getMarkers().find((c) => {
@@ -3346,9 +3354,9 @@ function Ho(n, t) {
3346
3354
  for (const c of n.layerManager.getAllLayerInstances()) {
3347
3355
  let l = null;
3348
3356
  const d = (h) => {
3349
- var g, p, v, y, A;
3357
+ var g, p, v, y, M;
3350
3358
  if (l) return;
3351
- const u = h.pontoId ?? h.elementoId ?? h.id ?? ((g = h.options) == null ? void 0 : g.id) ?? ((p = h.options) == null ? void 0 : p.pontoId), m = ((v = h.elemento) == null ? void 0 : v.nome) ?? ((y = h.elemento) == null ? void 0 : y.nome_vertice) ?? ((A = h.options) == null ? void 0 : A.nome);
3359
+ const u = h.pontoId ?? h.elementoId ?? h.id ?? ((g = h.options) == null ? void 0 : g.id) ?? ((p = h.options) == null ? void 0 : p.pontoId), m = ((v = h.elemento) == null ? void 0 : v.nome) ?? ((y = h.elemento) == null ? void 0 : y.nome_vertice) ?? ((M = h.options) == null ? void 0 : M.nome);
3352
3360
  (String(u) === e || m && String(m).toLowerCase() === e.toLowerCase()) && (typeof h.getLatLng == "function" ? l = h.getLatLng() : typeof h.getBounds == "function" && (l = h.getBounds().getCenter()));
3353
3361
  };
3354
3362
  if (d(c), typeof c.eachLayer == "function" && c.eachLayer(d), l) return o(l);
@@ -3386,7 +3394,7 @@ function Ho(n, t) {
3386
3394
  return o(b.latLng(l / h, d / h));
3387
3395
  }
3388
3396
  if (c.poligono_wkt) {
3389
- const l = We(c.poligono_wkt);
3397
+ const l = Xe(c.poligono_wkt);
3390
3398
  if (l) return o(b.latLng(l.lat, l.lon));
3391
3399
  }
3392
3400
  }
@@ -3418,7 +3426,7 @@ function Ho(n, t) {
3418
3426
  const l = c.dados.poligonos.find((d) => String(d.id) === e);
3419
3427
  if (l) {
3420
3428
  if (l.wkt) {
3421
- const d = We(l.wkt);
3429
+ const d = Xe(l.wkt);
3422
3430
  if (d) return o(b.latLng(d.lat, d.lon));
3423
3431
  }
3424
3432
  if (Array.isArray(l.coordenadas) && l.coordenadas.length > 0) {
@@ -3435,12 +3443,12 @@ function Ho(n, t) {
3435
3443
  }
3436
3444
  return null;
3437
3445
  }
3438
- function Hi(n, t, e, o) {
3446
+ function Xi(n, t, e, o) {
3439
3447
  var m, g;
3440
- ke(t, n.getMap());
3448
+ Ie(t, n.getMap());
3441
3449
  const a = n.getMap();
3442
3450
  if (!a) return;
3443
- const i = Ho(n, e);
3451
+ const i = Zo(n, e);
3444
3452
  if (!i) {
3445
3453
  console.warn(`[ui-canvas-cad] Elemento com identificador "${e}" não encontrado para destaque.`);
3446
3454
  return;
@@ -3470,13 +3478,13 @@ function Hi(n, t, e, o) {
3470
3478
  }), t.destaqueMarker.addTo(a);
3471
3479
  const u = (g = (m = t.destaqueMarker).getElement) == null ? void 0 : g.call(m);
3472
3480
  u && (u.style.pointerEvents = "none"), o != null && o.duracaoMs && o.duracaoMs > 0 && (t.destaqueTimeoutId = window.setTimeout(() => {
3473
- ke(t, a);
3481
+ Ie(t, a);
3474
3482
  }, o.duracaoMs));
3475
3483
  }
3476
- function ke(n, t) {
3484
+ function Ie(n, t) {
3477
3485
  n.destaqueTimeoutId !== null && (window.clearTimeout(n.destaqueTimeoutId), n.destaqueTimeoutId = null), n.destaqueMarker && (t && t.hasLayer(n.destaqueMarker) ? t.removeLayer(n.destaqueMarker) : typeof n.destaqueMarker.remove == "function" && n.destaqueMarker.remove(), n.destaqueMarker = null);
3478
3486
  }
3479
- function Ui(n, t) {
3487
+ function Ki(n, t) {
3480
3488
  const e = /* @__PURE__ */ new Map();
3481
3489
  n.forEach((a) => {
3482
3490
  const i = a.lat ?? a.latitude ?? a.y, s = a.lon ?? a.lng ?? a.longitude ?? a.x, r = V(i, s);
@@ -3502,7 +3510,7 @@ function Ui(n, t) {
3502
3510
  });
3503
3511
  }), Array.from(o.values()).filter((a) => a.pontos && a.pontos.length > 0 || !!a.poligono_wkt);
3504
3512
  }
3505
- function Zi(n, t) {
3513
+ function Yi(n, t) {
3506
3514
  const e = /* @__PURE__ */ new Map();
3507
3515
  return t.forEach((o) => {
3508
3516
  o.id !== void 0 && o.id !== null && o.pontos && o.pontos.length > 0 && e.set(o.id, o.pontos);
@@ -3511,7 +3519,7 @@ function Zi(n, t) {
3511
3519
  return a !== void 0 && (!o.pontos || o.pontos.length === 0) && e.has(a) ? { ...o, pontos: e.get(a) } : { ...o };
3512
3520
  });
3513
3521
  }
3514
- function Wi(n, t, e = !1) {
3522
+ function Qi(n, t, e = !1) {
3515
3523
  let o = [...n];
3516
3524
  e && t && t.forEach((i) => {
3517
3525
  i.pontos && o.push(...i.pontos);
@@ -3522,7 +3530,7 @@ function Wi(n, t, e = !1) {
3522
3530
  }).filter((i) => i !== null);
3523
3531
  return a.length === 1 ? { single: a[0] } : a.length > 1 ? { bounds: b.latLngBounds(a) } : null;
3524
3532
  }
3525
- function Xi(n, t) {
3533
+ function Ji(n, t) {
3526
3534
  var i;
3527
3535
  (i = t == null ? void 0 : t.flushRender) == null || i.call(t);
3528
3536
  const e = [], o = /* @__PURE__ */ new Set(), a = (s) => {
@@ -3534,14 +3542,14 @@ function Xi(n, t) {
3534
3542
  a(s), typeof s.eachLayer == "function" && s.eachLayer(a);
3535
3543
  }), e;
3536
3544
  }
3537
- function Ki(n, t, e = "vertices", o) {
3545
+ function tn(n, t, e = "vertices", o) {
3538
3546
  const a = t || [];
3539
3547
  n.layerManager.getOrCreateLayer(e, "vetorial-pontos", "Pontos / Vértices"), e === "vertices" && (n.context.pontos = a, n.canvasInteracao.ctx.pontosList = a, o && (n.customMarkerClickCallback = (i) => {
3540
3548
  const s = a.find((r) => String(r.id) === String(i)) || { id: i, lat: 0, lon: 0 };
3541
3549
  o(s);
3542
3550
  })), n.layerManager.setLayerData(e, { pontos: a, onClique: o }), n.layerManager.setLayerVisibility(e, !0);
3543
3551
  }
3544
- function Yi(n, t, e = "linhas") {
3552
+ function en(n, t, e = "linhas") {
3545
3553
  const o = t || [];
3546
3554
  n.layerManager.getOrCreateLayer(e, "vetorial-linhas", "Conexões / Linhas"), (e === "linhas" || e === "perimetro") && (n.context.segmentos = o.map((a) => ({
3547
3555
  ponto_inicio_id: Number(a.origemId) || 0,
@@ -3549,7 +3557,7 @@ function Yi(n, t, e = "linhas") {
3549
3557
  tipo_limite_sigef: a.tipoLinha === "tracejada" ? "LN1" : "LA1"
3550
3558
  }))), n.layerManager.setLayerData(e, { conexoes: o }), n.layerManager.setLayerVisibility(e, !0);
3551
3559
  }
3552
- function Qi(n, t, e = !0, o = "polilinha", a) {
3560
+ function on(n, t, e = !0, o = "polilinha", a) {
3553
3561
  const i = t || [];
3554
3562
  n.layerManager.getOrCreateLayer(o, "vetorial-linhas", "Polilinhas"), (o === "polilinha" || o === "perimetro") && (n.context.pontos = i, n.context.segmentos = [], n.canvasInteracao.ctx.pontosList = i);
3555
3563
  const s = a || n.chaveGrupo || n.context.chaveGrupo;
@@ -3560,11 +3568,11 @@ function Qi(n, t, e = !0, o = "polilinha", a) {
3560
3568
  chaveGrupo: s
3561
3569
  }), n.layerManager.setLayerVisibility(o, !0);
3562
3570
  }
3563
- function Ji(n, t, e = "poligonos") {
3571
+ function an(n, t, e = "poligonos") {
3564
3572
  const o = t || [];
3565
3573
  n.layerManager.getOrCreateLayer(e, "vetorial-poligonos", "Polígonos"), n.layerManager.setLayerData(e, { poligonos: o }), n.layerManager.setLayerVisibility(e, !0);
3566
3574
  }
3567
- function tn(n, t, e) {
3575
+ function nn(n, t, e) {
3568
3576
  const o = t || [];
3569
3577
  if (e != null) {
3570
3578
  const a = e || [];
@@ -3575,7 +3583,7 @@ function tn(n, t, e) {
3575
3583
  ...e != null ? { pontos: n.context.pontos } : {}
3576
3584
  });
3577
3585
  }
3578
- function en(n, t = !1) {
3586
+ function sn(n, t = !1) {
3579
3587
  n.context.pontos = [], n.context.segmentos = [], n.context.confrontantes = [], n.canvasInteracao.ctx.pontosList = [], n.canvasInteracao.limparSelecao();
3580
3588
  const e = {
3581
3589
  pontos: [],
@@ -3584,28 +3592,28 @@ function en(n, t = !1) {
3584
3592
  };
3585
3593
  t || (n.context.bancoPontos = [], e.bancoPontos = []), n.layerManager.updateContext(e);
3586
3594
  }
3587
- function mo(n) {
3595
+ function go(n) {
3588
3596
  return n != null && !isNaN(Number(n)) && String(n).trim() !== "" ? Number(n) : n;
3589
3597
  }
3590
- function on(n, t) {
3598
+ function rn(n, t) {
3591
3599
  var r, c;
3592
3600
  const e = n.core.map, o = n.layerManager.getLayerDef(t.layerId), a = t.baseSize || 8, i = ((r = n.context.graphicScale) == null ? void 0 : r.markerScaleMultiplier) || 1;
3593
3601
  if (e && ((c = o == null ? void 0 : o.estilo) == null ? void 0 : c.scaleMode) === "world") {
3594
3602
  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);
3595
3603
  return Math.max(3, Math.round(m * i));
3596
3604
  }
3597
- const s = No(t.densTotal || 0, (e == null ? void 0 : e.getZoom()) ?? 18);
3605
+ const s = Ro(t.densTotal || 0, (e == null ? void 0 : e.getZoom()) ?? 18);
3598
3606
  return Math.max(s < 1 ? 5 : 4, Math.round(a * i * s));
3599
3607
  }
3600
- function an(n, t, e, o, a) {
3601
- const i = on(n, e), s = n.context.config.enableAnimations ? "cad-pt-anim" : "", r = Zt(
3608
+ function cn(n, t, e, o, a) {
3609
+ const i = rn(n, e), s = n.context.config.enableAnimations ? "cad-pt-anim" : "", r = Zt(
3602
3610
  e.shapeStyle,
3603
3611
  i,
3604
3612
  e.markerBg,
3605
3613
  s,
3606
3614
  `map-marker-${e.layerId || "pts"}-${o}`,
3607
3615
  a,
3608
- { densidade: Se(e.densTotal || 0) }
3616
+ { densidade: Me(e.densTotal || 0) }
3609
3617
  );
3610
3618
  e.tamanhoPx = i, t.setIcon(b.divIcon({
3611
3619
  html: r,
@@ -3613,7 +3621,7 @@ function an(n, t, e, o, a) {
3613
3621
  iconSize: [i + 6, i + 6]
3614
3622
  }));
3615
3623
  }
3616
- function nn(n) {
3624
+ function ln(n) {
3617
3625
  const t = n.context.selectedPontoIds || [], e = n.canvasInteracao.ctx.selectedVizinhoPontoIds || [], o = /* @__PURE__ */ new Set([
3618
3626
  ...t.map(String),
3619
3627
  ...e.map(String)
@@ -3623,12 +3631,12 @@ function nn(n) {
3623
3631
  if (s == null) continue;
3624
3632
  const r = o.has(String(s));
3625
3633
  if (i.isSelected === r) continue;
3626
- i.isSelected = r, a.setZIndexOffset(r ? 2e3 : 0), i.shapeStyle && i.baseSize && i.markerBg && an(n, a, i, s, r);
3634
+ i.isSelected = r, a.setZIndexOffset(r ? 2e3 : 0), i.shapeStyle && i.baseSize && i.markerBg && cn(n, a, i, s, r);
3627
3635
  const c = a.getElement();
3628
3636
  c && (r ? c.classList.add("cad-marker-selected", "ponto-selecionado") : c.classList.remove("cad-marker-selected", "ponto-selecionado"));
3629
3637
  }
3630
3638
  }
3631
- class sn {
3639
+ class dn {
3632
3640
  constructor(t) {
3633
3641
  f(this, "core");
3634
3642
  f(this, "layerManager");
@@ -3644,7 +3652,7 @@ class sn {
3644
3652
  destaqueMarker: null,
3645
3653
  destaqueTimeoutId: null
3646
3654
  });
3647
- this.core = new ti(this), this.layerManager = new Gi(t), this.canvasInteracao = new ui({
3655
+ this.core = new ii(this), this.layerManager = new Wi(t), this.canvasInteracao = new gi({
3648
3656
  mapaController: this,
3649
3657
  layerManager: this.layerManager
3650
3658
  }), this.context = {
@@ -3661,7 +3669,7 @@ class sn {
3661
3669
  },
3662
3670
  onMarkerClick: (e, o) => {
3663
3671
  if (this.modoCliqueSequencialAtivo || this.context.modoSequencial) return;
3664
- const a = mo(e);
3672
+ const a = go(e);
3665
3673
  if (this.customMarkerClickCallback)
3666
3674
  try {
3667
3675
  this.customMarkerClickCallback(a, o);
@@ -3709,16 +3717,16 @@ class sn {
3709
3717
  this.context.confrontantes = e, this.layerManager.updateContext({ confrontantes: e });
3710
3718
  }
3711
3719
  plotarPontos(t, e = "vertices", o) {
3712
- Ki(this, t, e, o);
3720
+ tn(this, t, e, o);
3713
3721
  }
3714
3722
  plotarConexoes(t, e = "linhas") {
3715
- Yi(this, t, e);
3723
+ en(this, t, e);
3716
3724
  }
3717
3725
  plotarPolilinhaSequencial(t, e = !0, o = "polilinha", a) {
3718
- Qi(this, t, e, o, a);
3726
+ on(this, t, e, o, a);
3719
3727
  }
3720
3728
  plotarPoligonos(t, e = "poligonos") {
3721
- Ji(this, t, e);
3729
+ an(this, t, e);
3722
3730
  }
3723
3731
  limparCamadas(t) {
3724
3732
  this.layerManager.clearLayers(t), (!t || t.length === 0) && this.canvasInteracao.limparSelecao();
@@ -3740,7 +3748,7 @@ class sn {
3740
3748
  e && (this.customMarkerClickCallback = e), this.setPontos(t || []);
3741
3749
  }
3742
3750
  plotSegmentos(t, e) {
3743
- tn(this, t, e);
3751
+ nn(this, t, e);
3744
3752
  }
3745
3753
  plotPolilinhaTemporaria(t) {
3746
3754
  const e = t || [];
@@ -3751,15 +3759,15 @@ class sn {
3751
3759
  this.setBancoPontos(e), this.layerManager.setLayerVisibility("homologados", !0), this.layerManager.setLayerVisibility("homologados-pontos", !0);
3752
3760
  }
3753
3761
  plotPontosVizinhos(t) {
3754
- const e = Ui(t || [], this.context.confrontantes || []);
3762
+ const e = Ki(t || [], this.context.confrontantes || []);
3755
3763
  this.setConfrontantes(e), this.layerManager.setLayerVisibility("vizinhos", !0);
3756
3764
  }
3757
3765
  plotPoligonosVizinhos(t) {
3758
- const e = Zi(t || [], this.context.confrontantes || []);
3766
+ const e = Yi(t || [], this.context.confrontantes || []);
3759
3767
  this.setConfrontantes(e), this.layerManager.setLayerVisibility("vizinhos", !0);
3760
3768
  }
3761
3769
  clearOverlays(t = !1) {
3762
- en(this, t);
3770
+ sn(this, t);
3763
3771
  }
3764
3772
  setGraphicScale(t) {
3765
3773
  this.layerManager.setGraphicScale(t);
@@ -3775,13 +3783,13 @@ class sn {
3775
3783
  const o = String(t), a = this.getMarkers().find((s) => String(s.pontoId) === o);
3776
3784
  if (a && e !== void 0) {
3777
3785
  const s = this.core.map;
3778
- s.setView(a.getLatLng(), e), $e(s, () => a.openPopup());
3786
+ s.setView(a.getLatLng(), e), Fe(s, () => a.openPopup());
3779
3787
  }
3780
- const i = mo(t);
3788
+ const i = go(t);
3781
3789
  this.canvasInteracao.ctx.selectedPontoIds = [i], this.canvasInteracao.ctx.lastSelectedPontoId = i, this.context.selectedPontoIds = [i], this.atualizarDestaqueMarcadores();
3782
3790
  }
3783
3791
  atualizarDestaqueMarcadores() {
3784
- nn(this);
3792
+ ln(this);
3785
3793
  }
3786
3794
  selectSegmento(t) {
3787
3795
  const e = t != null ? String(t) : null;
@@ -3789,7 +3797,7 @@ class sn {
3789
3797
  }
3790
3798
  fitBounds(t, e = [40, 40], o = !1) {
3791
3799
  if (!this.core.map) return;
3792
- const a = Wi(t || this.context.pontos || [], this.context.confrontantes, o);
3800
+ const a = Qi(t || this.context.pontos || [], this.context.confrontantes, o);
3793
3801
  if (a) {
3794
3802
  a.single ? this.core.map.setView(a.single, 18) : a.bounds && (this.core.map.fitBounds(a.bounds, { padding: e }), this.core.map.once("moveend", () => {
3795
3803
  this.core.preCarregarTilesRegiao(a.bounds);
@@ -3801,7 +3809,7 @@ class sn {
3801
3809
  }
3802
3810
  }
3803
3811
  getMarkers() {
3804
- return Xi(this.core.map, this.layerManager);
3812
+ return Ji(this.core.map, this.layerManager);
3805
3813
  }
3806
3814
  getVizinhosMarkers() {
3807
3815
  return this.getMarkers().filter((t) => !!t.isVizinho);
@@ -3810,13 +3818,13 @@ class sn {
3810
3818
  return this.destaqueState.destaqueMarker !== null;
3811
3819
  }
3812
3820
  localizarCoordenadasElemento(t) {
3813
- return Ho(this, t);
3821
+ return Zo(this, t);
3814
3822
  }
3815
3823
  destacarElemento(t, e) {
3816
- Hi(this, this.destaqueState, t, e);
3824
+ Xi(this, this.destaqueState, t, e);
3817
3825
  }
3818
3826
  limparDestaque() {
3819
- ke(this.destaqueState, this.getMap());
3827
+ Ie(this.destaqueState, this.getMap());
3820
3828
  }
3821
3829
  destroy() {
3822
3830
  if (this.limparDestaque(), this.canvasInteracao.desativar(), this.layerManager.destroy(), this.core.destroy(), this.core.map)
@@ -3831,7 +3839,7 @@ class sn {
3831
3839
  return this.core.map;
3832
3840
  }
3833
3841
  }
3834
- function rn(n, t, e, o) {
3842
+ function hn(n, t, e, o) {
3835
3843
  if (!n) return;
3836
3844
  if (n.querySelectorAll(".layer-item").length === t.length) {
3837
3845
  t.forEach((i) => {
@@ -3911,21 +3919,21 @@ function rn(n, t, e, o) {
3911
3919
  });
3912
3920
  });
3913
3921
  }
3914
- function cn(n) {
3922
+ function un(n) {
3915
3923
  return n.context.selectedPontoIds || n.canvasInteracao.ctx.selectedPontoIds || [];
3916
3924
  }
3917
- function Uo(n, t) {
3925
+ function Wo(n, t) {
3918
3926
  n.canvasInteracao.ctx.selectedPontoIds = [...t], n.context.selectedPontoIds = [...t];
3919
3927
  }
3920
- function Ne(n) {
3928
+ function Oe(n) {
3921
3929
  const t = n;
3922
3930
  return (t == null ? void 0 : t.originalEvent) || t || {};
3923
3931
  }
3924
- function ln(n) {
3925
- const t = n, e = Ne(n), o = typeof e.composedPath == "function" ? e.composedPath() : [];
3932
+ function pn(n) {
3933
+ const t = n, e = Oe(n), o = typeof e.composedPath == "function" ? e.composedPath() : [];
3926
3934
  return o.length > 0 ? o[0] : e.target || (t == null ? void 0 : t.target) || null;
3927
3935
  }
3928
- function dn(n, t, e) {
3936
+ function fn(n, t, e) {
3929
3937
  var i, s, r, c;
3930
3938
  if (t) return { x: Math.round(t.x), y: Math.round(t.y) };
3931
3939
  const o = n;
@@ -3934,27 +3942,27 @@ function dn(n, t, e) {
3934
3942
  x: Math.round(((i = o.containerPoint) == null ? void 0 : i.x) ?? ((s = o.layerPoint) == null ? void 0 : s.x) ?? 0),
3935
3943
  y: Math.round(((r = o.containerPoint) == null ? void 0 : r.y) ?? ((c = o.layerPoint) == null ? void 0 : c.y) ?? 0)
3936
3944
  };
3937
- const a = Ne(n);
3945
+ const a = Oe(n);
3938
3946
  return {
3939
3947
  x: Math.round((a.clientX ?? 0) - e.left),
3940
3948
  y: Math.round((a.clientY ?? 0) - e.top)
3941
3949
  };
3942
3950
  }
3943
- function hn(n, t) {
3951
+ function mn(n, t) {
3944
3952
  const e = t || (n == null ? void 0 : n.latlng);
3945
3953
  return e && typeof e.lat == "number" ? { lat: e.lat, lng: e.lng ?? e.lon ?? 0 } : null;
3946
3954
  }
3947
- function un(n, t, e, o) {
3955
+ function gn(n, t, e, o) {
3948
3956
  var g, p;
3949
3957
  if (n.modoSequencial || n.controller.canvasInteracao.selectionHappened || n.controller.canvasInteracao.panHappened || n.mouseMovedSinceDown) return !1;
3950
- const a = Ne(t), i = ln(t);
3958
+ const a = Oe(t), i = pn(t);
3951
3959
  if (i) {
3952
3960
  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"]';
3953
3961
  if (((g = i.matches) == null ? void 0 : g.call(i, v)) || ((p = i.closest) == null ? void 0 : p.call(i, v))) return !1;
3954
3962
  }
3955
3963
  const s = n.controller.getMap();
3956
3964
  if (!s || !n.mapContainer) return !1;
3957
- const r = dn(t, o, n.mapContainer.getBoundingClientRect()), l = hn(t, e) ?? s.containerPointToLatLng(b.point(r.x, r.y)), d = l.lat, h = l.lng, u = n.controller.layerManager ? n.controller.layerManager.getLayers().filter((v) => v.visivel).map((v) => v.id) : [], m = a;
3965
+ const r = fn(t, o, n.mapContainer.getBoundingClientRect()), l = mn(t, e) ?? s.containerPointToLatLng(b.point(r.x, r.y)), d = l.lat, h = l.lng, u = n.controller.layerManager ? n.controller.layerManager.getLayers().filter((v) => v.visivel).map((v) => v.id) : [], m = a;
3958
3966
  return n.host.dispatchEvent(new CustomEvent("ui-canvas-clique", {
3959
3967
  detail: {
3960
3968
  coordenadas: {
@@ -3972,7 +3980,7 @@ function un(n, t, e, o) {
3972
3980
  composed: !0
3973
3981
  })), !0;
3974
3982
  }
3975
- function pn(n, t, e, o) {
3983
+ function vn(n, t, e, o) {
3976
3984
  const a = o || n.obterElementoPorId(e);
3977
3985
  n.host.dispatchEvent(new CustomEvent("ui-acao-popup", {
3978
3986
  detail: {
@@ -3984,7 +3992,7 @@ function pn(n, t, e, o) {
3984
3992
  composed: !0
3985
3993
  })), n.fecharPopup();
3986
3994
  }
3987
- function fn(n, t, e, o, a, i, s) {
3995
+ function bn(n, t, e, o, a, i, s) {
3988
3996
  let r = o || n.obterElementoPorId(t), c = a;
3989
3997
  if (!c && r) {
3990
3998
  const l = r, d = l.lat ?? l.latitude ?? 0, h = l.lon ?? l.lng ?? l.longitude ?? 0;
@@ -4025,12 +4033,12 @@ function fn(n, t, e, o, a, i, s) {
4025
4033
  composed: !0
4026
4034
  }));
4027
4035
  }
4028
- function mn(n, t, e, o, a) {
4036
+ function yn(n, t, e, o, a) {
4029
4037
  if (n.modoSequencial) {
4030
4038
  n.fecharPopup();
4031
4039
  return;
4032
4040
  }
4033
- if (n.controller.canvasInteracao.ctx.selectedPontoIds = [], n.controller.canvasInteracao.ctx.selectedVizinhoPontoIds = [], n.controller.canvasInteracao.ctx.lastSelectedPontoId = null, Uo(n.controller, []), n.controller.atualizarDestaqueMarcadores(), n.controller.selectSegmento(t), a)
4041
+ if (n.controller.canvasInteracao.ctx.selectedPontoIds = [], n.controller.canvasInteracao.ctx.selectedVizinhoPontoIds = [], n.controller.canvasInteracao.ctx.lastSelectedPontoId = null, Wo(n.controller, []), n.controller.atualizarDestaqueMarcadores(), n.controller.selectSegmento(t), a)
4034
4042
  try {
4035
4043
  a(t, e);
4036
4044
  } catch (i) {
@@ -4057,7 +4065,7 @@ function mn(n, t, e, o, a) {
4057
4065
  composed: !0
4058
4066
  }));
4059
4067
  }
4060
- function gn(n, t) {
4068
+ function xn(n, t) {
4061
4069
  let e = null, o = null, a = 0, i = 0;
4062
4070
  function s() {
4063
4071
  var d;
@@ -4093,7 +4101,7 @@ function gn(n, t) {
4093
4101
  invalidateSizeSafely: s
4094
4102
  };
4095
4103
  }
4096
- class vn {
4104
+ class Pn {
4097
4105
  constructor(t) {
4098
4106
  f(this, "canal", null);
4099
4107
  f(this, "contexto");
@@ -4154,7 +4162,7 @@ class vn {
4154
4162
  }
4155
4163
  }
4156
4164
  }
4157
- class bn {
4165
+ class Ln {
4158
4166
  constructor(t) {
4159
4167
  f(this, "contexto");
4160
4168
  f(this, "uiListeners", new Gt());
@@ -4217,7 +4225,7 @@ class bn {
4217
4225
  this.uiListeners.cleanup();
4218
4226
  }
4219
4227
  }
4220
- class yn {
4228
+ class Cn {
4221
4229
  constructor(t) {
4222
4230
  f(this, "contexto");
4223
4231
  f(this, "_pontos", []);
@@ -4317,12 +4325,12 @@ class yn {
4317
4325
  return this.contexto.obterController().getVizinhosMarkers();
4318
4326
  }
4319
4327
  }
4320
- const xn = ':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}';
4321
- function Pn() {
4328
+ const Sn = ':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}';
4329
+ function Mn() {
4322
4330
  return `
4323
4331
  <style>
4324
- ${Ca}
4325
- ${xn}
4332
+ ${Ma}
4333
+ ${Sn}
4326
4334
  </style>
4327
4335
  <div class="cad-root" id="cad-root" part="base" role="region" aria-label="Mapa CAD">
4328
4336
  <div class="cad-map-container" id="cad-map-container" part="viewport"></div>
@@ -4362,7 +4370,7 @@ function Pn() {
4362
4370
  </div>
4363
4371
  `;
4364
4372
  }
4365
- function Ln(n, t, e, o) {
4373
+ function An(n, t, e, o) {
4366
4374
  if (e !== o) {
4367
4375
  if (t === "sat-opacity") {
4368
4376
  const a = parseFloat(o);
@@ -4390,7 +4398,7 @@ function Ln(n, t, e, o) {
4390
4398
  }
4391
4399
  }
4392
4400
  }
4393
- function Zo(n) {
4401
+ function Xo(n) {
4394
4402
  const t = n;
4395
4403
  if (!t || !t._leaflet_id) return !1;
4396
4404
  try {
@@ -4400,9 +4408,9 @@ function Zo(n) {
4400
4408
  }
4401
4409
  return !0;
4402
4410
  }
4403
- function Cn(n) {
4411
+ function zn(n) {
4404
4412
  if (!n.mapContainer) return;
4405
- if (n.controller.getMap() || Zo(n.mapContainer), n.controller.init(n.mapContainer, n.shadow), n.toolbarPainel.vincularEventos(), n.renderLayersUI(), n.host.hasAttribute("modo-sequencial") && (n.controller.modoCliqueSequencialAtivo = !0, n.controller.context.modoSequencial = !0), n.host.hasAttribute("chave-grupo")) {
4413
+ if (n.controller.getMap() || Xo(n.mapContainer), n.controller.init(n.mapContainer, n.shadow), n.toolbarPainel.vincularEventos(), n.renderLayersUI(), n.host.hasAttribute("modo-sequencial") && (n.controller.modoCliqueSequencialAtivo = !0, n.controller.context.modoSequencial = !0), n.host.hasAttribute("chave-grupo")) {
4406
4414
  const o = n.host.getAttribute("chave-grupo");
4407
4415
  o && (n.host.chaveGrupo = o);
4408
4416
  }
@@ -4423,7 +4431,7 @@ function Cn(n) {
4423
4431
  });
4424
4432
  const t = n.controller.context.onMarkerClick;
4425
4433
  n.controller.context.onMarkerClick = (o, a, i, s) => {
4426
- fn(
4434
+ bn(
4427
4435
  n.obterContextoEventos(),
4428
4436
  o,
4429
4437
  a,
@@ -4433,7 +4441,7 @@ function Cn(n) {
4433
4441
  n.colecoesDados.customMarkerClickHandler
4434
4442
  );
4435
4443
  }, n.controller.context.onSegmentoClick = (o, a, i) => {
4436
- mn(
4444
+ yn(
4437
4445
  n.obterContextoEventos(),
4438
4446
  o,
4439
4447
  a,
@@ -4449,12 +4457,12 @@ function Cn(n) {
4449
4457
  n.invalidateSizeSafely();
4450
4458
  }, 150);
4451
4459
  }
4452
- const Sn = {
4460
+ const wn = {
4453
4461
  "sem-camada": "Escolha uma camada de desenho antes de usar esta ferramenta.",
4454
4462
  "camada-invalida": "A camada de desenho não é uma camada de feições.",
4455
4463
  "camada-bloqueada": "A camada de desenho está bloqueada.",
4456
4464
  "geometria-invalida": "Não foi possível criar a figura: a geometria é inválida."
4457
- }, Mn = {
4465
+ }, En = {
4458
4466
  bloqueada: "Esta feição (ou a camada dela) está bloqueada e não pode ser editada.",
4459
4467
  "poligono-com-furos": "Polígono com furos não pode ser editado no mapa.",
4460
4468
  multiparte: "Feição com várias partes não pode ser editada no mapa.",
@@ -4463,57 +4471,57 @@ const Sn = {
4463
4471
  inexistente: "A feição não existe mais.",
4464
4472
  "sem-selecao": "Selecione uma feição para editar os vértices."
4465
4473
  };
4466
- function Wo(n, t, e) {
4474
+ function Ko(n, t, e) {
4467
4475
  return typeof t == "string" && Object.prototype.hasOwnProperty.call(n, t) ? n[t] : e;
4468
4476
  }
4469
- function An(n) {
4470
- return Wo(Sn, n, "Não foi possível ativar a ferramenta de desenho.");
4477
+ function kn(n) {
4478
+ return Ko(wn, n, "Não foi possível ativar a ferramenta de desenho.");
4471
4479
  }
4472
- function zn(n) {
4473
- return Wo(Mn, n, "Não foi possível editar os vértices desta feição.");
4480
+ function In(n) {
4481
+ return Ko(En, n, "Não foi possível editar os vértices desta feição.");
4474
4482
  }
4475
- function wn(n) {
4483
+ function Tn(n) {
4476
4484
  n.querySelectorAll(".cad-quick-toolbar .cad-btn-tool, .layer-panel-close").forEach((t) => {
4477
4485
  const e = t.getAttribute("title");
4478
4486
  e && !t.hasAttribute("aria-label") && t.setAttribute("aria-label", e);
4479
4487
  });
4480
4488
  }
4481
- function go(n, t) {
4489
+ function vo(n, t) {
4482
4490
  const e = n.getElementById("btn-toggle-snap");
4483
4491
  e == null || e.classList.toggle("active", t), e == null || e.setAttribute("aria-pressed", String(t));
4484
4492
  }
4485
- function En(n) {
4493
+ function Dn(n) {
4486
4494
  return n <= 0 ? "Nenhuma feição selecionada" : n === 1 ? "1 feição selecionada" : `${n} feições selecionadas`;
4487
4495
  }
4488
- function kn(n) {
4496
+ function _n(n) {
4489
4497
  return n ? `Ferramenta ${n} ativa` : "Ferramenta desativada";
4490
4498
  }
4491
4499
  function ue(n, t) {
4492
4500
  const e = n.getElementById("cad-status");
4493
4501
  e && e.textContent !== t && (e.textContent = t);
4494
4502
  }
4495
- const In = 5e3;
4496
- function Tn(n, t, e) {
4503
+ const qn = 5e3;
4504
+ function $n(n, t, e) {
4497
4505
  const o = n.getElementById("cad-aviso");
4498
4506
  return o ? (e !== void 0 && window.clearTimeout(e), o.textContent = t, o.hidden = !1, window.setTimeout(() => {
4499
4507
  o.hidden = !0, o.textContent = "";
4500
- }, In)) : e;
4508
+ }, qn)) : e;
4501
4509
  }
4502
- function Dn(n, t) {
4510
+ function Fn(n, t) {
4503
4511
  let e;
4504
4512
  const o = (c) => (l) => {
4505
4513
  var h;
4506
4514
  if (n.hasAttribute("sem-avisos")) return;
4507
4515
  const d = c((h = l.detail) == null ? void 0 : h.motivo);
4508
- ue(t, d), e = Tn(t, d, e);
4509
- }, a = o(An), i = o(zn), s = (c) => {
4516
+ ue(t, d), e = $n(t, d, e);
4517
+ }, a = o(kn), i = o(In), s = (c) => {
4510
4518
  var d;
4511
4519
  const l = (d = c.detail) == null ? void 0 : d.feicoes;
4512
- ue(t, En(Array.isArray(l) ? l.length : 0));
4520
+ ue(t, Dn(Array.isArray(l) ? l.length : 0));
4513
4521
  }, r = (c) => {
4514
4522
  var d;
4515
4523
  const l = ((d = c.detail) == null ? void 0 : d.ferramenta) ?? null;
4516
- ue(t, kn(l));
4524
+ ue(t, _n(l));
4517
4525
  };
4518
4526
  return n.addEventListener("cad-selecao", s), n.addEventListener("cad-ferramenta", r), n.addEventListener("cad-desenho-recusado", a), n.addEventListener("cad-edicao-recusada", i), () => {
4519
4527
  n.removeEventListener("cad-selecao", s), n.removeEventListener("cad-ferramenta", r), n.removeEventListener("cad-desenho-recusado", a), n.removeEventListener("cad-edicao-recusada", i), e !== void 0 && window.clearTimeout(e), e = void 0;
@@ -4533,23 +4541,23 @@ function K(n, t) {
4533
4541
  const a = V(e, o, t);
4534
4542
  return !a || !Number.isFinite(a.lat) || !Number.isFinite(a.lon) ? null : [a.lat, a.lon];
4535
4543
  }
4536
- function _n(n, t) {
4544
+ function Nn(n, t) {
4537
4545
  return n[0] === t[0] && n[1] === t[1];
4538
4546
  }
4539
- function Xo(n, t) {
4547
+ function Yo(n, t) {
4540
4548
  const e = n.map((o) => K(o, t)).filter((o) => o !== null);
4541
- return e.length > 1 && _n(e[0], e[e.length - 1]) && e.pop(), e.length >= 3 ? e : null;
4549
+ return e.length > 1 && Nn(e[0], e[e.length - 1]) && e.pop(), e.length >= 3 ? e : null;
4542
4550
  }
4543
- function vo(n, t) {
4551
+ function bo(n, t) {
4544
4552
  const e = n.map((o) => K(o, t)).filter((o) => o !== null);
4545
4553
  return e.length >= 2 ? e : null;
4546
4554
  }
4547
- function qn(n, t) {
4555
+ function On(n, t) {
4548
4556
  if (!Array.isArray(n) || n.length === 0) return null;
4549
- const o = (Array.isArray(n[0]) && Array.isArray(n[0][0]) ? n : [n]).map((a) => Xo(a, t));
4557
+ const o = (Array.isArray(n[0]) && Array.isArray(n[0][0]) ? n : [n]).map((a) => Yo(a, t));
4550
4558
  return o.some((a) => a === null) ? null : o;
4551
4559
  }
4552
- function yr(n, t) {
4560
+ function Cr(n, t) {
4553
4561
  const e = V(n.lat, n.lon);
4554
4562
  return e ? {
4555
4563
  id: String(n.id),
@@ -4558,7 +4566,7 @@ function yr(n, t) {
4558
4566
  propriedades: { ...n }
4559
4567
  } : null;
4560
4568
  }
4561
- function xr(n, t, e) {
4569
+ function Sr(n, t, e) {
4562
4570
  const o = t.get(String(n.ponto_inicio_id)), a = t.get(String(n.ponto_fim_id));
4563
4571
  if (!o || !a) return null;
4564
4572
  const i = V(o.lat, o.lon), s = V(a.lat, a.lon);
@@ -4572,14 +4580,14 @@ function xr(n, t, e) {
4572
4580
  propriedades: { ...n }
4573
4581
  };
4574
4582
  }
4575
- function Pr(n, t) {
4583
+ function Mr(n, t) {
4576
4584
  if (!n.poligono_wkt) return null;
4577
4585
  const e = /POLYGON\s*\(\s*\(\s*(.*?)\s*\)\s*\)/i.exec(n.poligono_wkt);
4578
4586
  if (!e) return null;
4579
4587
  const o = e[1].split(",").map((i) => {
4580
4588
  const [s, r] = i.trim().split(/\s+/);
4581
4589
  return [r, s];
4582
- }), a = Xo(o);
4590
+ }), a = Yo(o);
4583
4591
  return a ? {
4584
4592
  id: String(n.id ?? n.nome ?? ""),
4585
4593
  camadaId: t,
@@ -4587,8 +4595,8 @@ function Pr(n, t) {
4587
4595
  propriedades: { nome: n.nome, nome_propriedade: n.nome_propriedade }
4588
4596
  } : null;
4589
4597
  }
4590
- function bo(n, t) {
4591
- const e = da(n);
4598
+ function yo(n, t) {
4599
+ const e = ua(n);
4592
4600
  if (!e) return null;
4593
4601
  const o = [];
4594
4602
  for (const a of e) {
@@ -4599,11 +4607,11 @@ function bo(n, t) {
4599
4607
  }
4600
4608
  return o;
4601
4609
  }
4602
- const $n = /* @__PURE__ */ new Set(["Point", "LineString", "Polygon", "Circle", "Text"]);
4610
+ const Rn = /* @__PURE__ */ new Set(["Point", "LineString", "Polygon", "Circle", "Text"]);
4603
4611
  function pe(n, t, e) {
4604
4612
  if (!n || typeof n != "object") return null;
4605
4613
  const o = n, a = o.geometria;
4606
- if (!a || !$n.has(a.tipo) || o.id === void 0 || o.id === null || o.id === "") return null;
4614
+ if (!a || !Rn.has(a.tipo) || o.id === void 0 || o.id === null || o.id === "") return null;
4607
4615
  let i = null;
4608
4616
  switch (a.tipo) {
4609
4617
  case "Point": {
@@ -4617,22 +4625,22 @@ function pe(n, t, e) {
4617
4625
  break;
4618
4626
  }
4619
4627
  case "LineString": {
4620
- const r = Array.isArray(a.partes) ? a.partes.map((l) => Array.isArray(l) ? vo(l, e) : null).filter((l) => l !== null) : [];
4628
+ const r = Array.isArray(a.partes) ? a.partes.map((l) => Array.isArray(l) ? bo(l, e) : null).filter((l) => l !== null) : [];
4621
4629
  if (r.length > 0)
4622
4630
  i = be(r);
4623
4631
  else {
4624
- const l = Array.isArray(a.coordenadas) ? vo(a.coordenadas, e) : null;
4632
+ const l = Array.isArray(a.coordenadas) ? bo(a.coordenadas, e) : null;
4625
4633
  l && (i = be([l]));
4626
4634
  }
4627
- const c = r.length <= 1 ? bo(a.curva, e) : null;
4628
- i && i.tipo === "LineString" && c && c.length >= 2 && (i = { tipo: "LineString", coordenadas: Ge(c, !1), curva: c });
4635
+ const c = r.length <= 1 ? yo(a.curva, e) : null;
4636
+ i && i.tipo === "LineString" && c && c.length >= 2 && (i = { tipo: "LineString", coordenadas: He(c, !1), curva: c });
4629
4637
  break;
4630
4638
  }
4631
4639
  case "Polygon": {
4632
- const r = Array.isArray(a.aneis) ? qn(a.aneis, e) : null;
4640
+ const r = Array.isArray(a.aneis) ? On(a.aneis, e) : null;
4633
4641
  r && (i = { tipo: "Polygon", aneis: r });
4634
- const c = r && r.length === 1 ? bo(a.curva, e) : null;
4635
- i && c && c.length >= 3 && (i = { tipo: "Polygon", aneis: [Ge(c, !0)], curva: c });
4642
+ const c = r && r.length === 1 ? yo(a.curva, e) : null;
4643
+ i && c && c.length >= 3 && (i = { tipo: "Polygon", aneis: [He(c, !0)], curva: c });
4636
4644
  break;
4637
4645
  }
4638
4646
  case "Circle": {
@@ -4654,18 +4662,18 @@ function pe(n, t, e) {
4654
4662
  };
4655
4663
  return o.oculta && (s.oculta = !0), (typeof o.entidadeId == "string" || typeof o.entidadeId == "number") && (s.entidadeId = String(o.entidadeId)), s.status = pt({ ...s, status: o.status }), s;
4656
4664
  }
4657
- const fe = "cad-cursores", Fn = /^#[0-9a-f]{3,8}$/i, Nn = "#94a3b8";
4658
- function Ie(n) {
4659
- return typeof n == "string" && Fn.test(n.trim()) ? n.trim() : Nn;
4665
+ const fe = "cad-cursores", Bn = /^#[0-9a-f]{3,8}$/i, Vn = "#94a3b8";
4666
+ function Te(n) {
4667
+ return typeof n == "string" && Bn.test(n.trim()) ? n.trim() : Vn;
4660
4668
  }
4661
- const On = '<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>';
4662
- function yo(n) {
4669
+ const jn = '<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>';
4670
+ function xo(n) {
4663
4671
  const t = document.createElement("div");
4664
- t.style.cssText = `color:${Ie(n.cor)};position:relative;pointer-events:none`, t.innerHTML = On;
4672
+ t.style.cssText = `color:${Te(n.cor)};position:relative;pointer-events:none`, t.innerHTML = jn;
4665
4673
  const e = document.createElement("span");
4666
- return e.textContent = String(n.nome ?? n.id), e.style.cssText = `position:absolute;left:16px;top:14px;white-space:nowrap;font:600 11px sans-serif;color:#fff;background:${Ie(n.cor)};padding:1px 5px;border-radius:3px;max-width:160px;overflow:hidden;text-overflow:ellipsis`, t.appendChild(e), b.divIcon({ className: "custom-leaflet-marker cad-cursor-remoto", iconSize: [18, 18], iconAnchor: [3, 2], html: t });
4674
+ return e.textContent = String(n.nome ?? n.id), e.style.cssText = `position:absolute;left:16px;top:14px;white-space:nowrap;font:600 11px sans-serif;color:#fff;background:${Te(n.cor)};padding:1px 5px;border-radius:3px;max-width:160px;overflow:hidden;text-overflow:ellipsis`, t.appendChild(e), b.divIcon({ className: "custom-leaflet-marker cad-cursor-remoto", iconSize: [18, 18], iconAnchor: [3, 2], html: t });
4667
4675
  }
4668
- class Rn {
4676
+ class Gn {
4669
4677
  constructor(t) {
4670
4678
  f(this, "marcadores", /* @__PURE__ */ new Map());
4671
4679
  this.obterMapa = t;
@@ -4676,11 +4684,11 @@ class Rn {
4676
4684
  atualizar(t, e) {
4677
4685
  const o = this.obterMapa();
4678
4686
  if (!o || !t || t.id === void 0 || t.id === null || t.id === "" || !Number.isFinite(e == null ? void 0 : e[0]) || !Number.isFinite(e == null ? void 0 : e[1])) return !1;
4679
- const a = String(t.id), i = `${t.nome ?? ""}\0${Ie(t.cor)}`, s = this.marcadores.get(a);
4687
+ const a = String(t.id), i = `${t.nome ?? ""}\0${Te(t.cor)}`, s = this.marcadores.get(a);
4680
4688
  if (s)
4681
- return s.marker.setLatLng(e), s.assinatura !== i && (s.marker.setIcon(yo(t)), s.assinatura = i), !0;
4689
+ return s.marker.setLatLng(e), s.assinatura !== i && (s.marker.setIcon(xo(t)), s.assinatura = i), !0;
4682
4690
  o.getPane(fe) || (o.createPane(fe).style.zIndex = "9500");
4683
- const r = b.marker(e, { icon: yo(t), pane: fe, interactive: !1, keyboard: !1 }).addTo(o);
4691
+ const r = b.marker(e, { icon: xo(t), pane: fe, interactive: !1, keyboard: !1 }).addTo(o);
4684
4692
  return this.marcadores.set(a, { marker: r, assinatura: i }), !0;
4685
4693
  }
4686
4694
  remover(t) {
@@ -4693,7 +4701,7 @@ class Rn {
4693
4701
  }
4694
4702
  }
4695
4703
  const xt = (n) => `${n.camadaId}\0${n.id}`;
4696
- class Bn {
4704
+ class Hn {
4697
4705
  constructor(t) {
4698
4706
  f(this, "itens", /* @__PURE__ */ new Map());
4699
4707
  this.dep = t;
@@ -4780,13 +4788,13 @@ class Bn {
4780
4788
  this.dep.aoSelecionar(o), o.length <= 1 && this.dep.aoSelecionarUma(o[0] ?? null);
4781
4789
  }
4782
4790
  }
4783
- const Vn = {
4791
+ const Un = {
4784
4792
  Point: "Ponto",
4785
4793
  LineString: "Linha",
4786
4794
  Polygon: "Polígono",
4787
4795
  Circle: "Círculo",
4788
4796
  Text: "Texto"
4789
- }, jn = /* @__PURE__ */ new Set([
4797
+ }, Zn = /* @__PURE__ */ new Set([
4790
4798
  "name",
4791
4799
  "nome",
4792
4800
  "category",
@@ -4799,7 +4807,7 @@ const Vn = {
4799
4807
  "data",
4800
4808
  "created_at",
4801
4809
  "criadoEm"
4802
- ]), xo = 6;
4810
+ ]), Po = 6;
4803
4811
  function Pt(n, t) {
4804
4812
  var e;
4805
4813
  for (const o of t) {
@@ -4808,11 +4816,11 @@ function Pt(n, t) {
4808
4816
  }
4809
4817
  return "";
4810
4818
  }
4811
- function Gn(n) {
4819
+ function Wn(n) {
4812
4820
  const t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(n), e = t ? new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3])) : new Date(n);
4813
4821
  return Number.isNaN(e.getTime()) ? n : e.toLocaleDateString("pt-BR");
4814
4822
  }
4815
- function Hn(n) {
4823
+ function Xn(n) {
4816
4824
  const t = typeof n == "object" ? JSON.stringify(n) : String(n);
4817
4825
  return t.length > 80 ? `${t.slice(0, 77)}...` : t;
4818
4826
  }
@@ -4832,7 +4840,7 @@ function Xt(n) {
4832
4840
  }
4833
4841
  }
4834
4842
  }
4835
- function Un(n) {
4843
+ function Kn(n) {
4836
4844
  const t = n.geometria, e = [], o = ct(t), a = lt(t);
4837
4845
  if (t.tipo === "Polygon")
4838
4846
  e.push(["Área", gt(o ?? 0)], ["Perímetro", W(a ?? 0)]), e.push(["Vértices", String(t.aneis.reduce((r, c) => r + c.length, 0))]);
@@ -4843,7 +4851,7 @@ function Un(n) {
4843
4851
  const [i, s] = Xt(n);
4844
4852
  return e.push(["Coordenadas", `${i.toFixed(6)}, ${s.toFixed(6)}`]), e;
4845
4853
  }
4846
- class Zn {
4854
+ class Yn {
4847
4855
  constructor(t) {
4848
4856
  f(this, "popup", null);
4849
4857
  f(this, "feicaoAtual", null);
@@ -4882,43 +4890,43 @@ class Zn {
4882
4890
  }
4883
4891
  montar(t) {
4884
4892
  var p;
4885
- const e = this.dep.obterCamada(t.camadaId), o = et(((p = t.estilo) == null ? void 0 : p.corTraco) ?? (e == null ? void 0 : e.estilo.corPrimaria), "#38bdf8"), a = (v, y = "", A) => {
4893
+ const e = this.dep.obterCamada(t.camadaId), o = et(((p = t.estilo) == null ? void 0 : p.corTraco) ?? (e == null ? void 0 : e.estilo.corPrimaria), "#38bdf8"), a = (v, y = "", M) => {
4886
4894
  const x = document.createElement(v);
4887
- return y && (x.style.cssText = y), A !== void 0 && (x.textContent = A), x;
4895
+ return y && (x.style.cssText = y), M !== void 0 && (x.textContent = M), x;
4888
4896
  }, i = a("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");
4889
4897
  i.className = "cad-feicao-popup", i.appendChild(a("div", "font-weight:700;font-size:13px;margin-bottom:1px", Pt(t, ["name", "nome"]) || t.id));
4890
- const s = Pt(t, ["category", "categoria"]), r = [Vn[t.geometria.tipo], (e == null ? void 0 : e.nome) ?? t.camadaId, s].filter(Boolean).join(" · ");
4898
+ const s = Pt(t, ["category", "categoria"]), r = [Un[t.geometria.tipo], (e == null ? void 0 : e.nome) ?? t.camadaId, s].filter(Boolean).join(" · ");
4891
4899
  i.appendChild(a("div", "font-size:11px;color:rgba(255,255,255,.6);margin-bottom:4px", r));
4892
4900
  const c = Pt(t, ["description", "descricao"]);
4893
4901
  c && i.appendChild(a("div", "font-size:11px;margin-bottom:4px", c));
4894
4902
  const l = (v) => {
4895
4903
  const y = a("div", "font-size:11px;margin-bottom:4px");
4896
- for (const [A, x] of v) {
4904
+ for (const [M, x] of v) {
4897
4905
  const S = a("div");
4898
- S.appendChild(a("strong", "", `${A}: `)), S.appendChild(document.createTextNode(x)), y.appendChild(S);
4906
+ S.appendChild(a("strong", "", `${M}: `)), S.appendChild(document.createTextNode(x)), y.appendChild(S);
4899
4907
  }
4900
4908
  return y;
4901
4909
  };
4902
- i.appendChild(l(Un(t)));
4903
- const d = Object.entries(t.propriedades ?? {}).filter(([v, y]) => !jn.has(v) && y !== void 0 && y !== null && y !== "");
4904
- d.length > 0 && (i.appendChild(l(d.slice(0, xo).map(([v, y]) => [v, Hn(y)]))), d.length > xo && i.appendChild(a("div", "font-size:10px;color:rgba(255,255,255,.55);margin-bottom:4px", `${d.length} atributos`)));
4910
+ i.appendChild(l(Kn(t)));
4911
+ const d = Object.entries(t.propriedades ?? {}).filter(([v, y]) => !Zn.has(v) && y !== void 0 && y !== null && y !== "");
4912
+ d.length > 0 && (i.appendChild(l(d.slice(0, Po).map(([v, y]) => [v, Xn(y)]))), d.length > Po && i.appendChild(a("div", "font-size:10px;color:rgba(255,255,255,.55);margin-bottom:4px", `${d.length} atributos`)));
4905
4913
  const h = Pt(t, ["author", "autor"]), u = Pt(t, ["date", "data", "created_at", "criadoEm"]);
4906
4914
  if (h || u) {
4907
- const v = [h, u ? Gn(u) : ""].filter(Boolean).join(" · ");
4915
+ const v = [h, u ? Wn(u) : ""].filter(Boolean).join(" · ");
4908
4916
  i.appendChild(a("div", "font-size:10px;color:rgba(255,255,255,.55);margin-bottom:4px", v));
4909
4917
  }
4910
4918
  const m = a("div", "display:flex;gap:4px;flex-wrap:wrap;margin-top:6px"), g = [["inspecionar", "Inspecionar"], ["zoom", "Zoom"]];
4911
4919
  t.geometria.tipo === "LineString" || t.geometria.tipo === "Polygon" || t.geometria.tipo === "Point" ? g.push(["vertices", "Vértices"]) : t.geometria.tipo === "Circle" && g.push(["vertices", "Editar"]), t.geometria.tipo === "Point" && g.push(["copiar", "Copiar"]);
4912
4920
  for (const [v, y] of g) {
4913
- const A = a("button", "font-size:11px;padding:2px 8px;border-radius:4px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:inherit;cursor:pointer", y);
4914
- A.type = "button", A.dataset.acao = v, A.addEventListener("click", (x) => {
4921
+ const M = a("button", "font-size:11px;padding:2px 8px;border-radius:4px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:inherit;cursor:pointer", y);
4922
+ M.type = "button", M.dataset.acao = v, M.addEventListener("click", (x) => {
4915
4923
  x.stopPropagation(), this.dep.aoAcao(v, this.feicaoAtual ?? t);
4916
- }), m.appendChild(A);
4924
+ }), m.appendChild(M);
4917
4925
  }
4918
4926
  return i.appendChild(m), i;
4919
4927
  }
4920
4928
  }
4921
- class Wn {
4929
+ class Qn {
4922
4930
  constructor(t) {
4923
4931
  f(this, "_ligado", !0);
4924
4932
  f(this, "_altSegurado", !1);
@@ -4975,7 +4983,7 @@ class Wn {
4975
4983
  }
4976
4984
  }
4977
4985
  const G = "feicoes";
4978
- class Xn {
4986
+ class Jn {
4979
4987
  constructor(t) {
4980
4988
  this.p = t;
4981
4989
  }
@@ -4991,7 +4999,7 @@ class Xn {
4991
4999
  for (const l of e.getActiveSelectableLayers())
4992
5000
  l.tipo === G && i.push(...this.p.lista(l.id).filter((d) => d.geometria.tipo === "Polygon" && this.p.desenhada(d)));
4993
5001
  }
4994
- if (i.length === 0) return o(a.length === 0 && this.p.selecionadas().some((l) => He(l.geometria)) ? "multiparte" : "nenhum-poligono");
5002
+ if (i.length === 0) return o(a.length === 0 && this.p.selecionadas().some((l) => Ue(l.geometria)) ? "multiparte" : "nenhum-poligono");
4995
5003
  const s = (l) => {
4996
5004
  var d;
4997
5005
  return !!l.bloqueada || !!((d = e.getLayerDef(l.camadaId)) != null && d.bloqueada);
@@ -5000,7 +5008,7 @@ class Xn {
5000
5008
  let c = !1;
5001
5009
  for (const l of r) {
5002
5010
  if (l.geometria.tipo !== "Polygon") continue;
5003
- const d = Ia(l.geometria.aneis[0], t);
5011
+ const d = Da(l.geometria.aneis[0], t);
5004
5012
  if (!d) continue;
5005
5013
  this.p.divisaoAtiva() && this.p.estaSelecionada({ camadaId: l.camadaId, id: l.id }) && this.p.encerrarDesenho(), this.p.removerFeicao(l.camadaId, l.id);
5006
5014
  const h = [];
@@ -5020,7 +5028,7 @@ class Xn {
5020
5028
  gerarBuffer(t, e, o, a = {}) {
5021
5029
  const i = this.p.buscar(t, e);
5022
5030
  if (!i) return null;
5023
- const s = Ta(i.geometria, o);
5031
+ const s = _a(i.geometria, o);
5024
5032
  if (!s) return null;
5025
5033
  const r = a.camadaDestino ?? t, c = this.p.adicionarFeicao(r, {
5026
5034
  id: a.id ?? this.p.idLivre(r, `${e}-buffer`),
@@ -5034,7 +5042,7 @@ class Xn {
5034
5042
  duplicarFeicao(t, e, o = {}, a = {}) {
5035
5043
  const i = this.p.buscar(t, e);
5036
5044
  if (!i) return null;
5037
- const s = Da(i.geometria, o.lesteM ?? 0, o.norteM ?? 0), r = this.p.adicionarFeicao(t, Jt(i, a.id ?? this.p.idLivre(t, `${e}-copia`), s));
5045
+ const s = qa(i.geometria, o.lesteM ?? 0, o.norteM ?? 0), r = this.p.adicionarFeicao(t, Jt(i, a.id ?? this.p.idLivre(t, `${e}-copia`), s));
5038
5046
  return r && this.p.emitir("cad-feicao-criada", { camadaId: t, feicao: r }), r;
5039
5047
  }
5040
5048
  /**
@@ -5055,13 +5063,13 @@ class Xn {
5055
5063
  const c = o.toleranciaM ?? 0;
5056
5064
  let l = null;
5057
5065
  if (s.every((h) => h.geometria.tipo === "LineString")) {
5058
- if (s.some((m) => He(m.geometria))) return a("multiparte");
5059
- const h = s.map((m) => m.geometria.coordenadas), u = _a(h, c);
5066
+ if (s.some((m) => Ue(m.geometria))) return a("multiparte");
5067
+ const h = s.map((m) => m.geometria.coordenadas), u = $a(h, c);
5060
5068
  u && (l = be([u]));
5061
5069
  } else if (s.every((h) => h.geometria.tipo === "Polygon" && h.geometria.aneis.length === 1)) {
5062
5070
  let h = s[0].geometria.aneis[0];
5063
5071
  for (const u of s.slice(1))
5064
- h = h ? qa(h, u.geometria.aneis[0], c) : null;
5072
+ h = h ? Fa(h, u.geometria.aneis[0], c) : null;
5065
5073
  h && (l = { tipo: "Polygon", aneis: [h] });
5066
5074
  } else
5067
5075
  return a("tipos-incompativeis");
@@ -5075,7 +5083,7 @@ class Xn {
5075
5083
  return this.p.emitir("cad-feicao-unida", { origens: s, resultado: d }), d;
5076
5084
  }
5077
5085
  }
5078
- class Kn {
5086
+ class ts {
5079
5087
  constructor(t, e) {
5080
5088
  f(this, "cacheOficiais", /* @__PURE__ */ new WeakMap());
5081
5089
  this.p = t, this.regra = e;
@@ -5083,7 +5091,7 @@ class Kn {
5083
5091
  oficiaisDe(t) {
5084
5092
  const e = this.p.lista(t);
5085
5093
  let o = this.cacheOficiais.get(e);
5086
- return o || (o = _e.oficiais(e), this.cacheOficiais.set(e, o)), o;
5094
+ return o || (o = qe.oficiais(e), this.cacheOficiais.set(e, o)), o;
5087
5095
  }
5088
5096
  /** Aparece segundo a regra de oficial × prévia? */
5089
5097
  visivelPorVersao(t) {
@@ -5135,14 +5143,14 @@ class Kn {
5135
5143
  }
5136
5144
  }
5137
5145
  }
5138
- class Yn {
5146
+ class es {
5139
5147
  constructor(t) {
5140
5148
  this.p = t;
5141
5149
  }
5142
5150
  limitesDe(t) {
5143
5151
  let e = 1 / 0, o = 1 / 0, a = -1 / 0, i = -1 / 0;
5144
5152
  for (const s of t) {
5145
- const [[r, c], [l, d]] = ha(s.geometria);
5153
+ const [[r, c], [l, d]] = pa(s.geometria);
5146
5154
  r < e && (e = r), c < o && (o = c), l > a && (a = l), d > i && (i = d);
5147
5155
  }
5148
5156
  return Number.isFinite(e) ? [[e, o], [a, i]] : null;
@@ -5177,28 +5185,28 @@ class Yn {
5177
5185
  return !o || o.tipo !== G ? !1 : (o.visivel || e.setLayerVisibility(t, !0), this.enquadrar(this.p.lista(t).filter((a) => this.p.desenhada(a))));
5178
5186
  }
5179
5187
  }
5180
- const Qn = { topo: 0, base: 16, esquerda: 0, direita: 0 }, Jn = 16, ts = 0.92, me = {
5188
+ const os = { topo: 0, base: 16, esquerda: 0, direita: 0 }, as = 16, is = 0.92, me = {
5181
5189
  topo: "--cad-hud-topo",
5182
5190
  base: "--cad-hud-base",
5183
5191
  esquerda: "--cad-hud-esquerda",
5184
5192
  direita: "--cad-hud-direita"
5185
- }, Ko = "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;";
5186
- function Lr(n, t, e = {}) {
5187
- const o = { ...Qn, ...e }, a = Math.max(0, n - o.esquerda - o.direita);
5193
+ }, Qo = "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;";
5194
+ function Ar(n, t, e = {}) {
5195
+ const o = { ...os, ...e }, a = Math.max(0, n - o.esquerda - o.direita);
5188
5196
  return {
5189
5197
  centroX: o.esquerda + a / 2,
5190
5198
  base: o.base,
5191
- larguraMax: Math.max(0, Math.min(n * ts, a - Jn)),
5199
+ larguraMax: Math.max(0, Math.min(n * is, a - as)),
5192
5200
  alturaMax: Math.max(0, t - o.topo - o.base - 8)
5193
5201
  };
5194
5202
  }
5195
- function es(n, t) {
5203
+ function ns(n, t) {
5196
5204
  for (const e of Object.keys(me)) {
5197
5205
  const o = t[e];
5198
5206
  typeof o == "number" && Number.isFinite(o) && o >= 0 ? n.style.setProperty(me[e], `${o}px`) : n.style.removeProperty(me[e]);
5199
5207
  }
5200
5208
  }
5201
- const os = "cm-draw-hud", Po = "cad-ferramenta-ativa", J = "cad-desenho", at = "#22d3ee", as = 4, is = 450, ns = 10, ss = 8, rs = 2500, cs = {
5209
+ const ss = "cm-draw-hud", Lo = "cad-ferramenta-ativa", J = "cad-desenho", at = "#22d3ee", rs = 4, cs = 450, ls = 10, ds = 8, hs = 2500, us = {
5202
5210
  ponto: "Ponto",
5203
5211
  linha: "Linha",
5204
5212
  poligono: "Polígono",
@@ -5214,7 +5222,7 @@ const os = "cm-draw-hud", Po = "cad-ferramenta-ativa", J = "cad-desenho", at = "
5214
5222
  dividir: "Dividir polígono",
5215
5223
  "selecao-laco": "Seleção por laço",
5216
5224
  "conta-gotas": "Conta-gotas"
5217
- }, ls = {
5225
+ }, ps = {
5218
5226
  ponto: "Clique para colocar",
5219
5227
  linha: "Clique nos vértices · Enter ou duplo clique conclui",
5220
5228
  poligono: "Clique nos vértices · Enter ou duplo clique conclui",
@@ -5231,7 +5239,7 @@ const os = "cm-draw-hud", Po = "cad-ferramenta-ativa", J = "cad-desenho", at = "
5231
5239
  "selecao-laco": "Desenhe o laço · Enter ou 1º ponto fecha e seleciona",
5232
5240
  "conta-gotas": "Clique numa feição para copiar o estilo"
5233
5241
  };
5234
- class ds {
5242
+ class fs {
5235
5243
  constructor(t) {
5236
5244
  f(this, "sessao", null);
5237
5245
  f(this, "fechar", !1);
@@ -5329,7 +5337,7 @@ class ds {
5329
5337
  const a = this.dep.map;
5330
5338
  this.fechar = !!e.fechar, this.sessao = new te(t, this.fechar), a.getPane(J) || (a.createPane(J).style.zIndex = "8500"), this.grupo = b.layerGroup().addTo(a), this.marcas = b.layerGroup().addTo(this.grupo);
5331
5339
  const i = a.getContainer();
5332
- i.classList.add(Po), i.style.cursor = t === "conta-gotas" ? "copy" : "crosshair", a.on("click", this.aoClicar), a.on("dblclick", this.aoDuploClique), a.on("mousemove", this.aoMover), a.on("mousedown", this.aoPressionar), window.addEventListener("mouseup", this.aoSoltar), window.addEventListener("keydown", this.aoTecla), this.montarHud(), this.atualizar();
5340
+ i.classList.add(Lo), i.style.cursor = t === "conta-gotas" ? "copy" : "crosshair", a.on("click", this.aoClicar), a.on("dblclick", this.aoDuploClique), a.on("mousemove", this.aoMover), a.on("mousedown", this.aoPressionar), window.addEventListener("mouseup", this.aoSoltar), window.addEventListener("keydown", this.aoTecla), this.montarHud(), this.atualizar();
5333
5341
  }
5334
5342
  /** Desliga a ferramenta ativa (idempotente). A medição pronta continua na tela. */
5335
5343
  desativar() {
@@ -5346,7 +5354,7 @@ class ds {
5346
5354
  const t = this.dep.map;
5347
5355
  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);
5348
5356
  const e = t.getContainer();
5349
- e.classList.remove(Po), 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, (a = this.hud) == null || a.remove(), this.hud = null, this.campoTexto = null, this.sessao = null, this.arrastando = null, this.ultimoClique = null;
5357
+ e.classList.remove(Lo), 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, (a = this.hud) == null || a.remove(), this.hud = null, this.campoTexto = null, this.sessao = null, this.arrastando = null, this.ultimoClique = null;
5350
5358
  }
5351
5359
  // ---- entrada ----
5352
5360
  coordenada(t) {
@@ -5357,7 +5365,7 @@ class ds {
5357
5365
  return o ? (this.mostrarSnap(o.coordenada), o.coordenada) : (this.esconderSnap(), e);
5358
5366
  }
5359
5367
  repetido(t) {
5360
- const e = this.ultimoClique, o = Date.now(), a = t.containerPoint, i = !!e && Math.hypot(e.x - a.x, e.y - a.y) <= as && o - e.t <= is;
5368
+ const e = this.ultimoClique, o = Date.now(), a = t.containerPoint, i = !!e && Math.hypot(e.x - a.x, e.y - a.y) <= rs && o - e.t <= cs;
5361
5369
  return this.ultimoClique = { x: a.x, y: a.y, t: o }, i;
5362
5370
  }
5363
5371
  /** Com 3+ vértices, um clique perto do primeiro fecha a figura em polígono. */
@@ -5365,7 +5373,7 @@ class ds {
5365
5373
  const e = this.sessao, o = e == null ? void 0 : e.primeiro;
5366
5374
  if (!e || !o || !e.fechaNoPrimeiro) return !1;
5367
5375
  const a = this.dep.map.latLngToContainerPoint(o);
5368
- if (Math.hypot(a.x - t.containerPoint.x, a.y - t.containerPoint.y) > ns) return !1;
5376
+ if (Math.hypot(a.x - t.containerPoint.x, a.y - t.containerPoint.y) > ls) return !1;
5369
5377
  const i = e.concluirFechando();
5370
5378
  return i && this.finalizar(i), !!i;
5371
5379
  }
@@ -5375,12 +5383,12 @@ class ds {
5375
5383
  if (!e) return null;
5376
5384
  const o = this.dep.map, a = (i) => {
5377
5385
  const s = o.latLngToContainerPoint(i);
5378
- return Math.hypot(s.x - t.containerPoint.x, s.y - t.containerPoint.y) <= ss;
5386
+ return Math.hypot(s.x - t.containerPoint.x, s.y - t.containerPoint.y) <= ds;
5379
5387
  };
5380
5388
  for (let i = e.ancoras.length - 1; i >= 0; i--) {
5381
5389
  const s = e.ancoras[i];
5382
5390
  if (s.alca && a(s.alca)) return { i, qual: "saida" };
5383
- const r = eo(s);
5391
+ const r = oo(s);
5384
5392
  if (r && a(r)) return { i, qual: "entrada" };
5385
5393
  }
5386
5394
  for (let i = e.ancoras.length - 1; i >= 0; i--)
@@ -5401,7 +5409,7 @@ class ds {
5401
5409
  const e = (o = this.hud) == null ? void 0 : o.querySelector('[data-campo="aviso"]');
5402
5410
  e && (e.textContent = t, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = setTimeout(() => {
5403
5411
  e.textContent = "", this.avisoTimer = null;
5404
- }, rs));
5412
+ }, hs));
5405
5413
  }
5406
5414
  /**
5407
5415
  * Botão direito com a ferramenta ativa: conclui se já dá figura; senão desfaz o último vértice;
@@ -5452,7 +5460,7 @@ class ds {
5452
5460
  const o = t.ferramenta === "caneta" ? t.ancoras.map((a) => a.ponto) : t.pontos;
5453
5461
  if (t.ferramenta === "caneta")
5454
5462
  for (const a of t.ancoras) {
5455
- const i = eo(a);
5463
+ const i = oo(a);
5456
5464
  if (!(!a.alca || !i)) {
5457
5465
  this.marcas.addLayer(b.polyline([i, a.ponto, a.alca], { pane: J, color: at, weight: 1, opacity: 0.8, interactive: !1 }));
5458
5466
  for (const s of [i, a.alca])
@@ -5472,7 +5480,7 @@ class ds {
5472
5480
  fillColor: at,
5473
5481
  fillOpacity: 0.15,
5474
5482
  interactive: !1
5475
- }, a = Fe(t, o);
5483
+ }, a = Ne(t, o);
5476
5484
  if (a) return a;
5477
5485
  if (t.tipo === "Polygon") return b.polygon(t.aneis, o);
5478
5486
  if (t.tipo === "Circle") return b.circle(t.centro, { ...o, radius: t.raioMetros });
@@ -5497,12 +5505,12 @@ class ds {
5497
5505
  }, r = i ? a.length : a.length - 1;
5498
5506
  for (let l = 0; l < r; l++) {
5499
5507
  const d = a[l], h = a[(l + 1) % a.length];
5500
- s([(d[0] + h[0]) / 2, (d[1] + h[1]) / 2], W(Ao(d, h)));
5508
+ s([(d[0] + h[0]) / 2, (d[1] + h[1]) / 2], W(zo(d, h)));
5501
5509
  }
5502
5510
  const c = {
5503
5511
  tipo: e === "medir-area" ? "area" : "distancia",
5504
5512
  pontos: a,
5505
- comprimentoM: ua(a, !1)
5513
+ comprimentoM: fa(a, !1)
5506
5514
  };
5507
5515
  if (t.tipo === "Polygon")
5508
5516
  c.areaM2 = ct(t) ?? 0, c.perimetroM = lt(t) ?? 0;
@@ -5534,14 +5542,14 @@ class ds {
5534
5542
  const t = this.sessao;
5535
5543
  if (!t) return;
5536
5544
  const e = document.createElement("div");
5537
- e.id = os, e.style.cssText = Ko + "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";
5545
+ e.id = ss, e.style.cssText = Qo + "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";
5538
5546
  const o = (c) => {
5539
5547
  const l = document.createElement("span");
5540
5548
  return l.dataset.campo = c, l;
5541
5549
  }, a = document.createElement("strong");
5542
- a.textContent = cs[t.ferramenta];
5550
+ a.textContent = us[t.ferramenta];
5543
5551
  const i = o("dica");
5544
- i.style.opacity = ".7", i.textContent = ls[t.ferramenta];
5552
+ i.style.opacity = ".7", i.textContent = ps[t.ferramenta];
5545
5553
  const s = (c, l, d = !1) => {
5546
5554
  const h = document.createElement("button");
5547
5555
  return h.type = "button", h.textContent = c, h.style.cssText = `padding:3px 10px;border-radius:4px;border:1px solid ${d ? at : "rgba(255,255,255,.3)"};background:${d ? at : "transparent"};color:${d ? "#111" : "#fff"};cursor:pointer;font-weight:600`, h.addEventListener("click", l), h;
@@ -5575,8 +5583,8 @@ class ds {
5575
5583
  (e = this.sessao) == null || e.mover(t), this.atualizar();
5576
5584
  }
5577
5585
  }
5578
- const hs = ["tipoLinha", "escalaTipoLinha", "deslocamentoTracejado", "opacidadeTraco", "terminacaoTraco", "juncaoTraco"], us = /* @__PURE__ */ new Set(["ponto", "linha", "poligono", "retangulo", "elipse", "poligono-regular", "estrela", "circulo", "texto", "caneta"]);
5579
- class ps {
5586
+ const ms = ["tipoLinha", "escalaTipoLinha", "deslocamentoTracejado", "opacidadeTraco", "terminacaoTraco", "juncaoTraco"], gs = /* @__PURE__ */ new Set(["ponto", "linha", "poligono", "retangulo", "elipse", "poligono-regular", "estrela", "circulo", "texto", "caneta"]);
5587
+ class vs {
5580
5588
  constructor(t) {
5581
5589
  f(this, "desenho", null);
5582
5590
  f(this, "camadaDesenho", null);
@@ -5627,15 +5635,15 @@ class ps {
5627
5635
  }
5628
5636
  ativarFerramenta(t, e = {}) {
5629
5637
  var i, s;
5630
- if (!Io(t)) return { ok: !1, motivo: "ferramenta-invalida" };
5638
+ if (!To(t)) return { ok: !1, motivo: "ferramenta-invalida" };
5631
5639
  const o = this.p.obterMapa();
5632
5640
  if (!o) return { ok: !1, motivo: "sem-mapa" };
5633
- if (us.has(t)) {
5641
+ if (gs.has(t)) {
5634
5642
  const r = this.motivoCamadaDesenhoInvalida();
5635
5643
  if (r)
5636
5644
  return this.p.emitir("cad-desenho-recusado", { ferramenta: t, motivo: r }), { ok: !1, motivo: r };
5637
5645
  }
5638
- this.p.prepararDesenho(), this.desenho || (this.desenho = new ds({
5646
+ this.p.prepararDesenho(), this.desenho || (this.desenho = new fs({
5639
5647
  map: o,
5640
5648
  buscarSnap: (r) => this.p.buscarSnapEm(r),
5641
5649
  snapAtivo: () => this.p.snapAtivo(),
@@ -5724,11 +5732,11 @@ class ps {
5724
5732
  }
5725
5733
  const s = this.p.obterLayerManager().getLayerDef(i.camadaId), r = i.estilo ?? {}, c = {}, l = r.corTraco ?? (s == null ? void 0 : s.estilo.corPrimaria);
5726
5734
  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);
5727
- for (const d of hs) r[d] !== void 0 && (c[d] = r[d]);
5735
+ for (const d of ms) r[d] !== void 0 && (c[d] = r[d]);
5728
5736
  this.estiloDesenho = { ...this.estiloDesenho, ...c }, this.p.emitir("cad-conta-gotas", { cor: l ?? r.corPreenchimento ?? "", feicao: i, estilo: c });
5729
5737
  }
5730
5738
  }
5731
- class fs {
5739
+ class bs {
5732
5740
  constructor(t) {
5733
5741
  /** id -> posição na lista da camada (válido enquanto `lista` for a lista atual); evita varrer a camada a cada consulta. */
5734
5742
  f(this, "posicoes", /* @__PURE__ */ new Map());
@@ -5815,31 +5823,31 @@ class fs {
5815
5823
  return c.forEach((L, w) => a.recusadas.push(d(L, w))), m.forEach((L) => h.push(L.id)), u({ resultado: a, adicionadas: i, atualizadas: s });
5816
5824
  if ((m.length > 0 || p) && !this.garantirCamada(t, o))
5817
5825
  return m.forEach((L) => h.push(L.id)), u({ resultado: a, adicionadas: i, atualizadas: s });
5818
- const y = this.lista(t), A = this.posicaoDe(t), x = y.slice(), S = [], M = [];
5826
+ const y = this.lista(t), M = this.posicaoDe(t), x = y.slice(), S = [], A = [];
5819
5827
  let P = !1;
5820
5828
  for (const L of l) {
5821
- const w = String(L), I = A.get(w);
5829
+ const w = String(L), I = M.get(w);
5822
5830
  I === void 0 || x[I] === null || (x[I] = null, S.push(w), a.removidas++, P = !0);
5823
5831
  }
5824
5832
  c.forEach((L, w) => {
5825
- const I = L && typeof L == "object" && L.id !== void 0 && L.id !== null ? String(L.id) : "", D = A.get(I), k = D === void 0 ? null : x[D], $ = k ? this.mesclar(k, L, t, !!o.substituirPropriedades) : null;
5833
+ const I = L && typeof L == "object" && L.id !== void 0 && L.id !== null ? String(L.id) : "", D = M.get(I), k = D === void 0 ? null : x[D], $ = k ? this.mesclar(k, L, t, !!o.substituirPropriedades) : null;
5826
5834
  if (!$ || D === void 0) {
5827
5835
  a.recusadas.push(I || d(L, w));
5828
5836
  return;
5829
5837
  }
5830
- x[D] = $, M.push($), s.push($), a.atualizadas++;
5838
+ x[D] = $, A.push($), s.push($), a.atualizadas++;
5831
5839
  });
5832
5840
  for (const L of m) {
5833
- const w = A.get(L.id);
5834
- w !== void 0 && x[w] !== null ? x[w] = L : (A.set(L.id, x.length), x.push(L)), M.push(L), i.push(L), a.adicionadas++;
5841
+ const w = M.get(L.id);
5842
+ w !== void 0 && x[w] !== null ? x[w] = L : (M.set(L.id, x.length), x.push(L)), A.push(L), i.push(L), a.adicionadas++;
5835
5843
  }
5836
- if (M.length === 0 && S.length === 0) return u({ resultado: a, adicionadas: i, atualizadas: s });
5837
- const C = P ? x.filter((L) => L !== null) : x, E = { feicoes: C, delta: { base: y, mudadas: M, removidas: S } };
5838
- return g.setLayerData(t, E), delete E.delta, P ? this.posicoes.delete(t) : this.posicoes.set(t, { lista: C, pos: A }), this.p.aposDados(), u({ resultado: a, adicionadas: i, atualizadas: s });
5844
+ if (A.length === 0 && S.length === 0) return u({ resultado: a, adicionadas: i, atualizadas: s });
5845
+ const C = P ? x.filter((L) => L !== null) : x, E = { feicoes: C, delta: { base: y, mudadas: A, removidas: S } };
5846
+ return g.setLayerData(t, E), delete E.delta, P ? this.posicoes.delete(t) : this.posicoes.set(t, { lista: C, pos: M }), this.p.aposDados(), u({ resultado: a, adicionadas: i, atualizadas: s });
5839
5847
  }
5840
5848
  }
5841
- const Mt = (n) => Array.isArray(n) && n.length === 2 && Number.isFinite(n[0]) && Number.isFinite(n[1]), Oe = Math.PI / 180, Te = 0.01, ht = $a;
5842
- function ms(n, t, e) {
5849
+ const Mt = (n) => Array.isArray(n) && n.length === 2 && Number.isFinite(n[0]) && Number.isFinite(n[1]), Re = Math.PI / 180, De = 0.01, ht = Na;
5850
+ function ys(n, t, e) {
5843
5851
  let o = U(n);
5844
5852
  if (!o || t < 0 || t >= o.length) return n;
5845
5853
  if (e === "canto") {
@@ -5848,7 +5856,7 @@ function ms(n, t, e) {
5848
5856
  return h[t] = { ponto: o[t].ponto }, dt(n, h);
5849
5857
  }
5850
5858
  let a = n;
5851
- if (vt(o[t]) === "canto" && (a = Eo(n, t), a === n || (o = U(a), !o)))
5859
+ if (vt(o[t]) === "canto" && (a = ko(n, t), a === n || (o = U(a), !o)))
5852
5860
  return n;
5853
5861
  const i = o[t], s = i.ponto, r = { ...i, modo: e }, c = i.saida, l = i.entrada;
5854
5862
  if (e === "simetrico") {
@@ -5861,28 +5869,28 @@ function ms(n, t, e) {
5861
5869
  const d = o.slice();
5862
5870
  return d[t] = r, dt(a, d);
5863
5871
  }
5864
- function gs(n, t, e = 45) {
5872
+ function xs(n, t, e = 45) {
5865
5873
  if (!Mt(n) || !Mt(t) || !(e > 0)) return t;
5866
5874
  const o = ht(n), [a, i] = X(o, t), s = Math.hypot(a, i);
5867
5875
  if (s === 0) return t;
5868
- const r = e * Oe, c = Math.round(Math.atan2(i, a) / r) * r;
5876
+ const r = e * Re, c = Math.round(Math.atan2(i, a) / r) * r;
5869
5877
  return yt(o, Math.cos(c) * s, Math.sin(c) * s);
5870
5878
  }
5871
- function vs(n, t, e) {
5879
+ function Ps(n, t, e) {
5872
5880
  var c;
5873
5881
  const o = (c = U(n)) == null ? void 0 : c[t], a = o == null ? void 0 : o[e];
5874
5882
  if (!o || !a) return null;
5875
- const [i, s] = X(ht(o.ponto), a), r = (Math.atan2(i, s) / Oe + 360) % 360;
5883
+ const [i, s] = X(ht(o.ponto), a), r = (Math.atan2(i, s) / Re + 360) % 360;
5876
5884
  return { comprimentoM: Math.hypot(i, s), azimuteGraus: r };
5877
5885
  }
5878
- function bs(n, t, e, o, a = !0) {
5886
+ function Ls(n, t, e, o, a = !0) {
5879
5887
  var l;
5880
5888
  const i = (l = U(n)) == null ? void 0 : l[t];
5881
5889
  if (!i || !Number.isFinite(o.comprimentoM) || !Number.isFinite(o.azimuteGraus) || o.comprimentoM < 0) return n;
5882
- const s = ht(i.ponto), r = o.azimuteGraus * Oe, c = yt(s, Math.sin(r) * o.comprimentoM, Math.cos(r) * o.comprimentoM);
5883
- return ko(n, t, e, c, a);
5890
+ const s = ht(i.ponto), r = o.azimuteGraus * Re, c = yt(s, Math.sin(r) * o.comprimentoM, Math.cos(r) * o.comprimentoM);
5891
+ return Io(n, t, e, c, a);
5884
5892
  }
5885
- function ys(n, t, e) {
5893
+ function Cs(n, t, e) {
5886
5894
  if (!Mt(e)) return n;
5887
5895
  const o = Q(n).map((a) => [a[0], a[1]]);
5888
5896
  return n.tipo === "Circle" || n.tipo === "Point" || t < 0 || t >= o.length ? n : (o[t] = [e[0], e[1]], ye(n, o));
@@ -5890,18 +5898,18 @@ function ys(n, t, e) {
5890
5898
  function At(n, t, e) {
5891
5899
  return e < 0 || e >= t ? null : e < t - 1 ? e + 1 : n.tipo === "Polygon" && t > 2 ? 0 : null;
5892
5900
  }
5893
- function Re(n, t, e, o) {
5894
- const [a, i] = pa(t[e], t[o]), s = t[e].saida ?? xe(n, e, "saida"), r = t[o].entrada ?? xe(n, o, "entrada");
5901
+ function Be(n, t, e, o) {
5902
+ const [a, i] = ma(t[e], t[o]), s = t[e].saida ?? xe(n, e, "saida"), r = t[o].entrada ?? xe(n, o, "entrada");
5895
5903
  return !s || !r ? null : [t[e].saida ? a : s, t[o].entrada ? i : r];
5896
5904
  }
5897
- function xs(n, t, e) {
5905
+ function Ss(n, t, e) {
5898
5906
  const o = U(n);
5899
5907
  if (!o || !Mt(e)) return null;
5900
5908
  const a = At(n, o.length, t);
5901
5909
  if (a === null) return null;
5902
- const i = Re(n, o, t, a);
5910
+ const i = Be(n, o, t, a);
5903
5911
  if (!i) return null;
5904
- const s = ht(o[t].ponto), r = X(s, e), c = (g) => zo(o[t].ponto, i[0], i[1], o[a].ponto, g), l = (g) => {
5912
+ const s = ht(o[t].ponto), r = X(s, e), c = (g) => wo(o[t].ponto, i[0], i[1], o[a].ponto, g), l = (g) => {
5905
5913
  const [p, v] = X(s, g);
5906
5914
  return Math.hypot(p - r[0], v - r[1]);
5907
5915
  };
@@ -5922,41 +5930,41 @@ function xs(n, t, e) {
5922
5930
  }
5923
5931
  return { t: d, ponto: c(d), distanciaM: h };
5924
5932
  }
5925
- const Yo = 0.1, Qo = 0.9;
5926
- function Lo(n, t, e, o) {
5933
+ const Jo = 0.1, ta = 0.9;
5934
+ function Co(n, t, e, o) {
5927
5935
  const a = U(n);
5928
5936
  if (!a || !Mt(o) || !Number.isFinite(e)) return null;
5929
5937
  const i = At(n, a.length, t);
5930
5938
  if (i === null) return null;
5931
- const s = Re(n, a, t, i);
5939
+ const s = Be(n, a, t, i);
5932
5940
  if (!s) return null;
5933
- const r = Math.min(Qo, Math.max(Yo, e)), c = 1 - r, l = zo(a[t].ponto, s[0], s[1], a[i].ponto, r), d = o[0] - l[0], h = o[1] - l[1], u = c * c + r * r, m = 1 / (3 * r * u), g = 1 / (3 * c * u), p = [s[0][0] + d * m, s[0][1] + h * m], v = [s[1][0] + d * g, s[1][1] + h * g], y = a.slice();
5934
- return y[t] = Qe(a[t], "saida", p, "livre"), y[i] = Qe(i === t ? y[t] : a[i], "entrada", v, "livre"), dt(n, y);
5941
+ const r = Math.min(ta, Math.max(Jo, e)), c = 1 - r, l = wo(a[t].ponto, s[0], s[1], a[i].ponto, r), d = o[0] - l[0], h = o[1] - l[1], u = c * c + r * r, m = 1 / (3 * r * u), g = 1 / (3 * c * u), p = [s[0][0] + d * m, s[0][1] + h * m], v = [s[1][0] + d * g, s[1][1] + h * g], y = a.slice();
5942
+ return y[t] = Je(a[t], "saida", p, "livre"), y[i] = Je(i === t ? y[t] : a[i], "entrada", v, "livre"), dt(n, y);
5935
5943
  }
5936
- function Ps(n, t) {
5944
+ function Ms(n, t) {
5937
5945
  const e = U(n);
5938
5946
  if (!e) return n;
5939
5947
  const o = At(n, e.length, t);
5940
5948
  if (o === null || !e[t].saida && !e[o].entrada) return n;
5941
5949
  const a = e.slice(), i = { ...e[t] };
5942
- delete i.saida, a[t] = Co(i);
5950
+ delete i.saida, a[t] = So(i);
5943
5951
  const s = { ...o === t ? a[t] : e[o] };
5944
- return delete s.entrada, a[o] = Co(s), dt(n, a);
5952
+ return delete s.entrada, a[o] = So(s), dt(n, a);
5945
5953
  }
5946
- function Co(n) {
5954
+ function So(n) {
5947
5955
  return !n.entrada && !n.saida ? (delete n.modo, n) : { ...n, modo: "livre" };
5948
5956
  }
5949
- function Ls(n, t) {
5957
+ function As(n, t) {
5950
5958
  const e = U(n);
5951
5959
  if (!e) return n;
5952
5960
  const o = At(n, e.length, t);
5953
5961
  if (o === null) return n;
5954
- const a = Re(n, e, t, o);
5962
+ const a = Be(n, e, t, o);
5955
5963
  if (!a || e[t].saida && e[o].entrada) return n;
5956
5964
  const i = e.slice();
5957
5965
  return e[t].saida || (i[t] = { ...e[t], saida: a[0], modo: vt(e[t]) === "canto" ? "livre" : e[t].modo }), e[o].entrada || (i[o] = { ...o === t ? i[t] : e[o], entrada: a[1], modo: vt(e[o]) === "canto" ? "livre" : e[o].modo }), dt(n, i);
5958
5966
  }
5959
- function Cs(n, t, e, o) {
5967
+ function zs(n, t, e, o) {
5960
5968
  const a = Math.max(1, Math.ceil(Math.abs(o) / (Math.PI / 2) - 1e-9)), i = o / a, s = 4 / 3 * Math.tan(i / 4), r = [];
5961
5969
  for (let c = 0; c < a; c++) {
5962
5970
  const l = e + c * i, d = l + i, h = [n[0] + t * Math.cos(l), n[1] + t * Math.sin(l)], u = [n[0] + t * Math.cos(d), n[1] + t * Math.sin(d)];
@@ -5968,42 +5976,42 @@ function Cs(n, t, e, o) {
5968
5976
  }
5969
5977
  return r;
5970
5978
  }
5971
- function Jo(n, t, e, o, a, i, s) {
5972
- const r = Cs(o, a, i, s), c = (u) => yt(n, u[0], u[1]), l = { ...t, saida: c(r[0].c1), modo: "livre" }, d = [];
5979
+ function ea(n, t, e, o, a, i, s) {
5980
+ const r = zs(o, a, i, s), c = (u) => yt(n, u[0], u[1]), l = { ...t, saida: c(r[0].c1), modo: "livre" }, d = [];
5973
5981
  for (let u = 0; u < r.length - 1; u++)
5974
5982
  d.push({ ponto: c(r[u].fim), entrada: c(r[u].c2), saida: c(r[u + 1].c1), modo: "simetrico" });
5975
5983
  const h = { ...e, entrada: c(r[r.length - 1].c2), modo: "livre" };
5976
5984
  return { a: l, meio: d, b: h };
5977
5985
  }
5978
- function Ss(n, t, e, o = "esquerda") {
5986
+ function ws(n, t, e, o = "esquerda") {
5979
5987
  const a = U(n);
5980
- if (!a || !Number.isFinite(e) || e < Te) return null;
5988
+ if (!a || !Number.isFinite(e) || e < De) return null;
5981
5989
  const i = At(n, a.length, t);
5982
5990
  if (i === null) return null;
5983
5991
  const s = ht(a[t].ponto), r = X(s, a[t].ponto), c = X(s, a[i].ponto), l = Math.hypot(c[0] - r[0], c[1] - r[1]);
5984
5992
  if (!(l > 0)) return null;
5985
- const d = Math.max(e, l / 2), h = Math.sqrt(Math.max(0, d * d - (l / 2) ** 2)), u = (c[0] - r[0]) / l, g = [-((c[1] - r[1]) / l), u], p = o === "esquerda" ? -1 : 1, v = [(r[0] + c[0]) / 2, (r[1] + c[1]) / 2], y = [v[0] + g[0] * h * p, v[1] + g[1] * h * p], A = Math.atan2(r[1] - y[1], r[0] - y[0]), x = Math.asin(Math.min(1, l / (2 * d))), S = Jo(s, a[t], a[i], y, d, A, p * 2 * x), M = a.slice();
5986
- return M[t] = S.a, M[i] = i === t ? S.a : S.b, M.splice(t + 1, 0, ...S.meio), dt(n, M);
5993
+ const d = Math.max(e, l / 2), h = Math.sqrt(Math.max(0, d * d - (l / 2) ** 2)), u = (c[0] - r[0]) / l, g = [-((c[1] - r[1]) / l), u], p = o === "esquerda" ? -1 : 1, v = [(r[0] + c[0]) / 2, (r[1] + c[1]) / 2], y = [v[0] + g[0] * h * p, v[1] + g[1] * h * p], M = Math.atan2(r[1] - y[1], r[0] - y[0]), x = Math.asin(Math.min(1, l / (2 * d))), S = ea(s, a[t], a[i], y, d, M, p * 2 * x), A = a.slice();
5994
+ return A[t] = S.a, A[i] = i === t ? S.a : S.b, A.splice(t + 1, 0, ...S.meio), dt(n, A);
5987
5995
  }
5988
- function Ms(n, t, e) {
5996
+ function Es(n, t, e) {
5989
5997
  const o = U(n);
5990
- if (!o || !Number.isFinite(e) || e < Te || t < 0 || t >= o.length || vt(o[t]) !== "canto") return null;
5998
+ if (!o || !Number.isFinite(e) || e < De || t < 0 || t >= o.length || vt(o[t]) !== "canto") return null;
5991
5999
  const a = o.length, i = n.tipo === "Polygon", s = t > 0 ? o[t - 1] : i ? o[a - 1] : null, r = t < a - 1 ? o[t + 1] : i ? o[0] : null;
5992
6000
  if (!s || !r) return null;
5993
6001
  const c = ht(o[t].ponto), l = X(c, o[t].ponto), d = X(c, s.ponto), h = X(c, r.ponto), u = Math.hypot(d[0] - l[0], d[1] - l[1]), m = Math.hypot(h[0] - l[0], h[1] - l[1]);
5994
6002
  if (!(u > 0) || !(m > 0)) return null;
5995
6003
  const g = [(d[0] - l[0]) / u, (d[1] - l[1]) / u], p = [(h[0] - l[0]) / m, (h[1] - l[1]) / m], v = Math.max(-1, Math.min(1, g[0] * p[0] + g[1] * p[1])), y = Math.acos(v);
5996
6004
  if (y < 1e-3 || Math.PI - y < 1e-3) return null;
5997
- const A = Math.tan(y / 2), x = Math.min(e, Math.min(u, m) * A);
5998
- if (!(x >= Te)) return null;
5999
- const S = x / A, M = [l[0] + g[0] * S, l[1] + g[1] * S], P = [l[0] + p[0] * S, l[1] + p[1] * S], C = g[0] + p[0], z = g[1] + p[1], E = Math.hypot(C, z), L = x / Math.sin(y / 2), w = [l[0] + C / E * L, l[1] + z / E * L], I = Math.atan2(M[1] - w[1], M[0] - w[0]);
6005
+ const M = Math.tan(y / 2), x = Math.min(e, Math.min(u, m) * M);
6006
+ if (!(x >= De)) return null;
6007
+ const S = x / M, A = [l[0] + g[0] * S, l[1] + g[1] * S], P = [l[0] + p[0] * S, l[1] + p[1] * S], C = g[0] + p[0], z = g[1] + p[1], E = Math.hypot(C, z), L = x / Math.sin(y / 2), w = [l[0] + C / E * L, l[1] + z / E * L], I = Math.atan2(A[1] - w[1], A[0] - w[0]);
6000
6008
  let k = Math.atan2(P[1] - w[1], P[0] - w[0]) - I;
6001
6009
  for (; k > Math.PI; ) k -= 2 * Math.PI;
6002
6010
  for (; k < -Math.PI; ) k += 2 * Math.PI;
6003
- const $ = { ponto: yt(c, M[0], M[1]) }, q = { ponto: yt(c, P[0], P[1]) }, _ = Jo(c, $, q, w, x, I, k), F = o.slice();
6011
+ const $ = { ponto: yt(c, A[0], A[1]) }, q = { ponto: yt(c, P[0], P[1]) }, _ = ea(c, $, q, w, x, I, k), F = o.slice();
6004
6012
  return F.splice(t, 1, _.a, ..._.meio, _.b), dt(n, F);
6005
6013
  }
6006
- const As = 10, zs = [
6014
+ const ks = 10, Is = [
6007
6015
  { tipo: "canto", rotulo: "Canto", titulo: "Sem alças: o traçado muda de direção no nó" },
6008
6016
  { tipo: "suave", rotulo: "Suave", titulo: "Alças alinhadas, cada uma com o seu comprimento" },
6009
6017
  { tipo: "simetrico", rotulo: "Simétrico", titulo: "Alças alinhadas e do mesmo comprimento" },
@@ -6015,8 +6023,8 @@ function Lt(n) {
6015
6023
  const e = Number(t);
6016
6024
  return Number.isFinite(e) ? e : null;
6017
6025
  }
6018
- const ws = "padding:2px 7px;font-size:11px;border-radius:4px;border:1px solid rgba(255,255,255,.3);background:transparent;color:#fff;cursor:pointer", Es = "width:84px;padding:1px 4px;font-size:11px;border-radius:4px;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.08);color:#fff", ks = "#22d3ee";
6019
- class Is {
6026
+ const Ts = "padding:2px 7px;font-size:11px;border-radius:4px;border:1px solid rgba(255,255,255,.3);background:transparent;color:#fff;cursor:pointer", Ds = "width:84px;padding:1px 4px;font-size:11px;border-radius:4px;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.08);color:#fff", _s = "#22d3ee";
6027
+ class qs {
6020
6028
  constructor(t) {
6021
6029
  f(this, "el");
6022
6030
  f(this, "campos", /* @__PURE__ */ new Map());
@@ -6032,7 +6040,7 @@ class Is {
6032
6040
  }
6033
6041
  campo(t, e, o, a) {
6034
6042
  const i = document.createElement("input");
6035
- i.type = "text", i.inputMode = "decimal", i.autocomplete = "off", i.spellcheck = !1, i.dataset.campo = t, i.title = e, i.setAttribute("aria-label", e), i.style.cssText = Es + (a ? `;width:${a}px` : "");
6043
+ i.type = "text", i.inputMode = "decimal", i.autocomplete = "off", i.spellcheck = !1, i.dataset.campo = t, i.title = e, i.setAttribute("aria-label", e), i.style.cssText = Ds + (a ? `;width:${a}px` : "");
6036
6044
  const s = () => o();
6037
6045
  return i.addEventListener("change", s), i.addEventListener("keydown", (r) => {
6038
6046
  r.stopPropagation(), r.key === "Enter" && (r.preventDefault(), s());
@@ -6040,14 +6048,14 @@ class Is {
6040
6048
  }
6041
6049
  botao(t, e, o, a) {
6042
6050
  const i = document.createElement("button");
6043
- return i.type = "button", i.dataset.acao = t, i.textContent = e, i.title = o, i.style.cssText = ws, i.addEventListener("click", a), this.botoes.set(t, i), i;
6051
+ return i.type = "button", i.dataset.acao = t, i.textContent = e, i.title = o, i.style.cssText = Ts, i.addEventListener("click", a), this.botoes.set(t, i), i;
6044
6052
  }
6045
6053
  montar() {
6046
6054
  const t = (...r) => {
6047
6055
  const c = document.createElement("span");
6048
6056
  return c.style.cssText = "display:inline-flex;gap:4px;align-items:center", c.append(...r), c;
6049
6057
  }, e = t(this.rotulo("Nó"));
6050
- for (const r of zs) {
6058
+ for (const r of Is) {
6051
6059
  const c = this.botao(`tipo-${r.tipo}`, r.rotulo, r.titulo, () => this.acoes.definirTipo(r.tipo));
6052
6060
  this.botoesTipo.set(r.tipo, c), e.append(c);
6053
6061
  }
@@ -6073,7 +6081,7 @@ class Is {
6073
6081
  this.botao("arco-dir", "Arco ⟳", "Troca o trecho que sai deste nó por um arco abaulado para a direita", () => this.pedirArco("direita")),
6074
6082
  this.botao("concordar", "Concordar", "Arredonda o canto deste nó com um arco tangente aos dois trechos (raio ao lado)", () => this.pedirConcordar())
6075
6083
  );
6076
- this.campos.get("raio").value = String(As), this.el.append(e, o, a("entrada", "Alça ←"), a("saida", "Alça →"), i, s);
6084
+ this.campos.get("raio").value = String(ks), this.el.append(e, o, a("entrada", "Alça ←"), a("saida", "Alça →"), i, s);
6077
6085
  }
6078
6086
  confirmarCoordenada() {
6079
6087
  const t = Lt(this.campos.get("lat").value), e = Lt(this.campos.get("lon").value);
@@ -6114,7 +6122,7 @@ class Is {
6114
6122
  const i = vt(a);
6115
6123
  for (const [c, l] of this.botoesTipo) {
6116
6124
  const d = c === i;
6117
- l.style.background = d ? ks : "transparent", l.style.color = d ? "#111" : "#fff", l.setAttribute("aria-pressed", String(d));
6125
+ l.style.background = d ? _s : "transparent", l.style.color = d ? "#111" : "#fff", l.setAttribute("aria-pressed", String(d));
6118
6126
  }
6119
6127
  const s = (c, l, d = !0) => {
6120
6128
  const h = this.campos.get(c);
@@ -6122,7 +6130,7 @@ class Is {
6122
6130
  };
6123
6131
  s("lat", a.ponto[0].toFixed(7)), s("lon", a.ponto[1].toFixed(7));
6124
6132
  for (const c of ["entrada", "saida"]) {
6125
- const l = vs(t, e, c);
6133
+ const l = Ps(t, e, c);
6126
6134
  s(`${c}-comp`, l ? l.comprimentoM.toFixed(3) : "", !!l), s(`${c}-az`, l ? l.azimuteGraus.toFixed(2) : "", !!l);
6127
6135
  }
6128
6136
  const r = e < o.length - 1 || t.tipo === "Polygon";
@@ -6134,8 +6142,8 @@ class Is {
6134
6142
  o && (o.disabled = !e, o.style.opacity = e ? "1" : ".4", o.style.cursor = e ? "pointer" : "default");
6135
6143
  }
6136
6144
  }
6137
- const Ts = "cm-vertex-edit-hud", it = "cad-edicao-vertices", Dt = "#facc15", ge = "#f472b6", Ds = "#22d3ee", _s = 600, qs = 100, $s = 24, Fs = 2500, Ns = 7, Os = 3, Rs = 45, _t = (n, t) => n === t || JSON.stringify(n) === JSON.stringify(t);
6138
- class Bs {
6145
+ const $s = "cm-vertex-edit-hud", it = "cad-edicao-vertices", Dt = "#facc15", ge = "#f472b6", Fs = "#22d3ee", Ns = 600, Os = 100, Rs = 24, Bs = 2500, Vs = 7, js = 3, Gs = 45, _t = (n, t) => n === t || JSON.stringify(n) === JSON.stringify(t);
6146
+ class Hs {
6139
6147
  constructor(t) {
6140
6148
  f(this, "feicaoAtual", null);
6141
6149
  /** Feição como foi gravada pela última vez (base do histórico). */
@@ -6176,15 +6184,15 @@ class Bs {
6176
6184
  const a = this.dep.map, i = t.target instanceof Element ? t.target : null;
6177
6185
  if (!i || i !== a.getContainer() && !i.closest(".leaflet-pane") || i.closest(".leaflet-marker-icon, .leaflet-control")) return;
6178
6186
  const s = a.mouseEventToContainerPoint(t), r = a.containerPointToLatLng(s), c = this.segmentoMaisProximo([r.lat, r.lng]);
6179
- c && (t.stopPropagation(), t.preventDefault(), this.molde = { i: c.i, t: Math.min(Qo, Math.max(Yo, c.t)), x: s.x, y: s.y, moveu: !1, antes: e }, this.arrastando++, this.moldeArrastoDoMapa = a.dragging.enabled(), this.moldeArrastoDoMapa && a.dragging.disable(), window.addEventListener("mousemove", this.aoMoverMolde), window.addEventListener("mouseup", this.aoSoltarMolde));
6187
+ c && (t.stopPropagation(), t.preventDefault(), this.molde = { i: c.i, t: Math.min(ta, Math.max(Jo, c.t)), x: s.x, y: s.y, moveu: !1, antes: e }, this.arrastando++, this.moldeArrastoDoMapa = a.dragging.enabled(), this.moldeArrastoDoMapa && a.dragging.disable(), window.addEventListener("mousemove", this.aoMoverMolde), window.addEventListener("mouseup", this.aoSoltarMolde));
6180
6188
  });
6181
6189
  f(this, "aoMoverMolde", (t) => {
6182
6190
  const e = this.molde, o = this.feicaoAtual;
6183
6191
  if (!e || !o) return;
6184
6192
  const a = this.dep.map.mouseEventToContainerPoint(t);
6185
- if (!e.moveu && Math.hypot(a.x - e.x, a.y - e.y) < Os) return;
6193
+ if (!e.moveu && Math.hypot(a.x - e.x, a.y - e.y) < js) return;
6186
6194
  e.moveu = !0;
6187
- const i = this.dep.map.containerPointToLatLng(a), s = Lo(e.antes.geometria, e.i, e.t, [i.lat, i.lng]);
6195
+ const i = this.dep.map.containerPointToLatLng(a), s = Co(e.antes.geometria, e.i, e.t, [i.lat, i.lng]);
6188
6196
  s && (this.feicaoAtual = { ...o, geometria: s }, this.sincronizarAlcasBezier(), this.dep.previsualizar(this.feicaoAtual), this.atualizarHud(s));
6189
6197
  });
6190
6198
  f(this, "aoSoltarMolde", () => this.finalizarMolde(!0));
@@ -6276,7 +6284,7 @@ class Bs {
6276
6284
  /** O círculo da feição bate com as alças atuais (centro e raio): a alça da borda fica onde o usuário a soltou. */
6277
6285
  circuloCompativel(t) {
6278
6286
  const e = t.geometria;
6279
- return e.tipo !== "Circle" || this.pts.length < 2 ? !1 : e.centro[0] === this.pts[0][0] && e.centro[1] === this.pts[0][1] && Math.abs(Ao(this.pts[0], this.pts[1]) - e.raioMetros) < 0.01;
6287
+ return e.tipo !== "Circle" || this.pts.length < 2 ? !1 : e.centro[0] === this.pts[0][0] && e.centro[1] === this.pts[0][1] && Math.abs(zo(this.pts[0], this.pts[1]) - e.raioMetros) < 0.01;
6280
6288
  }
6281
6289
  /** Atualiza o texto "Snap" do HUD quando o snap é ligado/desligado. */
6282
6290
  atualizarSnapNoHud() {
@@ -6307,7 +6315,7 @@ class Bs {
6307
6315
  const i = this.criarAlca(o, a);
6308
6316
  this.alcas.push(i), this.grupo.addLayer(i);
6309
6317
  }), this.criarAlcasBezier(), t.tipo !== "Point")
6310
- for (const [o, a] of Je(this.geometriaAtual())) {
6318
+ for (const [o, a] of to(this.geometriaAtual())) {
6311
6319
  if (!this.segmentoLongoNaTela(o, a)) continue;
6312
6320
  const i = this.criarFantasma(o, a);
6313
6321
  this.fantasmas.push(i), this.grupo.addLayer(i.marker);
@@ -6319,7 +6327,7 @@ class Bs {
6319
6327
  const o = this.pts[t], a = this.pts[e];
6320
6328
  if (!o || !a) return !1;
6321
6329
  const i = this.dep.map.latLngToContainerPoint(o), s = this.dep.map.latLngToContainerPoint(a);
6322
- return Math.hypot(i.x - s.x, i.y - s.y) >= $s;
6330
+ return Math.hypot(i.x - s.x, i.y - s.y) >= Rs;
6323
6331
  }
6324
6332
  icone(t, e, o) {
6325
6333
  return b.divIcon({
@@ -6329,7 +6337,7 @@ class Bs {
6329
6337
  });
6330
6338
  }
6331
6339
  iconeAlca(t) {
6332
- const e = this.ehCirculo && t === 1, o = this.selecionado === t, a = o ? Ds : Dt, i = o ? "2px solid #fff;box-shadow:0 0 0 2px #0e7490" : "2px solid #111";
6340
+ const e = this.ehCirculo && t === 1, o = this.selecionado === t, a = o ? Fs : Dt, i = o ? "2px solid #fff;box-shadow:0 0 0 2px #0e7490" : "2px solid #111";
6333
6341
  return this.icone("cad-vertex-handle", 12, `background:${a};border:${i};border-radius:${e ? "50%" : "2px"};cursor:${e ? "ew-resize" : "move"}`);
6334
6342
  }
6335
6343
  criarAlca(t, e) {
@@ -6351,7 +6359,7 @@ class Bs {
6351
6359
  }), o.on("contextmenu", (a) => {
6352
6360
  b.DomEvent.preventDefault(a.originalEvent), b.DomEvent.stopPropagation(a.originalEvent), this.excluir(e);
6353
6361
  }), o.on("dblclick", (a) => {
6354
- b.DomEvent.stopPropagation(a.originalEvent), !(Date.now() - this.ultimaInsercao < _s) && this.alternarSuave(e);
6362
+ b.DomEvent.stopPropagation(a.originalEvent), !(Date.now() - this.ultimaInsercao < Ns) && this.alternarSuave(e);
6355
6363
  }), o;
6356
6364
  }
6357
6365
  detectarRetanguloDe(t) {
@@ -6399,9 +6407,9 @@ class Bs {
6399
6407
  /** Posição da alça: a real do nó ou, se o nó é de canto, a latente (sempre à mão para curvar). */
6400
6408
  posicaoDaAlca(t, e, o) {
6401
6409
  var s, r;
6402
- const a = (r = (s = Fa(t)) == null ? void 0 : s[e]) == null ? void 0 : r[o];
6410
+ const a = (r = (s = Oa(t)) == null ? void 0 : s[e]) == null ? void 0 : r[o];
6403
6411
  if (a) return { pos: a, latente: !1 };
6404
- if (this.pts.length > Na) return null;
6412
+ if (this.pts.length > Ra) return null;
6405
6413
  const i = xe(t, e, o);
6406
6414
  return i ? { pos: i, latente: !0 } : null;
6407
6415
  }
@@ -6457,19 +6465,19 @@ class Bs {
6457
6465
  let i = [t.marker.getLatLng().lat, t.marker.getLatLng().lng];
6458
6466
  const s = (c = U(a.geometria)) == null ? void 0 : c[t.i];
6459
6467
  if (o && s)
6460
- i = gs(s.ponto, i, Rs), t.marker.setLatLng(i), this.esconderSnap();
6468
+ i = xs(s.ponto, i, Gs), t.marker.setLatLng(i), this.esconderSnap();
6461
6469
  else if (this.dep.snapLigado()) {
6462
6470
  const l = this.dep.buscarSnap(i, { feicaoId: a.id, camadaId: a.camadaId, vertice: t.i });
6463
6471
  l && l.feicaoId !== a.id ? (i = l.coordenada, t.marker.setLatLng(i), this.mostrarSnap(i)) : this.esconderSnap();
6464
6472
  } else
6465
6473
  this.esconderSnap();
6466
- const r = ko(a.geometria, t.i, t.qual, i, e);
6474
+ const r = Io(a.geometria, t.i, t.qual, i, e);
6467
6475
  this.feicaoAtual = { ...a, geometria: r }, this.completarAlcasDoNo(t.i), this.sincronizarAlcasBezier(), this.dep.previsualizar(this.feicaoAtual), this.atualizarHud();
6468
6476
  }
6469
6477
  alternarSuave(t) {
6470
6478
  const e = this.feicaoAtual;
6471
6479
  if (!e) return;
6472
- const o = Eo(e.geometria, t);
6480
+ const o = ko(e.geometria, t);
6473
6481
  o !== e.geometria && (this.feicaoAtual = { ...e, geometria: o }, this.reconstruir(), this.dep.previsualizar(this.feicaoAtual), this.confirmar(this.feicaoAtual));
6474
6482
  }
6475
6483
  criarFantasma(t, e) {
@@ -6530,7 +6538,7 @@ class Bs {
6530
6538
  comInsercao(t, e) {
6531
6539
  const o = this.feicaoAtual;
6532
6540
  if (!o || this.pts.length === 0) return null;
6533
- const a = this.geometriaAtual(), i = wt(a, t, (t + 1) % this.pts.length), s = Oa(a, t, i);
6541
+ const a = this.geometriaAtual(), i = wt(a, t, (t + 1) % this.pts.length), s = Ba(a, t, i);
6534
6542
  if (s === a) return null;
6535
6543
  const r = Q(s).map((c) => [c[0], c[1]]);
6536
6544
  return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && (r[t + 1] = e), { feicao: { ...o, geometria: ye(s, r) }, pts: r };
@@ -6546,7 +6554,7 @@ class Bs {
6546
6554
  /** Grava o gesto: guarda a geometria anterior no histórico (se mudou) e avisa quem escuta. */
6547
6555
  confirmar(t) {
6548
6556
  const e = this.base;
6549
- e && !_t(e.geometria, t.geometria) && (this.historico.push(e), this.historico.length > qs && this.historico.shift(), this.refeitos = []), this.feicaoAtual = t, this.base = t, this.gravar(t), this.atualizarBotoes();
6557
+ e && !_t(e.geometria, t.geometria) && (this.historico.push(e), this.historico.length > Os && this.historico.shift(), this.refeitos = []), this.feicaoAtual = t, this.base = t, this.gravar(t), this.atualizarBotoes();
6550
6558
  }
6551
6559
  gravar(t) {
6552
6560
  this.gravando = !0;
@@ -6558,9 +6566,9 @@ class Bs {
6558
6566
  }
6559
6567
  excluir(t) {
6560
6568
  if (!this.feicaoAtual) return !1;
6561
- const o = this.geometriaAtual(), a = Ra(o, t);
6569
+ const o = this.geometriaAtual(), a = Va(o, t);
6562
6570
  if (!a)
6563
- 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 ${Ba(o)} nós: não dá para excluir mais.`), !1;
6571
+ 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 ${ja(o)} nós: não dá para excluir mais.`), !1;
6564
6572
  this.pts = Q(a).map((s) => [s[0], s[1]]), this.retangulo = !1, this.selecionado = null, this.reconstruir();
6565
6573
  const i = this.feicaoComPontos();
6566
6574
  return this.dep.previsualizar(i), this.confirmar(i), !0;
@@ -6592,63 +6600,63 @@ class Bs {
6592
6600
  /** Muda o tipo do nó selecionado (canto, suave, simétrico, livre). */
6593
6601
  definirTipoDoNoSelecionado(t) {
6594
6602
  const e = this.noParaEditar();
6595
- return e !== null && this.aplicarGeometria(ms(this.geometriaAtual(), e, t), e, "");
6603
+ return e !== null && this.aplicarGeometria(ys(this.geometriaAtual(), e, t), e, "");
6596
6604
  }
6597
6605
  /** Move o nó selecionado para a coordenada digitada, levando as alças junto. */
6598
6606
  moverNoSelecionadoPara(t) {
6599
6607
  const e = this.noParaEditar();
6600
6608
  if (e === null) return !1;
6601
- const o = this.geometriaAtual(), a = ys(o, e, t);
6609
+ const o = this.geometriaAtual(), a = Cs(o, e, t);
6602
6610
  return this.aplicarGeometria(a === o ? null : a, e, "Coordenada inválida.");
6603
6611
  }
6604
6612
  /** Põe a alça do nó selecionado a `comprimentoM` metros, no azimute dado (0 = norte, horário). */
6605
6613
  definirAlcaDoNoSelecionado(t, e) {
6606
6614
  const o = this.noParaEditar();
6607
6615
  if (o === null) return !1;
6608
- const a = this.geometriaAtual(), i = bs(a, o, t, e);
6616
+ const a = this.geometriaAtual(), i = Ls(a, o, t, e);
6609
6617
  return this.aplicarGeometria(i === a ? null : i, o, "Alça inválida.");
6610
6618
  }
6611
6619
  /** O trecho que sai do nó selecionado perde as alças (vira reta). */
6612
6620
  endireitarSegmentoSeguinte() {
6613
6621
  const t = this.noParaEditar();
6614
- return t !== null && this.aplicarGeometria(Ps(this.geometriaAtual(), t), t, "");
6622
+ return t !== null && this.aplicarGeometria(Ms(this.geometriaAtual(), t), t, "");
6615
6623
  }
6616
6624
  /** O trecho que sai do nó selecionado ganha alças (as latentes viram reais). */
6617
6625
  curvarSegmentoSeguinte() {
6618
6626
  const t = this.noParaEditar();
6619
- return t !== null && this.aplicarGeometria(Ls(this.geometriaAtual(), t), t, "");
6627
+ return t !== null && this.aplicarGeometria(As(this.geometriaAtual(), t), t, "");
6620
6628
  }
6621
6629
  /** Troca o trecho que sai do nó selecionado por um arco de raio `raioM`, abaulado para `lado`. */
6622
6630
  arcoNoSegmentoSeguinte(t, e = "esquerda") {
6623
6631
  const o = this.noParaEditar();
6624
- return o !== null && this.aplicarGeometria(Ss(this.geometriaAtual(), o, t, e), o, "Arco: o nó precisa ter um trecho seguinte e o raio deve ser maior que zero.");
6632
+ return o !== null && this.aplicarGeometria(ws(this.geometriaAtual(), o, t, e), o, "Arco: o nó precisa ter um trecho seguinte e o raio deve ser maior que zero.");
6625
6633
  }
6626
6634
  /** Arredonda o canto do nó selecionado com um arco tangente de raio `raioM` (reduzido se os vizinhos forem curtos). */
6627
6635
  concordarNoSelecionado(t) {
6628
6636
  const e = this.noParaEditar();
6629
- return e !== null && this.aplicarGeometria(Ms(this.geometriaAtual(), e, t), null, "Concordância: só em nó de canto com dois trechos que não estejam alinhados.");
6637
+ return e !== null && this.aplicarGeometria(Es(this.geometriaAtual(), e, t), null, "Concordância: só em nó de canto com dois trechos que não estejam alinhados.");
6630
6638
  }
6631
6639
  // ---- moldar o segmento arrastando o traçado ----
6632
6640
  /** Segmento mais perto de `coord` (a até `toleranciaPx` pixels) e o parâmetro `t` do ponto dele; `null` se nenhum. */
6633
- segmentoMaisProximo(t, e = Ns) {
6641
+ segmentoMaisProximo(t, e = Vs) {
6634
6642
  if (!this.feicaoAtual || !Number.isFinite(t[0]) || !Number.isFinite(t[1])) return null;
6635
6643
  const a = this.geometriaAtual(), i = U(a);
6636
6644
  if (!i || a.tipo !== "LineString" && a.tipo !== "Polygon") return null;
6637
6645
  const s = this.dep.map, r = s.latLngToContainerPoint(t);
6638
6646
  let c = null, l = e;
6639
- for (const [d, h] of Je(a)) {
6647
+ for (const [d, h] of to(a)) {
6640
6648
  const u = i[d], m = i[h], g = [u.ponto, m.ponto, u.saida, m.entrada].filter((S) => !!S).map((S) => s.latLngToContainerPoint(S)), p = g.map((S) => S.x), v = g.map((S) => S.y);
6641
6649
  if (r.x < Math.min(...p) - e || r.x > Math.max(...p) + e || r.y < Math.min(...v) - e || r.y > Math.max(...v) + e) continue;
6642
- const y = xs(a, d, t);
6650
+ const y = Ss(a, d, t);
6643
6651
  if (!y) continue;
6644
- const A = s.latLngToContainerPoint(y.ponto), x = Math.hypot(A.x - r.x, A.y - r.y);
6652
+ const M = s.latLngToContainerPoint(y.ponto), x = Math.hypot(M.x - r.x, M.y - r.y);
6645
6653
  x <= l && (l = x, c = { i: d, t: y.t });
6646
6654
  }
6647
6655
  return c;
6648
6656
  }
6649
6657
  /** Molda o segmento `i` de uma vez: o ponto em `t` passa a ser `coord` (mesma operação do arraste do traçado). */
6650
6658
  moldarSegmentoPara(t, e, o) {
6651
- return this.aplicarGeometria(Lo(this.geometriaAtual(), t, e, o), t, "Segmento inexistente.");
6659
+ return this.aplicarGeometria(Co(this.geometriaAtual(), t, e, o), t, "Segmento inexistente.");
6652
6660
  }
6653
6661
  /** Fim da moldagem: grava (se o cursor andou) ou só encerra o gesto. */
6654
6662
  finalizarMolde(t) {
@@ -6695,7 +6703,7 @@ class Bs {
6695
6703
  montarHud() {
6696
6704
  var d;
6697
6705
  const t = this.dep.map.getContainer(), e = document.createElement("div");
6698
- e.id = Ts, e.style.cssText = Ko + "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";
6706
+ e.id = $s, e.style.cssText = Qo + "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";
6699
6707
  const o = (h) => {
6700
6708
  const u = document.createElement("span");
6701
6709
  return u.dataset.campo = h, u;
@@ -6709,7 +6717,7 @@ class Bs {
6709
6717
  const c = o("dica");
6710
6718
  c.style.opacity = ".7", c.textContent = i === "Circle" ? "Ctrl+Z desfaz · Enter conclui" : i === "Point" ? "Arraste para mover · Ctrl+Z desfaz · Enter conclui" : "Arraste o traçado p/ curvar · clique no nó: alças e painel · ponto do meio: novo nó · botão direito ou Delete: excluir · Shift: alça livre · Ctrl: 45°", c.title = "Alças pontilhadas ainda são retas. Shift e Ctrl valem durante o arraste de uma alça. Enter, Esc ou Concluir sai; clicar fora não sai.", c.style.fontSize = "10px";
6711
6719
  const l = o("aviso");
6712
- l.style.color = "#fbbf24", l.setAttribute("role", "status"), e.append(s, o("nos"), o("medida"), r, c, l), e.append(a("desfazer", "Desfazer", "Desfazer o último gesto (Ctrl+Z)", () => this.desfazer())), e.append(a("refazer", "Refazer", "Refazer (Ctrl+Shift+Z ou Ctrl+Y)", () => this.refazer())), (i === "LineString" || i === "Polygon") && e.append(a("excluir-no", "Excluir nó", "Exclui o nó selecionado (Delete); clique num nó para selecioná-lo", () => this.excluirSelecionado())), e.append(a("cancelar", "Cancelar", "Descartar tudo o que foi alterado nesta edição", () => this.cancelar())), e.append(a("concluir", "Concluir", "Concluir a edição (Enter ou Esc)", () => this.parar(), !0)), (i === "LineString" || i === "Polygon") && (this.painel = new Is({
6720
+ l.style.color = "#fbbf24", l.setAttribute("role", "status"), e.append(s, o("nos"), o("medida"), r, c, l), e.append(a("desfazer", "Desfazer", "Desfazer o último gesto (Ctrl+Z)", () => this.desfazer())), e.append(a("refazer", "Refazer", "Refazer (Ctrl+Shift+Z ou Ctrl+Y)", () => this.refazer())), (i === "LineString" || i === "Polygon") && e.append(a("excluir-no", "Excluir nó", "Exclui o nó selecionado (Delete); clique num nó para selecioná-lo", () => this.excluirSelecionado())), e.append(a("cancelar", "Cancelar", "Descartar tudo o que foi alterado nesta edição", () => this.cancelar())), e.append(a("concluir", "Concluir", "Concluir a edição (Enter ou Esc)", () => this.parar(), !0)), (i === "LineString" || i === "Polygon") && (this.painel = new qs({
6713
6721
  moverNo: (h) => this.moverNoSelecionadoPara(h),
6714
6722
  definirAlca: (h, u) => this.definirAlcaDoNoSelecionado(h, u),
6715
6723
  definirTipo: (h) => this.definirTipoDoNoSelecionado(h),
@@ -6742,7 +6750,7 @@ class Bs {
6742
6750
  const e = (o = this.hud) == null ? void 0 : o.querySelector('[data-campo="aviso"]');
6743
6751
  e && (e.textContent = t, this.avisoTimer && clearTimeout(this.avisoTimer), this.avisoTimer = setTimeout(() => {
6744
6752
  e.textContent = "", this.avisoTimer = null;
6745
- }, Fs));
6753
+ }, Bs));
6746
6754
  }
6747
6755
  atualizarHud(t) {
6748
6756
  if (!this.hud || !this.feicaoAtual) return;
@@ -6773,7 +6781,7 @@ class Bs {
6773
6781
  a && (a.setLatLng(e), this.aoArrastar(a, t, o), a.fire("dragend"));
6774
6782
  }
6775
6783
  }
6776
- class Vs {
6784
+ class Us {
6777
6785
  constructor(t) {
6778
6786
  f(this, "editor", null);
6779
6787
  f(this, "pararDeVigiarCamada", null);
@@ -6804,13 +6812,13 @@ class Vs {
6804
6812
  var d, h, u;
6805
6813
  const o = this.p.buscar(t, e);
6806
6814
  if (!o || o.excluida) return { ok: !1, motivo: "inexistente" };
6807
- const a = this.p.obterLayerManager().getLayerDef(t), i = to(o, !!(a != null && a.bloqueada));
6815
+ const a = this.p.obterLayerManager().getLayerDef(t), i = eo(o, !!(a != null && a.bloqueada));
6808
6816
  if (i)
6809
6817
  return this.p.emitir("cad-edicao-recusada", { motivo: i, feicao: o }), { ok: !1, motivo: i };
6810
6818
  const s = this.p.obterMapa();
6811
6819
  if (!s) return { ok: !1, motivo: "sem-mapa" };
6812
6820
  this.p.desativarFerramenta(), (d = this.editor) == null || d.parar(), this.p.aplicarMargensHud(), this.p.selecionarUma({ camadaId: t, id: e }), this.p.fecharPopup();
6813
- const r = this.p.obterLayerManager(), c = R.get(G), l = new Bs({
6821
+ const r = this.p.obterLayerManager(), c = R.get(G), l = new Hs({
6814
6822
  map: s,
6815
6823
  snapLigado: () => this.p.snapAtivo(),
6816
6824
  alternarSnap: () => this.p.alternarSnap(),
@@ -6846,7 +6854,7 @@ class Vs {
6846
6854
  const t = this.p.selecionadas();
6847
6855
  if (t.length !== 1) return null;
6848
6856
  const e = this.p.obterLayerManager().getLayerDef(t[0].camadaId);
6849
- return to(t[0], !!(e != null && e.bloqueada)) === null ? t[0] : null;
6857
+ return eo(t[0], !!(e != null && e.bloqueada)) === null ? t[0] : null;
6850
6858
  }
6851
6859
  /** Enter: edita a única feição selecionada, se ela for editável. Devolve se a edição começou. */
6852
6860
  editarSelecionada() {
@@ -6870,7 +6878,7 @@ class Vs {
6870
6878
  (t = this.editor) == null || t.parar();
6871
6879
  }
6872
6880
  }
6873
- class js {
6881
+ class Zs {
6874
6882
  constructor(t) {
6875
6883
  this.p = t;
6876
6884
  }
@@ -6895,8 +6903,8 @@ class js {
6895
6903
  buscarSnapEm(t, e) {
6896
6904
  const o = this.p.obterMapa();
6897
6905
  if (!o) return null;
6898
- const a = o.latLngToContainerPoint(t), i = this.candidatasEm(t, Va);
6899
- return ja({ x: a.x, y: a.y }, i, (s) => o.latLngToContainerPoint(s), {}, e);
6906
+ const a = o.latLngToContainerPoint(t), i = this.candidatasEm(t, Ga);
6907
+ return Ha({ x: a.x, y: a.y }, i, (s) => o.latLngToContainerPoint(s), {}, e);
6900
6908
  }
6901
6909
  feicaoSob(t, e) {
6902
6910
  const o = this.p.obterMapa();
@@ -6905,7 +6913,7 @@ class js {
6905
6913
  return { feicao: Qt({ x: i.x, y: i.y }, this.candidatasEm(r, 8), (l) => o.latLngToContainerPoint(l)), coordenada: r };
6906
6914
  }
6907
6915
  }
6908
- class Gs {
6916
+ class Ws {
6909
6917
  constructor(t) {
6910
6918
  f(this, "hoverId", null);
6911
6919
  f(this, "hoverAgendado", !1);
@@ -6950,7 +6958,7 @@ class Gs {
6950
6958
  this.hoverId = null;
6951
6959
  }
6952
6960
  }
6953
- class Hs {
6961
+ class Xs {
6954
6962
  constructor(t) {
6955
6963
  this.p = t;
6956
6964
  }
@@ -6960,7 +6968,7 @@ class Hs {
6960
6968
  for (const o of this.p.obterLayerManager().getActiveSelectableLayers())
6961
6969
  if (o.tipo === G)
6962
6970
  for (const a of this.p.lista(o.id))
6963
- this.p.desenhada(a) && Ga(a, t) && e.push({ camadaId: o.id, id: a.id });
6971
+ this.p.desenhada(a) && Ua(a, t) && e.push({ camadaId: o.id, id: a.id });
6964
6972
  this.p.desativarFerramenta(), this.p.selecionar(e);
6965
6973
  }
6966
6974
  /** Caixa de seleção: só feições de camadas visíveis, interativas e desbloqueadas, com toque geométrico real. */
@@ -6971,19 +6979,19 @@ class Hs {
6971
6979
  for (const r of this.p.obterLayerManager().getActiveSelectableLayers())
6972
6980
  if (r.tipo === G)
6973
6981
  for (const c of this.p.lista(r.id))
6974
- this.p.desenhada(c) && Ha(c, t, i, e) && s.push({ camadaId: r.id, id: c.id });
6982
+ this.p.desenhada(c) && Za(c, t, i, e) && s.push({ camadaId: r.id, id: c.id });
6975
6983
  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);
6976
6984
  }
6977
6985
  }
6978
- function Us(n) {
6986
+ function Ks(n) {
6979
6987
  return n.key !== "Enter" || n.defaultPrevented || n.ctrlKey || n.metaKey || n.altKey || n.shiftKey ? !1 : !bt(n) && !Yt(n);
6980
6988
  }
6981
- class Zs {
6989
+ class Ys {
6982
6990
  constructor(t) {
6983
6991
  f(this, "ouvintes", new Gt());
6984
6992
  f(this, "aoTecla", (t) => {
6985
6993
  try {
6986
- if (!Us(t) || this.p.ocupado() || !this.p.atalhosValem()) return;
6994
+ if (!Ks(t) || this.p.ocupado() || !this.p.atalhosValem()) return;
6987
6995
  this.p.editarSelecionada() && t.preventDefault();
6988
6996
  } catch (e) {
6989
6997
  console.error("[ui-canvas-cad] falha no atalho Enter da edição", e);
@@ -6999,7 +7007,7 @@ class Zs {
6999
7007
  this.ouvintes.cleanup();
7000
7008
  }
7001
7009
  }
7002
- class Ws {
7010
+ class Qs {
7003
7011
  constructor(t) {
7004
7012
  f(this, "operacoes");
7005
7013
  f(this, "selecao");
@@ -7019,22 +7027,22 @@ class Ws {
7019
7027
  /** Aceita a coordenada (0, 0) exata nas feições de entrada (atributo `aceitar-origem`). */
7020
7028
  f(this, "aceitarOrigem", !1);
7021
7029
  f(this, "opcoesPopup", { copiarParaAreaDeTransferencia: !0 });
7022
- this.contexto = t, this.repositorio = new fs({
7030
+ this.contexto = t, this.repositorio = new bs({
7023
7031
  obterLayerManager: () => this.contexto.obterLayerManager(),
7024
7032
  opcoesNormalizacao: () => this.opcoesNormalizacao(),
7025
7033
  aposDados: () => this.aposDados()
7026
- }), this.consulta = new js({
7034
+ }), this.consulta = new Zs({
7027
7035
  obterMapa: () => this.contexto.obterMapa(),
7028
7036
  obterLayerManager: () => this.contexto.obterLayerManager(),
7029
7037
  desenhada: (e) => this.desenhada(e)
7030
- }), this.ponteiro = new Gs({
7038
+ }), this.ponteiro = new Ws({
7031
7039
  emitir: (e, o, a) => this.contexto.emitir(e, o, a),
7032
7040
  feicaoSob: (e, o) => this.consulta.feicaoSob(e, o),
7033
7041
  interacaoAtiva: () => this.ferramentas.ativo || this.edicao.editando,
7034
7042
  popupNoDuploClique: () => this.modoPopups() !== "desligado",
7035
7043
  botaoDireitoDaFerramenta: () => this.ferramentas.ativo ? (this.ferramentas.botaoDireito(), !0) : !1,
7036
7044
  abrirPopup: (e) => this.popup.abrir(e)
7037
- }), this.regiao = new Hs({
7045
+ }), this.regiao = new Xs({
7038
7046
  obterMapa: () => this.contexto.obterMapa(),
7039
7047
  obterLayerManager: () => this.contexto.obterLayerManager(),
7040
7048
  lista: (e) => this.lista(e),
@@ -7044,7 +7052,7 @@ class Ws {
7044
7052
  adicionar: (e) => this.selecao.adicionar(e),
7045
7053
  subtrair: (e) => this.selecao.subtrair(e),
7046
7054
  alternarVarias: (e) => this.selecao.alternarVarias(e)
7047
- }), this.edicao = new Vs({
7055
+ }), this.edicao = new Us({
7048
7056
  obterMapa: () => this.contexto.obterMapa(),
7049
7057
  obterLayerManager: () => this.contexto.obterLayerManager(),
7050
7058
  emitir: (e, o) => this.contexto.emitir(e, o),
@@ -7067,17 +7075,17 @@ class Ws {
7067
7075
  snapAtivo: () => this.snap.ativo,
7068
7076
  alternarSnap: () => this.snap.alternar(),
7069
7077
  buscarSnapEm: (e, o) => this.buscarSnapEm(e, o)
7070
- }), this.teclado = new Zs({
7078
+ }), this.teclado = new Ys({
7071
7079
  ocupado: () => this.edicao.editando || this.ferramentas.ativo,
7072
7080
  atalhosValem: () => this.atalhosValem(),
7073
7081
  editarSelecionada: () => this.edicao.editarSelecionada()
7074
- }), this.versoes = new Kn({
7082
+ }), this.versoes = new ts({
7075
7083
  obterLayerManager: () => this.contexto.obterLayerManager(),
7076
7084
  emitir: (e, o) => this.contexto.emitir(e, o),
7077
7085
  buscar: (e, o) => this.buscar(e, o),
7078
7086
  lista: (e) => this.lista(e),
7079
7087
  aposDados: () => this.aposDados()
7080
- }, t.regra ?? new _e()), this.ferramentas = new ps({
7088
+ }, t.regra ?? new qe()), this.ferramentas = new vs({
7081
7089
  obterMapa: () => this.contexto.obterMapa(),
7082
7090
  obterLayerManager: () => this.contexto.obterLayerManager(),
7083
7091
  emitir: (e, o, a) => this.contexto.emitir(e, o, a),
@@ -7096,14 +7104,14 @@ class Ws {
7096
7104
  dividirComLinha: (e) => this.dividirComLinha(e),
7097
7105
  selecionarNoLaco: (e) => this.selecionarNoLaco(e),
7098
7106
  candidatasEm: (e, o) => this.candidatasEm(e, o)
7099
- }), this.camera = new Yn({
7107
+ }), this.camera = new es({
7100
7108
  obterMapa: () => this.contexto.obterMapa(),
7101
7109
  obterLayerManager: () => this.contexto.obterLayerManager(),
7102
7110
  buscar: (e, o) => this.buscar(e, o),
7103
7111
  lista: (e) => this.lista(e),
7104
7112
  desenhada: (e) => this.desenhada(e),
7105
7113
  garantirVisivel: (e) => this.versoes.garantirVisivel(e)
7106
- }), this.operacoes = new Xn({
7114
+ }), this.operacoes = new Jn({
7107
7115
  emitir: (e, o) => this.contexto.emitir(e, o),
7108
7116
  obterLayerManager: () => this.contexto.obterLayerManager(),
7109
7117
  buscar: (e, o) => this.buscar(e, o),
@@ -7116,18 +7124,18 @@ class Ws {
7116
7124
  estaSelecionada: (e) => this.selecao.contem(e),
7117
7125
  divisaoAtiva: () => this.ferramentas.ferramentaAtiva === "dividir",
7118
7126
  encerrarDesenho: () => this.ferramentas.desativarFerramenta()
7119
- }), this.cursores = new Rn(() => this.contexto.obterMapa()), this.snap = new Wn({
7127
+ }), this.cursores = new Gn(() => this.contexto.obterMapa()), this.snap = new Qn({
7120
7128
  aplica: () => this.atalhosValem(),
7121
7129
  aoMudar: (e) => {
7122
7130
  var o, a;
7123
7131
  this.contexto.emitir("cad-snap", e), this.edicao.atualizarSnapNoHud(), (a = (o = this.contexto).aoSnapMudar) == null || a.call(o, e.ligado);
7124
7132
  }
7125
- }), this.popup = new Zn({
7133
+ }), this.popup = new Yn({
7126
7134
  obterMapa: () => this.contexto.obterMapa(),
7127
7135
  obterCamada: (e) => this.contexto.obterLayerManager().getLayerDef(e),
7128
7136
  aoAcao: (e, o) => this.tratarAcaoPopup(e, o),
7129
7137
  liberar: (e) => this.contexto.liberarPopups ? this.contexto.liberarPopups(e) : e()
7130
- }), this.selecao = new Bn({
7138
+ }), this.selecao = new Hn({
7131
7139
  obterFeicao: (e) => this.buscar(e.camadaId, e.id),
7132
7140
  aplicarVisual: (e, o) => {
7133
7141
  const a = this.contexto.obterLayerManager().getLayerInstance(e), i = R.get(G);
@@ -7264,7 +7272,7 @@ class Ws {
7264
7272
  }
7265
7273
  aplicarMargensHud() {
7266
7274
  const t = this.contexto.obterMapa();
7267
- t && es(t.getContainer(), this.margensHud);
7275
+ t && ns(t.getContainer(), this.margensHud);
7268
7276
  }
7269
7277
  // ---- versões (oficial × prévia) ----
7270
7278
  // ---- versões (oficial × prévia) ----
@@ -7476,7 +7484,7 @@ class Ws {
7476
7484
  return this.operacoes.juntarFeicoes(t, e, o);
7477
7485
  }
7478
7486
  }
7479
- const So = {
7487
+ const Mo = {
7480
7488
  ponto: "Ponto",
7481
7489
  linha: "Linha",
7482
7490
  poligono: "Polígono",
@@ -7493,19 +7501,19 @@ const So = {
7493
7501
  "selecao-laco": "Laço",
7494
7502
  "conta-gotas": "Cor"
7495
7503
  };
7496
- function Xs(n) {
7504
+ function Js(n) {
7497
7505
  if (!n) return [];
7498
7506
  const t = n.split(/[\s,]+/).map((o) => o.trim().toLowerCase()).filter(Boolean);
7499
- if (t.includes("todas")) return [...oo];
7500
- const e = new Set(t.filter(Io));
7501
- return oo.filter((o) => e.has(o));
7507
+ if (t.includes("todas")) return [...ao];
7508
+ const e = new Set(t.filter(To));
7509
+ return ao.filter((o) => e.has(o));
7502
7510
  }
7503
- function Ks(n) {
7511
+ function tr(n) {
7504
7512
  if (!n) return !1;
7505
7513
  const t = n.split(/[\s,]+/).map((e) => e.trim().toLowerCase());
7506
7514
  return t.includes("todas") || t.includes("editar");
7507
7515
  }
7508
- class Ys {
7516
+ class er {
7509
7517
  constructor(t) {
7510
7518
  f(this, "barra", null);
7511
7519
  f(this, "editando", !1);
@@ -7520,7 +7528,7 @@ class Ys {
7520
7528
  a.className = "cad-quick-toolbar cad-draw-toolbar", a.setAttribute("role", "toolbar"), a.setAttribute("aria-label", "Ferramentas de desenho");
7521
7529
  for (const s of t) {
7522
7530
  const r = document.createElement("button");
7523
- r.type = "button", r.className = "cad-btn-tool cad-draw-btn", r.dataset.ferramenta = s, r.textContent = So[s], r.title = So[s], r.setAttribute("aria-pressed", "false"), r.addEventListener("click", () => this.ctx.aoEscolher(s)), a.appendChild(r);
7531
+ r.type = "button", r.className = "cad-btn-tool cad-draw-btn", r.dataset.ferramenta = s, r.textContent = Mo[s], r.title = Mo[s], r.setAttribute("aria-pressed", "false"), r.addEventListener("click", () => this.ctx.aoEscolher(s)), a.appendChild(r);
7524
7532
  }
7525
7533
  if (o) {
7526
7534
  const s = document.createElement("button");
@@ -7547,8 +7555,8 @@ class Ys {
7547
7555
  (t = this.barra) == null || t.remove(), this.barra = null;
7548
7556
  }
7549
7557
  }
7550
- const Qs = "data-cad-estilos-externos";
7551
- function Js(n) {
7558
+ const or = "data-cad-estilos-externos";
7559
+ function ar(n) {
7552
7560
  try {
7553
7561
  return Array.from(n.cssRules, (t) => t.cssText).join(`
7554
7562
  `);
@@ -7556,10 +7564,10 @@ function Js(n) {
7556
7564
  return "";
7557
7565
  }
7558
7566
  }
7559
- function tr(n) {
7560
- return typeof n == "string" ? n.trim() ? [n] : [] : Array.isArray(n) ? n.map((t) => typeof t == "string" ? t : Js(t)).filter((t) => t.trim() !== "") : [];
7567
+ function ir(n) {
7568
+ return typeof n == "string" ? n.trim() ? [n] : [] : Array.isArray(n) ? n.map((t) => typeof t == "string" ? t : ar(t)).filter((t) => t.trim() !== "") : [];
7561
7569
  }
7562
- class er {
7570
+ class nr {
7563
7571
  constructor(t) {
7564
7572
  f(this, "textos", []);
7565
7573
  f(this, "adotadas", []);
@@ -7571,7 +7579,7 @@ class er {
7571
7579
  return this.textos;
7572
7580
  }
7573
7581
  definir(t) {
7574
- this.textos = tr(t), this.aplicar();
7582
+ this.textos = ir(t), this.aplicar();
7575
7583
  }
7576
7584
  /** Tira as folhas do shadow root, mantendo o pedido para `aplicar()` depois. */
7577
7585
  limpar() {
@@ -7591,7 +7599,7 @@ class er {
7591
7599
  this.adotadas = [];
7592
7600
  }
7593
7601
  const e = document.createElement("style");
7594
- e.setAttribute(Qs, ""), e.textContent = this.textos.join(`
7602
+ e.setAttribute(or, ""), e.textContent = this.textos.join(`
7595
7603
  `), this.shadow.appendChild(e), this.fallback = e;
7596
7604
  }
7597
7605
  remover() {
@@ -7600,7 +7608,7 @@ class er {
7600
7608
  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;
7601
7609
  }
7602
7610
  }
7603
- const ta = {
7611
+ const oa = {
7604
7612
  "linha-cor": "cor",
7605
7613
  "linha-espessura": "espessura",
7606
7614
  "linha-tipo": "tipo",
@@ -7620,22 +7628,22 @@ const ta = {
7620
7628
  opacidade: "opacidadeTraco",
7621
7629
  terminacao: "terminacaoTraco",
7622
7630
  juncao: "juncaoTraco"
7623
- }, or = 100, ar = /^\s*\d+(\.\d+)?([\s,]+\d+(\.\d+)?)*\s*$/;
7624
- function ir(n) {
7625
- return Object.prototype.hasOwnProperty.call(ta, n);
7631
+ }, sr = 100, rr = /^\s*\d+(\.\d+)?([\s,]+\d+(\.\d+)?)*\s*$/;
7632
+ function cr(n) {
7633
+ return Object.prototype.hasOwnProperty.call(oa, n);
7626
7634
  }
7627
7635
  const qt = (n) => {
7628
7636
  const t = typeof n == "number" ? n : typeof n == "string" && n.trim() !== "" ? Number(n) : NaN;
7629
7637
  return Number.isFinite(t) ? t : void 0;
7630
7638
  };
7631
- function nr(n, t) {
7639
+ function lr(n, t) {
7632
7640
  if (t != null)
7633
7641
  switch (n) {
7634
7642
  case "cor":
7635
7643
  return (typeof t == "string" ? et(t, "") : "") || void 0;
7636
7644
  case "espessura": {
7637
7645
  const e = qt(t);
7638
- return e !== void 0 && e >= 0 ? Math.min(or, e) : void 0;
7646
+ return e !== void 0 && e >= 0 ? Math.min(sr, e) : void 0;
7639
7647
  }
7640
7648
  case "escala": {
7641
7649
  const e = qt(t);
@@ -7648,28 +7656,28 @@ function nr(n, t) {
7648
7656
  return e !== void 0 ? Math.min(1, Math.max(0, e)) : void 0;
7649
7657
  }
7650
7658
  case "tipo":
7651
- return ga(t);
7659
+ return ba(t);
7652
7660
  case "tracejado":
7653
- return typeof t == "string" && ar.test(t) ? t.trim() : void 0;
7661
+ return typeof t == "string" && rr.test(t) ? t.trim() : void 0;
7654
7662
  case "terminacao":
7655
- return ma(t) ? t : void 0;
7663
+ return va(t) ? t : void 0;
7656
7664
  case "juncao":
7657
- return fa(t) ? t : void 0;
7665
+ return ga(t) ? t : void 0;
7658
7666
  default:
7659
7667
  return;
7660
7668
  }
7661
7669
  }
7662
- function Mo(n, t) {
7670
+ function Ao(n, t) {
7663
7671
  const e = { ...n };
7664
7672
  if (!t || typeof t != "object") return e;
7665
7673
  for (const o of Object.keys(Ot)) {
7666
7674
  if (!Object.prototype.hasOwnProperty.call(t, o)) continue;
7667
- const a = nr(o, t[o]);
7675
+ const a = lr(o, t[o]);
7668
7676
  a === void 0 ? delete e[Ot[o]] : e[Ot[o]] = a;
7669
7677
  }
7670
7678
  return e;
7671
7679
  }
7672
- function sr(n) {
7680
+ function dr(n) {
7673
7681
  const t = {};
7674
7682
  for (const [e, o] of Object.entries(Ot)) {
7675
7683
  const a = n[o];
@@ -7677,10 +7685,10 @@ function sr(n) {
7677
7685
  }
7678
7686
  return t;
7679
7687
  }
7680
- function rr(n, t) {
7681
- return { [ta[n]]: t };
7688
+ function hr(n, t) {
7689
+ return { [oa[n]]: t };
7682
7690
  }
7683
- class cr extends Sa {
7691
+ class ur extends Aa {
7684
7692
  constructor() {
7685
7693
  super();
7686
7694
  f(this, "shadow");
@@ -7705,7 +7713,7 @@ class cr extends Sa {
7705
7713
  f(this, "_chaveGrupo");
7706
7714
  f(this, "_zonaProjecao", 22);
7707
7715
  f(this, "hudCoordAgendado", !1);
7708
- this.shadow = this.attachShadow({ mode: "open" }), this.controller = new sn(), this.controladorTamanho = gn(this, this.controller), this.shadow.innerHTML = Pn(), this.estilosExternos = new er(this.shadow), this.mapContainer = this.shadow.getElementById("cad-map-container"), this.layersPanel = this.shadow.getElementById("qgis-layer-panel"), this.toolbarPainel = new bn({
7716
+ this.shadow = this.attachShadow({ mode: "open" }), this.controller = new dn(), this.controladorTamanho = xn(this, this.controller), this.shadow.innerHTML = Mn(), this.estilosExternos = new nr(this.shadow), this.mapContainer = this.shadow.getElementById("cad-map-container"), this.layersPanel = this.shadow.getElementById("qgis-layer-panel"), this.toolbarPainel = new Ln({
7709
7717
  shadow: this.shadow,
7710
7718
  mapContainer: this.mapContainer,
7711
7719
  layersPanel: this.layersPanel,
@@ -7716,28 +7724,28 @@ class cr extends Sa {
7716
7724
  onToggleSnap: () => this.feicoes.alternarSnap(),
7717
7725
  onTratarCliqueCanvas: (i) => this.tratarCliqueLivreCanvas(i),
7718
7726
  onDispararAcaoPopup: (i, s) => this.dispararAcaoPopup(i, s)
7719
- }), this.broadcastConfig = new vn({
7727
+ }), this.broadcastConfig = new Pn({
7720
7728
  host: this,
7721
7729
  controller: this.controller,
7722
7730
  mapContainer: this.mapContainer,
7723
7731
  setLayerOpacity: (i, s) => this.setLayerOpacity(i, s)
7724
- }), this.colecoesDados = new yn({
7732
+ }), this.colecoesDados = new Cn({
7725
7733
  obterController: () => this.controller,
7726
7734
  obterChaveGrupo: () => this.chaveGrupo,
7727
7735
  setLayerVisibility: (i, s) => this.setLayerVisibility(i, s)
7728
7736
  });
7729
- const e = new _e(), o = this.controller.context, a = this.controller.canvasInteracao.ctx;
7730
- Object.assign(o, { regraVersoes: e, renderizador: () => this.renderizador, qualidade: () => this.perfilQualidade }), this.feicoes = new Ws({
7737
+ const e = new qe(), o = this.controller.context, a = this.controller.canvasInteracao.ctx;
7738
+ Object.assign(o, { regraVersoes: e, renderizador: () => this.renderizador, qualidade: () => this.perfilQualidade }), this.feicoes = new Qs({
7731
7739
  obterLayerManager: () => this.controller.layerManager,
7732
7740
  obterMapa: () => this.controller.getMap(),
7733
7741
  regra: e,
7734
7742
  modoPopups: () => this.popups,
7735
- liberarPopups: (i) => $e(this.controller.getMap(), i),
7743
+ liberarPopups: (i) => Fe(this.controller.getMap(), i),
7736
7744
  aoFerramenta: (i) => {
7737
7745
  this.barraFerramentas.marcar(i);
7738
7746
  },
7739
7747
  aoSnapMudar: (i) => {
7740
- go(this.shadow, i);
7748
+ vo(this.shadow, i);
7741
7749
  },
7742
7750
  aoEdicao: (i) => {
7743
7751
  this.barraFerramentas.marcarEdicao(i);
@@ -7752,7 +7760,7 @@ class cr extends Sa {
7752
7760
  const r = this.feicoes.tratarAcaoCamada(i, s);
7753
7761
  r && this.dispatchEvent(new CustomEvent(r, { detail: s, bubbles: !0, composed: !0 }));
7754
7762
  }
7755
- }), this.barraFerramentas = new Ys({
7763
+ }), this.barraFerramentas = new er({
7756
7764
  raiz: this.shadow.getElementById("cad-root"),
7757
7765
  aoEscolher: (i) => {
7758
7766
  this.feicoes.alternarFerramenta(i);
@@ -7766,7 +7774,7 @@ class cr extends Sa {
7766
7774
  edicaoAtiva: () => this.feicoes.editando,
7767
7775
  aoLimparSelecao: () => this.feicoes.aoPedirLimpeza(),
7768
7776
  selecionarFeicoesNaCaixa: (i, s, r) => this.feicoes.selecionarNaCaixa(i, s, r)
7769
- }), wn(this.shadow), go(this.shadow, !0);
7777
+ }), Tn(this.shadow), vo(this.shadow, !0);
7770
7778
  }
7771
7779
  static get observedAttributes() {
7772
7780
  return [
@@ -7799,7 +7807,7 @@ class cr extends Sa {
7799
7807
  "linha-opacidade",
7800
7808
  "linha-terminacao",
7801
7809
  "linha-juncao",
7802
- ...Ma
7810
+ ...za
7803
7811
  ];
7804
7812
  }
7805
7813
  connectedCallback() {
@@ -7815,7 +7823,7 @@ class cr extends Sa {
7815
7823
  this.ponteiroSobre = !0;
7816
7824
  }), this.hoverListeners.add(this, "mouseleave", () => {
7817
7825
  this.ponteiroSobre = !1;
7818
- }), this.montarBarra(this.getAttribute("ferramentas")), this.broadcastConfig.conectar(), (o = this.desligarAnuncios) == null || o.call(this), this.desligarAnuncios = Dn(this, this.shadow), this.estilosExternos.aplicar(), Ke(this, this.layersPanel), this.initTimeout = window.setTimeout(() => {
7826
+ }), this.montarBarra(this.getAttribute("ferramentas")), this.broadcastConfig.conectar(), (o = this.desligarAnuncios) == null || o.call(this), this.desligarAnuncios = Fn(this, this.shadow), this.estilosExternos.aplicar(), Ye(this, this.layersPanel), this.initTimeout = window.setTimeout(() => {
7819
7827
  this.initTimeout = void 0, this.inicializarAgora();
7820
7828
  }, 0);
7821
7829
  }
@@ -7828,14 +7836,14 @@ class cr extends Sa {
7828
7836
  if (!s || !this.mapContainer) return;
7829
7837
  const r = this.mapContainer.getBoundingClientRect(), c = b.point(o - r.left, a - r.top), l = s.containerPointToLatLng(c);
7830
7838
  if (!l || !Number.isFinite(l.lat) || !Number.isFinite(l.lng)) return;
7831
- const d = La(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");
7832
- h && d && (h.textContent = `${d.fuso}${d.hemisferio}`), u && d && (u.textContent = `E: ${Xe(d.este, 2)} m | N: ${Xe(d.norte, 2)} m`), m && (m.textContent = `Lat: ${l.lat.toFixed(6)}° Lon: ${l.lng.toFixed(6)}°`);
7839
+ const d = Sa(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");
7840
+ h && d && (h.textContent = `${d.fuso}${d.hemisferio}`), u && d && (u.textContent = `E: ${Ke(d.este, 2)} m | N: ${Ke(d.norte, 2)} m`), m && (m.textContent = `Lat: ${l.lat.toFixed(6)}° Lon: ${l.lng.toFixed(6)}°`);
7833
7841
  };
7834
7842
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : setTimeout(i, 16);
7835
7843
  }
7836
7844
  montarBarra(e) {
7837
7845
  var o;
7838
- (o = this.barraFerramentas) == null || o.montar(Xs(e), Ks(e));
7846
+ (o = this.barraFerramentas) == null || o.montar(Js(e), tr(e));
7839
7847
  }
7840
7848
  /** Ú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. */
7841
7849
  ehUnicoCanvas() {
@@ -7853,7 +7861,7 @@ class cr extends Sa {
7853
7861
  }
7854
7862
  destroy() {
7855
7863
  var e;
7856
- 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(), Zo(this.mapContainer);
7864
+ 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(), Xo(this.mapContainer);
7857
7865
  }
7858
7866
  disconnectedCallback() {
7859
7867
  this.destroy();
@@ -7863,8 +7871,8 @@ class cr extends Sa {
7863
7871
  }
7864
7872
  attributeChangedCallback(e, o, a) {
7865
7873
  var i, s, r, c, l, d, h, u, m, g;
7866
- if (Aa(e)) {
7867
- Ke(this, this.layersPanel);
7874
+ if (wa(e)) {
7875
+ Ye(this, this.layersPanel);
7868
7876
  return;
7869
7877
  }
7870
7878
  if (e === "sem-atalho-snap") {
@@ -7890,8 +7898,8 @@ class cr extends Sa {
7890
7898
  this.aplicarQualidadeAoMapa(), (l = this.controller) == null || l.layerManager.recriarCamadasDoTipo("feicoes");
7891
7899
  return;
7892
7900
  }
7893
- if (ir(e)) {
7894
- (d = this.feicoes) == null || d.definirEstiloDesenho(Mo(this.feicoes.obterEstiloDesenho(), rr(e, a)));
7901
+ if (cr(e)) {
7902
+ (d = this.feicoes) == null || d.definirEstiloDesenho(Ao(this.feicoes.obterEstiloDesenho(), hr(e, a)));
7895
7903
  return;
7896
7904
  }
7897
7905
  if (e === "aceitar-origem") {
@@ -7902,7 +7910,7 @@ class cr extends Sa {
7902
7910
  this.montarBarra(a), (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));
7903
7911
  return;
7904
7912
  }
7905
- Ln(
7913
+ An(
7906
7914
  {
7907
7915
  host: this,
7908
7916
  controller: this.controller,
@@ -7938,7 +7946,7 @@ class cr extends Sa {
7938
7946
  this.estilosExternos.definir(e);
7939
7947
  }
7940
7948
  initCAD() {
7941
- Cn({
7949
+ zn({
7942
7950
  host: this,
7943
7951
  shadow: this.shadow,
7944
7952
  mapContainer: this.mapContainer,
@@ -7968,11 +7976,11 @@ class cr extends Sa {
7968
7976
  }
7969
7977
  tratarCliqueLivreCanvas(e, o, a) {
7970
7978
  const i = Date.now();
7971
- i - this.lastCanvasClickTime < 50 || (this.lastCanvasClickTime = i, un(this.obterContextoEventos(), e, o, a));
7979
+ i - this.lastCanvasClickTime < 50 || (this.lastCanvasClickTime = i, gn(this.obterContextoEventos(), e, o, a));
7972
7980
  }
7973
7981
  dispararAcaoPopup(e, o, a) {
7974
7982
  const i = Date.now();
7975
- this.lastPopupActionEmit && this.lastPopupActionEmit.acaoId === e && this.lastPopupActionEmit.elementoId === o && i - this.lastPopupActionEmit.time < 50 || (this.lastPopupActionEmit = { acaoId: e, elementoId: o, time: i }, pn(this.obterContextoEventos(), e, o, a));
7983
+ this.lastPopupActionEmit && this.lastPopupActionEmit.acaoId === e && this.lastPopupActionEmit.elementoId === o && i - this.lastPopupActionEmit.time < 50 || (this.lastPopupActionEmit = { acaoId: e, elementoId: o, time: i }, vn(this.obterContextoEventos(), e, o, a));
7976
7984
  }
7977
7985
  toggleLayersPanel() {
7978
7986
  this.hasAttribute("sem-painel-camadas") || this.toolbarPainel.toggleLayersPanel();
@@ -7982,7 +7990,7 @@ class cr extends Sa {
7982
7990
  }
7983
7991
  renderLayersUI() {
7984
7992
  const e = this.shadow.getElementById("layers-list-container");
7985
- rn(e, this.controller.layerManager.getLayers(), this.layerItemListeners, {
7993
+ hn(e, this.controller.layerManager.getLayers(), this.layerItemListeners, {
7986
7994
  setLayerVisibility: (o, a) => this.setLayerVisibility(o, a),
7987
7995
  setLayerOpacity: (o, a) => this.setLayerOpacity(o, a),
7988
7996
  setLayerBlocked: (o, a) => this.controller.layerManager.setLayerBlocked(o, a),
@@ -8073,11 +8081,11 @@ class cr extends Sa {
8073
8081
  }
8074
8082
  /** Perfil completo vigente (valores numéricos do nível em `qualidade`). */
8075
8083
  get perfilQualidade() {
8076
- return ze(this.qualidade);
8084
+ return we(this.qualidade);
8077
8085
  }
8078
8086
  aplicarQualidadeAoMapa() {
8079
8087
  var e;
8080
- Ii((e = this.controller) == null ? void 0 : e.getMap(), this.perfilQualidade);
8088
+ qi((e = this.controller) == null ? void 0 : e.getMap(), this.perfilQualidade);
8081
8089
  }
8082
8090
  /**
8083
8091
  * Contadores do desenho de uma camada de feições (`total`, `materializadas`, `desenhadas`, `marcasLOD`, `clusters`,
@@ -8132,11 +8140,11 @@ class cr extends Sa {
8132
8140
  this.controller.selectPonto(e, o);
8133
8141
  }
8134
8142
  get pontosSelecionados() {
8135
- return cn(this.controller);
8143
+ return un(this.controller);
8136
8144
  }
8137
8145
  set pontosSelecionados(e) {
8138
8146
  const o = Array.isArray(e) ? e : [];
8139
- Uo(this.controller, o), this.controller.atualizarDestaqueMarcadores();
8147
+ Wo(this.controller, o), this.controller.atualizarDestaqueMarcadores();
8140
8148
  }
8141
8149
  atualizarDestaqueMarcadores() {
8142
8150
  this.controller.atualizarDestaqueMarcadores();
@@ -8309,10 +8317,10 @@ class cr extends Sa {
8309
8317
  * inválido é ignorado (a opção volta ao padrão). Os atributos `linha-*` fazem o mesmo.
8310
8318
  */
8311
8319
  definirLinhaPadrao(e) {
8312
- this.feicoes.definirEstiloDesenho(Mo(this.feicoes.obterEstiloDesenho(), e));
8320
+ this.feicoes.definirEstiloDesenho(Ao(this.feicoes.obterEstiloDesenho(), e));
8313
8321
  }
8314
8322
  obterLinhaPadrao() {
8315
- return sr(this.feicoes.obterEstiloDesenho());
8323
+ return dr(this.feicoes.obterEstiloDesenho());
8316
8324
  }
8317
8325
  /**
8318
8326
  * Ferramentas: ponto, linha, poligono, retangulo, elipse, poligono-regular, estrela, circulo, texto, caneta,
@@ -8425,8 +8433,8 @@ class cr extends Sa {
8425
8433
  return this.controller.layerManager;
8426
8434
  }
8427
8435
  }
8428
- za("ui-canvas-cad", cr);
8429
- class Cr {
8436
+ Ea("ui-canvas-cad", ur);
8437
+ class zr {
8430
8438
  constructor(t, e) {
8431
8439
  f(this, "polylines", []);
8432
8440
  f(this, "bancoPontosAtivo", !1);
@@ -8481,8 +8489,8 @@ class Cr {
8481
8489
  Object.values(a).forEach((h) => {
8482
8490
  const u = jt(h);
8483
8491
  if (u.length < 2) return;
8484
- for (let A = 0; A < u.length - 1; A++) {
8485
- const x = u[A], S = u[A + 1], M = [[x.lat, x.lon], [S.lat, S.lon]], P = b.polyline(M, {
8492
+ for (let M = 0; M < u.length - 1; M++) {
8493
+ const x = u[M], S = u[M + 1], A = [[x.lat, x.lon], [S.lat, S.lon]], P = b.polyline(A, {
8486
8494
  color: "#080d0a",
8487
8495
  weight: s + 3,
8488
8496
  opacity: 0.85,
@@ -8492,7 +8500,7 @@ class Cr {
8492
8500
  interactive: !1
8493
8501
  }).addTo(this.core.map);
8494
8502
  this.polylines.push(P);
8495
- const C = b.polyline(M, {
8503
+ const C = b.polyline(A, {
8496
8504
  color: i,
8497
8505
  weight: s,
8498
8506
  opacity: r,
@@ -8569,7 +8577,7 @@ class Cr {
8569
8577
  this.core.map && this.polylines.forEach((t) => this.core.map.removeLayer(t)), this.core.bancoPontosGroup && this.core.bancoPontosGroup.clearLayers(), this.polylines = [];
8570
8578
  }
8571
8579
  }
8572
- class Sr {
8580
+ class wr {
8573
8581
  constructor(t, e) {
8574
8582
  f(this, "markers", []);
8575
8583
  f(this, "vizinhosMarkers", []);
@@ -8708,211 +8716,211 @@ class Sr {
8708
8716
  }
8709
8717
  }
8710
8718
  export {
8711
- ta as ATRIBUTOS_LINHA_PADRAO,
8712
- xa as AgrupadorCluster,
8713
- sn as CADMapaController,
8714
- ei as CAD_INTERACTIVE_PANES,
8715
- Kr as CELULA_CLUSTER_PX,
8716
- Po as CLASSE_FERRAMENTA_ATIVA,
8717
- De as COR_PADRAO,
8719
+ oa as ATRIBUTOS_LINHA_PADRAO,
8720
+ La as AgrupadorCluster,
8721
+ dn as CADMapaController,
8722
+ ni as CAD_INTERACTIVE_PANES,
8723
+ tc as CELULA_CLUSTER_PX,
8724
+ Lo as CLASSE_FERRAMENTA_ATIVA,
8725
+ _e as COR_PADRAO,
8718
8726
  Bt as COR_SELECAO,
8719
- Ko as CSS_POSICAO_HUD,
8720
- sn as CanvasCADController,
8727
+ Qo as CSS_POSICAO_HUD,
8728
+ dn as CanvasCADController,
8721
8729
  Wt as CanvasFormas,
8722
- ui as CanvasInteracao,
8723
- Gi as CanvasLayerManager,
8724
- ds as ControleDesenho,
8725
- Rn as CursoresRemotos,
8726
- ao as DEFAULT_CONFIG,
8727
- fo as DEFAULT_LAYERS,
8728
- Yr as DadosCamada,
8729
- Vi as DespachanteFeicoes,
8730
- Bs as EditorVertices,
8731
- oo as FERRAMENTAS,
8732
- Jn as FOLGA_HUD,
8733
- ts as FRACAO_LARGURA_HUD,
8734
- Zn as FeicaoPopup,
8735
- Ri as FeicoesCanvasRenderer,
8736
- Ei as FeicoesLayerRenderer,
8737
- sn as GerenciGeoMapaController,
8738
- yi as GridLayerRenderer,
8739
- Me as ICONES_FEICAO,
8740
- os as ID_HUD_DESENHO,
8741
- Ts as ID_HUD_EDICAO,
8742
- na as IndiceEspacial,
8743
- zr as InternadorEstilos,
8744
- Ce as LIMIAR_DENSIDADE_ALTA,
8730
+ gi as CanvasInteracao,
8731
+ Wi as CanvasLayerManager,
8732
+ fs as ControleDesenho,
8733
+ Gn as CursoresRemotos,
8734
+ io as DEFAULT_CONFIG,
8735
+ mo as DEFAULT_LAYERS,
8736
+ ec as DadosCamada,
8737
+ Ui as DespachanteFeicoes,
8738
+ Hs as EditorVertices,
8739
+ ao as FERRAMENTAS,
8740
+ as as FOLGA_HUD,
8741
+ is as FRACAO_LARGURA_HUD,
8742
+ Yn as FeicaoPopup,
8743
+ Gi as FeicoesCanvasRenderer,
8744
+ Di as FeicoesLayerRenderer,
8745
+ dn as GerenciGeoMapaController,
8746
+ Ci as GridLayerRenderer,
8747
+ Ae as ICONES_FEICAO,
8748
+ ss as ID_HUD_DESENHO,
8749
+ $s as ID_HUD_EDICAO,
8750
+ ra as IndiceEspacial,
8751
+ Ir as InternadorEstilos,
8752
+ Se as LIMIAR_DENSIDADE_ALTA,
8745
8753
  se as LIMITE_CULLING,
8746
- Qr as LIMITE_MARCA_PX,
8754
+ oc as LIMITE_MARCA_PX,
8747
8755
  R as LayerRendererFactory,
8748
- Qn as MARGEM_HUD_PADRAO,
8749
- Na as MAX_NOS_COM_ALCA_LATENTE,
8750
- Jr as MAX_PONTOS_SEM_CLUSTER,
8751
- rc as MAX_VERTICES_EDICAO,
8752
- ra as MIN_VERTICES_SIMPLIFICAR,
8756
+ os as MARGEM_HUD_PADRAO,
8757
+ Ra as MAX_NOS_COM_ALCA_LATENTE,
8758
+ ac as MAX_PONTOS_SEM_CLUSTER,
8759
+ hc as MAX_VERTICES_EDICAO,
8760
+ la as MIN_VERTICES_SIMPLIFICAR,
8753
8761
  Pe as MapaConfigManager,
8754
- ti as MapaCore,
8755
- Cr as MapaLinhas,
8756
- Sr as MapaMarcadores,
8757
- Pa as MotorFormas,
8758
- tc as OPACIDADE_MARCA,
8762
+ ii as MapaCore,
8763
+ zr as MapaLinhas,
8764
+ wr as MapaMarcadores,
8765
+ Ca as MotorFormas,
8766
+ ic as OPACIDADE_MARCA,
8759
8767
  me as PROPRIEDADES_HUD,
8760
- wo as PintorCanvas2D,
8761
- Cc as RAIO_MINIMO_CIRCULO_M,
8762
- cc as RAIO_MINIMO_EDICAO_CIRCULO_M,
8763
- _e as RegraVersoes,
8764
- Bn as SelecaoFeicoes,
8768
+ Eo as PintorCanvas2D,
8769
+ zc as RAIO_MINIMO_CIRCULO_M,
8770
+ uc as RAIO_MINIMO_EDICAO_CIRCULO_M,
8771
+ qe as RegraVersoes,
8772
+ Hn as SelecaoFeicoes,
8765
8773
  te as SessaoDesenho,
8766
- wr as TIPOS_LINHA,
8767
- xi as TOLERANCIA_AMOSTRA_PX,
8774
+ Tr as TIPOS_LINHA,
8775
+ Si as TOLERANCIA_AMOSTRA_PX,
8768
8776
  ee as TOLERANCIA_LINHA_PX,
8769
- ai as TOLERANCIA_PONTO_PX,
8770
- Va as TOLERANCIA_SNAP_PX,
8771
- pi as TileLayerRenderer,
8772
- cr as UICanvasCAD,
8773
- mi as VectorLinesLayerRenderer,
8774
- vi as VectorPointsLayerRenderer,
8775
- bi as VectorPolygonsLayerRenderer,
8776
- fi as WmsLayerRenderer,
8777
- ec as ZOOM_DESMEMBRAR,
8778
- Be as ZOOM_SEM_SIMPLIFICACAO,
8779
- oc as agruparMarcasPorCor,
8780
- ac as agruparPontos,
8777
+ ri as TOLERANCIA_PONTO_PX,
8778
+ Ga as TOLERANCIA_SNAP_PX,
8779
+ vi as TileLayerRenderer,
8780
+ ur as UICanvasCAD,
8781
+ yi as VectorLinesLayerRenderer,
8782
+ Pi as VectorPointsLayerRenderer,
8783
+ Li as VectorPolygonsLayerRenderer,
8784
+ bi as WmsLayerRenderer,
8785
+ nc as ZOOM_DESMEMBRAR,
8786
+ Ve as ZOOM_SEM_SIMPLIFICACAO,
8787
+ sc as agruparMarcasPorCor,
8788
+ rc as agruparPontos,
8781
8789
  Vt as agruparPontosPorChave,
8782
8790
  xe as alcaLatente,
8783
- Eo as alternarSuavidade,
8784
- Sc as amostrarBezier,
8785
- es as aplicarMargensHud,
8791
+ ko as alternarSuavidade,
8792
+ wc as amostrarBezier,
8793
+ ns as aplicarMargensHud,
8786
8794
  ct as areaDaGeometria,
8787
- Er as areaMetros2,
8795
+ Dr as areaMetros2,
8788
8796
  St as bindPopupAcoesEvents,
8789
- ja as buscarSnap,
8790
- kr as caixaDaFeicao,
8791
- Ir as caixaPx,
8797
+ Ha as buscarSnap,
8798
+ _r as caixaDaFeicao,
8799
+ qr as caixaPx,
8792
8800
  zt as caixasSeTocam,
8793
- ic as centroDe,
8801
+ cc as centroDe,
8794
8802
  Jt as clonarFeicao,
8795
- Qe as comAlcaMovida,
8803
+ Je as comAlcaMovida,
8796
8804
  dt as comNos,
8797
8805
  ye as comPontos,
8798
- lc as comVertices,
8799
- ua as comprimentoMetros,
8800
- Pr as confrontanteParaFeicao,
8801
- $o as consultarFeicoesNoPonto,
8802
- Ye as contarItensCanvas,
8803
- dc as converterArea,
8804
- hc as converterComprimento,
8806
+ pc as comVertices,
8807
+ fa as comprimentoMetros,
8808
+ Mr as confrontanteParaFeicao,
8809
+ No as consultarFeicoesNoPonto,
8810
+ Qe as contarItensCanvas,
8811
+ fc as converterArea,
8812
+ mc as converterComprimento,
8805
8813
  Xt as coordenadaDeReferencia,
8806
- Ie as corHexSegura,
8814
+ Te as corHexSegura,
8807
8815
  et as corSegura,
8808
- gn as criarControladorTamanho,
8816
+ xn as criarControladorTamanho,
8809
8817
  be as criarLinha,
8810
- Tr as dashTipoLinha,
8811
- uc as ddParaDms,
8818
+ $r as dashTipoLinha,
8819
+ gc as ddParaDms,
8812
8820
  yt as deMetros,
8813
- Da as deslocarGeometria,
8814
- Ze as deveAgrupar,
8815
- Ue as diagonalPx,
8816
- Dr as distSegmentoPx,
8817
- pc as distanciaEntre,
8818
- Ao as distanciaMetros,
8819
- Ia as dividirPoligonoComLinha,
8820
- fc as dmsParaDd,
8821
- Io as ehFerramenta,
8822
- ba as ehMarca,
8823
- He as ehMultilinha,
8824
- _r as ehTipoLinha,
8821
+ qa as deslocarGeometria,
8822
+ We as deveAgrupar,
8823
+ Ze as diagonalPx,
8824
+ Fr as distSegmentoPx,
8825
+ vc as distanciaEntre,
8826
+ zo as distanciaMetros,
8827
+ Da as dividirPoligonoComLinha,
8828
+ bc as dmsParaDd,
8829
+ To as ehFerramenta,
8830
+ xa as ehMarca,
8831
+ Ue as ehMultilinha,
8832
+ Nr as ehTipoLinha,
8825
8833
  st as entidadeDe,
8826
- eo as entradaDaAncora,
8827
- qr as escalaDoZoom,
8828
- $r as escalaLatitude,
8829
- Fr as escalaTipoLinhaSegura,
8834
+ oo as entradaDaAncora,
8835
+ Or as escalaDoZoom,
8836
+ Rr as escalaLatitude,
8837
+ Br as escalaTipoLinhaSegura,
8830
8838
  T as escapeHtml,
8831
8839
  ve as estiloVetorDe,
8832
8840
  lt as extensaoDaGeometria,
8833
- We as extrairCentroDeWkt,
8834
- gi as extrairCorPonto,
8835
- Nr as extremosDoCirculoGeografico,
8836
- No as fatorDensidade,
8837
- Ha as feicaoNaCaixa,
8838
- Ga as feicaoNoLaco,
8841
+ Xe as extrairCentroDeWkt,
8842
+ xi as extrairCorPonto,
8843
+ Vr as extremosDoCirculoGeografico,
8844
+ Ro as fatorDensidade,
8845
+ Za as feicaoNaCaixa,
8846
+ Ua as feicaoNoLaco,
8839
8847
  Qt as feicaoNoPonto,
8840
- br as feicaoNoTopo,
8841
- Xe as formatUTM,
8848
+ Lr as feicaoNoTopo,
8849
+ Ke as formatUTM,
8842
8850
  gt as formatarArea,
8843
8851
  W as formatarExtensao,
8844
- ni as garantirCanvasSemEventos,
8845
- Ta as gerarBuffer,
8852
+ li as garantirCanvasSemEventos,
8853
+ _a as gerarBuffer,
8846
8854
  Zt as getPointShapeHtml,
8847
- Oa as inserirPonto,
8848
- mc as inserirVertice,
8849
- fa as juncaoCanvas,
8850
- _a as juntarLinhas,
8851
- qa as juntarPoligonos,
8852
- ya as ladoMarca,
8853
- je as latLonDoMundo,
8854
- La as latLonParaUtm,
8855
- Bi as lerModoRenderizador,
8856
- ha as limitesDaGeometria,
8857
- Or as metrosPorGrau,
8858
- Rr as metrosPorPixel,
8859
- Ba as minimoVertices,
8860
- Se as modoDensidade,
8861
- ko as moverAlca,
8862
- gc as moverVertice,
8863
- Xo as normalizarAnel,
8855
+ Ba as inserirPonto,
8856
+ yc as inserirVertice,
8857
+ ga as juncaoCanvas,
8858
+ $a as juntarLinhas,
8859
+ Fa as juntarPoligonos,
8860
+ Pa as ladoMarca,
8861
+ Ge as latLonDoMundo,
8862
+ Sa as latLonParaUtm,
8863
+ Hi as lerModoRenderizador,
8864
+ pa as limitesDaGeometria,
8865
+ jr as metrosPorGrau,
8866
+ Gr as metrosPorPixel,
8867
+ ja as minimoVertices,
8868
+ Me as modoDensidade,
8869
+ Io as moverAlca,
8870
+ xc as moverVertice,
8871
+ Yo as normalizarAnel,
8864
8872
  K as normalizarCoordenada,
8865
8873
  pe as normalizarFeicaoEntrada,
8866
- vo as normalizarLinha,
8867
- qn as normalizarPoligono,
8868
- ga as normalizarTipoLinha,
8869
- Fa as nosDe,
8870
- Mc as nosDeAncoras,
8874
+ bo as normalizarLinha,
8875
+ On as normalizarPoligono,
8876
+ ba as normalizarTipoLinha,
8877
+ Oa as nosDe,
8878
+ Ec as nosDeAncoras,
8871
8879
  U as nosOuVertices,
8872
8880
  jt as ordenarPontosPorSequencia,
8873
8881
  X as paraMetros,
8874
8882
  V as parseCoordenada,
8875
- vc as parseDash,
8883
+ Pc as parseDash,
8876
8884
  Rt as partesDaLinha,
8877
- va as pintarMarcas,
8878
- $a as planoLocal,
8879
- bc as pontoDaBordaDoCirculo,
8880
- yc as pontoMedio,
8885
+ ya as pintarMarcas,
8886
+ Na as planoLocal,
8887
+ Lc as pontoDaBordaDoCirculo,
8888
+ Cc as pontoMedio,
8881
8889
  wt as pontoMedioDoSegmento,
8882
- ka as pontoNoPoligono,
8883
- yr as pontoParaFeicao,
8890
+ Ta as pontoNoPoligono,
8891
+ Cr as pontoParaFeicao,
8884
8892
  Q as pontosDe,
8885
- Lr as posicaoHud,
8886
- pn as processarAcaoPopup,
8887
- un as processarCliqueLivreCanvas,
8888
- Br as projetarCentro,
8889
- Vr as projetarEm,
8890
- nc as projetarMercator,
8891
- jr as projetarVertices,
8892
- Gr as raioCirculoPx,
8893
- Ve as raioPontoPx,
8894
- ki as regioesExpostas,
8895
- _o as registrarFonteHit,
8896
- qo as removerFonteHit,
8897
- Ra as removerPonto,
8898
- xc as removerVertice,
8893
+ Ar as posicaoHud,
8894
+ vn as processarAcaoPopup,
8895
+ gn as processarCliqueLivreCanvas,
8896
+ Hr as projetarCentro,
8897
+ Ur as projetarEm,
8898
+ lc as projetarMercator,
8899
+ Zr as projetarVertices,
8900
+ Wr as raioCirculoPx,
8901
+ je as raioPontoPx,
8902
+ _i as regioesExpostas,
8903
+ $o as registrarFonteHit,
8904
+ Fo as removerFonteHit,
8905
+ Va as removerPonto,
8906
+ Sc as removerVertice,
8899
8907
  Ct as renderPopupAcoesHtml,
8900
- rn as renderizarPainelCamadas,
8901
- hi as resolverCliqueCentral,
8902
- xr as segmentoParaFeicao,
8903
- Ea as segmentosDe,
8904
- Je as segmentosDoEditor,
8905
- Hr as simplificarAnel,
8906
- ca as simplificarGeometria,
8907
- Ur as simplificarLinha,
8908
- Zr as simplificarPx,
8908
+ hn as renderizarPainelCamadas,
8909
+ mi as resolverCliqueCentral,
8910
+ Sr as segmentoParaFeicao,
8911
+ Ia as segmentosDe,
8912
+ to as segmentosDoEditor,
8913
+ Xr as simplificarAnel,
8914
+ da as simplificarGeometria,
8915
+ Kr as simplificarLinha,
8916
+ Yr as simplificarPx,
8909
8917
  pt as statusDe,
8910
- ma as terminacaoCanvas,
8911
- la as textoRotulo,
8912
- Wr as toleranciaPorZoom,
8913
- fn as tratarCliqueMarcador,
8914
- mn as tratarCliqueSegmento,
8915
- to as verificarEditavel,
8916
- sa as vertices,
8917
- Pc as verticesDe
8918
+ va as terminacaoCanvas,
8919
+ ha as textoRotulo,
8920
+ Qr as toleranciaPorZoom,
8921
+ bn as tratarCliqueMarcador,
8922
+ yn as tratarCliqueSegmento,
8923
+ eo as verificarEditavel,
8924
+ ca as vertices,
8925
+ Mc as verticesDe
8918
8926
  };