vue-componentes/dist/eli-vue.umd.js
2026-01-27 17:11:13 -03:00

66 lines
40 KiB
JavaScript

(function(E,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vuetify/components/VBtn"),require("vuetify/components/VBadge"),require("vuetify/components/VCheckbox"),require("vuetify/components/VIcon"),require("vuetify/components/VRadio"),require("vuetify/components/VRadioGroup"),require("vuetify/components/VSelect"),require("vuetify/components/VTextField"),require("vuetify/components/VTextarea"),require("vuetify/components/VCard"),require("vuetify/components/VGrid")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components/VBtn","vuetify/components/VBadge","vuetify/components/VCheckbox","vuetify/components/VIcon","vuetify/components/VRadio","vuetify/components/VRadioGroup","vuetify/components/VSelect","vuetify/components/VTextField","vuetify/components/VTextarea","vuetify/components/VCard","vuetify/components/VGrid"],t):(E=typeof globalThis<"u"?globalThis:E||self,t(E.eli_vue={},E.Vue,E.VBtn,E.VBadge,E.VCheckbox,E.VIcon,E.VRadio,E.VRadioGroup,E.VSelect,E.VTextField,E.VTextarea,E.VCard,E.VGrid))})(this,(function(E,t,Ce,Be,we,ve,Se,Ee,Me,ue,_e,z,De){"use strict";const Ne=t.defineComponent({name:"EliBotao",inheritAttrs:!1,props:{color:{type:String,default:"primary"},variant:{type:String,default:"elevated"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}}}),q=(e,a)=>{const d=e.__vccOpts||e;for(const[c,h]of a)d[c]=h;return d};function Te(e,a,d,c,h,$){return t.openBlock(),t.createBlock(Ce.VBtn,t.mergeProps({color:e.color,variant:e.variant,size:e.size,disabled:e.disabled,loading:e.loading},e.$attrs,{class:"text-none pt-1"}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["color","variant","size","disabled","loading"])}const re=q(Ne,[["render",Te]]),ce={suave:"4px",pill:"10px"},Pe=t.defineComponent({name:"EliBadge",inheritAttrs:!1,props:{color:{type:String,default:"primary"},location:{type:String,default:"top right"},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"0"},dot:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},badge:{type:[String,Number],default:void 0},radius:{type:String,default:"suave"}},setup(e){const a=t.computed(()=>e.radius in ce?ce[e.radius]:e.radius),d=t.computed(()=>e.dot||e.badge!==void 0?e.visible:!1),c=t.computed(()=>({"--eli-badge-radius":a.value}));return{showBadge:d,badgeStyle:c}}});function Ae(e,a,d,c,h,$){return e.showBadge?(t.openBlock(),t.createBlock(Be.VBadge,t.mergeProps({key:0,color:e.color},e.$attrs,{location:e.location,"offset-x":e.offsetX,"offset-y":e.offsetY,dot:e.dot,content:e.badge,style:e.badgeStyle}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["color","location","offset-x","offset-y","dot","content","style"])):t.renderSlot(e.$slots,"default",{key:1},void 0,!0)}const x=q(Pe,[["render",Ae],["__scopeId","data-v-de2fbf2f"]]);function Ie(e){return e.replace(/\D+/g,"")}function Oe(e){const a=Ie(e);return a.length<=11?a.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,18)}function Ue(e){return e.replace(/\D+/g,"")}function je(e){const a=Ue(e);return a?a.length<=10?a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,14):a.replace(/^(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2").slice(0,15):""}function le(e){return e.replace(/\D+/g,"")}function me(e){const a=e.replace(/[^\d,]/g,""),d=a.split(",");return d.length>2?d[0]+","+d.slice(1).join(""):a}function Le(e){return me(e.replace(/%/g,""))}function qe(e){const a=le(e);return a?(parseInt(a,10)/100).toFixed(2).replace(".",",").replace(/\B(?=(\d{3})+(?!\d))/g,"."):""}function Fe(e){const a=le(e).slice(0,8);return a.length<=5?a:a.replace(/^(\d{5})(\d{1,3})$/,"$1-$2")}const He=t.defineComponent({name:"EliInput",inheritAttrs:!1,props:{modelValue:{type:[String,Number,Boolean,Array],default:""},type:{type:String,default:"text"},label:String,placeholder:String,disabled:Boolean,error:Boolean,errorMessages:{type:[String,Array],default:()=>[]},hint:String,persistentHint:Boolean,rows:{type:Number,default:4},options:{type:Array,default:()=>[]},clearable:Boolean,variant:{type:String,default:"outlined"},density:{type:String,default:"comfortable"},color:{type:String,default:"primary"},row:Boolean,showPasswordToggle:Boolean,multiple:Boolean,chips:Boolean},emits:["update:modelValue","change","focus","blur"],setup(e,{emit:a,attrs:d}){const c=t.ref(!1),h=t.ref(!1),$=t.computed({get:()=>e.modelValue,set:w=>{a("update:modelValue",w),a("change",w)}}),l=t.computed(()=>["text","password","email","search","url","telefone","cpfCnpj","numericoInteiro","numericoDecimal","numericoMoeda","porcentagem","cep"].includes(e.type)),f=t.computed(()=>e.type==="password"?h.value?"text":"password":"text"),k=t.computed(()=>{if(e.type==="telefone")return"tel";if(e.type==="porcentagem")return"decimal";if(e.type.startsWith("numerico"))return"numeric"}),r=t.computed(()=>e.error?"error":c.value?e.color:void 0);function S(w){const A=w.target;let C=A.value;switch(e.type){case"numericoInteiro":C=le(C);break;case"numericoDecimal":C=me(C);break;case"numericoMoeda":C=qe(C);break;case"porcentagem":C=Le(C);break;case"telefone":C=je(C);break;case"cpfCnpj":C=Oe(C);break;case"cep":C=Fe(C);break}A.value=C,a("update:modelValue",C),a("change",C)}function v(){h.value=!h.value}const j=t.computed(()=>(e.options||[]).map(w=>{if(w&&typeof w=="object"&&"value"in w){const C=w.value;return{label:w.label??String(C),value:C,disabled:w.disabled}}const A=w;return{label:String(A),value:A}}));return{attrs:d,value:$,isTextLike:l,inputHtmlType:f,inputMode:k,internalColor:r,showPassword:h,togglePassword:v,onInput:S,onFocus:()=>a("focus"),onBlur:()=>a("blur"),computedItems:j}}}),Ye={class:"eli-input"},ze={key:4,class:"checkbox-group"};function Re(e,a,d,c,h,$){return t.openBlock(),t.createElementBlock("div",Ye,[e.isTextLike?(t.openBlock(),t.createBlock(ue.VTextField,t.mergeProps({key:0,modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l),type:e.inputHtmlType,label:e.label,placeholder:e.placeholder,disabled:e.disabled,clearable:e.clearable&&e.type!=="password",error:e.error,"error-messages":e.errorMessages,hint:e.hint,"persistent-hint":e.persistentHint,density:e.density,variant:e.variant,color:e.internalColor,inputmode:e.inputMode,suffix:e.type==="porcentagem"?"%":void 0},e.attrs,{onFocus:e.onFocus,onBlur:e.onBlur,onInput:e.onInput}),t.createSlots({_:2},[e.type==="password"&&e.showPasswordToggle?{name:"append-inner",fn:t.withCtx(()=>[t.createVNode(ve.VIcon,{class:"cursor-pointer",onClick:e.togglePassword},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.showPassword?"mdi-eye-off":"mdi-eye"),1)]),_:1},8,["onClick"])]),key:"0"}:void 0]),1040,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","color","inputmode","suffix","onFocus","onBlur","onInput"])):e.type==="textarea"?(t.openBlock(),t.createBlock(_e.VTextarea,t.mergeProps({key:1,modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=l=>e.value=l),label:e.label,rows:e.rows,density:e.density,variant:e.variant},e.attrs),null,16,["modelValue","label","rows","density","variant"])):e.type==="select"?(t.openBlock(),t.createBlock(Me.VSelect,t.mergeProps({key:2,modelValue:e.value,"onUpdate:modelValue":a[2]||(a[2]=l=>e.value=l),items:e.computedItems,label:e.label,placeholder:e.placeholder,multiple:e.multiple,chips:e.chips,clearable:e.clearable,disabled:e.disabled,density:e.density,variant:e.variant,"item-title":"label","item-value":"value",error:e.error,"error-messages":e.errorMessages},e.attrs,{onFocus:e.onFocus,onBlur:e.onBlur}),null,16,["modelValue","items","label","placeholder","multiple","chips","clearable","disabled","density","variant","error","error-messages","onFocus","onBlur"])):e.type==="radio"?(t.openBlock(),t.createBlock(Ee.VRadioGroup,{key:3,modelValue:e.value,"onUpdate:modelValue":a[3]||(a[3]=l=>e.value=l),row:e.row},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedItems,l=>(t.openBlock(),t.createBlock(Se.VRadio,{key:String(l.value),label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","row"])):e.type==="checkbox"?(t.openBlock(),t.createElementBlock("div",ze,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedItems,l=>(t.openBlock(),t.createBlock(we.VCheckbox,{key:String(l.value),modelValue:e.value,"onUpdate:modelValue":a[4]||(a[4]=f=>e.value=f),label:l.label,value:l.value,density:e.density},null,8,["modelValue","label","value","density"]))),128))])):t.createCommentVNode("",!0)])}const ie=q(He,[["render",Re],["__scopeId","data-v-756cb549"]]),We=t.defineComponent({name:"EliOlaMundo",components:{EliBotao:re,EliBadge:x,EliInput:ie},setup(){const e=t.ref(""),a=t.ref([]),d=t.ref(""),c=t.ref(""),h=t.ref(""),$=t.ref(""),l=t.ref(""),f=t.ref(""),k=t.ref(""),r=t.ref(""),S=t.ref(""),v=t.ref(null),j=t.ref([]);return{nome:e,email:f,documento:S,estado:a,telefone:c,mensagem:k,senha:r,cor:v,habilidades:j,idade:h,altura:$,cep:d,valor:l}}}),Ge={class:"grid-example"};function Je(e,a,d,c,h,$){const l=t.resolveComponent("EliBadge"),f=t.resolveComponent("EliInput"),k=t.resolveComponent("EliBotao");return t.openBlock(),t.createBlock(De.VContainer,null,{default:t.withCtx(()=>[t.createVNode(z.VCard,{class:"mx-auto",max_width:"400"},{default:t.withCtx(()=>[t.createVNode(z.VCardTitle,null,{default:t.withCtx(()=>[t.createVNode(l,{badge:"Novo","offset-x":"-15",location:"right center"},{default:t.withCtx(()=>[...a[14]||(a[14]=[t.createTextVNode(" Olá Mundo! ",-1)])]),_:1})]),_:1}),t.createVNode(z.VCardText,null,{default:t.withCtx(()=>[a[15]||(a[15]=t.createTextVNode(" Este é um componente de exemplo integrado com Vuetify. ",-1)),t.createElementVNode("div",Ge,[t.createVNode(f,{modelValue:e.nome,"onUpdate:modelValue":a[0]||(a[0]=r=>e.nome=r),label:"Nome",placeholder:"Digite o nome",density:"compact"},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.idade,"onUpdate:modelValue":a[1]||(a[1]=r=>e.idade=r),type:"numericoInteiro",label:"Idade",density:"default"},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.altura,"onUpdate:modelValue":a[2]||(a[2]=r=>e.altura=r),type:"numericoDecimal",label:"Altura",density:"comfortable"},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.valor,"onUpdate:modelValue":a[3]||(a[3]=r=>e.valor=r),type:"numericoMoeda",label:"Valor"},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.telefone,"onUpdate:modelValue":a[4]||(a[4]=r=>e.telefone=r),type:"telefone",label:"Telefone"},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.cep,"onUpdate:modelValue":a[5]||(a[5]=r=>e.cep=r),type:"cep",label:"CEP",placeholder:"00000-000"},null,8,["modelValue"]),t.createVNode(f,{type:"select",label:"Estado",options:[{label:"São Paulo",value:"SP"},{label:"Rio de Janeiro",value:"RJ"}],modelValue:e.estado,"onUpdate:modelValue":a[6]||(a[6]=r=>e.estado=r),multiple:""},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.documento,"onUpdate:modelValue":a[7]||(a[7]=r=>e.documento=r),type:"cpfCnpj",label:"CPF / CNPJ"},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.email,"onUpdate:modelValue":a[8]||(a[8]=r=>e.email=r),label:"Email",placeholder:"email@exemplo.com"},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.senha,"onUpdate:modelValue":a[9]||(a[9]=r=>e.senha=r),label:"Senha",type:"password",showPasswordToggle:!0,placeholder:"Digite sua senha"},null,8,["modelValue"]),t.createVNode(f,{type:"textarea",modelValue:e.mensagem,"onUpdate:modelValue":a[10]||(a[10]=r=>e.mensagem=r),label:"Mensagem",rows:5},null,8,["modelValue"]),t.createVNode(f,{type:"radio",modelValue:e.cor,"onUpdate:modelValue":a[11]||(a[11]=r=>e.cor=r),label:"Cor favorita",options:[{label:"Azul",value:"azul"},{label:"Verde",value:"verde"}]},null,8,["modelValue"]),t.createVNode(f,{type:"checkbox",modelValue:e.habilidades,"onUpdate:modelValue":a[12]||(a[12]=r=>e.habilidades=r),options:[{label:"Vue",value:"vue"},{label:"React",value:"react"}]},null,8,["modelValue"]),t.createVNode(f,{modelValue:e.nome,"onUpdate:modelValue":a[13]||(a[13]=r=>e.nome=r),label:"Nome",error:!0,"error-messages":["Obrigatório"]},null,8,["modelValue"])])]),_:1}),t.createVNode(z.VCardActions,null,{default:t.withCtx(()=>[t.createVNode(k,{color:"primary",variant:"elevated",block:""},{default:t.withCtx(()=>[...a[16]||(a[16]=[t.createTextVNode(" Botão Vuetify ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})}const fe=q(We,[["render",Je]]),Ze=t.defineComponent({name:"EliCartao",components:{EliBadge:x},inheritAttrs:!1,props:{titulo:{type:String,default:""},status:{type:String,required:!0},variant:{type:String,default:"outlined"}},emits:{clicar:e=>!0},setup(e,{emit:a}){const d=t.computed(()=>e.status),c=t.computed(()=>{switch(e.status){case"novo":return"primary";case"rascunho":return"secondary";case"vendido":return"success";case"cancelado":return"error"}}),h=t.computed(()=>`eli-cartao--${e.status}`);function $(){a("clicar",e.status)}return{rotuloStatus:d,corStatus:c,classeStatus:h,onClick:$}}}),Xe={class:"eli-cartao__titulo-texto"},Ke={class:"eli-cartao__status"};function Qe(e,a,d,c,h,$){const l=t.resolveComponent("EliBadge");return t.openBlock(),t.createBlock(z.VCard,t.mergeProps({class:["eli-cartao",e.classeStatus],variant:e.variant},e.$attrs),{default:t.withCtx(()=>[t.createVNode(z.VCardTitle,{class:"eli-cartao__titulo"},{default:t.withCtx(()=>[t.createElementVNode("div",Xe,[t.renderSlot(e.$slots,"titulo",{},()=>[t.createTextVNode(t.toDisplayString(e.titulo),1)],!0)]),t.createElementVNode("div",Ke,[t.createVNode(l,{badge:e.rotuloStatus,radius:"pill",color:e.corStatus},{default:t.withCtx(()=>[...a[0]||(a[0]=[t.createElementVNode("span",null,null,-1)])]),_:1},8,["badge","color"])])]),_:3}),t.createVNode(z.VCardText,{class:"eli-cartao__conteudo"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3}),e.$slots.acoes?(t.openBlock(),t.createBlock(z.VCardActions,{key:0,class:"eli-cartao__acoes"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"acoes",{},void 0,!0)]),_:3})):t.createCommentVNode("",!0)]),_:3},16,["variant","class"])}const pe=q(Ze,[["render",Qe],["__scopeId","data-v-6c492bd9"]]);function xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ee={exports:{}},et=ee.exports,he;function tt(){return he||(he=1,(function(e,a){(function(d,c){e.exports=c()})(et,(function(){var d=1e3,c=6e4,h=36e5,$="millisecond",l="second",f="minute",k="hour",r="day",S="week",v="month",j="quarter",w="year",A="date",C="Invalid Date",H=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,L=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(u){var o=["th","st","nd","rd"],n=u%100;return"["+u+(o[(n-20)%10]||o[n]||o[0])+"]"}},K=function(u,o,n){var s=String(u);return!s||s.length>=o?u:""+Array(o+1-s.length).join(n)+u},se={s:K,z:function(u){var o=-u.utcOffset(),n=Math.abs(o),s=Math.floor(n/60),i=n%60;return(o<=0?"+":"-")+K(s,2,"0")+":"+K(i,2,"0")},m:function u(o,n){if(o.date()<n.date())return-u(n,o);var s=12*(n.year()-o.year())+(n.month()-o.month()),i=o.clone().add(s,v),b=n-i<0,p=o.clone().add(s+(b?-1:1),v);return+(-(s+(n-i)/(b?i-p:p-i))||0)},a:function(u){return u<0?Math.ceil(u)||0:Math.floor(u)},p:function(u){return{M:v,y:w,w:S,d:r,D:A,h:k,m:f,s:l,ms:$,Q:j}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(u){return u===void 0}},W="en",Y={};Y[W]=O;var Q="$isDayjsObject",G=function(u){return u instanceof Z||!(!u||!u[Q])},J=function u(o,n,s){var i;if(!o)return W;if(typeof o=="string"){var b=o.toLowerCase();Y[b]&&(i=b),n&&(Y[b]=n,i=b);var p=o.split("-");if(!i&&p.length>1)return u(p[0])}else{var y=o.name;Y[y]=o,i=y}return!s&&i&&(W=i),i||!s&&W},N=function(u,o){if(G(u))return u.clone();var n=typeof o=="object"?o:{};return n.date=u,n.args=arguments,new Z(n)},B=se;B.l=J,B.i=G,B.w=function(u,o){return N(u,{locale:o.$L,utc:o.$u,x:o.$x,$offset:o.$offset})};var Z=(function(){function u(n){this.$L=J(n.locale,null,!0),this.parse(n),this.$x=this.$x||n.x||{},this[Q]=!0}var o=u.prototype;return o.parse=function(n){this.$d=(function(s){var i=s.date,b=s.utc;if(i===null)return new Date(NaN);if(B.u(i))return new Date;if(i instanceof Date)return new Date(i);if(typeof i=="string"&&!/Z$/i.test(i)){var p=i.match(H);if(p){var y=p[2]-1||0,m=(p[7]||"0").substring(0,3);return b?new Date(Date.UTC(p[1],y,p[3]||1,p[4]||0,p[5]||0,p[6]||0,m)):new Date(p[1],y,p[3]||1,p[4]||0,p[5]||0,p[6]||0,m)}}return new Date(i)})(n),this.init()},o.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},o.$utils=function(){return B},o.isValid=function(){return this.$d.toString()!==C},o.isSame=function(n,s){var i=N(n);return this.startOf(s)<=i&&i<=this.endOf(s)},o.isAfter=function(n,s){return N(n)<this.startOf(s)},o.isBefore=function(n,s){return this.endOf(s)<N(n)},o.$g=function(n,s,i){return B.u(n)?this[s]:this.set(i,n)},o.unix=function(){return Math.floor(this.valueOf()/1e3)},o.valueOf=function(){return this.$d.getTime()},o.startOf=function(n,s){var i=this,b=!!B.u(s)||s,p=B.p(n),y=function(P,_){var U=B.w(i.$u?Date.UTC(i.$y,_,P):new Date(i.$y,_,P),i);return b?U:U.endOf(r)},m=function(P,_){return B.w(i.toDate()[P].apply(i.toDate("s"),(b?[0,0,0,0]:[23,59,59,999]).slice(_)),i)},V=this.$W,g=this.$M,D=this.$D,M="set"+(this.$u?"UTC":"");switch(p){case w:return b?y(1,0):y(31,11);case v:return b?y(1,g):y(0,g+1);case S:var I=this.$locale().weekStart||0,F=(V<I?V+7:V)-I;return y(b?D-F:D+(6-F),g);case r:case A:return m(M+"Hours",0);case k:return m(M+"Minutes",1);case f:return m(M+"Seconds",2);case l:return m(M+"Milliseconds",3);default:return this.clone()}},o.endOf=function(n){return this.startOf(n,!1)},o.$set=function(n,s){var i,b=B.p(n),p="set"+(this.$u?"UTC":""),y=(i={},i[r]=p+"Date",i[A]=p+"Date",i[v]=p+"Month",i[w]=p+"FullYear",i[k]=p+"Hours",i[f]=p+"Minutes",i[l]=p+"Seconds",i[$]=p+"Milliseconds",i)[b],m=b===r?this.$D+(s-this.$W):s;if(b===v||b===w){var V=this.clone().set(A,1);V.$d[y](m),V.init(),this.$d=V.set(A,Math.min(this.$D,V.daysInMonth())).$d}else y&&this.$d[y](m);return this.init(),this},o.set=function(n,s){return this.clone().$set(n,s)},o.get=function(n){return this[B.p(n)]()},o.add=function(n,s){var i,b=this;n=Number(n);var p=B.p(s),y=function(g){var D=N(b);return B.w(D.date(D.date()+Math.round(g*n)),b)};if(p===v)return this.set(v,this.$M+n);if(p===w)return this.set(w,this.$y+n);if(p===r)return y(1);if(p===S)return y(7);var m=(i={},i[f]=c,i[k]=h,i[l]=d,i)[p]||1,V=this.$d.getTime()+n*m;return B.w(V,this)},o.subtract=function(n,s){return this.add(-1*n,s)},o.format=function(n){var s=this,i=this.$locale();if(!this.isValid())return i.invalidDate||C;var b=n||"YYYY-MM-DDTHH:mm:ssZ",p=B.z(this),y=this.$H,m=this.$m,V=this.$M,g=i.weekdays,D=i.months,M=i.meridiem,I=function(_,U,R,T){return _&&(_[U]||_(s,b))||R[U].slice(0,T)},F=function(_){return B.s(y%12||12,_,"0")},P=M||function(_,U,R){var T=_<12?"AM":"PM";return R?T.toLowerCase():T};return b.replace(L,(function(_,U){return U||(function(R){switch(R){case"YY":return String(s.$y).slice(-2);case"YYYY":return B.s(s.$y,4,"0");case"M":return V+1;case"MM":return B.s(V+1,2,"0");case"MMM":return I(i.monthsShort,V,D,3);case"MMMM":return I(D,V);case"D":return s.$D;case"DD":return B.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return I(i.weekdaysMin,s.$W,g,2);case"ddd":return I(i.weekdaysShort,s.$W,g,3);case"dddd":return g[s.$W];case"H":return String(y);case"HH":return B.s(y,2,"0");case"h":return F(1);case"hh":return F(2);case"a":return P(y,m,!0);case"A":return P(y,m,!1);case"m":return String(m);case"mm":return B.s(m,2,"0");case"s":return String(s.$s);case"ss":return B.s(s.$s,2,"0");case"SSS":return B.s(s.$ms,3,"0");case"Z":return p}return null})(_)||p.replace(":","")}))},o.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},o.diff=function(n,s,i){var b,p=this,y=B.p(s),m=N(n),V=(m.utcOffset()-this.utcOffset())*c,g=this-m,D=function(){return B.m(p,m)};switch(y){case w:b=D()/12;break;case v:b=D();break;case j:b=D()/3;break;case S:b=(g-V)/6048e5;break;case r:b=(g-V)/864e5;break;case k:b=g/h;break;case f:b=g/c;break;case l:b=g/d;break;default:b=g}return i?b:B.a(b)},o.daysInMonth=function(){return this.endOf(v).$D},o.$locale=function(){return Y[this.$L]},o.locale=function(n,s){if(!n)return this.$L;var i=this.clone(),b=J(n,s,!0);return b&&(i.$L=b),i},o.clone=function(){return B.w(this.$d,this)},o.toDate=function(){return new Date(this.valueOf())},o.toJSON=function(){return this.isValid()?this.toISOString():null},o.toISOString=function(){return this.$d.toISOString()},o.toString=function(){return this.$d.toUTCString()},u})(),oe=Z.prototype;return N.prototype=oe,[["$ms",$],["$s",l],["$m",f],["$H",k],["$W",r],["$M",v],["$y",w],["$D",A]].forEach((function(u){oe[u[1]]=function(o){return this.$g(o,u[0],u[1])}})),N.extend=function(u,o){return u.$i||(u(o,Z,N),u.$i=!0),N},N.locale=J,N.isDayjs=G,N.unix=function(u){return N(1e3*u)},N.en=Y[W],N.Ls=Y,N.p={},N}))})(ee)),ee.exports}var at=tt();const te=xe(at),ot=t.defineComponent({name:"EliDataHora",inheritAttrs:!1,props:{modelValue:{type:String,default:null},modo:{type:String,default:"dataHora"},rotulo:{type:String,default:"Data e hora"},placeholder:{type:String,default:""},desabilitado:{type:Boolean,default:!1},limpavel:{type:Boolean,default:!1},erro:{type:Boolean,default:!1},mensagensErro:{type:[String,Array],default:()=>[]},dica:{type:String,default:""},dicaPersistente:{type:Boolean,default:!1},densidade:{type:String,default:"comfortable"},variante:{type:String,default:"outlined"},min:{type:String,default:void 0},max:{type:String,default:void 0}},emits:{"update:modelValue":e=>!0,alterar:e=>!0,foco:()=>!0,desfoco:()=>!0},setup(e,{emit:a,attrs:d}){const c=t.computed(()=>e.modo==="data"?"date":"datetime-local");function h(r){return e.modo==="data"?te(r).format("YYYY-MM-DD"):te(r).format("YYYY-MM-DDTHH:mm")}function $(r){return e.modo==="data"?te(`${r}T00:00`).format():te(r).format()}const l=t.computed({get:()=>e.modelValue?h(e.modelValue):"",set:r=>{const S=r&&r.length>0?r:null;if(!S){a("update:modelValue",null),a("alterar",null);return}const v=$(S);a("update:modelValue",v),a("alterar",v)}}),f=t.computed(()=>{if(e.min)return h(e.min)}),k=t.computed(()=>{if(e.max)return h(e.max)});return{attrs:d,valor:l,emit:a,minLocal:f,maxLocal:k,tipoInput:c}}}),nt={class:"eli-data-hora"};function rt(e,a,d,c,h,$){return t.openBlock(),t.createElementBlock("div",nt,[t.createVNode(ue.VTextField,t.mergeProps({modelValue:e.valor,"onUpdate:modelValue":a[0]||(a[0]=l=>e.valor=l),type:e.tipoInput,label:e.rotulo,placeholder:e.placeholder,disabled:e.desabilitado,clearable:e.limpavel,error:e.erro,"error-messages":e.mensagensErro,hint:e.dica,"persistent-hint":e.dicaPersistente,density:e.densidade,variant:e.variante,min:e.minLocal,max:e.maxLocal},e.attrs,{onFocus:a[1]||(a[1]=l=>e.emit("foco")),onBlur:a[2]||(a[2]=l=>e.emit("desfoco"))}),null,16,["modelValue","type","label","placeholder","disabled","clearable","error","error-messages","hint","persistent-hint","density","variant","min","max"])])}const be=q(ot,[["render",rt],["__scopeId","data-v-71afabb6"]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lt=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ye=e=>e==="";/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const it=(...e)=>e.filter((a,d,c)=>!!a&&a.trim()!==""&&c.indexOf(a)===d).join(" ").trim();/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ge=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const st=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,d,c)=>c?c.toUpperCase():d.toLowerCase());/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dt=e=>{const a=st(e);return a.charAt(0).toUpperCase()+a.slice(1)};/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var X={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ut=({name:e,iconNode:a,absoluteStrokeWidth:d,"absolute-stroke-width":c,strokeWidth:h,"stroke-width":$,size:l=X.width,color:f=X.stroke,...k},{slots:r})=>t.h("svg",{...X,...k,width:l,height:l,stroke:f,"stroke-width":ye(d)||ye(c)||d===!0||c===!0?Number(h||$||X["stroke-width"])*24/Number(l):h||$||X["stroke-width"],class:it("lucide",k.class,...e?[`lucide-${ge(dt(e))}-icon`,`lucide-${ge(e)}`]:["lucide-icon"]),...!r.default&&!lt(k)&&{"aria-hidden":"true"}},[...a.map(S=>t.h(...S)),...r.default?[r.default()]:[]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ae=(e,a)=>(d,{slots:c,attrs:h})=>t.h(ut,{...h,...d,iconNode:a,name:e},c);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ct=ae("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $e=ae("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mt=ae("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
* @license lucide-vue-next v0.563.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ft=ae("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var Ve=(e=>(e[e.sucesso=200]="sucesso",e[e.erroConhecido=400]="erroConhecido",e[e.erroPermissao=401]="erroPermissao",e[e.erroNaoEncontrado=404]="erroNaoEncontrado",e[e.erroDesconhecido=500]="erroDesconhecido",e[e.tempoEsgotado=504]="tempoEsgotado",e))(Ve||{});const pt=t.defineComponent({name:"EliTabelaCaixaDeBusca",components:{Search:ft},props:{modelo:{type:String,required:!1,default:""}},emits:{buscar(e){return typeof e=="string"}},setup(e,{emit:a}){const d=t.ref(e.modelo??"");t.watch(()=>e.modelo,h=>{h!==void 0&&h!==d.value&&(d.value=h)});function c(){a("buscar",d.value.trim())}return{texto:d,emitirBusca:c}}}),ht={class:"eli-tabela__busca"},bt={class:"eli-tabela__busca-input-wrapper"};function yt(e,a,d,c,h,$){const l=t.resolveComponent("Search");return t.openBlock(),t.createElementBlock("div",ht,[t.createElementVNode("div",bt,[t.withDirectives(t.createElementVNode("input",{id:"eli-tabela-busca","onUpdate:modelValue":a[0]||(a[0]=f=>e.texto=f),type:"search",class:"eli-tabela__busca-input",placeholder:"Digite termos para filtrar",onKeyup:a[1]||(a[1]=t.withKeys((...f)=>e.emitirBusca&&e.emitirBusca(...f),["enter"]))},null,544),[[t.vModelText,e.texto]]),t.createElementVNode("button",{type:"button",class:"eli-tabela__busca-botao","aria-label":"Buscar",title:"Buscar",onClick:a[2]||(a[2]=(...f)=>e.emitirBusca&&e.emitirBusca(...f))},[t.createVNode(l,{class:"eli-tabela__busca-botao-icone",size:16,"stroke-width":2,"aria-hidden":"true"})])])])}const gt=q(pt,[["render",yt],["__scopeId","data-v-0fd1ad15"]]),$t=t.defineComponent({name:"EliTabelaPaginacao",props:{pagina:{type:Number,required:!0},totalPaginas:{type:Number,required:!0},maximoBotoes:{type:Number,required:!1}},emits:{alterar(e){return Number.isFinite(e)}},setup(e,{emit:a}){const d=t.computed(()=>{const r=e.maximoBotoes;return typeof r=="number"&&r>=5?Math.floor(r):7}),c=t.computed(()=>{const r=e.totalPaginas,S=e.pagina,v=d.value,j=[],w=O=>{j.push({label:String(O),pagina:O,ativo:O===S})},A=()=>{j.push({label:"…",ehEllipsis:!0})};if(r<=v){for(let O=1;O<=r;O+=1)w(O);return j}const C=Math.max(3,v-2);let H=Math.max(2,S-Math.floor(C/2)),L=H+C-1;L>=r&&(L=r-1,H=L-C+1),w(1),H>2&&A();for(let O=H;O<=L;O+=1)w(O);return L<r-1&&A(),w(r),j});function h(r){if(!r)return;const S=Math.min(Math.max(1,r),e.totalPaginas);S!==e.pagina&&a("alterar",S)}const $=t.computed(()=>e.pagina<=1),l=t.computed(()=>e.pagina>=e.totalPaginas),f=t.computed(()=>e.pagina),k=t.computed(()=>e.totalPaginas);return{botoes:c,irParaPagina:h,anteriorDesabilitado:$,proximaDesabilitada:l,paginaAtual:f,totalPaginasExibidas:k}}}),Vt={key:0,class:"eli-tabela__paginacao",role:"navigation","aria-label":"Paginação de resultados"},kt=["disabled"],Ct={key:0,class:"eli-tabela__pagina-ellipsis","aria-hidden":"true"},Bt=["disabled","aria-current","aria-label","onClick"],wt=["disabled"];function vt(e,a,d,c,h,$){return e.totalPaginasExibidas>1?(t.openBlock(),t.createElementBlock("nav",Vt,[t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.anteriorDesabilitado,"aria-label":"Página anterior",onClick:a[0]||(a[0]=l=>e.irParaPagina(e.paginaAtual-1))}," << ",8,kt),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.botoes,(l,f)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${l.label}-${f}`},[l.ehEllipsis?(t.openBlock(),t.createElementBlock("span",Ct,t.toDisplayString(l.label),1)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:t.normalizeClass(["eli-tabela__pagina-botao",l.ativo?"eli-tabela__pagina-botao--ativo":void 0]),disabled:l.ativo,"aria-current":l.ativo?"page":void 0,"aria-label":`Ir para página ${l.label}`,onClick:k=>e.irParaPagina(l.pagina)},t.toDisplayString(l.label),11,Bt))],64))),128)),t.createElementVNode("button",{type:"button",class:"eli-tabela__pagina-botao",disabled:e.proximaDesabilitada,"aria-label":"Próxima página",onClick:a[1]||(a[1]=l=>e.irParaPagina(e.paginaAtual+1))}," >> ",8,wt)])):t.createCommentVNode("",!0)}const St=q($t,[["render",vt],["__scopeId","data-v-59d12455"]]),Et=t.defineComponent({name:"EliTabelaCelulaTextoSimples",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}});function Mt(e,a,d,c,h,$){var l;return t.toDisplayString((l=e.dados)==null?void 0:l.texto)}const _t=q(Et,[["render",Mt]]),Dt=t.defineComponent({name:"EliTabelaCelulaNumero",components:{},props:{dados:{type:Object}},data(){return{}},methods:{},setup({dados:e}){return{dados:e}}});function Nt(e,a,d,c,h,$){var l;return t.toDisplayString(String((l=e.dados)==null?void 0:l.numero).replace(".",","))}const Tt={textoSimples:_t,numero:q(Dt,[["render",Nt]])},Pt=t.defineComponent({name:"EliTabelaCelula",props:{celula:{type:Array,required:!0}},setup(e){const a=t.computed(()=>e.celula[0]),d=t.computed(()=>e.celula[1]),c=t.computed(()=>Tt[a.value]),h=t.computed(()=>d.value);return{Componente:c,dadosParaComponente:h}}});function At(e,a,d,c,h,$){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Componente),{dados:e.dadosParaComponente},null,8,["dados"])}const It=q(Pt,[["render",At]]),Ot=t.defineComponent({name:"EliTabela",inheritAttrs:!1,props:{tabela:{type:Object,required:!0}},setup(e){const a=t.ref(!1),d=t.ref(null),c=t.ref([]),h=t.ref(0),$=t.ref([]),l=t.ref(null),f=new Map,k=t.ref(""),r=t.ref(1),S=t.ref(null),v=t.ref("asc"),j=t.computed(()=>!!e.tabela.mostrarCaixaDeBusca),w=t.computed(()=>e.tabela.acoesTabela??[]),A=t.computed(()=>w.value.length>0),C=t.computed(()=>{const o=e.tabela.registros_por_consulta;return typeof o=="number"&&o>0?Math.floor(o):10}),H=t.computed(()=>{const o=C.value;if(!o||o<=0)return 1;const n=h.value;return n?Math.max(1,Math.ceil(n/o)):1});let L=0;function O(o,n){n?f.set(o,n):f.delete(o)}function K(o){return n=>{n instanceof HTMLElement?O(o,n):O(o,null)}}function se(o){o&&(S.value===o?(v.value=v.value==="asc"?"desc":"asc",u()):(S.value=o,v.value="asc",r.value!==1?r.value=1:u()))}function W(o){k.value!==o&&(k.value=o,r.value!==1?r.value=1:u())}function Y(o){const n=Math.min(Math.max(1,o),H.value);n!==r.value&&(r.value=n)}function Q(o){if(l.value===null)return;const n=f.get(l.value);n&&n.contains(o.target)||(l.value=null)}function G(o){return o==="direita"?"eli-tabela__celula--direita":o==="centro"?"eli-tabela__celula--centro":"eli-tabela__celula--esquerda"}function J(o){if(o!=null)return typeof o=="number"?`${o}px`:String(o)}function N(o){if(!Array.isArray(o))return;const n=o[0],s=o[1];if(n==="textoSimples")return typeof(s==null?void 0:s.texto)=="string"?s.texto:void 0;if(n==="numero")return typeof(s==null?void 0:s.numero)=="number"?String(s.numero):void 0}function B(o){return t.h("div",{class:"eli-tabela eli-tabela--erro",role:"alert"},[t.h("div",{class:"eli-tabela__erro-titulo"},"Erro"),t.h("div",{class:"eli-tabela__erro-mensagem"},o)])}function Z(o){return t.h("div",{class:"eli-tabela eli-tabela--vazio"},o??"Nenhum registro encontrado.")}function oe(){return t.h("div",{class:"eli-tabela eli-tabela--carregando","aria-busy":"true"},"Carregando...")}async function u(){var b,p;const o=++L;a.value=!0,d.value=null,$.value=[],l.value=null,f.clear();const n=Math.max(1,C.value),i={offSet:(r.value-1)*n,limit:n};k.value&&(i.texto_busca=k.value),S.value&&(i.coluna_ordem=S.value,i.direcao_ordem=v.value);try{const y=e.tabela,m=await y.consulta(i);if(o!==L)return;if(m.cod!==Ve.sucesso){c.value=[],h.value=0,d.value=m.mensagem;return}const V=((b=m.valor)==null?void 0:b.valores)??[],g=((p=m.valor)==null?void 0:p.quantidade)??V.length;c.value=V,h.value=g;const D=Math.max(1,Math.ceil((g||0)/n));if(r.value>D){r.value=D;return}const M=y.acoesLinha??[];if(!M.length){$.value=[];return}const I=V.map(()=>M.map(P=>P.exibir===void 0?!0:typeof P.exibir=="boolean"?P.exibir:!1));$.value=I;const F=await Promise.all(V.map(async P=>Promise.all(M.map(async _=>{if(_.exibir===void 0)return!0;if(typeof _.exibir=="boolean")return _.exibir;try{const U=_.exibir(P);return!!await Promise.resolve(U)}catch{return!1}}))));o===L&&($.value=F)}catch(y){if(o!==L)return;c.value=[],h.value=0,d.value=y instanceof Error?y.message:"Erro ao carregar dados."}finally{o===L&&(a.value=!1)}}return t.onMounted(()=>{document.addEventListener("click",Q),u()}),t.watch(()=>e.tabela.mostrarCaixaDeBusca,o=>{!o&&k.value&&(k.value="",r.value!==1?r.value=1:u())}),t.watch(r,(o,n)=>{o!==n&&u()}),t.onBeforeUnmount(()=>{document.removeEventListener("click",Q),f.clear()}),t.watch(()=>e.tabela,()=>{l.value=null,f.clear(),S.value=null,v.value="asc",k.value="",r.value!==1?r.value=1:u()}),t.watch(()=>e.tabela.registros_por_consulta,()=>{r.value!==1?r.value=1:u()}),t.watch(c,()=>{l.value=null,f.clear()}),()=>{const o=e.tabela;if(a.value)return oe();if(d.value)return B(d.value);const n=o.colunas,s=o.acoesLinha??[],i=s.length>0;if(!c.value.length)return Z(o.mensagemVazio);const b=n.map(y=>{const m=y.coluna_ordem!==void 0?y.coluna_ordem:void 0,V=!!m,g=V&&S.value===m,D=V?g?t.h(v.value==="asc"?$e:ct,{class:"eli-tabela__th-icone",size:16,strokeWidth:2,"aria-hidden":"true"}):t.h($e,{class:"eli-tabela__th-icone eli-tabela__th-icone--oculto",size:16,strokeWidth:2,"aria-hidden":"true"}):null,M=V?t.h("button",{type:"button",class:["eli-tabela__th-botao",g?"eli-tabela__th-botao--ativo":void 0],onClick:()=>se(m)},[t.h("span",{class:"eli-tabela__th-texto"},y.rotulo),D]):t.h("span",{class:"eli-tabela__th-label"},y.rotulo);return t.h("th",{class:["eli-tabela__th",V?"eli-tabela__th--ordenavel":void 0,G(y.alinhamento)],scope:"col"},M)});i&&b.push(t.h("th",{class:"eli-tabela__th eli-tabela__th--acoes",scope:"col"},"Ações"));const p=[];if(j.value||A.value){const y=w.value.map((m,V)=>t.h("button",{key:`${m.rotulo}-${V}`,type:"button",class:"eli-tabela__acoes-cabecalho-botao",style:m.cor?{backgroundColor:m.cor,color:"#fff"}:void 0,onClick:m.acao},[m.icone?t.h(m.icone,{class:"eli-tabela__acoes-cabecalho-icone",size:16,strokeWidth:2}):null,t.h("span",{class:"eli-tabela__acoes-cabecalho-rotulo"},m.rotulo)]));p.push(t.h("div",{class:"eli-tabela__cabecalho"},[j.value?t.h(gt,{modelo:k.value,onBuscar:W}):null,A.value?t.h("div",{class:"eli-tabela__acoes-cabecalho"},y):null]))}return p.push(t.h("table",{class:"eli-tabela__table"},[t.h("thead",{class:"eli-tabela__thead"},t.h("tr",{class:"eli-tabela__tr eli-tabela__tr--header"},b)),t.h("tbody",{class:"eli-tabela__tbody"},c.value.map((y,m)=>{const V=n.map((g,D)=>(()=>{const M=g.celula(y),I=!!g.truncar,F=I?N(M):void 0,P=t.h(It,{celula:M}),_=I?t.h("span",{class:"eli-tabela__celula-conteudo",style:g.largura_maxima?{maxWidth:J(g.largura_maxima)}:void 0,title:F},P):P;return t.h("td",{class:["eli-tabela__td",g.acao?"eli-tabela__td--clicavel":void 0,G(g.alinhamento)],key:`${m}-${D}`,onClick:g.acao?()=>{var U;return(U=g.acao)==null?void 0:U.call(g)}:void 0},_)})());if(i){const g=$.value[m]??[],D=s.map((T,ne)=>{const de=T.exibir===void 0?!0:typeof T.exibir=="boolean"?T.exibir:!1;return{acao:T,indice:ne,visivel:g[ne]??de}}).filter(T=>T.visivel),M=D.length>0;!M&&l.value===m&&(l.value=null);const I=l.value===m,F=`eli-tabela-acoes-toggle-${m}`,P=`eli-tabela-acoes-menu-${m}`,_=t.h("button",{id:F,class:"eli-tabela__acoes-toggle",type:"button",disabled:!M,onClick:T=>{T.stopPropagation(),M&&(l.value=I?null:m)},"aria-haspopup":"menu","aria-expanded":I?"true":"false","aria-controls":M?P:void 0,"aria-label":M?"Ações da linha":"Nenhuma ação disponível",title:M?"Ações":"Nenhuma ação disponível"},[t.h(mt,{class:"eli-tabela__acoes-toggle-icone",size:18,strokeWidth:2})]),U=I&&M?t.h("ul",{id:P,class:"eli-tabela__acoes-menu",role:"menu","aria-labelledby":F},D.map(({acao:T,indice:ne})=>t.h("li",{key:`acao-${ne}`,class:"eli-tabela__acoes-item",role:"none"},t.h("button",{type:"button",class:"eli-tabela__acoes-item-botao",style:{color:T.cor},onClick:de=>{de.stopPropagation(),l.value=null,T.acao(y)},role:"menuitem","aria-label":T.rotulo,title:T.rotulo},[t.h(T.icone,{class:"eli-tabela__acoes-item-icone",size:16,strokeWidth:2}),t.h("span",{class:"eli-tabela__acoes-item-texto"},T.rotulo)])))):null,R=["eli-tabela__acoes-container"];I&&R.push("eli-tabela__acoes-container--aberto"),V.push(t.h("td",{class:["eli-tabela__td","eli-tabela__td--acoes"],key:`${m}-acoes`},t.h("div",{class:R,ref:K(m)},[_,U])))}return t.h("tr",{class:["eli-tabela__tr",m%2===1?"eli-tabela__tr--zebra":void 0],key:m},V)}))])),H.value>1&&h.value>0&&p.push(t.h(St,{pagina:r.value,totalPaginas:H.value,maximoBotoes:e.tabela.maximo_botoes_paginacao,onAlterar:y=>{Y(y)}})),t.h("div",{class:"eli-tabela"},p)}}});function Ut(e,a,d,c,h,$){return t.openBlock(),t.createElementBlock("div")}const ke=q(Ot,[["render",Ut],["__scopeId","data-v-cfac9b47"]]),jt={install(e){e.component("EliOlaMundo",fe),e.component("EliBotao",re),e.component("EliBadge",x),e.component("EliInput",ie),e.component("EliCartao",pe),e.component("EliDataHora",be),e.component("EliTabela",ke)}};E.EliBadge=x,E.EliBotao=re,E.EliCartao=pe,E.EliDataHora=be,E.EliInput=ie,E.EliOlaMundo=fe,E.EliTabela=ke,E.default=jt,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));