1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="98a483c9-4de1-5a42-8265-1aab34f59d13")}catch(e){}}(); 3import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,i as n,n as r,s as i,t as a}from"./jsx-runtime-CVzb8IN3.js";import{at as o}from"./scopeData-DhrsEdHM.js";import{t as s}from"./fonts-DwDcDbGQ.js";import{r as c}from"./tokens-CmEskuyo.js";import{t as l}from"./medias-pqb9H9Ud.js";import{c as u}from"./localStorage-Bjp-Z2zG.js";import{c as d,v as f}from"./config-BWhw1vnY.js";import{t as p}from"./AuthContext-DDOotqGr.js";import{n as m}from"./GlobalFiltersContext-D1mI3ADA.js";import"./usePermission-BpgG76E9.js";import{t as h}from"./Button-CmaWW8wv.js";import{t as g}from"./ModalGeneric-CXUhccLm.js";function _(e){this.message=e}_.prototype=Error(),_.prototype.name=`InvalidCharacterError`;var v=typeof window<`u`&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,``);if(t.length%4==1)throw new _(`'atob' failed: The string to be decoded is not correctly encoded.`);for(var n,r,i=0,a=0,o=``;r=t.charAt(a++);~r&&(n=i%4?64*n+r:r,i++%4)&&(o+=String.fromCharCode(255&n>>(-2*i&6))))r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`.indexOf(r);return o};function y(e){var t=e.replace(/-/g,`+`).replace(/_/g,`/`);switch(t.length%4){case 0:break;case 2:t+=`==`;break;case 3:t+=`=`;break;default:throw`Illegal base64url string!`}try{return function(e){return decodeURIComponent(v(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n=`0`+n),`%`+n})))}(t)}catch{return v(t)}}function b(e){this.message=e}function x(e,t){if(typeof e!=`string`)throw new b(`Invalid token specified`);var n=!0===(t||={}).header?0:1;try{return JSON.parse(y(e.split(`.`)[n]))}catch(e){throw new b(`Invalid token specified: `+e.message)}}b.prototype=Error(),b.prototype.name=`InvalidTokenError`;var S=e(i()),C={isFiltersOpen:!1,isMobileMenuOpen:!1,isMobileProfileOpen:!1,isLoading:!1},w=JSON.parse(localStorage.getItem(u.globalComponentsContext))||C,T=a(),E=(0,S.createContext)(w);E.displayName=`GlobalComponentsContext`;var D=({children:e})=>{let[t,n]=(0,S.useState)(w);(0,S.useEffect)(()=>{localStorage.setItem(u.globalComponentsContext,JSON.stringify(t))},[t]);let r=(0,S.useMemo)(()=>({globalComponentsContext:t,setGlobalComponentsContext:n}),[t]);return(0,T.jsx)(E.Provider,{value:r,children:e})},O=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),k=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),A=e=>{let t=k(e);return t.charAt(0).toUpperCase()+t.slice(1)},j=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),M={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},N=(0,S.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,S.createElement)(`svg`,{ref:c,...M,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:j(`lucide`,i),...s},[...o.map(([e,t])=>(0,S.createElement)(e,t)),...Array.isArray(a)?a:[a]])),P=(e,t)=>{let n=(0,S.forwardRef)(({className:n,...r},i)=>(0,S.createElement)(N,{ref:i,iconNode:t,className:j(`lucide-${O(A(e))}`,`lucide-${e}`,n),...r}));return n.displayName=A(e),n},F=P(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),I=P(`log-out`,[[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}],[`polyline`,{points:`16 17 21 12 16 7`,key:`1gabdz`}],[`line`,{x1:`21`,x2:`9`,y1:`12`,y2:`12`,key:`1uyos4`}]]),L=P(`ticket`,[[`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`,key:`qn84l0`}],[`path`,{d:`M13 5v2`,key:`dyzc3o`}],[`path`,{d:`M13 17v2`,key:`1ont0d`}],[`path`,{d:`M13 11v2`,key:`1wjjxi`}]]),R=P(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),z=P(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),B=r` 4 from { opacity: 0; transform: translateY(-10px); } 5 to { opacity: 1; transform: translateY(0); } 6`,ee=r` 7 0% { transform: scale(1); } 8 50% { transform: scale(1.05); } 9 100% { transform: scale(1); } 10`,V=t.div` 11 display: flex; 12 align-items: center; 13 gap: 8px; 14 cursor: pointer; 15 position: relative; 16 //margin-left: 16px; 17`,H=t.div` 18 font-size: 13px; 19 color: ${c.gray}; 20 display: flex; 21 align-items: center; 22 gap: 4px; 23 24 span { 25 font-weight: 500; 26 } 27 28 @media (max-width: ${l.tablet}) { 29 display: none; 30 } 31`,U=t.div` 32 width: 32px; 33 height: 32px; 34 border-radius: 50%; 35 background-color: #f28c28; // Orange from the original design 36 display: flex; 37 align-items: center; 38 justify-content: center; 39 color: ${c.white}; 40 transition: all 0.2s ease; 41 42 &:hover { 43 animation: ${ee} 0.5s ease; 44 } 45`,W=t.div` 46 position: absolute; 47 top: calc(100% + 8px); 48 right: 0; 49 background-color: ${c.white}; 50 border-radius: 8px; 51 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 52 width: 200px; 53 z-index: 100; 54 overflow: hidden; 55 opacity: ${e=>+!!e.isOpen}; 56 visibility: ${e=>e.isOpen?`visible`:`hidden`}; 57 transform: ${e=>e.isOpen?`translateY(0)`:`translateY(-10px)`}; 58 transition: all 0.2s ease-in-out; 59 animation: ${e=>e.isOpen&&n` 60 ${B} 0.2s ease-out 61 `}; 62`,G=t.a` 63 padding: 12px 16px; 64 display: flex; 65 align-items: center; 66 gap: 12px; 67 cursor: pointer; 68 transition: all 0.15s ease;
69 color: ${c.gray}; 70 text-decoration: none; 71 72 &:hover { 73 background-color: ${c.lightGray}; 74 } 75 76 svg { 77 color: #f28c28; 78 } 79`,K=t.div` 80 height: 1px; 81 background-color: ${c.lightGray}; 82 margin: 4px 0; 83`,q=`/assets/pop-up-blocked-BMVPEHIw.gif`,J=t.div` 84 display: flex; 85 flex-direction: column; 86 align-items: center; 87 88 padding: 32px 10px; 89 90 img { 91 max-width: 360px; 92 max-height: 266px; 93 margin: 0 0 32px; 94 } 95 96 h6 { 97 font-family: ${s.family.text}; 98 font-size: 16px; 99 font-style: normal; 100 font-weight: 700; 101 line-height: 19px; 102 text-align: center; 103 margin-bottom: 16px; 104 color: ${c.tundora}; 105 } 106 107 span { 108 font-family: ${s.family.text}; 109 font-size: 14px; 110 font-style: normal; 111 font-weight: 500; 112 line-height: 16px; 113 text-align: center; 114 margin-bottom: 32px; 115 color: ${c.gray}; 116 } 117 118 button { 119 padding: 7px 32px; 120 border-radius: 3px; 121 font-family: ${s.family.text}; 122 font-size: 12px; 123 font-style: normal; 124 font-weight: 500; 125 line-height: 14px; 126 text-align: center; 127 color: ${c.white}; 128 } 129 130 @media screen and (min-width: ${l.tablet}) { 131 padding-right: 25px; 132 padding-left: 25px; 133 } 134`,Y=(0,S.createContext)();Y.displayName=`SocketIoContext`;var X=({children:e})=>{let[t,n]=(0,S.useState)(!1),{authContext:r}=(0,S.useContext)(p),{headerFiltersContext:i}=(0,S.useContext)(m),{companies:a,units:s}=i?.headerFilters;return(0,S.useEffect)(()=>{let e=o();if(a){let t=a?.name?.split(` `)?.slice(0,3)?.join(` `);e.setTag(`Empresa`,a?.id),e.setTag(`Empresa.nome`,t),e.setTag(`Empresa.tipo`,a?.tipoNome)}s&&(e.setTag(`Unidade`,s?.id),e.setTag(`Unidade.nome`,s?.name))},[a,a?.name,a?.id,s,s?.name,s?.id]),(0,S.useEffect)(()=>{let e=o();if(r.isAuthenticated&&r.token){let{email:t,unique_name:n,nameid:i,utyp:a}=f(r.token);e.setUser({email:t,username:n,id:i}),e.setTag(`user.tipo`,a)}else e.clear()},[r.isAuthenticated,r.token,r.user]),(0,T.jsxs)(Y.Provider,{value:{},children:[e,(0,T.jsx)(g,{open:t,hasHeader:!0,closeModal:()=>n(!1),size:{maxWidth:`521px`},children:(0,T.jsxs)(J,{children:[(0,T.jsx)(`h6`,{children:`Habilite os pop-ups para gerar relatórios`}),(0,T.jsx)(`span`,{children:`Para habilitar siga os passos abaixo:`}),(0,T.jsx)(`img`,{src:q,alt:`Pop-up bloqueada`}),(0,T.jsx)(h,{type:`button`,onClick:()=>n(!1),children:`Entendi`})]})})]})},Z=(0,S.createContext)(null),Q=()=>(0,S.useContext)(Z),$=t.div` 135 position: relative; 136 height: 100%; 137 width: 100%; 138 margin: 0 auto; 139 background: ${e=>e.background||`transparent`}; 140 141 display: flex; 142 143 @media screen and (max-width: ${l.desktopSm}) { 144 flex-direction: column; 145 } 146`,te={getUserMenu:({tipoUsuario:e,login:t,unidade:n,empresa:r})=>d({method:`GET`,url:`/v1/Usuario/UsuarioMenu`,params:{login:t,tipoUsuario:e,unidade:n,empresa:r},headers:{"content-type":`application/json`}})},ne=`data:image/svg+xml,%3csvg%20width='42'%20height='45'%20viewBox='0%200%2042%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M37.7843%208.22837L25.2%201.11585C23.9241%200.384951%2022.4751%200%2021%200C19.5249%200%2018.0759%200.384951%2016.8%201.11585L4.21577%208.22837C2.93478%208.95121%201.87016%209.99556%201.1298%2011.2555C0.389448%2012.5155%20-0.000347972%2013.9464%202.33084e-07%2015.403V29.597C0.000523686%2031.0576%200.390389%2032.4924%201.13038%2033.7572C1.87037%2035.0221%202.93446%2036.0724%204.21577%2036.8027L16.8%2043.8842C18.0759%2044.6151%2019.5249%2045%2021%2045C22.4751%2045%2023.9241%2044.6151%2025.2%2043.8842L37.7843%2036.8027C39.0656%2036.0724%2040.1297%2035.0221%2040.8697%2033.7572C41.6097%2032.4924%2041.9995%2031.0576%2042%2029.597V15.403C42.0003%2013.9464%2041.6106%2012.5155%2040.8702%2011.2555C40.1299%209.99556%2039.0653%208.95121%2037.7843%208.22837V8.22837ZM21.1101%208.01096C21.7324%208.01096%2022.3406%208.19311%2022.858%208.53439C23.3754%208.87567%2023.7786%209.36075%2024.0167%209.92828C24.2548%2010.4958%2024.3171%2011.1203%2024.1958%2011.7228C24.0744%2012.3253%2023.7747%2012.8787%2023.3347%2013.3131C22.8947%2013.7474%2022.3341%2014.0432%2021.7239%2014.1631C21.1136%2014.2829%2020.481%2014.2214%2019.9062%2013.9863C19.3313%2013.7513%2018.84%2013.3532%2018.4943%2012.8424C18.1486%2012.3316%2017.9641%2011.7312%2017.9641%2011.1169C17.9641%2010.2931%2018.2955%209.50312%2018.8855%208.92065C19.4755%208.33818%2020.2757%208.01096%2021.1101%208.01096V8.01096ZM10.6023%2016.3037H31.6495V20.4656H10.6023V16.3037ZM28.9124%2034.2248L21.3303%2026.8017C21.3107%2026.7695%2021.2831%2026.7429%2021.25%2026.7244C21.2169%2026.706%2021.1796%2026.6963%2021.1416%2026.6963C21.1036%2026.6963%2021.0662%2026.706%2021.0331%2026.7244C21%2026.7429%202
1460.9724%2026.7695%2020.9528%2026.8017L13.3708%2034.1937L9.59551%2032.0196L17.9641%2023.8511C18.8047%2023.0391%2019.9341%2022.5845%2021.1101%2022.5845C22.2862%2022.5845%2023.4155%2023.0391%2024.2562%2023.8511L32.5932%2032.0196L28.9124%2034.2248Z'%20fill='%231E1E1E'/%3e%3c/svg%3e`,re=e=>e.subMenu&&e.subMenu.length>0?!e.subMenu.some(e=>e.acesso===!0):!e.acesso,ie=[`/almoxarifado/solicitacoes`,`/almoxarifado/movimentacao`,`/almoxarifados/showalmoxarifadostablepage.aspx`],ae=e=>ie.some(t=>e.url?.toLowerCase().includes(t)),oe=(e,{habilitarModuloAlmoxarifados:t=!0}={})=>({first:e[0]?.menu?.filter(e=>e.nome!==`Home`)?.map(e=>{let n={label:e.nome,link:e.url,disabled:re(e),isExternal:!0};return e.subMenu&&e.subMenu.length>0&&(n.children=e.subMenu.filter(e=>t||!ae(e)).map(e=>({label:e.nome,link:e.url,disabled:!e.acesso,isExternal:!0}))),n})});export{x as C,C as S,I as _,Z as a,E as b,K as c,V as d,H as f,L as g,R as h,$ as i,W as l,z as m,ne as n,Q as o,U as p,te as r,X as s,oe as t,G as u,F as v,D as x,P as y}; 147//# sourceMappingURL=menuAdmin-BroPHYrR.js.map 148//# debugId=98a483c9-4de1-5a42-8265-1aab34f59d13
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.