import{u as f,$ as s}from"./index.737529e8.1750111005555.js";let l=[],u=!1;function r(t,e,n){!e.length||e==""||e==null||e==null||e=="{}"||e=="[]"||l.push({level:t,data:e,caller:n,timestamp:Date.now(),version:f("vApp").value||"n/a"})}async function h(){if(u||l.length===0)return;u=!0;const t=l.splice(0,l.length);try{await s("/options/logger-front-end/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}catch(e){console.error("Erro ao enviar logs em lote",e),l=t.concat(l)}u=!1}setInterval(h,1e4);(function(){console.log=function(...n){if(!n.length||n==""||n==null||n==null)return;const o=e();r("log",n,o)},console.warn=function(...n){if(!n.length||n==""||n==null||n==null)return;const o=e();r("warn",n,o)},console.error=function(...n){if(!n.length||n==""||n==null||n==null)return;const o=e();r("error",n,o)};function e(){const n=new Error;if(!n.stack)return null;const o=n.stack.split(`
`);for(let c=1;c<o.length;c++){const i=o[c];if(!i.includes("patchConsole.js")&&!i.includes("getCallerInfo")&&!i.includes("console.")&&!i.includes("Error"))return i.trim()}return null}})();
