1import"./chunk-WWX6BADO.js";var p=["log","info","warn","error","debug"];var S="__gojiberryDevConsoleForwarderInstalled__";function _(r,t="client"){let i=window;if(i[S])return;i[S]=!0;let f=console,n=p.reduce((o,e)=>(o[e]=f[e].bind(console),o),{});for(let o of p)f[o]=(...e)=>{let h=new Date().toISOString();n[o](...e),c(r,t,o,e,h)};window.addEventListener("error",o=>{let e=[`Uncaught ${o.message}`];o.filename&&e.push(`${o.filename}:${o.lineno}:${o.colno}`),o.error&&e.push(s(o.error)),c(r,t,"error",e)}),window.addEventListener("unhandledrejection",o=>{c(r,t,"error",["Unhandled promise rejection",s(o.reason)])})}function c(r,t,i,f,n=new Date().toISOString()){try{let o={source:t,level:i,args:f.map(s),timestamp:n,url:window.location.href},e=JSON.stringify(o);fetch(r,{method:"POST",mode:"cors",credentials:"omit",cache:"no-store",keepalive:e.length<6e4,headers:{"Content-Type":"text/plain;charset=UTF-8"},body:e}).catch(()=>{})}catch{}}function s(r){return O(m(r))}function m(r){if(typeof r=="string")return r;if(typeof r=="number"||typeof r=="boolean"||typeof r=="bigint"||typeof r=="symbol"||r==null)return String(r);if(typeof r=="function")return`[Function ${r.name||"anonymous"}]`;if(y(r))return[d(r),r.stack].filter(Boolean).join(` 2`);if(g(r))return a(r);if(r instanceof Date)return Number.isNaN(r.getTime())?"Invalid Date":r.toISOString();if(r instanceof RegExp)return String(r);if(typeof URL<"u"&&r instanceof URL||typeof URLSearchParams<"u"&&r instanceof URLSearchParams)return r.toString();if(r instanceof Map)return`Map(${r.size}) ${m(Array.from(r.entries()))}`;if(r instanceof Set)return`Set(${r.size}
2) ${m(Array.from(r.values()))}`;try{let t=new WeakSet;return JSON.stringify(r,(f,n)=>{if(typeof n=="bigint")return`${n.toString()}n`;if(typeof n=="symbol")return n.toString();if(typeof n=="function")return`[Function ${n.name||"anonymous"}]`;if(y(n))return{name:n.name,message:n.message,stack:n.stack};if(g(n))return a(n);if(n instanceof Map)return Array.from(n.entries());if(n instanceof Set)return Array.from(n.values());if(n!=null&&typeof n=="object"){if(t.has(n))return"[Circular]";t.add(n)}return n},2)??$(r)}catch{return $(r)}}function $(r){if(r==null||typeof r!="object")try{return String(r)}catch{return"[Unserializable]"}let t=b(r),i;try{i=Object.keys(r)}catch{return`[${t}]`}if(i.length===0)return`[${t}]`;let f=i.slice(0,20).map(e=>`${e}: ${E(N(r,e))}`),n=i.length>20?", \u2026":"";return`${t==="Object"?"":`${t} `}{ ${f.join(", ")}${n} }`}function N(r,t){try{return r[t]}catch(i){return`[Thrown while reading: ${E(i)}]`}}function E(r){return typeof r=="string"?JSON.stringify(r):typeof r=="number"||typeof r=="boolean"||typeof r=="bigint"||typeof r=="symbol"||r==null?String(r):typeof r=="function"?`[Function ${r.name||"anonymous"}]`:y(r)?d(r):g(r)?a(r):r instanceof Date?Number.isNaN(r.getTime())?"Invalid Date":r.toISOString():r instanceof RegExp?String(r):`[${b(r)}]`}function b(r){let t=Object.prototype.toString.call(r).slice(8,-1);try{let i=r.constructor?.name;if(t==="Object"&&i&&i!=="Object")return i}catch{}return t}function y(r){return r instanceof Error||r!=null&&typeof r=="object"&&"message"in r&&"stack"in r}function d(r){return`${r.name||"Error"}: ${r.message}`}function g(r){return typeof Node<"u"&&r instanceof Node}function a(r){if(r instanceof Element){let t=r.id?`#${r.id}`:"",i=r.classList.length>0?`.${Array.from(r.classList).join(".")}`:"";return`<${r.tagName.toLowerCase()}${t}${i}>`}return`[${r.nodeName}]`}function O(r){return r.length<=8e3?r:`${r.slice(0,8e3)}\u2026 [truncated]`}export{_ as installDevConsoleForwarder};
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.