BYPASS SHELL BY ./RAZORGANZ
Server: nginx/1.20.1
System: Linux iZdzfnv9mwfppeZ 5.10.134-19.2.al8.x86_64 #1 SMP Wed Oct 29 22:47:09 CST 2025 x86_64
User: apache (48)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //lib/node_modules/openclaw/node_modules/tslog/browser/index.js
"use strict";var tslog=(()=>{var H=Object.defineProperty;var Fe=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var ve=Object.prototype.hasOwnProperty;var Be=(t,e)=>{for(var n in e)H(t,n,{get:e[n],enumerable:!0})},De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Re(e))!ve.call(t,s)&&s!==n&&H(t,s,{get:()=>e[s],enumerable:!(r=Fe(e,s))||r.enumerable});return t};var _e=t=>De(H({},"__esModule",{value:!0}),t);var nt={};Be(nt,{BaseLogger:()=>v,Logger:()=>re,createLoggerEnvironment:()=>ke,loggerEnvironment:()=>tt});function se(t){return{href:t.href,protocol:t.protocol,username:t.username,password:t.password,host:t.host,hostname:t.hostname,port:t.port,pathname:t.pathname,search:t.search,searchParams:[...t.searchParams].map(([e,n])=>({key:e,value:n})),hash:t.hash,origin:t.origin}}var F={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function R(t,e,n,r=!1){let s=String(e),l=(f,c)=>`\x1B[${c[0]}m${f}\x1B[${c[1]}m`,a=(f,c)=>c!=null&&typeof c=="string"?l(f,F[c]):c!=null&&Array.isArray(c)?c.reduce((b,h)=>a(b,h),f):c!=null&&c[f.trim()]!=null?a(f,c[f.trim()]):c!=null&&c["*"]!=null?a(f,c["*"]):f,g=null;return s.replace(/{{(.+?)}}/g,(f,c)=>{let b=n[c]!=null?String(n[c]):r?"":f;return t.stylePrettyLogs?a(b,t?.prettyLogStyles?.[c]??g)+l("",F.reset):b})}function I(t,e=2,n=0){return t!=null&&isNaN(t)?"":(t=t!=null?t+n:t,e===2?t==null?"--":t<10?"0"+t:t.toString():t==null?"---":t<10?"00"+t:t<100?"0"+t:t.toString())}function G(t,e){if(e==null)return{text:"",template:t.prettyLogTemplate,placeholders:{}};let n=t.prettyLogTemplate,r={};n.includes("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}")?n=n.replace("{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}","{{dateIsoStr}}"):t.prettyLogTimeZone==="UTC"?(r.yyyy=e.date?.getUTCFullYear()??"----",r.mm=I(e.date?.getUTCMonth(),2,1),r.dd=I(e.date?.getUTCDate(),2),r.hh=I(e.date?.getUTCHours(),2),r.MM=I(e.date?.getUTCMinutes(),2),r.ss=I(e.date?.getUTCSeconds(),2),r.ms=I(e.date?.getUTCMilliseconds(),3)):(r.yyyy=e.date?.getFullYear()??"----",r.mm=I(e.date?.getMonth(),2,1),r.dd=I(e.date?.getDate(),2),r.hh=I(e.date?.getHours(),2),r.MM=I(e.date?.getMinutes(),2),r.ss=I(e.date?.getSeconds(),2),r.ms=I(e.date?.getMilliseconds(),3));let s=t.prettyLogTimeZone==="UTC"?e.date:e.date!=null?new Date(e.date.getTime()-e.date.getTimezoneOffset()*6e4):void 0;r.rawIsoStr=s?.toISOString()??"",r.dateIsoStr=s?.toISOString().replace("T"," ").replace("Z","")??"",r.logLevelName=e.logLevelName,r.fileNameWithLine=e.path?.fileNameWithLine??"",r.filePathWithLine=e.path?.filePathWithLine??"",r.fullFilePath=e.path?.fullFilePath??"";let l=t.parentNames?.join(t.prettyErrorParentNamesSeparator);l=l!=null&&e.name!=null?l+t.prettyErrorParentNamesSeparator:void 0;let a=e.name!=null||l!=null?`${l??""}${e.name??""}`:"";return r.name=a,r.nameWithDelimiterPrefix=a.length>0?t.prettyErrorLoggerNameDelimiter+a:"",r.nameWithDelimiterSuffix=a.length>0?a+t.prettyErrorLoggerNameDelimiter:"",t.overwrite?.addPlaceholders!=null&&t.overwrite.addPlaceholders(e,r),{text:R(t,n,r),template:n,placeholders:r}}var ae=[/(?:^|[\\/])node_modules[\\/].*tslog/i,/(?:^|[\\/])deps[\\/].*tslog/i,/tslog[\\/]+src[\\/]+internal[\\/]/i,/tslog[\\/]+src[\\/]BaseLogger/i,/tslog[\\/]+src[\\/]index/i];function We(t){let e=typeof t?.stack=="string"?t.stack:void 0;return e==null||e.length===0?[]:e.split(`
`).map(n=>n.trimEnd())}function ze(t){return t.filter(e=>e.length>0&&!/^\s*Error\b/.test(e))}function $e(t,e){let n=[];for(let r of t){let s=e(r);s!=null&&n.push(s)}return n}function le(t,e=ae){for(let n=0;n<t.length;n+=1){let r=t[n],s=r.filePath??"",l=r.fullFilePath??"";if(!e.some(a=>a.test(s)||a.test(l)))return n}return 0}function Ke(t){return ze(We(t))}function W(t,e){return $e(Ke(t),e)}function J(t,e){return t<0?0:t>=e?Math.max(0,e-1):t}function Z(){return[...ae]}var Ve=5;function ue(t,e={}){let n=e.maxDepth??Ve,r=[],s=new Set,l=t,a=0;for(;l!=null&&a<n;){let g=l?.cause;if(g==null||s.has(g))break;s.add(g),r.push(Y(g)),l=g,a+=1}return r}function Y(t){if(t instanceof Error)return t;let e=new Error(typeof t=="string"?t:JSON.stringify(t));return typeof t=="object"&&t!=null&&Object.assign(e,t),e}function z(t){let e=new Set;return JSON.stringify(t,(n,r)=>{if(typeof r=="object"&&r!==null){if(e.has(r))return"[Circular]";e.add(r)}return typeof r=="bigint"?`${r}`:typeof r>"u"?"[undefined]":r})}function T(t,e){let n={seen:[],stylize:ce};return e!=null&&me(n,e),N(n.showHidden)&&(n.showHidden=!1),N(n.depth)&&(n.depth=2),N(n.colors)&&(n.colors=!0),N(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=He),K(n,t,n.depth)}T.colors=F;T.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Ue(t){return typeof t=="boolean"}function N(t){return t===void 0}function ce(t){return t}function He(t,e){let n=T.styles[e];return n!=null&&T?.colors?.[n]?.[0]!=null&&T?.colors?.[n]?.[1]!=null?"\x1B["+T.colors[n][0]+"m"+t+"\x1B["+T.colors[n][1]+"m":t}function $(t){return typeof t=="function"}function fe(t){return typeof t=="string"}function Ge(t){return typeof t=="number"}function pe(t){return t===null}function de(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function X(t){return V(t)&&te(t)==="[object RegExp]"}function V(t){return typeof t=="object"&&t!==null}function Q(t){return V(t)&&(te(t)==="[object Error]"||t instanceof Error)}function ge(t){return V(t)&&te(t)==="[object Date]"}function te(t){return Object.prototype.toString.call(t)}function Je(t){let e={};return t.forEach(n=>{e[n]=!0}),e}function Ze(t,e,n,r,s){let l=[];for(let a=0,g=e.length;a<g;++a)de(e,String(a))?l.push(ee(t,e,n,r,String(a),!0)):l.push("");return s.forEach(a=>{a.match(/^\d+$/)||l.push(ee(t,e,n,r,a,!0))}),l}function q(t){return"["+Error.prototype.toString.call(t)+"]"}function K(t,e,n=0){if(t.customInspect&&e!=null&&$(e)&&e?.inspect!==T&&!(e?.constructor&&e?.constructor.prototype===e)){if(typeof e.inspect!="function"&&e.toString!=null)return e.toString();let b=e?.inspect(n,t);return fe(b)||(b=K(t,b,n)),b}let r=C(t,e);if(r)return r;let s=Object.keys(e),l=Je(s);try{t.showHidden&&Object.getOwnPropertyNames&&(s=Object.getOwnPropertyNames(e))}catch{}if(Q(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return q(e);if(s.length===0)if($(t.stylize)){if($(e)){let b=e.name?": "+e.name:"";return t.stylize("[Function"+b+"]","special")}if(X(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(ge(e))return t.stylize(Date.prototype.toISOString.call(e),"date");if(Q(e))return q(e)}else return e;let a="",g=!1,f=[`{
`,`
}`];if(Array.isArray(e)&&(g=!0,f=[`[
`,`
]`]),$(e)&&(a=" [Function"+(e.name?": "+e.name:"")+"]"),X(e)&&(a=" "+RegExp.prototype.toString.call(e)),ge(e)&&(a=" "+Date.prototype.toUTCString.call(e)),Q(e)&&(a=" "+q(e)),s.length===0&&(!g||e.length==0))return f[0]+a+f[1];if(n<0)return X(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);let c;return g?c=Ze(t,e,n,l,s):c=s.map(b=>ee(t,e,n,l,b,g)),t.seen.pop(),Ye(c,a,f)}function ee(t,e,n,r,s,l){let a,g,f={value:void 0};try{f.value=e[s]}catch{}try{Object.getOwnPropertyDescriptor&&(f=Object.getOwnPropertyDescriptor(e,s)||f)}catch{}if(f.get?f.set?g=t.stylize("[Getter/Setter]","special"):g=t.stylize("[Getter]","special"):f.set&&(g=t.stylize("[Setter]","special")),de(r,s)||(a="["+s+"]"),g||(t.seen.indexOf(f.value)<0?(pe(n)?g=K(t,f.value,void 0):g=K(t,f.value,n-1),g.indexOf(`
`)>-1&&(l?g=g.split(`
`).map(c=>"  "+c).join(`
`).substr(2):g=`
`+g.split(`
`).map(c=>"   "+c).join(`
`))):g=t.stylize("[Circular]","special")),N(a)){if(l&&s.match(/^\d+$/))return g;a=JSON.stringify(""+s),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,"\\'").replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+g}function C(t,e){if(N(e))return t.stylize("undefined","undefined");if(fe(e)){let n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\\'")+"'";return t.stylize(n,"string")}if(Ge(e))return t.stylize(""+e,"number");if(Ue(e))return t.stylize(""+e,"boolean");if(pe(e))return t.stylize("null","null")}function Ye(t,e,n){return n[0]+(e===""?"":e+`
`)+"  "+t.join(`,
  `)+" "+n[1]}function me(t,e){let n={...t};if(!e||!V(e))return t;let r={...e},s=Object.keys(e),l=s.length;for(;l--;)n[s[l]]=r[s[l]];return n}function he(t,...e){let n={seen:[],stylize:ce};t!=null&&me(n,t);let r=e[0],s=0,l="",a="";if(typeof r=="string"){if(e.length===1)return r;let g,f=0;for(let c=0;c<r.length-1;c++)if(r.charCodeAt(c)===37){let b=r.charCodeAt(++c);if(s+1!==e.length){switch(b){case 115:{let h=e[++s];typeof h=="number"||typeof h=="bigint"?g=C(n,h):typeof h!="object"||h===null?g=String(h):g=T(h,{...t,compact:3,colors:!1,depth:0});break}case 106:g=z(e[++s]);break;case 100:{let h=e[++s];typeof h=="bigint"?g=C(n,h):typeof h=="symbol"?g="NaN":g=C(n,h);break}case 79:g=T(e[++s],t);break;case 111:g=T(e[++s],{...t,showHidden:!0,showProxy:!0,depth:4});break;case 105:{let h=e[++s];typeof h=="bigint"?g=C(n,h):typeof h=="symbol"?g="NaN":g=C(n,parseInt(g));break}case 102:{let h=e[++s];typeof h=="symbol"?g="NaN":g=C(n,parseInt(h));break}case 99:s+=1,g="";break;case 37:l+=r.slice(f,c),f=c+1;continue;default:continue}f!==c-1&&(l+=r.slice(f,c-1)),l+=g,f=c+1}else b===37&&(l+=r.slice(f,c),f=c+1)}f!==0&&(s++,a=" ",f<r.length&&(l+=r.slice(f)))}for(;s<e.length;){let g=e[s];l+=a,l+=typeof g!="string"?T(g,t):g,a=" ",s++}return l}function be(){try{let t=globalThis?.process;if(typeof t?.cwd=="function")return t.cwd()}catch{}try{let t=globalThis?.Deno;if(typeof t?.cwd=="function")return t.cwd()}catch{}}function ne(){return typeof window<"u"&&typeof document<"u"}function ye(){if(!ne())return!1;let e=globalThis?.navigator?.userAgent??"";return/firefox/i.test(e)||globalThis?.CSS?.supports?.("color","#000")?!0:/safari/i.test(e)&&!/chrome/i.test(e)}function ke(){let t=Pe(),e=Ee(t),n=t.name==="browser"||t.name==="worker",r=n?[...Z(),/node_modules[\\/].*tslog/i]:[...Z(),/node:(?:internal|vm)/i,/\binternal[\\/]/i],s,l={getMeta(o,i,u,p,d,m){return Object.assign({},e,{name:d,parentNames:m,date:new Date,logLevelId:o,logLevelName:i,path:p?void 0:l.getCallerStackFrame(u)})},getCallerStackFrame(o,i=new Error){let u=W(i,y=>a(y));if(u.length===0)return{};let p=le(u,r),m=Number.isFinite(o)&&o>=0?J(o,u.length):J(p,u.length);return u[m]??{}},getErrorTrace(o){return W(o,i=>a(i))},isError(o){return xe(o)},isBuffer(o){return typeof Buffer<"u"&&typeof Buffer.isBuffer=="function"?Buffer.isBuffer(o):!1},prettyFormatLogObj(o,i){return o.reduce((u,p)=>(l.isError(p)?u.errors.push(l.prettyFormatErrorObj(p,i)):u.args.push(p),u),{args:[],errors:[]})},prettyFormatErrorObj(o,i){let u=c(l.getErrorTrace(o),i),p=ue(o).map((m,y)=>{let k=`Caused by (${y+1}): ${m.name??"Error"}${m.message?`: ${m.message}`:""}`,w=c(W(m,O=>a(O)),i);return[k,...w].join(`
`)}),d={errorName:` ${o.name} `,errorMessage:b(o),errorStack:[...u,...p].join(`
`)};return R(i,i.prettyErrorTemplate,d)},transportFormatted(o,i,u,p,d){let m=d.stylePrettyLogs!==!1,y=(u.length>0&&i.length>0?`
`:"")+u.join(`
`),k=E(o),w=m?o:k;if(h(m)){d.prettyInspectOptions.colors=!1;let L=oe(d.prettyInspectOptions,i),S=p!=null?M(d,p):{text:k,styles:[]},j=S.text.length>0&&S.styles.length>0,A=(j?S.text:k)+L+y;j?console.log(A,...S.styles):console.log(A);return}d.prettyInspectOptions.colors=m;let O=oe(d.prettyInspectOptions,i);console.log(w+O+y)},transportJSON(o){console.log(z(o))}};return Ce()==="test"&&(l.__resetWorkingDirectoryCacheForTests=()=>{s=void 0}),l;function a(o){return n?f(o):g(o)}function g(o){if(typeof o!="string"||o.length===0)return;let i=o.trim();if(!i.includes(" at ")&&!i.startsWith("at "))return;let u=i.replace(/^at\s+/,""),p,d=u,m=u.match(/^(.*?)\s+\((.*)\)$/);m&&(p=m[1],d=m[2]);let y=d.replace(/^\(/,"").replace(/\)$/,""),k=y.replace(/\?.*$/,""),w,O,L=k,S=k.split(":");S.length>=3&&/^\d+$/.test(S[S.length-1]??"")?(O=S.pop(),w=S.pop(),L=S.join(":")):S.length>=2&&/^\d+$/.test(S[S.length-1]??"")&&(w=S.pop(),L=S.join(":"));let j=L.replace(/^file:\/\//,""),D=Se();D!=null&&j.startsWith(D)&&(j=j.slice(D.length),j=j.replace(/^[\\/]/,"")),j.length===0&&(j=L);let A=Te(j),_=A.length>0?A:j,ie=_.split(/\\|\//),U=ie[ie.length-1],Ne=U&&w?`${U}:${w}`:void 0,Ae=_&&w?`${_}:${w}`:void 0;return{fullFilePath:y,fileName:U,fileNameWithLine:Ne,fileColumn:O,fileLine:w,filePath:_,filePathWithLine:Ae,method:p}}function f(o){let i=globalThis.location?.origin;if(o==null)return;let u=o.match(et);if(!u)return;let p=u[1]?.replace(/\?.*$/,"");if(p==null)return;let d=p.split("/"),m=u[2],y=u[3],k=d[d.length-1];return{fullFilePath:i?`${i}${p}`:p,fileName:k,fileNameWithLine:k&&m?`${k}:${m}`:void 0,fileColumn:y,fileLine:m,filePath:p,filePathWithLine:m?`${p}:${m}`:void 0,method:void 0}}function c(o,i){return o.map(u=>R(i,i.prettyErrorStackTemplate,{...u},!0))}function b(o){return Object.getOwnPropertyNames(o).filter(i=>i!=="stack"&&i!=="cause").reduce((i,u)=>{let p=o[u];return typeof p=="function"||i.push(String(p)),i},[]).join(", ")}function h(o){return o&&(t.name==="browser"||t.name==="worker")&&ye()}function E(o){return o.replace(Xe,"")}function M(o,i){if(i==null)return{text:"",styles:[]};let{template:u,placeholders:p}=G(o,i),d=[],m=[],y=0,k=/{{(.+?)}}/g,w;for(;(w=k.exec(u))!=null;){w.index>y&&d.push(u.slice(y,w.index));let O=w[1],L=p[O]!=null?String(p[O]):"",S=x(o.prettyLogStyles?.[O],L),j=we(S);j.length>0?(d.push(`%c${L}%c`),m.push(j,"")):d.push(L),y=k.lastIndex}return y<u.length&&d.push(u.slice(y)),{text:d.join(""),styles:m}}function x(o,i){if(o==null)return[];if(typeof o=="string")return[o];if(Array.isArray(o))return o.flatMap(u=>x(u,i));if(typeof o=="object"){let u=i.trim(),p=o[u]??o["*"];return p==null?[]:x(p,i)}return[]}function we(o){let i=new Set,u=[];for(let p of o){let d=Oe(p);d!=null&&d.length>0&&!i.has(d)&&(i.add(d),u.push(d))}return u.join("; ")}function Oe(o){let i=Qe[o];if(i!=null)return`color: ${i}`;let u=qe[o];if(u!=null)return`background-color: ${u}`;switch(o){case"bold":return"font-weight: bold";case"dim":return"opacity: 0.75";case"italic":return"font-style: italic";case"underline":return"text-decoration: underline";case"overline":return"text-decoration: overline";case"inverse":return"filter: invert(1)";case"hidden":return"visibility: hidden";case"strikethrough":return"text-decoration: line-through";default:return}}function Se(){return s===void 0&&(s=be()??null),s??void 0}function Le(){return t.name==="node"||t.name==="deno"||t.name==="bun"}function je(){return t.name==="node"||t.name==="deno"||t.name==="bun"}function Ee(o){if(o.name==="browser"||o.name==="worker")return{runtime:o.name,browser:o.userAgent};let i={runtime:o.name};return je()&&(i.runtimeVersion=o.version??"unknown"),Le()&&(i.hostname=o.hostname??"unknown"),i}function oe(o,i){try{return he(o,...i)}catch{return i.map(Ie).join(" ")}}function Ie(o){if(typeof o=="string")return o;try{return JSON.stringify(o)}catch{return String(o)}}function Te(o){if(typeof o!="string"||o.length===0)return o;let i=o.replace(/\\+/g,"\\").replace(/\\/g,"/"),u=i.startsWith("//"),p=i.startsWith("/")&&!u,d=i.match(/^[A-Za-z]:/),m=d?d[0]:"",k=(m?i.slice(m.length):i).split("/"),w=[];for(let L of k)if(!(L===""||L===".")){if(L===".."){w.length>0&&w.pop();continue}w.push(L)}let O=w.join("/");return u?O=`//${O}`:p?O=`/${O}`:m!==""&&(O=`${m}${O.length>0?`/${O}`:""}`),O.length===0?o:O}function Pe(){if(ne())return{name:"browser",userAgent:globalThis.navigator?.userAgent};let o=globalThis;if(typeof o.importScripts=="function")return{name:"worker",userAgent:o.navigator?.userAgent};let i=globalThis;if(i.Bun!=null){let u=i.Bun.version;return{name:"bun",version:u!=null?`bun/${u}`:void 0,hostname:B(i.process,i.Deno,i.Bun,i.location)}}if(i.Deno!=null){let u=Me(i.Deno),p=i.Deno?.version?.deno;return{name:"deno",version:p!=null?`deno/${p}`:void 0,hostname:u??B(i.process,i.Deno,i.Bun,i.location)}}return i.process?.versions?.node!=null||i.process?.version!=null?{name:"node",version:i.process?.versions?.node??i.process?.version,hostname:B(i.process,i.Deno,i.Bun,i.location)}:i.process!=null?{name:"node",version:"unknown",hostname:B(i.process,i.Deno,i.Bun,i.location)}:{name:"unknown"}}function B(o,i,u,p){let d=o?.env?.HOSTNAME??o?.env?.HOST??o?.env?.COMPUTERNAME;if(d!=null&&d.length>0)return d;let m=u?.env?.HOSTNAME??u?.env?.HOST??u?.env?.COMPUTERNAME;if(m!=null&&m.length>0)return m;try{let y=i?.env?.get;if(typeof y=="function"){let k=y("HOSTNAME");if(k!=null&&k.length>0)return k}}catch{}if(p?.hostname!=null&&p.hostname.length>0)return p.hostname}function Me(o){try{if(typeof o?.hostname=="function"){let u=o.hostname();if(u!=null&&u.length>0)return u}}catch{}let i=globalThis.location?.hostname;if(i!=null&&i.length>0)return i}function Ce(){return globalThis?.process?.env?.NODE_ENV}function xe(o){if(o instanceof Error)return!0;if(o!=null&&typeof o=="object"){let i=Object.prototype.toString.call(o);if(/\[object .*Error\]/.test(i))return!0;let u=o.name;if(typeof u=="string"&&u.endsWith("Error"))return!0}return!1}}var Xe=/\u001b\[[0-9;]*m/g,Qe={black:"#000000",red:"#ef5350",green:"#66bb6a",yellow:"#fdd835",blue:"#42a5f5",magenta:"#ab47bc",cyan:"#26c6da",white:"#fafafa",blackBright:"#424242",redBright:"#ff7043",greenBright:"#81c784",yellowBright:"#ffe082",blueBright:"#64b5f6",magentaBright:"#ce93d8",cyanBright:"#4dd0e1",whiteBright:"#ffffff"},qe={bgBlack:"#000000",bgRed:"#ef5350",bgGreen:"#66bb6a",bgYellow:"#fdd835",bgBlue:"#42a5f5",bgMagenta:"#ab47bc",bgCyan:"#26c6da",bgWhite:"#fafafa",bgBlackBright:"#424242",bgRedBright:"#ff7043",bgGreenBright:"#81c784",bgYellowBright:"#ffe082",bgBlueBright:"#64b5f6",bgMagentaBright:"#ce93d8",bgCyanBright:"#4dd0e1",bgWhiteBright:"#ffffff"},et=/(?:(?:file|https?|global code|[^@]+)@)?(?:file:)?((?:\/[^:/]+){2,})(?::(\d+))?(?::(\d+))?/,P=ke(),tt=P,v=class{constructor(e,n,r=Number.NaN){this.logObj=n;this.stackDepthLevel=r;this.runtime=P;this.maxErrorCauseDepth=5;this.settings={type:e?.type??"pretty",name:e?.name,parentNames:e?.parentNames,minLevel:e?.minLevel??0,argumentsArrayName:e?.argumentsArrayName,hideLogPositionForProduction:e?.hideLogPositionForProduction??!1,prettyLogTemplate:e?.prettyLogTemplate??"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}	{{logLevelName}}	{{filePathWithLine}}{{nameWithDelimiterPrefix}}	",prettyErrorTemplate:e?.prettyErrorTemplate??`
{{errorName}} {{errorMessage}}
error stack:
{{errorStack}}`,prettyErrorStackTemplate:e?.prettyErrorStackTemplate??`  \u2022 {{fileName}}	{{method}}
	{{filePathWithLine}}`,prettyErrorParentNamesSeparator:e?.prettyErrorParentNamesSeparator??":",prettyErrorLoggerNameDelimiter:e?.prettyErrorLoggerNameDelimiter??"	",stylePrettyLogs:e?.stylePrettyLogs??!0,prettyLogTimeZone:e?.prettyLogTimeZone??"UTC",prettyLogStyles:e?.prettyLogStyles??{logLevelName:{"*":["bold","black","bgWhiteBright","dim"],SILLY:["bold","white"],TRACE:["bold","whiteBright"],DEBUG:["bold","green"],INFO:["bold","blue"],WARN:["bold","yellow"],ERROR:["bold","red"],FATAL:["bold","redBright"]},dateIsoStr:"white",filePathWithLine:"white",name:["white","bold"],nameWithDelimiterPrefix:["white","bold"],nameWithDelimiterSuffix:["white","bold"],errorName:["bold","bgRedBright","whiteBright"],fileName:["yellow"],fileNameWithLine:"white"},prettyInspectOptions:e?.prettyInspectOptions??{colors:!0,compact:!1,depth:1/0},metaProperty:e?.metaProperty??"_meta",maskPlaceholder:e?.maskPlaceholder??"[***]",maskValuesOfKeys:e?.maskValuesOfKeys??["password"],maskValuesOfKeysCaseInsensitive:e?.maskValuesOfKeysCaseInsensitive??!1,maskValuesRegEx:e?.maskValuesRegEx,prefix:[...e?.prefix??[]],attachedTransports:[...e?.attachedTransports??[]],overwrite:{mask:e?.overwrite?.mask,toLogObj:e?.overwrite?.toLogObj,addMeta:e?.overwrite?.addMeta,addPlaceholders:e?.overwrite?.addPlaceholders,formatMeta:e?.overwrite?.formatMeta,formatLogObj:e?.overwrite?.formatLogObj,transportFormatted:e?.overwrite?.transportFormatted,transportJSON:e?.overwrite?.transportJSON}},this.captureStackForMeta=this._shouldCaptureStack()}log(e,n,...r){if(e<this.settings.minLevel)return;let s=this._resolveLogArguments(r),l=[...this.settings.prefix,...s],a=this.settings.overwrite?.mask!=null?this.settings.overwrite?.mask(l):this.settings.maskValuesOfKeys!=null&&this.settings.maskValuesOfKeys.length>0?this._mask(l):l,g=this.logObj!=null?this._recursiveCloneAndExecuteFunctions(this.logObj):void 0,f=this.settings.overwrite?.toLogObj!=null?this.settings.overwrite?.toLogObj(a,g):this._toLogObj(a,g),c=this.settings.overwrite?.addMeta!=null?this.settings.overwrite?.addMeta(f,e,n):this._addMetaToLogObj(f,e,n),b=c?.[this.settings.metaProperty],h,E;if(this.settings.overwrite?.formatMeta!=null&&(h=this.settings.overwrite?.formatMeta(c?.[this.settings.metaProperty])),this.settings.overwrite?.formatLogObj!=null&&(E=this.settings.overwrite?.formatLogObj(a,this.settings)),this.settings.type==="pretty"&&(h=h??this._prettyFormatLogObjMeta(c?.[this.settings.metaProperty]),E=E??P.prettyFormatLogObj(a,this.settings)),h!=null&&E!=null)if(this.settings.overwrite?.transportFormatted!=null){let M=this.settings.overwrite.transportFormatted,x=M.length;x<4?M(h,E.args,E.errors):x===4?M(h,E.args,E.errors,b):M(h,E.args,E.errors,b,this.settings)}else P.transportFormatted(h,E.args,E.errors,b,this.settings);else this.settings.overwrite?.transportJSON!=null?this.settings.overwrite.transportJSON(c):this.settings.type!=="hidden"&&P.transportJSON(c);return this.settings.attachedTransports!=null&&this.settings.attachedTransports.length>0&&this.settings.attachedTransports.forEach(M=>{M(c)}),c}attachTransport(e){this.settings.attachedTransports.push(e)}getSubLogger(e,n){let r={...this.settings,...e,parentNames:this.settings?.parentNames!=null&&this.settings?.name!=null?[...this.settings.parentNames,this.settings.name]:this.settings?.name!=null?[this.settings.name]:void 0,prefix:[...this.settings.prefix,...e?.prefix??[]]};return new this.constructor(r,n??this.logObj,this.stackDepthLevel)}_mask(e){let n=this._getMaskKeys();return e?.map(r=>this._recursiveCloneAndMaskValuesOfKeys(r,n))}_getMaskKeys(){let e=this.settings.maskValuesOfKeys??[],n=e.map(String).join("|");if(this.settings.maskValuesOfKeysCaseInsensitive===!0){if(this.maskKeysCache?.source===e&&this.maskKeysCache.caseInsensitive===!0&&this.maskKeysCache.signature===n)return this.maskKeysCache.normalized;let r=e.map(s=>typeof s=="string"?s.toLowerCase():String(s).toLowerCase());return this.maskKeysCache={source:e,caseInsensitive:!0,normalized:r,signature:n},r}return this.maskKeysCache={source:e,caseInsensitive:!1,normalized:e,signature:n},e}_resolveLogArguments(e){if(e.length===1&&typeof e[0]=="function"){let n=e[0];if(n.length===0){let r=n();return Array.isArray(r)?r:[r]}}return e}_recursiveCloneAndMaskValuesOfKeys(e,n,r=[]){if(r.includes(e))return{...e};if(typeof e=="object"&&e!==null&&r.push(e),P.isError(e)||P.isBuffer(e))return e;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(Array.isArray(e))return e.map(s=>this._recursiveCloneAndMaskValuesOfKeys(s,n,r));if(e instanceof Date)return new Date(e.getTime());if(e instanceof URL)return se(e);if(e!==null&&typeof e=="object"){let s=P.isError(e)?this._cloneError(e):Object.create(Object.getPrototypeOf(e));return Object.getOwnPropertyNames(e).reduce((l,a)=>{let g=this.settings?.maskValuesOfKeysCaseInsensitive!==!0?a:typeof a=="string"?a.toLowerCase():String(a).toLowerCase();return l[a]=n.includes(g)?this.settings.maskPlaceholder:(()=>{try{return this._recursiveCloneAndMaskValuesOfKeys(e[a],n,r)}catch{return null}})(),l},s)}else{if(typeof e=="string"){let s=e;for(let l of this.settings?.maskValuesRegEx||[])s=s.replace(l,this.settings?.maskPlaceholder||"");return s}return e}}_recursiveCloneAndExecuteFunctions(e,n=[]){return this.isObjectOrArray(e)&&n.includes(e)?this.shallowCopy(e):(this.isObjectOrArray(e)&&n.push(e),Array.isArray(e)?e.map(r=>this._recursiveCloneAndExecuteFunctions(r,n)):e instanceof Date?new Date(e.getTime()):this.isObject(e)?Object.getOwnPropertyNames(e).reduce((r,s)=>{let l=Object.getOwnPropertyDescriptor(e,s);if(l){Object.defineProperty(r,s,l);let a=e[s];r[s]=typeof a=="function"?a():this._recursiveCloneAndExecuteFunctions(a,n)}return r},Object.create(Object.getPrototypeOf(e))):e)}isObjectOrArray(e){return typeof e=="object"&&e!==null}isObject(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}shallowCopy(e){return Array.isArray(e)?[...e]:{...e}}_toLogObj(e,n={}){return e=e?.map(r=>P.isError(r)?this._toErrorObject(r):r),this.settings.argumentsArrayName==null?e.length===1&&!Array.isArray(e[0])&&P.isBuffer(e[0])!==!0&&!(e[0]instanceof Date)?n=typeof e[0]=="object"&&e[0]!=null?{...e[0],...n}:{0:e[0],...n}:n={...n,...e}:n={...n,[this.settings.argumentsArrayName]:e},n}_cloneError(e){let n=new e.constructor;return Object.getOwnPropertyNames(e).forEach(r=>{n[r]=e[r]}),n}_toErrorObject(e,n=0,r=new Set){r.has(e)||r.add(e);let s={nativeError:e,name:e.name??"Error",message:e.message,stack:P.getErrorTrace(e)};if(n>=this.maxErrorCauseDepth)return s;let l=e.cause;if(l!=null){let a=Y(l);r.has(a)||(s.cause=this._toErrorObject(a,n+1,r))}return s}_addMetaToLogObj(e,n,r){return{...e,[this.settings.metaProperty]:P.getMeta(n,r,this.stackDepthLevel,!this.captureStackForMeta,this.settings.name,this.settings.parentNames)}}_shouldCaptureStack(){if(this.settings.hideLogPositionForProduction)return!1;if(this.settings.type==="json")return!0;let e=this.settings.prettyLogTemplate??"";return!!/{{\s*(file(Name|Path|Line|PathWithLine|NameWithLine)|fullFilePath)\s*}}/.test(e)}_prettyFormatLogObjMeta(e){return G(this.settings,e).text}};var re=class extends v{constructor(e,n){let r=![typeof window,typeof document].includes("undefined"),s=r?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1,l=e?{...e}:{};r&&l.stylePrettyLogs==null&&(l.stylePrettyLogs=!0),super(l,n,s?4:5)}log(e,n,...r){return super.log(e,n,...r)}silly(...e){return super.log(0,"SILLY",...e)}trace(...e){return super.log(1,"TRACE",...e)}debug(...e){return super.log(2,"DEBUG",...e)}info(...e){return super.log(3,"INFO",...e)}warn(...e){return super.log(4,"WARN",...e)}error(...e){return super.log(5,"ERROR",...e)}fatal(...e){return super.log(6,"FATAL",...e)}getSubLogger(e,n){return super.getSubLogger(e,n)}};return _e(nt);})();