@thibezer/ui-components-kit 2.24.2 → 2.25.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 (54) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/botao.cjs +1 -1
  3. package/dist/botao.js +1 -1
  4. package/dist/camadas.cjs +1 -1
  5. package/dist/camadas.js +2 -2
  6. package/dist/campo-texto.cjs +1 -1
  7. package/dist/campo-texto.js +1 -1
  8. package/dist/canvas.cjs +1 -1
  9. package/dist/canvas.js +1 -1
  10. package/dist/card.cjs +1 -1
  11. package/dist/card.js +1 -1
  12. package/dist/components/ui-canvas-prancha/index.d.ts +1 -1
  13. package/dist/components/ui-canvas-prancha/prancha-teclado.d.ts +13 -5
  14. package/dist/components/ui-canvas-prancha/ui-canvas-prancha-base.d.ts +6 -1
  15. package/dist/components/ui-canvas-prancha/ui-canvas-prancha.d.ts +2 -2
  16. package/dist/components/ui-editor-prancha/editor-barra.d.ts +19 -0
  17. package/dist/components/ui-editor-prancha/editor-modos.d.ts +26 -1
  18. package/dist/components/ui-editor-prancha/ui-editor-prancha.d.ts +32 -9
  19. package/dist/core/alvo-digitavel.d.ts +3 -0
  20. package/dist/core.cjs +1 -1
  21. package/dist/core.js +4 -4
  22. package/dist/cores.cjs +1 -1
  23. package/dist/cores.js +3 -3
  24. package/dist/custom-elements.json +12330 -11963
  25. package/dist/data.cjs +1 -1
  26. package/dist/data.js +1 -1
  27. package/dist/feedback.cjs +1 -1
  28. package/dist/feedback.js +1 -1
  29. package/dist/forms.cjs +1 -1
  30. package/dist/forms.js +11 -11
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.js +3 -3
  33. package/dist/kit-base-BmkPi5Rz.cjs +2 -0
  34. package/dist/{kit-base-_THn4w3u.js → kit-base-CBXA66aM.js} +119 -114
  35. package/dist/mapa.cjs +1 -1
  36. package/dist/mapa.js +1 -1
  37. package/dist/modal.cjs +1 -1
  38. package/dist/modal.js +1 -1
  39. package/dist/prancha.cjs +6 -6
  40. package/dist/prancha.js +1707 -1470
  41. package/dist/register.cjs +1 -1
  42. package/dist/register.js +1 -1
  43. package/dist/seletor-mapa-base.cjs +1 -1
  44. package/dist/seletor-mapa-base.js +1 -1
  45. package/dist/tabela.cjs +1 -1
  46. package/dist/tabela.js +1 -1
  47. package/dist/tipos-elementos.d.ts +2 -2
  48. package/dist/tipos-vue.d.ts +2 -2
  49. package/dist/tools.cjs +1 -1
  50. package/dist/tools.js +1 -1
  51. package/dist/{ui-seletor-cor-B_twSm-V.js → ui-seletor-cor-CPjA9vhZ.js} +1 -1
  52. package/dist/{ui-seletor-cor-BGw8SBPm.cjs → ui-seletor-cor-D_ifitEN.cjs} +1 -1
  53. package/package.json +1 -1
  54. package/dist/kit-base-CGqj9aiD.cjs +0 -2
