/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@tremho/gen-logger@2.0.3/build/src/Log.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var i=Object.getOwnPropertyDescriptor(t,o);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,i)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&__createBinding(t,e,o);return __setModuleDefault(t,e),t};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Logger=exports.LogWriter=exports.LogTarget=void 0,exports.createLogFileWriter=createLogFileWriter,exports.getCategories=getCategories,exports.addCategory=addCategory,exports.removeCategory=removeCategory,exports.loadLoggerConfig=loadLoggerConfig,exports.setLoggerConfigJSON=setLoggerConfigJSON,exports.createDefaultLogger=createDefaultLogger,exports.createMonochromeLogger=createMonochromeLogger,exports.setLoggerConfig=setLoggerConfig,exports.getLogger=getLogger,exports.readMemoryLog=readMemoryLog,exports.clearMemoryLog=clearMemoryLog;const gen_format_1=__importStar(require("@tremho/gen-format")),Configuration_1=__importStar(require("./Configuration")),StackLineParser_1=require("./StackLineParser"),SourceMap_1=require("./SourceMap"),levelNames=["trace","debug","log","info","warn","error","exception","fatal"];let memoryCaches={},definedLoggers={},knownCategories=[];function createLogFileWriter(e,t){const o=new LogTarget(e,Configuration_1.TargetType.LogFile,t);return o.displayOptions.format=Configuration_1.FormatType.json,o.outputLogToDestination=(e,r,i,s,n,a)=>{o.state||(o.state={open:rotateLogFile(t)});const l=o.state.open;try{Configuration_1.nfs?.fs.appendFileSync(l,r+"\n")}catch(e){console.error("Error writing to logfile "+t,e)}},new LogWriter(o)}function rotateLogFile(e){if(!Configuration_1.nfs)return console.warn("no file interface available"),e;const t=Configuration_1.nfs?.path.dirname(e);if(Configuration_1.nfs?.fs.existsSync(t)||Configuration_1.nfs?.fs.mkdirSync(t,{recursive:!0}),!Configuration_1.nfs?.fs.existsSync(e))return e;let o=0,r=Configuration_1.nfs?.path.basename(e),i=r.lastIndexOf(".");-1!==i&&(r=r.substring(0,i));const s=Configuration_1.nfs?.path.extname(e),n=Configuration_1.nfs?.fs.readdirSync(t);for(let e of n)if(i=e.lastIndexOf("."),-1!==i&&(e=e.substring(0,i)),e.startsWith(r)){const t=Number(e.substring(e.length-1));t>o&&(o=t)}return Configuration_1.nfs?.path.join(t,r)+(o+1)+s}function getCategories(){return knownCategories}function addCategory(e){knownCategories.push(e)}function removeCategory(e){let t=knownCategories.indexOf(e);-1!==t&&knownCategories.splice(t,1)}function loadLoggerConfig(e){const t=new Configuration_1.default;t.loadConfigFile(e),setLoggerConfig(t.configSchema)}function setLoggerConfigJSON(e){new Configuration_1.default;setLoggerConfig(JSON.parse(e))}function createDefaultLogger(){return setLoggerConfig({loggers:[{name:"Default",writers:["Console"]}],writers:[{name:"Console",type:"Console",colors:{inherits:"Standard"},display:{supportsColor:!0}}],colorSchemes:[{name:"Standard",default:{time:1,message:4,func:24,file:240,line:0,startGroup:["#FFF","#00F"],endGroup:["#555","#ACA"],trace:{level:8,message:8},debug:{level:142,message:108},log:{level:2,message:22},info:{level:45,message:18},warn:{level:[0,11],message:3},error:{level:[0,1],message:1,stack:!0,stackColor:242},fatal:{level:["#FFF","#000"],message:1,stack:!0,stackColor:8},exception:{level:[0,1],message:6,stack:!0,stackColor:242}}}]}),getLogger("Default")}function createMonochromeLogger(){return setLoggerConfig({loggers:[{name:"Monochrome",writers:["Console"]}],writers:[{name:"Console",type:Configuration_1.TargetType.Console,display:{supportsColor:!1,format:Configuration_1.FormatType.text,order:[Configuration_1.ElementType.category,Configuration_1.ElementType.level,Configuration_1.ElementType.function,Configuration_1.ElementType.source,Configuration_1.ElementType.message]}}]}),getLogger("Monochrome")}function setLoggerConfig(e){if(knownCategories=["Default"],e.categories)for(let t=0;t<e.categories.length;t++)addCategory(e.categories[t].name);const t=e.writers||[],o={};for(let r=0;r<t.length;r++){const i=t[r];let s;switch(i.type){case Configuration_1.TargetType.Console:s=i.consoleType?i.consoleType.toString():"tty";break;case Configuration_1.TargetType.Memory:s=i.memoryName||i.name;break;case Configuration_1.TargetType.LogFile:s=i.filePath;break;case Configuration_1.TargetType.Service:s=i.serviceUrl}const n=i.display&&i.display.supportsColor,a=new LogTarget(i.name,i.type,s,n);if(n){a.supportsColor=n,a.location=s,a.type===Configuration_1.TargetType.Console&&"browser"===a.location&&(a.supportsColor=!1),a.displayOptions.colorReset=i.display.colorReset||"[0m",a.type===Configuration_1.TargetType.Console&&"browser"===a.location&&(a.supportsColor=!1,a.displayOptions.colorReset="");let t=i.colors;if(t){if(t.inherits){const o=new Configuration_1.default;o.configSchema=e;const r=o.readColorScheme(t.inherits);t=Object.assign(t,r)}a.colorCategories={};for(let e=0;e<knownCategories.length;e++){let o=knownCategories[e];"Default"===o&&(o="default"),t[o]&&(a.colorCategories[o]=t[o])}t=t.default||{},a.colorLevels={};for(let e=0;e<levelNames.length;e++){let o=levelNames[e];t[o]&&(a.colorLevels[o]=t[o]);for(let e=0;e<10;e++)t[o+e]&&(a.colorLevels[o+e]=t[o+e])}}}if(i.display?(i.display.format&&(a.displayOptions.format=i.display.format),i.display.order&&(a.displayOptions.order=i.display.order)):(a.displayOptions.format=Configuration_1.FormatType.text,a.displayOptions.order=[Configuration_1.ElementType.time,Configuration_1.ElementType.function,Configuration_1.ElementType.source,Configuration_1.ElementType.category,Configuration_1.ElementType.level,Configuration_1.ElementType.message]),o[i.name])throw Error(`LogWriter "${i.name}" has already been defined`);o[i.name]=new LogWriter(a)}definedLoggers={};const r=e.loggers||[];for(let e=0;e<r.length;e++){const t=r[e],i=new Logger,s=t.writers||[];for(let e=0;e<s.length;e++){const t=s[e];i.addWriter(o[t])}if(definedLoggers[t.name])throw Error(`Logger "${t.name}" has already been defined`);definedLoggers[t.name]=i}}function getLogger(e){const t=definedLoggers[e];if(!t)throw Error('Logger "'+e+'" not defined');return t}function readMemoryLog(e){return memoryCaches[e]}function clearMemoryLog(e){memoryCaches[e]=""}class LogTarget{constructor(e,t,o,r){this.displayOptions=new Configuration_1.DisplayOptions,this.name=e,this.type=t,this.location=o,this.supportsColor=r||!1,this.colorLevels={},this.colorCategories={default:{}},this.displayOptions={supportsColor:r||!1,colorReset:r?"[0m":"",prefix:"- ",format:Configuration_1.FormatType.text,order:[Configuration_1.ElementType.time,Configuration_1.ElementType.function,Configuration_1.ElementType.source,Configuration_1.ElementType.category,Configuration_1.ElementType.level,Configuration_1.ElementType.message]}}outputLogToDestination(e,t,o,r,i,s){console.warn(`>> outputToDestination must be immplemented in custom writer for logger ${this.name}>>`)}}exports.LogTarget=LogTarget;class LogWriter{constructor(e){this.categoryExcludes=[],this.levelExcludes=[],this.target=e}includeCategory(e,...t){let o=this.categoryExcludes.indexOf(e);if(-1!==o&&this.categoryExcludes.splice(o,1),t&&t.length){let e=t.shift();e&&this.includeCategory(e,...t)}}excludeCategory(e,...t){if(-1===this.categoryExcludes.indexOf(e)&&this.categoryExcludes.push(e),t&&t.length){let e=t.shift();e&&this.excludeCategory(e,...t)}}includeLevel(e,...t){let o=this.levelExcludes.indexOf(e);if(-1!==o&&this.levelExcludes.splice(o,1),t&&t.length){let e=t.shift();e&&this.includeLevel(e,...t)}}excludeLevel(e,...t){if(-1===this.levelExcludes.indexOf(e)&&this.levelExcludes.push(e),t&&t.length){let e=t.shift();e&&this.excludeLevel(e,...t)}}clearLevelExclusions(){this.levelExcludes=[]}clearCategoryExclusions(){this.categoryExcludes=[]}isCategoryExcluded(e){return-1!==this.categoryExcludes.indexOf(e)}isLevelExcluded(e){let t=e.substring(0,e.length-1);return-1!==this.levelExcludes.indexOf(e)||-1!==this.levelExcludes.indexOf(t)}outputLog(e,t,o,r,i){switch(this.target.type){case Configuration_1.TargetType.Console:{const s="browser"===this.target.location;if(!s)return console.log(e,r||"");{const n=this.getColors(t,o);let a=s?n.browserLineStyle:"";i||(i=[]),console.log(e,a,...i,r||"")}}case Configuration_1.TargetType.Memory:{const t=this.target.location;let o=memoryCaches[t]||"";return o+=e+"\n",void(memoryCaches[t]=o)}default:return void this.target.outputLogToDestination(this.target.location??"",e,t,o,r,i)}}startGroup(e,t){if(this.target.displayOptions.format!==Configuration_1.FormatType.json&&this.target.type===Configuration_1.TargetType.Console){const o=this.target.colorCategories.default||{};if("browser"===this.target.location)console.groupCollapsed("%c "+t,o.groupStyle||"");else{const r=e?" ".repeat(2*e):"",i=this.target.displayOptions.colorReset||"";console.log(r+applyColor(o.startGroup)+" <"+t+"> "+i)}}}endGroup(e,t){if(this.target.displayOptions.format!==Configuration_1.FormatType.json&&this.target.type===Configuration_1.TargetType.Console){const o=this.target.colorCategories.default||{};if("browser"===this.target.location)console.groupEnd();else{const r=e?" ".repeat(2*e):"",i=this.target.displayOptions.colorReset||"";console.log(r+applyColor(o.endGroup)+" </"+t+"> "+i)}}}getColors(e,t){let o=t&&isFinite(Number(t.charAt(t.length-1)))&&t.substring(0,t.length-1);o||(o="");const r=this.target.colorCategories.default||{},i=this.target.colorLevels[t]||this.target.colorLevels[o]||r[t]||r[o]||{},s=this.target.colorCategories[e]||{},n=s[t]||{},a=s[o]||{};return{browserLineStyle:n.browserLineStyle||a.browserLineStyle||s.browserLineStyle||i.browserLineStyle||r.browserLineStyle,time:applyColor(n.time||a.time||s.time||i.time||r.time),file:applyColor(n.file||a.file||s.file||i.file||r.file),func:applyColor(n.func||a.func||s.func||i.func||r.func),line:applyColor(n.line||a.line||s.line||i.line||r.line),level:applyColor(n.level||a.level||s.level||i.level||r.level),category:applyColor(n.category||a.category||s.category||i.category||r.category),message:applyColor(n.message||a.message||s.message||i.message||r.message),stack:i.stackColor?applyColor(i.stack&&i.stackColor):i.stack}}composeJSON(e,t,o,r,i,s){const n={},a={};(this.target.displayOptions.order||[]).forEach((e=>{a[e]=!0}));const{file:l,func:g,line:c}=r||{};return n.time=a.time&&e,n.function=a.function&&g,n.file=a.source&&l,n.line=a.source&&c,n.category=a.category&&t,n.level=a.level&&o,n.message=a.message&&i,s&&(n.stack=s),JSON.stringify(n)}logFormat(e,t,o,r,i,s,...n){let a="";const{file:l,func:g,line:c,column:u}=r||{},p=Number(o.charAt(o.length-1))||0;let h=o.toUpperCase();p||(h=h.substring(0,h.length-1));const f=this.getColors(t,o);"Default"===t&&(t=""),t&&(t="["+t+"]");const d=this.target.type===Configuration_1.TargetType.Console&&"browser"===this.target.location;let m,y,C=d?"%c ":"";if(C+=this.target.displayOptions.prefix,this.target.supportsColor&&(C+=this.target.displayOptions.colorReset||""),-1!==this.target.displayOptions.order?.indexOf(Configuration_1.ElementType.time)&&(this.target.supportsColor&&(C+=f.time),C+=(0,gen_format_1.default)("date?local|hhhh:mm:ss.sss",e),this.target.supportsColor&&(C+=this.target.displayOptions.colorReset||""),C+=" "),-1!==this.target.displayOptions.order?.indexOf(Configuration_1.ElementType.source)&&(this.target.supportsColor&&(C+=f.func),C+=`${g||""}`,this.target.supportsColor&&(C+=this.target.displayOptions.colorReset||""),C+="(",this.target.supportsColor&&(C+=f.file),C+=`${l||""}`,this.target.supportsColor&&(C+=this.target.displayOptions.colorReset||""),C+=":",this.target.supportsColor&&(C+=f.line),C+=`${c||""}`,this.target.supportsColor&&(C+=this.target.displayOptions.colorReset||""),C+=") "),-1!==this.target.displayOptions.order?.indexOf(Configuration_1.ElementType.category)&&(this.target.supportsColor&&(C+=f.category),C+=`${t||""}`,this.target.supportsColor&&(C+=this.target.displayOptions.colorReset||""),t&&(C+=" ")),-1!==this.target.displayOptions.order?.indexOf(Configuration_1.ElementType.level)&&(this.target.supportsColor&&(C+=f.level),C+=` ${h||""} `,this.target.supportsColor&&(C+=this.target.displayOptions.colorReset||""),C+=" "),-1!==this.target.displayOptions.order?.indexOf(Configuration_1.ElementType.message)){this.target.supportsColor&&(C+=f.message);let e=s.match(/\$[\d[a-z]*\([a-z|A-Z|0-9|\.|,]*\)/g)||[];if(e.length<n.length&&(m=n.slice(e.length),!d))for(let t=e.length+1;t<=n.length;t++)t>1&&(s+=", "),s+="$(,)";if(!n.length&&e.length&&(n.push(s),s="$1(,)"),!d)for(let e=0;e<n.length;e++)if("object"==typeof n[e]&&!Array.isArray(n[e])){try{n[e].toString=()=>{try{let t=JSON.stringify(n[e],expandObject,2);return"{"===t.charAt(0)&&(t="\n"+t),t}catch(e){return"\n{-unparseable-} "+(e||"!")}}}catch(e){}n[e]=n[e]?n[e].toString():"[null]"}a=(0,gen_format_1.formatV)(s||"",...n),C+=a}if(this.target.supportsColor&&(C+=this.target.displayOptions.colorReset||""),f.stack){y="";const e=r.stackLines;for(this.target.supportsColor&&(y+=f.stack);e.length;){const t=e.shift();if(t){const e=i.parseLine(t),o=(0,SourceMap_1.getSourceMap)(e);y+="\n    at "+o.func+" ("+o.file+" "+o.line+")"}}}return C+=this.target.displayOptions.colorReset||"",this.target.displayOptions.format===Configuration_1.FormatType.json&&(C=this.composeJSON(e,t,o,r,a,y??"")),{out:C,xargs:m,stackdump:y}}}exports.LogWriter=LogWriter;class Logger{constructor(){this.writers=[],this.groups=[],this.stackParser=new StackLineParser_1.StackLineParser,this.defaultCategoryName="",this.currentDefaultLevel="trace"}getWriters(){return this.writers}addWriter(e){this.findWriter(e.target.name)||this.writers.push(e)}removeWriter(e){let t=e.target.name;for(let e=0;e<this.writers.length;e++){if(this.writers[e].target.name===t)return void this.writers.splice(e,1)}}findWriter(e){for(let t=0;t<this.writers.length;t++){const o=this.writers[t];if(o.target.name.toUpperCase()===e.toUpperCase())return o}return null}setDefaultCategoryName(e){const t=this.defaultCategoryName;return this.defaultCategoryName=e,t}includeAllLevels(e){const t=this.findWriter(e);t&&t.clearLevelExclusions()}excludeAllLevels(e){const t=this.findWriter(e);t&&t.excludeLevel("trace",...levelNames)}includeLevel(e,t){const o=this.findWriter(e);o&&o.includeLevel(t.toLowerCase())}excludeLevel(e,t){const o=this.findWriter(e);o&&o.excludeLevel(t.toLowerCase())}setMinimumLevel(e,t){const o=this.findWriter(e),r=levelNames.indexOf(t.toLowerCase());if(-1!==r){const i=levelNames.slice(r);o&&(this.excludeAllLevels(e),o.includeLevel(t,...i))}}changeDefaultLevel(e){const t=this.currentDefaultLevel;return this.setMinimumLevel("Console",e),this.currentDefaultLevel=e,t}enableColor(e,t){const o=this.findWriter(e);o&&(o.target.supportsColor=t)}includeAllCategories(e){const t=this.findWriter(e);t&&t.clearCategoryExclusions()}excludeAllCategories(e){const t=this.findWriter(e);t&&t.excludeCategory("default",...levelNames)}includeCategory(e,t){const o=this.findWriter(e);o&&o.includeCategory(t)}excludeCategory(e,t){const o=this.findWriter(e);o&&o.excludeCategory(t)}_levelToType(e=""){let t,o,r=e.charAt(e.length-1);return t=r>="0"&&r<="9"?e.substring(0,e.length-1):e,o=t,{type:o,granularity:Number(r)||0}}outToWriters(e,t,o,r,i,...s){const n=this._levelToType(r);for(let a=0;a<this.writers.length;a++){const l=this.writers[a];if(l.isCategoryExcluded(o))continue;if(l.isLevelExcluded(r))continue;const{out:g,xargs:c,stackdump:u}=l.logFormat(e,o,r,t,this.stackParser,i,...s),p=g;if(!p)continue;const h=this.groups.length?" ".repeat(2*this.groups.length):"";l.outputLog(h+p,o,n.type,u??"",c??null)}}_morph(e,...t){let o=this.defaultCategoryName,r="",i=[...t];i.length<=1?("string"==typeof i[0]&&(r=i.shift()||""),o=this.defaultCategoryName):"string"!=typeof i[0]?r=i.shift():-1!==knownCategories.indexOf(i[0])?(o=i.shift(),r=i.shift()):(o=this.defaultCategoryName,r=i.shift());const s=this.stackParser.getFuncFileLine();this.outToWriters(Date.now(),s,o,e,r,...i)}trace9(...e){this._morph("trace9",...e)}trace8(...e){this._morph("trace8",...e)}trace7(...e){this._morph("trace7",...e)}trace6(...e){this._morph("trace6",...e)}trace5(...e){this._morph("trace5",...e)}trace4(...e){this._morph("trace4",...e)}trace3(...e){this._morph("trace3",...e)}trace2(...e){this._morph("trace2",...e)}trace1(...e){this._morph("trace1",...e)}trace0(...e){this._morph("trace0",...e)}trace(...e){this.trace0(...e)}debug9(...e){this._morph("debug9",...e)}debug8(...e){this._morph("debug8",...e)}debug7(...e){this._morph("debug7",...e)}debug6(...e){this._morph("debug6",...e)}debug5(...e){this._morph("debug5",...e)}debug4(...e){this._morph("debug4",...e)}debug3(...e){this._morph("debug3",...e)}debug2(...e){this._morph("debug2",...e)}debug1(...e){this._morph("debug1",...e)}debug0(...e){this._morph("debug0",...e)}debug(...e){this.debug0(...e)}log9(...e){this._morph("log9",...e)}log8(...e){this._morph("log8",...e)}log7(...e){this._morph("log7",...e)}log6(...e){this._morph("log6",...e)}log5(...e){this._morph("log5",...e)}log4(...e){this._morph("log4",...e)}log3(...e){this._morph("log3",...e)}log2(...e){this._morph("log2",...e)}log1(...e){this._morph("log1",...e)}log0(...e){this._morph("log0",...e)}log(...e){this.log0(...e)}info9(...e){this._morph("info9",...e)}info8(...e){this._morph("info8",...e)}info7(...e){this._morph("info7",...e)}info6(...e){this._morph("info6",...e)}info5(...e){this._morph("info5",...e)}info4(...e){this._morph("info4",...e)}info3(...e){this._morph("info3",...e)}info2(...e){this._morph("info2",...e)}info1(...e){this._morph("info1",...e)}info0(...e){this._morph("info0",...e)}info(...e){this.info0(...e)}warn9(...e){this._morph("warn9",...e)}warn8(...e){this._morph("warn8",...e)}warn7(...e){this._morph("warn7",...e)}warn6(...e){this._morph("warn6",...e)}warn5(...e){this._morph("warn5",...e)}warn4(...e){this._morph("warn4",...e)}warn3(...e){this._morph("warn3",...e)}warn2(...e){this._morph("warn2",...e)}warn1(...e){this._morph("warn1",...e)}warn0(...e){this._morph("warn0",...e)}warn(...e){this.warn0(...e)}error(...e){this._morph("error0",...e)}exception(...e){let t=e[0];if("function"==typeof t&&(t=t()),t instanceof Error){e[0]=t.message;const o=t.stack;if(o){const t=o.split("\n")[1].trim(),r=(0,SourceMap_1.getSourceMap)(this.stackParser.parseLine(t));e.push(` on line ${r.line} of ${r.file}`)}}this._morph("exception0",...e)}fatal(...e){this._morph("fatal0",...e)}crash(...e){this.fatal(...e)}Trace(...e){this.trace(...e)}Debug(...e){this.debug(...e)}Log(...e){this.log(...e)}Info(...e){this.info(...e)}Warn(...e){this.warn(...e)}Error(...e){this.error(...e)}Critical(...e){this.fatal(...e)}Exception(...e){this.exception(...e)}group(e){(this.writers||[]).forEach((t=>{t.startGroup(this.groups.length,e)})),this.groups.push(e)}groupEnd(){const e=this.groups.pop(),t=this.writers||[];e&&t.forEach((t=>{t.endGroup(this.groups.length,e)}))}}function applyColor(e){Array.isArray(e)||(e=[e]);const t=""+(e[0]||""),o=""+(e[1]||"");let r="";if(t){let e=rgb2ansiCode(t);e&&(r="[38;5;"+e+"m")}if(o){let e=rgb2ansiCode(o);e&&(r+="[48;5;"+e+"m")}return r}function parseColor(e=""){if("rgb"===e.substring(0,3).toLowerCase()){let t=e.indexOf("(")+1;if(t){let o=e.lastIndexOf(")"),r=e.substring(t,o).split(",");return{r:(255&(Number(r[0])||0))/255,g:(255&(Number(r[1])||0))/255,b:(255&(Number(r[2])||0))/255}}}else if("#"===e.charAt(0)){if(3===(e=e.substring(1)).length){const t=[];for(let o=0;o<3;o++){let r=parseInt(e.charAt(o),16);t.push((15&(r||0))/15)}return{r:t[0],g:t[1],b:t[2]}}if(6===e.length){const t=[];for(let o=0;o<6;o++){let r=parseInt(e.charAt(o),16);t.push((255&(r||0))/255)}return{r:t[0],g:t[1],b:t[2]}}}else{const t=parseInt(e);if(isFinite(t)&&t>=0&&t<=255)return t}return""}function rgb2ansiCode(e){const t=parseColor(e);if("number"==typeof t)return t;if(!t)return"";const o=Math.floor(255*t.r),r=Math.floor(255*t.g),i=Math.floor(255*t.b);let s=0;if(o===r&&o===i&&0!==o&&255!==o){s=232+Math.floor(o/11)}return s||(s=16+36*Math.floor(o/51)+6*Math.floor(r/51)+Math.floor(i/51)),s}function expandObject(e,t){return void 0===t?"undefined":t instanceof RegExp?"[RegEx]: "+new RegExp(t).toString():t instanceof Promise?"[Promise]":t instanceof Error?"["+t.name+"]: "+t.message:t}exports.Logger=Logger;
//# sourceMappingURL=/sm/7c609530a408c183eaaecdb913f85622fe282a91e0595e85dbef227cc0dbbbc2.map