@thibezer/ui-components-kit 2.28.0 → 2.28.2
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/CHANGELOG.md +35 -0
- package/dist/camadas.cjs +82 -82
- package/dist/camadas.js +1135 -1037
- package/dist/campo-texto.cjs +2 -2
- package/dist/campo-texto.js +29 -29
- package/dist/canvas.cjs +38 -38
- package/dist/canvas.js +1045 -1022
- package/dist/components/ui-area-texto/ui-area-texto.d.ts +3 -0
- package/dist/components/ui-camadas/camadas-metricas.d.ts +2 -3
- package/dist/components/ui-camadas/camadas-selecao-api.d.ts +1 -0
- package/dist/components/ui-camadas/camadas-selecao.d.ts +17 -2
- package/dist/components/ui-camadas/camadas-sincronizacao-dom.d.ts +2 -0
- package/dist/components/ui-camadas/tipos.d.ts +2 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +2 -0
- package/dist/components/ui-campo-texto/ui-campo-texto.d.ts +3 -0
- package/dist/components/ui-canvas-cad/cad-hud-coordenadas.d.ts +12 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +6 -1
- package/dist/components/ui-tabela/tabela-corpo.d.ts +10 -0
- package/dist/components/ui-tabela/tabela-declarativa.d.ts +11 -0
- package/dist/components/ui-tabela/tabela-dom.d.ts +1 -0
- package/dist/components/ui-tabela/tabela-header.d.ts +1 -0
- package/dist/components/ui-tabela/tabela-renderizador.d.ts +4 -0
- package/dist/components/ui-tabela/tipos.d.ts +11 -0
- package/dist/components/ui-tabela/ui-tabela.d.ts +22 -2
- package/dist/components/ui-tabela-propriedades/editores-basicos.d.ts +6 -6
- package/dist/components/ui-tabela-propriedades/editores-cad.d.ts +5 -5
- package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +6 -4
- package/dist/components/ui-tabela-propriedades/propriedades-editores.d.ts +2 -2
- package/dist/components/ui-tabela-propriedades/propriedades-flutuante.d.ts +1 -1
- package/dist/components/ui-tabela-propriedades/propriedades-gerenciador-valores.d.ts +11 -11
- package/dist/components/ui-tabela-propriedades/propriedades-render-arvore.d.ts +4 -4
- package/dist/components/ui-tabela-propriedades/propriedades-splitter.d.ts +1 -0
- package/dist/components/ui-tabela-propriedades/propriedades-valor-misto.d.ts +9 -5
- package/dist/components/ui-tabela-propriedades/tipos.d.ts +10 -8
- package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +9 -7
- package/dist/custom-elements.json +13485 -12764
- package/dist/data.cjs +1 -1
- package/dist/data.js +107 -100
- package/dist/feature_caixa-BLVtatpp.cjs +1 -0
- package/dist/feature_caixa-CHAdzESq.js +806 -0
- package/dist/{feature_desenho-BH-E1Q9Q.cjs → feature_desenho-DRHnu8u8.cjs} +1 -1
- package/dist/{feature_desenho-CC8Mp5Gp.js → feature_desenho-edf-dHuf.js} +2 -2
- package/dist/feature_metricas-CKQGG2nz.cjs +1 -0
- package/dist/feature_metricas-DGfd21VR.js +130 -0
- package/dist/forms.cjs +7 -7
- package/dist/forms.js +24 -24
- package/dist/geometria-px-DEAIxMG5.js +512 -0
- package/dist/geometria-px-DJcNHXbE.cjs +1 -0
- package/dist/gerencigeo-canvas/dms.d.ts +7 -0
- package/dist/gerencigeo-canvas/feature_algoritmos.d.ts +1 -4
- package/dist/gerencigeo-canvas/utils.d.ts +1 -3
- package/dist/index.cjs +7 -7
- package/dist/index.js +228 -219
- package/dist/mapa.cjs +1 -1
- package/dist/mapa.js +1 -1
- package/dist/motor.cjs +1 -1
- package/dist/motor.js +113 -111
- package/dist/prancha-nucleo.cjs +3 -3
- package/dist/prancha-nucleo.js +283 -282
- package/dist/prancha.cjs +1 -1
- package/dist/prancha.js +3 -3
- package/dist/tabela.cjs +8 -8
- package/dist/tabela.js +1367 -1136
- package/dist/tipos-elementos.d.ts +28 -8
- package/dist/tipos-vue.d.ts +30 -12
- package/dist/utils-B2HuBLwz.js +108 -0
- package/dist/utils-DpPysTeU.cjs +1 -0
- package/package.json +1 -1
- package/dist/feature_caixa-4M4MkFH7.cjs +0 -1
- package/dist/feature_caixa-BVc5LenS.js +0 -824
- package/dist/geometria-px-Cyi_oPD6.cjs +0 -1
- package/dist/geometria-px-DHMPUsxC.js +0 -639
- package/dist/utils-ClVgqVyJ.cjs +0 -1
- package/dist/utils-DrHoxxmf.js +0 -83
package/dist/forms.js
CHANGED
|
@@ -2,11 +2,11 @@ var C = Object.defineProperty;
|
|
|
2
2
|
var z = (o, a, t) => a in o ? C(o, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[a] = t;
|
|
3
3
|
var s = (o, a, t) => z(o, typeof a != "symbol" ? a + "" : a, t);
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { A as b, F as m, L as p, u as f, T as h, V as L, W as I, g as d, f as q, R as
|
|
6
|
-
import { k as pt, m as ft, q as gt, r as xt, t as vt, w as _t, x as
|
|
5
|
+
import { A as b, F as m, L as p, u as f, T as h, V as L, W as I, g as d, f as q, R as y, E as w, e as D, p as g, d as c, h as V, j as v, s as R, Y as x } from "./kit-base-CBXA66aM.js";
|
|
6
|
+
import { k as pt, m as ft, q as gt, r as xt, t as vt, w as _t, x as Et, y as yt, z as wt, B as At, D as kt, H as St, J as Ct } from "./kit-base-CBXA66aM.js";
|
|
7
7
|
import { sincronizarFeedbackErro as T } from "./campo-texto.js";
|
|
8
8
|
import { ATRIBUTOS_OBSERVADOS_CAMPO_TEXTO as Lt, UICampoTexto as It, UIInput as qt, criarTemplateCampoTexto as Dt, sincronizarIconeSenha as Vt, sincronizarLabelEPlaceholder as Rt } from "./campo-texto.js";
|
|
9
|
-
const M = ':host{display:flex;flex-direction:column;gap:4px;width:100%;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){width:auto;display:inline-flex}.ui-area-texto__container{position:relative;width:100%;display:flex;flex-direction:column}.ui-area-texto__label{display:flex;align-items:center;justify-content:space-between;font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-medio, 500);color:var(--ui-cor-texto, #e1e1e6);-webkit-user-select:none;user-select:none;margin-bottom:4px;flex-shrink:0}.ui-area-texto__asterisco{color:var(--ui-cor-texto-erro, #ff5555);margin-left:2px;font-weight:600}.ui-area-texto__wrapper{position:relative;display:flex;width:100%;background:var(--ui-degrade-interno, var(--ui-area-texto-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, #1a1a1e))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ui-area-texto__wrapper:focus-within{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent);background:var(--ui-degrade-interno, var(--ui-area-texto-fundo, var(--ui-fundo-card, var(--ui-cor-fundo-menu, #18181c))))}.ui-area-texto__wrapper--erro{border-color:var(--ui-cor-texto-erro, #ff5555)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 18%,transparent)!important}.ui-area-texto__wrapper--disabled{opacity:.5;cursor:not-allowed;background:var(--ui-area-texto-desabilitado-fundo, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 3%, transparent))}.ui-area-texto__input{display:block;flex:1;width:100%;min-width:0;max-height:calc(var(--ui-area-linhas-max) * 1.5em + 12px);background:transparent;border:none;outline:none;color:var(--ui-cor-texto, #e1e1e6);font-family:inherit;font-size:var(--ui-tamanho-corpo-sm, 13px);line-height:1.5;padding:6px 8px;margin:0;box-sizing:border-box;resize:vertical;overflow-wrap:anywhere;touch-action:manipulation}.ui-area-texto__input::placeholder{color:var(--ui-cor-texto-secundario, #888899);opacity:.65}.ui-area-texto__input:disabled{cursor:not-allowed;resize:none}.ui-area-texto__rodape{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.ui-area-texto__helper{flex:1;min-width:0;font-size:var(--ui-tamanho-caption, 11px);color:var(--ui-cor-texto-secundario, #888899);line-height:var(--ui-altura-linha-compacta, 1.2);margin-top:2px}.ui-area-texto__helper--erro{color:var(--ui-cor-texto-erro, #ff5555);font-weight:500}.ui-area-texto__contador{margin-left:auto;flex-shrink:0;font-size:var(--ui-tamanho-caption, 11px);line-height:var(--ui-altura-linha-compacta, 1.2);margin-top:2px;color:var(--ui-cor-texto-secundario, #888899);font-variant-numeric:tabular-nums}.ui-area-texto__contador[hidden]{display:none}.ui-area-texto__contador--aviso{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-area-texto__contador--excedido{color:var(--ui-cor-texto-erro, #ff5555);font-weight:600}.ui-area-texto__anuncio{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@media (max-width: 640px),(pointer: coarse) and (max-width: 1024px){.ui-area-texto__input{font-size:16px}.ui-area-texto__label{font-size:13px}}@media (prefers-reduced-motion: reduce){.ui-area-texto__wrapper{transition:none}}:host(.squarecircle) .ui-area-texto__wrapper,:host(.squarecircles) .ui-area-texto__wrapper,:host(.ui-squarecircle) .ui-area-texto__wrapper,:host(.ui-squarecircles) .ui-area-texto__wrapper,:host([formato="squarecircle"]) .ui-area-texto__wrapper,:host([formato="squarecircles"]) .ui-area-texto__wrapper,:host([formato="squircle"]) .ui-area-texto__wrapper{border-radius:var(--ui-raio-lg, 10px)}:host(.degrade),:host(.ui-degrade),:host(.gradiente),:host(.ui-gradiente),:host([degrade]:not([degrade="false"]):not([degrade="none"]):not([degrade="0"]):not([degrade="off"])),:host([gradiente]:not([gradiente="false"]):not([gradiente="none"]):not([gradiente="0"]):not([gradiente="off"])),:host([gradient]:not([gradient="false"]):not([gradient="none"]):not([gradient="0"]):not([gradient="off"])){--ui-fundo-elevado: var(--ui-gradiente-elevado);--ui-fundo-card: var(--ui-gradiente-card)}', F = [
|
|
9
|
+
const M = ':host{display:flex;flex-direction:column;gap:4px;width:100%;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif)}:host([inline]){width:auto;display:inline-flex}.ui-area-texto__container{position:relative;width:100%;display:flex;flex-direction:column}.ui-area-texto__label{display:flex;align-items:center;justify-content:space-between;font-size:var(--ui-tamanho-corpo-sm, 13px);font-weight:var(--ui-peso-medio, 500);color:var(--ui-cor-texto, #e1e1e6);-webkit-user-select:none;user-select:none;margin-bottom:4px;flex-shrink:0}.ui-area-texto__asterisco{color:var(--ui-cor-texto-erro, #ff5555);margin-left:2px;font-weight:600}.ui-area-texto__wrapper{position:relative;display:flex;width:100%;background:var(--ui-degrade-interno, var(--ui-area-texto-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, #1a1a1e))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ui-area-texto__wrapper:focus-within{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent);background:var(--ui-degrade-interno, var(--ui-area-texto-fundo, var(--ui-fundo-card, var(--ui-cor-fundo-menu, #18181c))))}.ui-area-texto__wrapper--erro{border-color:var(--ui-cor-texto-erro, #ff5555)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 18%,transparent)!important}.ui-area-texto__wrapper--disabled{opacity:.5;cursor:not-allowed;background:var(--ui-area-texto-desabilitado-fundo, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 3%, transparent))}.ui-area-texto__input{display:block;flex:1;width:100%;min-width:0;max-height:calc(var(--ui-area-linhas-max) * 1.5em + 12px);background:transparent;border:none;outline:none;color:var(--ui-cor-texto, #e1e1e6);font-family:inherit;font-size:var(--ui-tamanho-corpo-sm, 13px);line-height:1.5;padding:6px 8px;margin:0;box-sizing:border-box;resize:vertical;overflow-wrap:anywhere;touch-action:manipulation}.ui-area-texto__input::placeholder{color:var(--ui-cor-texto-secundario, #888899);opacity:.65}.ui-area-texto__input:disabled{cursor:not-allowed;resize:none}.ui-area-texto__rodape{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.ui-area-texto__helper{flex:1;min-width:0;font-size:var(--ui-tamanho-caption, 11px);color:var(--ui-cor-texto-secundario, #888899);line-height:var(--ui-altura-linha-compacta, 1.2);margin-top:2px}.ui-area-texto__helper--erro{color:var(--ui-cor-texto-erro, #ff5555);font-weight:500}.ui-area-texto__contador{margin-left:auto;flex-shrink:0;font-size:var(--ui-tamanho-caption, 11px);line-height:var(--ui-altura-linha-compacta, 1.2);margin-top:2px;color:var(--ui-cor-texto-secundario, #888899);font-variant-numeric:tabular-nums}.ui-area-texto__contador[hidden]{display:none}.ui-area-texto__contador--aviso{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-area-texto__contador--excedido{color:var(--ui-cor-texto-erro, #ff5555);font-weight:600}.ui-area-texto__anuncio{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@media (max-width: 640px),(pointer: coarse) and (max-width: 1024px){.ui-area-texto__input{font-size:16px}.ui-area-texto__label{font-size:13px}}@media (prefers-reduced-motion: reduce){.ui-area-texto__wrapper{transition:none}}:host(.squarecircle) .ui-area-texto__wrapper,:host(.squarecircles) .ui-area-texto__wrapper,:host(.ui-squarecircle) .ui-area-texto__wrapper,:host(.ui-squarecircles) .ui-area-texto__wrapper,:host([formato="squarecircle"]) .ui-area-texto__wrapper,:host([formato="squarecircles"]) .ui-area-texto__wrapper,:host([formato="squircle"]) .ui-area-texto__wrapper{border-radius:var(--ui-raio-lg, 10px)}:host(.degrade),:host(.ui-degrade),:host(.gradiente),:host(.ui-gradiente),:host([degrade]:not([degrade="false"]):not([degrade="none"]):not([degrade="0"]):not([degrade="off"])),:host([gradiente]:not([gradiente="false"]):not([gradiente="none"]):not([gradiente="0"]):not([gradiente="off"])),:host([gradient]:not([gradient="false"]):not([gradient="none"]):not([gradient="0"]):not([gradient="off"])){--ui-fundo-elevado: var(--ui-gradiente-elevado);--ui-fundo-card: var(--ui-gradiente-card)}:host([variante="linha"]) .ui-area-texto__wrapper,:host([variante="sublinhado"]) .ui-area-texto__wrapper,:host([variante="underline"]) .ui-area-texto__wrapper{background:transparent!important;border:none;border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:0;box-shadow:none}:host([variante="linha"]) .ui-area-texto__wrapper:focus-within,:host([variante="sublinhado"]) .ui-area-texto__wrapper:focus-within,:host([variante="underline"]) .ui-area-texto__wrapper:focus-within{border-bottom-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 1px 0 0 var(--ui-cor-primaria, #00E08A)}:host([variante="linha"]) .ui-area-texto__wrapper--erro,:host([variante="sublinhado"]) .ui-area-texto__wrapper--erro,:host([variante="underline"]) .ui-area-texto__wrapper--erro{border-bottom-color:var(--ui-cor-texto-erro, #ff5555)!important;box-shadow:0 1px 0 0 var(--ui-cor-texto-erro, #ff5555)!important}:host([variante="linha"]) .ui-area-texto__wrapper--disabled,:host([variante="sublinhado"]) .ui-area-texto__wrapper--disabled,:host([variante="underline"]) .ui-area-texto__wrapper--disabled{background:transparent!important}', F = [
|
|
10
10
|
"label",
|
|
11
11
|
"placeholder",
|
|
12
12
|
"value",
|
|
@@ -81,7 +81,7 @@ const N = ["nenhum", "vertical", "horizontal", "ambos"], U = {
|
|
|
81
81
|
horizontal: "horizontal",
|
|
82
82
|
ambos: "both"
|
|
83
83
|
}, K = ["normal", "aviso", "excedido"], j = 4, G = 50, W = 200;
|
|
84
|
-
class
|
|
84
|
+
class A extends m {
|
|
85
85
|
constructor() {
|
|
86
86
|
super();
|
|
87
87
|
s(this, "labelElement");
|
|
@@ -236,11 +236,11 @@ class k extends m {
|
|
|
236
236
|
sincronizarRotulo() {
|
|
237
237
|
const t = this.getAttribute("label");
|
|
238
238
|
if (t) {
|
|
239
|
-
|
|
239
|
+
y(this.labelElement, t, this.required, "ui-area-texto__asterisco"), this.labelElement.style.display = "flex", this.textareaElement.removeAttribute("aria-label");
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
this.labelElement.style.display = "none";
|
|
243
|
-
const e =
|
|
243
|
+
const e = w(this, this.internals);
|
|
244
244
|
e ? this.textareaElement.setAttribute("aria-label", e) : this.textareaElement.removeAttribute("aria-label");
|
|
245
245
|
}
|
|
246
246
|
sincronizarLimites() {
|
|
@@ -286,9 +286,9 @@ class k extends m {
|
|
|
286
286
|
), this.dispatchEvent(new Event(e, { bubbles: !0, composed: !0 }));
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
class X extends
|
|
289
|
+
class X extends A {
|
|
290
290
|
}
|
|
291
|
-
c("ui-area-texto",
|
|
291
|
+
c("ui-area-texto", A);
|
|
292
292
|
c("ui-textarea", X);
|
|
293
293
|
class Y {
|
|
294
294
|
constructor(a, t, e) {
|
|
@@ -406,7 +406,7 @@ function tt() {
|
|
|
406
406
|
</div>
|
|
407
407
|
`;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function E(o, a, t) {
|
|
410
410
|
o.innerHTML = "", a.forEach((e) => {
|
|
411
411
|
const i = document.createElement("li"), r = String(e.id) === String(t);
|
|
412
412
|
i.className = `ui-lista-flutuante__item ${r ? "ui-lista-flutuante__item--selecionado" : ""}`, i.setAttribute("data-id", e.id), i.textContent = e.label, i.role = "option", i.tabIndex = -1, i.setAttribute("part", r ? "opcao opcao-selecionada" : "opcao"), r && i.setAttribute("aria-selected", "true"), o.appendChild(i);
|
|
@@ -418,7 +418,7 @@ function et(o, a) {
|
|
|
418
418
|
V(e, "opcao-selecionada", i === String(a)), i === String(a) ? (e.classList.add("ui-lista-flutuante__item--selecionado"), e.setAttribute("aria-selected", "true")) : (e.classList.remove("ui-lista-flutuante__item--selecionado"), e.removeAttribute("aria-selected"));
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
|
-
class
|
|
421
|
+
class k extends m {
|
|
422
422
|
constructor() {
|
|
423
423
|
super();
|
|
424
424
|
s(this, "labelElement");
|
|
@@ -512,7 +512,7 @@ class w extends m {
|
|
|
512
512
|
};
|
|
513
513
|
});
|
|
514
514
|
const e = t.findIndex((i) => i.hasAttribute("selected"));
|
|
515
|
-
e >= 0 && !this.hasAttribute("value") && (this.value = this._itens[e].id),
|
|
515
|
+
e >= 0 && !this.hasAttribute("value") && (this.value = this._itens[e].id), E(this.listElement, this._itens, this._value), this.syncLabel();
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
disconnectedCallback() {
|
|
@@ -579,7 +579,7 @@ class w extends m {
|
|
|
579
579
|
return this._itens;
|
|
580
580
|
}
|
|
581
581
|
set itens(t) {
|
|
582
|
-
this._itens = t || [],
|
|
582
|
+
this._itens = t || [], E(this.listElement, this._itens, this._value), this.syncLabel();
|
|
583
583
|
}
|
|
584
584
|
abrir() {
|
|
585
585
|
this.disabled || this.hasAttribute("aberta") || (this.setAttribute("aberta", ""), this.posicionamento.posicionar(), this.posicionamento.ativarAcompanhamento(this.fechar));
|
|
@@ -587,7 +587,7 @@ class w extends m {
|
|
|
587
587
|
syncLabel() {
|
|
588
588
|
const t = this.getAttribute("label") || this.getAttribute("rotulo");
|
|
589
589
|
if (t)
|
|
590
|
-
|
|
590
|
+
y(this.labelElement, t, this.required, "ui-lista-flutuante__asterisco"), this.labelElement.style.display = "block", this.sheetTituloElement.textContent = t, this.button.setAttribute("aria-labelledby", `${this.idsAcessibilidade.label} ${this.idsAcessibilidade.texto}`), this.content.setAttribute("aria-labelledby", this.idsAcessibilidade.label), this.button.removeAttribute("aria-label"), this.content.removeAttribute("aria-label");
|
|
591
591
|
else {
|
|
592
592
|
this.labelElement.style.display = "none", this.sincronizarRotuloExterno();
|
|
593
593
|
const i = this.getAttribute("texto-padrao") || this.getAttribute("placeholder") || "Opções";
|
|
@@ -604,7 +604,7 @@ class w extends m {
|
|
|
604
604
|
/** Sem o atributo `label`, usa o rótulo de fora do Shadow DOM (aria-label, <label for>, <label> envolvente). */
|
|
605
605
|
sincronizarRotuloExterno() {
|
|
606
606
|
this.button.removeAttribute("aria-labelledby"), this.content.removeAttribute("aria-labelledby");
|
|
607
|
-
const t =
|
|
607
|
+
const t = w(this, this.internals);
|
|
608
608
|
t ? (this.button.setAttribute("aria-labelledby", `${this.idsAcessibilidade.gatilho} ${this.idsAcessibilidade.texto}`), this.button.setAttribute("aria-label", t), this.content.setAttribute("aria-label", t)) : (this.button.removeAttribute("aria-label"), this.content.removeAttribute("aria-label"));
|
|
609
609
|
}
|
|
610
610
|
syncState() {
|
|
@@ -632,9 +632,9 @@ class w extends m {
|
|
|
632
632
|
);
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
class it extends
|
|
635
|
+
class it extends k {
|
|
636
636
|
}
|
|
637
|
-
c("ui-lista-flutuante",
|
|
637
|
+
c("ui-lista-flutuante", k);
|
|
638
638
|
c("ui-select", it);
|
|
639
639
|
const at = ':host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);vertical-align:middle}.ui-checkbox{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:1;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-checkbox--disabled{opacity:.5;cursor:not-allowed!important;pointer-events:none}.ui-checkbox__box{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;min-width:16px;min-height:16px;background:var(--ui-checkbox-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, #1a1a1e)));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .16));border-radius:var(--ui-raio-sm, 4px);box-sizing:border-box;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;flex-shrink:0}.ui-checkbox:focus-visible .ui-checkbox__box,.ui-checkbox--foco .ui-checkbox__box{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-checkbox--checked .ui-checkbox__box,.ui-checkbox--indeterminate .ui-checkbox__box{background:var(--ui-degrade-interno, var(--ui-checkbox-ativo-fundo, var(--ui-fundo-primario, var(--ui-cor-primaria, #00E08A))));border-color:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-checkbox__mark{width:12px;height:12px;display:flex;align-items:center;justify-content:center;transition:transform .15s cubic-bezier(.4,0,.2,1),opacity .15s ease;transform:scale(0);opacity:0}.ui-checkbox--checked .ui-checkbox__mark,.ui-checkbox--indeterminate .ui-checkbox__mark{transform:scale(1);opacity:1}.ui-checkbox__mark svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;shape-rendering:geometricPrecision}.ui-checkbox__label{display:inline-flex;align-items:center;font-size:clamp(11px,.85rem,14px);color:var(--ui-cor-texto, #e1e1e6);line-height:1}.ui-checkbox--label-esquerda{flex-direction:row-reverse}@media (max-width: 640px){.ui-checkbox{min-height:40px;padding:4px 0}.ui-checkbox__box{width:20px;height:20px;min-width:20px;min-height:20px}.ui-checkbox__mark{width:14px;height:14px}.ui-checkbox__label{font-size:14px}}:host(.squarecircle) .ui-checkbox__box,:host(.squarecircles) .ui-checkbox__box,:host(.ui-squarecircle) .ui-checkbox__box,:host(.ui-squarecircles) .ui-checkbox__box,:host([formato="squarecircle"]) .ui-checkbox__box,:host([formato="squarecircles"]) .ui-checkbox__box,:host([formato="squircle"]) .ui-checkbox__box{border-radius:var(--ui-raio-squircle, 24%)}:host(.degrade),:host(.ui-degrade),:host(.gradiente),:host(.ui-gradiente),:host([degrade]:not([degrade="false"]):not([degrade="none"]):not([degrade="0"]):not([degrade="off"])),:host([gradiente]:not([gradiente="false"]):not([gradiente="none"]):not([gradiente="0"]):not([gradiente="off"])),:host([gradient]:not([gradient="false"]):not([gradient="none"]):not([gradient="0"]):not([gradient="off"])){--ui-fundo-elevado: var(--ui-gradiente-elevado);--ui-fundo-primario: var(--ui-gradiente-primario)}';
|
|
640
640
|
class st extends m {
|
|
@@ -1190,11 +1190,11 @@ export {
|
|
|
1190
1190
|
J as ListaFlutuanteTeclado,
|
|
1191
1191
|
l as RadioGrupoRegistry,
|
|
1192
1192
|
pt as SELETOR_CAMPOS_PADRAO,
|
|
1193
|
-
|
|
1193
|
+
A as UIAreaTexto,
|
|
1194
1194
|
It as UICampoTexto,
|
|
1195
1195
|
st as UICheckbox,
|
|
1196
1196
|
qt as UIInput,
|
|
1197
|
-
|
|
1197
|
+
k as UIListaFlutuante,
|
|
1198
1198
|
ot as UIRadio,
|
|
1199
1199
|
it as UISelect,
|
|
1200
1200
|
S as UISwitch,
|
|
@@ -1209,13 +1209,13 @@ export {
|
|
|
1209
1209
|
xt as definirValorCampo,
|
|
1210
1210
|
vt as ehCampoMarcavel,
|
|
1211
1211
|
_t as lerValorCampo,
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1212
|
+
Et as ligarAtalhosFormulario,
|
|
1213
|
+
yt as limparErros,
|
|
1214
|
+
wt as listarCampos,
|
|
1215
|
+
At as localizarCampo,
|
|
1216
|
+
kt as observarLimpezaDeErros,
|
|
1217
1217
|
St as preencherCampos,
|
|
1218
|
-
|
|
1218
|
+
E as renderizarItensLista,
|
|
1219
1219
|
T as sincronizarFeedbackErro,
|
|
1220
1220
|
Vt as sincronizarIconeSenha,
|
|
1221
1221
|
Rt as sincronizarLabelEPlaceholder,
|
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
var W = Object.defineProperty;
|
|
2
|
+
var tt = (t, n, o) => n in t ? W(t, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[n] = o;
|
|
3
|
+
var f = (t, n, o) => tt(t, typeof n != "symbol" ? n + "" : n, o);
|
|
4
|
+
import { l as nt, p as V, b as ot } from "./feature_metricas-DGfd21VR.js";
|
|
5
|
+
const y = 16, it = 256;
|
|
6
|
+
function T(t, n) {
|
|
7
|
+
const [[o, i], [a, e]] = nt(t.geometria, n);
|
|
8
|
+
return { minLon: i, minLat: o, maxLon: e, maxLat: a };
|
|
9
|
+
}
|
|
10
|
+
function I(t, n) {
|
|
11
|
+
return t.minLon <= n.maxLon && t.maxLon >= n.minLon && t.minLat <= n.maxLat && t.maxLat >= n.minLat;
|
|
12
|
+
}
|
|
13
|
+
function j(t) {
|
|
14
|
+
let n = 1 / 0, o = 1 / 0, i = -1 / 0, a = -1 / 0;
|
|
15
|
+
for (const e of t)
|
|
16
|
+
e.minLon < n && (n = e.minLon), e.minLat < o && (o = e.minLat), e.maxLon > i && (i = e.maxLon), e.maxLat > a && (a = e.maxLat);
|
|
17
|
+
return { minLon: n, minLat: o, maxLon: i, maxLat: a };
|
|
18
|
+
}
|
|
19
|
+
function O(t) {
|
|
20
|
+
const n = t.length, o = Math.ceil(n / y), a = Math.ceil(Math.sqrt(o)) * y, e = [...t].sort((r, c) => r.minLon + r.maxLon - (c.minLon + c.maxLon)), s = [];
|
|
21
|
+
for (let r = 0; r < n; r += a) {
|
|
22
|
+
const c = e.slice(r, r + a).sort((u, d) => u.minLat + u.maxLat - (d.minLat + d.maxLat));
|
|
23
|
+
for (let u = 0; u < c.length; u += y) s.push(c.slice(u, u + y));
|
|
24
|
+
}
|
|
25
|
+
return s;
|
|
26
|
+
}
|
|
27
|
+
function at(t) {
|
|
28
|
+
if (t.length === 0) return null;
|
|
29
|
+
let n = O(t).map((o) => ({ ...j(o), folhas: o }));
|
|
30
|
+
for (; n.length > 1; )
|
|
31
|
+
n = O(n).map((o) => ({ ...j(o), filhos: o }));
|
|
32
|
+
return n[0];
|
|
33
|
+
}
|
|
34
|
+
class Dt {
|
|
35
|
+
/** `espaco` define o envelope do círculo (sem ele, o geográfico de sempre). */
|
|
36
|
+
constructor(n) {
|
|
37
|
+
f(this, "raiz", null);
|
|
38
|
+
/** Itens vivos: a fonte da verdade (a árvore pode conter itens já removidos/atualizados). */
|
|
39
|
+
f(this, "itens", /* @__PURE__ */ new Map());
|
|
40
|
+
/** Itens que entraram ou mudaram depois da última montagem. */
|
|
41
|
+
f(this, "delta", /* @__PURE__ */ new Map());
|
|
42
|
+
/** Ids que estão na árvore mas foram removidos ou substituídos. */
|
|
43
|
+
f(this, "obsoletos", /* @__PURE__ */ new Set());
|
|
44
|
+
this.espaco = n;
|
|
45
|
+
}
|
|
46
|
+
get tamanho() {
|
|
47
|
+
return this.itens.size;
|
|
48
|
+
}
|
|
49
|
+
construir(n) {
|
|
50
|
+
this.itens.clear();
|
|
51
|
+
for (const o of n)
|
|
52
|
+
o.excluida || this.itens.set(o.id, { id: o.id, ...T(o, this.espaco) });
|
|
53
|
+
this.remontar();
|
|
54
|
+
}
|
|
55
|
+
inserir(n) {
|
|
56
|
+
this.atualizar(n);
|
|
57
|
+
}
|
|
58
|
+
/** Insere ou substitui; feição `excluida` sai do índice. */
|
|
59
|
+
atualizar(n) {
|
|
60
|
+
if (n.excluida) {
|
|
61
|
+
this.remover(n.id);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const o = { id: n.id, ...T(n, this.espaco) };
|
|
65
|
+
this.itens.has(n.id) && this.obsoletos.add(n.id), this.itens.set(n.id, o), this.delta.set(n.id, o), this.compactarSeNecessario();
|
|
66
|
+
}
|
|
67
|
+
remover(n) {
|
|
68
|
+
this.itens.delete(n) && (this.obsoletos.add(n), this.delta.delete(n), this.compactarSeNecessario());
|
|
69
|
+
}
|
|
70
|
+
limpar() {
|
|
71
|
+
this.itens.clear(), this.remontar();
|
|
72
|
+
}
|
|
73
|
+
/** Ids das feições cujo envelope toca `caixa`. */
|
|
74
|
+
consultar(n) {
|
|
75
|
+
const o = [], i = this.raiz ? [this.raiz] : [];
|
|
76
|
+
for (; i.length > 0; ) {
|
|
77
|
+
const a = i.pop();
|
|
78
|
+
if (I(a, n))
|
|
79
|
+
if (a.folhas)
|
|
80
|
+
for (const e of a.folhas)
|
|
81
|
+
!this.obsoletos.has(e.id) && I(e, n) && o.push(e.id);
|
|
82
|
+
else a.filhos && i.push(...a.filhos);
|
|
83
|
+
}
|
|
84
|
+
for (const a of this.delta.values()) I(a, n) && o.push(a.id);
|
|
85
|
+
return o;
|
|
86
|
+
}
|
|
87
|
+
intersecta(n) {
|
|
88
|
+
return this.consultar(n).length > 0;
|
|
89
|
+
}
|
|
90
|
+
/** Envelope da feição indexada, se houver. */
|
|
91
|
+
caixaDe(n) {
|
|
92
|
+
return this.itens.get(n);
|
|
93
|
+
}
|
|
94
|
+
compactarSeNecessario() {
|
|
95
|
+
this.delta.size + this.obsoletos.size > Math.max(it, this.itens.size * 0.1) && this.remontar();
|
|
96
|
+
}
|
|
97
|
+
remontar() {
|
|
98
|
+
this.raiz = at([...this.itens.values()]), this.delta.clear(), this.obsoletos.clear();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const et = 17, rt = 9, st = 1.2;
|
|
102
|
+
function ct(t) {
|
|
103
|
+
return !Number.isFinite(t) || t >= et ? 0 : 360 / (256 * 2 ** t) * st;
|
|
104
|
+
}
|
|
105
|
+
function E(t) {
|
|
106
|
+
return Number.isFinite(t) ? 1 / Math.max(0.05, Math.cos(Math.max(-85, Math.min(85, t)) * Math.PI / 180)) : 1;
|
|
107
|
+
}
|
|
108
|
+
function ut(t, n, o, i) {
|
|
109
|
+
const a = o[1] - n[1], e = (o[0] - n[0]) * i, s = a * a + e * e, r = (t[0] - n[0]) * i;
|
|
110
|
+
let c = s === 0 ? 0 : ((t[1] - n[1]) * a + r * e) / s;
|
|
111
|
+
return c = Math.max(0, Math.min(1, c)), Math.hypot(t[1] - (n[1] + c * a), r - c * e);
|
|
112
|
+
}
|
|
113
|
+
function q(t, n, o = 1) {
|
|
114
|
+
if (!(n > 0) || t.length < 3) return t;
|
|
115
|
+
const i = Number.isFinite(o) && o > 0 ? o : 1, a = new Uint8Array(t.length);
|
|
116
|
+
a[0] = 1, a[t.length - 1] = 1;
|
|
117
|
+
const e = [[0, t.length - 1]];
|
|
118
|
+
for (; e.length > 0; ) {
|
|
119
|
+
const [s, r] = e.pop();
|
|
120
|
+
let c = 0, u = -1;
|
|
121
|
+
for (let d = s + 1; d < r; d++) {
|
|
122
|
+
const l = ut(t[d], t[s], t[r], i);
|
|
123
|
+
l > c && (c = l, u = d);
|
|
124
|
+
}
|
|
125
|
+
u !== -1 && c > n && (a[u] = 1, e.push([s, u], [u, r]));
|
|
126
|
+
}
|
|
127
|
+
return t.filter((s, r) => a[r] === 1);
|
|
128
|
+
}
|
|
129
|
+
function dt(t, n, o = 1) {
|
|
130
|
+
if (!(n > 0) || t.length < 4) return t;
|
|
131
|
+
const i = [...t, t[0]], a = q(i, n, o);
|
|
132
|
+
return a.pop(), a.length >= 3 ? a : t;
|
|
133
|
+
}
|
|
134
|
+
function ht(t) {
|
|
135
|
+
return (t.tipo === "LineString" || t.tipo === "Polygon") && t.curva ? 0 : t.tipo === "LineString" ? V(t).reduce((n, o) => n + o.length, 0) : t.tipo === "Polygon" ? t.aneis.reduce((n, o) => n + o.length, 0) : 0;
|
|
136
|
+
}
|
|
137
|
+
function _t(t, n) {
|
|
138
|
+
var i, a, e, s;
|
|
139
|
+
const o = ct(n);
|
|
140
|
+
if (o === 0 || ht(t) < rt) return t;
|
|
141
|
+
if (t.tipo === "LineString") {
|
|
142
|
+
const r = V(t), c = E(((a = (i = r[0]) == null ? void 0 : i[0]) == null ? void 0 : a[0]) ?? NaN);
|
|
143
|
+
return ot(r.map((u) => q(u, o, c)));
|
|
144
|
+
}
|
|
145
|
+
if (t.tipo === "Polygon") {
|
|
146
|
+
const r = E(((s = (e = t.aneis[0]) == null ? void 0 : e[0]) == null ? void 0 : s[0]) ?? NaN);
|
|
147
|
+
return { tipo: "Polygon", aneis: t.aneis.map((c) => dt(c, o, r)) };
|
|
148
|
+
}
|
|
149
|
+
return t;
|
|
150
|
+
}
|
|
151
|
+
const lt = /* @__PURE__ */ new Set(["previa", "prévia", "preview", "rascunho", "draft", "proposta"]);
|
|
152
|
+
function b(t) {
|
|
153
|
+
var o, i;
|
|
154
|
+
const n = [t.status, (o = t.propriedades) == null ? void 0 : o.status, (i = t.propriedades) == null ? void 0 : i.tipo_geometria];
|
|
155
|
+
for (const a of n)
|
|
156
|
+
if (typeof a == "string" && lt.has(a.trim().toLowerCase())) return "previa";
|
|
157
|
+
return "oficial";
|
|
158
|
+
}
|
|
159
|
+
function x(t) {
|
|
160
|
+
var o;
|
|
161
|
+
const n = t.entidadeId ?? ((o = t.propriedades) == null ? void 0 : o.entidadeId);
|
|
162
|
+
return typeof n == "string" || typeof n == "number" ? String(n) : t.id;
|
|
163
|
+
}
|
|
164
|
+
const P = (t, n) => `${t}\0${n}`;
|
|
165
|
+
class wt {
|
|
166
|
+
constructor() {
|
|
167
|
+
/** Mostra as prévias de todas as entidades. */
|
|
168
|
+
f(this, "global", !1);
|
|
169
|
+
f(this, "individuais", /* @__PURE__ */ new Set());
|
|
170
|
+
}
|
|
171
|
+
alternarIndividual(n, o) {
|
|
172
|
+
const i = P(n, o);
|
|
173
|
+
return this.individuais.has(i) ? this.individuais.delete(i) : this.individuais.add(i), this.individuais.has(i);
|
|
174
|
+
}
|
|
175
|
+
definirIndividual(n, o, i) {
|
|
176
|
+
const a = P(n, o);
|
|
177
|
+
i ? this.individuais.add(a) : this.individuais.delete(a);
|
|
178
|
+
}
|
|
179
|
+
individualAtiva(n, o) {
|
|
180
|
+
return this.individuais.has(P(n, o));
|
|
181
|
+
}
|
|
182
|
+
/** Entidades da camada que têm geometria oficial. */
|
|
183
|
+
static oficiais(n) {
|
|
184
|
+
const o = /* @__PURE__ */ new Set();
|
|
185
|
+
for (const i of n) !i.excluida && b(i) === "oficial" && o.add(x(i));
|
|
186
|
+
return o;
|
|
187
|
+
}
|
|
188
|
+
/** A feição aparece? `comOficial` = entidades da camada com geometria oficial (ver `oficiais`). */
|
|
189
|
+
visivel(n, o) {
|
|
190
|
+
if (b(n) === "oficial") return !0;
|
|
191
|
+
const i = x(n);
|
|
192
|
+
return this.global || !o.has(i) || this.individualAtiva(n.camadaId, i);
|
|
193
|
+
}
|
|
194
|
+
/** A prévia está sendo mostrada por pedido (global ou individual), e não só por falta de oficial? */
|
|
195
|
+
previaSolicitada(n) {
|
|
196
|
+
return this.global || this.individualAtiva(n.camadaId, x(n));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
const G = /* @__PURE__ */ new Set(["simetrico", "suave", "livre"]), D = 1e-6;
|
|
200
|
+
function Ft(t) {
|
|
201
|
+
if (!t.entrada && !t.saida) return "canto";
|
|
202
|
+
if (t.modo && G.has(t.modo)) return t.modo;
|
|
203
|
+
if (!t.entrada || !t.saida) return "simetrico";
|
|
204
|
+
const n = t.ponto[0] - t.entrada[0], o = t.ponto[1] - t.entrada[1], i = t.saida[0] - t.ponto[0], a = t.saida[1] - t.ponto[1], e = Math.hypot(n, o), s = Math.hypot(i, a);
|
|
205
|
+
return e === 0 || s === 0 || !(Math.abs(n * a - o * i) <= D * e * s && n * i + o * a > 0) ? "livre" : Math.abs(e - s) <= D * Math.max(e, s) ? "simetrico" : "suave";
|
|
206
|
+
}
|
|
207
|
+
const ft = 24, pt = 2, _ = (t) => typeof t == "number" && Number.isFinite(t), S = (t) => Array.isArray(t) && t.length === 2 && _(t[0]) && _(t[1]);
|
|
208
|
+
function Rt(t, n) {
|
|
209
|
+
return [2 * t[0] - n[0], 2 * t[1] - n[1]];
|
|
210
|
+
}
|
|
211
|
+
function mt(t) {
|
|
212
|
+
return t.some((n) => n.entrada !== void 0 || n.saida !== void 0);
|
|
213
|
+
}
|
|
214
|
+
function H(t, n) {
|
|
215
|
+
return [t.saida ?? t.ponto, n.entrada ?? n.ponto];
|
|
216
|
+
}
|
|
217
|
+
function X(t, n) {
|
|
218
|
+
const o = [];
|
|
219
|
+
for (let i = 0; i < t - 1; i++) o.push([i, i + 1]);
|
|
220
|
+
return n && t > 2 && o.push([t - 1, 0]), o;
|
|
221
|
+
}
|
|
222
|
+
function Lt(t, n, o, i, a) {
|
|
223
|
+
const e = 1 - a, s = e * e * e, r = 3 * e * e * a, c = 3 * e * a * a, u = a * a * a;
|
|
224
|
+
return [s * t[0] + r * n[0] + c * o[0] + u * i[0], s * t[1] + r * n[1] + c * o[1] + u * i[1]];
|
|
225
|
+
}
|
|
226
|
+
function $t(t, n = !1, o = ft) {
|
|
227
|
+
if (t.length === 0) return [];
|
|
228
|
+
const i = [[t[0].ponto[0], t[0].ponto[1]]];
|
|
229
|
+
for (const [a, e] of X(t.length, n)) {
|
|
230
|
+
const s = t[a], r = t[e];
|
|
231
|
+
if (!(s.saida === void 0 && r.entrada === void 0)) {
|
|
232
|
+
const [u, d] = H(s, r);
|
|
233
|
+
for (let l = 1; l < o; l++) i.push(Lt(s.ponto, u, d, r.ponto, l / o));
|
|
234
|
+
}
|
|
235
|
+
e !== 0 && i.push([r.ponto[0], r.ponto[1]]);
|
|
236
|
+
}
|
|
237
|
+
return i;
|
|
238
|
+
}
|
|
239
|
+
function Mt(t, n) {
|
|
240
|
+
if (t.length === 0) return [];
|
|
241
|
+
const o = [{ cmd: "M", pts: [t[0].ponto] }];
|
|
242
|
+
for (const [i, a] of X(t.length, n)) {
|
|
243
|
+
const e = t[i], s = t[a];
|
|
244
|
+
if (e.saida === void 0 && s.entrada === void 0)
|
|
245
|
+
o.push({ cmd: "L", pts: [s.ponto] });
|
|
246
|
+
else {
|
|
247
|
+
const [r, c] = H(e, s);
|
|
248
|
+
o.push({ cmd: "C", pts: [r, c, s.ponto] });
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return o;
|
|
252
|
+
}
|
|
253
|
+
function zt(t, n, o) {
|
|
254
|
+
const i = (e) => String(Math.round(e * 100) / 100), a = Mt(t, n).map((e) => e.cmd + e.pts.map((s) => {
|
|
255
|
+
const r = o(s);
|
|
256
|
+
return `${i(r.x)} ${i(r.y)}`;
|
|
257
|
+
}).join(" ")).join("");
|
|
258
|
+
return a && n ? `${a}Z` : a;
|
|
259
|
+
}
|
|
260
|
+
function Ut(t, n = pt) {
|
|
261
|
+
if (!Array.isArray(t) || t.length < n) return null;
|
|
262
|
+
const o = [];
|
|
263
|
+
for (const i of t) {
|
|
264
|
+
if (!i || typeof i != "object" || !S(i.ponto)) return null;
|
|
265
|
+
const a = i, e = { ponto: [a.ponto[0], a.ponto[1]] };
|
|
266
|
+
S(a.entrada) && (e.entrada = [a.entrada[0], a.entrada[1]]), S(a.saida) && (e.saida = [a.saida[0], a.saida[1]]), typeof a.modo == "string" && G.has(a.modo) && (e.entrada || e.saida) && (e.modo = a.modo), o.push(e);
|
|
267
|
+
}
|
|
268
|
+
return mt(o) ? o : null;
|
|
269
|
+
}
|
|
270
|
+
function kt(t, n) {
|
|
271
|
+
return t.map((o) => {
|
|
272
|
+
const i = { ponto: n(o.ponto) };
|
|
273
|
+
return o.entrada && (i.entrada = n(o.entrada)), o.saida && (i.saida = n(o.saida)), o.modo && (i.modo = o.modo), i;
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
function Vt(t) {
|
|
277
|
+
return t.tipo === "LineString" ? t.curva && t.curva.length >= 2 && !(t.partes && t.partes.length > 1) ? t.curva : null : t.tipo === "Polygon" && t.curva && t.curva.length >= 3 && t.aneis.length === 1 ? t.curva : null;
|
|
278
|
+
}
|
|
279
|
+
const vt = [
|
|
280
|
+
"continua",
|
|
281
|
+
"tracejada",
|
|
282
|
+
"tracejada-curta",
|
|
283
|
+
"tracejada-longa",
|
|
284
|
+
"pontilhada",
|
|
285
|
+
"traco-ponto",
|
|
286
|
+
"traco-ponto-ponto",
|
|
287
|
+
"oculta",
|
|
288
|
+
"centro",
|
|
289
|
+
"fantasma",
|
|
290
|
+
"divisa"
|
|
291
|
+
], At = {
|
|
292
|
+
tracejada: [12, 6],
|
|
293
|
+
"tracejada-curta": [6, 4],
|
|
294
|
+
"tracejada-longa": [24, 8],
|
|
295
|
+
pontilhada: [0, 4],
|
|
296
|
+
"traco-ponto": [12, 4, 0, 4],
|
|
297
|
+
"traco-ponto-ponto": [12, 4, 0, 4, 0, 4],
|
|
298
|
+
oculta: [6, 3],
|
|
299
|
+
centro: [24, 4, 6, 4],
|
|
300
|
+
fantasma: [24, 4, 6, 4, 6, 4],
|
|
301
|
+
divisa: [12, 4, 12, 4, 0, 4]
|
|
302
|
+
}, w = { arredondada: "round", reta: "butt", quadrada: "square" }, F = { arredondada: "round", chanfrada: "bevel", angular: "miter" }, yt = 0.05, gt = 100, R = {
|
|
303
|
+
continuous: "continua",
|
|
304
|
+
dashed: "tracejada",
|
|
305
|
+
dashed2: "tracejada-curta",
|
|
306
|
+
dashedx2: "tracejada-longa",
|
|
307
|
+
dot: "pontilhada",
|
|
308
|
+
dotted: "pontilhada",
|
|
309
|
+
dashdot: "traco-ponto",
|
|
310
|
+
divide: "traco-ponto-ponto",
|
|
311
|
+
hidden: "oculta",
|
|
312
|
+
center: "centro",
|
|
313
|
+
phantom: "fantasma",
|
|
314
|
+
border: "divisa"
|
|
315
|
+
};
|
|
316
|
+
function $(t) {
|
|
317
|
+
return typeof t == "string" && vt.includes(t);
|
|
318
|
+
}
|
|
319
|
+
function Z(t) {
|
|
320
|
+
if ($(t)) return t;
|
|
321
|
+
if (typeof t != "string") return;
|
|
322
|
+
const n = t.trim().toLowerCase();
|
|
323
|
+
return $(n) ? n : Object.prototype.hasOwnProperty.call(R, n) ? R[n] : void 0;
|
|
324
|
+
}
|
|
325
|
+
function z(t) {
|
|
326
|
+
return typeof t == "string" && Object.prototype.hasOwnProperty.call(w, t) ? w[t] : void 0;
|
|
327
|
+
}
|
|
328
|
+
function U(t) {
|
|
329
|
+
return typeof t == "string" && Object.prototype.hasOwnProperty.call(F, t) ? F[t] : void 0;
|
|
330
|
+
}
|
|
331
|
+
function It(t) {
|
|
332
|
+
return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? 1 : Math.min(gt, Math.max(yt, t));
|
|
333
|
+
}
|
|
334
|
+
function k(t, n, o = 1, i = "round") {
|
|
335
|
+
const a = Z(t);
|
|
336
|
+
if (!a || a === "continua") return;
|
|
337
|
+
const e = Number.isFinite(n) && n > 0 ? n : 1, s = It(o) * Math.max(1, e / 2), r = i === "butt" ? e : 0, c = i === "butt" ? 0 : e;
|
|
338
|
+
return At[a].map((u, d) => {
|
|
339
|
+
const l = d % 2 === 0 ? u === 0 ? r : u * s : u * s + c;
|
|
340
|
+
return Math.round(l * 100) / 100;
|
|
341
|
+
}).join(" ");
|
|
342
|
+
}
|
|
343
|
+
const xt = "#38bdf8", Pt = "#38bdf8", St = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\([0-9.,%\s\/-]+\)|[a-z]{3,20})$/i;
|
|
344
|
+
function C(t, n) {
|
|
345
|
+
return typeof t == "string" && St.test(t.trim()) ? t.trim() : n;
|
|
346
|
+
}
|
|
347
|
+
const p = (t) => typeof t == "number" && Number.isFinite(t);
|
|
348
|
+
function qt(t, n, o = !1) {
|
|
349
|
+
const i = t.estilo ?? {}, a = C(i.corTraco ?? n.corPrimaria, xt), e = t.geometria.tipo, s = e === "Polygon" || e === "Circle", r = e === "Point", c = r && C(i.corContorno, "") || a, u = r && p(i.espessuraContorno) && i.espessuraContorno >= 0 ? i.espessuraContorno : void 0, d = u ?? (p(i.espessuraTraco) ? i.espessuraTraco : void 0) ?? (p(n.espessuraLinha) ? n.espessuraLinha : 2), l = p(i.opacidadePreenchimento) ? i.opacidadePreenchimento : s ? 0.2 : 0.85, h = o ? d + 2 : d, m = z(i.terminacaoTraco) ?? z(n.terminacaoLinha) ?? "round", M = p(i.opacidadeTraco) ? i.opacidadeTraco : p(n.opacidadeLinha) ? n.opacidadeLinha : 1;
|
|
350
|
+
return {
|
|
351
|
+
cor: o ? Pt : c,
|
|
352
|
+
traco: !(u === 0 && !o),
|
|
353
|
+
peso: h,
|
|
354
|
+
dash: Ct(t, n, h, m),
|
|
355
|
+
// selecionada fica opaca: a seleção precisa aparecer mesmo numa linha quase transparente
|
|
356
|
+
opacidadeTraco: o ? 1 : Math.min(1, Math.max(0, M)),
|
|
357
|
+
terminacao: m,
|
|
358
|
+
juncao: U(i.juncaoTraco) ?? U(n.juncaoLinha) ?? "round",
|
|
359
|
+
deslocamentoDash: p(i.deslocamentoTracejado) ? i.deslocamentoTracejado : 0,
|
|
360
|
+
preencher: s || r,
|
|
361
|
+
corPreenchimento: C(i.corPreenchimento, a),
|
|
362
|
+
opacidadePreenchimento: o ? Math.min(1, l + 0.18) : l
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
function Ct(t, n, o, i) {
|
|
366
|
+
const a = t.estilo ?? {};
|
|
367
|
+
if (a.dashArray) return a.dashArray;
|
|
368
|
+
if (a.tipoLinha !== void 0 && a.tipoLinha !== null) {
|
|
369
|
+
const e = k(a.tipoLinha, o, a.escalaTipoLinha ?? n.escalaTipoLinha, i);
|
|
370
|
+
if (e || Z(a.tipoLinha) === "continua") return e;
|
|
371
|
+
}
|
|
372
|
+
return b(t) === "previa" ? "6 4" : n.dashArray ? n.dashArray : k(n.tipoLinha, o, n.escalaTipoLinha, i);
|
|
373
|
+
}
|
|
374
|
+
function Gt(t, n) {
|
|
375
|
+
var i;
|
|
376
|
+
const o = ((i = t.estilo) == null ? void 0 : i.tamanhoIcone) ?? n.tamanhoMarcador ?? 8;
|
|
377
|
+
return (p(o) && o > 0 ? o : 8) / 2;
|
|
378
|
+
}
|
|
379
|
+
class Ht {
|
|
380
|
+
constructor() {
|
|
381
|
+
f(this, "porChave", /* @__PURE__ */ new Map());
|
|
382
|
+
}
|
|
383
|
+
interno(n) {
|
|
384
|
+
const o = `${n.cor}|${n.traco ? 1 : 0}|${n.peso}|${n.dash ?? ""}|${n.opacidadeTraco ?? 1}|${n.terminacao ?? ""}|${n.juncao ?? ""}|${n.deslocamentoDash ?? 0}|${n.preencher ? 1 : 0}|${n.corPreenchimento}|${n.opacidadePreenchimento}`, i = this.porChave.get(o);
|
|
385
|
+
return i || (this.porChave.set(o, n), n);
|
|
386
|
+
}
|
|
387
|
+
limpar() {
|
|
388
|
+
this.porChave.clear();
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
const bt = 256, L = 85.0511287798, Nt = 4007501668557849e-8;
|
|
392
|
+
function B(t, n, o, i, a) {
|
|
393
|
+
const e = o > L ? L : o < -L ? -L : o, s = Math.sin(e * Math.PI / 180);
|
|
394
|
+
t[n] = (i + 180) / 360 * a, t[n + 1] = (0.5 - Math.log((1 + s) / (1 - s)) / (4 * Math.PI)) * a;
|
|
395
|
+
}
|
|
396
|
+
const g = (t) => bt * 2 ** t;
|
|
397
|
+
function Xt(t, n, o) {
|
|
398
|
+
const i = g(o);
|
|
399
|
+
return [Math.atan(Math.sinh(Math.PI * (1 - 2 * n / i))) * 180 / Math.PI, t / i * 360 - 180];
|
|
400
|
+
}
|
|
401
|
+
function Zt(t, n) {
|
|
402
|
+
const o = g(n), i = new Float64Array(t.length * 2);
|
|
403
|
+
for (let a = 0; a < t.length; a++) {
|
|
404
|
+
const e = t[a];
|
|
405
|
+
B(i, a * 2, e[0], e[1], o);
|
|
406
|
+
}
|
|
407
|
+
return i;
|
|
408
|
+
}
|
|
409
|
+
function Bt(t, n, o) {
|
|
410
|
+
const i = new Float64Array(2);
|
|
411
|
+
return B(i, 0, t, n, g(o)), i;
|
|
412
|
+
}
|
|
413
|
+
function Tt(t, n) {
|
|
414
|
+
const o = Math.max(-L, Math.min(L, t));
|
|
415
|
+
return Nt * Math.cos(o * Math.PI / 180) / g(n);
|
|
416
|
+
}
|
|
417
|
+
function Jt(t, n, o) {
|
|
418
|
+
const i = Tt(t, o), a = n / i;
|
|
419
|
+
return Number.isFinite(a) && a >= 0 ? a : 0;
|
|
420
|
+
}
|
|
421
|
+
function Qt(t) {
|
|
422
|
+
let n = 1 / 0, o = 1 / 0, i = -1 / 0, a = -1 / 0;
|
|
423
|
+
for (const e of t)
|
|
424
|
+
for (let s = 0; s + 1 < e.length; s += 2) {
|
|
425
|
+
const r = e[s], c = e[s + 1];
|
|
426
|
+
Number.isFinite(r) && Number.isFinite(c) && (r < n && (n = r), r > i && (i = r), c < o && (o = c), c > a && (a = c));
|
|
427
|
+
}
|
|
428
|
+
return n <= i && o <= a ? { minX: n, minY: o, maxX: i, maxY: a } : null;
|
|
429
|
+
}
|
|
430
|
+
function jt(t, n, o, i, a, e) {
|
|
431
|
+
const s = a - o, r = e - i, c = s * s + r * r;
|
|
432
|
+
let u = c === 0 ? 0 : ((t - o) * s + (n - i) * r) / c;
|
|
433
|
+
return u = u < 0 ? 0 : u > 1 ? 1 : u, Math.hypot(t - (o + u * s), n - (i + u * r));
|
|
434
|
+
}
|
|
435
|
+
function Yt(t, n, o) {
|
|
436
|
+
const i = t.length >> 1;
|
|
437
|
+
if (!(n > 0) || i < 3) return t;
|
|
438
|
+
let a = t, e = i;
|
|
439
|
+
o && (a = new Float64Array((i + 1) * 2), a.set(t), a[i * 2] = t[0], a[i * 2 + 1] = t[1], e = i + 1);
|
|
440
|
+
const s = new Uint8Array(e);
|
|
441
|
+
s[0] = 1, s[e - 1] = 1;
|
|
442
|
+
const r = [0, e - 1];
|
|
443
|
+
for (; r.length > 0; ) {
|
|
444
|
+
const h = r.pop(), m = r.pop();
|
|
445
|
+
let M = 0, v = -1;
|
|
446
|
+
const J = a[m * 2], Q = a[m * 2 + 1], Y = a[h * 2], K = a[h * 2 + 1];
|
|
447
|
+
for (let A = m + 1; A < h; A++) {
|
|
448
|
+
const N = jt(a[A * 2], a[A * 2 + 1], J, Q, Y, K);
|
|
449
|
+
N > M && (M = N, v = A);
|
|
450
|
+
}
|
|
451
|
+
v !== -1 && M > n && (s[v] = 1, r.push(m, v, v, h));
|
|
452
|
+
}
|
|
453
|
+
const c = o ? e - 1 : e;
|
|
454
|
+
let u = 0;
|
|
455
|
+
for (let h = 0; h < c; h++) s[h] && u++;
|
|
456
|
+
if (o && u < 3 || u === c) return t;
|
|
457
|
+
const d = new Float64Array(u * 2);
|
|
458
|
+
let l = 0;
|
|
459
|
+
for (let h = 0; h < c; h++)
|
|
460
|
+
s[h] && (d[l++] = a[h * 2], d[l++] = a[h * 2 + 1]);
|
|
461
|
+
return d;
|
|
462
|
+
}
|
|
463
|
+
export {
|
|
464
|
+
Qt as A,
|
|
465
|
+
k as B,
|
|
466
|
+
Pt as C,
|
|
467
|
+
jt as D,
|
|
468
|
+
$ as E,
|
|
469
|
+
g as F,
|
|
470
|
+
E as G,
|
|
471
|
+
It as H,
|
|
472
|
+
Dt as I,
|
|
473
|
+
Tt as J,
|
|
474
|
+
Bt as K,
|
|
475
|
+
B as L,
|
|
476
|
+
rt as M,
|
|
477
|
+
Zt as N,
|
|
478
|
+
Jt as O,
|
|
479
|
+
dt as P,
|
|
480
|
+
q as Q,
|
|
481
|
+
wt as R,
|
|
482
|
+
Yt as S,
|
|
483
|
+
vt as T,
|
|
484
|
+
ct as U,
|
|
485
|
+
et as Z,
|
|
486
|
+
$t as a,
|
|
487
|
+
Ft as b,
|
|
488
|
+
H as c,
|
|
489
|
+
C as d,
|
|
490
|
+
Rt as e,
|
|
491
|
+
Mt as f,
|
|
492
|
+
zt as g,
|
|
493
|
+
xt as h,
|
|
494
|
+
x as i,
|
|
495
|
+
_t as j,
|
|
496
|
+
I as k,
|
|
497
|
+
qt as l,
|
|
498
|
+
kt as m,
|
|
499
|
+
Vt as n,
|
|
500
|
+
Xt as o,
|
|
501
|
+
Lt as p,
|
|
502
|
+
Ut as q,
|
|
503
|
+
Gt as r,
|
|
504
|
+
b as s,
|
|
505
|
+
mt as t,
|
|
506
|
+
U as u,
|
|
507
|
+
ht as v,
|
|
508
|
+
z as w,
|
|
509
|
+
Z as x,
|
|
510
|
+
Ht as y,
|
|
511
|
+
T as z
|
|
512
|
+
};
|