@thibezer/ui-components-kit 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +499 -436
  2. package/README.md +2 -2
  3. package/dist/camadas.cjs +1 -1
  4. package/dist/camadas.js +1 -1
  5. package/dist/canvas.cjs +74 -74
  6. package/dist/canvas.js +3310 -2819
  7. package/dist/components/ui-canvas-cad/cad-feicoes-edicao.d.ts +13 -0
  8. package/dist/components/ui-canvas-cad/cad-feicoes-ponteiro.d.ts +8 -2
  9. package/dist/components/ui-canvas-cad/cad-feicoes-teclado.d.ts +19 -0
  10. package/dist/components/ui-canvas-cad/cad-feicoes-tipos.d.ts +1 -1
  11. package/dist/components/ui-canvas-cad/cad-feicoes.d.ts +12 -1
  12. package/dist/components/ui-canvas-cad/cad-ferramentas-barra.d.ts +8 -1
  13. package/dist/components/ui-canvas-cad/cad-linha-padrao.d.ts +27 -0
  14. package/dist/components/ui-canvas-cad/cad-snap.d.ts +2 -0
  15. package/dist/components/ui-canvas-cad/index.d.ts +2 -0
  16. package/dist/components/ui-canvas-cad/tipos.d.ts +25 -4
  17. package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +17 -1
  18. package/dist/components/ui-cores/cores-utils.d.ts +2 -0
  19. package/dist/components/ui-cores/tipos.d.ts +9 -2
  20. package/dist/components/ui-cores/ui-controle-cores.d.ts +9 -4
  21. package/dist/components/ui-cores/ui-seletor-cor.d.ts +12 -9
  22. package/dist/components/ui-tabela-propriedades/editores-basicos.d.ts +1 -1
  23. package/dist/components/ui-tabela-propriedades/propriedades-dom-utils.d.ts +5 -0
  24. package/dist/components/ui-tabela-propriedades/propriedades-gerenciador-valores.d.ts +3 -3
  25. package/dist/components/ui-tabela-propriedades/propriedades-valor-misto.d.ts +25 -0
  26. package/dist/components/ui-tabela-propriedades/tipos.d.ts +5 -0
  27. package/dist/components/ui-tabela-propriedades/ui-tabela-propriedades.d.ts +7 -0
  28. package/dist/cores.cjs +1 -1
  29. package/dist/cores.js +12 -11
  30. package/dist/custom-elements.json +5527 -4665
  31. package/dist/data.cjs +1 -1
  32. package/dist/data.js +72 -64
  33. package/dist/gerencigeo-canvas/feature_desenho.d.ts +2 -0
  34. package/dist/gerencigeo-canvas/feature_desenho_controle.d.ts +3 -0
  35. package/dist/gerencigeo-canvas/feature_editor_vertices.d.ts +51 -4
  36. package/dist/gerencigeo-canvas/feature_types.d.ts +17 -0
  37. package/dist/gerencigeo-canvas/motor/estilo.d.ts +8 -0
  38. package/dist/gerencigeo-canvas/motor/index.d.ts +1 -0
  39. package/dist/gerencigeo-canvas/motor/tipos-linha.d.ts +22 -0
  40. package/dist/gerencigeo-canvas/renderers/renderizador_formas.d.ts +2 -0
  41. package/dist/gerencigeo-canvas/types.d.ts +11 -0
  42. package/dist/index.cjs +1 -1
  43. package/dist/index.js +154 -145
  44. package/dist/motor-BCWqlv3e.cjs +1 -0
  45. package/dist/motor-CXjQjVba.js +1386 -0
  46. package/dist/motor.cjs +1 -1
  47. package/dist/motor.js +45 -38
  48. package/dist/register.cjs +1 -1
  49. package/dist/register.js +3 -3
  50. package/dist/tabela.cjs +1 -1
  51. package/dist/tabela.js +66 -58
  52. package/dist/tipos-elementos.d.ts +13 -0
  53. package/dist/tipos-vue.d.ts +11 -0
  54. package/dist/ui-controle-cores-CohlwXJK.cjs +32 -0
  55. package/dist/{ui-controle-cores-BEUKOq4n.js → ui-controle-cores-DMtTUtLk.js} +98 -81
  56. package/dist/ui-seletor-cor-D9iI7yew.js +413 -0
  57. package/dist/ui-seletor-cor-Ft06TEUH.cjs +110 -0
  58. package/dist/ui-tabela-propriedades-B8AwlpqL.cjs +141 -0
  59. package/dist/{ui-tabela-propriedades-DoL4SE0r.js → ui-tabela-propriedades-DuaC4sFX.js} +1295 -1195
  60. package/package.json +1 -1
  61. package/dist/motor-BB6tB6U-.cjs +0 -1
  62. package/dist/motor-CFI84lM2.js +0 -1301
  63. package/dist/ui-controle-cores-BLhrZHMh.cjs +0 -32
  64. package/dist/ui-seletor-cor-2yGryC_Z.cjs +0 -86
  65. package/dist/ui-seletor-cor-BuyhoDZz.js +0 -345
  66. package/dist/ui-tabela-propriedades-CjK2gG14.cjs +0 -141
