jclib-ui 1.1.6 → 1.1.8

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.
@@ -968,5 +968,5 @@ function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;
968
968
  }
969
969
  `,uo=o.hr`
970
970
  margin: 4px 12px;
971
- `;function co({opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:o,enabledFavorite:i}){var a;const{versionApp:s}=S();if((null==(a=e.menus)?void 0:a.length)>0)return b.jsxs(b.Fragment,{children:[b.jsxs(so,{onClick:()=>n(e),isOpen:e.open,children:[b.jsx("span",{className:"opc",style:{color:e.isFavorite?"var(--nav-icon-sair)":"var(--bs-body-color) !important"},children:e.caption}),b.jsx("span",{className:"icon",children:b.jsx("i",{className:"fa-solid fa-chevron-down"})})]}),b.jsx("div",{className:"opt-group "+(e.open?"opt--open":"opt--close"),children:e.menus.map((e,a)=>b.jsx(co,{opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:o,enabledFavorite:i},a))})]});if(e.route){let n=o(e.route),a=null==e?void 0:e.version;return a&&(a=Boolean(s.substring(0,a.length)===a)),b.jsxs(lo,{to:e.route,onClick:t,children:[b.jsx("span",{className:"menu-icon",children:e.icon}),b.jsx("span",{className:"menu-caption",children:e.caption}),b.jsxs("span",{className:"menu-fav-new",children:[a&&b.jsx("span",{className:"menu-new",children:"novo"}),i&&b.jsx("span",{className:"menu-fav",onClick:t=>r(t,e),children:b.jsx("i",{title:"Clique para favoritar esta opção",className:"fa-"+(n?"solid":"regular")+" fa-heart",style:{color:n?"var(--nav-icon)":"var(--nav-icon-fav)"}})})]})]})}return(null==e?void 0:e.isLine)?b.jsx(uo,{}):null}const po="sys/nav/closed";const ho=({routes:e,closeMenu:t,brand:n})=>b.jsx("div",{className:"navbar-mu--brand",children:b.jsx(a.Link,{to:e.home,onClick:t,className:"brand",title:"Voltar para tela inicial",children:n})});function fo({isOpen:e,setIsOpen:t,menuClose:n}){return b.jsx("button",{className:"btn-menu",title:"Abrir menu de opções",onClick:()=>t(!e),children:n?b.jsx("i",{className:"fa-solid fa-xmark icon-close"}):b.jsxs("div",{className:"icon-desk",children:[b.jsx("span",{}),b.jsx("span",{}),b.jsx("span",{})]})})}const mo="sys/nav/closed";e.Alerta=F,e.Aviso=function({onConfirm:e,text:t="",children:n}){return b.jsx(I,{type:N,title:"Aviso!",text:t,onConfirm:e,children:n})},e.BotaoClonar=function({title:e="Clonar o registro"}){return b.jsx(i.Button,{size:"sm",color:"warning",title:e,children:b.jsx(H,{})})},e.BotaoEditar=function({title:e="Alterar o registro"}){return b.jsx(i.Button,{size:"sm",color:"primary",title:e,children:b.jsx(K,{})})},e.BotaoExcluir=function({title:e="Excluir o registro"}){return b.jsx(i.Button,{size:"sm",color:"danger",title:e,children:b.jsx(X,{})})},e.BotaoIncluir=function({caption:e="Incluir",onClick:t,...n}){return b.jsxs(i.Button,{color:"success",title:"Incluir um novo registro",onClick:t,...n,children:[b.jsx(Y,{})," ",e]})},e.BotaoSalvar=function({loading:e,saveInfo:t,link:n,fixed:r,modalFixed:o,btnSaveDisabled:s,onCancel:l,onConfirm:u}){const c=a.useHistory();return b.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(r),"data-modal-fixed":Boolean(o),children:[b.jsxs(i.Button,{type:u?"button":"submit",color:"primary",onClick:u,disabled:s&&1==s,children:[b.jsx("i",{className:"fas fa-cloud-upload-alt"}),e||(null==t?void 0:t.loading)?"Salvando...":"Salvar"]}),b.jsxs(i.Button,{type:"button",color:"outline-danger",onClick:()=>{l?l():n?c.push(n):c.goBack()},children:[b.jsx("i",{className:"fas fa-times"}),"Cancelar"]})]})},e.BoxColor=function({corFonte:e,setCorFonte:t,corFundo:n,setCorFundo:r}){return b.jsxs("div",{className:"box-color--container",children:[b.jsx(ne,{label:"Cor da fonte",value:e,onChange:e=>t(e.target.value)}),b.jsx(ne,{label:"Cor de fundo",value:n,onChange:e=>r(e.target.value)}),b.jsx("div",{className:"box-color-texto",style:{color:e,backgroundColor:n},children:"Texto de exemplo"})]})},e.BoxInfo=function({id:e,title:n,isOpen:r=!1,isVisible:o=!0,onChange:i,noMargin:a,children:s,...l}){const[u,c]=t.useState(r);return t.useEffect(()=>{e&&i&&i(e,u)},[u]),o?b.jsxs(re,{open:u,noMargin:a,...l,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>c(!u),children:[n," ",b.jsx("i",{className:"fas fa-chevron-down setas-bi"})]})}),b.jsx("div",{className:`bi-body ${u&&"bi-open"}`,children:s})]}):null},e.BoxSearch=kn,e.ButtonBack=se,e.ButtonClose=ie,e.ButtonHelp=ae,e.ButtonOptions=function({value:e,setValue:t,options:n=[],...r}){return b.jsx("div",{className:"btn-opts--container btn-group",...r,children:n.map((n,r)=>b.jsx(i.Button,{active:r===e,color:"outline-info",onClick:()=>t(r),children:n},r))})},e.ButtonTop=function({smooth:e,center:n}){const[r,o]=t.useState(!1);function i(){var e;o((null==(e=document.querySelector("main"))?void 0:e.scrollTop)>0)}return t.useEffect(()=>{var e;return null==(e=document.querySelector("main"))||e.addEventListener("scroll",i),()=>{var e;null==(e=document.querySelector("main"))||e.removeEventListener("scroll",i)}},[]),b.jsx(b.Fragment,{children:r&&b.jsx(le,{title:"Ir para o início da tela",visible:i,onClick:function(){var t;null==(t=document.querySelector("main"))||t.scrollTo({top:0,left:0,behavior:e?"smooth":"instant"}),o(!1)},className:"pulsate-bck",center:n,children:b.jsx("i",{className:"fa-solid fa-arrow-up"})})})},e.CheckBox=function({enabled:e=!0,onChange:t,children:n,...r}){const o=r.disabled||!e;return b.jsx(Le,{disabled:o,children:b.jsxs("label",{children:[b.jsx(i.Input,{type:"checkbox",disabled:o,onChange:e=>{if(t){let n={...e,target:{...e.target,name:e.target.name,value:e.target.checked}};t(n)}},checked:"boolean"==typeof r.value?r.value:r.checked,...r}),b.jsx("span",{children:n})]})})},e.CheckUpdates=function(){const e=t.useRef();function n(t){var n,r;(null==e?void 0:e.current)&&(t?null==(n=e.current)||n.classList.add("update-show"):null==(r=e.current)||r.classList.remove("update-show"))}return t.useLayoutEffect(()=>{"serviceWorker"in navigator&&window.location.origin.startsWith("http")&&navigator.serviceWorker.getRegistration().then(e=>{e&&(e.addEventListener("updatefound",()=>{n(!0);const t=e.installing;t.addEventListener("statechange",()=>{"installed"==t.state&&setTimeout(()=>window.location.reload(!0),1e3),"activated"==t.state&&n(!1)})}),e.update())}).catch(e=>{console.error("=> Service Worker não encontrado:",e)})},[]),b.jsx("div",{className:"update-check-box",onClick:function(){n(!1)},children:b.jsxs("div",{ref:e,className:"update-box",children:[b.jsx("div",{className:"update-line"}),b.jsx("div",{className:"spinner-border text-warning w-22",role:"status",children:b.jsx("span",{className:"visually-hidden",children:"Carregando..."})}),"Nova versão disponível, atualizando..."]})})},e.ClipboardArea=function({title:e,url:n,timerInMilliSeconds:r=5e3}){const[o,i]=t.useState(!1);return t.useEffect(()=>()=>{ue&&clearTimeout(ue)},[]),b.jsxs("div",{className:`clipboard-area--container ${o&&" clip-active"}`,children:[b.jsx("a",{href:n,target:"_blank",rel:"noreferrer",title:"Abrir este link",children:e||n}),b.jsx("button",{type:"button",className:"clip-mark",onClick:function(){navigator.clipboard.writeText(n),i(!0),ue=setTimeout(()=>i(!1),r)},children:o?b.jsxs(b.Fragment,{children:[b.jsx("i",{className:"fas fa-clipboard-check"}),"Copiado"]}):b.jsxs(b.Fragment,{children:[b.jsx("i",{className:"fas fa-clipboard"}),"Copiar"]})})]})},e.Confirma=function({onConfirm:e,onCancel:t,text:n="",children:r,defaultBtn:o}){return b.jsx(I,{type:A,title:"Confirmação!",text:n,onConfirm:e,onCancel:t,defaultBtn:o,children:r})},e.DataItem=function({caption:e,colored:t,isForm:n=!1,children:r,className:o,minHeight:i=40,...a}){return b.jsxs("div",{className:"di-box "+(o||""),...a,style:{minHeight:i},children:[e&&b.jsx("label",{style:{fontWeight:n?"bold":"normal"},children:e}),n?b.jsx("input",{className:"form-control",value:r,readOnly:!0}):b.jsx("div",{style:{color:t?"var(--data-item-destaque)":"var(--body-color)"},className:"fw-bold",children:r})]})},e.DropDownButton=M,e.DynamicCounter=function({valor:e=0,time:r=25,format:o,currency:i}){const[a,s]=t.useState(0);return t.useEffect(()=>{const t=setInterval(()=>{const n=Math.ceil(e/10)+1;s(r=>{let o=r+n;return o>e&&(o=e),o===e&&clearInterval(t),o})},r);return()=>clearInterval(t)},[e,r]),o?n.formatValor(a,i?2:0,Boolean(i)):a},e.FormDesk=function({children:e,labelWidth:t=100,sizeBreak:n=767,lineShortWidth:r=250,gap:o="8px",...i}){return b.jsx(Gr,{style:{"--form-desk-label-width":`${t}px`,"--form-desk-line-short-width":`${r}px`,"--form-desk-gap":o},sizeBreak:n,...i,children:e})},e.FormDeskGrid=function({grid:e,gap:t=25,className:n="",children:r,...o}){return b.jsx("div",{className:`form-desk--grid ${n}`,style:{gridTemplateColumns:e,gap:t},...o,children:r})},e.FormDeskLine=function({children:e,label:t="",isShort:n=!1,className:r="",classNameLabel:o="",classNameCol:i="",extraComp:a,inpWidth:s,...l}){const u={};return s&&(u["--form-desk-line-short-width"]=s),b.jsxs("div",{className:`form-desk-line ${r}`,"data-has-extra-comp":a?"true":"false",...l,style:{...l.styles,...u},children:[b.jsx("label",{className:`form-desk-label ${o}`,children:t}),b.jsx("div",{className:i,"data-is-line-short":String(n),children:e}),a&&b.jsx("div",{className:"my-auto",children:a})]})},e.FormEdit=function({title:e,count:n,codigo:r,maxWidth:o=1200,goBack:i,goHome:a,onClose:s,helpLink:l,children:u}){return t.useEffect(()=>{var e;null==(e=document.querySelector("main"))||e.scrollTo(0,0)},[]),b.jsx("div",{className:"mx-auto",style:{maxWidth:o},children:b.jsx(ge,{title:e,count:n,codigo:r,goBack:i,goHome:a,onClose:s,helpLink:l,children:u})})},e.FormEnter=function({children:e}){const n=t.useRef(),r=(e,t)=>{let n=e[t];for(;t<e.length-1&&(n=e[++t],n.disabled););return n};return b.jsx("form",{onSubmit:function(e){e.preventDefault()},ref:n,onKeyDown:function(e){var t,o;if("Enter"===e.key){const i=null==(t=null==n?void 0:n.current)?void 0:t.querySelector(".form-item:focus,.btn-primary"),a=null==(o=null==n?void 0:n.current)?void 0:o.querySelectorAll(".form-item,.btn-primary");for(let t=0;t<a.length;t++)if(a[t]===i&&t<a.length-1){e.preventDefault();const n=r(a,t);(null==n?void 0:n.select)&&n.select(),n.focus()}}},children:e})},e.FormatData=({value:e="",incHour:t=!0})=>{let n="";if(e){let r,o;-1!==e.indexOf("T")?(r=e.split("T"),o=r[1],r=r[0]):(r=e.split(" "),r.length>1&&(o=r[1]),r=r[0]),-1!==r.indexOf("-")&&(r=r.split("-").reverse().join("/")),o&&t&&(r=r+" "+o),n=r}return n},e.FormatPercent=({value:e=0,decimalScale:t=2,...n})=>b.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ve(e))+"%"}),e.FormatQuant=({value:e=0,decimalScale:t=2,...n})=>b.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ve(e))}),e.FormatValor=({value:e=0,money:t=!0,decimalScale:n=2,...r})=>b.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:n,minimumFractionDigits:n,style:t?"currency":"decimal",currency:"BRL"}).format(Ve(e))}),e.GroupBox=function({label:e,className:t="",children:n}){return b.jsxs("div",{className:`group-box--container ${t}`,children:[b.jsx("div",{className:"group-box--label",children:e}),b.jsx("div",{className:"group-box--body",children:n})]})},e.Hint=function({title:e="Ajuda",children:t}){return b.jsxs("div",{className:"hint--container",children:[b.jsx("i",{className:"fas fa-question"}),b.jsxs("div",{className:"hint-content",children:[b.jsx("div",{className:"title",children:e}),t]})]})},e.IconClose=de,e.IconExitOutline=function(e){return b.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",...e,children:b.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 00-40-40H88a40 40 0 00-40 40v240a40 40 0 0040 40h192a40 40 0 0040-40v-40M384 176l80 80-80 80M191 256h273"})})},e.IconMenu=pe,e.IconUserGear=function(e){return b.jsx("svg",{viewBox:"0 0 640 512",fill:"currentColor",height:"1em",width:"1em",...e,children:b.jsx("path",{d:"M224 256c-70.7 0-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128-57.3 128-128 128zm-45.7 48h91.4c11.8 0 23.4 1.2 34.5 3.3-2.1 18.5 7.4 35.6 21.8 44.8-16.6 10.6-26.7 31.6-20 53.3 4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3 0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8 10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4 7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1.7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4L546.3 442c-6.9 5.1-14.3 9.4-22.3 12.8v30.6c0 7-4.5 13.3-11.3 14.8-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8v-30.6c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3.7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2 3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9v-30.4zm92.1 133.5c0-26.5-21.5-48-48.1-48s-48.1 21.5-48.1 48 21.5 48 48.1 48 48.1-21.5 48.1-48z"})})},e.IconeChevron=()=>b.jsx("i",{className:"fas fa-chevron-down"}),e.IconeClonar=()=>b.jsx("i",{className:"fa-solid fa-copy"}),e.IconeConfig=()=>b.jsx("i",{className:"fas fa-cogs"}),e.IconeEditar=K,e.IconeEmail=()=>b.jsx("i",{className:"fas fa-envelope"}),e.IconeEncerrarAno=()=>b.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M8.875 17.375C7.43258 17.375 6.10606 17.0466 4.89545 16.3898C3.68485 15.733 2.69318 14.8572 1.92045 13.7625V15.8295H0.375V11.1932H5.01136V12.7386H3.09886C3.71705 13.6659 4.53176 14.4129 5.543 14.9795C6.55373 15.5462 7.66439 15.8295 8.875 15.8295C9.84091 15.8295 10.7458 15.6462 11.5896 15.2794C12.4329 14.9121 13.167 14.416 13.7919 13.7911C14.4162 13.1667 14.9121 12.4326 15.2794 11.5888C15.6462 10.7455 15.8295 9.84091 15.8295 8.875H17.375C17.375 10.047 17.153 11.1481 16.7089 12.1784C16.2643 13.2087 15.6557 14.1102 14.883 14.883C14.1102 15.6557 13.2087 16.2641 12.1784 16.7081C11.1481 17.1527 10.047 17.375 8.875 17.375ZM8.17955 14.2841V13.2795C7.57424 13.1379 7.08176 12.8772 6.70209 12.4975C6.32191 12.1174 6.04167 11.6182 5.86136 11L7.13636 10.4977C7.29091 11.0258 7.53251 11.4217 7.86118 11.6854C8.18933 11.9497 8.56591 12.0818 8.99091 12.0818C9.41591 12.0818 9.77961 11.9819 10.082 11.782C10.3849 11.5826 10.5364 11.2705 10.5364 10.8455C10.5364 10.472 10.3787 10.1693 10.0635 9.9375C9.74767 9.70568 9.18409 9.44167 8.37273 9.14545C7.61288 8.875 7.056 8.55303 6.70209 8.17955C6.34767 7.80606 6.17045 7.31667 6.17045 6.71136C6.17045 6.18333 6.35411 5.70347 6.72141 5.27177C7.0882 4.84059 7.58712 4.56061 8.21818 4.43182V3.46591H9.57045V4.43182C10.0341 4.47045 10.456 4.6572 10.8362 4.99205C11.2158 5.32689 11.4765 5.7197 11.6182 6.17045L10.3818 6.67273C10.2788 6.37651 10.1114 6.12873 9.87955 5.92936C9.64773 5.72948 9.32576 5.62955 8.91364 5.62955C8.46288 5.62955 8.1185 5.72614 7.8805 5.91932C7.64198 6.1125 7.52273 6.37651 7.52273 6.71136C7.52273 7.04621 7.67083 7.31023 7.96705 7.50341C8.26326 7.69659 8.79773 7.92197 9.57045 8.17955C10.4977 8.51439 11.1159 8.9072 11.425 9.35795C11.7341 9.80871 11.8886 10.3045 11.8886 10.8455C11.8886 11.2189 11.8242 11.5473 11.6955 11.8307C11.5667 12.114 11.3962 12.3554 11.1839 12.5547C10.9712 12.7546 10.7231 12.9156 10.4398 13.0377C10.1564 13.1603 9.85379 13.2538 9.53182 13.3182V14.2841H8.17955ZM0.375 8.875C0.375 7.70303 0.597288 6.60189 1.04186 5.57159C1.48592 4.54129 2.09432 3.63977 2.86705 2.86705C3.63977 2.09432 4.54129 1.48567 5.57159 1.04109C6.60189 0.59703 7.70303 0.375 8.875 0.375C10.3174 0.375 11.6439 0.703409 12.8545 1.36023C14.0652 2.01705 15.0568 2.8928 15.8295 3.9875V1.92045H17.375V6.55682H12.7386V5.01136H14.6511C14.033 4.08409 13.2182 3.33712 12.207 2.77045C11.1963 2.20379 10.0856 1.92045 8.875 1.92045C7.90909 1.92045 7.00448 2.10385 6.16118 2.47064C5.31736 2.83794 4.58327 3.33377 3.95891 3.95814C3.33403 4.58301 2.83794 5.31711 2.47064 6.16041C2.10385 7.00423 1.92045 7.90909 1.92045 8.875H0.375Z",fill:"currentColor"})}),e.IconeExcluir=X,e.IconeFechar=Z,e.IconeFecharCircle=()=>b.jsx("i",{className:"fas fa-times-circle"}),e.IconeHelp=Q,e.IconeIncluir=Y,e.IconeLogin=()=>b.jsx("i",{className:"fas fa-sign-in-alt"}),e.IconeLogout=G,e.IconeMostrarSenha=({display:e})=>b.jsx("i",{className:"fas fa-eye"+(e?"-slash":"")}),e.IconeOpenLink=ee,e.IconePassword=()=>b.jsx("i",{className:"fas fa-key"}),e.IconePin=()=>b.jsx("i",{className:"fas fa-map-marker-alt"}),e.IconePrint=()=>b.jsx("i",{className:"fas fa-print"}),e.IconeQRCode=te,e.IconeSalvar=()=>b.jsx("i",{className:"fas fa-cloud-upload-alt"}),e.IconeSearchPlus=()=>b.jsx("i",{className:"fas fa-search-plus"}),e.IconeSoma=()=>b.jsx("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M0.898056 12.1914V10.6914L5.77306 6.19141L0.898056 1.69141V0.191406H9.89806V2.44141H4.47931L8.51056 6.19141L4.47931 9.94141H9.89806V12.1914H0.898056Z",fill:"currentColor"})}),e.IconeUsers=()=>b.jsx("i",{className:"fas fa-user-cog"}),e.IconeVisualizar=J,e.Input=function({autoSelect:e,...t}){function n(n){t.onClick?t.onClick(n):e&&n.currentTarget.select()}switch(t.type){case"cpf":return b.jsx(vn,{onClick:n,...t});case"cnpj":return b.jsx(cn,{onClick:n,...t});case"codigo":return b.jsx(mn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"fone":return b.jsx(qe,{name:t.name,onChange:t.onChange,value:t.value,onClick:n,...t});case"uf":return b.jsx(bn,{onClick:n,...t});case"hora":return b.jsx(gn,{onClick:n,...t});case"percent":return b.jsx(fn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"quant":return b.jsx(hn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"real":return b.jsx(pn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"finder":return b.jsx(_n,{onClick:n,...t});default:return b.jsx("input",{className:"form-control",onClick:n,...t})}},e.InputBox=function({children:e}){return b.jsx("div",{className:"jclib-ui-input-box",children:e})},e.InputCep=function({dados:e,setDados:n,onSearch:r,disabled:o,autoFocus:i,...a}){const[s,l]=t.useState(!1),u=async t=>{l(!0);const o=await(async(e,t)=>{let n={erro:!0,mensagem:"CEP deve ter 8 dígitos!"};if((e=e.replace(/\D+/g,""))&&8===e.length){const r=`https://viacep.com.br/ws/${e}/json`;try{n=await(await fetch(r,{mode:"cors"})).json()}catch{n={erro:!0,mensagem:"Não foi possível pesquisar este CEP!"}}finally{t&&t(n)}}return n})(t,r);!o.erro&&e&&n&&n({...e,ende:o.logradouro,bairro:o.bairro,cida:o.localidade,uf:o.uf}),l(!1)};return b.jsxs(b.Fragment,{children:[b.jsx(Ue,{visible:s,message:"Buscando CEP..."}),b.jsxs("div",{className:"input-group",children:[b.jsx(c,{format:"##.###-###",mask:"_",value:a.value,className:"form-control",onValueChange:e=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(e,a.name,a.onChange),disabled:o,autoFocus:i}),b.jsx("button",{type:"button",className:"btn btn-info",onClick:()=>u(a.value),disabled:o,children:b.jsx("i",{className:"fas fa-search"})})]})]})},e.InputCheckBox=({disabled:e,children:t,name:n,checked:r,onChange:o})=>b.jsx(jn,{children:b.jsxs(wn,{disabled:e,onClick:function(){if(!e&&o){o({target:{name:n,checked:!r}})}},children:[b.jsxs("span",{children:[r&&b.jsx(z,{color:e&&"silver"}),!r&&b.jsx($,{color:e&&"silver"})]})," ",t]})}),e.InputCnpj=cn,e.InputCodigo=mn,e.InputColor=ne,e.InputCpf=vn,e.InputCpfCnpj=function({onChange:e,value:t,name:n,className:r,...o}){return b.jsx(ln,{className:`form-control ${Ye(t)?"is-invalid":""} ${r||""}`,mask:un,onAccept:function(t,r,o){o&&e({target:{name:n,value:t.toUpperCase()}})},value:t,name:n,...o})},e.InputEstado=bn,e.InputFinder=({title:e,onFind:t,children:n,...r})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...r,children:[b.jsxs("option",{value:0,children:["- ",e," -"]}),n]}),b.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:t,children:b.jsx(q,{})})]}),e.InputFone=qe,e.InputHora=gn,e.InputOff=function({campo:e,dados:n,setDados:r,type:o,className:i,disabled:a,...s}){const l=t.useMemo(()=>`${e}_${Math.random().toString(36).slice(2,8)}`,[e]),[u,c]=t.useState(!0),[d,p]=t.useState(!1),h="password"==o;return t.useEffect(()=>{p(!1)},[a]),b.jsxs("div",{className:"input-off",children:[b.jsx("input",{className:`form-control ${i} ${h&&!d?"input-off-senha":""}`,type:"text",name:l,value:n[e]??"",onChange:t=>r({...n,[e]:t.target.value}),autoComplete:"off",onFocus:()=>c(!1),readOnly:u,disabled:a,...s}),"password"==o&&b.jsx("div",{className:"icone "+(a?"disabled":""),onClick:()=>{a||p(!d)},children:d?b.jsx("i",{className:"fa-solid fa-eye-slash"}):b.jsx("i",{className:"fa-solid fa-eye"})})]})},e.InputPassword=function({disabled:e,autoSelect:n,...r}){const[o,i]=t.useState(!1);return b.jsxs(Cn,{disabled:e,children:[b.jsx("input",{type:o?"text":"password",disabled:e,onClick:function(e){r.onClick?r.onClick(e):n&&e.currentTarget.select()},...r}),b.jsx("i",{className:o?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{e||i(!o)},title:e?"":(o?"Ocultar":"Exibir")+" a senha"})]})},e.InputPercent=fn,e.InputPesquisa=Ae,e.InputQRCode=function({value:e,setValue:n}){const[r,o]=t.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"input-group",children:[b.jsx(i.Input,{disabled:!0,placeholder:"Link para o documento de pagamento",title:"Link para o documento de pagamento",value:e}),b.jsx(i.Button,{color:"outline-secondary",title:"Limpar o campo",onClick:()=>n(""),children:b.jsx(W,{})}),b.jsx(i.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>o(!0),children:b.jsx(te,{})}),e?b.jsx(ye,{className:"btn btn-info",title:"Abrir o link do documento",to:e,children:b.jsx(ee,{})}):b.jsx(i.Button,{color:"info",disabled:!0,children:b.jsx(ee,{})})]}),r&&b.jsx(Pe,{setVisible:o,title:"Ler QRCode do documento",onResult:e=>n(null==e?void 0:e.text)})]})},e.InputQuant=hn,e.InputSearch=({title:e="Selecione",options:t=[],fields:n=[],btnClick:r=null,...o})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...o,children:[b.jsxs("option",{value:0,children:["- ",e," -"]}),null==t?void 0:t.map((e,t)=>b.jsx("option",{value:e[n[0]],children:e[n[1]]},t))]}),b.jsx("button",{type:"button",className:"btn btn-info",title:"Abrir tela de pesquisa",onClick:r,children:b.jsx(q,{})})]}),e.InputValor=pn,e.LabelHint=function({label:e,hint:t}){return b.jsxs("div",{className:"label-hint--container",children:[b.jsx("label",{children:e}),b.jsx("div",{className:"label-hint--icon",children:b.jsx("i",{className:"fas fa-question"})}),b.jsxs("div",{className:"label-hint--box",children:[b.jsx("div",{className:"label-hint--box-title",children:"Ajuda"}),t]})]})},e.LibProvider=({apiConfig:e,children:r,versionApp:o,useTheme:i,testDomain:a})=>{const s="boolean"==typeof i&&i,[l,u]=t.useState(()=>{let e="";if(s){let t=localStorage.getItem(w);e=t||(n.isDarkMode()?"dark":"light")}return e}),[c,d]=oo("sys/reportType",0),[p,h]=t.useState([]),[f,m]=t.useState(!1),g=e=>{let t=p.find(t=>t.modalId===e);t&&t.setVisible(!1),h(t=>t.filter(t=>t.modalId!==e))},v=t.useCallback(e=>{"Escape"===e.key&&0!=p.length&&g(p[p.length-1].modalId)},[p]);_();const x=C(a);return t.useEffect(()=>{s&&(localStorage.setItem(w,l),document.body.dataset.bsTheme="dark"==l?l:"")},[l,s]),t.useEffect(()=>(window.addEventListener("keydown",v,!1),()=>window.removeEventListener("keydown",v,!1)),[p]),b.jsxs(j.Provider,{value:{versionApp:o,addModal:(e,t)=>{h(n=>{let r=[...n],o=r.findIndex(t=>t.modalId===e);return o>=0?r[o]={modalId:e,setVisible:t}:r.push({modalId:e,setVisible:t}),r})},removeModal:g,clearModals:()=>{p.forEach(e=>{g(e.modalId)})},showBtnTop:f,setShowBtnTop:m,globalApiConfig:e,theme:l,setTheme:u,toggleTheme:()=>u("dark"==l?"light":"dark"),canChangeTheme:s,reportType:c,setReportType:d},children:[x,r]})},e.LinkToEmail=xe,e.LinkToFone=function({href:e,children:t,...n}){const r=String(e||t);let o="+";return(null==r?void 0:r.startsWith("+"))||(o="+55"),o+=r.replace(/\D/g,""),b.jsx("a",{href:`tel:${o}`,title:"Ligar para este número",...n,children:t||e})},e.LinkToMaps=function({href:e,children:t,...n}){let r=`https://google.com/maps/place/${null==e?void 0:e.replace(" ","+")}`;return(null==e?void 0:e.includes("/maps/place/"))&&(null==e?void 0:e.startsWith("https"))&&(r=e),b.jsx("a",{href:r,target:"_blank",rel:"noreferrer",title:"Localizar este endereço",...n,children:t})},e.LinkToNewPage=ye,e.LinkToWhatsApp=be,e.Loading=Ue,e.LoadingReport=function({url:e,file:t,fileTo:n,loading:r=!0,setLoading:o}){if(!r)return null;let[,i]=t.split("."),[a,s]=n.split(".");return s!=i&&(n=[a,i].join(".")),b.jsx(Ne,{url:e,file:t,fileTo:n,setLoading:o})},e.Modal=Fe,e.ModalBody=De,e.ModalBox=function({visible:e,setVisible:t,codigo:n,title:r,children:o,alignTop:i,paddingBottom:a=10,helpLink:s,count:l,...u}){return e?b.jsxs(Fe,{alignTop:i,setVisible:t,visible:e,...u,children:[b.jsxs(Re,{helpLink:s,setVisible:t,children:[r,null!=l&&b.jsxs(b.Fragment,{children:[" ",b.jsx(fe,{value:l,isCount:!0})]}),b.jsx(fe,{value:n})]}),b.jsx(Oe,{children:b.jsx(De,{style:{paddingBottom:a},children:o})})]}):null},e.ModalContent=Oe,e.ModalFilter=function({title:e="Filtros",setVisible:t,maxWidth:n,fnApplyFilter:r,children:o,alignTop:a,helpLink:s}){return b.jsxs(Fe,{alignTop:a,maxWidth:n,setVisible:t,visible:!0,children:[b.jsx(Re,{helpLink:s,setVisible:t,children:e}),b.jsx(Oe,{children:b.jsxs(De,{className:"mod-filter--container",children:[o,b.jsxs("div",{className:"mod-filter--btn-area",children:[b.jsxs(i.Button,{block:!0,color:"primary",onClick:()=>{r&&r(!0)},children:[b.jsx(U,{})," Aplicar filtros"]}),b.jsxs(i.Button,{block:!0,color:"outline-danger",onClick:()=>{r&&r(!1)},children:[b.jsx(Z,{})," Cancelar filtros"]})]})]})})]})},e.ModalFooter=function({className:e="",backgroundColor:t="",...n}){return b.jsx("div",{className:`modal--footer ${e}`,style:{backgroundColor:t},...n})},e.ModalHeader=Re,e.Navbar=function({menusConfig:{brand:e,company:r,menus:o,routes:i,user:s,validatePermis:l},helpLink:u}){const c=a.useHistory(),d=t.useRef(),p=t.useRef(),{theme:h,setTheme:f,canChangeTheme:m}=S(),[g,v]=t.useState(!1),[x,y]=t.useState(""),[k,_]=t.useState([]),[C,j]=t.useState([]);let w=[];const E=localStorage.getItem(po);E&&(w=JSON.parse(E));const[N]=Se({url:i.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):j(e.data)}}),[A]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function T(){v(!1)}function I(e){let t=[...k],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(po,JSON.stringify(n)),_(t)}function F(e){let t=[...k];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),_(t),I(null)}function D(e,t){e.stopPropagation(),e.preventDefault();const n=C.filter(e=>e.route!==t.route);var r;n.length===C.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,i.apiFavorites&&(A({data:r}),j(r))}function O(e){return C.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&N()},[]),t.useEffect(()=>{let e=[];null==C||C.forEach(t=>{o.forEach((n,r)=>{var o;if(r>0&&0!==(null==(o=null==n?void 0:n.menus)?void 0:o.length)){let o=n.menus.findIndex(e=>e.route===t.route);if(o>=0){let i=n.menus[o];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(o).padStart(2,0)})}}})}),"Favoritos"===o[0].caption&&(o[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),_(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!w.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(x.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(x.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),x&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(o))},[x,C]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==d?void 0:d.current)||e.focus(),null==(t=null==d?void 0:d.current)||t.select())},[g]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"navbar--area",children:b.jsxs("div",{className:"navbar-content",children:[b.jsx("button",{className:"btn-menu"+(g?" opened":""),title:"Abrir menu de opções",onClick:()=>v(!g),children:g?b.jsx(de,{width:20,height:20}):b.jsx(pe,{width:20,height:20})}),b.jsxs("div",{className:"content",children:[b.jsx(a.Link,{to:i.home,className:"brand",onClick:T,title:"Voltar para tela inicial",children:e}),b.jsxs("div",{className:"company",children:[b.jsx("div",{className:"name",children:r}),b.jsxs("div",{className:"doc",children:[b.jsxs("span",{children:[null==s?void 0:s.title," "]}),b.jsx("strong",{children:null==s?void 0:s.name})]})]}),b.jsxs("div",{className:"nav-btn-area",children:[b.jsx("div",{className:"btn-theme",children:m&&b.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==h?"dark":"light";f(e),document.body.dataset.bsTheme=e},children:b.jsx("i",{className:"fa-solid fa-circle-half-stroke"})})}),u&&b.jsx("a",{title:"Abrir ajuda online",className:"btn nav-button",href:u,target:"_blank",rel:"noreferrer noopener",children:b.jsx(Q,{})}),b.jsxs("div",{className:"btn-atalho",children:[b.jsx(a.Link,{to:i.users,className:"nav-button",title:"Configurações do usuário",onClick:()=>v(!1),children:b.jsx("i",{className:"fa-solid fa-user-gear"})}),b.jsx(a.Link,{to:i.exit,className:"nav-button",title:"Sair do sistema",onClick:()=>v(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),g&&b.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(e){"menu-background"===e.target.id&&T()},children:b.jsxs("div",{className:"menu-content",children:[b.jsxs("div",{className:"search-area",children:[b.jsx("i",{className:"fas fa-search"}),b.jsx("input",{ref:d,placeholder:"Pesquisar...",value:x,onChange:e=>y(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of k)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){c.push(e.route),v(!1);break}}}}),x&&b.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:()=>y(""),children:b.jsx("i",{className:"fas fa-times"})}),b.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>F(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>F(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"navbar--menu-area",ref:p,children:k.map((e,t)=>b.jsx(co,{opc:e,closeMenu:T,clickGroup:I,clickFavorite:D,isFavorite:O,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"menu-footer",children:b.jsx(a.Link,{to:i.exit,onClick:T,children:b.jsxs("div",{className:"user",children:[b.jsx("span",{className:"name",title:`Último acesso em ${null==s?void 0:s.lastAccess}`,children:null==s?void 0:s.name}),b.jsxs("span",{className:"sair",children:["Sair ",b.jsx(G,{})]})]})})})]})})]})},e.NavbarMU=function({menusConfig:{brand:e,company:r,menus:o,routes:i,user:s,validatePermis:l}}){const u=t.useRef(),c=t.useRef(),d=a.useHistory(),{theme:p,setTheme:h,canChangeTheme:f}=S(),[m,g]=t.useState(!1),[v,x]=t.useState(""),[y,k]=t.useState([]),[_,C]=t.useState([]);let j=[];const w=localStorage.getItem(mo);w&&(j=JSON.parse(w));const[E]=Se({url:i.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):C(e.data)}}),[N]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function A(){g(!1)}function T(e){let t=[...y],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(mo,JSON.stringify(n)),k(t)}function I(e){let t=[...y];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),k(t),T(null)}function F(e,t){e.stopPropagation(),e.preventDefault();const n=_.filter(e=>e.route!==t.route);var r;n.length===_.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,i.apiFavorites&&(N({data:r}),C(r))}function D(e){return _.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&E()},[]),t.useEffect(()=>{let e=[];null==_||_.forEach(t=>{o.forEach((n,r)=>{var o;if(r>0&&0!==(null==(o=null==n?void 0:n.menus)?void 0:o.length)){let o=n.menus.findIndex(e=>e.route===t.route);if(o>=0){let i=n.menus[o];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(o).padStart(2,0)})}}})}),"Favoritos"===o[0].caption&&(o[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),k(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!j.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(v.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(v.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),v&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(o))},[v,_]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==u?void 0:u.current)||e.select(),null==(t=null==u?void 0:u.current)||t.focus())},[m]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"navbar-mu-area",children:b.jsxs("div",{className:"mu--container",children:[b.jsx(fo,{isOpen:m,setIsOpen:g}),b.jsxs("div",{className:"mu--content",children:[b.jsx(ho,{isOpen:m,setIsOpen:g,brand:e,closeMenu:A,routes:i}),b.jsxs("div",{className:"mu--info",children:[b.jsx("div",{className:"info-line-1",children:r}),b.jsx("div",{className:"info-line-2",children:b.jsxs("span",{children:[null==s?void 0:s.title," ",b.jsx("strong",{children:null==s?void 0:s.name})]})})]}),b.jsxs("div",{className:"mu--buttons",children:[f&&b.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==p?"dark":"light";h(e),document.body.dataset.bsTheme=e},children:b.jsx("i",{className:"fa-solid fa-circle-half-stroke"})}),b.jsx(a.Link,{to:i.users,className:"nav-button btn-users",title:"Configurações do usuário",onClick:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-user-gear"})}),b.jsx(a.Link,{to:i.exit,className:"nav-button btn-exit",title:"Sair do sistema",onClick:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})}),b.jsx("div",{"data-open":m,id:"menu-background",className:"nv-menu--background",onClick:function(e){"menu-background"===e.target.id&&A()},children:b.jsxs("div",{className:"nv-menu--content","data-open":m,children:[b.jsxs("div",{className:"nv-menu--brand",children:[b.jsx(fo,{isOpen:m,setIsOpen:g,menuClose:n.isMobile()}),b.jsx(ho,{isOpen:m,setIsOpen:g,brand:e,closeMenu:A,routes:i,showButtonClose:!0})]}),b.jsxs("div",{className:"nv-menu--search",children:[b.jsx("i",{className:"fas fa-search"}),b.jsx("input",{ref:u,placeholder:"Pesquisar...",value:v,onChange:e=>x(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of y)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){d.push(e.route),g(!1);break}}}}),v&&b.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:function(){var e;x(""),null==(e=null==u?void 0:u.current)||e.focus()},children:b.jsx("i",{className:"fas fa-times"})}),b.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>I(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>I(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"nv-menu--opcoes",ref:c,children:y.map((e,t)=>b.jsx(co,{opc:e,closeMenu:A,clickGroup:T,clickFavorite:F,isFavorite:D,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"nv-menu--footer",children:b.jsx(a.Link,{to:i.exit,onClick:A,children:b.jsxs("div",{className:"foo-user",children:[b.jsx("span",{className:"foo-name",children:null==s?void 0:s.name}),b.jsxs("span",{className:"foo-sair",children:["Sair ",b.jsx(G,{})]})]})})}),b.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==s?void 0:s.lastAccess]})]})})]})},e.Paginacao=function({pages:e,page:n,setPage:r,limitDefault:o=16,limit:i=16,setLimit:a,align:s="center"}){const[l]=t.useState(()=>{const e=[7,30,50,100];return e.includes(o)||e.push(o),e.sort((e,t)=>e-t)}),u=void 0!==a&&void 0!==i&&void 0!==o;function c(t){var o;t!==n&&t>=1&&t<=e&&(null==(o=document.querySelector("main"))||o.scrollTo(0,0),r(t))}return b.jsx("div",{className:"pgn-content","data-fixed":i>=30?"true":"false","data-align":s,children:b.jsxs("div",{className:"pgn-comps",children:[u&&b.jsxs("div",{className:"pgn-limit",children:[b.jsx("strong",{children:"Registros:"}),b.jsx("select",{className:"form-select form-select-sm",value:i,onChange:e=>a(Number(e.target.value)),children:l.map(e=>b.jsx("option",{value:e,children:e},e))})]}),b.jsxs("div",{className:"pgn-pages",children:[b.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para a primeira página",onClick:()=>c(1),disabled:n<=1,children:b.jsx("i",{className:"fas fa-angle-double-left"})}),b.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para página anterior",onClick:()=>c(Number(n)-1),disabled:n<=1,children:b.jsx("i",{className:"fas fa-angle-left"})}),b.jsx("span",{className:"p-2 text-body",children:b.jsxs("div",{children:[b.jsx("span",{className:"fw-bold",children:n}),e?b.jsxs("span",{children:[" / ",e]}):null]})}),b.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para próxima página",onClick:()=>c(Number(n)+1),disabled:n>=e,children:b.jsx("i",{className:"fas fa-angle-right"})}),b.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para a última página",onClick:()=>c(e),disabled:n>=e,children:b.jsx("i",{className:"fas fa-angle-double-right"})})]})]})})},e.Panel=ge,e.PanelDashboard=function({title:e,color:t="var(--pn-color-border)",backColor:n="var(--bs-body-bg)",className:r,minHeight:o,children:i,marginBottom:a=0,degrade:s=!1,...l}){return b.jsxs("div",{className:"panel-dashboard--container"+(r?` ${r}`:""),style:{minHeight:o,marginBottom:a,"--color":t,"--back-color":n,"--degrade-margin-top":s?"calc(calc(var(--panel-dash-top) * -1))":"0px","--border-top-width":s?"0px":"6px"},...l,children:[s&&b.jsx("div",{className:"pd-top"}),b.jsxs("div",{className:"pd-body",children:[e&&b.jsx("h3",{className:"pd-title",children:e}),i]})]})},e.PanelHeader=he,e.PrintButtons=function({onClose:e,showTypes:n}){const{reportType:r,setReportType:o}=S(),i=[{title:"PDF",icon:b.jsx("i",{className:"fa-solid fa-file-pdf"}),onClick(){o(0)}},{title:"Excel",icon:b.jsx("i",{className:"fa-solid fa-file-excel"}),onClick(){o(1)}},{title:"Word",icon:b.jsx("i",{className:"fa-solid fa-file-word"}),onClick(){o(2)}},{title:"Texto",icon:b.jsx("i",{className:"fa-regular fa-file-lines"}),onClick(){o(3)}}];return t.useEffect(()=>{n||o(0)},[]),b.jsxs("div",{className:"print-btn--container",children:[n&&b.jsx(M,{items:i,title:"Formato do relatório",direction:"down",children:b.jsxs("span",{className:"d-flex align-items-center gap-1",children:[b.jsxs("span",{children:["Formato",b.jsx("span",{className:"d-inline-block d-sm-none",children:" do relatório:"})]}),b.jsx("span",{className:"me-1",children:["PDF","Excel","Word","Texto"][r]}),b.jsx("i",{className:"fa-solid fa-chevron-down ms-auto fs-7"})]})}),b.jsxs("div",{className:"print-btn--buttons",children:[b.jsxs("button",{className:"btn btn-primary",type:"submit",children:[b.jsx("i",{className:"fas fa-print"})," Gerar relatório"]}),b.jsxs("button",{className:"btn btn-outline-danger",type:"button",onClick:e,children:[b.jsx("i",{className:"fas fa-times"})," Fechar"]})]})]})},e.QRCodeReader=Pe,e.RadioGroup=function({className:e="",label:t,name:n,value:r,setValue:o,options:a=[],disabled:s,cols:l=1}){return b.jsxs("div",{className:"rad-group--container "+e,style:{color:s?"var(--bs-secondary)":"currentColor"},children:[b.jsx("div",{className:"group-radio--label",children:t}),b.jsx("div",{className:"group-radio--body",style:{"--rad-group--cols":l},children:a.map((e,t)=>b.jsxs("label",{children:[b.jsx(i.Input,{type:"radio",name:n,checked:Number(r)===t,onChange:()=>o(t),disabled:s}),e]},t))})]})},e.ScrollContainer=function({children:e,hasMaxWidth:t=!0}){return b.jsx(Wr,{hasMaxWidth:t,children:b.jsx("div",{className:"scroll--content",children:e})})},e.TabControl=function({children:e,isMultine:n=!1,className:r="",classNameContent:o="",innerRef:i,...a}){const[s,l]=t.useState([]),u=t.useCallback(e=>{l(t=>{const n=t.findIndex(t=>t.id==(null==e?void 0:e.id));return-1==n?t.push({...Yr,...e}):t[n]={...t[n],...e},t.some(e=>e.isVisible&&e.isOpen)||(void 0===(null==e?void 0:e.isVisible)||(null==e?void 0:e.isVisible)?Xr(t):function(e,t){let n=e.findIndex(e=>e.id==t.id),r=!1;e.forEach(e=>{e.isOpen=!1});for(let o=n-1;o>=0;o-=1){const t=e[o];if((null==t?void 0:t.isVisible)&&!r){r=!0,t.isOpen=!0;break}}r||Xr(e)}(t,e)),[...t]})},[]),c=t.useCallback(e=>{l(t=>t.filter(t=>t.id!=e))},[]),d=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!0}:{...t,isOpen:!1}))},[]),p=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!t.isOpen}:t))},[]),h=t.useCallback(e=>s.find(t=>t.id==e),[s]),f=t.useCallback(()=>{l(e=>{const t=e.map(e=>({...e})),n=t.findIndex(e=>e.isVisible&&e.isOpen);return n<0?Xr(t):t.forEach((e,t)=>e.isOpen=t==n),t})},[]);return t.useEffect(()=>{function e(){window.innerWidth>=768&&f()}return window.addEventListener("resize",e,null),()=>{window.removeEventListener("resize",e,null)}},[f]),t.useImperativeHandle(i,()=>({open(e){const t=h(e);t&&(null==t?void 0:t.isVisible)&&d(e)}}),[d,h]),b.jsx(Kr.Provider,{value:{tabs:s,updateOrInsertTab:u,removeTab:c,findTab:h,selectTab:d,toggleTab:p},children:b.jsxs("div",{className:`tab-control--container ${r}`,...a,children:[b.jsx(Zr,{isMultine:n}),b.jsx("div",{className:`tab-control--content ${o}`,children:e})]})})},e.TabSheet=function({tabId:e,title:r,caption:o,isVisible:i=!0,children:a,...s}){const{findTab:l,toggleTab:u,removeTab:c,updateOrInsertTab:d}=Jr(),p=t.useMemo(()=>e||n.random(999999),[]),h=l(p);return t.useEffect(()=>()=>c(p),[]),t.useEffect(()=>{d({id:p,caption:o,title:r,isVisible:i})},[d,r,o,i]),i?b.jsxs(Qr,{open:(null==h?void 0:h.isOpen)&&(null==h?void 0:h.isVisible),"data-in-tab-sheet":null!=h?"true":"false",...s,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>u(p),children:[r," ",b.jsx("i",{className:"fas fa-chevron-down"})]})}),b.jsx("div",{className:`bi-body ${(null==h?void 0:h.isOpen)&&"bi-open"}`,children:a})]}):null},e.Table=function({colunas:t,acoes:r,opcoes:o,dados:a,alignTop:s,colorir:l=!0,border:u=!0,sizeBreak:c=767,msgSemDados:d="Nenhum registro encontrado!",getLineColor:p,onClick:h,fixedHeader:f,clickCanEdit:m,loading:g}){var v,x;t&&t.forEach(e=>{!e.tipo||"money"!=e.tipo&&"currency"!=e.tipo||(e.money=!0)}),void 0===m&&(m=e.hasTableLineClick);let y=!1;const k=(null==(v=null==r?void 0:r.acoes)?void 0:v.map(e=>({...e})))||[];if(r&&r.acoes){const e=null==(x=null==r?void 0:r.acoes)?void 0:x.filter(e=>e.ativa??!0);r.acoes=e,y=r.acoes.length>0}function _(e){const t=window.getSelection();if(t.rangeCount>0){const n=t.getRangeAt(0);if(e.contains(n.commonAncestorContainer)&&t.toString().length>0)return!0}return!1}return g?b.jsxs("div",{className:"py-2 hstack gap-2",children:[b.jsx(i.Spinner,{size:"sm",color:"info"})," ",b.jsx("span",{children:"Carregando..."})]}):a&&0!=a.length?b.jsx(O,{children:b.jsxs(R,{alignTop:s,sizeBreak:c,hasBorder:u,children:[b.jsx(L,{fixedHeader:f,colunas:t,incColActions:y}),b.jsx(V,{colunas:t,acoes:r,dados:a,opcoes:o,colorir:l,getLineColor:p,onClick:h||m?function(e,t){if(h){if(_(null==t?void 0:t.currentTarget))return;h(e,t)}else if(m&&n.isDesktop()){if(_(null==t?void 0:t.currentTarget))return;const n=e[(null==r?void 0:r.campo)||"id"];if(null!=n){const t=k[0];t&&!1!==t.ativa&&t.funcao(n,e,0)}}}:void 0})]})}):b.jsx("div",{className:"alert alert-warning mb-0",children:d})},e.TextHtml=qr,e.Toggle=function({name:e,checked:t,disabled:n,onChange:r,children:o,toRight:i,className:a="",...s}){return b.jsx(Hr,{checked:t,disabled:n,className:a,...s,children:b.jsxs("label",{style:{flexDirection:i?"row-reverse":"row",justifyContent:i?"space-between":"flex-start"},children:[b.jsx("div",{className:"form-switch",children:b.jsx("input",{disabled:n,type:"checkbox",className:"form-check-input",checked:t,onChange:function(){!n&&r&&r({target:{name:e,checked:!t,value:!t}})}})}),o&&b.jsx("span",{className:"title",children:o})]})})},e.cache=ao,e.createApiConfig=function(e=D){const t={...D,...e};return t.auth={...D.auth,...e.auth},t},e.createDropdownItems=ce,e.createMenuOptions=function(e){return e},e.createTableActions=e=>e,e.createTableCols=e=>e,e.createTableOptions=e=>e,e.getAlign=P,e.getDataCol=B,e.setRouteMain=function(e){me=e},e.setTableLineClick=function(t){e.hasTableLineClick=t},e.useApi=Se,e.useLibContext=S,e.useLocalForage=function(e,n,r=1){const[o,i]=t.useState(n);return t.useEffect(()=>{ro.getItem(e).then(t=>{t&&(t.versao==r?i(t.data):ro.removeItem(e))})},[]),t.useEffect(()=>{ro.setItem(e,{versao:r,data:o})},[o]),[o,i]},e.useLocalStorage=oo,e.useLocalhostBadge=_,e.useParamId=function(){let e=0,t=a.useParams();return t&&t.id&&(e=parseInt(t.id)),e},e.useQuery=function(){const{search:e}=a.useLocation();return t.useMemo(()=>new URLSearchParams(e),[e])},e.useSessionStorage=function(e,n){const[r,o]=t.useState(()=>{const t=sessionStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>{sessionStorage.setItem(e,JSON.stringify(r))},[r]),[r,o]},e.useTestDomainBadge=C,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
971
+ `;function co(e){return n.retirarAcentuacao(e??"").toLowerCase()}function po(e,t){if(!t||"string"!=typeof e)return e;const n=co(e),r=co(t),o=[];let i=0,a=n.indexOf(r);for(;a>=0;)a>i&&o.push(e.substring(i,a)),o.push(b.jsx("mark",{className:"menu-highlight",children:e.substring(a,a+t.length)},a)),i=a+t.length,a=n.indexOf(r,i);return 0===o.length?e:(o.push(e.substring(i)),o)}function ho({opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:o,enabledFavorite:i,filter:a}){var s;const{versionApp:l}=S();if((null==(s=e.menus)?void 0:s.length)>0)return b.jsxs(b.Fragment,{children:[b.jsxs(so,{onClick:()=>n(e),isOpen:e.open,children:[b.jsx("span",{className:"opc",style:{color:e.isFavorite?"var(--nav-icon-sair)":"var(--bs-body-color) !important"},children:po(e.caption,a)}),b.jsx("span",{className:"icon",children:b.jsx("i",{className:"fa-solid fa-chevron-down"})})]}),b.jsx("div",{className:"opt-group "+(e.open?"opt--open":"opt--close"),children:e.menus.map((e,s)=>b.jsx(ho,{opc:e,closeMenu:t,clickGroup:n,clickFavorite:r,isFavorite:o,enabledFavorite:i,filter:a},s))})]});if(e.route){let n=o(e.route),s=null==e?void 0:e.version;return s&&(s=Boolean(l.substring(0,s.length)===s)),b.jsxs(lo,{to:e.route,onClick:t,children:[b.jsx("span",{className:"menu-icon",children:e.icon}),b.jsx("span",{className:"menu-caption",children:po(e.caption,a)}),b.jsxs("span",{className:"menu-fav-new",children:[s&&b.jsx("span",{className:"menu-new",children:"novo"}),i&&b.jsx("span",{className:"menu-fav",onClick:t=>r(t,e),children:b.jsx("i",{title:"Clique para favoritar esta opção",className:"fa-"+(n?"solid":"regular")+" fa-heart",style:{color:n?"var(--nav-icon)":"var(--nav-icon-fav)"}})})]})]})}return(null==e?void 0:e.isLine)?b.jsx(uo,{}):null}const fo="sys/nav/closed";const mo=({routes:e,closeMenu:t,brand:n})=>b.jsx("div",{className:"navbar-mu--brand",children:b.jsx(a.Link,{to:e.home,onClick:t,className:"brand",title:"Voltar para tela inicial",children:n})});function go({isOpen:e,setIsOpen:t,menuClose:n}){return b.jsx("button",{className:"btn-menu",title:"Abrir menu de opções",onClick:()=>t(!e),children:n?b.jsx("i",{className:"fa-solid fa-xmark icon-close"}):b.jsxs("div",{className:"icon-desk",children:[b.jsx("span",{}),b.jsx("span",{}),b.jsx("span",{})]})})}const vo="sys/nav/closed";e.Alerta=F,e.Aviso=function({onConfirm:e,text:t="",children:n}){return b.jsx(I,{type:N,title:"Aviso!",text:t,onConfirm:e,children:n})},e.BotaoClonar=function({title:e="Clonar o registro"}){return b.jsx(i.Button,{size:"sm",color:"warning",title:e,children:b.jsx(H,{})})},e.BotaoEditar=function({title:e="Alterar o registro"}){return b.jsx(i.Button,{size:"sm",color:"primary",title:e,children:b.jsx(K,{})})},e.BotaoExcluir=function({title:e="Excluir o registro"}){return b.jsx(i.Button,{size:"sm",color:"danger",title:e,children:b.jsx(X,{})})},e.BotaoIncluir=function({caption:e="Incluir",onClick:t,...n}){return b.jsxs(i.Button,{color:"success",title:"Incluir um novo registro",onClick:t,...n,children:[b.jsx(Y,{})," ",e]})},e.BotaoSalvar=function({loading:e,saveInfo:t,link:n,fixed:r,modalFixed:o,btnSaveDisabled:s,onCancel:l,onConfirm:u}){const c=a.useHistory();return b.jsxs("div",{className:"botao-salvar--area","data-fixed":Boolean(r),"data-modal-fixed":Boolean(o),children:[b.jsxs(i.Button,{type:u?"button":"submit",color:"primary",onClick:u,disabled:s&&1==s,children:[b.jsx("i",{className:"fas fa-cloud-upload-alt"}),e||(null==t?void 0:t.loading)?"Salvando...":"Salvar"]}),b.jsxs(i.Button,{type:"button",color:"outline-danger",onClick:()=>{l?l():n?c.push(n):c.goBack()},children:[b.jsx("i",{className:"fas fa-times"}),"Cancelar"]})]})},e.BoxColor=function({corFonte:e,setCorFonte:t,corFundo:n,setCorFundo:r}){return b.jsxs("div",{className:"box-color--container",children:[b.jsx(ne,{label:"Cor da fonte",value:e,onChange:e=>t(e.target.value)}),b.jsx(ne,{label:"Cor de fundo",value:n,onChange:e=>r(e.target.value)}),b.jsx("div",{className:"box-color-texto",style:{color:e,backgroundColor:n},children:"Texto de exemplo"})]})},e.BoxInfo=function({id:e,title:n,isOpen:r=!1,isVisible:o=!0,onChange:i,noMargin:a,children:s,...l}){const[u,c]=t.useState(r);return t.useEffect(()=>{e&&i&&i(e,u)},[u]),o?b.jsxs(re,{open:u,noMargin:a,...l,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>c(!u),children:[n," ",b.jsx("i",{className:"fas fa-chevron-down setas-bi"})]})}),b.jsx("div",{className:`bi-body ${u&&"bi-open"}`,children:s})]}):null},e.BoxSearch=kn,e.ButtonBack=se,e.ButtonClose=ie,e.ButtonHelp=ae,e.ButtonOptions=function({value:e,setValue:t,options:n=[],...r}){return b.jsx("div",{className:"btn-opts--container btn-group",...r,children:n.map((n,r)=>b.jsx(i.Button,{active:r===e,color:"outline-info",onClick:()=>t(r),children:n},r))})},e.ButtonTop=function({smooth:e,center:n}){const[r,o]=t.useState(!1);function i(){var e;o((null==(e=document.querySelector("main"))?void 0:e.scrollTop)>0)}return t.useEffect(()=>{var e;return null==(e=document.querySelector("main"))||e.addEventListener("scroll",i),()=>{var e;null==(e=document.querySelector("main"))||e.removeEventListener("scroll",i)}},[]),b.jsx(b.Fragment,{children:r&&b.jsx(le,{title:"Ir para o início da tela",visible:i,onClick:function(){var t;null==(t=document.querySelector("main"))||t.scrollTo({top:0,left:0,behavior:e?"smooth":"instant"}),o(!1)},className:"pulsate-bck",center:n,children:b.jsx("i",{className:"fa-solid fa-arrow-up"})})})},e.CheckBox=function({enabled:e=!0,onChange:t,children:n,...r}){const o=r.disabled||!e;return b.jsx(Le,{disabled:o,children:b.jsxs("label",{children:[b.jsx(i.Input,{type:"checkbox",disabled:o,onChange:e=>{if(t){let n={...e,target:{...e.target,name:e.target.name,value:e.target.checked}};t(n)}},checked:"boolean"==typeof r.value?r.value:r.checked,...r}),b.jsx("span",{children:n})]})})},e.CheckUpdates=function(){const e=t.useRef();function n(t){var n,r;(null==e?void 0:e.current)&&(t?null==(n=e.current)||n.classList.add("update-show"):null==(r=e.current)||r.classList.remove("update-show"))}return t.useLayoutEffect(()=>{"serviceWorker"in navigator&&window.location.origin.startsWith("http")&&navigator.serviceWorker.getRegistration().then(e=>{e&&(e.addEventListener("updatefound",()=>{n(!0);const t=e.installing;t.addEventListener("statechange",()=>{"installed"==t.state&&setTimeout(()=>window.location.reload(!0),1e3),"activated"==t.state&&n(!1)})}),e.update())}).catch(e=>{console.error("=> Service Worker não encontrado:",e)})},[]),b.jsx("div",{className:"update-check-box",onClick:function(){n(!1)},children:b.jsxs("div",{ref:e,className:"update-box",children:[b.jsx("div",{className:"update-line"}),b.jsx("div",{className:"spinner-border text-warning w-22",role:"status",children:b.jsx("span",{className:"visually-hidden",children:"Carregando..."})}),"Nova versão disponível, atualizando..."]})})},e.ClipboardArea=function({title:e,url:n,timerInMilliSeconds:r=5e3}){const[o,i]=t.useState(!1);return t.useEffect(()=>()=>{ue&&clearTimeout(ue)},[]),b.jsxs("div",{className:`clipboard-area--container ${o&&" clip-active"}`,children:[b.jsx("a",{href:n,target:"_blank",rel:"noreferrer",title:"Abrir este link",children:e||n}),b.jsx("button",{type:"button",className:"clip-mark",onClick:function(){navigator.clipboard.writeText(n),i(!0),ue=setTimeout(()=>i(!1),r)},children:o?b.jsxs(b.Fragment,{children:[b.jsx("i",{className:"fas fa-clipboard-check"}),"Copiado"]}):b.jsxs(b.Fragment,{children:[b.jsx("i",{className:"fas fa-clipboard"}),"Copiar"]})})]})},e.Confirma=function({onConfirm:e,onCancel:t,text:n="",children:r,defaultBtn:o}){return b.jsx(I,{type:A,title:"Confirmação!",text:n,onConfirm:e,onCancel:t,defaultBtn:o,children:r})},e.DataItem=function({caption:e,colored:t,isForm:n=!1,children:r,className:o,minHeight:i=40,...a}){return b.jsxs("div",{className:"di-box "+(o||""),...a,style:{minHeight:i},children:[e&&b.jsx("label",{style:{fontWeight:n?"bold":"normal"},children:e}),n?b.jsx("input",{className:"form-control",value:r,readOnly:!0}):b.jsx("div",{style:{color:t?"var(--data-item-destaque)":"var(--body-color)"},className:"fw-bold",children:r})]})},e.DropDownButton=M,e.DynamicCounter=function({valor:e=0,time:r=25,format:o,currency:i}){const[a,s]=t.useState(0);return t.useEffect(()=>{const t=setInterval(()=>{const n=Math.ceil(e/10)+1;s(r=>{let o=r+n;return o>e&&(o=e),o===e&&clearInterval(t),o})},r);return()=>clearInterval(t)},[e,r]),o?n.formatValor(a,i?2:0,Boolean(i)):a},e.FormDesk=function({children:e,labelWidth:t=100,sizeBreak:n=767,lineShortWidth:r=250,gap:o="8px",...i}){return b.jsx(Gr,{style:{"--form-desk-label-width":`${t}px`,"--form-desk-line-short-width":`${r}px`,"--form-desk-gap":o},sizeBreak:n,...i,children:e})},e.FormDeskGrid=function({grid:e,gap:t=25,className:n="",children:r,...o}){return b.jsx("div",{className:`form-desk--grid ${n}`,style:{gridTemplateColumns:e,gap:t},...o,children:r})},e.FormDeskLine=function({children:e,label:t="",isShort:n=!1,className:r="",classNameLabel:o="",classNameCol:i="",extraComp:a,inpWidth:s,...l}){const u={};return s&&(u["--form-desk-line-short-width"]=s),b.jsxs("div",{className:`form-desk-line ${r}`,"data-has-extra-comp":a?"true":"false",...l,style:{...l.styles,...u},children:[b.jsx("label",{className:`form-desk-label ${o}`,children:t}),b.jsx("div",{className:i,"data-is-line-short":String(n),children:e}),a&&b.jsx("div",{className:"my-auto",children:a})]})},e.FormEdit=function({title:e,count:n,codigo:r,maxWidth:o=1200,goBack:i,goHome:a,onClose:s,helpLink:l,children:u}){return t.useEffect(()=>{var e;null==(e=document.querySelector("main"))||e.scrollTo(0,0)},[]),b.jsx("div",{className:"mx-auto",style:{maxWidth:o},children:b.jsx(ge,{title:e,count:n,codigo:r,goBack:i,goHome:a,onClose:s,helpLink:l,children:u})})},e.FormEnter=function({children:e}){const n=t.useRef(),r=(e,t)=>{let n=e[t];for(;t<e.length-1&&(n=e[++t],n.disabled););return n};return b.jsx("form",{onSubmit:function(e){e.preventDefault()},ref:n,onKeyDown:function(e){var t,o;if("Enter"===e.key){const i=null==(t=null==n?void 0:n.current)?void 0:t.querySelector(".form-item:focus,.btn-primary"),a=null==(o=null==n?void 0:n.current)?void 0:o.querySelectorAll(".form-item,.btn-primary");for(let t=0;t<a.length;t++)if(a[t]===i&&t<a.length-1){e.preventDefault();const n=r(a,t);(null==n?void 0:n.select)&&n.select(),n.focus()}}},children:e})},e.FormatData=({value:e="",incHour:t=!0})=>{let n="";if(e){let r,o;-1!==e.indexOf("T")?(r=e.split("T"),o=r[1],r=r[0]):(r=e.split(" "),r.length>1&&(o=r[1]),r=r[0]),-1!==r.indexOf("-")&&(r=r.split("-").reverse().join("/")),o&&t&&(r=r+" "+o),n=r}return n},e.FormatPercent=({value:e=0,decimalScale:t=2,...n})=>b.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ve(e))+"%"}),e.FormatQuant=({value:e=0,decimalScale:t=2,...n})=>b.jsx("span",{...n,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:t,minimumFractionDigits:t,style:"decimal"}).format(Ve(e))}),e.FormatValor=({value:e=0,money:t=!0,decimalScale:n=2,...r})=>b.jsx("span",{...r,children:Intl.NumberFormat("pt-br",{maximumFractionDigits:n,minimumFractionDigits:n,style:t?"currency":"decimal",currency:"BRL"}).format(Ve(e))}),e.GroupBox=function({label:e,className:t="",children:n}){return b.jsxs("div",{className:`group-box--container ${t}`,children:[b.jsx("div",{className:"group-box--label",children:e}),b.jsx("div",{className:"group-box--body",children:n})]})},e.Hint=function({title:e="Ajuda",children:t}){return b.jsxs("div",{className:"hint--container",children:[b.jsx("i",{className:"fas fa-question"}),b.jsxs("div",{className:"hint-content",children:[b.jsx("div",{className:"title",children:e}),t]})]})},e.IconClose=de,e.IconExitOutline=function(e){return b.jsx("svg",{viewBox:"0 0 512 512",fill:"currentColor",height:"1em",width:"1em",...e,children:b.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M320 176v-40a40 40 0 00-40-40H88a40 40 0 00-40 40v240a40 40 0 0040 40h192a40 40 0 0040-40v-40M384 176l80 80-80 80M191 256h273"})})},e.IconMenu=pe,e.IconUserGear=function(e){return b.jsx("svg",{viewBox:"0 0 640 512",fill:"currentColor",height:"1em",width:"1em",...e,children:b.jsx("path",{d:"M224 256c-70.7 0-128-57.3-128-128S153.3 0 224 0s128 57.3 128 128-57.3 128-128 128zm-45.7 48h91.4c11.8 0 23.4 1.2 34.5 3.3-2.1 18.5 7.4 35.6 21.8 44.8-16.6 10.6-26.7 31.6-20 53.3 4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3 0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8 10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4 7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1.7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4L546.3 442c-6.9 5.1-14.3 9.4-22.3 12.8v30.6c0 7-4.5 13.3-11.3 14.8-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8v-30.6c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3.7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2 3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9v-30.4zm92.1 133.5c0-26.5-21.5-48-48.1-48s-48.1 21.5-48.1 48 21.5 48 48.1 48 48.1-21.5 48.1-48z"})})},e.IconeChevron=()=>b.jsx("i",{className:"fas fa-chevron-down"}),e.IconeClonar=()=>b.jsx("i",{className:"fa-solid fa-copy"}),e.IconeConfig=()=>b.jsx("i",{className:"fas fa-cogs"}),e.IconeEditar=K,e.IconeEmail=()=>b.jsx("i",{className:"fas fa-envelope"}),e.IconeEncerrarAno=()=>b.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M8.875 17.375C7.43258 17.375 6.10606 17.0466 4.89545 16.3898C3.68485 15.733 2.69318 14.8572 1.92045 13.7625V15.8295H0.375V11.1932H5.01136V12.7386H3.09886C3.71705 13.6659 4.53176 14.4129 5.543 14.9795C6.55373 15.5462 7.66439 15.8295 8.875 15.8295C9.84091 15.8295 10.7458 15.6462 11.5896 15.2794C12.4329 14.9121 13.167 14.416 13.7919 13.7911C14.4162 13.1667 14.9121 12.4326 15.2794 11.5888C15.6462 10.7455 15.8295 9.84091 15.8295 8.875H17.375C17.375 10.047 17.153 11.1481 16.7089 12.1784C16.2643 13.2087 15.6557 14.1102 14.883 14.883C14.1102 15.6557 13.2087 16.2641 12.1784 16.7081C11.1481 17.1527 10.047 17.375 8.875 17.375ZM8.17955 14.2841V13.2795C7.57424 13.1379 7.08176 12.8772 6.70209 12.4975C6.32191 12.1174 6.04167 11.6182 5.86136 11L7.13636 10.4977C7.29091 11.0258 7.53251 11.4217 7.86118 11.6854C8.18933 11.9497 8.56591 12.0818 8.99091 12.0818C9.41591 12.0818 9.77961 11.9819 10.082 11.782C10.3849 11.5826 10.5364 11.2705 10.5364 10.8455C10.5364 10.472 10.3787 10.1693 10.0635 9.9375C9.74767 9.70568 9.18409 9.44167 8.37273 9.14545C7.61288 8.875 7.056 8.55303 6.70209 8.17955C6.34767 7.80606 6.17045 7.31667 6.17045 6.71136C6.17045 6.18333 6.35411 5.70347 6.72141 5.27177C7.0882 4.84059 7.58712 4.56061 8.21818 4.43182V3.46591H9.57045V4.43182C10.0341 4.47045 10.456 4.6572 10.8362 4.99205C11.2158 5.32689 11.4765 5.7197 11.6182 6.17045L10.3818 6.67273C10.2788 6.37651 10.1114 6.12873 9.87955 5.92936C9.64773 5.72948 9.32576 5.62955 8.91364 5.62955C8.46288 5.62955 8.1185 5.72614 7.8805 5.91932C7.64198 6.1125 7.52273 6.37651 7.52273 6.71136C7.52273 7.04621 7.67083 7.31023 7.96705 7.50341C8.26326 7.69659 8.79773 7.92197 9.57045 8.17955C10.4977 8.51439 11.1159 8.9072 11.425 9.35795C11.7341 9.80871 11.8886 10.3045 11.8886 10.8455C11.8886 11.2189 11.8242 11.5473 11.6955 11.8307C11.5667 12.114 11.3962 12.3554 11.1839 12.5547C10.9712 12.7546 10.7231 12.9156 10.4398 13.0377C10.1564 13.1603 9.85379 13.2538 9.53182 13.3182V14.2841H8.17955ZM0.375 8.875C0.375 7.70303 0.597288 6.60189 1.04186 5.57159C1.48592 4.54129 2.09432 3.63977 2.86705 2.86705C3.63977 2.09432 4.54129 1.48567 5.57159 1.04109C6.60189 0.59703 7.70303 0.375 8.875 0.375C10.3174 0.375 11.6439 0.703409 12.8545 1.36023C14.0652 2.01705 15.0568 2.8928 15.8295 3.9875V1.92045H17.375V6.55682H12.7386V5.01136H14.6511C14.033 4.08409 13.2182 3.33712 12.207 2.77045C11.1963 2.20379 10.0856 1.92045 8.875 1.92045C7.90909 1.92045 7.00448 2.10385 6.16118 2.47064C5.31736 2.83794 4.58327 3.33377 3.95891 3.95814C3.33403 4.58301 2.83794 5.31711 2.47064 6.16041C2.10385 7.00423 1.92045 7.90909 1.92045 8.875H0.375Z",fill:"currentColor"})}),e.IconeExcluir=X,e.IconeFechar=Z,e.IconeFecharCircle=()=>b.jsx("i",{className:"fas fa-times-circle"}),e.IconeHelp=Q,e.IconeIncluir=Y,e.IconeLogin=()=>b.jsx("i",{className:"fas fa-sign-in-alt"}),e.IconeLogout=G,e.IconeMostrarSenha=({display:e})=>b.jsx("i",{className:"fas fa-eye"+(e?"-slash":"")}),e.IconeOpenLink=ee,e.IconePassword=()=>b.jsx("i",{className:"fas fa-key"}),e.IconePin=()=>b.jsx("i",{className:"fas fa-map-marker-alt"}),e.IconePrint=()=>b.jsx("i",{className:"fas fa-print"}),e.IconeQRCode=te,e.IconeSalvar=()=>b.jsx("i",{className:"fas fa-cloud-upload-alt"}),e.IconeSearchPlus=()=>b.jsx("i",{className:"fas fa-search-plus"}),e.IconeSoma=()=>b.jsx("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b.jsx("path",{d:"M0.898056 12.1914V10.6914L5.77306 6.19141L0.898056 1.69141V0.191406H9.89806V2.44141H4.47931L8.51056 6.19141L4.47931 9.94141H9.89806V12.1914H0.898056Z",fill:"currentColor"})}),e.IconeUsers=()=>b.jsx("i",{className:"fas fa-user-cog"}),e.IconeVisualizar=J,e.Input=function({autoSelect:e,...t}){function n(n){t.onClick?t.onClick(n):e&&n.currentTarget.select()}switch(t.type){case"cpf":return b.jsx(vn,{onClick:n,...t});case"cnpj":return b.jsx(cn,{onClick:n,...t});case"codigo":return b.jsx(mn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"fone":return b.jsx(qe,{name:t.name,onChange:t.onChange,value:t.value,onClick:n,...t});case"uf":return b.jsx(bn,{onClick:n,...t});case"hora":return b.jsx(gn,{onClick:n,...t});case"percent":return b.jsx(fn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"quant":return b.jsx(hn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"real":return b.jsx(pn,{name:t.name,onChange:t.onChange,onClick:n,...t});case"finder":return b.jsx(_n,{onClick:n,...t});default:return b.jsx("input",{className:"form-control",onClick:n,...t})}},e.InputBox=function({children:e}){return b.jsx("div",{className:"jclib-ui-input-box",children:e})},e.InputCep=function({dados:e,setDados:n,onSearch:r,disabled:o,autoFocus:i,...a}){const[s,l]=t.useState(!1),u=async t=>{l(!0);const o=await(async(e,t)=>{let n={erro:!0,mensagem:"CEP deve ter 8 dígitos!"};if((e=e.replace(/\D+/g,""))&&8===e.length){const r=`https://viacep.com.br/ws/${e}/json`;try{n=await(await fetch(r,{mode:"cors"})).json()}catch{n={erro:!0,mensagem:"Não foi possível pesquisar este CEP!"}}finally{t&&t(n)}}return n})(t,r);!o.erro&&e&&n&&n({...e,ende:o.logradouro,bairro:o.bairro,cida:o.localidade,uf:o.uf}),l(!1)};return b.jsxs(b.Fragment,{children:[b.jsx(Ue,{visible:s,message:"Buscando CEP..."}),b.jsxs("div",{className:"input-group",children:[b.jsx(c,{format:"##.###-###",mask:"_",value:a.value,className:"form-control",onValueChange:e=>function(e,t,n){n&&n({target:{name:t,value:e.formattedValue}})}(e,a.name,a.onChange),disabled:o,autoFocus:i}),b.jsx("button",{type:"button",className:"btn btn-info",onClick:()=>u(a.value),disabled:o,children:b.jsx("i",{className:"fas fa-search"})})]})]})},e.InputCheckBox=({disabled:e,children:t,name:n,checked:r,onChange:o})=>b.jsx(jn,{children:b.jsxs(wn,{disabled:e,onClick:function(){if(!e&&o){o({target:{name:n,checked:!r}})}},children:[b.jsxs("span",{children:[r&&b.jsx(z,{color:e&&"silver"}),!r&&b.jsx($,{color:e&&"silver"})]})," ",t]})}),e.InputCnpj=cn,e.InputCodigo=mn,e.InputColor=ne,e.InputCpf=vn,e.InputCpfCnpj=function({onChange:e,value:t,name:n,className:r,...o}){return b.jsx(ln,{className:`form-control ${Ye(t)?"is-invalid":""} ${r||""}`,mask:un,onAccept:function(t,r,o){o&&e({target:{name:n,value:t.toUpperCase()}})},value:t,name:n,...o})},e.InputEstado=bn,e.InputFinder=({title:e,onFind:t,children:n,...r})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...r,children:[b.jsxs("option",{value:0,children:["- ",e," -"]}),n]}),b.jsx("button",{type:"button",title:"Pesquisar...",className:"btn btn-info",onClick:t,children:b.jsx(q,{})})]}),e.InputFone=qe,e.InputHora=gn,e.InputOff=function({campo:e,dados:n,setDados:r,type:o,className:i,disabled:a,...s}){const l=t.useMemo(()=>`${e}_${Math.random().toString(36).slice(2,8)}`,[e]),[u,c]=t.useState(!0),[d,p]=t.useState(!1),h="password"==o;return t.useEffect(()=>{p(!1)},[a]),b.jsxs("div",{className:"input-off",children:[b.jsx("input",{className:`form-control ${i} ${h&&!d?"input-off-senha":""}`,type:"text",name:l,value:n[e]??"",onChange:t=>r({...n,[e]:t.target.value}),autoComplete:"off",onFocus:()=>c(!1),readOnly:u,disabled:a,...s}),"password"==o&&b.jsx("div",{className:"icone "+(a?"disabled":""),onClick:()=>{a||p(!d)},children:d?b.jsx("i",{className:"fa-solid fa-eye-slash"}):b.jsx("i",{className:"fa-solid fa-eye"})})]})},e.InputPassword=function({disabled:e,autoSelect:n,...r}){const[o,i]=t.useState(!1);return b.jsxs(Cn,{disabled:e,children:[b.jsx("input",{type:o?"text":"password",disabled:e,onClick:function(e){r.onClick?r.onClick(e):n&&e.currentTarget.select()},...r}),b.jsx("i",{className:o?"fas fa-eye-slash":"fas fa-eye",onClick:()=>{e||i(!o)},title:e?"":(o?"Ocultar":"Exibir")+" a senha"})]})},e.InputPercent=fn,e.InputPesquisa=Ae,e.InputQRCode=function({value:e,setValue:n}){const[r,o]=t.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"input-group",children:[b.jsx(i.Input,{disabled:!0,placeholder:"Link para o documento de pagamento",title:"Link para o documento de pagamento",value:e}),b.jsx(i.Button,{color:"outline-secondary",title:"Limpar o campo",onClick:()=>n(""),children:b.jsx(W,{})}),b.jsx(i.Button,{color:"success-light",title:"Ler QRCode do documento",onClick:()=>o(!0),children:b.jsx(te,{})}),e?b.jsx(ye,{className:"btn btn-info",title:"Abrir o link do documento",to:e,children:b.jsx(ee,{})}):b.jsx(i.Button,{color:"info",disabled:!0,children:b.jsx(ee,{})})]}),r&&b.jsx(Pe,{setVisible:o,title:"Ler QRCode do documento",onResult:e=>n(null==e?void 0:e.text)})]})},e.InputQuant=hn,e.InputSearch=({title:e="Selecione",options:t=[],fields:n=[],btnClick:r=null,...o})=>b.jsxs("div",{className:"input-group",children:[b.jsxs("select",{className:"form-select",...o,children:[b.jsxs("option",{value:0,children:["- ",e," -"]}),null==t?void 0:t.map((e,t)=>b.jsx("option",{value:e[n[0]],children:e[n[1]]},t))]}),b.jsx("button",{type:"button",className:"btn btn-info",title:"Abrir tela de pesquisa",onClick:r,children:b.jsx(q,{})})]}),e.InputValor=pn,e.LabelHint=function({label:e,hint:t}){return b.jsxs("div",{className:"label-hint--container",children:[b.jsx("label",{children:e}),b.jsx("div",{className:"label-hint--icon",children:b.jsx("i",{className:"fas fa-question"})}),b.jsxs("div",{className:"label-hint--box",children:[b.jsx("div",{className:"label-hint--box-title",children:"Ajuda"}),t]})]})},e.LibProvider=({apiConfig:e,children:r,versionApp:o,useTheme:i,testDomain:a})=>{const s="boolean"==typeof i&&i,[l,u]=t.useState(()=>{let e="";if(s){let t=localStorage.getItem(w);e=t||(n.isDarkMode()?"dark":"light")}return e}),[c,d]=oo("sys/reportType",0),[p,h]=t.useState([]),[f,m]=t.useState(!1),g=e=>{let t=p.find(t=>t.modalId===e);t&&t.setVisible(!1),h(t=>t.filter(t=>t.modalId!==e))},v=t.useCallback(e=>{"Escape"===e.key&&0!=p.length&&g(p[p.length-1].modalId)},[p]);_();const x=C(a);return t.useEffect(()=>{s&&(localStorage.setItem(w,l),document.body.dataset.bsTheme="dark"==l?l:"")},[l,s]),t.useEffect(()=>(window.addEventListener("keydown",v,!1),()=>window.removeEventListener("keydown",v,!1)),[p]),b.jsxs(j.Provider,{value:{versionApp:o,addModal:(e,t)=>{h(n=>{let r=[...n],o=r.findIndex(t=>t.modalId===e);return o>=0?r[o]={modalId:e,setVisible:t}:r.push({modalId:e,setVisible:t}),r})},removeModal:g,clearModals:()=>{p.forEach(e=>{g(e.modalId)})},showBtnTop:f,setShowBtnTop:m,globalApiConfig:e,theme:l,setTheme:u,toggleTheme:()=>u("dark"==l?"light":"dark"),canChangeTheme:s,reportType:c,setReportType:d},children:[x,r]})},e.LinkToEmail=xe,e.LinkToFone=function({href:e,children:t,...n}){const r=String(e||t);let o="+";return(null==r?void 0:r.startsWith("+"))||(o="+55"),o+=r.replace(/\D/g,""),b.jsx("a",{href:`tel:${o}`,title:"Ligar para este número",...n,children:t||e})},e.LinkToMaps=function({href:e,children:t,...n}){let r=`https://google.com/maps/place/${null==e?void 0:e.replace(" ","+")}`;return(null==e?void 0:e.includes("/maps/place/"))&&(null==e?void 0:e.startsWith("https"))&&(r=e),b.jsx("a",{href:r,target:"_blank",rel:"noreferrer",title:"Localizar este endereço",...n,children:t})},e.LinkToNewPage=ye,e.LinkToWhatsApp=be,e.Loading=Ue,e.LoadingReport=function({url:e,file:t,fileTo:n,loading:r=!0,setLoading:o}){if(!r)return null;let[,i]=t.split("."),[a,s]=n.split(".");return s!=i&&(n=[a,i].join(".")),b.jsx(Ne,{url:e,file:t,fileTo:n,setLoading:o})},e.Modal=Fe,e.ModalBody=De,e.ModalBox=function({visible:e,setVisible:t,codigo:n,title:r,children:o,alignTop:i,paddingBottom:a=10,helpLink:s,count:l,...u}){return e?b.jsxs(Fe,{alignTop:i,setVisible:t,visible:e,...u,children:[b.jsxs(Re,{helpLink:s,setVisible:t,children:[r,null!=l&&b.jsxs(b.Fragment,{children:[" ",b.jsx(fe,{value:l,isCount:!0})]}),b.jsx(fe,{value:n})]}),b.jsx(Oe,{children:b.jsx(De,{style:{paddingBottom:a},children:o})})]}):null},e.ModalContent=Oe,e.ModalFilter=function({title:e="Filtros",setVisible:t,maxWidth:n,fnApplyFilter:r,children:o,alignTop:a,helpLink:s}){return b.jsxs(Fe,{alignTop:a,maxWidth:n,setVisible:t,visible:!0,children:[b.jsx(Re,{helpLink:s,setVisible:t,children:e}),b.jsx(Oe,{children:b.jsxs(De,{className:"mod-filter--container",children:[o,b.jsxs("div",{className:"mod-filter--btn-area",children:[b.jsxs(i.Button,{block:!0,color:"primary",onClick:()=>{r&&r(!0)},children:[b.jsx(U,{})," Aplicar filtros"]}),b.jsxs(i.Button,{block:!0,color:"outline-danger",onClick:()=>{r&&r(!1)},children:[b.jsx(Z,{})," Cancelar filtros"]})]})]})})]})},e.ModalFooter=function({className:e="",backgroundColor:t="",...n}){return b.jsx("div",{className:`modal--footer ${e}`,style:{backgroundColor:t},...n})},e.ModalHeader=Re,e.Navbar=function({menusConfig:{brand:e,company:r,menus:o,routes:i,user:s,validatePermis:l},helpLink:u}){const c=a.useHistory(),d=t.useRef(),p=t.useRef(),{theme:h,setTheme:f,canChangeTheme:m}=S(),[g,v]=t.useState(!1),[x,y]=t.useState(""),[k,_]=t.useState([]),[C,j]=t.useState([]);let w=[];const E=localStorage.getItem(fo);E&&(w=JSON.parse(E));const[N]=Se({url:i.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):j(e.data)}}),[A]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function T(){v(!1)}function I(e){let t=[...k],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(fo,JSON.stringify(n)),_(t)}function F(e){let t=[...k];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),_(t),I(null)}function D(e,t){e.stopPropagation(),e.preventDefault();const n=C.filter(e=>e.route!==t.route);var r;n.length===C.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,i.apiFavorites&&(A({data:r}),j(r))}function O(e){return C.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&N()},[]),t.useEffect(()=>{let e=[];null==C||C.forEach(t=>{o.forEach((n,r)=>{var o;if(r>0&&0!==(null==(o=null==n?void 0:n.menus)?void 0:o.length)){let o=n.menus.findIndex(e=>e.route===t.route);if(o>=0){let i=n.menus[o];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(o).padStart(2,0)})}}})}),"Favoritos"===o[0].caption&&(o[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),_(function(e){let t=[];const n=co(x);return e.forEach(e=>{let r={caption:e.caption,open:!w.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(co(e.caption).includes(n)||co(e.shortcut).includes(n))).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&r.menus.push({...e,prefix:null==r?void 0:r.prefix})}),x&&(r.open=!0),t.push(r)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(o))},[x,C]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==d?void 0:d.current)||e.focus(),null==(t=null==d?void 0:d.current)||t.select())},[g]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"navbar--area",children:b.jsxs("div",{className:"navbar-content",children:[b.jsx("button",{className:"btn-menu"+(g?" opened":""),title:"Abrir menu de opções",onClick:()=>v(!g),children:g?b.jsx(de,{width:20,height:20}):b.jsx(pe,{width:20,height:20})}),b.jsxs("div",{className:"content",children:[b.jsx(a.Link,{to:i.home,className:"brand",onClick:T,title:"Voltar para tela inicial",children:e}),b.jsxs("div",{className:"company",children:[b.jsx("div",{className:"name",children:r}),b.jsxs("div",{className:"doc",children:[b.jsxs("span",{children:[null==s?void 0:s.title," "]}),b.jsx("strong",{children:null==s?void 0:s.name})]})]}),b.jsxs("div",{className:"nav-btn-area",children:[b.jsx("div",{className:"btn-theme",children:m&&b.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==h?"dark":"light";f(e),document.body.dataset.bsTheme=e},children:b.jsx("i",{className:"fa-solid fa-circle-half-stroke"})})}),u&&b.jsx("a",{title:"Abrir ajuda online",className:"btn nav-button",href:u,target:"_blank",rel:"noreferrer noopener",children:b.jsx(Q,{})}),b.jsxs("div",{className:"btn-atalho",children:[b.jsx(a.Link,{to:i.users,className:"nav-button",title:"Configurações do usuário",onClick:()=>v(!1),children:b.jsx("i",{className:"fa-solid fa-user-gear"})}),b.jsx(a.Link,{to:i.exit,className:"nav-button",title:"Sair do sistema",onClick:()=>v(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})]})}),g&&b.jsx("div",{id:"menu-background",className:"navbar--menu-background",onClick:function(e){"menu-background"===e.target.id&&T()},children:b.jsxs("div",{className:"menu-content",children:[b.jsxs("div",{className:"search-area",children:[b.jsx("i",{className:"fas fa-search"}),b.jsx("input",{ref:d,placeholder:"Pesquisar...",value:x,onChange:e=>y(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of k)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){c.push(e.route),v(!1);break}}}}),x&&b.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:()=>y(""),children:b.jsx("i",{className:"fas fa-times"})}),b.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>F(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>F(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"navbar--menu-area",ref:p,children:k.map((e,t)=>b.jsx(ho,{opc:e,closeMenu:T,clickGroup:I,clickFavorite:D,isFavorite:O,enabledFavorite:i.apiFavorites,filter:x},t))}),b.jsx("div",{className:"menu-footer",children:b.jsx(a.Link,{to:i.exit,onClick:T,children:b.jsxs("div",{className:"user",children:[b.jsx("span",{className:"name",title:`Último acesso em ${null==s?void 0:s.lastAccess}`,children:null==s?void 0:s.name}),b.jsxs("span",{className:"sair",children:["Sair ",b.jsx(G,{})]})]})})})]})})]})},e.NavbarMU=function({menusConfig:{brand:e,company:r,menus:o,routes:i,user:s,validatePermis:l}}){const u=t.useRef(),c=t.useRef(),d=a.useHistory(),{theme:p,setTheme:h,canChangeTheme:f}=S(),[m,g]=t.useState(!1),[v,x]=t.useState(""),[y,k]=t.useState([]),[_,C]=t.useState([]);let j=[];const w=localStorage.getItem(vo);w&&(j=JSON.parse(w));const[E]=Se({url:i.apiFavorites,onTerminated:e=>{e.error?console.info("Erro ao obter lista de favoritos!",e.error):C(e.data)}}),[N]=Se({url:i.apiFavorites,method:"patch",onTerminated:e=>{e.error&&console.info("Erro ao salvar favoritos!",e.error)}});function A(){g(!1)}function T(e){let t=[...y],n=[];t.forEach(t=>{t===e&&(t.open=!t.open),t.open||n.push(t.caption)}),localStorage.setItem(vo,JSON.stringify(n)),k(t)}function I(e){let t=[...y];t.forEach(t=>{(null==t?void 0:t.menus)&&((null==t?void 0:t.stayOpen)?t.open=t.stayOpen:t.open=e)}),k(t),T(null)}function F(e,t){e.stopPropagation(),e.preventDefault();const n=_.filter(e=>e.route!==t.route);var r;n.length===_.length&&n.push({caption:((null==t?void 0:t.prefix)?t.prefix+" / ":"")+t.caption,route:t.route}),r=n,i.apiFavorites&&(N({data:r}),C(r))}function D(e){return _.some(t=>t.route===e)}return t.useEffect(()=>{i.apiFavorites&&E()},[]),t.useEffect(()=>{let e=[];null==_||_.forEach(t=>{o.forEach((n,r)=>{var o;if(r>0&&0!==(null==(o=null==n?void 0:n.menus)?void 0:o.length)){let o=n.menus.findIndex(e=>e.route===t.route);if(o>=0){let i=n.menus[o];e.push({...i,caption:t.caption,index:String(r).padStart(2,"0")+String(o).padStart(2,0)})}}})}),"Favoritos"===o[0].caption&&(o[0].menus=e.sort((e,t)=>e.index>t.index?1:e.index<t.index?-1:0)),k(function(e){let t=[];return e.forEach(e=>{let n={caption:e.caption,open:!j.includes(e.caption)||e.stayOpen,stayOpen:e.stayOpen,isFavorite:null==e?void 0:e.isFavorite,prefix:null==e?void 0:e.prefix,menus:[]};e.menus&&e.menus.length>0&&e.menus.filter(e=>{var t;return(null==e?void 0:e.isLine)||!(null==e?void 0:e.isLine)&&(e.caption.toLowerCase().includes(v.toLowerCase())||(null==(t=e.shortcut)?void 0:t.toLowerCase().includes(v.toLowerCase())))}).forEach(e=>{l(null==e?void 0:e.permis,null==e?void 0:e.acesso)&&n.menus.push({...e,prefix:null==n?void 0:n.prefix})}),v&&(n.open=!0),t.push(n)}),t.forEach(e=>{var t;e.menus&&((null==(t=e.menus[0])?void 0:t.isLine)&&(e.menus=e.menus.filter(e=>!(null==e?void 0:e.isLine))),e.menus=e.menus.filter((e,t,n)=>{var r;return!(t>0&&(null==(r=n[t-1])?void 0:r.isLine)&&e.isLine)}),e.menus=e.menus.filter((e,t,n)=>!(t===n.length-1&&(null==e?void 0:e.isLine))))}),t}(o))},[v,_]),t.useEffect(()=>{var e,t;n.isDesktop()&&(null==(e=null==u?void 0:u.current)||e.select(),null==(t=null==u?void 0:u.current)||t.focus())},[m]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"navbar-mu-area",children:b.jsxs("div",{className:"mu--container",children:[b.jsx(go,{isOpen:m,setIsOpen:g}),b.jsxs("div",{className:"mu--content",children:[b.jsx(mo,{isOpen:m,setIsOpen:g,brand:e,closeMenu:A,routes:i}),b.jsxs("div",{className:"mu--info",children:[b.jsx("div",{className:"info-line-1",children:r}),b.jsx("div",{className:"info-line-2",children:b.jsxs("span",{children:[null==s?void 0:s.title," ",b.jsx("strong",{children:null==s?void 0:s.name})]})})]}),b.jsxs("div",{className:"mu--buttons",children:[f&&b.jsx("button",{title:"Alterar entre o tema claro/escuro",className:"btn nav-button",onClick:()=>{const e="light"==p?"dark":"light";h(e),document.body.dataset.bsTheme=e},children:b.jsx("i",{className:"fa-solid fa-circle-half-stroke"})}),b.jsx(a.Link,{to:i.users,className:"nav-button btn-users",title:"Configurações do usuário",onClick:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-user-gear"})}),b.jsx(a.Link,{to:i.exit,className:"nav-button btn-exit",title:"Sair do sistema",onClick:()=>g(!1),children:b.jsx("i",{className:"fa-solid fa-right-from-bracket"})})]})]})]})}),b.jsx("div",{"data-open":m,id:"menu-background",className:"nv-menu--background",onClick:function(e){"menu-background"===e.target.id&&A()},children:b.jsxs("div",{className:"nv-menu--content","data-open":m,children:[b.jsxs("div",{className:"nv-menu--brand",children:[b.jsx(go,{isOpen:m,setIsOpen:g,menuClose:n.isMobile()}),b.jsx(mo,{isOpen:m,setIsOpen:g,brand:e,closeMenu:A,routes:i,showButtonClose:!0})]}),b.jsxs("div",{className:"nv-menu--search",children:[b.jsx("i",{className:"fas fa-search"}),b.jsx("input",{ref:u,placeholder:"Pesquisar...",value:v,onChange:e=>x(e.target.value),onKeyDown:function(e){if("Enter"==e.key)for(const t of y)if(t.menus&&0!=t.menus.length){const e=t.menus.find(e=>null!=e.route&&""!=e.route);if(e){d.push(e.route),g(!1);break}}}}),v&&b.jsx("button",{className:"text-danger",title:"Limpar pesquisa",onClick:function(){var e;x(""),null==(e=null==u?void 0:u.current)||e.focus()},children:b.jsx("i",{className:"fas fa-times"})}),b.jsx("button",{title:"Fechar todos os grupos de opções",onClick:()=>I(!1),children:b.jsx("i",{className:"fas fa-minus"})}),b.jsx("button",{title:"Expandir todos os grupos de opções",onClick:()=>I(!0),children:b.jsx("i",{className:"fas fa-plus"})})]}),b.jsx("div",{className:"nv-menu--opcoes",ref:c,children:y.map((e,t)=>b.jsx(ho,{opc:e,closeMenu:A,clickGroup:T,clickFavorite:F,isFavorite:D,enabledFavorite:i.apiFavorites},t))}),b.jsx("div",{className:"nv-menu--footer",children:b.jsx(a.Link,{to:i.exit,onClick:A,children:b.jsxs("div",{className:"foo-user",children:[b.jsx("span",{className:"foo-name",children:null==s?void 0:s.name}),b.jsxs("span",{className:"foo-sair",children:["Sair ",b.jsx(G,{})]})]})})}),b.jsxs("div",{className:"nv-menu--copy",children:["Último acesso em ",null==s?void 0:s.lastAccess]})]})})]})},e.Paginacao=function({pages:e,page:n,setPage:r,limitDefault:o=16,limit:i=16,setLimit:a,align:s="center"}){const[l]=t.useState(()=>{const e=[7,30,50,100];return e.includes(o)||e.push(o),e.sort((e,t)=>e-t)}),u=void 0!==a&&void 0!==i&&void 0!==o;function c(t){var o;t!==n&&t>=1&&t<=e&&(null==(o=document.querySelector("main"))||o.scrollTo(0,0),r(t))}return b.jsx("div",{className:"pgn-content","data-fixed":i>=30?"true":"false","data-align":s,children:b.jsxs("div",{className:"pgn-comps",children:[u&&b.jsxs("div",{className:"pgn-limit",children:[b.jsx("strong",{children:"Registros:"}),b.jsx("select",{className:"form-select form-select-sm",value:i,onChange:e=>a(Number(e.target.value)),children:l.map(e=>b.jsx("option",{value:e,children:e},e))})]}),b.jsxs("div",{className:"pgn-pages",children:[b.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para a primeira página",onClick:()=>c(1),disabled:n<=1,children:b.jsx("i",{className:"fas fa-angle-double-left"})}),b.jsx("button",{className:"btn btn-outline-"+(n<=1?"secondary":"info"),title:"Ir para página anterior",onClick:()=>c(Number(n)-1),disabled:n<=1,children:b.jsx("i",{className:"fas fa-angle-left"})}),b.jsx("span",{className:"p-2 text-body",children:b.jsxs("div",{children:[b.jsx("span",{className:"fw-bold",children:n}),e?b.jsxs("span",{children:[" / ",e]}):null]})}),b.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para próxima página",onClick:()=>c(Number(n)+1),disabled:n>=e,children:b.jsx("i",{className:"fas fa-angle-right"})}),b.jsx("button",{className:"btn btn-outline-"+(n>=e?"secondary":"info"),title:"Ir para a última página",onClick:()=>c(e),disabled:n>=e,children:b.jsx("i",{className:"fas fa-angle-double-right"})})]})]})})},e.Panel=ge,e.PanelDashboard=function({title:e,color:t="var(--pn-color-border)",backColor:n="var(--bs-body-bg)",className:r,minHeight:o,children:i,marginBottom:a=0,degrade:s=!1,...l}){return b.jsxs("div",{className:"panel-dashboard--container"+(r?` ${r}`:""),style:{minHeight:o,marginBottom:a,"--color":t,"--back-color":n,"--degrade-margin-top":s?"calc(calc(var(--panel-dash-top) * -1))":"0px","--border-top-width":s?"0px":"6px"},...l,children:[s&&b.jsx("div",{className:"pd-top"}),b.jsxs("div",{className:"pd-body",children:[e&&b.jsx("h3",{className:"pd-title",children:e}),i]})]})},e.PanelHeader=he,e.PrintButtons=function({onClose:e,showTypes:n}){const{reportType:r,setReportType:o}=S(),i=[{title:"PDF",icon:b.jsx("i",{className:"fa-solid fa-file-pdf"}),onClick(){o(0)}},{title:"Excel",icon:b.jsx("i",{className:"fa-solid fa-file-excel"}),onClick(){o(1)}},{title:"Word",icon:b.jsx("i",{className:"fa-solid fa-file-word"}),onClick(){o(2)}},{title:"Texto",icon:b.jsx("i",{className:"fa-regular fa-file-lines"}),onClick(){o(3)}}];return t.useEffect(()=>{n||o(0)},[]),b.jsxs("div",{className:"print-btn--container",children:[n&&b.jsx(M,{items:i,title:"Formato do relatório",direction:"down",children:b.jsxs("span",{className:"d-flex align-items-center gap-1",children:[b.jsxs("span",{children:["Formato",b.jsx("span",{className:"d-inline-block d-sm-none",children:" do relatório:"})]}),b.jsx("span",{className:"me-1",children:["PDF","Excel","Word","Texto"][r]}),b.jsx("i",{className:"fa-solid fa-chevron-down ms-auto fs-7"})]})}),b.jsxs("div",{className:"print-btn--buttons",children:[b.jsxs("button",{className:"btn btn-primary",type:"submit",children:[b.jsx("i",{className:"fas fa-print"})," Gerar relatório"]}),b.jsxs("button",{className:"btn btn-outline-danger",type:"button",onClick:e,children:[b.jsx("i",{className:"fas fa-times"})," Fechar"]})]})]})},e.QRCodeReader=Pe,e.RadioGroup=function({className:e="",label:t,name:n,value:r,setValue:o,options:a=[],disabled:s,cols:l=1}){return b.jsxs("div",{className:"rad-group--container "+e,style:{color:s?"var(--bs-secondary)":"currentColor"},children:[b.jsx("div",{className:"group-radio--label",children:t}),b.jsx("div",{className:"group-radio--body",style:{"--rad-group--cols":l},children:a.map((e,t)=>b.jsxs("label",{children:[b.jsx(i.Input,{type:"radio",name:n,checked:Number(r)===t,onChange:()=>o(t),disabled:s}),e]},t))})]})},e.ScrollContainer=function({children:e,hasMaxWidth:t=!0}){return b.jsx(Wr,{hasMaxWidth:t,children:b.jsx("div",{className:"scroll--content",children:e})})},e.TabControl=function({children:e,isMultine:n=!1,className:r="",classNameContent:o="",innerRef:i,...a}){const[s,l]=t.useState([]),u=t.useCallback(e=>{l(t=>{const n=t.findIndex(t=>t.id==(null==e?void 0:e.id));return-1==n?t.push({...Yr,...e}):t[n]={...t[n],...e},t.some(e=>e.isVisible&&e.isOpen)||(void 0===(null==e?void 0:e.isVisible)||(null==e?void 0:e.isVisible)?Xr(t):function(e,t){let n=e.findIndex(e=>e.id==t.id),r=!1;e.forEach(e=>{e.isOpen=!1});for(let o=n-1;o>=0;o-=1){const t=e[o];if((null==t?void 0:t.isVisible)&&!r){r=!0,t.isOpen=!0;break}}r||Xr(e)}(t,e)),[...t]})},[]),c=t.useCallback(e=>{l(t=>t.filter(t=>t.id!=e))},[]),d=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!0}:{...t,isOpen:!1}))},[]),p=t.useCallback(e=>{l(t=>t.map(t=>t.id==e?{...t,isOpen:!t.isOpen}:t))},[]),h=t.useCallback(e=>s.find(t=>t.id==e),[s]),f=t.useCallback(()=>{l(e=>{const t=e.map(e=>({...e})),n=t.findIndex(e=>e.isVisible&&e.isOpen);return n<0?Xr(t):t.forEach((e,t)=>e.isOpen=t==n),t})},[]);return t.useEffect(()=>{function e(){window.innerWidth>=768&&f()}return window.addEventListener("resize",e,null),()=>{window.removeEventListener("resize",e,null)}},[f]),t.useImperativeHandle(i,()=>({open(e){const t=h(e);t&&(null==t?void 0:t.isVisible)&&d(e)}}),[d,h]),b.jsx(Kr.Provider,{value:{tabs:s,updateOrInsertTab:u,removeTab:c,findTab:h,selectTab:d,toggleTab:p},children:b.jsxs("div",{className:`tab-control--container ${r}`,...a,children:[b.jsx(Zr,{isMultine:n}),b.jsx("div",{className:`tab-control--content ${o}`,children:e})]})})},e.TabSheet=function({tabId:e,title:r,caption:o,isVisible:i=!0,children:a,...s}){const{findTab:l,toggleTab:u,removeTab:c,updateOrInsertTab:d}=Jr(),p=t.useMemo(()=>e||n.random(999999),[]),h=l(p);return t.useEffect(()=>()=>c(p),[]),t.useEffect(()=>{d({id:p,caption:o,title:r,isVisible:i})},[d,r,o,i]),i?b.jsxs(Qr,{open:(null==h?void 0:h.isOpen)&&(null==h?void 0:h.isVisible),"data-in-tab-sheet":null!=h?"true":"false",...s,children:[b.jsx("div",{className:"bi-btn-area",children:b.jsxs("button",{type:"button",onClick:()=>u(p),children:[r," ",b.jsx("i",{className:"fas fa-chevron-down"})]})}),b.jsx("div",{className:`bi-body ${(null==h?void 0:h.isOpen)&&"bi-open"}`,children:a})]}):null},e.Table=function({colunas:t,acoes:r,opcoes:o,dados:a,alignTop:s,colorir:l=!0,border:u=!0,sizeBreak:c=767,msgSemDados:d="Nenhum registro encontrado!",getLineColor:p,onClick:h,fixedHeader:f,clickCanEdit:m,loading:g}){var v,x;t&&t.forEach(e=>{!e.tipo||"money"!=e.tipo&&"currency"!=e.tipo||(e.money=!0)}),void 0===m&&(m=e.hasTableLineClick);let y=!1;const k=(null==(v=null==r?void 0:r.acoes)?void 0:v.map(e=>({...e})))||[];if(r&&r.acoes){const e=null==(x=null==r?void 0:r.acoes)?void 0:x.filter(e=>e.ativa??!0);r.acoes=e,y=r.acoes.length>0}function _(e){const t=window.getSelection();if(t.rangeCount>0){const n=t.getRangeAt(0);if(e.contains(n.commonAncestorContainer)&&t.toString().length>0)return!0}return!1}return g?b.jsxs("div",{className:"py-2 hstack gap-2",children:[b.jsx(i.Spinner,{size:"sm",color:"info"})," ",b.jsx("span",{children:"Carregando..."})]}):a&&0!=a.length?b.jsx(O,{children:b.jsxs(R,{alignTop:s,sizeBreak:c,hasBorder:u,children:[b.jsx(L,{fixedHeader:f,colunas:t,incColActions:y}),b.jsx(V,{colunas:t,acoes:r,dados:a,opcoes:o,colorir:l,getLineColor:p,onClick:h||m?function(e,t){if(h){if(_(null==t?void 0:t.currentTarget))return;h(e,t)}else if(m&&n.isDesktop()){if(_(null==t?void 0:t.currentTarget))return;const n=e[(null==r?void 0:r.campo)||"id"];if(null!=n){const t=k[0];t&&!1!==t.ativa&&t.funcao(n,e,0)}}}:void 0})]})}):b.jsx("div",{className:"alert alert-warning mb-0",children:d})},e.TextHtml=qr,e.Toggle=function({name:e,checked:t,disabled:n,onChange:r,children:o,toRight:i,className:a="",...s}){return b.jsx(Hr,{checked:t,disabled:n,className:a,...s,children:b.jsxs("label",{style:{flexDirection:i?"row-reverse":"row",justifyContent:i?"space-between":"flex-start"},children:[b.jsx("div",{className:"form-switch",children:b.jsx("input",{disabled:n,type:"checkbox",className:"form-check-input",checked:t,onChange:function(){!n&&r&&r({target:{name:e,checked:!t,value:!t}})}})}),o&&b.jsx("span",{className:"title",children:o})]})})},e.cache=ao,e.createApiConfig=function(e=D){const t={...D,...e};return t.auth={...D.auth,...e.auth},t},e.createDropdownItems=ce,e.createMenuOptions=function(e){return e},e.createTableActions=e=>e,e.createTableCols=e=>e,e.createTableOptions=e=>e,e.getAlign=P,e.getDataCol=B,e.setRouteMain=function(e){me=e},e.setTableLineClick=function(t){e.hasTableLineClick=t},e.useApi=Se,e.useLibContext=S,e.useLocalForage=function(e,n,r=1){const[o,i]=t.useState(n);return t.useEffect(()=>{ro.getItem(e).then(t=>{t&&(t.versao==r?i(t.data):ro.removeItem(e))})},[]),t.useEffect(()=>{ro.setItem(e,{versao:r,data:o})},[o]),[o,i]},e.useLocalStorage=oo,e.useLocalhostBadge=_,e.useParamId=function(){let e=0,t=a.useParams();return t&&t.id&&(e=parseInt(t.id)),e},e.useQuery=function(){const{search:e}=a.useLocation();return t.useMemo(()=>new URLSearchParams(e),[e])},e.useSessionStorage=function(e,n){const[r,o]=t.useState(()=>{const t=sessionStorage.getItem(e);return t&&"undefined"!==t&&"null"!==t&&""!==t?JSON.parse(t):n});return t.useEffect(()=>{sessionStorage.setItem(e,JSON.stringify(r))},[r]),[r,o]},e.useTestDomainBadge=C,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
972
972
  //# sourceMappingURL=jclib-ui.umd.js.map