@@ -1,2 +0,0 @@
1
- "use strict";var ie=Object.create;var z=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var le=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var ce=(e,t,r)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of le(t))!ue.call(e,a)&&a!==r&&z(e,a,{get:()=>t[a],enumerable:!(o=ne(t,a))||o.enumerable});return e};var de=(e,t,r)=>(r=e!=null?ie(se(e)):{},fe(t||!e||!e.__esModule?z(r,"default",{value:e,enumerable:!0}):r,e));var b=(e,t,r)=>ce(e,typeof t!="symbol"?t+"":t,r);class C{constructor(){b(this,"entries",[])}add(t,r,o,a){if(!t)return;const i=o;t.addEventListener(r,i,a),this.entries.push({target:t,type:r,listener:i,options:a})}cleanup(){this.entries.forEach(({target:t,type:r,listener:o,options:a})=>{t.removeEventListener(r,o,a)}),this.entries=[]}get size(){return this.entries.length}}const me=typeof window<"u"&&typeof document<"u",W=typeof HTMLElement<"u"?HTMLElement:class{};function pe(e,t){typeof customElements<"u"&&!customElements.get(e)&&customElements.define(e,t)}const ge=["button:not([type])",'button[type="submit"]','input[type="submit"]','input[type="image"]','ui-botao[type="submit"]',"ui-botao[tipo-submit]",'ui-botao-primario[type="submit"]',"ui-botao-primario[tipo-submit]"].join(", "),he=["input:not([type])",...["text","search","url","tel","email","password","date","month","week","time","datetime-local","number"].map(e=>`input[type="${e}"]`),"ui-campo-texto","ui-input"].join(", ");function D(e,t){const r=Array.from(e.querySelectorAll(t)).filter(a=>{const i=a.getAttribute("form");return!i||i===e.id});if(!e.id)return r;const o=Array.from(e.getRootNode().querySelectorAll(`[form="${CSS.escape(e.id)}"]`)).filter(a=>!e.contains(a)&&a.matches(t));return[...r,...o].sort((a,i)=>a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}function be(e){if(e.hasAttribute("disabled"))return!0;try{return e.matches(":disabled")}catch{return!1}}function Ae(e,t,r){if(!t){e.requestSubmit();return}const o=document.createElement("button");o.type="submit",o.name=t,o.value=r??"",o.hidden=!0,e.append(o);try{e.requestSubmit(o)}finally{o.remove()}}function xe(e){const t=D(e,ge)[0];if(t){be(t)||t.click();return}D(e,he).length===1&&e.requestSubmit()}const ve=["sm","md","lg"],T="--ui-campo-altura",ye=15,Ee=200,we=12.5,N={sm:"sm",compacta:"sm",compacto:"sm",md:"md",padrao:"md",padrão:"md",normal:"md",lg:"lg",relaxada:"lg",relaxado:"lg",conforto:"lg"},Se={sm:"var(--ui-altura-sm, 26px)",md:"var(--ui-altura-md, 34px)",lg:"var(--ui-altura-lg, 42px)"};function H(e){const t=(e??"").trim().toLowerCase();return Object.prototype.hasOwnProperty.call(N,t)?N[t]:null}function B(e){const t=H(e);return t?Se[t]:null}function F(e){if(e==null)return null;const t=String(e).trim().toLowerCase(),r=/^(\d+(?:\.\d+)?|\.\d+)(px|rem|em)?$/.exec(t);if(!r)return null;const o=Number(r[1]);if(!Number.isFinite(o)||o<=0)return null;const a=r[2]??"px";return a==="px"?`${Math.min(Ee,Math.max(ye,o))}px`:`${Math.min(we,o)}${a}`}function Z(e){return F(e.altura)??B(e.tamanho)}function j(e){return{altura:e.getAttribute("altura")??e.getAttribute("height"),tamanho:e.getAttribute("tamanho")??e.getAttribute("size")??e.getAttribute("densidade")}}const O=new WeakSet;function Ce(e){try{const t=Z(j(e));t?(e.style.setProperty(T,t),O.add(e)):O.has(e)&&(e.style.removeProperty(T),O.delete(e))}catch{}}const G=["degrade","gradiente","gradient"],J=["degrade","ui-degrade","gradiente","ui-gradiente"],ze=512,Oe=new Set(["linear-gradient","radial-gradient","conic-gradient","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient"]),Re=new Set(["","true","1","sim","yes","padrao","default"]),Te=new Set(["false","0","off","none","nao","não","no"]),K=Object.freeze({primario:"var(--ui-gradiente-primario)",primaria:"var(--ui-gradiente-primario)",primary:"var(--ui-gradiente-primario)",secundario:"var(--ui-gradiente-secundario)",secundaria:"var(--ui-gradiente-secundario)",secondary:"var(--ui-gradiente-secundario)",destaque:"var(--ui-gradiente-destaque)",accent:"var(--ui-gradiente-destaque)",destrutivo:"var(--ui-gradiente-destrutivo)",destructive:"var(--ui-gradiente-destrutivo)",superficie:"var(--ui-gradiente-superficie)",surface:"var(--ui-gradiente-superficie)",fundo:"var(--ui-gradiente-superficie)",card:"var(--ui-gradiente-card)",elevado:"var(--ui-gradiente-elevado)",elevated:"var(--ui-gradiente-elevado)",sucesso:"var(--ui-gradiente-sucesso)",success:"var(--ui-gradiente-sucesso)",erro:"var(--ui-gradiente-erro)",error:"var(--ui-gradiente-erro)",perigo:"var(--ui-gradiente-erro)",danger:"var(--ui-gradiente-erro)",alerta:"var(--ui-gradiente-alerta)",warning:"var(--ui-gradiente-alerta)",aviso:"var(--ui-gradiente-alerta)",info:"var(--ui-gradiente-info)",informacao:"var(--ui-gradiente-info)",texto:"var(--ui-gradiente-texto)",text:"var(--ui-gradiente-texto)"}),ke=/[;{}<>\\"'\r\n`]|\/\*|\*\/|\b(?:url|image-set|expression|attr|env)\s*\(|(?:javascript|vbscript|data)\s*:|-moz-binding|behavior\s*:/i;function Le(e){const t=e.toLowerCase();return t==="degrade"||t==="gradiente"||t==="gradient"}function Y(e){const t=[];let r=0,o=0;for(let i=0;i<e.length;i++){const n=e[i];if(n==="(")r++;else if(n===")"){if(r--,r<0)return null}else if(n===","&&r===0){const l=e.slice(o,i).trim();if(!l)return null;t.push(l),o=i+1}}if(r!==0)return null;const a=e.slice(o).trim();return a?(t.push(a),t):null}function Me(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return!1;const r=e.slice(0,t).trim().toLowerCase(),o=e.slice(t+1,-1).trim();if(!o)return!1;if(r==="var"){const a=Y(o);return!a||a.length===0||a.length>2?!1:/^--[a-zA-Z0-9_-]{1,64}$/.test(a[0])}return Oe.has(r)?/^[a-zA-Z0-9\s,#.%()+\-_/:]+$/.test(o):!1}function Q(e){if(typeof e!="string")return null;const t=e.trim();if(!t||t.length>ze||ke.test(t))return null;const r=Y(t);if(!r||r.length===0||r.length>6)return null;for(const o of r)if(!Me(o))return null;return t}function _(e,t){if(e==null)return{ativo:!1,explicito:null};if(typeof e!="string")return{ativo:!1,explicito:null};const r=e.trim(),o=r.toLowerCase();if(Te.has(o))return{ativo:!1,explicito:null};if(Re.has(o))return{ativo:!0,explicito:t??null};const a=K[o];if(a)return{ativo:!0,explicito:a};const i=Q(r);return i?{ativo:!0,explicito:i}:{ativo:!1,explicito:null}}function X(e){for(const t of G)if(e.hasAttribute(t))return e.getAttribute(t);return null}function Ie(e,t,r){const o=X(e),a=_(o,r),i=J.some(l=>e.classList.contains(l)),n=a.ativo||i;return t&&(a.explicito?t.style.setProperty("--ui-degrade-interno",a.explicito):t.style.removeProperty("--ui-degrade-interno"),n?t.setAttribute("data-degrade","ativo"):t.removeAttribute("data-degrade")),n}function De(e,t,r){const o=new Set((e.getAttribute("part")||"").split(/\s+/).filter(Boolean));r?o.add(t):o.delete(t),e.setAttribute("part",Array.from(o).join(" "))}function P(e){if(!e)return!1;const t=e;return t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable===!0}const Ne='button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"], [role="option"]';function Pe(e){var r;const t=((r=e.composedPath)==null?void 0:r.call(e)[0])??e.target;return t instanceof Element?t.closest(Ne)!==null:!1}function Ue(e){var o,a;const t=(o=e==null?void 0:e.composedPath)==null?void 0:o.call(e)[0];if(t instanceof Element)return P(t);let r=typeof document>"u"?null:document.activeElement;for(;(a=r==null?void 0:r.shadowRoot)!=null&&a.activeElement;)r=r.shadowRoot.activeElement;return P(r)}function Ve(e,t,r,o){if(e.textContent=t,!r)return;const a=document.createElement("span");a.className=o,a.setAttribute("aria-hidden","true"),a.textContent="*",e.append(" ",a)}function qe(e,t,r){const o=(e??"").trim().toLowerCase();return t.includes(o)?o:r}function We(e,t){const r=(e??"").trim().toLowerCase();return t.includes(r)?r:null}function He(e,t,r,o){if(e==null||typeof e=="string"&&e.trim()==="")return o;const a=typeof e=="number"?e:Number(e.trim());return Number.isFinite(a)?Math.min(r,Math.max(t,Math.trunc(a))):o}function Be(e,t=0){if(e==null||e.trim()==="")return null;const r=Number(e.trim());return!Number.isFinite(r)||r<t?null:Math.trunc(r)}let U=0;function Fe(e="ui"){return U+=1,`${e}-${U.toString(36)}-${Math.random().toString(36).slice(2,7)}`}function $(e,t){if(e===t)return"";if(e.nodeType===3)return e.textContent??"";let r="";return e.childNodes.forEach(o=>{r+=$(o,t)}),r}function ee(e,t){var i,n,l;const r=(i=e.getAttribute("aria-label"))==null?void 0:i.trim();if(r)return r;const o=new Set;try{(n=t==null?void 0:t.labels)==null||n.forEach(s=>o.add(s))}catch{}if(e.id){const s=e.getRootNode();(l=s.querySelectorAll)==null||l.call(s,"label[for]").forEach(f=>{f.htmlFor===e.id&&o.add(f)})}const a=e.closest("label");return a&&o.add(a),Array.from(o).map(s=>$(s,e).replace(/\s+/g," ").trim()).filter(Boolean).join(" ")}function Ze(e,t){return t.composedPath()[0]===e}class te extends W{constructor(){super();b(this,"internals");b(this,"_formDisabled",!1);b(this,"_customErrorMessage","");this.internals=typeof this.attachInternals=="function"?this.attachInternals():{}}formDisabledCallback(r){this._formDisabled=r,this.syncState()}get form(){var r;return this.closest("form")??((r=this.internals)==null?void 0:r.form)??null}get required(){return this.hasAttribute("obrigatorio")||this.hasAttribute("required")}set required(r){r?this.setAttribute("obrigatorio",""):(this.removeAttribute("obrigatorio"),this.removeAttribute("required")),this.syncState()}get obrigatorio(){return this.required}set obrigatorio(r){this.required=r}get validity(){var r;return this.atualizarValidade(),(r=this.internals)==null?void 0:r.validity}get validationMessage(){var r;return this.atualizarValidade(),((r=this.internals)==null?void 0:r.validationMessage)??""}get willValidate(){var r;return((r=this.internals)==null?void 0:r.willValidate)??!1}checkValidity(){var r,o;return this.atualizarValidade(),((o=(r=this.internals)==null?void 0:r.checkValidity)==null?void 0:o.call(r))??!0}reportValidity(){var r,o;return this.atualizarValidade(),((o=(r=this.internals)==null?void 0:r.reportValidity)==null?void 0:o.call(r))??!0}setCustomValidity(r){this._customErrorMessage=r||"",this.atualizarValidade()}}b(te,"formAssociated",!0);function je(e){if(e.disabled)return{valido:!0,flags:{},mensagem:""};if(e.customError&&e.customError.trim()!=="")return{valido:!1,flags:{customError:!0},mensagem:e.customError};const{val:t,rawVal:r,badInput:o,required:a,tipo:i="text",mensagemValidacao:n}=e;if(o||i==="number"&&r&&isNaN(Number(r)))return{valido:!1,flags:{badInput:!0},mensagem:n||"Insira um número válido."};if(a&&t.trim()==="")return{valido:!1,flags:{valueMissing:!0},mensagem:n||"Preencha este campo."};if(t==="")return{valido:!0,flags:{},mensagem:""};if(e.minlength!==null&&e.minlength!==void 0&&!isNaN(e.minlength)&&t.length<e.minlength)return{valido:!1,flags:{tooShort:!0},mensagem:n||`Use pelo menos ${e.minlength} caracteres (atualmente você está usando ${t.length}).`};if(e.maxlength!==null&&e.maxlength!==void 0&&!isNaN(e.maxlength)&&t.length>e.maxlength)return{valido:!1,flags:{tooLong:!0},mensagem:n||`Reduza o texto para no máximo ${e.maxlength} caracteres (atualmente você está usando ${t.length}).`};if(e.pattern)try{if(!new RegExp(`^(?:${e.pattern})$`).test(t))return{valido:!1,flags:{patternMismatch:!0},mensagem:n||"O valor não corresponde ao padrão solicitado."}}catch{}if(i==="email"&&!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(t))return{valido:!1,flags:{typeMismatch:!0},mensagem:n||"Insira um endereço de e-mail válido."};if(i==="url")try{new URL(t)}catch{return{valido:!1,flags:{typeMismatch:!0},mensagem:n||"Insira uma URL válida."}}if(i==="number"){const l=Number(t);if(isNaN(l))return{valido:!1,flags:{badInput:!0},mensagem:n||"Insira um número válido."};if(e.min!==null&&e.min!==void 0&&!isNaN(e.min)&&l<e.min)return{valido:!1,flags:{rangeUnderflow:!0},mensagem:n||`O valor deve ser maior ou igual a ${e.min}.`};if(e.max!==null&&e.max!==void 0&&!isNaN(e.max)&&l>e.max)return{valido:!1,flags:{rangeOverflow:!0},mensagem:n||`O valor deve ser menor ou igual a ${e.max}.`};if(e.step&&e.step!=="any"){const s=parseFloat(e.step);if(!isNaN(s)&&s>0){const f=e.min!==null&&e.min!==void 0&&!isNaN(e.min)?e.min:0,d=Math.abs((l-f)%s);if(d>1e-6&&Math.abs(d-s)>1e-6)return{valido:!1,flags:{stepMismatch:!0},mensagem:n||"Insira um valor válido de acordo com o intervalo."}}}}return{valido:!0,flags:{},mensagem:""}}function Ge(e,t,r){!e||typeof e.setValidity!="function"||(t.valido?e.setValidity({}):e.setValidity(t.flags,t.mensagem||"Valor inválido.",r))}const Je='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}';class Ke{constructor(){b(this,"provedorToast",null);b(this,"listeners",new Map);b(this,"_observandoSistema",!1);this.observarTemaDoSistema()}on(t,r){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(r),()=>this.off(t,r)}once(t,r){const o=a=>{this.off(t,o),r(a)};this.on(t,o)}off(t,r){const o=this.listeners.get(t);o&&(o.delete(r),o.size===0&&this.listeners.delete(t))}emit(t,r){const o=this.listeners.get(t);o&&o.forEach(a=>{try{a(r)}catch(i){console.error(`[UIBus] Erro ao executar ouvinte do evento "${t}":`,i)}}),typeof window<"u"&&window.dispatchEvent(new CustomEvent(`uibus:${t}`,{detail:r,bubbles:!0,composed:!0}))}abrirModal(t){if(typeof document>"u")return!1;const r=document.getElementById(t);return r&&typeof r.abrir=="function"?(r.abrir(),this.emit("modal:aberto",{id:t}),!0):r?(r.setAttribute("aberto",""),this.emit("modal:aberto",{id:t}),!0):(console.warn(`[UIBus] Modal com ID "${t}" não encontrado no DOM.`),!1)}fecharModal(t){if(typeof document>"u")return!1;if(t){const r=document.getElementById(t);return r&&typeof r.fechar=="function"?(r.fechar(),r.hasAttribute("aberto")||r.hasAttribute("open")?!1:(this.emit("modal:fechado",{id:t}),!0)):r?(r.removeAttribute("aberto"),r.removeAttribute("open"),this.emit("modal:fechado",{id:t}),!0):!1}else return document.querySelectorAll("ui-modal[aberto], ui-modal[open], ui-dialog[aberto], ui-dialog[open]").forEach(o=>{typeof o.fechar=="function"?o.fechar():(o.removeAttribute("aberto"),o.removeAttribute("open"))}),this.emit("modal:fechado-todos"),!0}abrirDrawer(t){if(typeof document>"u")return!1;const r=document.getElementById(t);return r&&typeof r.abrir=="function"?(r.abrir(),this.emit("drawer:aberto",{id:t}),!0):r?(r.setAttribute("aberto",""),this.emit("drawer:aberto",{id:t}),!0):(console.warn(`[UIBus] Drawer com ID "${t}" não encontrado no DOM.`),!1)}fecharDrawer(t){if(typeof document>"u")return!1;if(t){const r=document.getElementById(t);return r&&typeof r.fechar=="function"?(r.fechar(),this.emit("drawer:fechado",{id:t}),!0):r?(r.removeAttribute("aberto"),r.removeAttribute("open"),this.emit("drawer:fechado",{id:t}),!0):!1}else return document.querySelectorAll("ui-drawer[aberto], ui-drawer[open], ui-sheet[aberto], ui-sheet[open]").forEach(o=>{typeof o.fechar=="function"?o.fechar():(o.removeAttribute("aberto"),o.removeAttribute("open"))}),this.emit("drawer:fechado-todos"),!0}notificar(t){const r=this.provedorToast;if(r)try{r(typeof t=="string"?{mensagem:t,tipo:"info"}:t)}catch(o){console.error("Erro ao exibir toast:",o)}}registrarProvedorToast(t){this.provedorToast=t}async copiar(t,r){if(typeof navigator>"u"||!navigator.clipboard)return!1;try{return await navigator.clipboard.writeText(t),r!==void 0&&this.notificar({tipo:"sucesso",mensagem:r||"Copiado para a área de transferência!"}),this.emit("clipboard:copiado",{texto:t}),!0}catch(o){return console.error("[UIBus] Falha ao copiar texto:",o),this.notificar({tipo:"erro",mensagem:"Não foi possível copiar o texto."}),!1}}definirDensidade(t){let r=34;typeof t=="number"?r=Math.max(15,t):t==="compacta"?r=26:t==="relaxada"?r=42:r=34,!(typeof document>"u")&&(document.documentElement.style.setProperty("--ui-altura-minima",`${r}px`),document.documentElement.style.setProperty("--ui-campo-altura",`${r}px`),document.documentElement.setAttribute("data-ui-densidade",typeof t=="string"?t:"custom"),this.emit("densidade:alterada",{densidade:t,alturaPx:r}))}obterTema(){if(typeof document>"u")return"escuro";const t=V(document.documentElement);return t||(Ye()?"claro":"escuro")}definirTema(t){if(typeof document>"u")return t==="claro"?"claro":"escuro";const r=document.documentElement;if(t==="auto")r.removeAttribute("data-tema"),r.removeAttribute("data-theme"),r.classList.remove("dark","light");else{const a=t||(this.obterTema()==="escuro"?"claro":"escuro");r.setAttribute("data-tema",a),r.classList.toggle("dark",a==="escuro"),r.classList.toggle("light",a==="claro")}const o=this.obterTema();return this.emit("tema:alterado",{tema:o}),o}observarTemaDoSistema(){var t,r;this._observandoSistema||typeof window>"u"||typeof window.matchMedia!="function"||(this._observandoSistema=!0,(r=(t=window.matchMedia("(prefers-color-scheme: light)")).addEventListener)==null||r.call(t,"change",()=>{V(document.documentElement)||this.emit("tema:alterado",{tema:this.obterTema()})}))}}function V(e){const t=e.getAttribute("data-tema")||e.getAttribute("data-theme");return t==="escuro"||t==="dark"?"escuro":t==="claro"||t==="light"?"claro":e.classList.contains("dark")?"escuro":e.classList.contains("light")?"claro":null}function Ye(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: light)").matches}const p=new Ke;let q=!1;function Qe(e){if(e.hasAttribute("disabled")||e.hasAttribute("carregando")||e.getAttribute("aria-disabled")==="true"||e.localName.startsWith("ui-")&&e.hasAttribute("loading"))return!0;try{return e.matches(":disabled")}catch{return!1}}function re(){q||typeof document>"u"||(q=!0,document.addEventListener("click",e=>{const t=e.composedPath?e.composedPath():[e.target],r="[target-modal], [modal-alvo], [dismiss-modal], [fechar-modal], [target-drawer], [drawer-alvo], [dismiss-drawer], [fechar-drawer], [toast-sucesso], [toast-erro], [toast-alerta], [toast-info], [copiar-texto], [alternar-tema], [definir-densidade], [limpar-form]";let o=null;for(const m of t)if(m instanceof HTMLElement&&m.matches(r)){o=m;break}if(!o||Qe(o))return;const a=o.getAttribute("target-modal")||o.getAttribute("modal-alvo");if(a&&p.abrirModal(a),o.hasAttribute("dismiss-modal")||o.hasAttribute("fechar-modal")){const m=o.getAttribute("dismiss-modal")||o.getAttribute("fechar-modal");if(m&&m!=="")p.fecharModal(m);else{let u=null;for(const c of t)if(c instanceof HTMLElement&&(c.matches("ui-modal, ui-dialog")||c.tagName==="UI-MODAL"||c.tagName==="UI-DIALOG")){u=c;break}u&&(typeof u.fechar=="function"?u.fechar():(u.removeAttribute("aberto"),u.removeAttribute("open")))}}const i=o.getAttribute("target-drawer")||o.getAttribute("drawer-alvo");if(i&&p.abrirDrawer(i),o.hasAttribute("dismiss-drawer")||o.hasAttribute("fechar-drawer")){const m=o.getAttribute("dismiss-drawer")||o.getAttribute("fechar-drawer");if(m&&m!=="")p.fecharDrawer(m);else{let u=null;for(const c of t)if(c instanceof HTMLElement&&(c.matches("ui-drawer, ui-sheet, ui-painel-lateral, ui-gaveta")||c.tagName.startsWith("UI-DRAWER")||c.tagName.startsWith("UI-SHEET"))){u=c;break}u&&(typeof u.fechar=="function"?u.fechar():(u.removeAttribute("aberto"),u.removeAttribute("open")))}}const n=o.getAttribute("toast-sucesso");n&&p.notificar({tipo:"sucesso",mensagem:n});const l=o.getAttribute("toast-erro");l&&p.notificar({tipo:"erro",mensagem:l});const s=o.getAttribute("toast-alerta");s&&p.notificar({tipo:"alerta",mensagem:s});const f=o.getAttribute("toast-info");f&&p.notificar({tipo:"info",mensagem:f});const d=o.getAttribute("copiar-texto");if(d!==null){let m=d;if(d.startsWith("#")||d.startsWith(".")||d.match(/^[a-zA-Z0-9_-]+$/))try{let c=null;d.startsWith("#")||d.startsWith(".")?c=document.querySelector(d):c=document.getElementById(d)||document.querySelector(`#${d}`),c&&(m=c.value!==void 0&&c.value!==null?c.value:c.textContent||"")}catch{}const u=o.getAttribute("copiar-mensagem")||"Copiado com sucesso!";p.copiar(m,u)}o.hasAttribute("alternar-tema")&&p.definirTema();const g=o.getAttribute("definir-densidade");g&&p.definirDensidade(g);const h=o.getAttribute("limpar-form");if(h){const m=document.getElementById(h);m&&typeof m.reset=="function"&&(m.reset(),p.notificar({tipo:"info",mensagem:"Formulário limpo."}))}}))}let v=null,x=null;async function _e(){return typeof window<"u"&&window.L?(x=window.L,x):x||v||(v=(async()=>{try{const e=await import("leaflet");return x=e.default||e,typeof window<"u"&&!window.L&&(window.L=x),x}catch{return v=null,console.warn(`[UI Components Kit] O Leaflet não foi encontrado no ambiente.
2
- Para utilizar componentes de mapa ou CAD (<ui-mapa>, <ui-canvas-cad>), instale o pacote "leaflet" (npm i leaflet) ou inclua o script no HTML: <script src=".../leaflet.js"><\/script>.`),null}})(),v)}function Xe(){return typeof window<"u"&&window.L?window.L:x}const $e=new Set(["svg","g","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","defs","symbol","use","lineargradient","radialgradient","stop","clippath","mask"]),et=/^(javascript|data|vbscript):/i,tt=/url\s*\(\s*['"]?\s*(?!#)/i;let rt=0;function ot(e,t){const r=e.toLowerCase();if(r.startsWith("on"))return!1;const o=t.replace(/[\s\u0000-\u001f]+/g,"");return et.test(o)?!1:r==="href"||r==="xlink:href"?o.startsWith("#"):!tt.test(t)}function oe(e){Array.from(e.children).forEach(t=>{if(!$e.has(t.localName.toLowerCase())){console.warn(`[svg-seguro] Elemento <${t.localName}> não permitido foi descartado pela allowlist.`),t.remove();return}oe(t)}),Array.from(e.attributes).forEach(t=>{ot(t.name,t.value)||e.removeAttribute(t.name)})}function at(e){const t=`ui-svg-${++rt}-`,r=new Map;if(e.querySelectorAll("[id]").forEach(n=>{const l=n.getAttribute("id");if(l){const s=`${t}${l}`;r.set(l,s),n.setAttribute("id",s)}}),r.size===0)return;const a=[e,...Array.from(e.querySelectorAll("*"))],i=/url\(\s*#([a-zA-Z0-9_\-:]+)\s*\)/g;a.forEach(n=>{Array.from(n.attributes).forEach(l=>{const s=l.name.toLowerCase(),f=l.value;if((s==="href"||s==="xlink:href")&&f.startsWith("#")){const d=f.slice(1);r.has(d)&&n.setAttribute(l.name,`#${r.get(d)}`)}else if(f.includes("url(#")){const d=f.replace(i,(g,h)=>r.has(h)?`url(#${r.get(h)})`:g);d!==f&&n.setAttribute(l.name,d)}})})}function it(e){if(!e||typeof e!="string"||typeof document>"u")return null;const t=document.createElement("template");t.innerHTML=e.trim();const r=t.content.querySelector("svg");return r?(oe(r),at(r),r):(e.trim().length>0&&console.warn("[svg-seguro] Código descartado: nenhum elemento <svg> válido encontrado."),null)}const E="input, select, textarea, ui-campo-texto, ui-input, ui-area-texto, ui-textarea, ui-lista-flutuante, ui-select, ui-checkbox, ui-radio, ui-switch, ui-toggle",nt='input[type="file"], input[type="hidden"], input[type="submit"], input[type="button"], input[type="reset"]',lt=new Set(["ui-checkbox","ui-radio","ui-switch","ui-toggle"]);function L(e){const t=e.tagName.toLowerCase();if(lt.has(t))return!0;if(t!=="input")return!1;const r=(e.getAttribute("type")||"").toLowerCase();return r==="checkbox"||r==="radio"}function w(e,t=E){if(!e||typeof e.querySelectorAll!="function")return[];try{return Array.from(e.querySelectorAll(t)).filter(r=>!r.matches(nt))}catch{return[]}}function ae(e,t){return e.getAttribute("name")||e.id||`#${t}`}function y(e){try{const t=e;if(L(e))return t.checked===!0?"1":"0";const r=t.value;return r==null?"":typeof r=="string"?r:String(r)}catch{return""}}function k(e,t){try{const r=e;L(e)?r.checked=t==="1"||t==="true":r.value=t}catch{}}function M(e,t,r){return w(e,r).find(a=>a.getAttribute("name")===t||a.id===t)??null}const st=["input","change","ui-input","ui-change","ui-selecionar","ui-campos-preenchidos"];function R(e,t,r){const o=w(e,t).map((i,n)=>[ae(i,n),y(i)]);let a=null;if(r)try{a=r()??null}catch{a=null}try{return JSON.stringify([o,a])}catch{return JSON.stringify([o,null])}}function ut(e,t={}){const r=t.seletor??E,o=new C;let a=R(e,r,t.estadoExterno),i=!1;const n=()=>{var s;const l=R(e,r,t.estadoExterno)!==a;if(l!==i){i=l;try{(s=t.aoMudar)==null||s.call(t,i)}catch(f){console.error("[form-rascunho] aoMudar lançou exceção:",f)}}return i};return st.forEach(l=>o.add(e,l,n)),{get sujo(){return i},avaliar:n,marcarLimpo(){a=R(e,r,t.estadoExterno),n()},destruir(){o.cleanup()}}}const ct=new Set(["__proto__","constructor","prototype"]),ft=e=>e==null?"":typeof e=="boolean"?e?"1":"0":String(e);function dt(e,t,r={}){const o=r.somenteVazios!==!1,a=r.vazioSe??((u,c)=>c.trim()===""),i=r.seletor??E,n=[],l=[],s=[],f=[],d=[];let g=!1;const h=()=>{e&&typeof e.dispatchEvent=="function"&&typeof CustomEvent<"u"&&e.dispatchEvent(new CustomEvent("ui-campos-preenchidos",{bubbles:!0,detail:{aplicados:[...n]}}))},m=(u,c,A)=>{f.push({campo:c,valor:y(c)}),k(c,A),n.includes(u)||n.push(u)};if(t&&typeof t=="object")for(const u of Object.keys(t)){if(ct.has(u))continue;const c=M(e,u,i);if(!c){s.push(u);continue}const A=ft(t[u]);if(A==="")continue;const I=y(c);A!==I&&(!o||a(u,I)?m(u,c,A):(l.push(u),d.push({chave:u,campo:c,valor:A})))}return n.length>0&&h(),{aplicados:n,conflitos:l,semAlvo:s,substituirConflitos(){g||d.length===0||(d.splice(0).forEach(({chave:u,campo:c,valor:A})=>m(u,c,A)),h())},desfazer(){if(!g){g=!0;for(let u=f.length-1;u>=0;u--)k(f[u].campo,f[u].valor);f.length=0,h()}}}}const mt="Valor inválido.";function S(e,t){t?(e.setAttribute("erro",""),e.setAttribute("mensagem-erro",t)):(e.removeAttribute("erro"),e.removeAttribute("mensagem-erro"))}function pt(e,t,r={}){var a,i,n;const o=[];if(!e||!t||typeof t!="object")return{valido:!0,erros:o};for(const l of Object.keys(t)){const s=t[l],f=M(e,l);if(!f||typeof s!="function")continue;if((a=r.ignorar)!=null&&a.call(r,f)){S(f,null);continue}let d;try{d=s(y(f),f)}catch(g){console.error(`[form-erros] regra do campo "${l}" lançou exceção:`,g),d=mt}S(f,d||null),d&&o.push({chave:l,mensagem:d,campo:f})}if(o.length>0){const l=w(e);if(o.sort((s,f)=>l.indexOf(s.campo)-l.indexOf(f.campo)),r.focarPrimeiro!==!1){const s=o[0].campo;try{(i=s.focus)==null||i.call(s),(n=s.scrollIntoView)==null||n.call(s,{block:"center",behavior:"smooth"})}catch{}}}return{valido:o.length===0,erros:o}}function gt(e){w(e).forEach(t=>S(t,null))}function ht(e,t=E){const r=new C,o=a=>{const i=a.target;if(!(i instanceof Element))return;const n=i.closest(t);n&&(n.hasAttribute("erro")||n.hasAttribute("mensagem-erro"))&&S(n,null)};return["input","change","ui-input","ui-change","ui-selecionar"].forEach(a=>r.add(e,a,o)),()=>r.cleanup()}function bt(e,t){const r=new C,o=i=>{try{i()}catch(n){console.error("[form-atalhos] ação do atalho lançou exceção:",n)}},a=i=>{if(i.isComposing)return;const n=i.ctrlKey||i.metaKey;if(t.salvar&&n&&!i.altKey&&!i.shiftKey&&i.key.toLowerCase()==="s"){i.preventDefault(),o(t.salvar);return}t.cancelar&&i.key==="Escape"&&!i.defaultPrevented&&!n&&!i.altKey&&!i.shiftKey&&(i.preventDefault(),o(t.cancelar))};return r.add(e,"keydown",a),()=>r.cleanup()}typeof document<"u"&&re();function At({host:e,internals:t,controle:r,rotulo:o,texto:a}){if(a){o.textContent=a,o.style.display="inline",r.setAttribute("aria-labelledby",o.id),r.removeAttribute("aria-label");return}o.style.display="none",r.removeAttribute("aria-labelledby");const i=ee(e,t);i?r.setAttribute("aria-label",i):r.removeAttribute("aria-label")}exports.ATRIBUTOS_DEGRADE=G;exports.CLASSES_DEGRADE=J;exports.FormAssociatedElement=te;exports.ListenerBag=C;exports.PRESETS_DEGRADE=K;exports.SELETOR_CAMPOS_PADRAO=E;exports.SafeHTMLElement=W;exports.TAMANHOS_CONTROLE=ve;exports.UIBus=p;exports.VARIAVEL_ALTURA_CONTROLE=T;exports.alternarPart=De;exports.alturaDoTamanho=B;exports.aplicarAlturaControle=Ce;exports.aplicarDegradeNoElemento=Ie;exports.aplicarValidadeInternals=Ge;exports.carregarLeaflet=_e;exports.chaveDoCampo=ae;exports.cliqueVeioDeRotuloExterno=Ze;exports.criarRascunhoFormulario=ut;exports.definirCustomElement=pe;exports.definirValorCampo=k;exports.ehAtributoDegrade=Le;exports.ehCampoMarcavel=L;exports.escolherInteiro=He;exports.escolherOpcao=qe;exports.escolherOpcaoOpcional=We;exports.focoEmCampoDeTexto=Ue;exports.focoEmControleAcionavel=Pe;exports.gerarIdUnico=Fe;exports.gradienteSeguro=Q;exports.higienizarSvg=it;exports.initZeroJSTriggers=re;exports.inteiroOuNulo=Be;exports.isBrowser=me;exports.leafletCss=Je;exports.lerEntradaAltura=j;exports.lerValorCampo=y;exports.ligarAtalhosFormulario=bt;exports.limparErros=gt;exports.listarCampos=w;exports.localizarCampo=M;exports.normalizarAltura=F;exports.normalizarTamanhoControle=H;exports.observarLimpezaDeErros=ht;exports.obterLeafletSincrono=Xe;exports.obterRotuloExterno=ee;exports.obterValorAtributoDegrade=X;exports.preencherCampos=dt;exports.renderizarRotulo=Ve;exports.resolverAlturaControle=Z;exports.resolverDegrade=_;exports.sincronizarRotuloControle=At;exports.submeterFormulario=Ae;exports.submeterImplicitamente=xe;exports.validarCampos=pt;exports.validarRestricoesCampoTexto=je;