@@ -1,55 +1,55 @@
1
- var he = Object.defineProperty;
2
- var me = (r, t, e) => t in r ? he(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var b = (r, t, e) => me(r, typeof t != "symbol" ? t + "" : t, e);
4
- import { L as I } from "./listener-bag-DQgv7OON.js";
5
- import { a as be } from "./parts-CaoQiCfI.js";
6
- import { d as ie, S as oe } from "./ssr-safe-5cWfJP-s.js";
7
- import { h as fe } from "./svg-seguro-ChVJ2L2z.js";
8
- class ge {
9
- constructor(t) {
1
+ var ve = Object.defineProperty;
2
+ var Ee = (t, r, e) => r in t ? ve(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
+ var b = (t, r, e) => Ee(t, typeof r != "symbol" ? r + "" : r, e);
4
+ import { L as P } from "./listener-bag-DQgv7OON.js";
5
+ import { a as ye } from "./parts-CaoQiCfI.js";
6
+ import { d as le, S as de } from "./ssr-safe-5cWfJP-s.js";
7
+ import { h as we } from "./svg-seguro-ChVJ2L2z.js";
8
+ class Ce {
9
+ constructor(r) {
10
10
  b(this, "autoFetchController", null);
11
11
  b(this, "emVoo", null);
12
- this.ctx = t;
12
+ this.ctx = r;
13
13
  }
14
14
  /**
15
15
  * Busca os dados. Resolve `true` em sucesso e `false` em falha, cancelamento ou requisição
16
16
  * substituída (nunca rejeita; o motivo da falha vai no evento `ui-fetch-erro`).
17
17
  * Uma chamada com a mesma URL de uma requisição em andamento reaproveita essa requisição.
18
18
  */
19
- carregar(t) {
20
- if (!t) return Promise.resolve(!1);
21
- if (this.emVoo && this.emVoo.url === t && this.autoFetchController) return this.emVoo.promessa;
19
+ carregar(r) {
20
+ if (!r) return Promise.resolve(!1);
21
+ if (this.emVoo && this.emVoo.url === r && this.autoFetchController) return this.emVoo.promessa;
22
22
  this.cancelarEmVoo();
23
23
  const e = new AbortController();
24
24
  this.autoFetchController = e;
25
- const i = this.executar(t, e);
26
- return this.emVoo = { url: t, promessa: i }, i;
25
+ const o = this.executar(r, e);
26
+ return this.emVoo = { url: r, promessa: o }, o;
27
27
  }
28
- emitir(t, e) {
29
- this.ctx.host.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0, detail: e }));
28
+ emitir(r, e) {
29
+ this.ctx.host.dispatchEvent(new CustomEvent(r, { bubbles: !0, composed: !0, detail: e }));
30
30
  }
31
- erro(t, e, i, o) {
31
+ erro(r, e, o, i) {
32
32
  const a = e instanceof Error ? e.message : String(e);
33
33
  console.error("[ui-tabela] Erro ao carregar dados remotos:", e);
34
- const n = { url: t, erro: a, origem: i };
35
- o !== void 0 && (n.status = o), this.emitir("ui-fetch-erro", n);
34
+ const n = { url: r, erro: a, origem: o };
35
+ i !== void 0 && (n.status = i), this.emitir("ui-fetch-erro", n);
36
36
  }
37
- async executar(t, e) {
38
- var s, d, c, l;
39
- const i = () => this.autoFetchController === e, o = () => {
37
+ async executar(r, e) {
38
+ var l, d, c, s;
39
+ const o = () => this.autoFetchController === e, i = () => {
40
40
  this.autoFetchController === e && (this.autoFetchController = null, this.emVoo = null);
41
41
  };
42
- this.ctx.onCarregandoAlterado(!0), this.emitir("ui-fetch-start", { url: t });
42
+ this.ctx.onCarregandoAlterado(!0), this.emitir("ui-fetch-start", { url: r });
43
43
  let a = "rede", n;
44
44
  try {
45
- const u = { ...((d = (s = this.ctx).getOpcoes) == null ? void 0 : d.call(s)) ?? {}, signal: e.signal }, h = await (((l = (c = this.ctx).getFetcher) == null ? void 0 : l.call(c)) ?? ((g, _) => fetch(g, _)))(t, u);
45
+ const u = { ...((d = (l = this.ctx).getOpcoes) == null ? void 0 : d.call(l)) ?? {}, signal: e.signal }, h = await (((s = (c = this.ctx).getFetcher) == null ? void 0 : s.call(c)) ?? ((g, v) => fetch(g, v)))(r, u);
46
46
  if (!h.ok)
47
47
  throw a = "http", n = h.status, new Error(`HTTP ${h.status}: ${h.statusText}`);
48
48
  a = "json";
49
49
  const m = await h.json(), x = Array.isArray(m) ? m : (m == null ? void 0 : m.dados) || (m == null ? void 0 : m.items) || (m == null ? void 0 : m.data) || (m == null ? void 0 : m.rows) || [], f = Array.isArray(x) ? x : [];
50
- return i() ? (a = "render", this.ctx.onDadosRecebidos(f), o(), this.ctx.onCarregandoAlterado(!1), this.emitir("ui-fetch-sucesso", { url: t, total: f.length, dados: f }), !0) : !1;
50
+ return o() ? (a = "render", this.ctx.onDadosRecebidos(f), i(), this.ctx.onCarregandoAlterado(!1), this.emitir("ui-fetch-sucesso", { url: r, total: f.length, dados: f }), !0) : !1;
51
51
  } catch (u) {
52
- return (u == null ? void 0 : u.name) === "AbortError" ? (i() && (o(), this.ctx.onCarregandoAlterado(!1)), this.emitir("ui-fetch-cancelado", { url: t }), !1) : (i() && (o(), this.ctx.onCarregandoAlterado(!1), this.erro(t, u, a, n)), !1);
52
+ return (u == null ? void 0 : u.name) === "AbortError" ? (o() && (i(), this.ctx.onCarregandoAlterado(!1)), this.emitir("ui-fetch-cancelado", { url: r }), !1) : (o() && (i(), this.ctx.onCarregandoAlterado(!1), this.erro(r, u, a, n)), !1);
53
53
  }
54
54
  }
55
55
  /** Cancela a requisição em andamento (se houver) e libera o indicador de carregamento. */
@@ -58,56 +58,56 @@ class ge {
58
58
  }
59
59
  cancelarEmVoo() {
60
60
  if (this.autoFetchController) {
61
- const t = this.autoFetchController;
62
- this.autoFetchController = null, this.emVoo = null, t.abort();
61
+ const r = this.autoFetchController;
62
+ this.autoFetchController = null, this.emVoo = null, r.abort();
63
63
  }
64
64
  }
65
65
  }
66
- const xe = ["id", "_id", "codigo", "key"];
67
- function ve(r, t) {
68
- return r != null && (r === t || String(r) === String(t));
66
+ const Ae = ["id", "_id", "codigo", "key"];
67
+ function ke(t, r) {
68
+ return t != null && (t === r || String(t) === String(r));
69
69
  }
70
- function Y(r, t) {
70
+ function J(t, r) {
71
71
  let e = -1;
72
- return typeof r == "number" && Number.isInteger(r) ? e = r : typeof r == "string" && /^\d+$/.test(r.trim()) && (e = parseInt(r.trim(), 10)), e >= 0 && e < t ? e : -1;
73
- }
74
- function _e(r, t, e = "id", i = !1) {
75
- if (!r || r.length === 0) return -1;
76
- if (typeof t == "function")
77
- return r.findIndex(t);
78
- if (i) return Y(t, r.length);
79
- const o = [e, ...xe.filter((a) => a !== e)];
80
- for (const a of o) {
81
- const n = r.findIndex((s) => !!s && typeof s == "object" && ve(s[a], t));
72
+ return typeof t == "number" && Number.isInteger(t) ? e = t : typeof t == "string" && /^\d+$/.test(t.trim()) && (e = parseInt(t.trim(), 10)), e >= 0 && e < r ? e : -1;
73
+ }
74
+ function ze(t, r, e = "id", o = !1) {
75
+ if (!t || t.length === 0) return -1;
76
+ if (typeof r == "function")
77
+ return t.findIndex(r);
78
+ if (o) return J(r, t.length);
79
+ const i = [e, ...Ae.filter((a) => a !== e)];
80
+ for (const a of i) {
81
+ const n = t.findIndex((l) => !!l && typeof l == "object" && ke(l[a], r));
82
82
  if (n !== -1) return n;
83
83
  }
84
- return Y(t, r.length);
84
+ return J(r, t.length);
85
85
  }
86
- class Ee {
87
- constructor(t) {
86
+ class Se {
87
+ constructor(r) {
88
88
  b(this, "itemSelecionado", null);
89
89
  b(this, "indiceSelecionado", null);
90
- this.ctx = t;
90
+ this.ctx = r;
91
91
  }
92
92
  /** Mesmo objeto ou mesmo valor na chave configurada. */
93
- indiceDoItem(t, e) {
94
- const i = this.ctx.getChaveId(), o = t.indexOf(e);
95
- return o >= 0 ? o : e[i] == null ? -1 : t.findIndex((a) => (a == null ? void 0 : a[i]) != null && String(a[i]) === String(e[i]));
93
+ indiceDoItem(r, e) {
94
+ const o = this.ctx.getChaveId(), i = r.indexOf(e);
95
+ return i >= 0 ? i : e[o] == null ? -1 : r.findIndex((a) => (a == null ? void 0 : a[o]) != null && String(a[o]) === String(e[o]));
96
96
  }
97
97
  getItemSelecionado() {
98
98
  return this.itemSelecionado;
99
99
  }
100
- setItemSelecionado(t) {
101
- this.itemSelecionado = t;
102
- const e = t ? this.indiceDoItem(this.ctx.getDadosExibicao(), t) : -1;
100
+ setItemSelecionado(r) {
101
+ this.itemSelecionado = r;
102
+ const e = r ? this.indiceDoItem(this.ctx.getDadosExibicao(), r) : -1;
103
103
  this.indiceSelecionado = e >= 0 ? e : null, this.atualizarLinhasSelecionadas();
104
104
  }
105
105
  getIndiceSelecionado() {
106
106
  return this.indiceSelecionado;
107
107
  }
108
- setIndiceSelecionado(t) {
109
- const e = this.ctx.getDadosExibicao(), i = t !== null && t >= 0 && t < e.length;
110
- this.indiceSelecionado = i ? t : null, this.itemSelecionado = i ? e[t] : null, this.atualizarLinhasSelecionadas();
108
+ setIndiceSelecionado(r) {
109
+ const e = this.ctx.getDadosExibicao(), o = r !== null && r >= 0 && r < e.length;
110
+ this.indiceSelecionado = o ? r : null, this.itemSelecionado = o ? e[r] : null, this.atualizarLinhasSelecionadas();
111
111
  }
112
112
  /**
113
113
  * Reaplica a seleção após ordenar, filtrar ou trocar os dados.
@@ -116,80 +116,80 @@ class Ee {
116
116
  * - Item removido dos dados: limpa a seleção e emite `ui-selecao-removida`.
117
117
  */
118
118
  reconciliar() {
119
- const t = this.itemSelecionado;
120
- if (!t) {
119
+ const r = this.itemSelecionado;
120
+ if (!r) {
121
121
  this.indiceSelecionado = null;
122
122
  return;
123
123
  }
124
- const e = this.ctx.getDadosExibicao(), i = this.indiceDoItem(e, t);
125
- if (i >= 0) {
126
- this.indiceSelecionado = i, this.substituirReferencia(t, e[i]);
124
+ const e = this.ctx.getDadosExibicao(), o = this.indiceDoItem(e, r);
125
+ if (o >= 0) {
126
+ this.indiceSelecionado = o, this.substituirReferencia(r, e[o]);
127
127
  return;
128
128
  }
129
129
  this.indiceSelecionado = null;
130
- const o = this.ctx.getDadosOriginais(), a = this.indiceDoItem(o, t);
130
+ const i = this.ctx.getDadosOriginais(), a = this.indiceDoItem(i, r);
131
131
  if (a >= 0) {
132
- this.substituirReferencia(t, o[a]);
132
+ this.substituirReferencia(r, i[a]);
133
133
  return;
134
134
  }
135
135
  this.itemSelecionado = null, this.ctx.host.dispatchEvent(
136
- new CustomEvent("ui-selecao-removida", { bubbles: !0, composed: !0, detail: { item: t } })
136
+ new CustomEvent("ui-selecao-removida", { bubbles: !0, composed: !0, detail: { item: r } })
137
137
  );
138
138
  }
139
139
  /** Mesmo registro com outro objeto (dados recarregados): atualiza a referência e avisa. */
140
- substituirReferencia(t, e) {
141
- this.itemSelecionado = e, t !== e && this.ctx.host.dispatchEvent(
142
- new CustomEvent("ui-selecao-atualizada", { bubbles: !0, composed: !0, detail: { item: e, anterior: t } })
140
+ substituirReferencia(r, e) {
141
+ this.itemSelecionado = e, r !== e && this.ctx.host.dispatchEvent(
142
+ new CustomEvent("ui-selecao-atualizada", { bubbles: !0, composed: !0, detail: { item: e, anterior: r } })
143
143
  );
144
144
  }
145
145
  limparSelecao() {
146
146
  this.itemSelecionado = null, this.indiceSelecionado = null, this.atualizarLinhasSelecionadas();
147
147
  }
148
- isItemSelecionado(t, e) {
148
+ isItemSelecionado(r, e) {
149
149
  if (this.itemSelecionado) {
150
- if (this.itemSelecionado === t) return !0;
151
- const i = this.ctx.getChaveId();
152
- if (t[i] != null && this.itemSelecionado[i] != null)
153
- return String(t[i]) === String(this.itemSelecionado[i]);
154
- if (t.id != null && this.itemSelecionado.id != null)
155
- return String(t.id) === String(this.itemSelecionado.id);
150
+ if (this.itemSelecionado === r) return !0;
151
+ const o = this.ctx.getChaveId();
152
+ if (r[o] != null && this.itemSelecionado[o] != null)
153
+ return String(r[o]) === String(this.itemSelecionado[o]);
154
+ if (r.id != null && this.itemSelecionado.id != null)
155
+ return String(r.id) === String(this.itemSelecionado.id);
156
156
  }
157
157
  return this.indiceSelecionado !== null && this.indiceSelecionado === e;
158
158
  }
159
159
  atualizarLinhasSelecionadas() {
160
- const t = this.ctx.getTbody();
161
- if (!t) return;
160
+ const r = this.ctx.getTbody();
161
+ if (!r) return;
162
162
  const e = this.ctx.getDadosExibicao();
163
- t.querySelectorAll("tr:not(.ui-tabela__virtual-spacer)").forEach((o) => {
164
- const a = o.getAttribute("data-index"), n = a !== null ? parseInt(a, 10) : -1, s = n >= 0 ? e[n] : null, d = s ? this.isItemSelecionado(s, n) : !1;
165
- o.classList.toggle("ui-tabela__tr--selecionada", d), be(o, "linha-selecionada", d), d ? (o.setAttribute("data-selecionada", "true"), o.setAttribute("aria-current", "true"), o.setAttribute("aria-selected", "true")) : (o.removeAttribute("data-selecionada"), o.removeAttribute("aria-current"), o.setAttribute("aria-selected", "false"));
163
+ r.querySelectorAll("tr:not(.ui-tabela__virtual-spacer)").forEach((i) => {
164
+ const a = i.getAttribute("data-index"), n = a !== null ? parseInt(a, 10) : -1, l = n >= 0 ? e[n] : null, d = l ? this.isItemSelecionado(l, n) : !1;
165
+ i.classList.toggle("ui-tabela__tr--selecionada", d), ye(i, "linha-selecionada", d), d ? (i.setAttribute("data-selecionada", "true"), i.setAttribute("aria-current", "true"), i.setAttribute("aria-selected", "true")) : (i.removeAttribute("data-selecionada"), i.removeAttribute("aria-current"), i.setAttribute("aria-selected", "false"));
166
166
  });
167
167
  }
168
- rolarPara(t, e) {
169
- const i = this.ctx.getDadosExibicao(), o = _e(i, t, this.ctx.getChaveId(), (e == null ? void 0 : e.porIndice) === !0);
170
- if (o === -1)
168
+ rolarPara(r, e) {
169
+ const o = this.ctx.getDadosExibicao(), i = ze(o, r, this.ctx.getChaveId(), (e == null ? void 0 : e.porIndice) === !0);
170
+ if (i === -1)
171
171
  return !1;
172
172
  if (e != null && e.selecionar) {
173
- const a = i[o];
174
- this.itemSelecionado = a, this.indiceSelecionado = o, this.atualizarLinhasSelecionadas(), this.ctx.onLinhaAtiva(o), this.ctx.host.dispatchEvent(
173
+ const a = o[i];
174
+ this.itemSelecionado = a, this.indiceSelecionado = i, this.atualizarLinhasSelecionadas(), this.ctx.onLinhaAtiva(i), this.ctx.host.dispatchEvent(
175
175
  new CustomEvent("ui-linha-selecionada", {
176
176
  bubbles: !0,
177
177
  composed: !0,
178
- detail: { item: a, indice: o }
178
+ detail: { item: a, indice: i }
179
179
  })
180
180
  );
181
181
  }
182
- return this.ctx.onRolarParaIndice(o, (e == null ? void 0 : e.comportamento) || "smooth");
182
+ return this.ctx.onRolarParaIndice(i, (e == null ? void 0 : e.comportamento) || "smooth");
183
183
  }
184
184
  }
185
- function ye(r, t, e) {
186
- return r !== e ? {
185
+ function Le(t, r, e) {
186
+ return t !== e ? {
187
187
  idColuna: e,
188
188
  direcao: "asc"
189
- } : t === "asc" ? {
189
+ } : r === "asc" ? {
190
190
  idColuna: e,
191
191
  direcao: "desc"
192
- } : t === "desc" ? {
192
+ } : r === "desc" ? {
193
193
  idColuna: null,
194
194
  direcao: "original"
195
195
  } : {
@@ -197,37 +197,37 @@ function ye(r, t, e) {
197
197
  direcao: "asc"
198
198
  };
199
199
  }
200
- const we = new Intl.Collator("pt-BR", { numeric: !0, sensitivity: "base" });
201
- function G(r) {
202
- if (r instanceof Date) return r.getTime();
203
- if (typeof r == "number") return r;
204
- const t = String(r).trim(), e = /^(\d{1,2})\/(\d{1,2})\/(\d{4})(?:[ T](\d{1,2}):(\d{2}))?$/.exec(t);
205
- return e ? new Date(+e[3], +e[2] - 1, +e[1], +(e[4] ?? 0), +(e[5] ?? 0)).getTime() : Date.parse(t);
206
- }
207
- function Ce(r, t, e) {
208
- if (e === "data" || !e && (r instanceof Date || t instanceof Date)) {
209
- const i = G(r), o = G(t);
210
- if (!Number.isNaN(i) && !Number.isNaN(o)) return i - o;
211
- } else if (e === "numero" || !e && typeof r == "number" && typeof t == "number") {
212
- const i = Number(r), o = Number(t);
213
- if (!Number.isNaN(i) && !Number.isNaN(o)) return i - o;
214
- } else if (e === "booleano" || !e && typeof r == "boolean" && typeof t == "boolean")
215
- return +!!r - +!!t;
216
- return we.compare(String(r), String(t));
217
- }
218
- function Ae(r, t, e, i) {
219
- if (!t || e === "original")
220
- return [...r];
221
- const o = e === "desc" ? -1 : 1;
222
- return [...r].sort((a, n) => {
223
- const s = a[t], d = n[t], c = s == null, l = d == null;
224
- return c || l ? c === l ? 0 : c ? 1 : -1 : i != null && i.comparador ? i.comparador(s, d, a, n) * o : s === d ? 0 : Ce(s, d, i == null ? void 0 : i.tipo) * o;
200
+ const Me = new Intl.Collator("pt-BR", { numeric: !0, sensitivity: "base" });
201
+ function ee(t) {
202
+ if (t instanceof Date) return t.getTime();
203
+ if (typeof t == "number") return t;
204
+ const r = String(t).trim(), e = /^(\d{1,2})\/(\d{1,2})\/(\d{4})(?:[ T](\d{1,2}):(\d{2}))?$/.exec(r);
205
+ return e ? new Date(+e[3], +e[2] - 1, +e[1], +(e[4] ?? 0), +(e[5] ?? 0)).getTime() : Date.parse(r);
206
+ }
207
+ function Te(t, r, e) {
208
+ if (e === "data" || !e && (t instanceof Date || r instanceof Date)) {
209
+ const o = ee(t), i = ee(r);
210
+ if (!Number.isNaN(o) && !Number.isNaN(i)) return o - i;
211
+ } else if (e === "numero" || !e && typeof t == "number" && typeof r == "number") {
212
+ const o = Number(t), i = Number(r);
213
+ if (!Number.isNaN(o) && !Number.isNaN(i)) return o - i;
214
+ } else if (e === "booleano" || !e && typeof t == "boolean" && typeof r == "boolean")
215
+ return +!!t - +!!r;
216
+ return Me.compare(String(t), String(r));
217
+ }
218
+ function Ne(t, r, e, o) {
219
+ if (!r || e === "original")
220
+ return [...t];
221
+ const i = e === "desc" ? -1 : 1;
222
+ return [...t].sort((a, n) => {
223
+ const l = a[r], d = n[r], c = l == null, s = d == null;
224
+ return c || s ? c === s ? 0 : c ? 1 : -1 : o != null && o.comparador ? o.comparador(l, d, a, n) * i : l === d ? 0 : Te(l, d, o == null ? void 0 : o.tipo) * i;
225
225
  });
226
226
  }
227
- function V(r) {
228
- return r.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
227
+ function q(t) {
228
+ return t.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
229
229
  }
230
- class ke {
230
+ class De {
231
231
  constructor() {
232
232
  b(this, "dadosOriginais", []);
233
233
  b(this, "dadosExibicao", []);
@@ -240,24 +240,24 @@ class ke {
240
240
  /** Ordenação feita pelo servidor: a tabela guarda coluna/direção (indicador) mas não reordena os dados. */
241
241
  b(this, "ordenacaoRemota", !1);
242
242
  }
243
- setColunas(t) {
244
- this.colunas = t, this.colunaOrdenada && this.aplicarOrdenacao();
243
+ setColunas(r) {
244
+ this.colunas = r, this.colunaOrdenada && this.aplicarOrdenacao();
245
245
  }
246
- setOrdenacaoRemota(t) {
247
- this.ordenacaoRemota !== t && (this.ordenacaoRemota = t, this.aplicarOrdenacao());
246
+ setOrdenacaoRemota(r) {
247
+ this.ordenacaoRemota !== r && (this.ordenacaoRemota = r, this.aplicarOrdenacao());
248
248
  }
249
249
  /** Restaura coluna/direção (ex.: `ui-sort` cancelado) e recalcula. */
250
- restaurarOrdenacao(t, e) {
251
- this.colunaOrdenada = t, this.direcaoOrdenacao = e, this.aplicarOrdenacao();
250
+ restaurarOrdenacao(r, e) {
251
+ this.colunaOrdenada = r, this.direcaoOrdenacao = e, this.aplicarOrdenacao();
252
252
  }
253
- setColunasFiltro(t) {
254
- this.colunasFiltro = t, this.ultimoFiltro && this.aplicarOrdenacao();
253
+ setColunasFiltro(r) {
254
+ this.colunasFiltro = r, this.ultimoFiltro && this.aplicarOrdenacao();
255
255
  }
256
256
  getDadosOriginais() {
257
257
  return this.dadosOriginais;
258
258
  }
259
- setDadosOriginais(t) {
260
- this.dadosOriginais = Array.isArray(t) ? t.filter((e) => e != null) : [], this.aplicarOrdenacao();
259
+ setDadosOriginais(r) {
260
+ this.dadosOriginais = Array.isArray(r) ? r.filter((e) => e != null) : [], this.aplicarOrdenacao();
261
261
  }
262
262
  getDadosExibicao() {
263
263
  return this.dadosExibicao;
@@ -265,63 +265,63 @@ class ke {
265
265
  getColunaOrdenada() {
266
266
  return this.colunaOrdenada;
267
267
  }
268
- setColunaOrdenada(t) {
269
- this.colunaOrdenada = t, t ? this.direcaoOrdenacao === "original" && (this.direcaoOrdenacao = "asc") : this.direcaoOrdenacao = "original", this.aplicarOrdenacao();
268
+ setColunaOrdenada(r) {
269
+ this.colunaOrdenada = r, r ? this.direcaoOrdenacao === "original" && (this.direcaoOrdenacao = "asc") : this.direcaoOrdenacao = "original", this.aplicarOrdenacao();
270
270
  }
271
271
  getDirecaoOrdenacao() {
272
272
  return this.direcaoOrdenacao;
273
273
  }
274
- setDirecaoOrdenacao(t) {
275
- this.direcaoOrdenacao = t || "original", this.direcaoOrdenacao === "original" && (this.colunaOrdenada = null), this.aplicarOrdenacao();
274
+ setDirecaoOrdenacao(r) {
275
+ this.direcaoOrdenacao = r || "original", this.direcaoOrdenacao === "original" && (this.colunaOrdenada = null), this.aplicarOrdenacao();
276
276
  }
277
- alternarOrdenacaoColuna(t) {
278
- if (!t.ordenavel) return null;
279
- const e = ye(this.colunaOrdenada, this.direcaoOrdenacao, t.id);
277
+ alternarOrdenacaoColuna(r) {
278
+ if (!r.ordenavel) return null;
279
+ const e = Le(this.colunaOrdenada, this.direcaoOrdenacao, r.id);
280
280
  return this.colunaOrdenada = e.idColuna, this.direcaoOrdenacao = e.direcao, this.aplicarOrdenacao(), e;
281
281
  }
282
282
  /** Recalcula a lista exibida: filtro vigente e, sobre o resultado, a ordenação da coluna (valem juntos). */
283
283
  aplicarOrdenacao() {
284
- const t = this.ultimoFiltro, e = t ? this.dadosOriginais.filter((o) => this.casaFiltro(o, t)) : this.dadosOriginais, i = this.colunaOrdenada ? this.colunas.find((o) => o.id === this.colunaOrdenada) : null;
285
- this.dadosExibicao = this.ordenacaoRemota ? [...e] : Ae(e, this.colunaOrdenada, this.direcaoOrdenacao, i);
284
+ const r = this.ultimoFiltro, e = r ? this.dadosOriginais.filter((i) => this.casaFiltro(i, r)) : this.dadosOriginais, o = this.colunaOrdenada ? this.colunas.find((i) => i.id === this.colunaOrdenada) : null;
285
+ this.dadosExibicao = this.ordenacaoRemota ? [...e] : Ne(e, this.colunaOrdenada, this.direcaoOrdenacao, o);
286
286
  }
287
- casaFiltro(t, e) {
288
- return (this.colunasFiltro.length > 0 ? this.colunasFiltro : Object.keys(t)).some((o) => {
289
- const a = t[o], n = this.colunas.find((d) => d.id === o);
287
+ casaFiltro(r, e) {
288
+ return (this.colunasFiltro.length > 0 ? this.colunasFiltro : Object.keys(r)).some((i) => {
289
+ const a = r[i], n = this.colunas.find((d) => d.id === i);
290
290
  if (n != null && n.textoFiltro)
291
291
  try {
292
- if (V(String(n.textoFiltro(a, t) ?? "")).includes(e)) return !0;
292
+ if (q(String(n.textoFiltro(a, r) ?? "")).includes(e)) return !0;
293
293
  } catch {
294
294
  }
295
295
  if (a == null || typeof a == "object" && !(a instanceof Date)) return !1;
296
- const s = a instanceof Date ? `${a.toISOString()} ${a.toLocaleDateString("pt-BR")}` : String(a);
297
- return V(s).includes(e);
296
+ const l = a instanceof Date ? `${a.toISOString()} ${a.toLocaleDateString("pt-BR")}` : String(a);
297
+ return q(l).includes(e);
298
298
  });
299
299
  }
300
300
  /** Há um filtro de texto aplicado (o vazio vira "sem resultados"). */
301
301
  temFiltro() {
302
302
  return this.ultimoFiltro !== "";
303
303
  }
304
- filtrar(t) {
305
- this.ultimoFiltro = V((t || "").trim()), this.aplicarOrdenacao();
304
+ filtrar(r) {
305
+ this.ultimoFiltro = q((r || "").trim()), this.aplicarOrdenacao();
306
306
  }
307
307
  }
308
- const ze = ':host{display:block;width:100%;box-sizing:border-box;font-family:inherit;color:var(--ui-cor-texto, #e1e1e6);position:relative}.ui-tabela-container{width:100%;max-width:100%;max-height:var(--ui-tabela-max-height, 500px);overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);background-color:var(--ui-cor-superficie, #141417);box-sizing:border-box;position:relative}.ui-tabela{width:100%;border-collapse:separate;border-spacing:0;text-align:left;font-size:14px;font-family:var(--ui-fonte-base, inherit);font-variant-numeric:tabular-nums}.ui-tabela thead{background-color:var(--ui-cor-fundo-elevado, #1a1a1e)}.ui-tabela th{position:sticky;top:0;z-index:10;padding:10px 16px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto-secundario, #9696a6);font-size:13px;font-weight:600;letter-spacing:.02em;border-bottom:2px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box}.ui-tabela th[aria-sort=ascending],.ui-tabela th[aria-sort=descending]{color:var(--ui-cor-texto, #e1e1e6)}.ui-tabela__resizer{position:absolute;top:0;right:0;width:8px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;z-index:20;background:linear-gradient(var(--ui-cor-borda, rgba(255, 255, 255, .12)),var(--ui-cor-borda, rgba(255, 255, 255, .12))) center / 1px 60% no-repeat;transition:background-color .15s ease}.ui-tabela__resizer:hover,.ui-tabela__resizer:focus-visible,.ui-tabela__resizer--ativo{background:var(--ui-cor-primaria, #00E08A);outline:none}:host([densidade="compacta"]) th,:host([densidade="compacta"]) td,:host([density="compact"]) th,:host([density="compact"]) td{padding:4px 8px}:host([densidade="normal"]) th,:host([densidade="normal"]) td,:host([density="normal"]) th,:host([density="normal"]) td{padding:10px 16px}:host([densidade="relaxada"]) th,:host([densidade="relaxada"]) td,:host([density="relaxed"]) th,:host([density="relaxed"]) td{padding:16px 20px}:host([altura-linha]) td,:host([row-height]) td{height:var(--ui-tabela-altura-linha);box-sizing:border-box;padding-top:0;padding-bottom:0;overflow:hidden;white-space:nowrap}.ui-tabela__header-content{display:inline-flex;align-items:center;vertical-align:middle;width:100%;box-sizing:border-box}.ui-tabela__header-text{margin-right:var(--ui-tabela-th-gap, 6px);display:inline-block;min-width:0;overflow:hidden;text-overflow:ellipsis}.ui-tabela__sort-icon{width:var(--ui-tabela-th-icone, 16px);min-width:var(--ui-tabela-th-icone, 16px);flex:none;display:inline-flex;justify-content:center;align-items:center}.ui-tabela th.ui-tabela__th--ordenavel{cursor:pointer}@media (hover: hover){.ui-tabela th.ui-tabela__th--ordenavel:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,var(--ui-cor-fundo-elevado, #1a1a1e));color:var(--ui-cor-texto, #e1e1e6)}}.ui-tabela__ordenar{all:unset;display:flex;width:100%;box-sizing:border-box;cursor:pointer;font:inherit;color:inherit;text-align:inherit}.ui-tabela__ordenar:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px;border-radius:var(--ui-raio-sm, 4px)}.ui-tabela tbody tr:focus{outline:none}.ui-tabela tbody tr:focus-visible{outline:2px solid var(--ui-tabela-cor-foco, var(--ui-cor-texto, #e1e1e6));outline-offset:-2px;background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 8%, transparent))}.ui-tabela__sort-arrow{display:inline-block;width:14px;height:14px;vertical-align:middle;shape-rendering:geometricPrecision;fill:var(--ui-cor-primaria, #00E08A)}.ui-tabela__sort-arrow path{transition:opacity .15s ease;opacity:.35}.ui-tabela__sort-arrow--asc .seta-cima,.ui-tabela__sort-arrow--desc .seta-baixo{opacity:1}.ui-tabela__sort-arrow--inativo{fill:var(--ui-cor-texto-secundario, #9696a6)}.ui-tabela__sort-arrow--inativo path{opacity:.6}.ui-tabela td{padding:10px 16px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-borda, rgba(255, 255, 255, .12)) 60%,transparent);white-space:nowrap;vertical-align:middle;color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box}.ui-tabela__cell-content{display:inline-flex;align-items:center;vertical-align:middle}.ui-tabela__cell-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.ui-tabela--alinhar-esquerda{text-align:left}.ui-tabela--alinhar-esquerda .ui-tabela__header-content,.ui-tabela--alinhar-esquerda .ui-tabela__cell-content{justify-content:flex-start}.ui-tabela--alinhar-centro{text-align:center}.ui-tabela--alinhar-centro .ui-tabela__header-content,.ui-tabela--alinhar-centro .ui-tabela__cell-content{justify-content:center}.ui-tabela--alinhar-direita{text-align:right}.ui-tabela--alinhar-direita .ui-tabela__header-content,.ui-tabela--alinhar-direita .ui-tabela__cell-content{justify-content:flex-end}.ui-tabela tbody tr[data-index]{cursor:pointer}.ui-tabela tbody tr.ui-tabela__tr--par{background-color:var(--ui-tabela-zebra, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 4%, transparent))}@media (hover: hover){.ui-tabela tbody tr[data-index]:hover{background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 8%, transparent))}}.ui-tabela tbody tr[data-index]:active{background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 12%, transparent))}:host(:not([selecionar-texto])) .ui-tabela tbody td{-webkit-user-select:none;user-select:none}.ui-tabela tbody tr.ui-tabela__tr--selecionada,.ui-tabela tbody tr[data-selecionada=true]{background-color:var(--ui-tabela-selecionada, var(--ui-cor-linha-selecionada, color-mix(in srgb, var(--ui-cor-primaria, #00E08A) 14%, transparent)))}.ui-tabela tbody tr.ui-tabela__tr--selecionada td:first-child,.ui-tabela tbody tr[data-selecionada=true] td:first-child{box-shadow:inset 3px 0 0 var(--ui-cor-primaria, #00E08A)}@media (hover: hover){.ui-tabela tbody tr.ui-tabela__tr--selecionada:hover,.ui-tabela tbody tr[data-selecionada=true]:hover{background-color:var(--ui-tabela-selecionada-hover, var(--ui-cor-linha-selecionada-hover, color-mix(in srgb, var(--ui-cor-primaria, #00E08A) 22%, transparent)))}}.ui-tabela__virtual-spacer td{padding:0!important;border:none!important;height:inherit;background:transparent!important}.ui-tabela__empty{padding:40px 24px;text-align:center;color:var(--ui-cor-texto-secundario, #9696a6);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;box-sizing:border-box}.ui-tabela__empty-icon{width:32px;height:32px;opacity:.5;fill:currentColor}.ui-tabela__empty-text{font-size:14px;font-weight:500;color:var(--ui-cor-texto-secundario, #9696a6)}.ui-tabela__erro{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px;padding:10px 14px;border:1px solid var(--ui-cor-texto-erro, #ff5555);border-left-width:4px;border-radius:var(--ui-raio-borda, 6px);background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 10%,transparent);color:var(--ui-cor-texto, #e1e1e6);font-size:14px;box-sizing:border-box}.ui-tabela__erro-texto{flex:1 1 200px;min-width:0}.ui-tabela__erro-detalhe{display:block;margin-top:2px;font-size:12px;color:var(--ui-cor-texto-secundario, #9696a6);overflow-wrap:anywhere}.ui-tabela__erro-acao,.ui-tabela__prompt-actions button{background:var(--ui-cor-botao-secundario-fundo, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));padding:6px 12px;border-radius:var(--ui-raio-sm, 4px);font:inherit;cursor:pointer}.ui-tabela__erro-acao:hover,.ui-tabela__prompt-actions button:hover{background:var(--ui-cor-botao-secundario-hover, rgba(255, 255, 255, .2))}.ui-tabela__erro-acao:focus-visible,.ui-tabela__prompt-actions button:focus-visible,.ui-tabela__prompt-dialog input:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px}.ui-tabela__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.ui-tabela__loading{position:absolute;top:0;left:0;right:0;bottom:0;background-color:color-mix(in srgb,var(--ui-cor-superficie, #141417) 72%,transparent);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;z-index:50;color:var(--ui-cor-texto, #e1e1e6);font-size:14px}.ui-tabela__spinner{width:32px;height:32px;border:3px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-top-color:var(--ui-cor-primaria, #00E08A);border-radius:50%;animation:ui-tabela-spin .8s linear infinite}@keyframes ui-tabela-spin{to{transform:rotate(360deg)}}.ui-tabela__prompt-dialog{margin:0;max-width:calc(100vw - 16px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));border-radius:var(--ui-raio-borda, 6px);background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto, #e1e1e6);padding:12px;box-shadow:var(--ui-sombra-lg, 0 8px 32px rgba(0, 0, 0, .8));font-family:inherit;font-size:14px}.ui-tabela__prompt-dialog::backdrop{background:#0000004d}.ui-tabela__prompt-title{display:block;margin-bottom:8px;font-weight:500}.ui-tabela__prompt-dialog input{width:100%;padding:6px 8px;border-radius:var(--ui-raio-sm, 4px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));background:var(--ui-cor-superficie, #141417);color:var(--ui-cor-texto, #e1e1e6);margin-bottom:8px;box-sizing:border-box;font:inherit}.ui-tabela__prompt-dialog input[aria-invalid=true]{border-color:var(--ui-cor-texto-erro, #ff5555)}.ui-tabela__prompt-erro{min-height:1.2em;margin-bottom:8px;font-size:12px;color:var(--ui-cor-texto-erro, #ff5555)}.ui-tabela__prompt-actions{display:flex;justify-content:flex-end;gap:8px}.ui-tabela__prompt-actions button:last-child{background:var(--ui-cor-primaria, #00E08A);border-color:transparent;color:var(--ui-cor-texto-sobre-primaria, #000000);font-weight:600}.ui-tabela__prompt-actions button:last-child:hover{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 85%,var(--ui-cor-texto, #e1e1e6))}@media (pointer: coarse){.ui-tabela__resizer{width:16px}:host(:not([altura-linha]):not([row-height])) .ui-tabela tbody tr[data-index]{height:44px}}@media (max-width: 640px){.ui-tabela th{padding:8px 10px;font-size:12px}.ui-tabela td{padding:8px 10px;font-size:13px}}@media (prefers-reduced-motion: reduce){.ui-tabela__resizer,.ui-tabela__sort-arrow path{transition:none}.ui-tabela__spinner{animation-duration:2.4s}}';
309
- function ae(r) {
310
- return r == null || r === "" ? "" : typeof r == "number" ? `${r}px` : r;
308
+ const Re = ':host{display:block;width:100%;box-sizing:border-box;font-family:inherit;color:var(--ui-cor-texto, #e1e1e6);position:relative}.ui-tabela-container{width:100%;max-width:100%;max-height:var(--ui-tabela-max-height, 500px);overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 6px);background-color:var(--ui-cor-superficie, #141417);box-sizing:border-box;position:relative}.ui-tabela{width:100%;border-collapse:separate;border-spacing:0;text-align:left;font-size:14px;font-family:var(--ui-fonte-base, inherit);font-variant-numeric:tabular-nums}.ui-tabela thead{background-color:var(--ui-cor-fundo-elevado, #1a1a1e)}.ui-tabela th{position:sticky;top:0;z-index:10;padding:10px 16px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto-secundario, #9696a6);font-size:13px;font-weight:600;letter-spacing:.02em;border-bottom:2px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box}.ui-tabela th[aria-sort=ascending],.ui-tabela th[aria-sort=descending]{color:var(--ui-cor-texto, #e1e1e6)}.ui-tabela__resizer{position:absolute;top:0;right:0;width:8px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none;z-index:20;background:linear-gradient(var(--ui-cor-borda, rgba(255, 255, 255, .12)),var(--ui-cor-borda, rgba(255, 255, 255, .12))) center / 1px 60% no-repeat;transition:background-color .15s ease}.ui-tabela__resizer:hover,.ui-tabela__resizer:focus-visible,.ui-tabela__resizer--ativo{background:var(--ui-cor-primaria, #00E08A);outline:none}:host([densidade="compacta"]) th,:host([densidade="compacta"]) td,:host([density="compact"]) th,:host([density="compact"]) td{padding:4px 8px}:host([densidade="normal"]) th,:host([densidade="normal"]) td,:host([density="normal"]) th,:host([density="normal"]) td{padding:10px 16px}:host([densidade="relaxada"]) th,:host([densidade="relaxada"]) td,:host([density="relaxed"]) th,:host([density="relaxed"]) td{padding:16px 20px}:host([altura-linha]) td,:host([row-height]) td{height:var(--ui-tabela-altura-linha);box-sizing:border-box;padding-top:0;padding-bottom:0;overflow:hidden;white-space:nowrap}.ui-tabela__header-content{display:inline-flex;align-items:center;vertical-align:middle;width:100%;box-sizing:border-box}.ui-tabela__header-text{margin-right:var(--ui-tabela-th-gap, 6px);display:inline-block;min-width:0;overflow:hidden;text-overflow:ellipsis}.ui-tabela__sort-icon{width:var(--ui-tabela-th-icone, 16px);min-width:var(--ui-tabela-th-icone, 16px);flex:none;display:inline-flex;justify-content:center;align-items:center}.ui-tabela th.ui-tabela__th--ordenavel{cursor:pointer}@media (hover: hover){.ui-tabela th.ui-tabela__th--ordenavel:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,var(--ui-cor-fundo-elevado, #1a1a1e));color:var(--ui-cor-texto, #e1e1e6)}}.ui-tabela__ordenar{all:unset;display:flex;width:100%;box-sizing:border-box;cursor:pointer;font:inherit;color:inherit;text-align:inherit}.ui-tabela__ordenar:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px;border-radius:var(--ui-raio-sm, 4px)}.ui-tabela tbody tr:focus{outline:none}.ui-tabela tbody tr:focus-visible{outline:2px solid var(--ui-tabela-cor-foco, var(--ui-cor-texto, #e1e1e6));outline-offset:-2px;background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 8%, transparent))}.ui-tabela__sort-arrow{display:inline-block;width:14px;height:14px;vertical-align:middle;shape-rendering:geometricPrecision;fill:var(--ui-cor-primaria, #00E08A)}.ui-tabela__sort-arrow path{transition:opacity .15s ease;opacity:.35}.ui-tabela__sort-arrow--asc .seta-cima,.ui-tabela__sort-arrow--desc .seta-baixo{opacity:1}.ui-tabela__sort-arrow--inativo{fill:var(--ui-cor-texto-secundario, #9696a6)}.ui-tabela__sort-arrow--inativo path{opacity:.6}.ui-tabela td{padding:10px 16px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-borda, rgba(255, 255, 255, .12)) 60%,transparent);white-space:nowrap;vertical-align:middle;color:var(--ui-cor-texto, #e1e1e6);box-sizing:border-box}.ui-tabela__cell-content{display:inline-flex;align-items:center;vertical-align:middle}.ui-tabela__cell-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.ui-tabela--alinhar-esquerda{text-align:left}.ui-tabela--alinhar-esquerda .ui-tabela__header-content,.ui-tabela--alinhar-esquerda .ui-tabela__cell-content{justify-content:flex-start}.ui-tabela--alinhar-centro{text-align:center}.ui-tabela--alinhar-centro .ui-tabela__header-content,.ui-tabela--alinhar-centro .ui-tabela__cell-content{justify-content:center}.ui-tabela--alinhar-direita{text-align:right}.ui-tabela--alinhar-direita .ui-tabela__header-content,.ui-tabela--alinhar-direita .ui-tabela__cell-content{justify-content:flex-end}.ui-tabela tbody tr[data-index]{cursor:pointer}.ui-tabela tbody tr.ui-tabela__tr--par{background-color:var(--ui-tabela-zebra, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 4%, transparent))}@media (hover: hover){.ui-tabela tbody tr[data-index]:hover{background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 8%, transparent))}}.ui-tabela tbody tr[data-index]:active{background-color:var(--ui-tabela-hover, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 12%, transparent))}:host(:not([selecionar-texto])) .ui-tabela tbody td{-webkit-user-select:none;user-select:none}.ui-tabela tbody tr.ui-tabela__tr--selecionada,.ui-tabela tbody tr[data-selecionada=true]{background-color:var(--ui-tabela-selecionada, var(--ui-cor-linha-selecionada, color-mix(in srgb, var(--ui-cor-primaria, #00E08A) 14%, transparent)))}.ui-tabela tbody tr.ui-tabela__tr--selecionada td:first-child,.ui-tabela tbody tr[data-selecionada=true] td:first-child{box-shadow:inset 3px 0 0 var(--ui-cor-primaria, #00E08A)}@media (hover: hover){.ui-tabela tbody tr.ui-tabela__tr--selecionada:hover,.ui-tabela tbody tr[data-selecionada=true]:hover{background-color:var(--ui-tabela-selecionada-hover, var(--ui-cor-linha-selecionada-hover, color-mix(in srgb, var(--ui-cor-primaria, #00E08A) 22%, transparent)))}}.ui-tabela__virtual-spacer td{padding:0!important;border:none!important;height:inherit;background:transparent!important}.ui-tabela__empty{padding:40px 24px;text-align:center;color:var(--ui-cor-texto-secundario, #9696a6);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;box-sizing:border-box}.ui-tabela__empty-icon{width:32px;height:32px;opacity:.5;fill:currentColor}.ui-tabela__empty-text{font-size:14px;font-weight:500;color:var(--ui-cor-texto-secundario, #9696a6)}.ui-tabela__erro{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px;padding:10px 14px;border:1px solid var(--ui-cor-texto-erro, #ff5555);border-left-width:4px;border-radius:var(--ui-raio-borda, 6px);background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 10%,transparent);color:var(--ui-cor-texto, #e1e1e6);font-size:14px;box-sizing:border-box}.ui-tabela__erro-texto{flex:1 1 200px;min-width:0}.ui-tabela__erro-detalhe{display:block;margin-top:2px;font-size:12px;color:var(--ui-cor-texto-secundario, #9696a6);overflow-wrap:anywhere}.ui-tabela__erro-acao,.ui-tabela__prompt-actions button{background:var(--ui-cor-botao-secundario-fundo, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));padding:6px 12px;border-radius:var(--ui-raio-sm, 4px);font:inherit;cursor:pointer}.ui-tabela__erro-acao:hover,.ui-tabela__prompt-actions button:hover{background:var(--ui-cor-botao-secundario-hover, rgba(255, 255, 255, .2))}.ui-tabela__erro-acao:focus-visible,.ui-tabela__prompt-actions button:focus-visible,.ui-tabela__prompt-dialog input:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:2px}.ui-tabela__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.ui-tabela__loading{position:absolute;top:0;left:0;right:0;bottom:0;background-color:color-mix(in srgb,var(--ui-cor-superficie, #141417) 72%,transparent);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;z-index:50;color:var(--ui-cor-texto, #e1e1e6);font-size:14px}.ui-tabela__spinner{width:32px;height:32px;border:3px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-top-color:var(--ui-cor-primaria, #00E08A);border-radius:50%;animation:ui-tabela-spin .8s linear infinite}@keyframes ui-tabela-spin{to{transform:rotate(360deg)}}.ui-tabela__prompt-dialog{margin:0;max-width:calc(100vw - 16px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));border-radius:var(--ui-raio-borda, 6px);background-color:var(--ui-cor-fundo-elevado, #1a1a1e);color:var(--ui-cor-texto, #e1e1e6);padding:12px;box-shadow:var(--ui-sombra-lg, 0 8px 32px rgba(0, 0, 0, .8));font-family:inherit;font-size:14px}.ui-tabela__prompt-dialog::backdrop{background:#0000004d}.ui-tabela__prompt-title{display:block;margin-bottom:8px;font-weight:500}.ui-tabela__prompt-dialog input{width:100%;padding:6px 8px;border-radius:var(--ui-raio-sm, 4px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));background:var(--ui-cor-superficie, #141417);color:var(--ui-cor-texto, #e1e1e6);margin-bottom:8px;box-sizing:border-box;font:inherit}.ui-tabela__prompt-dialog input[aria-invalid=true]{border-color:var(--ui-cor-texto-erro, #ff5555)}.ui-tabela__prompt-erro{min-height:1.2em;margin-bottom:8px;font-size:12px;color:var(--ui-cor-texto-erro, #ff5555)}.ui-tabela__prompt-actions{display:flex;justify-content:flex-end;gap:8px}.ui-tabela__prompt-actions button:last-child{background:var(--ui-cor-primaria, #00E08A);border-color:transparent;color:var(--ui-cor-texto-sobre-primaria, #000000);font-weight:600}.ui-tabela__prompt-actions button:last-child:hover{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 85%,var(--ui-cor-texto, #e1e1e6))}@media (pointer: coarse){.ui-tabela__resizer{width:16px}:host(:not([altura-linha]):not([row-height])) .ui-tabela tbody tr[data-index]{height:44px}}@media (max-width: 640px){.ui-tabela th{padding:8px 10px;font-size:12px}.ui-tabela td{padding:8px 10px;font-size:13px}}@media (prefers-reduced-motion: reduce){.ui-tabela__resizer,.ui-tabela__sort-arrow path{transition:none}.ui-tabela__spinner{animation-duration:2.4s}}';
309
+ function ce(t) {
310
+ return t == null || t === "" ? "" : typeof t == "number" ? `${t}px` : t;
311
311
  }
312
- function ne(r) {
313
- return r === "centro" || r === "center" ? "ui-tabela--alinhar-centro" : r === "direita" || r === "right" ? "ui-tabela--alinhar-direita" : "ui-tabela--alinhar-esquerda";
312
+ function ue(t) {
313
+ return t === "centro" || t === "center" ? "ui-tabela--alinhar-centro" : t === "direita" || t === "right" ? "ui-tabela--alinhar-direita" : "ui-tabela--alinhar-esquerda";
314
314
  }
315
- function se(r) {
316
- return r === "centro" || r === "center" ? "center" : r === "direita" || r === "right" ? "right" : "left";
315
+ function pe(t) {
316
+ return t === "centro" || t === "center" ? "center" : t === "direita" || t === "right" ? "right" : "left";
317
317
  }
318
- function K(r) {
319
- return r === "compacta" ? 30 : r === "relaxada" ? 56 : 42;
318
+ function te(t) {
319
+ return t === "compacta" ? 30 : t === "relaxada" ? 56 : 42;
320
320
  }
321
- function Se(r, t, e, i) {
322
- r.innerHTML = `<style>${ze}</style>`;
323
- const o = document.createElement("div");
324
- o.className = "ui-tabela-container", o.setAttribute("part", "base"), e && (o.style.maxHeight = e);
321
+ function Be(t, r, e, o) {
322
+ t.innerHTML = `<style>${Re}</style>`;
323
+ const i = document.createElement("div");
324
+ i.className = "ui-tabela-container", i.setAttribute("part", "base"), e && (i.style.maxHeight = e);
325
325
  const a = document.createElement("div");
326
326
  a.className = "ui-tabela__empty", a.setAttribute("part", "vazio"), a.style.display = "none", a.setAttribute("role", "status");
327
327
  const n = document.createElement("div");
@@ -329,12 +329,12 @@ function Se(r, t, e, i) {
329
329
  <svg class="ui-tabela__empty-icon" aria-hidden="true" focusable="false" viewBox="0 0 24 24">
330
330
  <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"/>
331
331
  </svg>`;
332
- const s = document.createElement("span");
333
- s.className = "ui-tabela__empty-text", s.textContent = t, a.appendChild(n), a.appendChild(s);
332
+ const l = document.createElement("span");
333
+ l.className = "ui-tabela__empty-text", l.textContent = r, a.appendChild(n), a.appendChild(l);
334
334
  const d = document.createElement("table");
335
335
  d.className = "ui-tabela", d.setAttribute("part", "tabela"), d.setAttribute("role", "grid");
336
- const c = document.createElement("colgroup"), l = document.createElement("thead"), u = document.createElement("tbody");
337
- d.appendChild(c), d.appendChild(l), d.appendChild(u);
336
+ const c = document.createElement("colgroup"), s = document.createElement("thead"), u = document.createElement("tbody");
337
+ d.appendChild(c), d.appendChild(s), d.appendChild(u);
338
338
  const p = document.createElement("div");
339
339
  p.className = "ui-tabela__erro", p.setAttribute("part", "erro"), p.setAttribute("role", "alert"), p.style.display = "none";
340
340
  const h = document.createElement("div");
@@ -346,228 +346,228 @@ function Se(r, t, e, i) {
346
346
  const f = document.createElement("button");
347
347
  f.type = "button", f.className = "ui-tabela__erro-acao", f.setAttribute("part", "erro-acao"), f.textContent = "Tentar novamente", p.appendChild(h), p.appendChild(f);
348
348
  const g = document.createElement("div");
349
- g.className = "ui-tabela__sr", g.setAttribute("role", "status"), g.setAttribute("aria-live", "polite"), o.appendChild(p), o.appendChild(d), o.appendChild(a), o.appendChild(g);
350
- const _ = document.createElement("div");
351
- return _.className = "ui-tabela__loading", _.setAttribute("part", "carregando"), _.setAttribute("role", "status"), _.setAttribute("aria-live", "polite"), _.style.display = i ? "flex" : "none", _.innerHTML = `
349
+ g.className = "ui-tabela__sr", g.setAttribute("role", "status"), g.setAttribute("aria-live", "polite"), i.appendChild(p), i.appendChild(d), i.appendChild(a), i.appendChild(g);
350
+ const v = document.createElement("div");
351
+ return v.className = "ui-tabela__loading", v.setAttribute("part", "carregando"), v.setAttribute("role", "status"), v.setAttribute("aria-live", "polite"), v.style.display = o ? "flex" : "none", v.innerHTML = `
352
352
  <div class="ui-tabela__spinner" aria-hidden="true"></div>
353
353
  <span class="ui-tabela__loading-texto">Carregando dados...</span>
354
- `, o.appendChild(_), r.appendChild(o), {
355
- containerElement: o,
354
+ `, i.appendChild(v), t.appendChild(i), {
355
+ containerElement: i,
356
356
  tableElement: d,
357
- theadElement: l,
357
+ theadElement: s,
358
358
  tbodyElement: u,
359
359
  colgroupElement: c,
360
360
  emptyElement: a,
361
- loadingElement: _,
361
+ loadingElement: v,
362
362
  erroElement: p,
363
363
  anuncioElement: g
364
364
  };
365
365
  }
366
- function Le(r) {
366
+ function Oe(t) {
367
367
  var a, n;
368
- if (!r.theadElement || !r.colgroupElement) return;
369
- r.headerListeners.cleanup();
370
- const e = r.theadElement.getRootNode().activeElement, i = e && r.theadElement.contains(e) ? ((a = e.closest("th")) == null ? void 0 : a.getAttribute("data-coluna")) ?? null : null;
371
- r.theadElement.innerHTML = "", r.colgroupElement.innerHTML = "";
372
- const o = document.createElement("tr");
373
- if (o.setAttribute("aria-rowindex", "1"), r.colunas.forEach((s, d) => {
368
+ if (!t.theadElement || !t.colgroupElement) return;
369
+ t.headerListeners.cleanup();
370
+ const e = t.theadElement.getRootNode().activeElement, o = e && t.theadElement.contains(e) ? ((a = e.closest("th")) == null ? void 0 : a.getAttribute("data-coluna")) ?? null : null;
371
+ t.theadElement.innerHTML = "", t.colgroupElement.innerHTML = "";
372
+ const i = document.createElement("tr");
373
+ if (i.setAttribute("aria-rowindex", "1"), t.colunas.forEach((l, d) => {
374
374
  const c = document.createElement("col");
375
- s.largura !== void 0 && (c.style.width = r.formatWidth(s.largura)), r.colgroupElement.appendChild(c);
376
- const l = document.createElement("th"), u = r.getAlignmentClass(s.alinhamento);
377
- if (l.className = u, l.setAttribute("part", "celula-cabecalho"), l.scope = "col", l.setAttribute("data-coluna", s.id), l.style.textAlign = r.getTextAlign(s.alinhamento), s.largura !== void 0 && (l.style.width = r.formatWidth(s.largura)), s.larguraMinima !== void 0 && (l.style.minWidth = r.formatWidth(s.larguraMinima)), s.larguraMaxima !== void 0) {
378
- const v = r.formatWidth(s.larguraMaxima);
379
- l.style.maxWidth = v, l.style.overflow = "hidden", l.style.textOverflow = "ellipsis", l.style.whiteSpace = "nowrap";
375
+ l.largura !== void 0 && (c.style.width = t.formatWidth(l.largura)), t.colgroupElement.appendChild(c);
376
+ const s = document.createElement("th"), u = t.getAlignmentClass(l.alinhamento);
377
+ if (s.className = u, s.setAttribute("part", "celula-cabecalho"), s.scope = "col", s.setAttribute("data-coluna", l.id), s.style.textAlign = t.getTextAlign(l.alinhamento), l.largura !== void 0 && (s.style.width = t.formatWidth(l.largura)), l.larguraMinima !== void 0 && (s.style.minWidth = t.formatWidth(l.larguraMinima)), l.larguraMaxima !== void 0) {
378
+ const _ = t.formatWidth(l.larguraMaxima);
379
+ s.style.maxWidth = _, s.style.overflow = "hidden", s.style.textOverflow = "ellipsis", s.style.whiteSpace = "nowrap";
380
380
  }
381
- s.tooltip && (l.title = s.tooltip);
382
- const p = !!s.ordenavel && r.colunaOrdenada === s.id && r.direcaoOrdenacao !== "original", h = p && r.direcaoOrdenacao === "desc";
383
- if (s.ordenavel) {
384
- l.classList.add("ui-tabela__th--ordenavel");
385
- const v = () => r.onHeaderClick(s);
386
- r.headerListeners.add(l, "click", v), l.setAttribute("aria-sort", p ? h ? "descending" : "ascending" : "none");
381
+ l.tooltip && (s.title = l.tooltip);
382
+ const p = !!l.ordenavel && t.colunaOrdenada === l.id && t.direcaoOrdenacao !== "original", h = p && t.direcaoOrdenacao === "desc";
383
+ if (l.ordenavel) {
384
+ s.classList.add("ui-tabela__th--ordenavel");
385
+ const _ = () => t.onHeaderClick(l);
386
+ t.headerListeners.add(s, "click", _), s.setAttribute("aria-sort", p ? h ? "descending" : "ascending" : "none");
387
387
  }
388
- const m = (v) => r.onHeaderContextMenu(v, s, d, l);
389
- r.headerListeners.add(l, "contextmenu", m);
388
+ const m = (_) => t.onHeaderContextMenu(_, l, d, s);
389
+ t.headerListeners.add(s, "contextmenu", m);
390
390
  const x = document.createElement("div");
391
391
  x.className = "ui-tabela__header-content";
392
392
  const f = document.createElement("span");
393
- if (f.className = "ui-tabela__header-text", f.textContent = s.rotulo, x.appendChild(f), s.ordenavel) {
394
- const v = document.createElement("span");
395
- v.className = "ui-tabela__sort-icon";
393
+ if (f.className = "ui-tabela__header-text", f.textContent = l.rotulo, x.appendChild(f), l.ordenavel) {
394
+ const _ = document.createElement("span");
395
+ _.className = "ui-tabela__sort-icon";
396
396
  const E = p ? h ? "ui-tabela__sort-arrow--desc" : "ui-tabela__sort-arrow--asc" : "ui-tabela__sort-arrow--inativo";
397
- v.setAttribute("aria-hidden", "true"), v.innerHTML = `<svg class="ui-tabela__sort-arrow ${E}" viewBox="0 0 24 24" focusable="false"><path class="seta-cima" d="M7 11l5-5 5 5H7z"/><path class="seta-baixo" d="M7 13l5 5 5-5H7z"/></svg>`, x.appendChild(v);
397
+ _.setAttribute("aria-hidden", "true"), _.innerHTML = `<svg class="ui-tabela__sort-arrow ${E}" viewBox="0 0 24 24" focusable="false"><path class="seta-cima" d="M7 11l5-5 5 5H7z"/><path class="seta-baixo" d="M7 13l5 5 5-5H7z"/></svg>`, x.appendChild(_);
398
398
  }
399
- if (s.ordenavel) {
400
- const v = document.createElement("button");
401
- v.type = "button", v.className = "ui-tabela__ordenar", v.setAttribute("part", "ordenar"), v.appendChild(x), l.appendChild(v);
399
+ if (l.ordenavel) {
400
+ const _ = document.createElement("button");
401
+ _.type = "button", _.className = "ui-tabela__ordenar", _.setAttribute("part", "ordenar"), _.appendChild(x), s.appendChild(_);
402
402
  } else
403
- l.appendChild(x);
403
+ s.appendChild(x);
404
404
  const g = document.createElement("div");
405
- g.className = "ui-tabela__resizer", g.setAttribute("part", "redimensionador"), g.title = "Arrastar para redimensionar largura (duplo-clique para auto-ajuste)", g.tabIndex = 0, g.setAttribute("role", "separator"), g.setAttribute("aria-orientation", "vertical"), g.setAttribute("aria-label", `Redimensionar coluna ${s.rotulo}`);
406
- const _ = (v) => r.onInitColumnResize(v, s, d, l, g);
407
- r.headerListeners.add(g, "mousedown", _);
408
- const y = (v) => {
409
- const E = v;
410
- E.pointerType === "mouse" || !E.pointerType || r.onInitColumnResize(E, s, d, l, g);
405
+ g.className = "ui-tabela__resizer", g.setAttribute("part", "redimensionador"), g.title = "Arrastar para redimensionar largura (duplo-clique para auto-ajuste)", g.tabIndex = 0, g.setAttribute("role", "separator"), g.setAttribute("aria-orientation", "vertical"), g.setAttribute("aria-label", `Redimensionar coluna ${l.rotulo}`);
406
+ const v = (_) => t.onInitColumnResize(_, l, d, s, g);
407
+ t.headerListeners.add(g, "mousedown", v);
408
+ const y = (_) => {
409
+ const E = _;
410
+ E.pointerType === "mouse" || !E.pointerType || t.onInitColumnResize(E, l, d, s, g);
411
411
  };
412
- r.headerListeners.add(g, "pointerdown", y);
413
- const A = (v) => {
414
- var N, T;
415
- const E = v, D = E.shiftKey ? 50 : 10;
412
+ t.headerListeners.add(g, "pointerdown", y);
413
+ const k = (_) => {
414
+ var N, D;
415
+ const E = _, B = E.shiftKey ? 50 : 10;
416
416
  if (E.key === "ArrowRight")
417
- E.preventDefault(), (N = r.onResizeTeclado) == null || N.call(r, D, s, d, l, c);
417
+ E.preventDefault(), (N = t.onResizeTeclado) == null || N.call(t, B, l, d, s, c);
418
418
  else if (E.key === "ArrowLeft")
419
- E.preventDefault(), (T = r.onResizeTeclado) == null || T.call(r, -D, s, d, l, c);
419
+ E.preventDefault(), (D = t.onResizeTeclado) == null || D.call(t, -B, l, d, s, c);
420
420
  else if (E.key === "Enter" || E.key === "F2") {
421
421
  E.preventDefault();
422
- const C = l.getBoundingClientRect();
423
- r.onHeaderContextMenu(new MouseEvent("contextmenu", { clientX: C.left, clientY: C.bottom }), s, d, l);
422
+ const C = s.getBoundingClientRect();
423
+ t.onHeaderContextMenu(new MouseEvent("contextmenu", { clientX: C.left, clientY: C.bottom }), l, d, s);
424
424
  }
425
425
  };
426
- r.headerListeners.add(g, "keydown", A);
427
- const w = (v) => {
428
- v.stopPropagation(), r.onColumnAutoFit(s, l, c);
426
+ t.headerListeners.add(g, "keydown", k);
427
+ const w = (_) => {
428
+ _.stopPropagation(), t.onColumnAutoFit(l, s, c);
429
429
  };
430
- r.headerListeners.add(g, "dblclick", w), r.headerListeners.add(g, "click", (v) => v.stopPropagation()), l.appendChild(g), o.appendChild(l);
431
- }), r.theadElement.appendChild(o), i !== null) {
432
- const s = Array.from(o.children).find((d) => d.getAttribute("data-coluna") === i);
433
- (n = s == null ? void 0 : s.querySelector(".ui-tabela__ordenar")) == null || n.focus();
430
+ t.headerListeners.add(g, "dblclick", w), t.headerListeners.add(g, "click", (_) => _.stopPropagation()), s.appendChild(g), i.appendChild(s);
431
+ }), t.theadElement.appendChild(i), o !== null) {
432
+ const l = Array.from(i.children).find((d) => d.getAttribute("data-coluna") === o);
433
+ (n = l == null ? void 0 : l.querySelector(".ui-tabela__ordenar")) == null || n.focus();
434
434
  }
435
435
  }
436
- const Me = 'button, input, select, textarea, a, summary, [role="button"], [data-prevent-select]';
437
- function Ne(r, t) {
438
- for (const e of r.composedPath()) {
439
- if (e === t) return !1;
440
- if (e instanceof Element && e.matches(Me)) return !0;
436
+ const Ie = 'button, input, select, textarea, a, summary, [role="button"], [data-prevent-select]';
437
+ function Pe(t, r) {
438
+ for (const e of t.composedPath()) {
439
+ if (e === r) return !1;
440
+ if (e instanceof Element && e.matches(Ie)) return !0;
441
441
  }
442
442
  return !1;
443
443
  }
444
- function Te(r) {
445
- if (!r.tbodyElement || !r.tableElement || !r.emptyElement || !r.containerElement) return;
446
- if (r.tableElement.setAttribute("aria-colcount", String(r.colunas.length)), !r.dadosExibicao || r.dadosExibicao.length === 0) {
447
- r.tbodyElement.innerHTML = "", r.tableElement.setAttribute("aria-rowcount", "1"), r.tableElement.style.display = r.colunas.length > 0 ? "table" : "none", r.emptyElement.style.display = "flex";
448
- const p = r.emptyElement.querySelector(".ui-tabela__empty-text"), h = r.filtroAtivo ? r.textoSemResultados : r.textoVazio;
444
+ function Fe(t) {
445
+ if (!t.tbodyElement || !t.tableElement || !t.emptyElement || !t.containerElement) return;
446
+ if (t.tableElement.setAttribute("aria-colcount", String(t.colunas.length)), !t.dadosExibicao || t.dadosExibicao.length === 0) {
447
+ t.tbodyElement.innerHTML = "", t.tableElement.setAttribute("aria-rowcount", "1"), t.tableElement.style.display = t.colunas.length > 0 ? "table" : "none", t.emptyElement.style.display = "flex";
448
+ const p = t.emptyElement.querySelector(".ui-tabela__empty-text"), h = t.filtroAtivo ? t.textoSemResultados : t.textoVazio;
449
449
  p && h !== void 0 && (p.textContent = h);
450
450
  return;
451
451
  }
452
- r.emptyElement.style.display = "none", r.tableElement.style.display = "table", r.tableElement.setAttribute("aria-rowcount", String(r.dadosExibicao.length + 1));
453
- const t = r.dadosExibicao.length, e = r.rowHeight, i = r.virtualizar && t > 30;
454
- let o = 0, a = t;
455
- if (i) {
456
- const p = r.containerElement.scrollTop, h = r.containerElement.clientHeight || 400, m = 5;
457
- o = Math.max(0, Math.floor(p / e) - m), a = Math.min(t, Math.ceil((p + h) / e) + m);
452
+ t.emptyElement.style.display = "none", t.tableElement.style.display = "table", t.tableElement.setAttribute("aria-rowcount", String(t.dadosExibicao.length + 1));
453
+ const r = t.dadosExibicao.length, e = t.rowHeight, o = t.virtualizar && r > 30;
454
+ let i = 0, a = r;
455
+ if (o) {
456
+ const p = t.containerElement.scrollTop, h = t.containerElement.clientHeight || 400, m = 5;
457
+ i = Math.max(0, Math.floor(p / e) - m), a = Math.min(r, Math.ceil((p + h) / e) + m);
458
458
  }
459
- const s = r.tbodyElement.getRootNode().activeElement, d = s && s.parentElement === r.tbodyElement ? s.getAttribute("data-index") : null, c = r.indiceAtivo ?? null, l = c !== null && c >= o && c < a ? c : o;
460
- r.tbodyElement.innerHTML = "";
459
+ const l = t.tbodyElement.getRootNode().activeElement, d = l && l.parentElement === t.tbodyElement ? l.getAttribute("data-index") : null, c = t.indiceAtivo ?? null, s = c !== null && c >= i && c < a ? c : i;
460
+ t.tbodyElement.innerHTML = "";
461
461
  const u = document.createDocumentFragment();
462
- if (i && o > 0) {
462
+ if (o && i > 0) {
463
463
  const p = document.createElement("tr");
464
- p.className = "ui-tabela__virtual-spacer", p.setAttribute("aria-hidden", "true"), p.style.height = `${o * e}px`;
464
+ p.className = "ui-tabela__virtual-spacer", p.setAttribute("aria-hidden", "true"), p.style.height = `${i * e}px`;
465
465
  const h = document.createElement("td");
466
- h.colSpan = r.colunas.length || 1, p.appendChild(h), u.appendChild(p);
467
- }
468
- for (let p = o; p < a; p++) {
469
- const h = r.dadosExibicao[p], m = document.createElement("tr");
470
- m.setAttribute("data-index", String(p)), m.setAttribute("part", "linha"), m.setAttribute("aria-rowindex", String(p + 2)), m.setAttribute("aria-selected", "false"), m.tabIndex = p === l ? 0 : -1, p % 2 === 1 && m.classList.add("ui-tabela__tr--par");
471
- const x = r.chaveId;
472
- h[x] !== void 0 ? m.setAttribute("data-id", String(h[x])) : h.id !== void 0 ? m.setAttribute("data-id", String(h.id)) : h._id !== void 0 && m.setAttribute("data-id", String(h._id)), r.isItemSelecionado(h, p) && (m.classList.add("ui-tabela__tr--selecionada"), m.setAttribute("part", "linha linha-selecionada"), m.setAttribute("aria-current", "true"), m.setAttribute("aria-selected", "true"), m.setAttribute("data-selecionada", "true")), m.addEventListener("click", (f) => {
473
- Ne(f, m) || r.onLinhaClique(h, p);
474
- }), r.colunas.forEach((f) => {
475
- const g = document.createElement("td"), _ = r.getAlignmentClass(f.alinhamento);
476
- if (g.className = _, g.setAttribute("part", "celula"), g.style.textAlign = r.getTextAlign(f.alinhamento), f.larguraMaxima !== void 0) {
477
- const w = r.formatWidth(f.larguraMaxima);
466
+ h.colSpan = t.colunas.length || 1, p.appendChild(h), u.appendChild(p);
467
+ }
468
+ for (let p = i; p < a; p++) {
469
+ const h = t.dadosExibicao[p], m = document.createElement("tr");
470
+ m.setAttribute("data-index", String(p)), m.setAttribute("part", "linha"), m.setAttribute("aria-rowindex", String(p + 2)), m.setAttribute("aria-selected", "false"), m.tabIndex = p === s ? 0 : -1, p % 2 === 1 && m.classList.add("ui-tabela__tr--par");
471
+ const x = t.chaveId;
472
+ h[x] !== void 0 ? m.setAttribute("data-id", String(h[x])) : h.id !== void 0 ? m.setAttribute("data-id", String(h.id)) : h._id !== void 0 && m.setAttribute("data-id", String(h._id)), t.isItemSelecionado(h, p) && (m.classList.add("ui-tabela__tr--selecionada"), m.setAttribute("part", "linha linha-selecionada"), m.setAttribute("aria-current", "true"), m.setAttribute("aria-selected", "true"), m.setAttribute("data-selecionada", "true")), m.addEventListener("click", (f) => {
473
+ Pe(f, m) || t.onLinhaClique(h, p);
474
+ }), t.colunas.forEach((f) => {
475
+ const g = document.createElement("td"), v = t.getAlignmentClass(f.alinhamento);
476
+ if (g.className = v, g.setAttribute("part", "celula"), g.style.textAlign = t.getTextAlign(f.alinhamento), f.larguraMaxima !== void 0) {
477
+ const w = t.formatWidth(f.larguraMaxima);
478
478
  g.style.maxWidth = w, g.style.overflow = "hidden", g.style.textOverflow = "ellipsis", g.style.whiteSpace = "nowrap";
479
479
  }
480
480
  const y = document.createElement("div");
481
481
  y.className = "ui-tabela__cell-content", f.larguraMaxima !== void 0 && y.classList.add("ui-tabela__cell-truncate");
482
- const A = h[f.id];
482
+ const k = h[f.id];
483
483
  if (typeof f.render == "function")
484
484
  try {
485
- const w = f.render(A, h, p);
485
+ const w = f.render(k, h, p);
486
486
  w instanceof Node ? y.appendChild(w) : y.textContent = String(w ?? "");
487
487
  } catch (w) {
488
488
  console.error(`[ui-tabela] Erro no render da coluna "${f.id}" (linha ${p}):`, w), y.textContent = "";
489
489
  }
490
- else if (A instanceof Node)
491
- y.appendChild(A);
490
+ else if (k instanceof Node)
491
+ y.appendChild(k);
492
492
  else {
493
- const w = A != null ? String(A) : "";
493
+ const w = k != null ? String(k) : "";
494
494
  y.textContent = w, f.larguraMaxima !== void 0 && !f.tooltip && (g.title = w);
495
495
  }
496
496
  g.appendChild(y), m.appendChild(g);
497
497
  }), u.appendChild(m);
498
498
  }
499
- if (i && a < t) {
499
+ if (o && a < r) {
500
500
  const p = document.createElement("tr");
501
- p.className = "ui-tabela__virtual-spacer", p.setAttribute("aria-hidden", "true"), p.style.height = `${(t - a) * e}px`;
501
+ p.className = "ui-tabela__virtual-spacer", p.setAttribute("aria-hidden", "true"), p.style.height = `${(r - a) * e}px`;
502
502
  const h = document.createElement("td");
503
- h.colSpan = r.colunas.length || 1, p.appendChild(h), u.appendChild(p);
503
+ h.colSpan = t.colunas.length || 1, p.appendChild(h), u.appendChild(p);
504
504
  }
505
- if (r.tbodyElement.appendChild(u), d !== null) {
506
- const p = r.tbodyElement.querySelector(`tr[data-index="${d}"]`);
505
+ if (t.tbodyElement.appendChild(u), d !== null) {
506
+ const p = t.tbodyElement.querySelector(`tr[data-index="${d}"]`);
507
507
  p == null || p.focus({ preventScroll: !0 });
508
508
  }
509
509
  }
510
- function Q(r) {
511
- if (r === void 0) return null;
512
- const t = typeof r == "number" ? r : parseInt(r, 10);
513
- return isNaN(t) ? null : t;
510
+ function re(t) {
511
+ if (t === void 0) return null;
512
+ const r = typeof t == "number" ? t : parseInt(t, 10);
513
+ return isNaN(r) ? null : r;
514
514
  }
515
- function $(r, t) {
516
- const e = Q(r.larguraMinima);
517
- let i = Math.max(e ?? 60, t);
518
- const o = Q(r.larguraMaxima);
519
- return o !== null && (i = Math.min(o, i)), i;
515
+ function W(t, r) {
516
+ const e = re(t.larguraMinima);
517
+ let o = Math.max(e ?? 60, r);
518
+ const i = re(t.larguraMaxima);
519
+ return i !== null && (o = Math.min(i, o)), o;
520
520
  }
521
- function De(r, t, e, i) {
522
- const o = $(r, t.offsetWidth + i);
523
- return r.largura = `${o}px`, t.style.width = `${o}px`, e && (e.style.width = `${o}px`), `${o}px`;
521
+ function Ve(t, r, e, o) {
522
+ const i = W(t, r.offsetWidth + o);
523
+ return t.largura = `${i}px`, r.style.width = `${i}px`, e && (e.style.width = `${i}px`), `${i}px`;
524
524
  }
525
- function Re(r) {
525
+ function He(t) {
526
526
  const {
527
- evento: t,
527
+ evento: r,
528
528
  coluna: e,
529
- colIndex: i,
530
- thElement: o,
529
+ colIndex: o,
530
+ thElement: i,
531
531
  resizer: a,
532
532
  colgroupElement: n,
533
- onResizeStart: s,
533
+ onResizeStart: l,
534
534
  onResizeEnd: d,
535
535
  onResizeCancel: c
536
- } = r;
537
- t.stopPropagation(), t.preventDefault(), s(), a.classList.add("ui-tabela__resizer--ativo");
538
- const l = t.pageX, u = o.offsetWidth, p = n == null ? void 0 : n.children[i], h = t.type === "pointerdown", m = h ? t.pointerId : null, x = h ? "pointermove" : "mousemove", f = h ? "pointerup" : "mouseup";
536
+ } = t;
537
+ r.stopPropagation(), r.preventDefault(), l(), a.classList.add("ui-tabela__resizer--ativo");
538
+ const s = r.pageX, u = i.offsetWidth, p = n == null ? void 0 : n.children[o], h = r.type === "pointerdown", m = h ? r.pointerId : null, x = h ? "pointermove" : "mousemove", f = h ? "pointerup" : "mouseup";
539
539
  let g = !1;
540
- const _ = (w) => {
541
- const v = w;
542
- if (m !== null && v.pointerId !== m) return;
540
+ const v = (w) => {
541
+ const _ = w;
542
+ if (m !== null && _.pointerId !== m) return;
543
543
  g = !0;
544
- const E = $(e, u + (v.pageX - l));
545
- e.largura = `${E}px`, o.style.width = `${E}px`, p && (p.style.width = `${E}px`);
544
+ const E = W(e, u + (_.pageX - s));
545
+ e.largura = `${E}px`, i.style.width = `${E}px`, p && (p.style.width = `${E}px`);
546
546
  }, y = () => {
547
- A(), g ? d(String(e.largura)) : c == null || c();
548
- }, A = () => {
549
- a.classList.remove("ui-tabela__resizer--ativo"), window.removeEventListener(x, _), window.removeEventListener(f, y), h && window.removeEventListener("pointercancel", y);
547
+ k(), g ? d(String(e.largura)) : c == null || c();
548
+ }, k = () => {
549
+ a.classList.remove("ui-tabela__resizer--ativo"), window.removeEventListener(x, v), window.removeEventListener(f, y), h && window.removeEventListener("pointercancel", y);
550
550
  };
551
- return window.addEventListener(x, _), window.addEventListener(f, y), h && window.addEventListener("pointercancel", y), A;
551
+ return window.addEventListener(x, v), window.addEventListener(f, y), h && window.addEventListener("pointercancel", y), k;
552
552
  }
553
- const R = 20;
554
- let Be = 0;
555
- function Oe(r) {
556
- var T;
553
+ const O = 20;
554
+ let $e = 0;
555
+ function qe(t) {
556
+ var D;
557
557
  const {
558
- evento: t,
558
+ evento: r,
559
559
  coluna: e,
560
- colIndex: i,
561
- thElement: o,
560
+ colIndex: o,
561
+ thElement: i,
562
562
  colgroupElement: a,
563
563
  shadow: n,
564
- onResizeEnd: s
565
- } = r, d = `ui-tabela-dlg-${++Be}`, c = document.createElement("dialog");
564
+ onResizeEnd: l
565
+ } = t, d = `ui-tabela-dlg-${++$e}`, c = document.createElement("dialog");
566
566
  c.className = "ui-tabela__prompt-dialog", c.setAttribute("part", "dialogo"), c.setAttribute("aria-labelledby", `${d}-titulo`);
567
- const l = document.createElement("label");
568
- l.className = "ui-tabela__prompt-title", l.id = `${d}-titulo`, l.htmlFor = `${d}-campo`, l.textContent = `Largura de "${e.rotulo}" (px; vazio = automática)`;
567
+ const s = document.createElement("label");
568
+ s.className = "ui-tabela__prompt-title", s.id = `${d}-titulo`, s.htmlFor = `${d}-campo`, s.textContent = `Largura de "${e.rotulo}" (px; vazio = automática)`;
569
569
  const u = document.createElement("input");
570
- u.id = `${d}-campo`, u.type = "number", u.min = String(R), u.step = "1", u.setAttribute("inputmode", "numeric"), u.placeholder = "auto";
570
+ u.id = `${d}-campo`, u.type = "number", u.min = String(O), u.step = "1", u.setAttribute("inputmode", "numeric"), u.placeholder = "auto";
571
571
  const p = e.largura ? parseInt(String(e.largura), 10) : NaN;
572
572
  u.value = Number.isFinite(p) ? String(p) : "";
573
573
  const h = document.createElement("div");
@@ -577,29 +577,29 @@ function Oe(r) {
577
577
  const x = document.createElement("button");
578
578
  x.type = "button", x.textContent = "Aplicar";
579
579
  const f = document.createElement("button");
580
- f.type = "button", f.textContent = "Cancelar", m.appendChild(f), m.appendChild(x), c.appendChild(l), c.appendChild(u), c.appendChild(h), c.appendChild(m), n.appendChild(c), typeof c.showModal == "function" ? c.showModal() : c.setAttribute("open", ""), c.style.position = "fixed";
581
- const g = c.getBoundingClientRect(), _ = g.width || 240, y = g.height || 140, A = Math.max(8, Math.min(t.clientX || 0, window.innerWidth - _ - 8)), w = Math.max(8, Math.min(t.clientY || 0, window.innerHeight - y - 8));
582
- c.style.left = `${A}px`, c.style.top = `${w}px`;
583
- let v = !1;
580
+ f.type = "button", f.textContent = "Cancelar", m.appendChild(f), m.appendChild(x), c.appendChild(s), c.appendChild(u), c.appendChild(h), c.appendChild(m), n.appendChild(c), typeof c.showModal == "function" ? c.showModal() : c.setAttribute("open", ""), c.style.position = "fixed";
581
+ const g = c.getBoundingClientRect(), v = g.width || 240, y = g.height || 140, k = Math.max(8, Math.min(r.clientX || 0, window.innerWidth - v - 8)), w = Math.max(8, Math.min(r.clientY || 0, window.innerHeight - y - 8));
582
+ c.style.left = `${k}px`, c.style.top = `${w}px`;
583
+ let _ = !1;
584
584
  const E = () => {
585
585
  var C;
586
- v || (v = !0, c.open && typeof c.close == "function" && c.close(), c.remove(), (C = o.querySelector(".ui-tabela__ordenar, .ui-tabela__resizer")) == null || C.focus());
587
- }, D = (C) => {
586
+ _ || (_ = !0, c.open && typeof c.close == "function" && c.close(), c.remove(), (C = i.querySelector(".ui-tabela__ordenar, .ui-tabela__resizer")) == null || C.focus());
587
+ }, B = (C) => {
588
588
  h.textContent = C, u.setAttribute("aria-invalid", "true"), u.setAttribute("aria-describedby", h.id), u.focus();
589
589
  }, N = () => {
590
- const C = e.largura, X = u.value.trim();
591
- if (X === "")
592
- e.largura = void 0, o.style.width = "", a != null && a.children[i] && (a.children[i].style.width = "");
590
+ const C = e.largura, Z = u.value.trim();
591
+ if (Z === "")
592
+ e.largura = void 0, i.style.width = "", a != null && a.children[o] && (a.children[o].style.width = "");
593
593
  else {
594
- const F = Number(X);
595
- if (!Number.isFinite(F) || F < R) {
596
- D(`Informe um valor de pelo menos ${R} px, ou deixe vazio para automática.`);
594
+ const H = Number(Z);
595
+ if (!Number.isFinite(H) || H < O) {
596
+ B(`Informe um valor de pelo menos ${O} px, ou deixe vazio para automática.`);
597
597
  return;
598
598
  }
599
- const H = Math.round($({ ...e, larguraMinima: e.larguraMinima ?? R }, F));
600
- e.largura = `${H}px`, o.style.width = `${H}px`, a != null && a.children[i] && (a.children[i].style.width = `${H}px`);
599
+ const $ = Math.round(W({ ...e, larguraMinima: e.larguraMinima ?? O }, H));
600
+ e.largura = `${$}px`, i.style.width = `${$}px`, a != null && a.children[o] && (a.children[o].style.width = `${$}px`);
601
601
  }
602
- E(), e.largura !== C && s(e.largura ? String(e.largura) : "auto");
602
+ E(), e.largura !== C && l(e.largura ? String(e.largura) : "auto");
603
603
  };
604
604
  x.addEventListener("click", (C) => {
605
605
  C.stopPropagation(), N();
@@ -609,15 +609,15 @@ function Oe(r) {
609
609
  h.textContent = "", u.removeAttribute("aria-invalid"), u.removeAttribute("aria-describedby");
610
610
  }), u.addEventListener("keydown", (C) => {
611
611
  C.key === "Enter" ? (C.preventDefault(), N()) : C.key === "Escape" && (C.preventDefault(), E());
612
- }), u.focus(), (T = u.select) == null || T.call(u);
612
+ }), u.focus(), (D = u.select) == null || D.call(u);
613
613
  }
614
- function Ie(r, t, e, i, o, a) {
615
- return Re({
616
- evento: r,
617
- coluna: t,
614
+ function je(t, r, e, o, i, a) {
615
+ return He({
616
+ evento: t,
617
+ coluna: r,
618
618
  colIndex: e,
619
- thElement: i,
620
- resizer: o,
619
+ thElement: o,
620
+ resizer: i,
621
621
  colgroupElement: a.colgroupElement,
622
622
  onResizeStart: () => a.onSetIsResizing(!0),
623
623
  onResizeCancel: () => {
@@ -626,7 +626,7 @@ function Ie(r, t, e, i, o, a) {
626
626
  onResizeEnd: (n) => {
627
627
  setTimeout(() => a.onSetIsResizing(!1), 50), a.host.dispatchEvent(
628
628
  new CustomEvent("ui-column-resize", {
629
- detail: { idColuna: t.id, largura: n },
629
+ detail: { idColuna: r.id, largura: n },
630
630
  bubbles: !0,
631
631
  composed: !0
632
632
  })
@@ -634,18 +634,18 @@ function Ie(r, t, e, i, o, a) {
634
634
  }
635
635
  });
636
636
  }
637
- function Pe(r, t, e, i, o) {
638
- r.preventDefault(), r.stopPropagation(), Oe({
639
- evento: r,
640
- coluna: t,
637
+ function Ue(t, r, e, o, i) {
638
+ t.preventDefault(), t.stopPropagation(), qe({
639
+ evento: t,
640
+ coluna: r,
641
641
  colIndex: e,
642
- thElement: i,
643
- colgroupElement: o.colgroupElement,
644
- shadow: o.shadow,
642
+ thElement: o,
643
+ colgroupElement: i.colgroupElement,
644
+ shadow: i.shadow,
645
645
  onResizeEnd: (a) => {
646
- o.host.dispatchEvent(
646
+ i.host.dispatchEvent(
647
647
  new CustomEvent("ui-column-resize", {
648
- detail: { idColuna: t.id, largura: a },
648
+ detail: { idColuna: r.id, largura: a },
649
649
  bubbles: !0,
650
650
  composed: !0
651
651
  })
@@ -653,214 +653,214 @@ function Pe(r, t, e, i, o) {
653
653
  }
654
654
  });
655
655
  }
656
- function Fe(r, t, e, i, o) {
657
- const a = De(t, e, i, r);
658
- o.host.dispatchEvent(
656
+ function We(t, r, e, o, i) {
657
+ const a = Ve(r, e, o, t);
658
+ i.host.dispatchEvent(
659
659
  new CustomEvent("ui-column-resize", {
660
- detail: { idColuna: t.id, largura: a },
660
+ detail: { idColuna: r.id, largura: a },
661
661
  bubbles: !0,
662
662
  composed: !0
663
663
  })
664
664
  );
665
665
  }
666
- function He(r) {
667
- Le({
668
- theadElement: r.theadElement,
669
- colgroupElement: r.colgroupElement,
670
- colunas: r.colunas,
671
- colunaOrdenada: r.dadosController.getColunaOrdenada(),
672
- direcaoOrdenacao: r.dadosController.getDirecaoOrdenacao(),
673
- headerListeners: r.headerListeners,
674
- formatWidth: ae,
675
- getAlignmentClass: ne,
676
- getTextAlign: se,
677
- onHeaderClick: (t) => r.onHeaderClick(t),
678
- onHeaderContextMenu: (t, e, i, o) => {
679
- Pe(t, e, i, o, {
680
- host: r.host,
681
- colgroupElement: r.colgroupElement,
682
- shadow: r.shadow,
683
- onSetIsResizing: r.onSetIsResizing
666
+ function Xe(t) {
667
+ Oe({
668
+ theadElement: t.theadElement,
669
+ colgroupElement: t.colgroupElement,
670
+ colunas: t.colunas,
671
+ colunaOrdenada: t.dadosController.getColunaOrdenada(),
672
+ direcaoOrdenacao: t.dadosController.getDirecaoOrdenacao(),
673
+ headerListeners: t.headerListeners,
674
+ formatWidth: ce,
675
+ getAlignmentClass: ue,
676
+ getTextAlign: pe,
677
+ onHeaderClick: (r) => t.onHeaderClick(r),
678
+ onHeaderContextMenu: (r, e, o, i) => {
679
+ Ue(r, e, o, i, {
680
+ host: t.host,
681
+ colgroupElement: t.colgroupElement,
682
+ shadow: t.shadow,
683
+ onSetIsResizing: t.onSetIsResizing
684
684
  });
685
685
  },
686
- onInitColumnResize: (t, e, i, o, a) => {
687
- const n = Ie(t, e, i, o, a, {
688
- host: r.host,
689
- colgroupElement: r.colgroupElement,
690
- shadow: r.shadow,
691
- onSetIsResizing: r.onSetIsResizing
686
+ onInitColumnResize: (r, e, o, i, a) => {
687
+ const n = je(r, e, o, i, a, {
688
+ host: t.host,
689
+ colgroupElement: t.colgroupElement,
690
+ shadow: t.shadow,
691
+ onSetIsResizing: t.onSetIsResizing
692
692
  });
693
- r.onActiveResizeCleanup(n);
693
+ t.onActiveResizeCleanup(n);
694
694
  },
695
- onResizeTeclado: (t, e, i, o, a) => {
696
- Fe(t, e, o, a, {
697
- host: r.host,
698
- colgroupElement: r.colgroupElement,
699
- shadow: r.shadow,
700
- onSetIsResizing: r.onSetIsResizing
695
+ onResizeTeclado: (r, e, o, i, a) => {
696
+ We(r, e, i, a, {
697
+ host: t.host,
698
+ colgroupElement: t.colgroupElement,
699
+ shadow: t.shadow,
700
+ onSetIsResizing: t.onSetIsResizing
701
701
  });
702
702
  },
703
- onColumnAutoFit: (t, e, i) => {
704
- t.largura = void 0, e.style.width = "", i.style.width = "", r.host.dispatchEvent(
703
+ onColumnAutoFit: (r, e, o) => {
704
+ r.largura = void 0, e.style.width = "", o.style.width = "", t.host.dispatchEvent(
705
705
  new CustomEvent("ui-column-resize", {
706
706
  bubbles: !0,
707
707
  composed: !0,
708
- detail: { idColuna: t.id, largura: "auto" }
708
+ detail: { idColuna: r.id, largura: "auto" }
709
709
  })
710
710
  );
711
711
  }
712
712
  });
713
713
  }
714
- function Ve(r) {
715
- Te({
716
- tbodyElement: r.tbodyElement,
717
- tableElement: r.tableElement,
718
- emptyElement: r.emptyElement,
719
- containerElement: r.containerElement,
720
- dadosExibicao: r.dadosController.getDadosExibicao(),
721
- colunas: r.colunas,
722
- chaveId: r.chaveId,
723
- virtualizar: r.virtualizar,
724
- rowHeight: r.rowHeight,
725
- indiceAtivo: r.indiceAtivo,
726
- filtroAtivo: r.dadosController.temFiltro(),
727
- textoVazio: r.textoVazio,
728
- textoSemResultados: r.textoSemResultados,
729
- isItemSelecionado: (t, e) => r.selecaoController.isItemSelecionado(t, e),
730
- onLinhaClique: (t, e) => {
731
- r.selecaoController.setItemSelecionado(t), r.host.dispatchEvent(
714
+ function Ye(t) {
715
+ Fe({
716
+ tbodyElement: t.tbodyElement,
717
+ tableElement: t.tableElement,
718
+ emptyElement: t.emptyElement,
719
+ containerElement: t.containerElement,
720
+ dadosExibicao: t.dadosController.getDadosExibicao(),
721
+ colunas: t.colunas,
722
+ chaveId: t.chaveId,
723
+ virtualizar: t.virtualizar,
724
+ rowHeight: t.rowHeight,
725
+ indiceAtivo: t.indiceAtivo,
726
+ filtroAtivo: t.dadosController.temFiltro(),
727
+ textoVazio: t.textoVazio,
728
+ textoSemResultados: t.textoSemResultados,
729
+ isItemSelecionado: (r, e) => t.selecaoController.isItemSelecionado(r, e),
730
+ onLinhaClique: (r, e) => {
731
+ t.selecaoController.setItemSelecionado(r), t.host.dispatchEvent(
732
732
  new CustomEvent("ui-linha-clique", {
733
733
  bubbles: !0,
734
734
  composed: !0,
735
- detail: { item: t, indice: e }
735
+ detail: { item: r, indice: e }
736
736
  })
737
737
  );
738
738
  },
739
- formatWidth: ae,
740
- getAlignmentClass: ne,
741
- getTextAlign: se
739
+ formatWidth: ce,
740
+ getAlignmentClass: ue,
741
+ getTextAlign: pe
742
742
  });
743
743
  }
744
- function qe(r, t) {
744
+ function Ge(t, r) {
745
745
  let e = !1;
746
- const i = () => {
746
+ const o = () => {
747
747
  e || (window.requestAnimationFrame(() => {
748
748
  try {
749
- t();
749
+ r();
750
750
  } finally {
751
751
  e = !1;
752
752
  }
753
753
  }), e = !0);
754
754
  };
755
- return r.addEventListener("scroll", i), i;
756
- }
757
- function $e(r, t, e, i) {
758
- return Se(r, t, e, i);
759
- }
760
- function le(r) {
761
- const t = r.host.getAttribute("texto-vazio") || r.host.getAttribute("empty-text");
762
- t && r.onTextoVazioAlterado(t);
763
- const e = r.host.getAttribute("virtualizar") || r.host.getAttribute("virtualize");
764
- e !== null && r.onVirtualizarAlterado(e !== "false"), r.onSrcLido(r.host.getAttribute("src"));
765
- const i = r.host.hasAttribute("carregando") || r.host.hasAttribute("loading");
766
- r.onCarregandoAlterado(i), r.loadingElement && (r.loadingElement.style.display = i ? "flex" : "none");
767
- }
768
- function je(r, t, e) {
769
- if (le(e), r === "src") {
770
- t && e.host.isConnected && e.onCarregarSrc(t);
755
+ return t.addEventListener("scroll", o), o;
756
+ }
757
+ function Ke(t, r, e, o) {
758
+ return Be(t, r, e, o);
759
+ }
760
+ function he(t) {
761
+ const r = t.host.getAttribute("texto-vazio") || t.host.getAttribute("empty-text");
762
+ r && t.onTextoVazioAlterado(r);
763
+ const e = t.host.getAttribute("virtualizar") || t.host.getAttribute("virtualize");
764
+ e !== null && t.onVirtualizarAlterado(e !== "false"), t.onSrcLido(t.host.getAttribute("src"));
765
+ const o = t.host.hasAttribute("carregando") || t.host.hasAttribute("loading");
766
+ t.onCarregandoAlterado(o), t.loadingElement && (t.loadingElement.style.display = o ? "flex" : "none");
767
+ }
768
+ function Qe(t, r, e) {
769
+ if (he(e), t === "src") {
770
+ r && e.host.isConnected && e.onCarregarSrc(r);
771
771
  return;
772
772
  }
773
- if (r === "max-height" && e.containerElement) {
774
- e.containerElement.style.maxHeight = t || "";
773
+ if (t === "max-height" && e.containerElement) {
774
+ e.containerElement.style.maxHeight = r || "";
775
775
  return;
776
776
  }
777
- if ((r === "texto-vazio" || r === "empty-text") && e.emptyElement) {
778
- const i = e.emptyElement.querySelector(".ui-tabela__empty-text");
779
- i && t && (i.textContent = t), e.onRenderBody();
777
+ if ((t === "texto-vazio" || t === "empty-text") && e.emptyElement) {
778
+ const o = e.emptyElement.querySelector(".ui-tabela__empty-text");
779
+ o && r && (o.textContent = r), e.onRenderBody();
780
780
  return;
781
781
  }
782
- if (r === "carregando" || r === "loading") {
783
- e.loadingElement && (e.loadingElement.style.display = t !== null ? "flex" : "none");
782
+ if (t === "carregando" || t === "loading") {
783
+ e.loadingElement && (e.loadingElement.style.display = r !== null ? "flex" : "none");
784
784
  return;
785
785
  }
786
- if (r === "densidade" || r === "density") {
786
+ if (t === "densidade" || t === "density") {
787
787
  e.onRenderBody();
788
788
  return;
789
789
  }
790
790
  e.onRenderTotal();
791
791
  }
792
- function Ue(r, t, e, i) {
793
- if (r === "Enter" || r === " ") return { tipo: "ativar" };
794
- if (!Number.isInteger(t) || !Number.isInteger(e) || e < 0) return null;
795
- const o = Math.max(1, Math.floor(Number.isFinite(i) ? i : 1)), a = (n) => Math.min(e, Math.max(0, n));
796
- switch (r) {
792
+ function Ze(t, r, e, o) {
793
+ if (t === "Enter" || t === " ") return { tipo: "ativar" };
794
+ if (!Number.isInteger(r) || !Number.isInteger(e) || e < 0) return null;
795
+ const i = Math.max(1, Math.floor(Number.isFinite(o) ? o : 1)), a = (n) => Math.min(e, Math.max(0, n));
796
+ switch (t) {
797
797
  case "ArrowDown":
798
- return { tipo: "mover", indice: a(t + 1) };
798
+ return { tipo: "mover", indice: a(r + 1) };
799
799
  case "ArrowUp":
800
- return { tipo: "mover", indice: a(t - 1) };
800
+ return { tipo: "mover", indice: a(r - 1) };
801
801
  case "Home":
802
802
  return { tipo: "mover", indice: 0 };
803
803
  case "End":
804
804
  return { tipo: "mover", indice: e };
805
805
  case "PageDown":
806
- return { tipo: "mover", indice: a(t + o) };
806
+ return { tipo: "mover", indice: a(r + i) };
807
807
  case "PageUp":
808
- return { tipo: "mover", indice: a(t - o) };
808
+ return { tipo: "mover", indice: a(r - i) };
809
809
  default:
810
810
  return null;
811
811
  }
812
812
  }
813
- const We = "Não foi possível carregar os dados.", Xe = "Nenhum resultado para o filtro";
814
- function Ye(r, t, e, i) {
815
- if (!r) return;
816
- if (!t) {
817
- r.style.display = "none";
813
+ const Je = "Não foi possível carregar os dados.", et = "Nenhum resultado para o filtro";
814
+ function tt(t, r, e, o) {
815
+ if (!t) return;
816
+ if (!r) {
817
+ t.style.display = "none";
818
818
  return;
819
819
  }
820
- const o = r.querySelector(".ui-tabela__erro-mensagem"), a = r.querySelector(".ui-tabela__erro-detalhe");
821
- o && (o.textContent = e || We), a && (a.textContent = t.erro || "");
822
- const n = r.querySelector(".ui-tabela__erro-acao");
823
- n && (n.style.display = i ? "" : "none"), r.style.display = "flex";
820
+ const i = t.querySelector(".ui-tabela__erro-mensagem"), a = t.querySelector(".ui-tabela__erro-detalhe");
821
+ i && (i.textContent = e || Je), a && (a.textContent = r.erro || "");
822
+ const n = t.querySelector(".ui-tabela__erro-acao");
823
+ n && (n.style.display = o ? "" : "none"), t.style.display = "flex";
824
824
  }
825
- function Ge(r, t, e, i) {
826
- r && (r.textContent = e ? t === 0 ? i : `${t} ${t === 1 ? "registro encontrado" : "registros encontrados"}` : "");
825
+ function rt(t, r, e, o) {
826
+ t && (t.textContent = e ? r === 0 ? o : `${r} ${r === 1 ? "registro encontrado" : "registros encontrados"}` : "");
827
827
  }
828
- function Ke({ tabela: r, container: t }, e, i) {
829
- r && (e ? r.setAttribute("aria-label", e) : r.removeAttribute("aria-label"), r.setAttribute("aria-busy", String(i)), t && (e ? (t.setAttribute("role", "region"), t.setAttribute("aria-label", e)) : (t.removeAttribute("role"), t.removeAttribute("aria-label"))));
828
+ function ot({ tabela: t, container: r }, e, o) {
829
+ t && (e ? t.setAttribute("aria-label", e) : t.removeAttribute("aria-label"), t.setAttribute("aria-busy", String(o)), r && (e ? (r.setAttribute("role", "region"), r.setAttribute("aria-label", e)) : (r.removeAttribute("role"), r.removeAttribute("aria-label"))));
830
830
  }
831
- const Qe = 800;
832
- function Z(r, t, e) {
833
- const i = r.getBoundingClientRect(), o = t.getBoundingClientRect(), a = i.top + r.clientTop + e, n = i.top + r.clientTop + r.clientHeight;
834
- return o.top < a ? o.top - a : o.bottom > n ? Math.min(o.bottom - n, o.top - a) : 0;
831
+ const it = 800;
832
+ function oe(t, r, e) {
833
+ const o = t.getBoundingClientRect(), i = r.getBoundingClientRect(), a = o.top + t.clientTop + e, n = o.top + t.clientTop + t.clientHeight;
834
+ return i.top < a ? i.top - a : i.bottom > n ? Math.min(i.bottom - n, i.top - a) : 0;
835
835
  }
836
- function J(r, t, e) {
837
- e === "smooth" && typeof r.scrollTo == "function" ? r.scrollTo({ top: t, behavior: "smooth" }) : r.scrollTop = t;
836
+ function ie(t, r, e) {
837
+ e === "smooth" && typeof t.scrollTo == "function" ? t.scrollTo({ top: r, behavior: "smooth" }) : t.scrollTop = r;
838
838
  }
839
- class Ze {
840
- constructor(t) {
839
+ class at {
840
+ constructor(r) {
841
841
  b(this, "cancelarCorrecao", null);
842
- this.p = t;
842
+ this.p = r;
843
843
  }
844
844
  alturaCabecalho() {
845
- var t;
846
- return ((t = this.p.cabecalho()) == null ? void 0 : t.offsetHeight) ?? 0;
845
+ var r;
846
+ return ((r = this.p.cabecalho()) == null ? void 0 : r.offsetHeight) ?? 0;
847
847
  }
848
848
  /** Linhas inteiras que cabem na área visível (mínimo 1). */
849
849
  linhasPorPagina() {
850
850
  var e;
851
- const t = (((e = this.p.container()) == null ? void 0 : e.clientHeight) ?? 0) - this.alturaCabecalho();
852
- return Math.max(1, Math.floor(t / this.p.alturaLinha()));
851
+ const r = (((e = this.p.container()) == null ? void 0 : e.clientHeight) ?? 0) - this.alturaCabecalho();
852
+ return Math.max(1, Math.floor(r / this.p.alturaLinha()));
853
853
  }
854
854
  /** Foca a linha, renderizando a janela virtual se necessário, e a mantém visível abaixo do cabeçalho fixo. */
855
- focar(t) {
856
- const e = this.p.container(), i = this.p.tbody();
857
- if (!e || !i) return;
858
- this.p.aoLinhaAtiva(t);
859
- const o = `tr[data-index="${t}"]`;
860
- let a = i.querySelector(o);
861
- if (a || (e.scrollTop = Math.max(0, t * this.p.alturaLinha() - e.clientHeight / 2), this.p.renderizarCorpo(), a = i.querySelector(o)), !a) return;
855
+ focar(r) {
856
+ const e = this.p.container(), o = this.p.tbody();
857
+ if (!e || !o) return;
858
+ this.p.aoLinhaAtiva(r);
859
+ const i = `tr[data-index="${r}"]`;
860
+ let a = o.querySelector(i);
861
+ if (a || (e.scrollTop = Math.max(0, r * this.p.alturaLinha() - e.clientHeight / 2), this.p.renderizarCorpo(), a = o.querySelector(i)), !a) return;
862
862
  a.focus({ preventScroll: !0 });
863
- const n = Z(e, a, this.alturaCabecalho());
863
+ const n = oe(e, a, this.alturaCabecalho());
864
864
  n && (e.scrollTop += n);
865
865
  }
866
866
  /**
@@ -869,39 +869,39 @@ class Ze {
869
869
  * real da linha. No modo suave a correção ocorre ao fim da animação (`scrollend`, com timeout de
870
870
  * segurança para navegadores sem o evento ou quando não há rolagem a fazer).
871
871
  */
872
- posicionar(t, e) {
873
- const i = this.p.container(), o = this.p.tbody();
874
- if (!i || !o) return !1;
872
+ posicionar(r, e) {
873
+ const o = this.p.container(), i = this.p.tbody();
874
+ if (!o || !i) return !1;
875
875
  this.cancelar();
876
- const a = () => o.querySelector(`tr[data-index="${t}"]`), n = (u) => {
876
+ const a = () => i.querySelector(`tr[data-index="${r}"]`), n = (u) => {
877
877
  const p = a();
878
878
  if (!p) return;
879
- const h = Z(i, p, this.alturaCabecalho());
880
- h && J(i, i.scrollTop + h, u);
879
+ const h = oe(o, p, this.alturaCabecalho());
880
+ h && ie(o, o.scrollTop + h, u);
881
881
  };
882
882
  if (a())
883
883
  return n(e), !0;
884
- const s = () => {
885
- i.scrollTop = Math.max(0, t * this.p.alturaLinha()), this.p.renderizarCorpo(), n("auto"), this.p.renderizarCorpo();
884
+ const l = () => {
885
+ o.scrollTop = Math.max(0, r * this.p.alturaLinha()), this.p.renderizarCorpo(), n("auto"), this.p.renderizarCorpo();
886
886
  };
887
887
  if (e === "auto")
888
- return s(), !0;
889
- J(i, Math.max(0, t * this.p.alturaLinha()), "smooth");
888
+ return l(), !0;
889
+ ie(o, Math.max(0, r * this.p.alturaLinha()), "smooth");
890
890
  let d = !0;
891
891
  const c = () => {
892
- d && (this.cancelar(), this.p.renderizarCorpo(), a() ? n("smooth") : s());
893
- }, l = window.setTimeout(c, Qe);
894
- return i.addEventListener("scrollend", c, { once: !0 }), this.cancelarCorrecao = () => {
895
- d = !1, window.clearTimeout(l), i.removeEventListener("scrollend", c), this.cancelarCorrecao = null;
892
+ d && (this.cancelar(), this.p.renderizarCorpo(), a() ? n("smooth") : l());
893
+ }, s = window.setTimeout(c, it);
894
+ return o.addEventListener("scrollend", c, { once: !0 }), this.cancelarCorrecao = () => {
895
+ d = !1, window.clearTimeout(s), o.removeEventListener("scrollend", c), this.cancelarCorrecao = null;
896
896
  }, !0;
897
897
  }
898
898
  /** Cancela a correção pendente de uma rolagem suave (nova rolagem, desconexão). */
899
899
  cancelar() {
900
- var t;
901
- (t = this.cancelarCorrecao) == null || t.call(this);
900
+ var r;
901
+ (r = this.cancelarCorrecao) == null || r.call(this);
902
902
  }
903
903
  }
904
- class Je extends oe {
904
+ class nt extends de {
905
905
  constructor() {
906
906
  super();
907
907
  b(this, "shadow");
@@ -926,13 +926,13 @@ class Je extends oe {
926
926
  b(this, "_erro", null);
927
927
  b(this, "_scrollHandler", null);
928
928
  b(this, "_activeResizeCleanup", null);
929
- b(this, "_headerListeners", new I());
930
- b(this, "_corpoListeners", new I());
929
+ b(this, "_headerListeners", new P());
930
+ b(this, "_corpoListeners", new P());
931
931
  /** Linha com o foco móvel (navegação por teclado); null = primeira linha visível. */
932
932
  b(this, "_indiceAtivo", null);
933
933
  /** Altura real das linhas medida no DOM; null = usa a estimativa da densidade. */
934
934
  b(this, "_alturaLinhaMedida", null);
935
- b(this, "rolagem", new Ze({
935
+ b(this, "rolagem", new at({
936
936
  container: () => this._containerElement,
937
937
  tbody: () => this._tbodyElement,
938
938
  cabecalho: () => this._theadElement,
@@ -944,23 +944,23 @@ class Je extends oe {
944
944
  }));
945
945
  b(this, "remotaController");
946
946
  b(this, "selecaoController");
947
- b(this, "dadosController", new ke());
947
+ b(this, "dadosController", new De());
948
948
  /** Mantém um único tabindex=0 (foco móvel): Tab entra na tabela pela última linha ativa. */
949
949
  b(this, "handleFocoLinha", (e) => {
950
- const i = e.target;
951
- i.parentElement !== this._tbodyElement || !i.hasAttribute("data-index") || this.definirLinhaAtiva(Number(i.getAttribute("data-index")));
950
+ const o = e.target;
951
+ o.parentElement !== this._tbodyElement || !o.hasAttribute("data-index") || this.definirLinhaAtiva(Number(o.getAttribute("data-index")));
952
952
  });
953
953
  /**
954
954
  * Teclado nas linhas: setas, Home/End e PageUp/PageDown movem o foco;
955
955
  * Enter/Espaço selecionam a linha (mesmo caminho do clique, emite `ui-linha-clique`).
956
956
  */
957
957
  b(this, "handleTecladoCorpo", (e) => {
958
- const i = e.target;
959
- if (i.parentElement !== this._tbodyElement || !i.hasAttribute("data-index")) return;
960
- const o = this.dadosController.getDadosExibicao().length - 1, a = Ue(e.key, Number(i.getAttribute("data-index")), o, this.rolagem.linhasPorPagina());
961
- a && (e.preventDefault(), a.tipo === "ativar" ? i.click() : this.rolagem.focar(a.indice));
958
+ const o = e.target;
959
+ if (o.parentElement !== this._tbodyElement || !o.hasAttribute("data-index")) return;
960
+ const i = this.dadosController.getDadosExibicao().length - 1, a = Ze(e.key, Number(o.getAttribute("data-index")), i, this.rolagem.linhasPorPagina());
961
+ a && (e.preventDefault(), a.tipo === "ativar" ? o.click() : this.rolagem.focar(a.indice));
962
962
  });
963
- this.shadow = this.attachShadow({ mode: "open" }), this.remotaController = new ge({
963
+ this.shadow = this.attachShadow({ mode: "open" }), this.remotaController = new Ce({
964
964
  host: this,
965
965
  onCarregandoAlterado: (e) => {
966
966
  this.carregando = e;
@@ -970,13 +970,13 @@ class Je extends oe {
970
970
  },
971
971
  getOpcoes: () => this._fetchOpcoes,
972
972
  getFetcher: () => this._fetcher
973
- }), this.selecaoController = new Ee({
973
+ }), this.selecaoController = new Se({
974
974
  host: this,
975
975
  getTbody: () => this._tbodyElement,
976
976
  getDadosExibicao: () => this.dadosController.getDadosExibicao(),
977
977
  getDadosOriginais: () => this.dadosController.getDadosOriginais(),
978
978
  getChaveId: () => this.chaveId,
979
- onRolarParaIndice: (e, i) => this.rolagem.posicionar(e, i),
979
+ onRolarParaIndice: (e, o) => this.rolagem.posicionar(e, o),
980
980
  onLinhaAtiva: (e) => this.definirLinhaAtiva(e)
981
981
  }), this.addEventListener("ui-fetch-erro", (e) => this.mostrarErro(e.detail)), this.addEventListener("ui-fetch-start", () => this.mostrarErro(null)), this.addEventListener("ui-fetch-sucesso", () => this.mostrarErro(null));
982
982
  }
@@ -989,17 +989,17 @@ class Je extends oe {
989
989
  disconnectedCallback() {
990
990
  this.cleanupEventListeners();
991
991
  }
992
- attributeChangedCallback(e, i, o) {
993
- e === "ordenacao-remota" && (this.dadosController.setOrdenacaoRemota(o !== null), this.atualizarContextoSelecao()), (e === "densidade" || e === "density" || e === "altura-linha" || e === "row-height") && (this._alturaLinhaMedida = null), (e === "altura-linha" || e === "row-height") && this.aplicarAlturaLinha(), (e === "chave-id" || e === "id-key") && this.atualizarContextoSelecao(), je(e, o, this.obterContextoAtributos()), this.sincronizarAria();
992
+ attributeChangedCallback(e, o, i) {
993
+ e === "ordenacao-remota" && (this.dadosController.setOrdenacaoRemota(i !== null), this.atualizarContextoSelecao()), (e === "densidade" || e === "density" || e === "altura-linha" || e === "row-height") && (this._alturaLinhaMedida = null), (e === "altura-linha" || e === "row-height") && this.aplicarAlturaLinha(), (e === "chave-id" || e === "id-key") && this.atualizarContextoSelecao(), Qe(e, i, this.obterContextoAtributos()), this.sincronizarAria();
994
994
  }
995
995
  /** Nome acessível vem do host (`aria-label`); `aria-busy` acompanha o carregamento remoto. */
996
996
  sincronizarAria() {
997
- this._tableElement && (Ke({ tabela: this._tableElement, container: this._containerElement }, this.getAttribute("aria-label"), this._carregando), this.atualizarTextosEstado());
997
+ this._tableElement && (ot({ tabela: this._tableElement, container: this._containerElement }, this.getAttribute("aria-label"), this._carregando), this.atualizarTextosEstado());
998
998
  }
999
999
  /** Textos de estado configuráveis por atributo (carregando, sem resultados, erro). */
1000
1000
  atualizarTextosEstado() {
1001
- var i;
1002
- const e = (i = this._loadingElement) == null ? void 0 : i.querySelector(".ui-tabela__loading-texto");
1001
+ var o;
1002
+ const e = (o = this._loadingElement) == null ? void 0 : o.querySelector(".ui-tabela__loading-texto");
1003
1003
  e && (e.textContent = this.getAttribute("texto-carregando") || "Carregando dados..."), this.renderizarErro();
1004
1004
  }
1005
1005
  /** Mostra (ou oculta, com null) o aviso de erro de carregamento com a ação "Tentar novamente". */
@@ -1007,11 +1007,11 @@ class Je extends oe {
1007
1007
  this._erro = e, this.renderizarErro();
1008
1008
  }
1009
1009
  renderizarErro() {
1010
- Ye(this._erroElement, this._erro, this.getAttribute("texto-erro"), !!this._src);
1010
+ tt(this._erroElement, this._erro, this.getAttribute("texto-erro"), !!this._src);
1011
1011
  }
1012
1012
  /** Anuncia ao leitor de tela o resultado do filtro (a região é limpa sem filtro ativo). */
1013
1013
  anunciarResultado() {
1014
- Ge(
1014
+ rt(
1015
1015
  this._anuncioElement,
1016
1016
  this.dadosController.getDadosExibicao().length,
1017
1017
  this.dadosController.temFiltro(),
@@ -1019,10 +1019,10 @@ class Je extends oe {
1019
1019
  );
1020
1020
  }
1021
1021
  _textoSemResultados() {
1022
- return this.getAttribute("texto-sem-resultados") || Xe;
1022
+ return this.getAttribute("texto-sem-resultados") || et;
1023
1023
  }
1024
1024
  syncAttributes() {
1025
- le(this.obterContextoAtributos());
1025
+ he(this.obterContextoAtributos());
1026
1026
  }
1027
1027
  obterContextoAtributos() {
1028
1028
  return {
@@ -1099,7 +1099,7 @@ class Je extends oe {
1099
1099
  return this._colunas;
1100
1100
  }
1101
1101
  set colunas(e) {
1102
- this._colunas = Array.isArray(e) ? e.filter((i) => i != null).map((i) => ({ ...i })) : [], this.dadosController.setColunas(this._colunas), this.dadosController.setColunasFiltro(this._colunas.map((i) => i.id)), this._alturaLinhaMedida = null, this.renderTotal();
1102
+ this._colunas = Array.isArray(e) ? e.filter((o) => o != null).map((o) => ({ ...o })) : [], this.dadosController.setColunas(this._colunas), this.dadosController.setColunasFiltro(this._colunas.map((o) => o.id)), this._alturaLinhaMedida = null, this.renderTotal();
1103
1103
  }
1104
1104
  get dados() {
1105
1105
  return this.dadosController.getDadosOriginais();
@@ -1167,16 +1167,16 @@ class Je extends oe {
1167
1167
  }
1168
1168
  handleHeaderClick(e) {
1169
1169
  if (!e.ordenavel || this._isResizing) return;
1170
- const i = this.dadosController.getColunaOrdenada(), o = this.dadosController.getDirecaoOrdenacao(), a = this.dadosController.alternarOrdenacaoColuna(e);
1170
+ const o = this.dadosController.getColunaOrdenada(), i = this.dadosController.getDirecaoOrdenacao(), a = this.dadosController.alternarOrdenacaoColuna(e);
1171
1171
  if (!a) return;
1172
1172
  this.atualizarContextoSelecao(), this.renderHeader(), this.renderBody();
1173
1173
  const n = new CustomEvent("ui-sort", { detail: a, bubbles: !0, composed: !0, cancelable: !0 });
1174
- this.dispatchEvent(n), n.defaultPrevented && (this.dadosController.restaurarOrdenacao(i, o), this.atualizarContextoSelecao(), this.renderHeader(), this.renderBody());
1174
+ this.dispatchEvent(n), n.defaultPrevented && (this.dadosController.restaurarOrdenacao(o, i), this.atualizarContextoSelecao(), this.renderHeader(), this.renderBody());
1175
1175
  }
1176
1176
  /** Altura fixa das linhas em px (`altura-linha`), sobrepõe a densidade; null = vale a densidade. */
1177
1177
  get alturaLinha() {
1178
- const e = this.getAttribute("altura-linha") ?? this.getAttribute("row-height"), i = e === null ? NaN : parseFloat(e);
1179
- return Number.isFinite(i) && i > 0 ? i : null;
1178
+ const e = this.getAttribute("altura-linha") ?? this.getAttribute("row-height"), o = e === null ? NaN : parseFloat(e);
1179
+ return Number.isFinite(o) && o > 0 ? o : null;
1180
1180
  }
1181
1181
  set alturaLinha(e) {
1182
1182
  e && e > 0 ? this.setAttribute("altura-linha", String(e)) : (this.removeAttribute("altura-linha"), this.removeAttribute("row-height"));
@@ -1188,7 +1188,7 @@ class Je extends oe {
1188
1188
  }
1189
1189
  /** Altura usada na virtualização: a fixa (`altura-linha`), a medida no DOM ou a estimativa da densidade. */
1190
1190
  getRowHeight() {
1191
- return this.alturaLinha ?? this._alturaLinhaMedida ?? K(this.densidade);
1191
+ return this.alturaLinha ?? this._alturaLinhaMedida ?? te(this.densidade);
1192
1192
  }
1193
1193
  /**
1194
1194
  * Mede a altura real das linhas uma vez por configuração (densidade/colunas): padding, fonte e
@@ -1199,12 +1199,12 @@ class Je extends oe {
1199
1199
  if (this._alturaLinhaMedida !== null || !this._tbodyElement) return;
1200
1200
  const e = this._tbodyElement.querySelectorAll("tr[data-index]");
1201
1201
  if (e.length === 0) return;
1202
- let i = 0;
1202
+ let o = 0;
1203
1203
  e.forEach((a) => {
1204
- i += a.getBoundingClientRect().height;
1204
+ o += a.getBoundingClientRect().height;
1205
1205
  });
1206
- const o = i / e.length;
1207
- o <= 0 || (this._alturaLinhaMedida = o, Math.abs(o - K(this.densidade)) > 0.5 && this.renderBody());
1206
+ const i = o / e.length;
1207
+ i <= 0 || (this._alturaLinhaMedida = i, Math.abs(i - te(this.densidade)) > 0.5 && this.renderBody());
1208
1208
  }
1209
1209
  /** Ordenar, filtrar, trocar os dados ou a chave mantém a linha selecionada (se ainda existir). */
1210
1210
  atualizarContextoSelecao() {
@@ -1215,25 +1215,25 @@ class Je extends oe {
1215
1215
  if (this.shadow) {
1216
1216
  if (this._containerElement) {
1217
1217
  if (this._containerElement.style.maxHeight = this.getAttribute("max-height") || "", this._emptyElement) {
1218
- const i = this._emptyElement.querySelector(".ui-tabela__empty-text");
1219
- i && (i.textContent = this._textoVazio);
1218
+ const o = this._emptyElement.querySelector(".ui-tabela__empty-text");
1219
+ o && (o.textContent = this._textoVazio);
1220
1220
  }
1221
1221
  } else {
1222
1222
  this.cleanupEventListeners();
1223
- const i = $e(this.shadow, this._textoVazio, this.getAttribute("max-height"), this._carregando);
1224
- this._containerElement = i.containerElement, this._tableElement = i.tableElement, this._colgroupElement = i.colgroupElement, this._theadElement = i.theadElement, this._tbodyElement = i.tbodyElement, this._emptyElement = i.emptyElement, this._loadingElement = i.loadingElement, this._erroElement = i.erroElement, this._anuncioElement = i.anuncioElement, (e = i.erroElement.querySelector(".ui-tabela__erro-acao")) == null || e.addEventListener("click", () => {
1223
+ const o = Ke(this.shadow, this._textoVazio, this.getAttribute("max-height"), this._carregando);
1224
+ this._containerElement = o.containerElement, this._tableElement = o.tableElement, this._colgroupElement = o.colgroupElement, this._theadElement = o.theadElement, this._tbodyElement = o.tbodyElement, this._emptyElement = o.emptyElement, this._loadingElement = o.loadingElement, this._erroElement = o.erroElement, this._anuncioElement = o.anuncioElement, (e = o.erroElement.querySelector(".ui-tabela__erro-acao")) == null || e.addEventListener("click", () => {
1225
1225
  this.recarregar();
1226
1226
  });
1227
1227
  }
1228
- this.renderHeader(), this.renderBody(), this._virtualizar && this._containerElement && !this._scrollHandler && (this._scrollHandler = qe(this._containerElement, () => this.renderBody())), this._tbodyElement && this._corpoListeners.size === 0 && (this._corpoListeners.add(this._tbodyElement, "keydown", this.handleTecladoCorpo), this._corpoListeners.add(this._tbodyElement, "focusin", this.handleFocoLinha)), this.sincronizarAria();
1228
+ this.renderHeader(), this.renderBody(), this._virtualizar && this._containerElement && !this._scrollHandler && (this._scrollHandler = Ge(this._containerElement, () => this.renderBody())), this._tbodyElement && this._corpoListeners.size === 0 && (this._corpoListeners.add(this._tbodyElement, "keydown", this.handleTecladoCorpo), this._corpoListeners.add(this._tbodyElement, "focusin", this.handleFocoLinha)), this.sincronizarAria();
1229
1229
  }
1230
1230
  }
1231
1231
  definirLinhaAtiva(e) {
1232
1232
  this._indiceAtivo = e;
1233
- const i = this._tbodyElement, o = i == null ? void 0 : i.querySelector(`tr[data-index="${e}"]`);
1234
- !i || !o || (i.querySelectorAll('tr[tabindex="0"]').forEach((a) => {
1235
- a !== o && (a.tabIndex = -1);
1236
- }), o.tabIndex = 0);
1233
+ const o = this._tbodyElement, i = o == null ? void 0 : o.querySelector(`tr[data-index="${e}"]`);
1234
+ !o || !i || (o.querySelectorAll('tr[tabindex="0"]').forEach((a) => {
1235
+ a !== i && (a.tabIndex = -1);
1236
+ }), i.tabIndex = 0);
1237
1237
  }
1238
1238
  obterContextoRenderizador() {
1239
1239
  return {
@@ -1265,102 +1265,102 @@ class Je extends oe {
1265
1265
  };
1266
1266
  }
1267
1267
  renderHeader() {
1268
- He(this.obterContextoRenderizador());
1268
+ Xe(this.obterContextoRenderizador());
1269
1269
  }
1270
1270
  renderBody() {
1271
- Ve(this.obterContextoRenderizador()), this.anunciarResultado(), this.medirAlturaLinha();
1271
+ Ye(this.obterContextoRenderizador()), this.anunciarResultado(), this.medirAlturaLinha();
1272
1272
  }
1273
1273
  /**
1274
1274
  * Rola até um item e opcionalmente o seleciona. Aceita ID (pela `chave-id`, depois `id`, `_id`,
1275
1275
  * `codigo`, `key`), predicado ou índice. Um número é procurado primeiro como ID; use
1276
1276
  * `{ porIndice: true }` ou `rolarParaIndice()` para tratá-lo só como índice da linha exibida.
1277
1277
  */
1278
- rolarPara(e, i) {
1279
- return this.selecaoController.rolarPara(e, i);
1278
+ rolarPara(e, o) {
1279
+ return this.selecaoController.rolarPara(e, o);
1280
1280
  }
1281
1281
  /** Rola até a linha exibida de índice `indice` (posição após ordenação/filtro, base 0). */
1282
- rolarParaIndice(e, i) {
1283
- return this.selecaoController.rolarPara(e, { ...i, porIndice: !0 });
1282
+ rolarParaIndice(e, o) {
1283
+ return this.selecaoController.rolarPara(e, { ...o, porIndice: !0 });
1284
1284
  }
1285
1285
  }
1286
- ie("ui-tabela", Je);
1287
- const S = Math.PI / 180;
1288
- function L(r) {
1289
- return Math.abs(r) < 1e-12 ? 0 : Number(r.toPrecision(15));
1286
+ le("ui-tabela", nt);
1287
+ const L = Math.PI / 180;
1288
+ function M(t) {
1289
+ return Math.abs(t) < 1e-12 ? 0 : Number(t.toPrecision(15));
1290
1290
  }
1291
- const et = {
1291
+ const st = {
1292
1292
  sqrt: Math.sqrt,
1293
1293
  abs: Math.abs,
1294
1294
  round: Math.round,
1295
1295
  floor: Math.floor,
1296
1296
  ceil: Math.ceil,
1297
- sin: (r) => L(Math.sin(r * S)),
1298
- cos: (r) => L(Math.cos(r * S)),
1299
- tan: (r) => L(Math.tan(r * S)),
1300
- asin: (r) => L(Math.asin(r) / S),
1301
- acos: (r) => L(Math.acos(r) / S),
1302
- atan: (r) => L(Math.atan(r) / S)
1297
+ sin: (t) => M(Math.sin(t * L)),
1298
+ cos: (t) => M(Math.cos(t * L)),
1299
+ tan: (t) => M(Math.tan(t * L)),
1300
+ asin: (t) => M(Math.asin(t) / L),
1301
+ acos: (t) => M(Math.acos(t) / L),
1302
+ atan: (t) => M(Math.atan(t) / L)
1303
1303
  };
1304
- function ee(r) {
1305
- if (!r || typeof r != "string") return null;
1306
- let t = r.trim();
1307
- if (!t) return null;
1308
- t = t.replace(/(\d),(\d)/g, "$1.$2").replace(/,/g, "."), t = t.replace(/\bpi\b/gi, String(Math.PI)), t = t.replace(/\be\b/gi, String(Math.E));
1304
+ function ae(t) {
1305
+ if (!t || typeof t != "string") return null;
1306
+ let r = t.trim();
1307
+ if (!r) return null;
1308
+ r = r.replace(/(\d),(\d)/g, "$1.$2").replace(/,/g, "."), r = r.replace(/\bpi\b/gi, String(Math.PI)), r = r.replace(/\be\b/gi, String(Math.E));
1309
1309
  let e = 0;
1310
- function i() {
1311
- return t[e] || "";
1312
- }
1313
1310
  function o() {
1314
- return t[e++] || "";
1311
+ return r[e] || "";
1312
+ }
1313
+ function i() {
1314
+ return r[e++] || "";
1315
1315
  }
1316
1316
  function a() {
1317
- for (; e < t.length && /\s/.test(t[e]); )
1317
+ for (; e < r.length && /\s/.test(r[e]); )
1318
1318
  e++;
1319
1319
  }
1320
1320
  function n() {
1321
1321
  a();
1322
- let l = s();
1323
- for (a(); e < t.length; ) {
1324
- const u = i();
1322
+ let s = l();
1323
+ for (a(); e < r.length; ) {
1324
+ const u = o();
1325
1325
  if (u === "+" || u === "-") {
1326
- o(), a();
1327
- const p = e, h = s();
1328
- a(), t.slice(p, e).includes("%") ? l = u === "+" ? l + l * h : l - l * h : l = u === "+" ? l + h : l - h;
1326
+ i(), a();
1327
+ const p = e, h = l();
1328
+ a(), r.slice(p, e).includes("%") ? s = u === "+" ? s + s * h : s - s * h : s = u === "+" ? s + h : s - h;
1329
1329
  } else
1330
1330
  break;
1331
1331
  }
1332
- return l;
1332
+ return s;
1333
1333
  }
1334
- function s() {
1334
+ function l() {
1335
1335
  a();
1336
- let l = d();
1337
- for (a(); e < t.length; ) {
1338
- const u = i();
1336
+ let s = d();
1337
+ for (a(); e < r.length; ) {
1338
+ const u = o();
1339
1339
  if (u === "*" || u === "/" || u === "x" || u === "X") {
1340
- o(), a();
1340
+ i(), a();
1341
1341
  const p = d();
1342
1342
  if (u === "/" && p === 0)
1343
1343
  throw new Error("Divisão por zero");
1344
- l = u === "/" ? l / p : l * p, a();
1344
+ s = u === "/" ? s / p : s * p, a();
1345
1345
  } else
1346
1346
  break;
1347
1347
  }
1348
- return l;
1348
+ return s;
1349
1349
  }
1350
1350
  function d() {
1351
1351
  a();
1352
- const l = i();
1353
- if (l === "+" || l === "-") {
1354
- o();
1352
+ const s = o();
1353
+ if (s === "+" || s === "-") {
1354
+ i();
1355
1355
  const p = d();
1356
- return l === "-" ? -p : p;
1356
+ return s === "-" ? -p : p;
1357
1357
  }
1358
1358
  let u = c();
1359
- if (a(), i() === "^") {
1360
- o();
1359
+ if (a(), o() === "^") {
1360
+ i();
1361
1361
  const p = d();
1362
1362
  u = Math.pow(u, p);
1363
- } else if (t.slice(e, e + 2) === "**") {
1363
+ } else if (r.slice(e, e + 2) === "**") {
1364
1364
  e += 2;
1365
1365
  const p = d();
1366
1366
  u = Math.pow(u, p);
@@ -1369,227 +1369,287 @@ function ee(r) {
1369
1369
  }
1370
1370
  function c() {
1371
1371
  a();
1372
- const l = i();
1373
- if (l === "+" || l === "-") {
1374
- o();
1372
+ const s = o();
1373
+ if (s === "+" || s === "-") {
1374
+ i();
1375
1375
  const h = c();
1376
- return l === "-" ? -h : h;
1376
+ return s === "-" ? -h : h;
1377
1377
  }
1378
- if (l === "(") {
1379
- o();
1378
+ if (s === "(") {
1379
+ i();
1380
1380
  const h = n();
1381
- if (a(), o() !== ")") throw new Error("Parêntese sem fechamento");
1382
- return a(), i() === "%" ? (o(), h / 100) : h;
1381
+ if (a(), i() !== ")") throw new Error("Parêntese sem fechamento");
1382
+ return a(), o() === "%" ? (i(), h / 100) : h;
1383
1383
  }
1384
- const u = t.slice(e).match(/^([a-zA-Z_]\w*)\s*\(/);
1384
+ const u = r.slice(e).match(/^([a-zA-Z_]\w*)\s*\(/);
1385
1385
  if (u) {
1386
- const h = et[u[1].toLowerCase()];
1386
+ const h = st[u[1].toLowerCase()];
1387
1387
  if (!h) throw new Error("Função desconhecida: " + u[1]);
1388
1388
  e += u[0].length;
1389
1389
  const m = n();
1390
- if (a(), o() !== ")") throw new Error("Parêntese sem fechamento");
1390
+ if (a(), i() !== ")") throw new Error("Parêntese sem fechamento");
1391
1391
  const x = h(m);
1392
- return a(), i() === "%" ? (o(), x / 100) : x;
1392
+ return a(), o() === "%" ? (i(), x / 100) : x;
1393
1393
  }
1394
- const p = t.slice(e).match(/^([0-9]+(?:\.[0-9]+)?|\.[0-9]+)/);
1394
+ const p = r.slice(e).match(/^([0-9]+(?:\.[0-9]+)?|\.[0-9]+)/);
1395
1395
  if (p) {
1396
1396
  e += p[0].length;
1397
1397
  let h = parseFloat(p[0]);
1398
- return a(), i() === "%" && (o(), h = h / 100), h;
1398
+ return a(), o() === "%" && (i(), h = h / 100), h;
1399
1399
  }
1400
- throw new Error("Caractere inválido: " + l);
1400
+ throw new Error("Caractere inválido: " + s);
1401
1401
  }
1402
1402
  try {
1403
- const l = n();
1404
- return a(), e < t.length ? null : isFinite(l) ? l : null;
1403
+ const s = n();
1404
+ return a(), e < r.length ? null : isFinite(s) ? s : null;
1405
1405
  } catch {
1406
1406
  return null;
1407
1407
  }
1408
1408
  }
1409
- const tt = '.ui-prop__linha input:not([disabled]):not([type="color"]):not(.ui-prop__cor-picker-oculto), .ui-prop__linha select:not([disabled]), .ui-prop__linha .ui-prop__btn-acao-inline:not([disabled]), .ui-prop__linha .ui-prop__editor-booleano, .ui-prop__linha .ui-prop__editor-cor-container';
1410
- function de(r, t) {
1411
- if (!r) return null;
1412
- const e = String(t);
1413
- return Array.from(r.querySelectorAll("[data-prop-id]")).find((i) => i.getAttribute("data-prop-id") === e) ?? null;
1409
+ const lt = '.ui-prop__linha input:not([disabled]):not([type="color"]):not(.ui-prop__cor-picker-oculto), .ui-prop__linha select:not([disabled]), .ui-prop__linha .ui-prop__btn-acao-inline:not([disabled]), .ui-prop__linha .ui-prop__editor-booleano, .ui-prop__linha .ui-prop__editor-cor-container';
1410
+ function me(t, r) {
1411
+ if (!t) return null;
1412
+ const e = String(r);
1413
+ return Array.from(t.querySelectorAll("[data-prop-id]")).find((o) => o.getAttribute("data-prop-id") === e) ?? null;
1414
1414
  }
1415
- const ce = /* @__PURE__ */ new WeakMap();
1416
- function k(r, t) {
1417
- ce.set(r, t);
1415
+ const be = /* @__PURE__ */ new WeakMap();
1416
+ function z(t, r) {
1417
+ be.set(t, r);
1418
1418
  }
1419
- function te(r, t, e) {
1419
+ function ne(t, r, e) {
1420
1420
  var a, n;
1421
- const i = de(r, t), o = (a = i == null ? void 0 : i.querySelector(".ui-prop__col-valor")) == null ? void 0 : a.firstElementChild;
1422
- o && ((n = ce.get(o)) == null || n(e));
1421
+ const o = me(t, r), i = (a = o == null ? void 0 : o.querySelector(".ui-prop__col-valor")) == null ? void 0 : a.firstElementChild;
1422
+ i && ((n = be.get(i)) == null || n(e));
1423
1423
  }
1424
- function z(r, t, e = (o, a) => o === String(a), i = (o) => o == null || o === "" ? "—" : String(o)) {
1424
+ function F(t, r, e = (i, a) => i === String(a), o = (i) => i == null || i === "" ? "—" : String(i)) {
1425
1425
  var n;
1426
- (n = r.querySelector("option[data-externa]")) == null || n.remove();
1427
- const o = Array.from(r.options).find((s) => !s.hasAttribute("data-acao") && e(s.value, t));
1428
- if (o) {
1429
- o.selected = !0;
1426
+ (n = t.querySelector("option[data-externa]")) == null || n.remove();
1427
+ const i = Array.from(t.options).find((l) => !l.hasAttribute("data-acao") && e(l.value, r));
1428
+ if (i) {
1429
+ i.selected = !0;
1430
1430
  return;
1431
1431
  }
1432
1432
  const a = document.createElement("option");
1433
- a.value = t == null ? "" : String(t), a.textContent = i(t), a.setAttribute("data-externa", ""), a.hidden = !0, r.insertBefore(a, r.firstChild), a.selected = !0;
1433
+ a.value = r == null ? "" : String(r), a.textContent = o(r), a.setAttribute("data-externa", ""), a.hidden = !0, t.insertBefore(a, t.firstChild), a.selected = !0;
1434
1434
  }
1435
- function rt(r, t) {
1436
- const e = Array.from(r.querySelectorAll(tt)), i = e.indexOf(t);
1437
- if (i !== -1 && i + 1 < e.length) {
1438
- const o = e[i + 1];
1439
- o.focus(), o instanceof HTMLInputElement && o.select();
1435
+ function V(t, r) {
1436
+ var o;
1437
+ (o = t.querySelector("option[data-externa]")) == null || o.remove();
1438
+ const e = document.createElement("option");
1439
+ e.value = "", e.textContent = r, e.setAttribute("data-externa", ""), e.setAttribute("data-misto", ""), e.hidden = !0, e.disabled = !0, t.insertBefore(e, t.firstChild), e.selected = !0;
1440
+ }
1441
+ function dt(t, r) {
1442
+ const e = Array.from(t.querySelectorAll(lt)), o = e.indexOf(r);
1443
+ if (o !== -1 && o + 1 < e.length) {
1444
+ const i = e[o + 1];
1445
+ i.focus(), i instanceof HTMLInputElement && i.select();
1440
1446
  }
1441
1447
  }
1442
- function j(r, t) {
1448
+ function X(t, r) {
1443
1449
  var e;
1444
- r.classList.toggle("ui-prop__categoria--aberta", t), (e = r.querySelector(".ui-prop__categoria-header")) == null || e.setAttribute("aria-expanded", String(t));
1450
+ t.classList.toggle("ui-prop__categoria--aberta", r), (e = t.querySelector(".ui-prop__categoria-header")) == null || e.setAttribute("aria-expanded", String(r));
1445
1451
  }
1446
- function it(r, t) {
1447
- t.forEach((e) => e.aberto = !0), r.querySelectorAll(".ui-prop__categoria").forEach((e) => j(e, !0));
1452
+ function ct(t, r) {
1453
+ r.forEach((e) => e.aberto = !0), t.querySelectorAll(".ui-prop__categoria").forEach((e) => X(e, !0));
1448
1454
  }
1449
- function ot(r, t) {
1450
- t.forEach((e) => e.aberto = !1), r.querySelectorAll(".ui-prop__categoria").forEach((e) => j(e, !1));
1455
+ function ut(t, r) {
1456
+ r.forEach((e) => e.aberto = !1), t.querySelectorAll(".ui-prop__categoria").forEach((e) => X(e, !1));
1451
1457
  }
1452
- function at(r, t, e, i) {
1453
- const o = e.find((a) => a.id === i);
1454
- if (o) {
1455
- o.aberto = o.aberto === !1;
1456
- const a = Array.from(r.querySelectorAll("[data-cat-id]")).find((n) => n.getAttribute("data-cat-id") === i);
1457
- a && j(a, !!o.aberto), t.dispatchEvent(
1458
+ function pt(t, r, e, o) {
1459
+ const i = e.find((a) => a.id === o);
1460
+ if (i) {
1461
+ i.aberto = i.aberto === !1;
1462
+ const a = Array.from(t.querySelectorAll("[data-cat-id]")).find((n) => n.getAttribute("data-cat-id") === o);
1463
+ a && X(a, !!i.aberto), r.dispatchEvent(
1458
1464
  new CustomEvent("ui-categoria-toggle", {
1459
1465
  bubbles: !0,
1460
1466
  composed: !0,
1461
- detail: { id: i, aberto: o.aberto }
1467
+ detail: { id: o, aberto: i.aberto }
1462
1468
  })
1463
1469
  );
1464
1470
  }
1465
1471
  }
1466
- function nt(r) {
1467
- const t = document.createElement("span"), e = (i) => {
1468
- const o = typeof i == "number" || typeof i == "string" && /^-?\d+(\.\d+)?$/.test(i.trim());
1469
- t.className = `ui-prop__valor-readonly ${o ? "ui-prop__valor-readonly--numero" : ""}`.trim(), t.textContent = i != null ? String(i) : "—";
1472
+ const Y = Symbol.for("ui-tabela-propriedades:misto"), G = "Varia";
1473
+ function A(t) {
1474
+ return t === Y;
1475
+ }
1476
+ function S(t) {
1477
+ var e;
1478
+ let r;
1479
+ try {
1480
+ r = (e = t.obterTextoMisto) == null ? void 0 : e.call(t);
1481
+ } catch {
1482
+ }
1483
+ return typeof r == "string" && r.trim() ? r : G;
1484
+ }
1485
+ function R(t, r) {
1486
+ return t == null && r == null ? !0 : Object.is(t, r);
1487
+ }
1488
+ function j(t) {
1489
+ return t.misto ? Y : t.valor;
1490
+ }
1491
+ function ht(t) {
1492
+ if (!Array.isArray(t) || t.length === 0) return;
1493
+ const r = t[0];
1494
+ for (let e = 1; e < t.length; e++)
1495
+ if (!R(r, t[e])) return Y;
1496
+ return r;
1497
+ }
1498
+ function Ut(t) {
1499
+ if (!Array.isArray(t)) return {};
1500
+ const r = t.filter(
1501
+ (i) => i !== null && typeof i == "object" && !Array.isArray(i)
1502
+ ), e = /* @__PURE__ */ new Set();
1503
+ r.forEach((i) => Object.keys(i).forEach((a) => e.add(a)));
1504
+ const o = {};
1505
+ return e.forEach((i) => {
1506
+ o[i] = ht(r.map((a) => i in a ? a[i] : void 0));
1507
+ }), o;
1508
+ }
1509
+ function fe(t, r, e, o) {
1510
+ t.classList.toggle("ui-prop__editor--misto", e), e ? t.placeholder = o : r.placeholder ? t.placeholder = r.placeholder : t.removeAttribute("placeholder");
1511
+ }
1512
+ function mt(t, r) {
1513
+ const e = document.createElement("span"), o = (i) => {
1514
+ if (A(i)) {
1515
+ e.className = "ui-prop__valor-readonly ui-prop__editor--misto", e.textContent = r ? S({ obterTextoMisto: r }) : G;
1516
+ return;
1517
+ }
1518
+ const a = typeof i == "number" || typeof i == "string" && /^-?\d+(\.\d+)?$/.test(i.trim());
1519
+ e.className = `ui-prop__valor-readonly ${a ? "ui-prop__valor-readonly--numero" : ""}`.trim(), e.textContent = i != null ? String(i) : "—";
1470
1520
  };
1471
- return e(r), k(t, e), t;
1521
+ return o(t), z(e, o), e;
1472
1522
  }
1473
- function st(r, t, e, i) {
1474
- const o = document.createElement("label");
1475
- o.className = "ui-prop__editor-booleano", o.setAttribute("role", "checkbox"), o.tabIndex = 0, o.setAttribute("aria-label", t.rotulo);
1523
+ function bt(t, r, e, o) {
1524
+ const i = document.createElement("label");
1525
+ i.className = "ui-prop__editor-booleano", i.setAttribute("role", "checkbox"), i.tabIndex = 0, i.setAttribute("aria-label", r.rotulo);
1476
1526
  const a = document.createElement("div");
1477
1527
  a.className = "ui-prop__checkbox-custom";
1478
1528
  const n = document.createElement("span");
1479
1529
  n.className = "ui-prop__booleano-rotulo";
1480
- const s = (c) => {
1481
- const l = !!c;
1482
- a.classList.toggle("ui-prop__checkbox-custom--marcado", l), a.textContent = l ? "✓" : "", n.textContent = l ? "Sim" : "Não", o.setAttribute("aria-checked", String(l));
1530
+ const l = (c) => {
1531
+ const s = A(c), u = !s && !!c;
1532
+ i.classList.toggle("ui-prop__editor--misto", s), a.classList.toggle("ui-prop__checkbox-custom--marcado", u), a.classList.toggle("ui-prop__checkbox-custom--misto", s), a.textContent = s ? "–" : u ? "✓" : "", n.textContent = s ? S(o) : u ? "Sim" : "Não", i.setAttribute("aria-checked", s ? "mixed" : String(u));
1483
1533
  };
1484
- s(e), k(o, s), o.appendChild(a), o.appendChild(n);
1534
+ l(e), z(i, l), i.appendChild(a), i.appendChild(n);
1485
1535
  const d = () => {
1486
- const c = !i.obterValorAtual(t.id);
1487
- i.registrarAlteracao(r, t.id, c), s(c);
1536
+ const c = o.obterValorAtual(r.id), s = A(c) ? !0 : !c;
1537
+ o.registrarAlteracao(t, r.id, s), l(s);
1488
1538
  };
1489
- return o.addEventListener("click", (c) => {
1539
+ return i.addEventListener("click", (c) => {
1490
1540
  c.preventDefault(), d();
1491
- }), o.addEventListener("keydown", (c) => {
1492
- c.key === " " ? (c.preventDefault(), d()) : c.key === "Enter" && (c.preventDefault(), i.focarProximoEditor(o));
1493
- }), o;
1494
- }
1495
- function lt(r, t, e, i) {
1496
- const o = document.createElement("select");
1497
- return o.className = "ui-prop__editor-select", o.setAttribute("aria-label", t.rotulo), (t.opcoes || []).forEach((a) => {
1498
- const n = document.createElement("option");
1499
- n.value = String(a.id), n.textContent = a.rotulo, o.appendChild(n);
1500
- }), z(o, e), k(o, (a) => z(o, a)), o.addEventListener("change", () => {
1501
- const a = (t.opcoes || []).find((n) => String(n.id) === o.value);
1502
- i.registrarAlteracao(r, t.id, a ? a.id : o.value), z(o, i.obterValorAtual(t.id));
1503
- }), o.addEventListener("keydown", (a) => {
1504
- a.key === "Enter" && i.focarProximoEditor(o);
1505
- }), o;
1541
+ }), i.addEventListener("keydown", (c) => {
1542
+ c.key === " " ? (c.preventDefault(), d()) : c.key === "Enter" && (c.preventDefault(), o.focarProximoEditor(i));
1543
+ }), i;
1506
1544
  }
1507
- function dt(r, t, e) {
1508
- const i = document.createElement("button");
1509
- return i.type = "button", i.className = "ui-prop__btn-acao-inline", i.textContent = t.rotuloAcao || "Editar...", i.addEventListener("click", () => {
1510
- typeof t.onClickAcao == "function" && t.onClickAcao(t), e.despacharEventoAcao(t, r);
1545
+ function ft(t, r, e, o) {
1546
+ const i = document.createElement("select");
1547
+ i.className = "ui-prop__editor-select", i.setAttribute("aria-label", r.rotulo), (r.opcoes || []).forEach((n) => {
1548
+ const l = document.createElement("option");
1549
+ l.value = String(n.id), l.textContent = n.rotulo, i.appendChild(l);
1550
+ });
1551
+ const a = (n) => {
1552
+ i.classList.toggle("ui-prop__editor--misto", A(n)), A(n) ? V(i, S(o)) : F(i, n);
1553
+ };
1554
+ return a(e), z(i, a), i.addEventListener("change", () => {
1555
+ const n = (r.opcoes || []).find((l) => String(l.id) === i.value);
1556
+ o.registrarAlteracao(t, r.id, n ? n.id : i.value), a(o.obterValorAtual(r.id));
1557
+ }), i.addEventListener("keydown", (n) => {
1558
+ n.key === "Enter" && o.focarProximoEditor(i);
1511
1559
  }), i;
1512
1560
  }
1513
- function ct(r, t, e, i) {
1514
- const o = document.createElement("input");
1515
- o.type = "text", o.inputMode = "decimal", o.autocomplete = "off", o.spellcheck = !1, o.className = "ui-prop__editor-input ui-prop__editor-input--numero", o.setAttribute("aria-label", t.rotulo), t.placeholder && (o.placeholder = t.placeholder);
1516
- const a = (s) => {
1517
- if (s == null || s === "") return "";
1518
- const d = Number(s);
1519
- return isNaN(d) ? String(s) : t.casasDecimais !== void 0 ? d.toFixed(t.casasDecimais) : String(d);
1561
+ function gt(t, r, e) {
1562
+ const o = document.createElement("button");
1563
+ return o.type = "button", o.className = "ui-prop__btn-acao-inline", o.textContent = r.rotuloAcao || "Editar...", o.addEventListener("click", () => {
1564
+ typeof r.onClickAcao == "function" && r.onClickAcao(r), e.despacharEventoAcao(r, t);
1565
+ }), o;
1566
+ }
1567
+ function xt(t, r, e, o) {
1568
+ const i = document.createElement("input");
1569
+ i.type = "text", i.inputMode = "decimal", i.autocomplete = "off", i.spellcheck = !1, i.className = "ui-prop__editor-input ui-prop__editor-input--numero", i.setAttribute("aria-label", r.rotulo), r.placeholder && (i.placeholder = r.placeholder);
1570
+ const a = (d) => {
1571
+ if (d == null || d === "" || A(d)) return "";
1572
+ const c = Number(d);
1573
+ return isNaN(c) ? String(d) : r.casasDecimais !== void 0 ? c.toFixed(r.casasDecimais) : String(c);
1574
+ }, n = (d) => {
1575
+ i.value = a(d), fe(i, r, A(d), S(o));
1520
1576
  };
1521
- o.value = a(e), k(o, (s) => {
1522
- o.value = a(s);
1523
- }), o.addEventListener("focus", () => {
1524
- o.select();
1525
- }), o.addEventListener("input", () => {
1526
- const s = o.value, d = /[\+\-\*\/\^\%\(\)]/.test(s) && !/^[+-]?[0-9]*\.?[0-9]*$/.test(s.trim());
1527
- o.classList.toggle("ui-prop__editor-input--calculando", d);
1577
+ n(e), z(i, n), i.addEventListener("focus", () => {
1578
+ i.select();
1579
+ }), i.addEventListener("input", () => {
1580
+ const d = i.value, c = /[\+\-\*\/\^\%\(\)]/.test(d) && !/^[+-]?[0-9]*\.?[0-9]*$/.test(d.trim());
1581
+ i.classList.toggle("ui-prop__editor-input--calculando", c);
1528
1582
  });
1529
- const n = () => {
1530
- o.classList.remove("ui-prop__editor-input--calculando");
1531
- const s = o.value.trim();
1532
- if (s === "") {
1533
- i.registrarAlteracao(r, t.id, null);
1583
+ const l = () => {
1584
+ i.classList.remove("ui-prop__editor-input--calculando");
1585
+ const d = i.value.trim();
1586
+ if (d === "") {
1587
+ if (A(o.obterValorAtual(r.id))) return;
1588
+ o.registrarAlteracao(t, r.id, null);
1534
1589
  return;
1535
1590
  }
1536
- const d = ee(s);
1537
- if (d !== null && !isNaN(d)) {
1538
- let c = d;
1539
- t.casasDecimais !== void 0 && (c = Number(d.toFixed(t.casasDecimais))), o.value = a(c), i.registrarAlteracao(r, t.id, c);
1591
+ const c = ae(d);
1592
+ if (c !== null && !isNaN(c)) {
1593
+ let s = c;
1594
+ r.casasDecimais !== void 0 && (s = Number(c.toFixed(r.casasDecimais))), o.registrarAlteracao(t, r.id, s), n(s);
1540
1595
  } else
1541
- o.value = a(i.obterValorAtual(t.id));
1596
+ n(o.obterValorAtual(r.id));
1542
1597
  };
1543
- return o.addEventListener("change", n), o.addEventListener("blur", n), o.addEventListener("keydown", (s) => {
1544
- if (s.key === "Enter")
1545
- n(), i.focarProximoEditor(o);
1546
- else if (s.key === "Escape")
1547
- o.classList.remove("ui-prop__editor-input--calculando"), o.value = a(i.obterValorAtual(t.id)), o.blur();
1548
- else if (s.key === "ArrowUp" || s.key === "ArrowDown") {
1549
- s.preventDefault();
1550
- const c = ee(o.value) ?? (Number(i.obterValorAtual(t.id)) || 0);
1551
- let l = t.casasDecimais !== void 0 ? Math.pow(10, -t.casasDecimais) : 1;
1552
- s.shiftKey ? l *= 10 : s.altKey && t.casasDecimais === void 0 && (l *= 0.1);
1553
- let u = s.key === "ArrowUp" ? c + l : c - l;
1554
- t.casasDecimais !== void 0 ? u = Number(u.toFixed(t.casasDecimais)) : u = Math.round(u * 100) / 100, o.value = a(u), i.registrarAlteracao(r, t.id, u);
1598
+ return i.addEventListener("change", l), i.addEventListener("blur", l), i.addEventListener("keydown", (d) => {
1599
+ if (d.key === "Enter")
1600
+ l(), o.focarProximoEditor(i);
1601
+ else if (d.key === "Escape")
1602
+ i.classList.remove("ui-prop__editor-input--calculando"), n(o.obterValorAtual(r.id)), i.blur();
1603
+ else if (d.key === "ArrowUp" || d.key === "ArrowDown") {
1604
+ d.preventDefault();
1605
+ const c = ae(i.value), s = o.obterValorAtual(r.id);
1606
+ if (c === null && A(s)) return;
1607
+ const u = c ?? (Number(s) || 0);
1608
+ let p = r.casasDecimais !== void 0 ? Math.pow(10, -r.casasDecimais) : 1;
1609
+ d.shiftKey ? p *= 10 : d.altKey && r.casasDecimais === void 0 && (p *= 0.1);
1610
+ let h = d.key === "ArrowUp" ? u + p : u - p;
1611
+ r.casasDecimais !== void 0 ? h = Number(h.toFixed(r.casasDecimais)) : h = Math.round(h * 100) / 100, o.registrarAlteracao(t, r.id, h), n(h);
1555
1612
  }
1556
- }), o;
1613
+ }), i;
1557
1614
  }
1558
- function ut(r, t, e, i) {
1559
- const o = document.createElement("input");
1560
- o.type = "text", o.className = "ui-prop__editor-input", o.setAttribute("aria-label", t.rotulo), t.placeholder && (o.placeholder = t.placeholder), o.value = e != null ? String(e) : "", k(o, (n) => {
1561
- o.value = n != null ? String(n) : "";
1562
- }), o.addEventListener("focus", () => {
1563
- o.select();
1615
+ function _t(t, r, e, o) {
1616
+ const i = document.createElement("input");
1617
+ i.type = "text", i.className = "ui-prop__editor-input", i.setAttribute("aria-label", r.rotulo), r.placeholder && (i.placeholder = r.placeholder);
1618
+ const a = (l) => {
1619
+ const d = A(l);
1620
+ i.value = d || l == null ? "" : String(l), fe(i, r, d, S(o));
1621
+ };
1622
+ a(e), z(i, a), i.addEventListener("focus", () => {
1623
+ i.select();
1564
1624
  });
1565
- const a = () => {
1566
- i.registrarAlteracao(r, t.id, o.value);
1625
+ const n = () => {
1626
+ i.value === "" && A(o.obterValorAtual(r.id)) || (o.registrarAlteracao(t, r.id, i.value), a(o.obterValorAtual(r.id)));
1567
1627
  };
1568
- return o.addEventListener("change", a), o.addEventListener("keydown", (n) => {
1569
- n.key === "Enter" ? (a(), i.focarProximoEditor(o)) : n.key === "Escape" && (o.value = String(i.obterValorAtual(t.id) ?? ""), o.blur());
1570
- }), o;
1628
+ return i.addEventListener("change", n), i.addEventListener("keydown", (l) => {
1629
+ l.key === "Enter" ? (n(), o.focarProximoEditor(i)) : l.key === "Escape" && (a(o.obterValorAtual(r.id)), i.blur());
1630
+ }), i;
1571
1631
  }
1572
- const P = (r, t) => r.toLowerCase() === String(t ?? "").toLowerCase();
1573
- function U(r, t) {
1574
- t.forEach((e) => {
1575
- const i = document.createElement("option");
1576
- i.value = String(e.id), i.textContent = e.rotulo, r.appendChild(i);
1632
+ const ge = (t, r) => t.toLowerCase() === String(r ?? "").toLowerCase();
1633
+ function K(t, r) {
1634
+ r.forEach((e) => {
1635
+ const o = document.createElement("option");
1636
+ o.value = String(e.id), o.textContent = e.rotulo, t.appendChild(o);
1577
1637
  });
1578
1638
  }
1579
- function pt(r, t, e, i) {
1580
- const o = document.createElement("div");
1581
- o.className = "ui-prop__editor-linha-container";
1639
+ function vt(t, r, e, o) {
1640
+ const i = document.createElement("div");
1641
+ i.className = "ui-prop__editor-linha-container";
1582
1642
  const a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1583
1643
  a.setAttribute("class", "ui-prop__linha-amostra-svg"), a.setAttribute("viewBox", "0 0 44 12");
1584
1644
  const n = document.createElementNS("http://www.w3.org/2000/svg", "line");
1585
1645
  n.setAttribute("x1", "0"), n.setAttribute("y1", "6"), n.setAttribute("x2", "44"), n.setAttribute("y2", "6");
1586
- const s = (l) => {
1587
- const u = String(l || "").toLowerCase();
1646
+ const l = (s) => {
1647
+ const u = String(s || "").toLowerCase();
1588
1648
  u.includes("center") || u.includes("eixo") || u.includes("dashdot") || u.includes("traço-ponto") ? n.setAttribute("stroke-dasharray", "8,3,2,3") : u.includes("dash") || u.includes("tracej") || u.includes("hidden") ? n.setAttribute("stroke-dasharray", "6,3") : u.includes("dot") || u.includes("ponto") || u.includes("pontilh") ? n.setAttribute("stroke-dasharray", "2,3") : n.setAttribute("stroke-dasharray", "none");
1589
1649
  };
1590
1650
  a.appendChild(n);
1591
1651
  const d = document.createElement("select");
1592
- d.className = "ui-prop__linha-select", d.setAttribute("aria-label", t.rotulo), U(d, t.opcoes && t.opcoes.length > 0 ? t.opcoes : [
1652
+ d.className = "ui-prop__linha-select", d.setAttribute("aria-label", r.rotulo), K(d, r.opcoes && r.opcoes.length > 0 ? r.opcoes : [
1593
1653
  { id: "ByLayer", rotulo: "ByLayer" },
1594
1654
  { id: "ByBlock", rotulo: "ByBlock" },
1595
1655
  { id: "Continuous", rotulo: "Continuous" },
@@ -1598,29 +1658,34 @@ function pt(r, t, e, i) {
1598
1658
  { id: "Center", rotulo: "Center" },
1599
1659
  { id: "Dotted", rotulo: "Dotted" }
1600
1660
  ]);
1601
- const c = (l) => {
1602
- s(l), z(d, l, P);
1661
+ const c = (s) => {
1662
+ const u = A(s);
1663
+ if (i.classList.toggle("ui-prop__editor--misto", u), u) {
1664
+ l(""), V(d, S(o));
1665
+ return;
1666
+ }
1667
+ l(s), F(d, s, ge);
1603
1668
  };
1604
- return c(e), k(o, c), d.addEventListener("change", () => {
1605
- s(d.value), i.registrarAlteracao(r, t.id, d.value), z(d, d.value, P);
1606
- }), d.addEventListener("keydown", (l) => {
1607
- l.key === "Enter" && i.focarProximoEditor(d);
1608
- }), o.appendChild(a), o.appendChild(d), o;
1669
+ return c(e), z(i, c), d.addEventListener("change", () => {
1670
+ o.registrarAlteracao(t, r.id, d.value), c(d.value);
1671
+ }), d.addEventListener("keydown", (s) => {
1672
+ s.key === "Enter" && o.focarProximoEditor(d);
1673
+ }), i.appendChild(a), i.appendChild(d), i;
1609
1674
  }
1610
- function ht(r, t, e, i) {
1611
- const o = document.createElement("div");
1612
- o.className = "ui-prop__editor-espessura-container";
1675
+ function Et(t, r, e, o) {
1676
+ const i = document.createElement("div");
1677
+ i.className = "ui-prop__editor-espessura-container";
1613
1678
  const a = document.createElementNS("http://www.w3.org/2000/svg", "svg");
1614
1679
  a.setAttribute("class", "ui-prop__espessura-amostra-svg"), a.setAttribute("viewBox", "0 0 38 12");
1615
1680
  const n = document.createElementNS("http://www.w3.org/2000/svg", "line");
1616
1681
  n.setAttribute("x1", "0"), n.setAttribute("y1", "6"), n.setAttribute("x2", "38"), n.setAttribute("y2", "6");
1617
- const s = (l) => {
1618
- const u = parseFloat(String(l).replace(/[^0-9.]/g, ""));
1682
+ const l = (s) => {
1683
+ const u = parseFloat(String(s).replace(/[^0-9.]/g, ""));
1619
1684
  return isNaN(u) || u <= 0 ? 1.5 : Math.min(8, Math.max(1, u * 8));
1620
1685
  };
1621
1686
  a.appendChild(n);
1622
1687
  const d = document.createElement("select");
1623
- d.className = "ui-prop__espessura-select", d.setAttribute("aria-label", t.rotulo), U(d, t.opcoes && t.opcoes.length > 0 ? t.opcoes : [
1688
+ d.className = "ui-prop__espessura-select", d.setAttribute("aria-label", r.rotulo), K(d, r.opcoes && r.opcoes.length > 0 ? r.opcoes : [
1624
1689
  { id: "ByLayer", rotulo: "ByLayer" },
1625
1690
  { id: "ByBlock", rotulo: "ByBlock" },
1626
1691
  { id: "0.00 mm", rotulo: "0.00 mm" },
@@ -1641,16 +1706,17 @@ function ht(r, t, e, i) {
1641
1706
  { id: "1.40 mm", rotulo: "1.40 mm" },
1642
1707
  { id: "2.00 mm", rotulo: "2.00 mm" }
1643
1708
  ]);
1644
- const c = (l) => {
1645
- n.setAttribute("stroke-width", String(s(l))), z(d, l, P);
1709
+ const c = (s) => {
1710
+ const u = A(s);
1711
+ i.classList.toggle("ui-prop__editor--misto", u), n.setAttribute("stroke-width", String(l(u ? "" : s))), u ? V(d, S(o)) : F(d, s, ge);
1646
1712
  };
1647
- return c(e), k(o, c), d.addEventListener("change", () => {
1648
- n.setAttribute("stroke-width", String(s(d.value))), i.registrarAlteracao(r, t.id, d.value), z(d, d.value, P);
1649
- }), d.addEventListener("keydown", (l) => {
1650
- l.key === "Enter" && i.focarProximoEditor(d);
1651
- }), o.appendChild(a), o.appendChild(d), o;
1713
+ return c(e), z(i, c), d.addEventListener("change", () => {
1714
+ o.registrarAlteracao(t, r.id, d.value), c(d.value);
1715
+ }), d.addEventListener("keydown", (s) => {
1716
+ s.key === "Enter" && o.focarProximoEditor(d);
1717
+ }), i.appendChild(a), i.appendChild(d), i;
1652
1718
  }
1653
- const W = [
1719
+ const Q = [
1654
1720
  { nome: "Red", indice: 1, hex: "#ff0000" },
1655
1721
  { nome: "Yellow", indice: 2, hex: "#ffff00" },
1656
1722
  { nome: "Green", indice: 3, hex: "#00ff00" },
@@ -1658,97 +1724,108 @@ const W = [
1658
1724
  { nome: "Blue", indice: 5, hex: "#0000ff" },
1659
1725
  { nome: "Magenta", indice: 6, hex: "#ff00ff" },
1660
1726
  { nome: "White", indice: 7, hex: "#ffffff" }
1661
- ], ue = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
1662
- function q(r) {
1663
- const t = String(r ?? "").trim().toLowerCase(), e = W.find((i) => String(i.indice) === t || i.nome.toLowerCase() === t);
1664
- return e ? e.nome.toLowerCase() : t;
1727
+ ], xe = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
1728
+ function U(t) {
1729
+ const r = String(t ?? "").trim().toLowerCase(), e = Q.find((o) => String(o.indice) === r || o.nome.toLowerCase() === r);
1730
+ return e ? e.nome.toLowerCase() : r;
1665
1731
  }
1666
- function mt(r) {
1667
- const t = q(r), e = W.find((i) => i.nome.toLowerCase() === t);
1668
- return e ? e.hex : ue.test(t) ? t : "#ffffff";
1732
+ function yt(t) {
1733
+ const r = U(t), e = Q.find((o) => o.nome.toLowerCase() === r);
1734
+ return e ? e.hex : xe.test(r) ? r : "#ffffff";
1669
1735
  }
1670
- function pe(r) {
1671
- return r.length === 4 ? "#" + r.slice(1).split("").map((t) => t + t).join("") : r;
1736
+ function _e(t) {
1737
+ return t.length === 4 ? "#" + t.slice(1).split("").map((r) => r + r).join("") : t;
1672
1738
  }
1673
- function bt(r, t, e, i) {
1674
- const o = document.createElement("div");
1675
- o.className = "ui-prop__editor-cor-cad-container";
1739
+ function wt(t, r, e, o) {
1740
+ const i = document.createElement("div");
1741
+ i.className = "ui-prop__editor-cor-cad-container";
1676
1742
  const a = document.createElement("div");
1677
1743
  a.className = "ui-prop__cor-amostra";
1678
1744
  const n = document.createElement("select");
1679
- n.className = "ui-prop__cor-cad-select", n.setAttribute("aria-label", t.rotulo), U(n, [
1745
+ n.className = "ui-prop__cor-cad-select", n.setAttribute("aria-label", r.rotulo), K(n, [
1680
1746
  { id: "ByLayer", rotulo: "ByLayer" },
1681
1747
  { id: "ByBlock", rotulo: "ByBlock" },
1682
- ...W.map((l) => ({ id: l.nome, rotulo: `${l.nome} (${l.indice})` }))
1748
+ ...Q.map((s) => ({ id: s.nome, rotulo: `${s.nome} (${s.indice})` }))
1683
1749
  ]);
1684
- const s = document.createElement("option");
1685
- s.value = "__escolher", s.textContent = "Selecionar cor...", s.setAttribute("data-acao", ""), n.appendChild(s);
1750
+ const l = document.createElement("option");
1751
+ l.value = "__escolher", l.textContent = "Selecionar cor...", l.setAttribute("data-acao", ""), n.appendChild(l);
1686
1752
  const d = document.createElement("input");
1687
1753
  d.type = "color", d.className = "ui-prop__cor-picker-oculto", d.tabIndex = -1;
1688
- const c = (l) => {
1689
- const u = mt(l);
1690
- a.style.backgroundColor = u, d.value = pe(u), z(
1754
+ const c = (s) => {
1755
+ const u = A(s);
1756
+ if (i.classList.toggle("ui-prop__editor--misto", u), a.classList.toggle("ui-prop__cor-amostra--misto", u), u) {
1757
+ a.style.backgroundColor = "", d.value = "#ffffff", V(n, S(o));
1758
+ return;
1759
+ }
1760
+ const p = yt(s);
1761
+ a.style.backgroundColor = p, d.value = _e(p), F(
1691
1762
  n,
1692
- l,
1693
- (p, h) => q(p) === q(h),
1694
- (p) => p == null || p === "" ? "—" : String(p)
1763
+ s,
1764
+ (h, m) => U(h) === U(m),
1765
+ (h) => h == null || h === "" ? "—" : String(h)
1695
1766
  );
1696
1767
  };
1697
- return c(e), k(o, c), d.addEventListener("input", () => {
1768
+ return c(e), z(i, c), d.addEventListener("input", () => {
1698
1769
  a.style.backgroundColor = d.value;
1699
1770
  }), d.addEventListener("change", () => {
1700
- i.registrarAlteracao(r, t.id, d.value), c(i.obterValorAtual(t.id));
1771
+ o.registrarAlteracao(t, r.id, d.value), c(o.obterValorAtual(r.id));
1701
1772
  }), n.addEventListener("change", () => {
1702
1773
  if (n.value === "__escolher") {
1703
- c(i.obterValorAtual(t.id)), d.click();
1774
+ c(o.obterValorAtual(r.id)), d.click();
1704
1775
  return;
1705
1776
  }
1706
- i.registrarAlteracao(r, t.id, n.value), c(i.obterValorAtual(t.id));
1707
- }), n.addEventListener("keydown", (l) => {
1708
- l.key === "Enter" && i.focarProximoEditor(n);
1709
- }), o.appendChild(a), o.appendChild(n), o.appendChild(d), o;
1777
+ o.registrarAlteracao(t, r.id, n.value), c(o.obterValorAtual(r.id));
1778
+ }), n.addEventListener("keydown", (s) => {
1779
+ s.key === "Enter" && o.focarProximoEditor(n);
1780
+ }), i.appendChild(a), i.appendChild(n), i.appendChild(d), i;
1710
1781
  }
1711
- function ft(r, t, e, i) {
1712
- const o = document.createElement("div");
1713
- o.className = "ui-prop__editor-cor-container", o.setAttribute("role", "button"), o.tabIndex = 0;
1782
+ function Ct(t, r, e, o) {
1783
+ const i = document.createElement("div");
1784
+ i.className = "ui-prop__editor-cor-container", i.setAttribute("role", "button"), i.tabIndex = 0;
1714
1785
  const a = document.createElement("div");
1715
1786
  a.className = "ui-prop__cor-amostra";
1716
1787
  const n = document.createElement("span");
1717
1788
  n.className = "ui-prop__cor-texto";
1718
- const s = document.createElement("input");
1719
- s.type = "color", s.className = "ui-prop__cor-picker-oculto", s.tabIndex = -1;
1789
+ const l = document.createElement("input");
1790
+ l.type = "color", l.className = "ui-prop__cor-picker-oculto", l.tabIndex = -1;
1720
1791
  const d = (c) => {
1721
- const l = typeof c == "string" && ue.test(c) ? pe(c) : null;
1722
- a.style.backgroundColor = c || "#ffffff", n.textContent = t.textoAmostra || String(c || "ByLayer"), s.value = l ?? "#ffffff", o.setAttribute("aria-label", `${t.rotulo}: ${c || "ByLayer"}`);
1792
+ const s = A(c);
1793
+ if (i.classList.toggle("ui-prop__editor--misto", s), a.classList.toggle("ui-prop__cor-amostra--misto", s), s) {
1794
+ const p = S(o);
1795
+ a.style.backgroundColor = "", n.textContent = p, l.value = "#ffffff", i.setAttribute("aria-label", `${r.rotulo}: ${p}`);
1796
+ return;
1797
+ }
1798
+ const u = typeof c == "string" && xe.test(c) ? _e(c) : null;
1799
+ a.style.backgroundColor = c || "#ffffff", n.textContent = r.textoAmostra || String(c || "ByLayer"), l.value = u ?? "#ffffff", i.setAttribute("aria-label", `${r.rotulo}: ${c || "ByLayer"}`);
1723
1800
  };
1724
- return d(e), k(o, d), s.addEventListener("input", () => {
1725
- a.style.backgroundColor = s.value, n.textContent = t.textoAmostra || s.value;
1726
- }), s.addEventListener("change", () => {
1727
- i.registrarAlteracao(r, t.id, s.value), d(i.obterValorAtual(t.id));
1728
- }), o.addEventListener("click", (c) => {
1729
- c.target !== s && s.click();
1730
- }), o.addEventListener("keydown", (c) => {
1731
- (c.key === " " || c.key === "Enter") && (c.preventDefault(), s.click());
1732
- }), o.appendChild(a), o.appendChild(n), o.appendChild(s), o;
1733
- }
1734
- function gt(r, t, e, i) {
1735
- return t.somenteLeitura || t.tipo === "readonly" ? nt(e) : t.tipo === "booleano" ? st(r, t, e, i) : t.tipo === "linha" || t.tipo === "linetype" ? pt(r, t, e, i) : t.tipo === "espessura" || t.tipo === "lineweight" ? ht(r, t, e, i) : t.tipo === "cor-cad" ? bt(r, t, e, i) : t.tipo === "selecao" ? lt(r, t, e, i) : t.tipo === "cor" ? ft(r, t, e, i) : t.tipo === "acao" ? dt(r, t, i) : t.tipo === "numero" ? ct(r, t, e, i) : ut(r, t, e, i);
1736
- }
1737
- function xt(r) {
1738
- if (!r.tipoContainerElement) return;
1739
- if (!r.tipos || r.tipos.length === 0) {
1740
- r.tipoContainerElement.style.display = "none";
1801
+ return d(e), z(i, d), l.addEventListener("input", () => {
1802
+ a.style.backgroundColor = l.value, n.textContent = r.textoAmostra || l.value;
1803
+ }), l.addEventListener("change", () => {
1804
+ o.registrarAlteracao(t, r.id, l.value), d(o.obterValorAtual(r.id));
1805
+ }), i.addEventListener("click", (c) => {
1806
+ c.target !== l && l.click();
1807
+ }), i.addEventListener("keydown", (c) => {
1808
+ (c.key === " " || c.key === "Enter") && (c.preventDefault(), l.click());
1809
+ }), i.appendChild(a), i.appendChild(n), i.appendChild(l), i;
1810
+ }
1811
+ function At(t, r, e, o) {
1812
+ return r.somenteLeitura || r.tipo === "readonly" ? mt(e, o.obterTextoMisto) : r.tipo === "booleano" ? bt(t, r, e, o) : r.tipo === "linha" || r.tipo === "linetype" ? vt(t, r, e, o) : r.tipo === "espessura" || r.tipo === "lineweight" ? Et(t, r, e, o) : r.tipo === "cor-cad" ? wt(t, r, e, o) : r.tipo === "selecao" ? ft(t, r, e, o) : r.tipo === "cor" ? Ct(t, r, e, o) : r.tipo === "acao" ? gt(t, r, o) : r.tipo === "numero" ? xt(t, r, e, o) : _t(t, r, e, o);
1813
+ }
1814
+ function kt(t) {
1815
+ if (!t.tipoContainerElement) return;
1816
+ if (!t.tipos || t.tipos.length === 0) {
1817
+ t.tipoContainerElement.style.display = "none";
1741
1818
  return;
1742
1819
  }
1743
- r.tipoContainerElement.style.display = "flex", r.tipoContainerElement.innerHTML = "";
1744
- const t = r.tipos.find((e) => String(e.id) === String(r.tipoSelecionadoId)) || r.tipos[0];
1745
- if (r.estiloVisual === "revit") {
1820
+ t.tipoContainerElement.style.display = "flex", t.tipoContainerElement.innerHTML = "";
1821
+ const r = t.tipos.find((e) => String(e.id) === String(t.tipoSelecionadoId)) || t.tipos[0];
1822
+ if (t.estiloVisual === "revit") {
1746
1823
  const e = document.createElement("div");
1747
1824
  e.className = "ui-prop__tipo-revit-card";
1748
- const i = document.createElement("div");
1749
- i.className = "ui-prop__tipo-miniatura";
1750
- const o = t.iconeSvg ? fe(t.iconeSvg) : null;
1751
- o ? i.appendChild(o) : i.innerHTML = `
1825
+ const o = document.createElement("div");
1826
+ o.className = "ui-prop__tipo-miniatura";
1827
+ const i = r.iconeSvg ? we(r.iconeSvg) : null;
1828
+ i ? o.appendChild(i) : o.innerHTML = `
1752
1829
  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
1753
1830
  <rect x="3" y="3" width="18" height="18" rx="2"></rect>
1754
1831
  <path d="M3 9h18M9 21V9"></path>
@@ -1757,47 +1834,47 @@ function xt(r) {
1757
1834
  const a = document.createElement("div");
1758
1835
  a.className = "ui-prop__tipo-info";
1759
1836
  const n = document.createElement("div");
1760
- n.className = "ui-prop__tipo-nome", n.textContent = t.rotulo;
1761
- const s = document.createElement("div");
1762
- s.className = "ui-prop__tipo-subtexto", s.textContent = t.subtipo || "Tipo de Família", a.appendChild(n), a.appendChild(s), e.appendChild(i), e.appendChild(a);
1837
+ n.className = "ui-prop__tipo-nome", n.textContent = r.rotulo;
1838
+ const l = document.createElement("div");
1839
+ l.className = "ui-prop__tipo-subtexto", l.textContent = r.subtipo || "Tipo de Família", a.appendChild(n), a.appendChild(l), e.appendChild(o), e.appendChild(a);
1763
1840
  const d = document.createElement("div");
1764
1841
  d.className = "ui-prop__tipo-revit-subbarra";
1765
1842
  const c = document.createElement("select");
1766
- c.className = "ui-prop__tipo-select", r.tipos.forEach((u) => {
1843
+ c.className = "ui-prop__tipo-select", t.tipos.forEach((u) => {
1767
1844
  const p = document.createElement("option");
1768
- p.value = u.id, p.textContent = `${u.rotulo}${u.subtipo ? ` : ${u.subtipo}` : ""}`, String(u.id) === String(r.tipoSelecionadoId) && (p.selected = !0), c.appendChild(p);
1845
+ p.value = u.id, p.textContent = `${u.rotulo}${u.subtipo ? ` : ${u.subtipo}` : ""}`, String(u.id) === String(t.tipoSelecionadoId) && (p.selected = !0), c.appendChild(p);
1769
1846
  }), c.addEventListener("change", () => {
1770
- r.onSelecionarTipo(c.value);
1847
+ t.onSelecionarTipo(c.value);
1771
1848
  });
1772
- const l = document.createElement("button");
1773
- l.type = "button", l.className = "ui-prop__btn-editar-tipo", l.innerHTML = `
1849
+ const s = document.createElement("button");
1850
+ s.type = "button", s.className = "ui-prop__btn-editar-tipo", s.innerHTML = `
1774
1851
  <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="margin-right: 4px; vertical-align: -1px;">
1775
1852
  <rect x="3" y="3" width="12" height="12" rx="1"></rect>
1776
1853
  <rect x="9" y="9" width="12" height="12" rx="1"></rect>
1777
1854
  </svg>
1778
1855
  <span>Editar tipo</span>
1779
- `, l.addEventListener("click", () => {
1780
- r.onEditarTipo(t);
1781
- }), d.appendChild(c), d.appendChild(l), r.tipoContainerElement.appendChild(e), r.tipoContainerElement.appendChild(d);
1856
+ `, s.addEventListener("click", () => {
1857
+ t.onEditarTipo(r);
1858
+ }), d.appendChild(c), d.appendChild(s), t.tipoContainerElement.appendChild(e), t.tipoContainerElement.appendChild(d);
1782
1859
  } else {
1783
1860
  const e = document.createElement("div");
1784
1861
  e.className = "ui-prop__tipo-autocad-bar";
1785
- const i = document.createElement("select");
1786
- i.className = "ui-prop__tipo-select", r.tipos.forEach((d) => {
1862
+ const o = document.createElement("select");
1863
+ o.className = "ui-prop__tipo-select", t.tipos.forEach((d) => {
1787
1864
  const c = document.createElement("option");
1788
- c.value = d.id, c.textContent = d.rotulo, String(d.id) === String(r.tipoSelecionadoId) && (c.selected = !0), i.appendChild(c);
1789
- }), i.addEventListener("change", () => {
1790
- r.onSelecionarTipo(i.value);
1865
+ c.value = d.id, c.textContent = d.rotulo, String(d.id) === String(t.tipoSelecionadoId) && (c.selected = !0), o.appendChild(c);
1866
+ }), o.addEventListener("change", () => {
1867
+ t.onSelecionarTipo(o.value);
1791
1868
  });
1792
- const o = document.createElement("div");
1793
- o.className = "ui-prop__tipo-autocad-acoes";
1869
+ const i = document.createElement("div");
1870
+ i.className = "ui-prop__tipo-autocad-acoes";
1794
1871
  const a = document.createElement("button");
1795
1872
  a.type = "button", a.className = "ui-prop__btn-autocad", a.title = "Seleção rápida", a.setAttribute("aria-label", "Seleção rápida"), a.innerHTML = `
1796
1873
  <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
1797
1874
  <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
1798
1875
  </svg>
1799
1876
  `, a.addEventListener("click", () => {
1800
- r.onQuickSelect(t);
1877
+ t.onQuickSelect(r);
1801
1878
  });
1802
1879
  const n = document.createElement("button");
1803
1880
  n.type = "button", n.className = "ui-prop__btn-autocad", n.title = "Selecionar objetos", n.setAttribute("aria-label", "Selecionar objetos"), n.innerHTML = `
@@ -1811,10 +1888,10 @@ function xt(r) {
1811
1888
  <line x1="9" y1="12" x2="15" y2="12" stroke-width="2.5"></line>
1812
1889
  </svg>
1813
1890
  `, n.addEventListener("click", () => {
1814
- r.onSelectObjects(t);
1891
+ t.onSelectObjects(r);
1815
1892
  });
1816
- const s = document.createElement("button");
1817
- s.type = "button", s.className = "ui-prop__btn-autocad", s.title = "Calculadora rápida", s.setAttribute("aria-label", "Calculadora rápida"), s.innerHTML = `
1893
+ const l = document.createElement("button");
1894
+ l.type = "button", l.className = "ui-prop__btn-autocad", l.title = "Calculadora rápida", l.setAttribute("aria-label", "Calculadora rápida"), l.innerHTML = `
1818
1895
  <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
1819
1896
  <rect x="4" y="2" width="16" height="20" rx="2"></rect>
1820
1897
  <line x1="8" y1="6" x2="16" y2="6"></line>
@@ -1825,55 +1902,55 @@ function xt(r) {
1825
1902
  <circle cx="12" cy="15" r="1" fill="currentColor"></circle>
1826
1903
  <circle cx="16" cy="15" r="1" fill="currentColor"></circle>
1827
1904
  </svg>
1828
- `, s.addEventListener("click", () => {
1829
- r.onCalculadora(t);
1830
- }), o.appendChild(a), o.appendChild(n), o.appendChild(s), e.appendChild(i), e.appendChild(o), r.tipoContainerElement.appendChild(e);
1905
+ `, l.addEventListener("click", () => {
1906
+ t.onCalculadora(r);
1907
+ }), i.appendChild(a), i.appendChild(n), i.appendChild(l), e.appendChild(o), e.appendChild(i), t.tipoContainerElement.appendChild(e);
1831
1908
  }
1832
1909
  }
1833
- function vt(r) {
1834
- let t = 45;
1835
- function e(o) {
1836
- const a = Math.max(20, Math.min(65, o));
1837
- return t = a, r.hostElement.style.setProperty("--ui-prop-rotulo-largura", `${a}%`), r.splitterElement && (r.splitterElement.style.left = `calc(${a}% - 4px)`), a;
1910
+ function zt(t) {
1911
+ let r = 45;
1912
+ function e(i) {
1913
+ const a = Math.max(20, Math.min(65, i));
1914
+ return r = a, t.hostElement.style.setProperty("--ui-prop-rotulo-largura", `${a}%`), t.splitterElement && (t.splitterElement.style.left = `calc(${a}% - 4px)`), a;
1838
1915
  }
1839
- function i() {
1840
- if (!r.splitterElement || !r.corpoElement) return;
1841
- r.splitterListeners.cleanup();
1842
- let o = !1;
1916
+ function o() {
1917
+ if (!t.splitterElement || !t.corpoElement) return;
1918
+ t.splitterListeners.cleanup();
1919
+ let i = !1;
1843
1920
  const a = (n) => {
1844
1921
  if (n.button !== 0) return;
1845
- n.preventDefault(), n.stopPropagation(), o = !0, r.splitterElement.classList.add("ui-prop__splitter--ativo");
1922
+ n.preventDefault(), n.stopPropagation(), i = !0, t.splitterElement.classList.add("ui-prop__splitter--ativo");
1846
1923
  try {
1847
- r.splitterElement.setPointerCapture(n.pointerId);
1924
+ t.splitterElement.setPointerCapture(n.pointerId);
1848
1925
  } catch {
1849
1926
  }
1850
- const s = r.corpoElement.getBoundingClientRect(), d = (l) => {
1851
- if (!o) return;
1852
- const u = s.width;
1927
+ const l = t.corpoElement.getBoundingClientRect(), d = (s) => {
1928
+ if (!i) return;
1929
+ const u = l.width;
1853
1930
  if (u <= 0) return;
1854
- const p = l.clientX - s.left;
1931
+ const p = s.clientX - l.left;
1855
1932
  let f = Math.max(80, Math.min(u - 130, p)) / u * 100;
1856
1933
  f = Math.max(20, Math.min(65, f)), e(f);
1857
- }, c = (l) => {
1858
- if (o) {
1859
- o = !1, r.splitterElement.classList.remove("ui-prop__splitter--ativo");
1934
+ }, c = (s) => {
1935
+ if (i) {
1936
+ i = !1, t.splitterElement.classList.remove("ui-prop__splitter--ativo");
1860
1937
  try {
1861
- r.splitterElement.hasPointerCapture(l.pointerId) && r.splitterElement.releasePointerCapture(l.pointerId);
1938
+ t.splitterElement.hasPointerCapture(s.pointerId) && t.splitterElement.releasePointerCapture(s.pointerId);
1862
1939
  } catch {
1863
1940
  }
1864
- r.splitterElement.removeEventListener("pointermove", d), r.splitterElement.removeEventListener("pointerup", c), r.splitterElement.removeEventListener("pointercancel", c), r.onLarguraAlterada(t), r.hostElement.dispatchEvent(
1941
+ t.splitterElement.removeEventListener("pointermove", d), t.splitterElement.removeEventListener("pointerup", c), t.splitterElement.removeEventListener("pointercancel", c), t.onLarguraAlterada(r), t.hostElement.dispatchEvent(
1865
1942
  new CustomEvent("ui-splitter-resize", {
1866
1943
  bubbles: !0,
1867
1944
  composed: !0,
1868
- detail: { larguraPorcentagem: t }
1945
+ detail: { larguraPorcentagem: r }
1869
1946
  })
1870
1947
  );
1871
1948
  }
1872
1949
  };
1873
- r.splitterElement.addEventListener("pointermove", d), r.splitterElement.addEventListener("pointerup", c), r.splitterElement.addEventListener("pointercancel", c);
1950
+ t.splitterElement.addEventListener("pointermove", d), t.splitterElement.addEventListener("pointerup", c), t.splitterElement.addEventListener("pointercancel", c);
1874
1951
  };
1875
- r.splitterListeners.add(r.splitterElement, "pointerdown", a), r.splitterListeners.add(r.splitterElement, "dblclick", () => {
1876
- e(45), r.onLarguraAlterada(45), r.hostElement.dispatchEvent(
1952
+ t.splitterListeners.add(t.splitterElement, "pointerdown", a), t.splitterListeners.add(t.splitterElement, "dblclick", () => {
1953
+ e(45), t.onLarguraAlterada(45), t.hostElement.dispatchEvent(
1877
1954
  new CustomEvent("ui-splitter-resize", {
1878
1955
  bubbles: !0,
1879
1956
  composed: !0,
@@ -1883,14 +1960,14 @@ function vt(r) {
1883
1960
  });
1884
1961
  }
1885
1962
  return {
1886
- init: i,
1963
+ init: o,
1887
1964
  definirLarguraRotulo: e
1888
1965
  };
1889
1966
  }
1890
- const _t = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:var(--ui-tamanho-corpo-sm, 12px);color:var(--ui-cor-texto, #e1e1e6);background-color:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 4px);overflow:hidden;width:100%;max-width:100%;height:100%;min-height:200px;-webkit-user-select:none;user-select:none;--ui-prop-altura-linha: 22px;--ui-prop-rotulo-largura: 45%}:host([densidade="compacta"]){--ui-prop-altura-linha: 19px;font-size:10.5px}:host([densidade="ultracompacta"]){--ui-prop-altura-linha: 17px;font-size:10px}:host([densidade="relaxada"]){--ui-prop-altura-linha: 28px;font-size:12px}:host([colapsado]){width:32px!important;min-width:32px!important;max-width:32px!important;height:100%!important;cursor:pointer;transition:width .2s cubic-bezier(.4,0,.2,1)}:host([colapsado]) .ui-prop__header,:host([colapsado]) .ui-prop__tipo-seletor-container,:host([colapsado]) .ui-prop__filtro-container,:host([colapsado]) .ui-prop__corpo-wrapper,:host([colapsado]) .ui-prop__footer,:host([colapsado]) .ui-prop__resizer-canto{display:none!important}:host([colapsado]) .ui-prop__faixa-estreita{display:flex!important;flex-direction:column;align-items:center;width:100%;height:100%;padding:8px 0;gap:10px;box-sizing:border-box;background-color:var(--ui-cor-fundo-elevado, #18181d);-webkit-user-select:none;user-select:none;cursor:pointer}.ui-prop__faixa-estreita{display:none}.ui-prop__faixa-icone{display:flex;align-items:center;justify-content:center;color:var(--ui-cor-destaque, #00E08A);flex-shrink:0}.ui-prop__faixa-btn-expandir{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:3px;color:var(--ui-cor-texto, #e1e1e6);cursor:pointer;padding:0;transition:all .15s ease;flex-shrink:0}.ui-prop__faixa-btn-expandir:hover{background-color:var(--ui-cor-destaque, #00E08A);color:#000;border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__faixa-texto{writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:2px;color:var(--ui-cor-texto-secundario, #888899);margin-top:8px;flex:1;pointer-events:none}:host([colapsado]):hover .ui-prop__faixa-texto{color:var(--ui-cor-texto, #ffffff)}:host([flutuante]){position:fixed!important;z-index:var(--ui-z-docked-bar, 600)!important;box-shadow:var(--ui-sombra-lg, 0 16px 48px rgba(0, 0, 0, .75)),0 0 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 14%,transparent),0 6px 14px #00000080!important;border-radius:6px!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);resize:both;overflow:hidden;max-width:95vw;max-height:95vh;min-width:220px;min-height:200px}:host([flutuante]) .ui-prop__header{cursor:grab;-webkit-user-select:none;user-select:none}:host([flutuante].arrastando) .ui-prop__header{cursor:grabbing!important}.ui-prop__resizer-canto{display:none}:host([flutuante]) .ui-prop__resizer-canto{display:block;position:absolute;bottom:0;right:0;width:14px;height:14px;cursor:nwse-resize;z-index:50;background:linear-gradient(135deg,transparent 50%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 50%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 65%,transparent 65%,transparent 80%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 80%);pointer-events:auto}.ui-prop__btn-icone--ativo{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)!important;color:var(--ui-cor-destaque, #00E08A)!important}.ui-prop__container{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;flex:1;overflow:hidden;box-sizing:border-box}.ui-prop__header{display:flex;align-items:center;justify-content:space-between;height:22px;min-height:22px;padding:0 8px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__header{height:20px;min-height:20px;padding:0 6px}:host([densidade="ultracompacta"]) .ui-prop__header{height:18px;min-height:18px;padding:0 5px}.ui-prop__header-titulo{display:flex;align-items:center;gap:5px;font-size:10.5px;font-weight:600;color:var(--ui-cor-texto, #ffffff);text-transform:uppercase;letter-spacing:.4px}:host([densidade="compacta"]) .ui-prop__header-titulo{font-size:10px;gap:4px}:host([densidade="ultracompacta"]) .ui-prop__header-titulo{font-size:9.5px;gap:3px}.ui-prop__header-icone{display:flex;align-items:center;color:var(--ui-cor-destaque, #00E08A)}.ui-prop__header-icone svg{width:12px;height:12px}:host([densidade="ultracompacta"]) .ui-prop__header-icone svg{width:10px;height:10px}.ui-prop__header-acoes{display:flex;align-items:center;gap:2px}.ui-prop__btn-icone{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;background:transparent;border:none;border-radius:2px;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;transition:all .15s ease;padding:0}.ui-prop__btn-icone:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-texto, #ffffff)}:host([densidade="compacta"]) .ui-prop__btn-icone{width:17px;height:17px}:host([densidade="ultracompacta"]) .ui-prop__btn-icone{width:16px;height:16px}.ui-prop__tipo-seletor-container{padding:3px 6px;background-color:var(--ui-cor-superficie, #141417);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;flex-direction:column;gap:3px;flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__tipo-seletor-container{padding:2px 5px;gap:2px}:host([densidade="ultracompacta"]) .ui-prop__tipo-seletor-container{padding:1px 4px;gap:1px}.ui-prop__tipo-revit-card{display:flex;align-items:center;gap:10px;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-sm, 4px);padding:6px 8px;cursor:pointer;transition:border-color .15s ease}.ui-prop__tipo-revit-card:hover{border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__tipo-miniatura{width:32px;height:32px;border-radius:3px;background-color:var(--ui-cor-fundo-elevado, #24242a);display:flex;align-items:center;justify-content:center;color:var(--ui-cor-destaque, #00E08A);flex-shrink:0}.ui-prop__tipo-info{display:flex;flex-direction:column;flex:1;min-width:0}.ui-prop__tipo-nome{font-weight:600;font-size:12px;color:var(--ui-cor-texto, #ffffff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-prop__tipo-subtexto{font-size:11px;color:var(--ui-cor-texto-secundario, #888899);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-prop__tipo-revit-subbarra{display:flex;align-items:center;gap:6px}.ui-prop__tipo-select{flex:1;min-width:0;width:0;height:20px;background-color:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:2px;padding:0 16px 0 2px;font-size:10.5px;font-weight:500;cursor:pointer;outline:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 4px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.ui-prop__tipo-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);color:#fff}.ui-prop__tipo-select:focus{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent);color:var(--ui-cor-destaque, #00E08A)}:host([densidade="compacta"]) .ui-prop__tipo-select{height:18px;font-size:10px;padding:0 14px 0 2px}:host([densidade="ultracompacta"]) .ui-prop__tipo-select{height:16px;font-size:9.5px;padding:0 12px 0 2px}.ui-prop__btn-editar-tipo{height:20px;padding:0 6px;background-color:transparent;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:2px;color:var(--ui-cor-texto, #ffffff);font-size:10.5px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all .15s ease}:host([densidade="compacta"]) .ui-prop__btn-editar-tipo{height:18px;font-size:10px}:host([densidade="ultracompacta"]) .ui-prop__btn-editar-tipo{height:16px;font-size:9.5px}.ui-prop__btn-editar-tipo:hover{background-color:var(--ui-cor-botao-secundario-hover, #2a2a34);border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__tipo-autocad-bar{display:flex;align-items:center;gap:2px;width:100%;min-width:0;box-sizing:border-box;background:transparent}.ui-prop__tipo-autocad-acoes{display:flex;align-items:center;gap:1px;flex-shrink:0;border-left:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));padding-left:3px;margin-left:1px}.ui-prop__btn-autocad{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;background:transparent;border:none;border-radius:2px;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;padding:0;transition:all .15s ease}:host([densidade="compacta"]) .ui-prop__btn-autocad{width:18px;height:18px}:host([densidade="ultracompacta"]) .ui-prop__btn-autocad{width:16px;height:16px}.ui-prop__btn-autocad:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .1));color:var(--ui-cor-destaque, #00E08A)}.ui-prop__btn-autocad:active{transform:scale(.92);background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent)}.ui-prop__filtro-container{display:flex;align-items:center;padding:4px 8px;background-color:var(--ui-cor-fundo, #0b0b0d);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));gap:6px;flex-shrink:0}.ui-prop__filtro-icone{color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0}.ui-prop__filtro-input{flex:1;background:transparent;border:none;outline:none;font-size:11px;color:var(--ui-cor-texto, #e1e1e6);padding:3px 0}.ui-prop__filtro-input::placeholder{color:var(--ui-cor-texto-secundario, #666677)}.ui-prop__corpo-wrapper{position:relative;flex:1;min-height:0;width:100%;overflow:hidden;display:flex;flex-direction:column}.ui-prop__corpo{flex:1;min-height:0;width:100%;overflow-y:auto;overflow-x:hidden;background-color:var(--ui-cor-superficie, #141417);position:relative;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent) var(--ui-cor-fundo, #0b0b0d)}.ui-prop__corpo::-webkit-scrollbar{width:8px}.ui-prop__corpo::-webkit-scrollbar-track{background:var(--ui-cor-fundo, #0b0b0d)}.ui-prop__corpo::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-radius:var(--ui-raio-sm, 4px)}.ui-prop__corpo::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent)}.ui-prop__categoria{border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1))}.ui-prop__categoria-header{position:relative;z-index:25;display:flex;align-items:center;justify-content:space-between;height:21px;padding:0 6px;background-color:var(--ui-cor-fundo-elevado, #18181d);cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:600;font-size:10.5px;color:var(--ui-cor-texto, #ffffff);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .05));transition:background-color .15s ease;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__categoria-header{height:19px;font-size:10px;padding:0 5px}:host([densidade="ultracompacta"]) .ui-prop__categoria-header{height:17px;font-size:9.5px;padding:0 4px}.ui-prop__categoria-header:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .06))}.ui-prop__categoria-titulo-bloco{display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__categoria-seta{display:inline-flex;align-items:center;justify-content:center;font-size:9px;width:12px;height:12px;color:var(--ui-cor-texto-secundario, #888899);transition:transform .15s ease}.ui-prop__categoria--aberta .ui-prop__categoria-seta{transform:rotate(90deg)}.ui-prop__categoria-contador{font-size:10px;font-weight:400;color:var(--ui-cor-texto-secundario, #888899)}.ui-prop__categoria-conteudo{display:none}.ui-prop__categoria--aberta .ui-prop__categoria-conteudo{display:block}.ui-prop__linha{display:flex;align-items:stretch;min-height:var(--ui-prop-altura-linha, 24px);border-bottom:1px dotted var(--ui-cor-borda, rgba(255, 255, 255, .08));box-sizing:border-box;position:relative;z-index:1;transition:background-color .1s ease}.ui-prop__linha:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .04))}.ui-prop__linha:focus-within{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)}.ui-prop__linha:focus-within .ui-prop__col-rotulo{color:var(--ui-cor-texto, #ffffff);font-weight:500}.ui-prop__linha--modificada{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 5%,transparent)}.ui-prop__col-rotulo{width:var(--ui-prop-rotulo-largura, 45%);padding:1px 4px 1px 8px;display:flex;align-items:center;color:var(--ui-cor-texto-secundario, #9999aa);border-right:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;position:relative;flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__col-rotulo{padding:0 4px 0 6px;font-size:10px}:host([densidade="ultracompacta"]) .ui-prop__col-rotulo{padding:0 3px 0 5px;font-size:9.5px}.ui-prop__col-rotulo span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__col-rotulo--scrub{cursor:ew-resize;-webkit-user-select:none;user-select:none;transition:color .15s ease,background-color .15s ease}.ui-prop__col-rotulo--scrub:hover{color:var(--ui-cor-destaque, #00E08A);background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 5%,transparent)}.ui-prop__col-rotulo--arrastando{color:#000!important;background-color:var(--ui-cor-destaque, #00E08A)!important;font-weight:600;cursor:ew-resize!important}.ui-prop__col-rotulo--arrastando span{color:#000!important}.ui-prop__splitter{position:absolute;top:0;bottom:0;min-height:100%;left:calc(var(--ui-prop-rotulo-largura, 45%) - 4px);width:8px;cursor:col-resize;z-index:30;touch-action:none;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}.ui-prop__splitter:after{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;background-color:transparent;pointer-events:none;transition:background-color .15s ease,box-shadow .15s ease}.ui-prop__splitter:hover:after,.ui-prop__splitter--ativo:after{background-color:var(--ui-cor-destaque, #00E08A);box-shadow:0 0 6px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 50%,transparent)}.ui-prop__splitter--ativo{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)}.ui-prop__col-valor{width:calc(100% - var(--ui-prop-rotulo-largura, 45%));flex:1 1 0px;min-width:0!important;display:flex;align-items:stretch;padding:0;overflow:hidden;box-sizing:border-box;position:relative;transition:background-color .1s ease,box-shadow .1s ease}.ui-prop__col-valor:focus-within{background-color:var(--ui-cor-fundo, #0b0b0d);box-shadow:inset 0 0 0 1px var(--ui-cor-destaque, #00E08A)}.ui-prop__editor-input{width:100%;min-width:0;height:100%;min-height:var(--ui-prop-altura-linha, 24px);background:transparent;border:none;border-radius:0;color:var(--ui-cor-texto, #ffffff);font-family:inherit;font-size:11px;padding:0 8px;outline:none;box-sizing:border-box;transition:background-color .1s ease}.ui-prop__editor-input:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__editor-input--numero{text-align:right;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums}.ui-prop__editor-input--calculando{color:var(--ui-cor-destaque, #00E08A)!important;font-weight:500}.ui-prop__col-valor:has(.ui-prop__editor-input--calculando){background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)!important;box-shadow:inset 0 0 0 1.5px var(--ui-cor-destaque, #00E08A)!important}.ui-prop__editor-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);background-color:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 8px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:background-color .1s ease}.ui-prop__editor-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__editor-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-cor-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);cursor:pointer;padding:0 20px 0 8px;box-sizing:border-box;position:relative;border:none;border-radius:0;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;transition:background-color .1s ease}.ui-prop__editor-cor-container:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent)}.ui-prop__cor-amostra{width:13px;height:13px;border-radius:2px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent);flex-shrink:0;box-sizing:border-box}.ui-prop__cor-texto{flex:1 1 0px;min-width:0!important;width:0!important;font-size:11px;color:var(--ui-cor-texto, #ffffff);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__cor-picker-oculto{position:absolute;opacity:0;pointer-events:none;width:0;height:0}.ui-prop__editor-linha-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__linha-amostra-svg{width:24px;height:10px;flex-shrink:0}.ui-prop__linha-amostra-svg line{stroke:var(--ui-cor-texto, #e1e1e6);stroke-width:1.5}.ui-prop__linha-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__linha-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__linha-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-espessura-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__espessura-amostra-svg{width:20px;height:10px;flex-shrink:0}.ui-prop__espessura-amostra-svg line{stroke:var(--ui-cor-texto, #e1e1e6)}.ui-prop__espessura-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__espessura-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__espessura-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-cor-cad-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__cor-cad-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__cor-cad-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__cor-cad-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-booleano{display:flex;align-items:center;gap:6px;width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);cursor:pointer;padding:0 8px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.ui-prop__editor-booleano:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__checkbox-custom{width:13px;height:13px;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .25));border-radius:2px;background-color:var(--ui-cor-fundo, #0b0b0d);display:flex;align-items:center;justify-content:center;transition:all .15s ease}.ui-prop__checkbox-custom--marcado{background-color:var(--ui-cor-destaque, #00E08A);border-color:var(--ui-cor-destaque, #00E08A);color:#000}.ui-prop__booleano-rotulo{font-size:11px;color:var(--ui-cor-texto, #ffffff)}.ui-prop__btn-acao-inline{width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 8px;background-color:transparent;border:none;border-radius:0;color:var(--ui-cor-texto, #ffffff);font-size:11px;font-weight:500;cursor:pointer;white-space:nowrap;text-align:left;transition:all .15s ease;box-sizing:border-box}.ui-prop__btn-acao-inline:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);color:var(--ui-cor-destaque, #00E08A)}.ui-prop__valor-readonly{display:flex;align-items:center;width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);font-size:11px;color:var(--ui-cor-texto-secundario, #777788);padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;-webkit-user-select:text;user-select:text}.ui-prop__valor-readonly--numero{justify-content:flex-end;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums}.ui-prop__unidade-sufixo{display:flex;align-items:center;font-size:10px;color:var(--ui-cor-texto-secundario, #777788);padding-right:8px;flex-shrink:0;-webkit-user-select:none;user-select:none}.ui-prop__vazio{padding:24px 16px;text-align:center;color:var(--ui-cor-texto-secundario, #888899);font-size:12px}.ui-prop__footer{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;background-color:var(--ui-cor-fundo-elevado, #18181c);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1));flex-shrink:0}.ui-prop__link-ajuda{font-size:11px;color:var(--ui-cor-destaque, #00E08A);text-decoration:none;cursor:pointer}.ui-prop__link-ajuda:hover{text-decoration:underline}.ui-prop__footer-botoes{display:flex;gap:6px}.ui-prop__btn-aplicar{height:24px;padding:0 12px;background-color:var(--ui-cor-destaque, #00E08A);color:#000;border:none;border-radius:3px;font-size:11px;font-weight:600;cursor:pointer;transition:all .15s ease}.ui-prop__btn-aplicar:disabled{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent);cursor:not-allowed}.ui-prop__btn-desfazer{height:24px;padding:0 8px;background:transparent;color:var(--ui-cor-texto-secundario, #888899);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:3px;font-size:11px;cursor:pointer;transition:all .15s ease}.ui-prop__btn-desfazer:hover:not(:disabled){background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-texto, #ffffff)}.ui-prop__btn-desfazer:disabled{opacity:.4;cursor:not-allowed}@media (max-width: 640px){:host{--ui-prop-altura-linha: 28px;font-size:13px}.ui-prop__btn-icone{min-width:28px;min-height:28px}.ui-prop__footer-botoes{gap:8px}.ui-prop__btn-aplicar,.ui-prop__btn-desfazer{height:30px;font-size:12px;padding:0 12px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-prop__editor-input,.ui-prop__editor-select{touch-action:manipulation;font-size:14px}}`;
1891
- function Et() {
1967
+ const St = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:var(--ui-fonte-base, "Inter", sans-serif);font-size:var(--ui-tamanho-corpo-sm, 12px);color:var(--ui-cor-texto, #e1e1e6);background-color:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 4px);overflow:hidden;width:100%;max-width:100%;height:100%;min-height:200px;-webkit-user-select:none;user-select:none;--ui-prop-altura-linha: 22px;--ui-prop-rotulo-largura: 45%}:host([densidade="compacta"]){--ui-prop-altura-linha: 19px;font-size:10.5px}:host([densidade="ultracompacta"]){--ui-prop-altura-linha: 17px;font-size:10px}:host([densidade="relaxada"]){--ui-prop-altura-linha: 28px;font-size:12px}:host([colapsado]){width:32px!important;min-width:32px!important;max-width:32px!important;height:100%!important;cursor:pointer;transition:width .2s cubic-bezier(.4,0,.2,1)}:host([colapsado]) .ui-prop__header,:host([colapsado]) .ui-prop__tipo-seletor-container,:host([colapsado]) .ui-prop__filtro-container,:host([colapsado]) .ui-prop__corpo-wrapper,:host([colapsado]) .ui-prop__footer,:host([colapsado]) .ui-prop__resizer-canto{display:none!important}:host([colapsado]) .ui-prop__faixa-estreita{display:flex!important;flex-direction:column;align-items:center;width:100%;height:100%;padding:8px 0;gap:10px;box-sizing:border-box;background-color:var(--ui-cor-fundo-elevado, #18181d);-webkit-user-select:none;user-select:none;cursor:pointer}.ui-prop__faixa-estreita{display:none}.ui-prop__faixa-icone{display:flex;align-items:center;justify-content:center;color:var(--ui-cor-destaque, #00E08A);flex-shrink:0}.ui-prop__faixa-btn-expandir{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:3px;color:var(--ui-cor-texto, #e1e1e6);cursor:pointer;padding:0;transition:all .15s ease;flex-shrink:0}.ui-prop__faixa-btn-expandir:hover{background-color:var(--ui-cor-destaque, #00E08A);color:#000;border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__faixa-texto{writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:2px;color:var(--ui-cor-texto-secundario, #888899);margin-top:8px;flex:1;pointer-events:none}:host([colapsado]):hover .ui-prop__faixa-texto{color:var(--ui-cor-texto, #ffffff)}:host([flutuante]){position:fixed!important;z-index:var(--ui-z-docked-bar, 600)!important;box-shadow:var(--ui-sombra-lg, 0 16px 48px rgba(0, 0, 0, .75)),0 0 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 14%,transparent),0 6px 14px #00000080!important;border-radius:6px!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);resize:both;overflow:hidden;max-width:95vw;max-height:95vh;min-width:220px;min-height:200px}:host([flutuante]) .ui-prop__header{cursor:grab;-webkit-user-select:none;user-select:none}:host([flutuante].arrastando) .ui-prop__header{cursor:grabbing!important}.ui-prop__resizer-canto{display:none}:host([flutuante]) .ui-prop__resizer-canto{display:block;position:absolute;bottom:0;right:0;width:14px;height:14px;cursor:nwse-resize;z-index:50;background:linear-gradient(135deg,transparent 50%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 50%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 65%,transparent 65%,transparent 80%,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 25%,transparent) 80%);pointer-events:auto}.ui-prop__btn-icone--ativo{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)!important;color:var(--ui-cor-destaque, #00E08A)!important}.ui-prop__container{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;flex:1;overflow:hidden;box-sizing:border-box}.ui-prop__header{display:flex;align-items:center;justify-content:space-between;height:22px;min-height:22px;padding:0 8px;background-color:var(--ui-cor-fundo-elevado, #1a1a1e);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__header{height:20px;min-height:20px;padding:0 6px}:host([densidade="ultracompacta"]) .ui-prop__header{height:18px;min-height:18px;padding:0 5px}.ui-prop__header-titulo{display:flex;align-items:center;gap:5px;font-size:10.5px;font-weight:600;color:var(--ui-cor-texto, #ffffff);text-transform:uppercase;letter-spacing:.4px}:host([densidade="compacta"]) .ui-prop__header-titulo{font-size:10px;gap:4px}:host([densidade="ultracompacta"]) .ui-prop__header-titulo{font-size:9.5px;gap:3px}.ui-prop__header-icone{display:flex;align-items:center;color:var(--ui-cor-destaque, #00E08A)}.ui-prop__header-icone svg{width:12px;height:12px}:host([densidade="ultracompacta"]) .ui-prop__header-icone svg{width:10px;height:10px}.ui-prop__header-acoes{display:flex;align-items:center;gap:2px}.ui-prop__btn-icone{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;background:transparent;border:none;border-radius:2px;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;transition:all .15s ease;padding:0}.ui-prop__btn-icone:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-texto, #ffffff)}:host([densidade="compacta"]) .ui-prop__btn-icone{width:17px;height:17px}:host([densidade="ultracompacta"]) .ui-prop__btn-icone{width:16px;height:16px}.ui-prop__tipo-seletor-container{padding:3px 6px;background-color:var(--ui-cor-superficie, #141417);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;flex-direction:column;gap:3px;flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__tipo-seletor-container{padding:2px 5px;gap:2px}:host([densidade="ultracompacta"]) .ui-prop__tipo-seletor-container{padding:1px 4px;gap:1px}.ui-prop__tipo-revit-card{display:flex;align-items:center;gap:10px;background-color:var(--ui-cor-fundo-card, #18181c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-sm, 4px);padding:6px 8px;cursor:pointer;transition:border-color .15s ease}.ui-prop__tipo-revit-card:hover{border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__tipo-miniatura{width:32px;height:32px;border-radius:3px;background-color:var(--ui-cor-fundo-elevado, #24242a);display:flex;align-items:center;justify-content:center;color:var(--ui-cor-destaque, #00E08A);flex-shrink:0}.ui-prop__tipo-info{display:flex;flex-direction:column;flex:1;min-width:0}.ui-prop__tipo-nome{font-weight:600;font-size:12px;color:var(--ui-cor-texto, #ffffff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-prop__tipo-subtexto{font-size:11px;color:var(--ui-cor-texto-secundario, #888899);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-prop__tipo-revit-subbarra{display:flex;align-items:center;gap:6px}.ui-prop__tipo-select{flex:1;min-width:0;width:0;height:20px;background-color:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:2px;padding:0 16px 0 2px;font-size:10.5px;font-weight:500;cursor:pointer;outline:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 4px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.ui-prop__tipo-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);color:#fff}.ui-prop__tipo-select:focus{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent);color:var(--ui-cor-destaque, #00E08A)}:host([densidade="compacta"]) .ui-prop__tipo-select{height:18px;font-size:10px;padding:0 14px 0 2px}:host([densidade="ultracompacta"]) .ui-prop__tipo-select{height:16px;font-size:9.5px;padding:0 12px 0 2px}.ui-prop__btn-editar-tipo{height:20px;padding:0 6px;background-color:transparent;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:2px;color:var(--ui-cor-texto, #ffffff);font-size:10.5px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all .15s ease}:host([densidade="compacta"]) .ui-prop__btn-editar-tipo{height:18px;font-size:10px}:host([densidade="ultracompacta"]) .ui-prop__btn-editar-tipo{height:16px;font-size:9.5px}.ui-prop__btn-editar-tipo:hover{background-color:var(--ui-cor-botao-secundario-hover, #2a2a34);border-color:var(--ui-cor-destaque, #00E08A)}.ui-prop__tipo-autocad-bar{display:flex;align-items:center;gap:2px;width:100%;min-width:0;box-sizing:border-box;background:transparent}.ui-prop__tipo-autocad-acoes{display:flex;align-items:center;gap:1px;flex-shrink:0;border-left:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));padding-left:3px;margin-left:1px}.ui-prop__btn-autocad{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;background:transparent;border:none;border-radius:2px;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;padding:0;transition:all .15s ease}:host([densidade="compacta"]) .ui-prop__btn-autocad{width:18px;height:18px}:host([densidade="ultracompacta"]) .ui-prop__btn-autocad{width:16px;height:16px}.ui-prop__btn-autocad:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .1));color:var(--ui-cor-destaque, #00E08A)}.ui-prop__btn-autocad:active{transform:scale(.92);background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 15%,transparent)}.ui-prop__filtro-container{display:flex;align-items:center;padding:4px 8px;background-color:var(--ui-cor-fundo, #0b0b0d);border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));gap:6px;flex-shrink:0}.ui-prop__filtro-icone{color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0}.ui-prop__filtro-input{flex:1;background:transparent;border:none;outline:none;font-size:11px;color:var(--ui-cor-texto, #e1e1e6);padding:3px 0}.ui-prop__filtro-input::placeholder{color:var(--ui-cor-texto-secundario, #666677)}.ui-prop__corpo-wrapper{position:relative;flex:1;min-height:0;width:100%;overflow:hidden;display:flex;flex-direction:column}.ui-prop__corpo{flex:1;min-height:0;width:100%;overflow-y:auto;overflow-x:hidden;background-color:var(--ui-cor-superficie, #141417);position:relative;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent) var(--ui-cor-fundo, #0b0b0d)}.ui-prop__corpo::-webkit-scrollbar{width:8px}.ui-prop__corpo::-webkit-scrollbar-track{background:var(--ui-cor-fundo, #0b0b0d)}.ui-prop__corpo::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-radius:var(--ui-raio-sm, 4px)}.ui-prop__corpo::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent)}.ui-prop__categoria{border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1))}.ui-prop__categoria-header{position:relative;z-index:25;display:flex;align-items:center;justify-content:space-between;height:21px;padding:0 6px;background-color:var(--ui-cor-fundo-elevado, #18181d);cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:600;font-size:10.5px;color:var(--ui-cor-texto, #ffffff);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .05));transition:background-color .15s ease;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__categoria-header{height:19px;font-size:10px;padding:0 5px}:host([densidade="ultracompacta"]) .ui-prop__categoria-header{height:17px;font-size:9.5px;padding:0 4px}.ui-prop__categoria-header:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .06))}.ui-prop__categoria-titulo-bloco{display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__categoria-seta{display:inline-flex;align-items:center;justify-content:center;font-size:9px;width:12px;height:12px;color:var(--ui-cor-texto-secundario, #888899);transition:transform .15s ease}.ui-prop__categoria--aberta .ui-prop__categoria-seta{transform:rotate(90deg)}.ui-prop__categoria-contador{font-size:10px;font-weight:400;color:var(--ui-cor-texto-secundario, #888899)}.ui-prop__categoria-conteudo{display:none}.ui-prop__categoria--aberta .ui-prop__categoria-conteudo{display:block}.ui-prop__linha{display:flex;align-items:stretch;min-height:var(--ui-prop-altura-linha, 24px);border-bottom:1px dotted var(--ui-cor-borda, rgba(255, 255, 255, .08));box-sizing:border-box;position:relative;z-index:1;transition:background-color .1s ease}.ui-prop__linha:hover{background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .04))}.ui-prop__linha:focus-within{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)}.ui-prop__linha:focus-within .ui-prop__col-rotulo{color:var(--ui-cor-texto, #ffffff);font-weight:500}.ui-prop__linha--modificada{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 5%,transparent)}.ui-prop__col-rotulo{width:var(--ui-prop-rotulo-largura, 45%);padding:1px 4px 1px 8px;display:flex;align-items:center;color:var(--ui-cor-texto-secundario, #9999aa);border-right:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;position:relative;flex-shrink:0;box-sizing:border-box}:host([densidade="compacta"]) .ui-prop__col-rotulo{padding:0 4px 0 6px;font-size:10px}:host([densidade="ultracompacta"]) .ui-prop__col-rotulo{padding:0 3px 0 5px;font-size:9.5px}.ui-prop__col-rotulo span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__col-rotulo--scrub{cursor:ew-resize;-webkit-user-select:none;user-select:none;transition:color .15s ease,background-color .15s ease}.ui-prop__col-rotulo--scrub:hover{color:var(--ui-cor-destaque, #00E08A);background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 5%,transparent)}.ui-prop__col-rotulo--arrastando{color:#000!important;background-color:var(--ui-cor-destaque, #00E08A)!important;font-weight:600;cursor:ew-resize!important}.ui-prop__col-rotulo--arrastando span{color:#000!important}.ui-prop__splitter{position:absolute;top:0;bottom:0;min-height:100%;left:calc(var(--ui-prop-rotulo-largura, 45%) - 4px);width:8px;cursor:col-resize;z-index:30;touch-action:none;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center}.ui-prop__splitter:after{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;background-color:transparent;pointer-events:none;transition:background-color .15s ease,box-shadow .15s ease}.ui-prop__splitter:hover:after,.ui-prop__splitter--ativo:after{background-color:var(--ui-cor-destaque, #00E08A);box-shadow:0 0 6px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 50%,transparent)}.ui-prop__splitter--ativo{background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)}.ui-prop__col-valor{width:calc(100% - var(--ui-prop-rotulo-largura, 45%));flex:1 1 0px;min-width:0!important;display:flex;align-items:stretch;padding:0;overflow:hidden;box-sizing:border-box;position:relative;transition:background-color .1s ease,box-shadow .1s ease}.ui-prop__col-valor:focus-within{background-color:var(--ui-cor-fundo, #0b0b0d);box-shadow:inset 0 0 0 1px var(--ui-cor-destaque, #00E08A)}.ui-prop__editor-input{width:100%;min-width:0;height:100%;min-height:var(--ui-prop-altura-linha, 24px);background:transparent;border:none;border-radius:0;color:var(--ui-cor-texto, #ffffff);font-family:inherit;font-size:11px;padding:0 8px;outline:none;box-sizing:border-box;transition:background-color .1s ease}.ui-prop__editor-input:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__editor-input--numero{text-align:right;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums}.ui-prop__editor-input--calculando{color:var(--ui-cor-destaque, #00E08A)!important;font-weight:500}.ui-prop__col-valor:has(.ui-prop__editor-input--calculando){background-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 8%,transparent)!important;box-shadow:inset 0 0 0 1.5px var(--ui-cor-destaque, #00E08A)!important}.ui-prop__editor-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);background-color:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 8px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:background-color .1s ease}.ui-prop__editor-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__editor-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-cor-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);cursor:pointer;padding:0 20px 0 8px;box-sizing:border-box;position:relative;border:none;border-radius:0;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;transition:background-color .1s ease}.ui-prop__editor-cor-container:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent)}.ui-prop__cor-amostra{width:13px;height:13px;border-radius:2px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent);flex-shrink:0;box-sizing:border-box}.ui-prop__cor-texto{flex:1 1 0px;min-width:0!important;width:0!important;font-size:11px;color:var(--ui-cor-texto, #ffffff);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-prop__cor-picker-oculto{position:absolute;opacity:0;pointer-events:none;width:0;height:0}.ui-prop__editor-linha-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__linha-amostra-svg{width:24px;height:10px;flex-shrink:0}.ui-prop__linha-amostra-svg line{stroke:var(--ui-cor-texto, #e1e1e6);stroke-width:1.5}.ui-prop__linha-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__linha-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__linha-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-espessura-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__espessura-amostra-svg{width:20px;height:10px;flex-shrink:0}.ui-prop__espessura-amostra-svg line{stroke:var(--ui-cor-texto, #e1e1e6)}.ui-prop__espessura-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__espessura-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__espessura-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-cor-cad-container{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;min-width:0!important;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 0 0 8px;box-sizing:border-box;overflow:hidden;border:none;border-radius:0}.ui-prop__cor-cad-select{flex:1 1 0px;min-width:0!important;width:0!important;max-width:100%;height:100%;background:transparent;color:var(--ui-cor-texto, #ffffff);border:none;border-radius:0;font-size:11px;padding:0 20px 0 4px;outline:none;cursor:pointer;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888899' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:8px 5px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.ui-prop__cor-cad-select:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__cor-cad-select option{background-color:var(--ui-cor-fundo-elevado, #18181c);color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor-booleano{display:flex;align-items:center;gap:6px;width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);cursor:pointer;padding:0 8px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.ui-prop__editor-booleano:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 3%,transparent)}.ui-prop__checkbox-custom{width:13px;height:13px;border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .25));border-radius:2px;background-color:var(--ui-cor-fundo, #0b0b0d);display:flex;align-items:center;justify-content:center;transition:all .15s ease}.ui-prop__checkbox-custom--marcado{background-color:var(--ui-cor-destaque, #00E08A);border-color:var(--ui-cor-destaque, #00E08A);color:#000}.ui-prop__booleano-rotulo{font-size:11px;color:var(--ui-cor-texto, #ffffff)}.ui-prop__btn-acao-inline{width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);padding:0 8px;background-color:transparent;border:none;border-radius:0;color:var(--ui-cor-texto, #ffffff);font-size:11px;font-weight:500;cursor:pointer;white-space:nowrap;text-align:left;transition:all .15s ease;box-sizing:border-box}.ui-prop__btn-acao-inline:hover{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);color:var(--ui-cor-destaque, #00E08A)}.ui-prop__valor-readonly{display:flex;align-items:center;width:100%;height:100%;min-height:var(--ui-prop-altura-linha, 24px);font-size:11px;color:var(--ui-cor-texto-secundario, #777788);padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;-webkit-user-select:text;user-select:text}.ui-prop__valor-readonly--numero{justify-content:flex-end;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums}.ui-prop__unidade-sufixo{display:flex;align-items:center;font-size:10px;color:var(--ui-cor-texto-secundario, #777788);padding-right:8px;flex-shrink:0;-webkit-user-select:none;user-select:none}.ui-prop__vazio{padding:24px 16px;text-align:center;color:var(--ui-cor-texto-secundario, #888899);font-size:12px}.ui-prop__footer{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;background-color:var(--ui-cor-fundo-elevado, #18181c);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1));flex-shrink:0}.ui-prop__link-ajuda{font-size:11px;color:var(--ui-cor-destaque, #00E08A);text-decoration:none;cursor:pointer}.ui-prop__link-ajuda:hover{text-decoration:underline}.ui-prop__footer-botoes{display:flex;gap:6px}.ui-prop__btn-aplicar{height:24px;padding:0 12px;background-color:var(--ui-cor-destaque, #00E08A);color:#000;border:none;border-radius:3px;font-size:11px;font-weight:600;cursor:pointer;transition:all .15s ease}.ui-prop__btn-aplicar:disabled{background-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 30%,transparent);cursor:not-allowed}.ui-prop__btn-desfazer{height:24px;padding:0 8px;background:transparent;color:var(--ui-cor-texto-secundario, #888899);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:3px;font-size:11px;cursor:pointer;transition:all .15s ease}.ui-prop__btn-desfazer:hover:not(:disabled){background-color:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));color:var(--ui-cor-texto, #ffffff)}.ui-prop__btn-desfazer:disabled{opacity:.4;cursor:not-allowed}@media (max-width: 640px){:host{--ui-prop-altura-linha: 28px;font-size:13px}.ui-prop__btn-icone{min-width:28px;min-height:28px}.ui-prop__footer-botoes{gap:8px}.ui-prop__btn-aplicar,.ui-prop__btn-desfazer{height:30px;font-size:12px;padding:0 12px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.ui-prop__editor-input,.ui-prop__editor-select{touch-action:manipulation;font-size:14px}}.ui-prop__editor--misto,.ui-prop__editor--misto .ui-prop__booleano-rotulo,.ui-prop__editor--misto .ui-prop__cor-texto,.ui-prop__editor--misto select,select.ui-prop__editor--misto{font-style:italic;color:var(--ui-prop-misto-cor, var(--ui-cor-texto-secundario, #a0a0ab))}.ui-prop__editor-input.ui-prop__editor--misto::placeholder{font-style:italic;color:var(--ui-prop-misto-cor, var(--ui-cor-texto-secundario, #a0a0ab));opacity:1}.ui-prop__editor--misto option:not([data-misto]),select.ui-prop__editor--misto option:not([data-misto]){font-style:normal;color:var(--ui-cor-texto, #ffffff)}.ui-prop__editor--misto svg{opacity:.35}.ui-prop__checkbox-custom--misto{border-color:var(--ui-prop-misto-cor, var(--ui-cor-texto-secundario, #a0a0ab));color:var(--ui-prop-misto-cor, var(--ui-cor-texto-secundario, #a0a0ab));font-style:normal}.ui-prop__cor-amostra--misto{background:linear-gradient(to top right,transparent calc(50% - 1px),var(--ui-prop-misto-cor, var(--ui-cor-texto-secundario, #a0a0ab)) 50%,transparent calc(50% + 1px))}`;
1968
+ function Lt() {
1892
1969
  return `
1893
- <style>${_t}</style>
1970
+ <style>${St}</style>
1894
1971
  <div class="ui-prop__container" id="container">
1895
1972
  <!-- 0. Faixa Vertical da Coluna Estreita (visível quando colapsado) -->
1896
1973
  <div class="ui-prop__faixa-estreita" id="faixa-estreita" title="Clique para expandir painel">
@@ -1989,118 +2066,20 @@ function Et() {
1989
2066
  </div>
1990
2067
  `;
1991
2068
  }
1992
- function O(r, t) {
1993
- return r == null && t == null ? !0 : Object.is(r, t);
1994
- }
1995
- class yt {
1996
- constructor(t) {
1997
- b(this, "valoresOriginais", {});
1998
- b(this, "valoresAtuais", {});
1999
- this.ctx = t;
2000
- }
2001
- inicializarCategorias(t) {
2002
- this.valoresOriginais = {}, this.valoresAtuais = {};
2003
- const e = /* @__PURE__ */ new Set();
2004
- t.forEach((i) => {
2005
- (i.propriedades || []).forEach((o) => {
2006
- e.has(o.id) && typeof console < "u" && console.warn(`[ui-tabela-propriedades] id de propriedade repetido: "${o.id}". Os valores são indexados por id e serão compartilhados.`), e.add(o.id), this.valoresOriginais[o.id] = o.valor, this.valoresAtuais[o.id] = o.valor;
2007
- });
2008
- }), this.ctx.onAtualizarBotoesFooter(!1);
2009
- }
2010
- /** Há alguma propriedade com valor diferente do original (último aplicar/carregar)? */
2011
- get isDirty() {
2012
- return Object.keys(this.valoresAtuais).some((t) => this.isModificada(t));
2013
- }
2014
- isModificada(t) {
2015
- return !O(this.valoresAtuais[t], this.valoresOriginais[t]);
2016
- }
2017
- getValores() {
2018
- return { ...this.valoresAtuais };
2019
- }
2020
- getValoresOriginais() {
2021
- return { ...this.valoresOriginais };
2022
- }
2023
- setValores(t) {
2024
- !t || typeof t != "object" || (Object.keys(t).forEach((e) => {
2025
- this.valoresAtuais[e] = t[e], this.valoresOriginais[e] = t[e];
2026
- }), this.ctx.onAtualizarBotoesFooter(this.isDirty));
2027
- }
2028
- obterValor(t) {
2029
- return this.valoresAtuais[t];
2030
- }
2031
- /** Alteração programática: atualiza o editor na tela; não emite se o valor não mudou. */
2032
- definirValor(t, e, i = !0) {
2033
- const o = this.valoresAtuais[t];
2034
- O(o, e) || (this.valoresAtuais[t] = e, this.aposAlterar(t), this.ctx.onAtualizarCampoVisual(t, e), i && this.emitirAlteracao(t, e, o, this.categoriaDe(t)));
2035
- }
2036
- /** Alteração feita pelo usuário num editor. Em modo manual só emite no Aplicar. */
2037
- registrarAlteracao(t, e, i) {
2038
- const o = this.valoresAtuais[e];
2039
- O(o, i) || (this.valoresAtuais[e] = i, this.aposAlterar(e), this.ctx.isModoManual() || this.emitirAlteracao(e, i, o, t));
2040
- }
2041
- aplicar() {
2042
- var e;
2043
- if (!this.isDirty) return;
2044
- this.valoresOriginais = { ...this.valoresAtuais }, this.ctx.onAtualizarBotoesFooter(!1);
2045
- const t = (e = this.ctx.hostElement.shadowRoot) == null ? void 0 : e.querySelectorAll(".ui-prop__linha--modificada");
2046
- t == null || t.forEach((i) => i.classList.remove("ui-prop__linha--modificada")), this.ctx.hostElement.dispatchEvent(
2047
- new CustomEvent("ui-aplicar", {
2048
- bubbles: !0,
2049
- composed: !0,
2050
- detail: { valores: { ...this.valoresAtuais } }
2051
- })
2052
- );
2053
- }
2054
- desfazer() {
2055
- this.isDirty && (this.valoresAtuais = { ...this.valoresOriginais }, this.ctx.onAtualizarBotoesFooter(!1), this.ctx.onRenderCategorias(), this.ctx.hostElement.dispatchEvent(
2056
- new CustomEvent("ui-desfazer", {
2057
- bubbles: !0,
2058
- composed: !0,
2059
- detail: { valores: { ...this.valoresAtuais } }
2060
- })
2061
- ));
2062
- }
2063
- /** Marca/desmarca a linha e recalcula os botões do rodapé (voltar ao original limpa o estado). */
2064
- aposAlterar(t) {
2065
- const e = de(this.ctx.hostElement.shadowRoot, t);
2066
- e == null || e.classList.toggle("ui-prop__linha--modificada", this.isModificada(t)), this.ctx.onAtualizarBotoesFooter(this.isDirty);
2067
- }
2068
- categoriaDe(t) {
2069
- var e;
2070
- for (const i of this.ctx.getCategorias())
2071
- if ((e = i.propriedades) != null && e.some((o) => o.id === t)) return i.id;
2072
- return "";
2073
- }
2074
- emitirAlteracao(t, e, i, o = "") {
2075
- this.ctx.hostElement.dispatchEvent(
2076
- new CustomEvent("ui-propriedade-alterada", {
2077
- bubbles: !0,
2078
- composed: !0,
2079
- detail: {
2080
- id: t,
2081
- categoriaId: o,
2082
- valor: e,
2083
- valorAnterior: i,
2084
- todosValores: { ...this.valoresAtuais }
2085
- }
2086
- })
2087
- );
2088
- }
2089
- }
2090
- function wt(r) {
2091
- const { listaContainer: t, categorias: e, termoBusca: i, onToggleCategoria: o, linhaCtx: a } = r;
2092
- if (t.innerHTML = "", !e || e.length === 0) {
2093
- const s = document.createElement("div");
2094
- s.className = "ui-prop__vazio", s.textContent = "Nenhuma propriedade disponível.", t.appendChild(s);
2069
+ function Mt(t) {
2070
+ const { listaContainer: r, categorias: e, termoBusca: o, onToggleCategoria: i, linhaCtx: a } = t;
2071
+ if (r.innerHTML = "", !e || e.length === 0) {
2072
+ const l = document.createElement("div");
2073
+ l.className = "ui-prop__vazio", l.textContent = "Nenhuma propriedade disponível.", r.appendChild(l);
2095
2074
  return;
2096
2075
  }
2097
2076
  const n = document.createDocumentFragment();
2098
- e.forEach((s) => {
2099
- const d = (s.propriedades || []).filter((g) => i ? g.rotulo.toLowerCase().includes(i) || String(g.id).toLowerCase().includes(i) : !0);
2100
- if (i && d.length === 0)
2077
+ e.forEach((l) => {
2078
+ const d = (l.propriedades || []).filter((g) => o ? g.rotulo.toLowerCase().includes(o) || String(g.id).toLowerCase().includes(o) : !0);
2079
+ if (o && d.length === 0)
2101
2080
  return;
2102
- const c = !!i || s.aberto !== !1, l = document.createElement("div");
2103
- l.className = `ui-prop__categoria ${c ? "ui-prop__categoria--aberta" : ""}`, l.setAttribute("data-cat-id", s.id);
2081
+ const c = !!o || l.aberto !== !1, s = document.createElement("div");
2082
+ s.className = `ui-prop__categoria ${c ? "ui-prop__categoria--aberta" : ""}`, s.setAttribute("data-cat-id", l.id);
2104
2083
  const u = document.createElement("div");
2105
2084
  u.className = "ui-prop__categoria-header", u.setAttribute("role", "button"), u.tabIndex = 0, u.setAttribute("aria-expanded", String(c));
2106
2085
  const p = document.createElement("div");
@@ -2108,244 +2087,341 @@ function wt(r) {
2108
2087
  const h = document.createElement("span");
2109
2088
  h.className = "ui-prop__categoria-seta", h.textContent = "▶";
2110
2089
  const m = document.createElement("span");
2111
- m.textContent = s.titulo, p.appendChild(h), p.appendChild(m);
2090
+ m.textContent = l.titulo, p.appendChild(h), p.appendChild(m);
2112
2091
  const x = document.createElement("span");
2113
- x.className = "ui-prop__categoria-contador", x.textContent = String(d.length), u.appendChild(p), u.appendChild(x), u.addEventListener("click", () => o(s.id)), u.addEventListener("keydown", (g) => {
2114
- (g.key === "Enter" || g.key === " ") && (g.preventDefault(), o(s.id));
2092
+ x.className = "ui-prop__categoria-contador", x.textContent = String(d.length), u.appendChild(p), u.appendChild(x), u.addEventListener("click", () => i(l.id)), u.addEventListener("keydown", (g) => {
2093
+ (g.key === "Enter" || g.key === " ") && (g.preventDefault(), i(l.id));
2115
2094
  });
2116
2095
  const f = document.createElement("div");
2117
2096
  f.className = "ui-prop__categoria-conteudo", d.forEach((g) => {
2118
- const _ = Ct(s.id, g, a);
2119
- f.appendChild(_);
2120
- }), l.appendChild(u), l.appendChild(f), n.appendChild(l);
2121
- }), t.appendChild(n);
2097
+ const v = Tt(l.id, g, a);
2098
+ f.appendChild(v);
2099
+ }), s.appendChild(u), s.appendChild(f), n.appendChild(s);
2100
+ }), r.appendChild(n);
2122
2101
  }
2123
- function Ct(r, t, e) {
2124
- const i = document.createElement("div");
2125
- i.className = "ui-prop__linha", i.setAttribute("data-prop-id", t.id);
2126
- const o = e.valoresAtuais[t.id] !== void 0 ? e.valoresAtuais[t.id] : t.valor, a = t.id in e.valoresOriginais ? e.valoresOriginais[t.id] : t.valor;
2127
- O(o, a) || i.classList.add("ui-prop__linha--modificada"), i.addEventListener("dblclick", () => {
2128
- const l = i.querySelector(
2102
+ function Tt(t, r, e) {
2103
+ const o = document.createElement("div");
2104
+ o.className = "ui-prop__linha", o.setAttribute("data-prop-id", r.id);
2105
+ const i = e.valoresAtuais[r.id] !== void 0 ? e.valoresAtuais[r.id] : j(r), a = r.id in e.valoresOriginais ? e.valoresOriginais[r.id] : j(r);
2106
+ R(i, a) || o.classList.add("ui-prop__linha--modificada"), o.classList.toggle("ui-prop__linha--misto", A(i)), o.addEventListener("dblclick", () => {
2107
+ const s = o.querySelector(
2129
2108
  'input:not([type="color"]):not(.ui-prop__cor-picker-oculto), select, .ui-prop__btn-acao-inline'
2130
2109
  );
2131
- l && (l.focus(), l instanceof HTMLInputElement && l.select());
2110
+ s && (s.focus(), s instanceof HTMLInputElement && s.select());
2132
2111
  });
2133
2112
  const n = document.createElement("div");
2134
- n.className = "ui-prop__col-rotulo", n.title = t.rotulo;
2135
- const s = document.createElement("span");
2136
- s.textContent = t.rotulo, n.appendChild(s), t.tipo === "numero" && !t.somenteLeitura && At(n, r, t, e);
2113
+ n.className = "ui-prop__col-rotulo", n.title = r.rotulo;
2114
+ const l = document.createElement("span");
2115
+ l.textContent = r.rotulo, n.appendChild(l), r.tipo === "numero" && !r.somenteLeitura && Nt(n, t, r, e);
2137
2116
  const d = document.createElement("div");
2138
2117
  d.className = "ui-prop__col-valor";
2139
- const c = gt(r, t, o, e.editorCtx);
2140
- if (d.appendChild(c), t.unidade) {
2141
- const l = document.createElement("span");
2142
- l.className = "ui-prop__unidade-sufixo", l.textContent = t.unidade, d.appendChild(l);
2143
- }
2144
- return i.appendChild(n), i.appendChild(d), i;
2145
- }
2146
- function At(r, t, e, i) {
2147
- r.classList.add("ui-prop__col-rotulo--scrub"), r.title = `${e.rotulo} (Arraste para ajustar, duplo-clique para editar)`;
2148
- let o = 0, a = 0, n = !1;
2149
- r.addEventListener("pointerdown", (s) => {
2150
- if (s.button !== 0) return;
2151
- o = s.clientX;
2152
- const d = i.editorCtx.obterValorAtual(e.id);
2118
+ const c = At(t, r, i, e.editorCtx);
2119
+ if (d.appendChild(c), r.unidade) {
2120
+ const s = document.createElement("span");
2121
+ s.className = "ui-prop__unidade-sufixo", s.textContent = r.unidade, d.appendChild(s);
2122
+ }
2123
+ return o.appendChild(n), o.appendChild(d), o;
2124
+ }
2125
+ function Nt(t, r, e, o) {
2126
+ t.classList.add("ui-prop__col-rotulo--scrub"), t.title = `${e.rotulo} (Arraste para ajustar, duplo-clique para editar)`;
2127
+ let i = 0, a = 0, n = !1;
2128
+ t.addEventListener("pointerdown", (l) => {
2129
+ if (l.button !== 0 || A(o.editorCtx.obterValorAtual(e.id))) return;
2130
+ i = l.clientX;
2131
+ const d = o.editorCtx.obterValorAtual(e.id);
2153
2132
  a = typeof d == "number" ? d : parseFloat(String(d || 0)) || 0, n = !1;
2154
2133
  try {
2155
- r.setPointerCapture(s.pointerId);
2134
+ t.setPointerCapture(l.pointerId);
2156
2135
  } catch {
2157
2136
  }
2158
- r.classList.add("ui-prop__col-rotulo--arrastando");
2137
+ t.classList.add("ui-prop__col-rotulo--arrastando");
2159
2138
  const c = (u) => {
2160
- const p = u.clientX - o;
2139
+ const p = u.clientX - i;
2161
2140
  if (Math.abs(p) > 2 && (n = !0), n) {
2162
2141
  let h = 1;
2163
2142
  u.shiftKey ? h = 0.1 : (u.ctrlKey || u.metaKey) && (h = 10);
2164
2143
  const m = e.casasDecimais !== void 0 ? e.casasDecimais : 2, x = Math.pow(10, -Math.min(m, 2));
2165
2144
  let f = a + p * x * h;
2166
- e.casasDecimais !== void 0 ? f = Number(f.toFixed(e.casasDecimais)) : f = Math.round(f * 100) / 100, i.editorCtx.registrarAlteracao(t, e.id, f), i.onAtualizarCampoVisual(e.id, f);
2145
+ e.casasDecimais !== void 0 ? f = Number(f.toFixed(e.casasDecimais)) : f = Math.round(f * 100) / 100, o.editorCtx.registrarAlteracao(r, e.id, f), o.onAtualizarCampoVisual(e.id, f);
2167
2146
  }
2168
- }, l = (u) => {
2169
- r.classList.remove("ui-prop__col-rotulo--arrastando");
2147
+ }, s = (u) => {
2148
+ t.classList.remove("ui-prop__col-rotulo--arrastando");
2170
2149
  try {
2171
- r.hasPointerCapture(u.pointerId) && r.releasePointerCapture(u.pointerId);
2150
+ t.hasPointerCapture(u.pointerId) && t.releasePointerCapture(u.pointerId);
2172
2151
  } catch {
2173
2152
  }
2174
- r.removeEventListener("pointermove", c), r.removeEventListener("pointerup", l), r.removeEventListener("pointercancel", l);
2153
+ t.removeEventListener("pointermove", c), t.removeEventListener("pointerup", s), t.removeEventListener("pointercancel", s);
2175
2154
  };
2176
- r.addEventListener("pointermove", c), r.addEventListener("pointerup", l), r.addEventListener("pointercancel", l);
2155
+ t.addEventListener("pointermove", c), t.addEventListener("pointerup", s), t.addEventListener("pointercancel", s);
2177
2156
  });
2178
2157
  }
2179
- const re = 300, kt = 480, B = /* @__PURE__ */ new WeakMap();
2180
- function zt(r) {
2181
- var i, o, a;
2182
- const t = r.hasAttribute("flutuante"), e = r.style;
2183
- if (t) {
2184
- const n = B.get(r) ?? { acoplado: { width: "", height: "" } };
2185
- n.flutuante = { left: e.left, top: e.top, width: e.width, height: e.height }, B.set(r, n), r.removeAttribute("flutuante"), e.left = "", e.top = "", e.right = "", e.bottom = "", e.position = "", e.zIndex = "", e.width = n.acoplado.width, e.height = n.acoplado.height;
2158
+ const se = 300, Dt = 480, I = /* @__PURE__ */ new WeakMap();
2159
+ function Rt(t) {
2160
+ var o, i, a;
2161
+ const r = t.hasAttribute("flutuante"), e = t.style;
2162
+ if (r) {
2163
+ const n = I.get(t) ?? { acoplado: { width: "", height: "" } };
2164
+ n.flutuante = { left: e.left, top: e.top, width: e.width, height: e.height }, I.set(t, n), t.removeAttribute("flutuante"), e.left = "", e.top = "", e.right = "", e.bottom = "", e.position = "", e.zIndex = "", e.width = n.acoplado.width, e.height = n.acoplado.height;
2186
2165
  } else {
2187
2166
  const n = {
2188
2167
  acoplado: { width: e.width, height: e.height },
2189
- flutuante: (i = B.get(r)) == null ? void 0 : i.flutuante
2168
+ flutuante: (o = I.get(t)) == null ? void 0 : o.flutuante
2190
2169
  };
2191
- if (B.set(r, n), r.setAttribute("flutuante", ""), e.position = "fixed", (o = n.flutuante) != null && o.left || (a = n.flutuante) != null && a.top)
2170
+ if (I.set(t, n), t.setAttribute("flutuante", ""), e.position = "fixed", (i = n.flutuante) != null && i.left || (a = n.flutuante) != null && a.top)
2192
2171
  e.left = n.flutuante.left, e.top = n.flutuante.top, e.width = n.flutuante.width, e.height = n.flutuante.height;
2193
2172
  else if (!e.left && !e.top) {
2194
- const s = Math.max(
2173
+ const l = Math.max(
2195
2174
  20,
2196
- (typeof window < "u" ? window.innerWidth : 1024) - re - 30
2175
+ (typeof window < "u" ? window.innerWidth : 1024) - se - 30
2197
2176
  );
2198
- e.left = `${s}px`, e.top = "70px", e.width = `${re}px`, e.height = `${kt}px`;
2177
+ e.left = `${l}px`, e.top = "70px", e.width = `${se}px`, e.height = `${Dt}px`;
2199
2178
  }
2200
2179
  }
2201
- return !t;
2180
+ return !r;
2202
2181
  }
2203
- function St(r, t, e) {
2204
- const i = t.getElementById("header");
2205
- if (i) {
2206
- let a = null, n = 0, s = 0, d = 0, c = 0;
2207
- const l = (p) => {
2182
+ function Bt(t, r, e) {
2183
+ const o = r.getElementById("header");
2184
+ if (o) {
2185
+ let a = null, n = 0, l = 0, d = 0, c = 0;
2186
+ const s = (p) => {
2208
2187
  if (a === null) return;
2209
- const h = p.clientX - n, m = p.clientY - s;
2188
+ const h = p.clientX - n, m = p.clientY - l;
2210
2189
  let x = d + h, f = c + m;
2211
- const g = Math.max(0, (typeof window < "u" ? window.innerWidth : 1024) - r.offsetWidth), _ = Math.max(0, (typeof window < "u" ? window.innerHeight : 768) - 30);
2212
- x = Math.max(0, Math.min(g, x)), f = Math.max(0, Math.min(_, f)), r.style.left = `${x}px`, r.style.top = `${f}px`, r.style.right = "auto", r.style.bottom = "auto";
2190
+ const g = Math.max(0, (typeof window < "u" ? window.innerWidth : 1024) - t.offsetWidth), v = Math.max(0, (typeof window < "u" ? window.innerHeight : 768) - 30);
2191
+ x = Math.max(0, Math.min(g, x)), f = Math.max(0, Math.min(v, f)), t.style.left = `${x}px`, t.style.top = `${f}px`, t.style.right = "auto", t.style.bottom = "auto";
2213
2192
  }, u = (p) => {
2214
2193
  if (a !== null) {
2215
2194
  try {
2216
- i.releasePointerCapture(p.pointerId);
2195
+ o.releasePointerCapture(p.pointerId);
2217
2196
  } catch {
2218
2197
  }
2219
- i.removeEventListener("pointermove", l), i.removeEventListener("pointerup", u), i.removeEventListener("pointercancel", u), a = null, r.classList.remove("arrastando"), r.dispatchEvent(new CustomEvent("ui-mover", {
2198
+ o.removeEventListener("pointermove", s), o.removeEventListener("pointerup", u), o.removeEventListener("pointercancel", u), a = null, t.classList.remove("arrastando"), t.dispatchEvent(new CustomEvent("ui-mover", {
2220
2199
  bubbles: !0,
2221
2200
  composed: !0,
2222
- detail: { left: r.style.left, top: r.style.top }
2201
+ detail: { left: t.style.left, top: t.style.top }
2223
2202
  }));
2224
2203
  }
2225
2204
  };
2226
- e.add(i, "pointerdown", (p) => {
2227
- if (!r.hasAttribute("flutuante") || p.target.closest("button, input, select, a") || p.button !== 0) return;
2228
- p.preventDefault(), a = p.pointerId, n = p.clientX, s = p.clientY;
2229
- const m = r.getBoundingClientRect();
2230
- d = m.left, c = m.top, r.classList.add("arrastando");
2205
+ e.add(o, "pointerdown", (p) => {
2206
+ if (!t.hasAttribute("flutuante") || p.target.closest("button, input, select, a") || p.button !== 0) return;
2207
+ p.preventDefault(), a = p.pointerId, n = p.clientX, l = p.clientY;
2208
+ const m = t.getBoundingClientRect();
2209
+ d = m.left, c = m.top, t.classList.add("arrastando");
2231
2210
  try {
2232
- i.setPointerCapture(p.pointerId);
2211
+ o.setPointerCapture(p.pointerId);
2233
2212
  } catch {
2234
2213
  }
2235
- i.addEventListener("pointermove", l), i.addEventListener("pointerup", u), i.addEventListener("pointercancel", u);
2214
+ o.addEventListener("pointermove", s), o.addEventListener("pointerup", u), o.addEventListener("pointercancel", u);
2236
2215
  });
2237
2216
  }
2238
- const o = t.getElementById("resizer-canto");
2239
- if (o) {
2240
- let a = null, n = 0, s = 0, d = 0, c = 0;
2241
- const l = (p) => {
2217
+ const i = r.getElementById("resizer-canto");
2218
+ if (i) {
2219
+ let a = null, n = 0, l = 0, d = 0, c = 0;
2220
+ const s = (p) => {
2242
2221
  if (a === null) return;
2243
- const h = Math.max(200, n + (p.clientX - d)), m = Math.max(180, s + (p.clientY - c));
2244
- r.style.width = `${h}px`, r.style.height = `${m}px`;
2222
+ const h = Math.max(200, n + (p.clientX - d)), m = Math.max(180, l + (p.clientY - c));
2223
+ t.style.width = `${h}px`, t.style.height = `${m}px`;
2245
2224
  }, u = (p) => {
2246
2225
  if (a !== null) {
2247
2226
  try {
2248
- o.releasePointerCapture(p.pointerId);
2227
+ i.releasePointerCapture(p.pointerId);
2249
2228
  } catch {
2250
2229
  }
2251
- o.removeEventListener("pointermove", l), o.removeEventListener("pointerup", u), o.removeEventListener("pointercancel", u), a = null, r.dispatchEvent(new CustomEvent("ui-redimensionar", {
2230
+ i.removeEventListener("pointermove", s), i.removeEventListener("pointerup", u), i.removeEventListener("pointercancel", u), a = null, t.dispatchEvent(new CustomEvent("ui-redimensionar", {
2252
2231
  bubbles: !0,
2253
2232
  composed: !0,
2254
- detail: { width: r.style.width, height: r.style.height }
2233
+ detail: { width: t.style.width, height: t.style.height }
2255
2234
  }));
2256
2235
  }
2257
2236
  };
2258
- e.add(o, "pointerdown", (p) => {
2259
- if (!r.hasAttribute("flutuante") || p.button !== 0) return;
2237
+ e.add(i, "pointerdown", (p) => {
2238
+ if (!t.hasAttribute("flutuante") || p.button !== 0) return;
2260
2239
  p.preventDefault(), p.stopPropagation(), a = p.pointerId, d = p.clientX, c = p.clientY;
2261
- const h = r.getBoundingClientRect();
2262
- n = h.width, s = h.height;
2240
+ const h = t.getBoundingClientRect();
2241
+ n = h.width, l = h.height;
2263
2242
  try {
2264
- o.setPointerCapture(p.pointerId);
2243
+ i.setPointerCapture(p.pointerId);
2265
2244
  } catch {
2266
2245
  }
2267
- o.addEventListener("pointermove", l), o.addEventListener("pointerup", u), o.addEventListener("pointercancel", u);
2246
+ i.addEventListener("pointermove", s), i.addEventListener("pointerup", u), i.addEventListener("pointercancel", u);
2268
2247
  });
2269
2248
  }
2270
2249
  }
2271
- function Lt(r) {
2272
- return r === "compacta" ? "ultracompacta" : r === "ultracompacta" ? "padrao" : "compacta";
2250
+ function Ot(t) {
2251
+ return t === "compacta" ? "ultracompacta" : t === "ultracompacta" ? "padrao" : "compacta";
2273
2252
  }
2274
- function Mt(r) {
2253
+ class It {
2254
+ constructor(r) {
2255
+ b(this, "valoresOriginais", {});
2256
+ b(this, "valoresAtuais", {});
2257
+ this.ctx = r;
2258
+ }
2259
+ inicializarCategorias(r) {
2260
+ this.valoresOriginais = {}, this.valoresAtuais = {};
2261
+ const e = /* @__PURE__ */ new Set();
2262
+ r.forEach((o) => {
2263
+ (o.propriedades || []).forEach((i) => {
2264
+ e.has(i.id) && typeof console < "u" && console.warn(`[ui-tabela-propriedades] id de propriedade repetido: "${i.id}". Os valores são indexados por id e serão compartilhados.`), e.add(i.id);
2265
+ const a = j(i);
2266
+ this.valoresOriginais[i.id] = a, this.valoresAtuais[i.id] = a;
2267
+ });
2268
+ }), this.ctx.onAtualizarBotoesFooter(!1);
2269
+ }
2270
+ /** Há alguma propriedade com valor diferente do original (último aplicar/carregar)? */
2271
+ get isDirty() {
2272
+ return Object.keys(this.valoresAtuais).some((r) => this.isModificada(r));
2273
+ }
2274
+ isModificada(r) {
2275
+ return !R(this.valoresAtuais[r], this.valoresOriginais[r]);
2276
+ }
2277
+ getValores() {
2278
+ return { ...this.valoresAtuais };
2279
+ }
2280
+ getValoresOriginais() {
2281
+ return { ...this.valoresOriginais };
2282
+ }
2283
+ setValores(r) {
2284
+ !r || typeof r != "object" || (Object.keys(r).forEach((e) => {
2285
+ this.valoresAtuais[e] = r[e], this.valoresOriginais[e] = r[e];
2286
+ }), this.ctx.onAtualizarBotoesFooter(this.isDirty));
2287
+ }
2288
+ obterValor(r) {
2289
+ return this.valoresAtuais[r];
2290
+ }
2291
+ /** Alteração programática: atualiza o editor na tela; não emite se o valor não mudou. */
2292
+ definirValor(r, e, o = !0) {
2293
+ const i = this.valoresAtuais[r];
2294
+ R(i, e) || (this.valoresAtuais[r] = e, this.aposAlterar(r), this.ctx.onAtualizarCampoVisual(r, e), o && this.emitirAlteracao(r, e, i, this.categoriaDe(r)));
2295
+ }
2296
+ /** Alteração feita pelo usuário num editor. Em modo manual só emite no Aplicar. */
2297
+ registrarAlteracao(r, e, o) {
2298
+ const i = this.valoresAtuais[e];
2299
+ R(i, o) || (this.valoresAtuais[e] = o, this.aposAlterar(e), this.ctx.isModoManual() || this.emitirAlteracao(e, o, i, r));
2300
+ }
2301
+ aplicar() {
2302
+ var e;
2303
+ if (!this.isDirty) return;
2304
+ this.valoresOriginais = { ...this.valoresAtuais }, this.ctx.onAtualizarBotoesFooter(!1);
2305
+ const r = (e = this.ctx.hostElement.shadowRoot) == null ? void 0 : e.querySelectorAll(".ui-prop__linha--modificada");
2306
+ r == null || r.forEach((o) => o.classList.remove("ui-prop__linha--modificada")), this.ctx.hostElement.dispatchEvent(
2307
+ new CustomEvent("ui-aplicar", {
2308
+ bubbles: !0,
2309
+ composed: !0,
2310
+ detail: { valores: { ...this.valoresAtuais } }
2311
+ })
2312
+ );
2313
+ }
2314
+ desfazer() {
2315
+ this.isDirty && (this.valoresAtuais = { ...this.valoresOriginais }, this.ctx.onAtualizarBotoesFooter(!1), this.ctx.onRenderCategorias(), this.ctx.hostElement.dispatchEvent(
2316
+ new CustomEvent("ui-desfazer", {
2317
+ bubbles: !0,
2318
+ composed: !0,
2319
+ detail: { valores: { ...this.valoresAtuais } }
2320
+ })
2321
+ ));
2322
+ }
2323
+ /** Marca/desmarca a linha (modificada e mista) e recalcula os botões do rodapé (voltar ao original limpa o estado). */
2324
+ aposAlterar(r) {
2325
+ const e = me(this.ctx.hostElement.shadowRoot, r);
2326
+ e == null || e.classList.toggle("ui-prop__linha--modificada", this.isModificada(r)), e == null || e.classList.toggle("ui-prop__linha--misto", A(this.valoresAtuais[r])), this.ctx.onAtualizarBotoesFooter(this.isDirty);
2327
+ }
2328
+ categoriaDe(r) {
2329
+ var e;
2330
+ for (const o of this.ctx.getCategorias())
2331
+ if ((e = o.propriedades) != null && e.some((i) => i.id === r)) return o.id;
2332
+ return "";
2333
+ }
2334
+ emitirAlteracao(r, e, o, i = "") {
2335
+ this.ctx.hostElement.dispatchEvent(
2336
+ new CustomEvent("ui-propriedade-alterada", {
2337
+ bubbles: !0,
2338
+ composed: !0,
2339
+ detail: {
2340
+ id: r,
2341
+ categoriaId: i,
2342
+ valor: e,
2343
+ valorAnterior: o,
2344
+ todosValores: { ...this.valoresAtuais }
2345
+ }
2346
+ })
2347
+ );
2348
+ }
2349
+ }
2350
+ function Pt(t) {
2275
2351
  const {
2276
- shadow: t,
2352
+ shadow: r,
2277
2353
  listeners: e,
2278
- host: i,
2279
- onToggleExpandirTodas: o,
2354
+ host: o,
2355
+ onToggleExpandirTodas: i,
2280
2356
  onFiltrar: a,
2281
2357
  onAplicar: n,
2282
- onDesfazer: s,
2358
+ onDesfazer: l,
2283
2359
  onAlternarDensidade: d,
2284
2360
  onAlternarFlutuante: c,
2285
- onAlternarColapsoHorizontal: l
2286
- } = r, u = t.getElementById("btn-flutuante");
2361
+ onAlternarColapsoHorizontal: s
2362
+ } = t, u = r.getElementById("btn-flutuante");
2287
2363
  u && c && e.add(u, "click", c);
2288
- const p = t.getElementById("btn-colapsar-horizontal");
2289
- p && l && e.add(p, "click", l);
2290
- const h = t.getElementById("faixa-estreita");
2291
- h && l && e.add(h, "click", l);
2292
- const m = t.getElementById("btn-expandir-faixa");
2293
- m && l && e.add(m, "click", (v) => {
2294
- v.stopPropagation(), l();
2364
+ const p = r.getElementById("btn-colapsar-horizontal");
2365
+ p && s && e.add(p, "click", s);
2366
+ const h = r.getElementById("faixa-estreita");
2367
+ h && s && e.add(h, "click", s);
2368
+ const m = r.getElementById("btn-expandir-faixa");
2369
+ m && s && e.add(m, "click", (_) => {
2370
+ _.stopPropagation(), s();
2295
2371
  });
2296
- const x = t.getElementById("btn-densidade");
2372
+ const x = r.getElementById("btn-densidade");
2297
2373
  x && d && e.add(x, "click", d);
2298
- const f = t.getElementById("btn-expandir-tudo");
2299
- f && e.add(f, "click", o);
2300
- const g = t.getElementById("btn-fechar");
2374
+ const f = r.getElementById("btn-expandir-tudo");
2375
+ f && e.add(f, "click", i);
2376
+ const g = r.getElementById("btn-fechar");
2301
2377
  g && e.add(g, "click", () => {
2302
- i.dispatchEvent(new CustomEvent("ui-fechar", { bubbles: !0, composed: !0 }));
2378
+ o.dispatchEvent(new CustomEvent("ui-fechar", { bubbles: !0, composed: !0 }));
2303
2379
  });
2304
- const _ = t.getElementById("filtro-input");
2305
- _ && e.add(_, "input", () => {
2306
- const v = (_.value || "").trim().toLowerCase();
2307
- a(v);
2380
+ const v = r.getElementById("filtro-input");
2381
+ v && e.add(v, "input", () => {
2382
+ const _ = (v.value || "").trim().toLowerCase();
2383
+ a(_);
2308
2384
  });
2309
- const y = t.getElementById("btn-aplicar");
2385
+ const y = r.getElementById("btn-aplicar");
2310
2386
  y && e.add(y, "click", n);
2311
- const A = t.getElementById("btn-desfazer");
2312
- A && e.add(A, "click", s);
2313
- const w = t.getElementById("link-ajuda");
2314
- w && e.add(w, "click", (v) => {
2315
- v.preventDefault(), i.dispatchEvent(new CustomEvent("ui-ajuda", { bubbles: !0, composed: !0 }));
2387
+ const k = r.getElementById("btn-desfazer");
2388
+ k && e.add(k, "click", l);
2389
+ const w = r.getElementById("link-ajuda");
2390
+ w && e.add(w, "click", (_) => {
2391
+ _.preventDefault(), o.dispatchEvent(new CustomEvent("ui-ajuda", { bubbles: !0, composed: !0 }));
2316
2392
  });
2317
2393
  }
2318
- function M(r, t) {
2319
- const e = r.getElementById("header-titulo-texto");
2320
- e && (e.textContent = t.getAttribute("titulo") || "Propriedades");
2321
- const i = r.getElementById("btn-fechar");
2322
- i && (i.style.display = t.hasAttribute("fechavel") ? "inline-flex" : "none");
2323
- const o = r.getElementById("btn-flutuante");
2324
- if (o) {
2325
- const c = t.hasAttribute("flutuante");
2326
- o.title = c ? "Acoplar painel (Dock)" : "Desacoplar / Modo flutuante (CAD)", o.classList.toggle("ui-prop__btn-icone--ativo", c);
2394
+ function T(t, r) {
2395
+ const e = t.getElementById("header-titulo-texto");
2396
+ e && (e.textContent = r.getAttribute("titulo") || "Propriedades");
2397
+ const o = t.getElementById("btn-fechar");
2398
+ o && (o.style.display = r.hasAttribute("fechavel") ? "inline-flex" : "none");
2399
+ const i = t.getElementById("btn-flutuante");
2400
+ if (i) {
2401
+ const c = r.hasAttribute("flutuante");
2402
+ i.title = c ? "Acoplar painel (Dock)" : "Desacoplar / Modo flutuante (CAD)", i.classList.toggle("ui-prop__btn-icone--ativo", c);
2327
2403
  }
2328
- const a = r.getElementById("btn-colapsar-horizontal");
2404
+ const a = t.getElementById("btn-colapsar-horizontal");
2329
2405
  if (a) {
2330
- const c = t.hasAttribute("colapsado");
2406
+ const c = r.hasAttribute("colapsado");
2331
2407
  a.title = c ? "Expandir painel" : "Recolher para coluna estreita", a.classList.toggle("ui-prop__btn-icone--ativo", c);
2332
2408
  }
2333
- const n = r.getElementById("btn-densidade");
2409
+ const n = t.getElementById("btn-densidade");
2334
2410
  if (n) {
2335
- const c = t.getAttribute("densidade") || "padrão";
2411
+ const c = r.getAttribute("densidade") || "padrão";
2336
2412
  n.title = `Compressão vertical: ${c} (clique para alternar)`;
2337
2413
  }
2338
- const s = r.getElementById("filtro-container");
2339
- s && (s.style.display = t.hasAttribute("filtro") ? "flex" : "none");
2340
- const d = r.getElementById("footer");
2341
- d && (d.style.display = t.getAttribute("modo-aplicar") === "manual" ? "flex" : "none");
2414
+ const l = t.getElementById("filtro-container");
2415
+ l && (l.style.display = r.hasAttribute("filtro") ? "flex" : "none");
2416
+ const d = t.getElementById("footer");
2417
+ d && (d.style.display = r.getAttribute("modo-aplicar") === "manual" ? "flex" : "none");
2342
2418
  }
2343
- class Nt extends oe {
2419
+ class Ft extends de {
2344
2420
  constructor() {
2345
2421
  super();
2346
2422
  b(this, "shadow");
2347
- b(this, "listeners", new I());
2348
- b(this, "splitterListeners", new I());
2423
+ b(this, "listeners", new P());
2424
+ b(this, "splitterListeners", new P());
2349
2425
  b(this, "controladorSplitter");
2350
2426
  b(this, "gerenciadorValores");
2351
2427
  b(this, "_categorias", []);
@@ -2358,16 +2434,16 @@ class Nt extends oe {
2358
2434
  b(this, "btnAplicarElement");
2359
2435
  b(this, "btnDesfazerElement");
2360
2436
  b(this, "splitterElement");
2361
- this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML = Et(), this.tipoContainerElement = this.shadow.getElementById("tipo-container"), this.corpoElement = this.shadow.getElementById("corpo"), this.btnAplicarElement = this.shadow.getElementById("btn-aplicar"), this.btnDesfazerElement = this.shadow.getElementById("btn-desfazer"), this.splitterElement = this.shadow.getElementById("splitter"), this.gerenciadorValores = new yt({
2437
+ this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML = Lt(), this.tipoContainerElement = this.shadow.getElementById("tipo-container"), this.corpoElement = this.shadow.getElementById("corpo"), this.btnAplicarElement = this.shadow.getElementById("btn-aplicar"), this.btnDesfazerElement = this.shadow.getElementById("btn-desfazer"), this.splitterElement = this.shadow.getElementById("splitter"), this.gerenciadorValores = new It({
2362
2438
  hostElement: this,
2363
2439
  getCategorias: () => this._categorias,
2364
2440
  onAtualizarBotoesFooter: (e) => {
2365
2441
  this.btnAplicarElement.disabled = !e, this.btnDesfazerElement.disabled = !e;
2366
2442
  },
2367
- onAtualizarCampoVisual: (e, i) => te(this.shadow, e, i),
2443
+ onAtualizarCampoVisual: (e, o) => ne(this.shadow, e, o),
2368
2444
  onRenderCategorias: () => this.renderCategorias(),
2369
2445
  isModoManual: () => this.getAttribute("modo-aplicar") === "manual"
2370
- }), this.controladorSplitter = vt({
2446
+ }), this.controladorSplitter = zt({
2371
2447
  hostElement: this,
2372
2448
  corpoElement: this.corpoElement,
2373
2449
  splitterElement: this.splitterElement,
@@ -2387,14 +2463,15 @@ class Nt extends oe {
2387
2463
  "largura-rotulo",
2388
2464
  "fechavel",
2389
2465
  "colapsado",
2390
- "flutuante"
2466
+ "flutuante",
2467
+ "texto-misto"
2391
2468
  ];
2392
2469
  }
2393
2470
  get larguraRotuloPorcentagem() {
2394
2471
  return this._larguraRotuloPorcentagem;
2395
2472
  }
2396
2473
  connectedCallback() {
2397
- this.listeners.cleanup(), Mt({
2474
+ this.listeners.cleanup(), Pt({
2398
2475
  shadow: this.shadow,
2399
2476
  listeners: this.listeners,
2400
2477
  host: this,
@@ -2407,7 +2484,7 @@ class Nt extends oe {
2407
2484
  onAlternarDensidade: () => this.alternarDensidade(),
2408
2485
  onAlternarFlutuante: () => this.alternarFlutuante(),
2409
2486
  onAlternarColapsoHorizontal: () => this.alternarColapsoHorizontal()
2410
- }), St(this, this.shadow, this.listeners), this.controladorSplitter.init(), this.syncState();
2487
+ }), Bt(this, this.shadow, this.listeners), this.controladorSplitter.init(), this.syncState();
2411
2488
  }
2412
2489
  disconnectedCallback() {
2413
2490
  this.listeners.cleanup(), this.splitterListeners.cleanup();
@@ -2416,26 +2493,29 @@ class Nt extends oe {
2416
2493
  * Cada atributo atualiza só o que depende dele: redesenhar todas as linhas (ex.: ao trocar o
2417
2494
  * `titulo`) tiraria o foco de um campo em edição.
2418
2495
  */
2419
- attributeChangedCallback(e, i, o) {
2420
- if (i !== o)
2496
+ attributeChangedCallback(e, o, i) {
2497
+ if (o !== i)
2421
2498
  switch (e) {
2422
2499
  case "largura-rotulo": {
2423
- const a = parseFloat(o ?? "");
2500
+ const a = parseFloat(i ?? "");
2424
2501
  isNaN(a) || (this._larguraRotuloPorcentagem = this.controladorSplitter.definirLarguraRotulo(a));
2425
2502
  return;
2426
2503
  }
2427
2504
  case "estilo-visual":
2428
2505
  this.renderSeletorTipos();
2429
2506
  return;
2507
+ case "texto-misto":
2508
+ this.renderCategorias();
2509
+ return;
2430
2510
  case "filtro":
2431
- if (M(this.shadow, this), o === null && this._termoBusca) {
2511
+ if (T(this.shadow, this), i === null && this._termoBusca) {
2432
2512
  this._termoBusca = "";
2433
2513
  const a = this.shadow.getElementById("filtro-input");
2434
2514
  a && (a.value = ""), this.renderCategorias();
2435
2515
  }
2436
2516
  return;
2437
2517
  default:
2438
- M(this.shadow, this);
2518
+ T(this.shadow, this);
2439
2519
  }
2440
2520
  }
2441
2521
  get categorias() {
@@ -2444,6 +2524,17 @@ class Nt extends oe {
2444
2524
  set categorias(e) {
2445
2525
  this._categorias = Array.isArray(e) ? e : [], this.gerenciadorValores.inicializarCategorias(this._categorias), this.renderCategorias();
2446
2526
  }
2527
+ /**
2528
+ * Texto exibido nas propriedades cujo valor difere entre os objetos selecionados
2529
+ * (`VALOR_MISTO`). Reflete o atributo `texto-misto`; padrão "Varia".
2530
+ */
2531
+ get textoMisto() {
2532
+ const e = this.getAttribute("texto-misto");
2533
+ return e && e.trim() ? e : G;
2534
+ }
2535
+ set textoMisto(e) {
2536
+ typeof e == "string" && e.trim() ? this.setAttribute("texto-misto", e) : this.removeAttribute("texto-misto");
2537
+ }
2447
2538
  get tipos() {
2448
2539
  return this._tipos;
2449
2540
  }
@@ -2471,8 +2562,8 @@ class Nt extends oe {
2471
2562
  obterValor(e) {
2472
2563
  return this.gerenciadorValores.obterValor(e);
2473
2564
  }
2474
- definirValor(e, i, o = !0) {
2475
- this.gerenciadorValores.definirValor(e, i, o);
2565
+ definirValor(e, o, i = !0) {
2566
+ this.gerenciadorValores.definirValor(e, o, i);
2476
2567
  }
2477
2568
  aplicar() {
2478
2569
  this.gerenciadorValores.aplicar();
@@ -2481,13 +2572,13 @@ class Nt extends oe {
2481
2572
  this.gerenciadorValores.desfazer();
2482
2573
  }
2483
2574
  expandirTudo() {
2484
- it(this.shadow, this._categorias);
2575
+ ct(this.shadow, this._categorias);
2485
2576
  }
2486
2577
  colapsarTudo() {
2487
- ot(this.shadow, this._categorias);
2578
+ ut(this.shadow, this._categorias);
2488
2579
  }
2489
2580
  toggleCategoria(e) {
2490
- at(this.shadow, this, this._categorias, e);
2581
+ pt(this.shadow, this, this._categorias, e);
2491
2582
  }
2492
2583
  get densidade() {
2493
2584
  return this.getAttribute("densidade") || "padrao";
@@ -2496,14 +2587,14 @@ class Nt extends oe {
2496
2587
  !e || e === "padrao" ? this.removeAttribute("densidade") : this.setAttribute("densidade", e);
2497
2588
  }
2498
2589
  alternarDensidade() {
2499
- const e = Lt(this.getAttribute("densidade") || "padrao");
2590
+ const e = Ot(this.getAttribute("densidade") || "padrao");
2500
2591
  return e === "padrao" ? this.removeAttribute("densidade") : this.setAttribute("densidade", e), this.dispatchEvent(
2501
2592
  new CustomEvent("ui-densidade-alterada", {
2502
2593
  bubbles: !0,
2503
2594
  composed: !0,
2504
2595
  detail: { densidade: e }
2505
2596
  })
2506
- ), M(this.shadow, this), e;
2597
+ ), T(this.shadow, this), e;
2507
2598
  }
2508
2599
  get flutuante() {
2509
2600
  return this.hasAttribute("flutuante");
@@ -2518,8 +2609,8 @@ class Nt extends oe {
2518
2609
  !!e !== this.hasAttribute("colapsado") && this.alternarColapsoHorizontal();
2519
2610
  }
2520
2611
  alternarFlutuante() {
2521
- const e = zt(this);
2522
- return M(this.shadow, this), this.dispatchEvent(new CustomEvent("ui-flutuante-alterado", {
2612
+ const e = Rt(this);
2613
+ return T(this.shadow, this), this.dispatchEvent(new CustomEvent("ui-flutuante-alterado", {
2523
2614
  bubbles: !0,
2524
2615
  composed: !0,
2525
2616
  detail: {
@@ -2534,35 +2625,35 @@ class Nt extends oe {
2534
2625
  alternarColapsoHorizontal() {
2535
2626
  const e = this.hasAttribute("colapsado");
2536
2627
  e ? this.removeAttribute("colapsado") : this.setAttribute("colapsado", "");
2537
- const i = !e;
2538
- return M(this.shadow, this), this.dispatchEvent(new CustomEvent("ui-colapso-horizontal", {
2628
+ const o = !e;
2629
+ return T(this.shadow, this), this.dispatchEvent(new CustomEvent("ui-colapso-horizontal", {
2539
2630
  bubbles: !0,
2540
2631
  composed: !0,
2541
- detail: { colapsado: i }
2542
- })), i;
2632
+ detail: { colapsado: o }
2633
+ })), o;
2543
2634
  }
2544
2635
  syncState() {
2545
- M(this.shadow, this);
2636
+ T(this.shadow, this);
2546
2637
  const e = this.getAttribute("largura-rotulo");
2547
2638
  if (e) {
2548
- const i = parseFloat(e);
2549
- isNaN(i) || (this._larguraRotuloPorcentagem = this.controladorSplitter.definirLarguraRotulo(i));
2639
+ const o = parseFloat(e);
2640
+ isNaN(o) || (this._larguraRotuloPorcentagem = this.controladorSplitter.definirLarguraRotulo(o));
2550
2641
  }
2551
2642
  this.renderSeletorTipos(), this.renderCategorias();
2552
2643
  }
2553
2644
  toggleExpandirTodas() {
2554
- this._categorias.some((i) => i.aberto === !1) ? this.expandirTudo() : this.colapsarTudo();
2645
+ this._categorias.some((o) => o.aberto === !1) ? this.expandirTudo() : this.colapsarTudo();
2555
2646
  }
2556
2647
  renderSeletorTipos() {
2557
- xt({
2648
+ kt({
2558
2649
  tipoContainerElement: this.tipoContainerElement,
2559
2650
  tipos: this._tipos,
2560
2651
  tipoSelecionadoId: this._tipoSelecionadoId,
2561
2652
  estiloVisual: this.getAttribute("estilo-visual") || "autocad",
2562
2653
  onSelecionarTipo: (e) => {
2563
2654
  this._tipoSelecionadoId = e, this.renderSeletorTipos();
2564
- const i = this._tipos.find((o) => String(o.id) === String(e));
2565
- this.dispatchEvent(new CustomEvent("ui-tipo-alterado", { bubbles: !0, composed: !0, detail: { id: e, tipo: i } }));
2655
+ const o = this._tipos.find((i) => String(i.id) === String(e));
2656
+ this.dispatchEvent(new CustomEvent("ui-tipo-alterado", { bubbles: !0, composed: !0, detail: { id: e, tipo: o } }));
2566
2657
  },
2567
2658
  onEditarTipo: (e) => this.dispatchEvent(new CustomEvent("ui-editar-tipo-clique", { bubbles: !0, composed: !0, detail: { tipo: e } })),
2568
2659
  onQuickSelect: (e) => this.dispatchEvent(new CustomEvent("ui-quick-select", { bubbles: !0, composed: !0, detail: { tipo: e } })),
@@ -2572,27 +2663,28 @@ class Nt extends oe {
2572
2663
  }
2573
2664
  renderCategorias() {
2574
2665
  const e = this.shadow.getElementById("lista-categorias");
2575
- e && wt({
2666
+ e && Mt({
2576
2667
  listaContainer: e,
2577
2668
  categorias: this._categorias,
2578
2669
  termoBusca: this._termoBusca,
2579
- onToggleCategoria: (i) => this.toggleCategoria(i),
2670
+ onToggleCategoria: (o) => this.toggleCategoria(o),
2580
2671
  linhaCtx: {
2581
2672
  valoresAtuais: this.gerenciadorValores.getValores(),
2582
2673
  valoresOriginais: this.gerenciadorValores.getValoresOriginais(),
2583
- onAtualizarCampoVisual: (i, o) => te(this.shadow, i, o),
2674
+ onAtualizarCampoVisual: (o, i) => ne(this.shadow, o, i),
2584
2675
  editorCtx: {
2585
- obterValorAtual: (i) => this.gerenciadorValores.obterValor(i),
2586
- registrarAlteracao: (i, o, a) => {
2587
- this.gerenciadorValores.registrarAlteracao(i, o, a);
2676
+ obterValorAtual: (o) => this.gerenciadorValores.obterValor(o),
2677
+ registrarAlteracao: (o, i, a) => {
2678
+ this.gerenciadorValores.registrarAlteracao(o, i, a);
2588
2679
  },
2589
- focarProximoEditor: (i) => rt(this.shadow, i),
2590
- despacharEventoAcao: (i, o) => {
2680
+ focarProximoEditor: (o) => dt(this.shadow, o),
2681
+ obterTextoMisto: () => this.textoMisto,
2682
+ despacharEventoAcao: (o, i) => {
2591
2683
  this.dispatchEvent(
2592
2684
  new CustomEvent("ui-acao-clique", {
2593
2685
  bubbles: !0,
2594
2686
  composed: !0,
2595
- detail: { id: i.id, categoriaId: o, propriedade: i }
2687
+ detail: { id: o.id, categoriaId: i, propriedade: o }
2596
2688
  })
2597
2689
  );
2598
2690
  }
@@ -2601,67 +2693,75 @@ class Nt extends oe {
2601
2693
  });
2602
2694
  }
2603
2695
  }
2604
- ie("ui-tabela-propriedades", Nt);
2696
+ le("ui-tabela-propriedades", Ft);
2605
2697
  export {
2606
- Te as $,
2607
- Ct as A,
2608
- Ve as B,
2609
- He as C,
2610
- Ie as D,
2611
- Fe as E,
2612
- Oe as F,
2613
- yt as G,
2614
- it as H,
2615
- rt as I,
2616
- ae as J,
2617
- ne as K,
2618
- K as L,
2619
- se as M,
2620
- qe as N,
2621
- Re as O,
2622
- Y as P,
2623
- $ as Q,
2624
- _e as R,
2625
- Se as S,
2626
- ke as T,
2627
- Je as U,
2628
- V,
2629
- $e as W,
2630
- Lt as X,
2631
- De as Y,
2632
- k as Z,
2633
- wt as _,
2634
- ge as a,
2635
- Le as a0,
2636
- xt as a1,
2637
- le as a2,
2638
- M as a3,
2639
- z as a4,
2640
- je as a5,
2641
- O as a6,
2642
- Ee as b,
2643
- Nt as c,
2644
- Pe as d,
2645
- at as e,
2646
- ye as f,
2647
- zt as g,
2648
- Ae as h,
2649
- te as i,
2650
- ee as j,
2651
- de as k,
2652
- ot as l,
2653
- St as m,
2654
- Mt as n,
2655
- vt as o,
2656
- dt as p,
2657
- st as q,
2658
- bt as r,
2659
- ft as s,
2660
- pt as t,
2661
- ht as u,
2662
- ct as v,
2663
- nt as w,
2664
- lt as x,
2665
- ut as y,
2666
- gt as z
2698
+ Ke as $,
2699
+ _t as A,
2700
+ At as B,
2701
+ Tt as C,
2702
+ Ye as D,
2703
+ Xe as E,
2704
+ je as F,
2705
+ It as G,
2706
+ We as H,
2707
+ qe as I,
2708
+ ct as J,
2709
+ dt as K,
2710
+ ce as L,
2711
+ ue as M,
2712
+ te as N,
2713
+ pe as O,
2714
+ Ge as P,
2715
+ He as Q,
2716
+ J as R,
2717
+ A as S,
2718
+ G as T,
2719
+ nt as U,
2720
+ Y as V,
2721
+ W,
2722
+ ze as X,
2723
+ V as Y,
2724
+ Be as Z,
2725
+ q as _,
2726
+ De as a,
2727
+ Ot as a0,
2728
+ Ve as a1,
2729
+ z as a2,
2730
+ Mt as a3,
2731
+ Fe as a4,
2732
+ Oe as a5,
2733
+ kt as a6,
2734
+ he as a7,
2735
+ T as a8,
2736
+ F as a9,
2737
+ S as aa,
2738
+ Qe as ab,
2739
+ ht as ac,
2740
+ j as ad,
2741
+ R as ae,
2742
+ Ce as b,
2743
+ Se as c,
2744
+ Ft as d,
2745
+ Ue as e,
2746
+ pt as f,
2747
+ Le as g,
2748
+ Rt as h,
2749
+ Ne as i,
2750
+ ne as j,
2751
+ ae as k,
2752
+ me as l,
2753
+ ut as m,
2754
+ Ut as n,
2755
+ Bt as o,
2756
+ Pt as p,
2757
+ zt as q,
2758
+ gt as r,
2759
+ bt as s,
2760
+ wt as t,
2761
+ Ct as u,
2762
+ vt as v,
2763
+ Et as w,
2764
+ xt as x,
2765
+ mt as y,
2766
+ ft as z
2667
2767
  };