import{__module as t}from"../../../_virtual/node.mjs";import e from"../../../_virtual/_node_tty.mjs";import s from"../../../_virtual/_node_util.mjs";import{__require as o}from"../../supports-color/index.mjs";import{__require as r}from"./common.mjs";var n;function i(){return n||(n=1,function(t,n){const i=e,c=s;n.init=function(t){t.inspectOpts={};const e=Object.keys(n.inspectOpts);for(let s=0;s<e.length;s++)t.inspectOpts[e[s]]=n.inspectOpts[e[s]]},n.log=function(...t){return process.stderr.write(c.formatWithOptions(n.inspectOpts,...t)+"\n")},n.formatArgs=function(e){const{namespace:s,useColors:o}=this;if(o){const o=this.color,r="[3"+(o<8?o:"8;5;"+o),n=`  ${r};1m${s} [0m`;e[0]=n+e[0].split("\n").join("\n"+n),e.push(r+"m+"+t.exports.humanize(this.diff)+"[0m")}else e[0]=function(){if(n.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+s+" "+e[0]},n.save=function(t){t?process.env.DEBUG=t:delete process.env.DEBUG},n.load=function(){return process.env.DEBUG},n.useColors=function(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):i.isatty(process.stderr.fd)},n.destroy=c.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),n.colors=[6,2,3,4,5,1];try{const t=o();t&&(t.stderr||t).level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(t){}n.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{const s=e.substring(6).toLowerCase().replace(/_([a-z])/g,(t,e)=>e.toUpperCase());let o=process.env[e];return o=!!/^(yes|on|true|enabled)$/i.test(o)||!/^(no|off|false|disabled)$/i.test(o)&&("null"===o?null:Number(o)),t[s]=o,t},{}),t.exports=r()(n);const{formatters:p}=t.exports;p.o=function(t){return this.inspectOpts.colors=this.useColors,c.inspect(t,this.inspectOpts).split("\n").map(t=>t.trim()).join(" ")},p.O=function(t){return this.inspectOpts.colors=this.useColors,c.inspect(t,this.inspectOpts)}}(t,t.exports)),t.exports}export{i as __require};