scanrepo 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +39 -0
  2. package/package.json +42 -0
package/dist/cli.js ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire as n0}from"node:module";var r0=Object.create;var{getPrototypeOf:a0,defineProperty:Eu,getOwnPropertyNames:s0}=Object;var i0=Object.prototype.hasOwnProperty;var t=(D,u,F)=>{F=D!=null?r0(a0(D)):{};let E=u||!D||!D.__esModule?Eu(F,"default",{value:D,enumerable:!0}):F;for(let C of s0(D))if(!i0.call(E,C))Eu(E,C,{get:()=>D[C],enumerable:!0});return E};var I=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var f=n0(import.meta.url);var x=I((t0)=>{class KD extends Error{constructor(D,u,F){super(F);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=u,this.exitCode=D,this.nestedError=void 0}}class Cu extends KD{constructor(D){super(1,"commander.invalidArgument",D);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}t0.CommanderError=KD;t0.InvalidArgumentError=Cu});var o=I((FF)=>{var{InvalidArgumentError:DF}=x();class Bu{constructor(D,u){switch(this.description=u||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,D[0]){case"<":this.required=!0,this._name=D.slice(1,-1);break;case"[":this.required=!1,this._name=D.slice(1,-1);break;default:this.required=!0,this._name=D;break}if(this._name.length>3&&this._name.slice(-3)==="...")this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_concatValue(D,u){if(u===this.defaultValue||!Array.isArray(u))return[D];return u.concat(D)}default(D,u){return this.defaultValue=D,this.defaultValueDescription=u,this}argParser(D){return this.parseArg=D,this}choices(D){return this.argChoices=D.slice(),this.parseArg=(u,F)=>{if(!this.argChoices.includes(u))throw new DF(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(u,F);return u},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function uF(D){let u=D.name()+(D.variadic===!0?"...":"");return D.required?"<"+u+">":"["+u+"]"}FF.Argument=Bu;FF.humanReadableArgName=uF});var RD=I((_F)=>{var{humanReadableArgName:BF}=o();class _u{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(D){let u=D.commands.filter((E)=>!E._hidden),F=D._getHelpCommand();if(F&&!F._hidden)u.push(F);if(this.sortSubcommands)u.sort((E,C)=>{return E.name().localeCompare(C.name())});return u}compareOptions(D,u){let F=(E)=>{return E.short?E.short.replace(/^-/,""):E.long.replace(/^--/,"")};return F(D).localeCompare(F(u))}visibleOptions(D){let u=D.options.filter((E)=>!E.hidden),F=D._getHelpOption();if(F&&!F.hidden){let E=F.short&&D._findOption(F.short),C=F.long&&D._findOption(F.long);if(!E&&!C)u.push(F);else if(F.long&&!C)u.push(D.createOption(F.long,F.description));else if(F.short&&!E)u.push(D.createOption(F.short,F.description))}if(this.sortOptions)u.sort(this.compareOptions);return u}visibleGlobalOptions(D){if(!this.showGlobalOptions)return[];let u=[];for(let F=D.parent;F;F=F.parent){let E=F.options.filter((C)=>!C.hidden);u.push(...E)}if(this.sortOptions)u.sort(this.compareOptions);return u}visibleArguments(D){if(D._argsDescription)D.registeredArguments.forEach((u)=>{u.description=u.description||D._argsDescription[u.name()]||""});if(D.registeredArguments.find((u)=>u.description))return D.registeredArguments;return[]}subcommandTerm(D){let u=D.registeredArguments.map((F)=>BF(F)).join(" ");return D._name+(D._aliases[0]?"|"+D._aliases[0]:"")+(D.options.length?" [options]":"")+(u?" "+u:"")}optionTerm(D){return D.flags}argumentTerm(D){return D.name()}longestSubcommandTermLength(D,u){return u.visibleCommands(D).reduce((F,E)=>{return Math.max(F,u.subcommandTerm(E).length)},0)}longestOptionTermLength(D,u){return u.visibleOptions(D).reduce((F,E)=>{return Math.max(F,u.optionTerm(E).length)},0)}longestGlobalOptionTermLength(D,u){return u.visibleGlobalOptions(D).reduce((F,E)=>{return Math.max(F,u.optionTerm(E).length)},0)}longestArgumentTermLength(D,u){return u.visibleArguments(D).reduce((F,E)=>{return Math.max(F,u.argumentTerm(E).length)},0)}commandUsage(D){let u=D._name;if(D._aliases[0])u=u+"|"+D._aliases[0];let F="";for(let E=D.parent;E;E=E.parent)F=E.name()+" "+F;return F+u+" "+D.usage()}commandDescription(D){return D.description()}subcommandDescription(D){return D.summary()||D.description()}optionDescription(D){let u=[];if(D.argChoices)u.push(`choices: ${D.argChoices.map((F)=>JSON.stringify(F)).join(", ")}`);if(D.defaultValue!==void 0){if(D.required||D.optional||D.isBoolean()&&typeof D.defaultValue==="boolean")u.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`)}if(D.presetArg!==void 0&&D.optional)u.push(`preset: ${JSON.stringify(D.presetArg)}`);if(D.envVar!==void 0)u.push(`env: ${D.envVar}`);if(u.length>0)return`${D.description} (${u.join(", ")})`;return D.description}argumentDescription(D){let u=[];if(D.argChoices)u.push(`choices: ${D.argChoices.map((F)=>JSON.stringify(F)).join(", ")}`);if(D.defaultValue!==void 0)u.push(`default: ${D.defaultValueDescription||JSON.stringify(D.defaultValue)}`);if(u.length>0){let F=`(${u.join(", ")})`;if(D.description)return`${D.description} ${F}`;return F}return D.description}formatHelp(D,u){let F=u.padWidth(D,u),E=u.helpWidth||80,C=2,B=2;function _(G,L){if(L){let S=`${G.padEnd(F+2)}${L}`;return u.wrap(S,E-2,F+2)}return G}function $(G){return G.join(`
3
+ `).replace(/^/gm," ".repeat(2))}let q=[`Usage: ${u.commandUsage(D)}`,""],Q=u.commandDescription(D);if(Q.length>0)q=q.concat([u.wrap(Q,E,0),""]);let Z=u.visibleArguments(D).map((G)=>{return _(u.argumentTerm(G),u.argumentDescription(G))});if(Z.length>0)q=q.concat(["Arguments:",$(Z),""]);let X=u.visibleOptions(D).map((G)=>{return _(u.optionTerm(G),u.optionDescription(G))});if(X.length>0)q=q.concat(["Options:",$(X),""]);if(this.showGlobalOptions){let G=u.visibleGlobalOptions(D).map((L)=>{return _(u.optionTerm(L),u.optionDescription(L))});if(G.length>0)q=q.concat(["Global Options:",$(G),""])}let Y=u.visibleCommands(D).map((G)=>{return _(u.subcommandTerm(G),u.subcommandDescription(G))});if(Y.length>0)q=q.concat(["Commands:",$(Y),""]);return q.join(`
4
+ `)}padWidth(D,u){return Math.max(u.longestOptionTermLength(D,u),u.longestGlobalOptionTermLength(D,u),u.longestSubcommandTermLength(D,u),u.longestArgumentTermLength(D,u))}wrap(D,u,F,E=40){let B=new RegExp(`[\\n][${" \\f\\t\\v   -    \uFEFF"}]+`);if(D.match(B))return D;let _=u-F;if(_<E)return D;let $=D.slice(0,F),q=D.slice(F).replace(`\r
5
+ `,`
6
+ `),Q=" ".repeat(F),X=`\\s${"​"}`,Y=new RegExp(`
7
+ |.{1,${_-1}}([${X}]|$)|[^${X}]+?([${X}]|$)`,"g"),G=q.match(Y)||[];return $+G.map((L,S)=>{if(L===`
8
+ `)return"";return(S>0?Q:"")+L.trimEnd()}).join(`
9
+ `)}}_F.Help=_u});var jD=I((zF)=>{var{InvalidArgumentError:qF}=x();class $u{constructor(D,u){this.flags=D,this.description=u||"",this.required=D.includes("<"),this.optional=D.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(D),this.mandatory=!1;let F=ZF(D);if(this.short=F.shortFlag,this.long=F.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(D,u){return this.defaultValue=D,this.defaultValueDescription=u,this}preset(D){return this.presetArg=D,this}conflicts(D){return this.conflictsWith=this.conflictsWith.concat(D),this}implies(D){let u=D;if(typeof D==="string")u={[D]:!0};return this.implied=Object.assign(this.implied||{},u),this}env(D){return this.envVar=D,this}argParser(D){return this.parseArg=D,this}makeOptionMandatory(D=!0){return this.mandatory=!!D,this}hideHelp(D=!0){return this.hidden=!!D,this}_concatValue(D,u){if(u===this.defaultValue||!Array.isArray(u))return[D];return u.concat(D)}choices(D){return this.argChoices=D.slice(),this.parseArg=(u,F)=>{if(!this.argChoices.includes(u))throw new qF(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(u,F);return u},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){return QF(this.name().replace(/^no-/,""))}is(D){return this.short===D||this.long===D}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class qu{constructor(D){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,D.forEach((u)=>{if(u.negate)this.negativeOptions.set(u.attributeName(),u);else this.positiveOptions.set(u.attributeName(),u)}),this.negativeOptions.forEach((u,F)=>{if(this.positiveOptions.has(F))this.dualOptions.add(F)})}valueFromOption(D,u){let F=u.attributeName();if(!this.dualOptions.has(F))return!0;let E=this.negativeOptions.get(F).presetArg,C=E!==void 0?E:!1;return u.negate===(C===D)}}function QF(D){return D.split("-").reduce((u,F)=>{return u+F[0].toUpperCase()+F.slice(1)})}function ZF(D){let u,F,E=D.split(/[ |,]+/);if(E.length>1&&!/^[[<]/.test(E[1]))u=E.shift();if(F=E.shift(),!u&&/^-[^-]$/.test(F))u=F,F=void 0;return{shortFlag:u,longFlag:F}}zF.Option=$u;zF.DualOptions=qu});var Qu=I((AF)=>{function GF(D,u){if(Math.abs(D.length-u.length)>3)return Math.max(D.length,u.length);let F=[];for(let E=0;E<=D.length;E++)F[E]=[E];for(let E=0;E<=u.length;E++)F[0][E]=E;for(let E=1;E<=u.length;E++)for(let C=1;C<=D.length;C++){let B=1;if(D[C-1]===u[E-1])B=0;else B=1;if(F[C][E]=Math.min(F[C-1][E]+1,F[C][E-1]+1,F[C-1][E-1]+B),C>1&&E>1&&D[C-1]===u[E-2]&&D[C-2]===u[E-1])F[C][E]=Math.min(F[C][E],F[C-2][E-2]+1)}return F[D.length][u.length]}function YF(D,u){if(!u||u.length===0)return"";u=Array.from(new Set(u));let F=D.startsWith("--");if(F)D=D.slice(2),u=u.map((_)=>_.slice(2));let E=[],C=3,B=0.4;if(u.forEach((_)=>{if(_.length<=1)return;let $=GF(D,_),q=Math.max(D.length,_.length);if((q-$)/q>B){if($<C)C=$,E=[_];else if($===C)E.push(_)}}),E.sort((_,$)=>_.localeCompare($)),F)E=E.map((_)=>`--${_}`);if(E.length>1)return`
10
+ (Did you mean one of ${E.join(", ")}?)`;if(E.length===1)return`
11
+ (Did you mean ${E[0]}?)`;return""}AF.suggestSimilar=YF});var Xu=I((RF)=>{var HF=f("node:events").EventEmitter,MD=f("node:child_process"),k=f("node:path"),ID=f("node:fs"),W=f("node:process"),{Argument:WF,humanReadableArgName:LF}=o(),{CommanderError:ND}=x(),{Help:VF}=RD(),{Option:Zu,DualOptions:KF}=jD(),{suggestSimilar:zu}=Qu();class TD extends HF{constructor(D){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=D||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:(u)=>W.stdout.write(u),writeErr:(u)=>W.stderr.write(u),getOutHelpWidth:()=>W.stdout.isTTY?W.stdout.columns:void 0,getErrHelpWidth:()=>W.stderr.isTTY?W.stderr.columns:void 0,outputError:(u,F)=>F(u)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(D){return this._outputConfiguration=D._outputConfiguration,this._helpOption=D._helpOption,this._helpCommand=D._helpCommand,this._helpConfiguration=D._helpConfiguration,this._exitCallback=D._exitCallback,this._storeOptionsAsProperties=D._storeOptionsAsProperties,this._combineFlagAndOptionalValue=D._combineFlagAndOptionalValue,this._allowExcessArguments=D._allowExcessArguments,this._enablePositionalOptions=D._enablePositionalOptions,this._showHelpAfterError=D._showHelpAfterError,this._showSuggestionAfterError=D._showSuggestionAfterError,this}_getCommandAndAncestors(){let D=[];for(let u=this;u;u=u.parent)D.push(u);return D}command(D,u,F){let E=u,C=F;if(typeof E==="object"&&E!==null)C=E,E=null;C=C||{};let[,B,_]=D.match(/([^ ]+) *(.*)/),$=this.createCommand(B);if(E)$.description(E),$._executableHandler=!0;if(C.isDefault)this._defaultCommandName=$._name;if($._hidden=!!(C.noHelp||C.hidden),$._executableFile=C.executableFile||null,_)$.arguments(_);if(this._registerCommand($),$.parent=this,$.copyInheritedSettings(this),E)return this;return $}createCommand(D){return new TD(D)}createHelp(){return Object.assign(new VF,this.configureHelp())}configureHelp(D){if(D===void 0)return this._helpConfiguration;return this._helpConfiguration=D,this}configureOutput(D){if(D===void 0)return this._outputConfiguration;return Object.assign(this._outputConfiguration,D),this}showHelpAfterError(D=!0){if(typeof D!=="string")D=!!D;return this._showHelpAfterError=D,this}showSuggestionAfterError(D=!0){return this._showSuggestionAfterError=!!D,this}addCommand(D,u){if(!D._name)throw Error(`Command passed to .addCommand() must have a name
12
+ - specify the name in Command constructor or using .name()`);if(u=u||{},u.isDefault)this._defaultCommandName=D._name;if(u.noHelp||u.hidden)D._hidden=!0;return this._registerCommand(D),D.parent=this,D._checkForBrokenPassThrough(),this}createArgument(D,u){return new WF(D,u)}argument(D,u,F,E){let C=this.createArgument(D,u);if(typeof F==="function")C.default(E).argParser(F);else C.default(F);return this.addArgument(C),this}arguments(D){return D.trim().split(/ +/).forEach((u)=>{this.argument(u)}),this}addArgument(D){let u=this.registeredArguments.slice(-1)[0];if(u&&u.variadic)throw Error(`only the last argument can be variadic '${u.name()}'`);if(D.required&&D.defaultValue!==void 0&&D.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${D.name()}'`);return this.registeredArguments.push(D),this}helpCommand(D,u){if(typeof D==="boolean")return this._addImplicitHelpCommand=D,this;D=D??"help [command]";let[,F,E]=D.match(/([^ ]+) *(.*)/),C=u??"display help for command",B=this.createCommand(F);if(B.helpOption(!1),E)B.arguments(E);if(C)B.description(C);return this._addImplicitHelpCommand=!0,this._helpCommand=B,this}addHelpCommand(D,u){if(typeof D!=="object")return this.helpCommand(D,u),this;return this._addImplicitHelpCommand=!0,this._helpCommand=D,this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook(D,u){let F=["preSubcommand","preAction","postAction"];if(!F.includes(D))throw Error(`Unexpected value for event passed to hook : '${D}'.
13
+ Expecting one of '${F.join("', '")}'`);if(this._lifeCycleHooks[D])this._lifeCycleHooks[D].push(u);else this._lifeCycleHooks[D]=[u];return this}exitOverride(D){if(D)this._exitCallback=D;else this._exitCallback=(u)=>{if(u.code!=="commander.executeSubCommandAsync")throw u};return this}_exit(D,u,F){if(this._exitCallback)this._exitCallback(new ND(D,u,F));W.exit(D)}action(D){let u=(F)=>{let E=this.registeredArguments.length,C=F.slice(0,E);if(this._storeOptionsAsProperties)C[E]=this;else C[E]=this.opts();return C.push(this),D.apply(this,C)};return this._actionHandler=u,this}createOption(D,u){return new Zu(D,u)}_callParseArg(D,u,F,E){try{return D.parseArg(u,F)}catch(C){if(C.code==="commander.invalidArgument"){let B=`${E} ${C.message}`;this.error(B,{exitCode:C.exitCode,code:C.code})}throw C}}_registerOption(D){let u=D.short&&this._findOption(D.short)||D.long&&this._findOption(D.long);if(u){let F=D.long&&this._findOption(D.long)?D.long:D.short;throw Error(`Cannot add option '${D.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${F}'
14
+ - already used by option '${u.flags}'`)}this.options.push(D)}_registerCommand(D){let u=(E)=>{return[E.name()].concat(E.aliases())},F=u(D).find((E)=>this._findCommand(E));if(F){let E=u(this._findCommand(F)).join("|"),C=u(D).join("|");throw Error(`cannot add command '${C}' as already have command '${E}'`)}this.commands.push(D)}addOption(D){this._registerOption(D);let u=D.name(),F=D.attributeName();if(D.negate){let C=D.long.replace(/^--no-/,"--");if(!this._findOption(C))this.setOptionValueWithSource(F,D.defaultValue===void 0?!0:D.defaultValue,"default")}else if(D.defaultValue!==void 0)this.setOptionValueWithSource(F,D.defaultValue,"default");let E=(C,B,_)=>{if(C==null&&D.presetArg!==void 0)C=D.presetArg;let $=this.getOptionValue(F);if(C!==null&&D.parseArg)C=this._callParseArg(D,C,$,B);else if(C!==null&&D.variadic)C=D._concatValue(C,$);if(C==null)if(D.negate)C=!1;else if(D.isBoolean()||D.optional)C=!0;else C="";this.setOptionValueWithSource(F,C,_)};if(this.on("option:"+u,(C)=>{let B=`error: option '${D.flags}' argument '${C}' is invalid.`;E(C,B,"cli")}),D.envVar)this.on("optionEnv:"+u,(C)=>{let B=`error: option '${D.flags}' value '${C}' from env '${D.envVar}' is invalid.`;E(C,B,"env")});return this}_optionEx(D,u,F,E,C){if(typeof u==="object"&&u instanceof Zu)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let B=this.createOption(u,F);if(B.makeOptionMandatory(!!D.mandatory),typeof E==="function")B.default(C).argParser(E);else if(E instanceof RegExp){let _=E;E=($,q)=>{let Q=_.exec($);return Q?Q[0]:q},B.default(C).argParser(E)}else B.default(E);return this.addOption(B)}option(D,u,F,E){return this._optionEx({},D,u,F,E)}requiredOption(D,u,F,E){return this._optionEx({mandatory:!0},D,u,F,E)}combineFlagAndOptionalValue(D=!0){return this._combineFlagAndOptionalValue=!!D,this}allowUnknownOption(D=!0){return this._allowUnknownOption=!!D,this}allowExcessArguments(D=!0){return this._allowExcessArguments=!!D,this}enablePositionalOptions(D=!0){return this._enablePositionalOptions=!!D,this}passThroughOptions(D=!0){return this._passThroughOptions=!!D,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(D=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!D,this}getOptionValue(D){if(this._storeOptionsAsProperties)return this[D];return this._optionValues[D]}setOptionValue(D,u){return this.setOptionValueWithSource(D,u,void 0)}setOptionValueWithSource(D,u,F){if(this._storeOptionsAsProperties)this[D]=u;else this._optionValues[D]=u;return this._optionValueSources[D]=F,this}getOptionValueSource(D){return this._optionValueSources[D]}getOptionValueSourceWithGlobals(D){let u;return this._getCommandAndAncestors().forEach((F)=>{if(F.getOptionValueSource(D)!==void 0)u=F.getOptionValueSource(D)}),u}_prepareUserArgs(D,u){if(D!==void 0&&!Array.isArray(D))throw Error("first parameter to parse must be array or undefined");if(u=u||{},D===void 0&&u.from===void 0){if(W.versions?.electron)u.from="electron";let E=W.execArgv??[];if(E.includes("-e")||E.includes("--eval")||E.includes("-p")||E.includes("--print"))u.from="eval"}if(D===void 0)D=W.argv;this.rawArgs=D.slice();let F;switch(u.from){case void 0:case"node":this._scriptPath=D[1],F=D.slice(2);break;case"electron":if(W.defaultApp)this._scriptPath=D[1],F=D.slice(2);else F=D.slice(1);break;case"user":F=D.slice(0);break;case"eval":F=D.slice(1);break;default:throw Error(`unexpected parse option { from: '${u.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",F}parse(D,u){let F=this._prepareUserArgs(D,u);return this._parseCommand([],F),this}async parseAsync(D,u){let F=this._prepareUserArgs(D,u);return await this._parseCommand([],F),this}_executeSubCommand(D,u){u=u.slice();let F=!1,E=[".js",".ts",".tsx",".mjs",".cjs"];function C(Q,Z){let X=k.resolve(Q,Z);if(ID.existsSync(X))return X;if(E.includes(k.extname(Z)))return;let Y=E.find((G)=>ID.existsSync(`${X}${G}`));if(Y)return`${X}${Y}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let B=D._executableFile||`${this._name}-${D._name}`,_=this._executableDir||"";if(this._scriptPath){let Q;try{Q=ID.realpathSync(this._scriptPath)}catch(Z){Q=this._scriptPath}_=k.resolve(k.dirname(Q),_)}if(_){let Q=C(_,B);if(!Q&&!D._executableFile&&this._scriptPath){let Z=k.basename(this._scriptPath,k.extname(this._scriptPath));if(Z!==this._name)Q=C(_,`${Z}-${D._name}`)}B=Q||B}F=E.includes(k.extname(B));let $;if(W.platform!=="win32")if(F)u.unshift(B),u=Ju(W.execArgv).concat(u),$=MD.spawn(W.argv[0],u,{stdio:"inherit"});else $=MD.spawn(B,u,{stdio:"inherit"});else u.unshift(B),u=Ju(W.execArgv).concat(u),$=MD.spawn(W.execPath,u,{stdio:"inherit"});if(!$.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((Z)=>{W.on(Z,()=>{if($.killed===!1&&$.exitCode===null)$.kill(Z)})});let q=this._exitCallback;$.on("close",(Q)=>{if(Q=Q??1,!q)W.exit(Q);else q(new ND(Q,"commander.executeSubCommandAsync","(close)"))}),$.on("error",(Q)=>{if(Q.code==="ENOENT"){let Z=_?`searched for local subcommand relative to directory '${_}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",X=`'${B}' does not exist
15
+ - if '${D._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
16
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
17
+ - ${Z}`;throw Error(X)}else if(Q.code==="EACCES")throw Error(`'${B}' not executable`);if(!q)W.exit(1);else{let Z=new ND(1,"commander.executeSubCommandAsync","(error)");Z.nestedError=Q,q(Z)}}),this.runningCommand=$}_dispatchSubcommand(D,u,F){let E=this._findCommand(D);if(!E)this.help({error:!0});let C;return C=this._chainOrCallSubCommandHook(C,E,"preSubcommand"),C=this._chainOrCall(C,()=>{if(E._executableHandler)this._executeSubCommand(E,u.concat(F));else return E._parseCommand(u,F)}),C}_dispatchHelpCommand(D){if(!D)this.help();let u=this._findCommand(D);if(u&&!u._executableHandler)u.help();return this._dispatchSubcommand(D,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((D,u)=>{if(D.required&&this.args[u]==null)this.missingArgument(D.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let D=(F,E,C)=>{let B=E;if(E!==null&&F.parseArg){let _=`error: command-argument value '${E}' is invalid for argument '${F.name()}'.`;B=this._callParseArg(F,E,C,_)}return B};this._checkNumberOfArguments();let u=[];this.registeredArguments.forEach((F,E)=>{let C=F.defaultValue;if(F.variadic){if(E<this.args.length){if(C=this.args.slice(E),F.parseArg)C=C.reduce((B,_)=>{return D(F,_,B)},F.defaultValue)}else if(C===void 0)C=[]}else if(E<this.args.length){if(C=this.args[E],F.parseArg)C=D(F,C,F.defaultValue)}u[E]=C}),this.processedArgs=u}_chainOrCall(D,u){if(D&&D.then&&typeof D.then==="function")return D.then(()=>u());return u()}_chainOrCallHooks(D,u){let F=D,E=[];if(this._getCommandAndAncestors().reverse().filter((C)=>C._lifeCycleHooks[u]!==void 0).forEach((C)=>{C._lifeCycleHooks[u].forEach((B)=>{E.push({hookedCommand:C,callback:B})})}),u==="postAction")E.reverse();return E.forEach((C)=>{F=this._chainOrCall(F,()=>{return C.callback(C.hookedCommand,this)})}),F}_chainOrCallSubCommandHook(D,u,F){let E=D;if(this._lifeCycleHooks[F]!==void 0)this._lifeCycleHooks[F].forEach((C)=>{E=this._chainOrCall(E,()=>{return C(this,u)})});return E}_parseCommand(D,u){let F=this.parseOptions(u);if(this._parseOptionsEnv(),this._parseOptionsImplied(),D=D.concat(F.operands),u=F.unknown,this.args=D.concat(u),D&&this._findCommand(D[0]))return this._dispatchSubcommand(D[0],D.slice(1),u);if(this._getHelpCommand()&&D[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(D[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(u),this._dispatchSubcommand(this._defaultCommandName,D,u);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(F.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let E=()=>{if(F.unknown.length>0)this.unknownOption(F.unknown[0])},C=`command:${this.name()}`;if(this._actionHandler){E(),this._processArguments();let B;if(B=this._chainOrCallHooks(B,"preAction"),B=this._chainOrCall(B,()=>this._actionHandler(this.processedArgs)),this.parent)B=this._chainOrCall(B,()=>{this.parent.emit(C,D,u)});return B=this._chainOrCallHooks(B,"postAction"),B}if(this.parent&&this.parent.listenerCount(C))E(),this._processArguments(),this.parent.emit(C,D,u);else if(D.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",D,u);if(this.listenerCount("command:*"))this.emit("command:*",D,u);else if(this.commands.length)this.unknownCommand();else E(),this._processArguments()}else if(this.commands.length)E(),this.help({error:!0});else E(),this._processArguments()}_findCommand(D){if(!D)return;return this.commands.find((u)=>u._name===D||u._aliases.includes(D))}_findOption(D){return this.options.find((u)=>u.is(D))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((D)=>{D.options.forEach((u)=>{if(u.mandatory&&D.getOptionValue(u.attributeName())===void 0)D.missingMandatoryOptionValue(u)})})}_checkForConflictingLocalOptions(){let D=this.options.filter((F)=>{let E=F.attributeName();if(this.getOptionValue(E)===void 0)return!1;return this.getOptionValueSource(E)!=="default"});D.filter((F)=>F.conflictsWith.length>0).forEach((F)=>{let E=D.find((C)=>F.conflictsWith.includes(C.attributeName()));if(E)this._conflictingOption(F,E)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((D)=>{D._checkForConflictingLocalOptions()})}parseOptions(D){let u=[],F=[],E=u,C=D.slice();function B($){return $.length>1&&$[0]==="-"}let _=null;while(C.length){let $=C.shift();if($==="--"){if(E===F)E.push($);E.push(...C);break}if(_&&!B($)){this.emit(`option:${_.name()}`,$);continue}if(_=null,B($)){let q=this._findOption($);if(q){if(q.required){let Q=C.shift();if(Q===void 0)this.optionMissingArgument(q);this.emit(`option:${q.name()}`,Q)}else if(q.optional){let Q=null;if(C.length>0&&!B(C[0]))Q=C.shift();this.emit(`option:${q.name()}`,Q)}else this.emit(`option:${q.name()}`);_=q.variadic?q:null;continue}}if($.length>2&&$[0]==="-"&&$[1]!=="-"){let q=this._findOption(`-${$[1]}`);if(q){if(q.required||q.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${q.name()}`,$.slice(2));else this.emit(`option:${q.name()}`),C.unshift(`-${$.slice(2)}`);continue}}if(/^--[^=]+=/.test($)){let q=$.indexOf("="),Q=this._findOption($.slice(0,q));if(Q&&(Q.required||Q.optional)){this.emit(`option:${Q.name()}`,$.slice(q+1));continue}}if(B($))E=F;if((this._enablePositionalOptions||this._passThroughOptions)&&u.length===0&&F.length===0){if(this._findCommand($)){if(u.push($),C.length>0)F.push(...C);break}else if(this._getHelpCommand()&&$===this._getHelpCommand().name()){if(u.push($),C.length>0)u.push(...C);break}else if(this._defaultCommandName){if(F.push($),C.length>0)F.push(...C);break}}if(this._passThroughOptions){if(E.push($),C.length>0)E.push(...C);break}E.push($)}return{operands:u,unknown:F}}opts(){if(this._storeOptionsAsProperties){let D={},u=this.options.length;for(let F=0;F<u;F++){let E=this.options[F].attributeName();D[E]=E===this._versionOptionName?this._version:this[E]}return D}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((D,u)=>Object.assign(D,u.opts()),{})}error(D,u){if(this._outputConfiguration.outputError(`${D}
18
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
19
+ `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
20
+ `),this.outputHelp({error:!0});let F=u||{},E=F.exitCode||1,C=F.code||"commander.error";this._exit(E,C,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in W.env){let u=D.attributeName();if(this.getOptionValue(u)===void 0||["default","config","env"].includes(this.getOptionValueSource(u)))if(D.required||D.optional)this.emit(`optionEnv:${D.name()}`,W.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new KF(this.options),u=(F)=>{return this.getOptionValue(F)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(F))};this.options.filter((F)=>F.implied!==void 0&&u(F.attributeName())&&D.valueFromOption(this.getOptionValue(F.attributeName()),F)).forEach((F)=>{Object.keys(F.implied).filter((E)=>!u(E)).forEach((E)=>{this.setOptionValueWithSource(E,F.implied[E],"implied")})})}missingArgument(D){let u=`error: missing required argument '${D}'`;this.error(u,{code:"commander.missingArgument"})}optionMissingArgument(D){let u=`error: option '${D.flags}' argument missing`;this.error(u,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(D){let u=`error: required option '${D.flags}' not specified`;this.error(u,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(D,u){let F=(B)=>{let _=B.attributeName(),$=this.getOptionValue(_),q=this.options.find((Z)=>Z.negate&&_===Z.attributeName()),Q=this.options.find((Z)=>!Z.negate&&_===Z.attributeName());if(q&&(q.presetArg===void 0&&$===!1||q.presetArg!==void 0&&$===q.presetArg))return q;return Q||B},E=(B)=>{let _=F(B),$=_.attributeName();if(this.getOptionValueSource($)==="env")return`environment variable '${_.envVar}'`;return`option '${_.flags}'`},C=`error: ${E(D)} cannot be used with ${E(u)}`;this.error(C,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let u="";if(D.startsWith("--")&&this._showSuggestionAfterError){let E=[],C=this;do{let B=C.createHelp().visibleOptions(C).filter((_)=>_.long).map((_)=>_.long);E=E.concat(B),C=C.parent}while(C&&!C._enablePositionalOptions);u=zu(D,E)}let F=`error: unknown option '${D}'${u}`;this.error(F,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let u=this.registeredArguments.length,F=u===1?"":"s",C=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${u} argument${F} but got ${D.length}.`;this.error(C,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],u="";if(this._showSuggestionAfterError){let E=[];this.createHelp().visibleCommands(this).forEach((C)=>{if(E.push(C.name()),C.alias())E.push(C.alias())}),u=zu(D,E)}let F=`error: unknown command '${D}'${u}`;this.error(F,{code:"commander.unknownCommand"})}version(D,u,F){if(D===void 0)return this._version;this._version=D,u=u||"-V, --version",F=F||"output the version number";let E=this.createOption(u,F);return this._versionOptionName=E.attributeName(),this._registerOption(E),this.on("option:"+E.name(),()=>{this._outputConfiguration.writeOut(`${D}
21
+ `),this._exit(0,"commander.version",D)}),this}description(D,u){if(D===void 0&&u===void 0)return this._description;if(this._description=D,u)this._argsDescription=u;return this}summary(D){if(D===void 0)return this._summary;return this._summary=D,this}alias(D){if(D===void 0)return this._aliases[0];let u=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)u=this.commands[this.commands.length-1];if(D===u._name)throw Error("Command alias can't be the same as its name");let F=this.parent?._findCommand(D);if(F){let E=[F.name()].concat(F.aliases()).join("|");throw Error(`cannot add alias '${D}' to command '${this.name()}' as already have command '${E}'`)}return u._aliases.push(D),this}aliases(D){if(D===void 0)return this._aliases;return D.forEach((u)=>this.alias(u)),this}usage(D){if(D===void 0){if(this._usage)return this._usage;let u=this.registeredArguments.map((F)=>{return LF(F)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?u:[]).join(" ")}return this._usage=D,this}name(D){if(D===void 0)return this._name;return this._name=D,this}nameFromFilename(D){return this._name=k.basename(D,k.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let u=this.createHelp();if(u.helpWidth===void 0)u.helpWidth=D&&D.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth();return u.formatHelp(this,u)}_getHelpContext(D){D=D||{};let u={error:!!D.error},F;if(u.error)F=(E)=>this._outputConfiguration.writeErr(E);else F=(E)=>this._outputConfiguration.writeOut(E);return u.write=D.write||F,u.command=this,u}outputHelp(D){let u;if(typeof D==="function")u=D,D=void 0;let F=this._getHelpContext(D);this._getCommandAndAncestors().reverse().forEach((C)=>C.emit("beforeAllHelp",F)),this.emit("beforeHelp",F);let E=this.helpInformation(F);if(u){if(E=u(E),typeof E!=="string"&&!Buffer.isBuffer(E))throw Error("outputHelp callback must return a string or a Buffer")}if(F.write(E),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",F),this._getCommandAndAncestors().forEach((C)=>C.emit("afterAllHelp",F))}helpOption(D,u){if(typeof D==="boolean"){if(D)this._helpOption=this._helpOption??void 0;else this._helpOption=null;return this}return D=D??"-h, --help",u=u??"display help for command",this._helpOption=this.createOption(D,u),this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(D){return this._helpOption=D,this}help(D){this.outputHelp(D);let u=W.exitCode||0;if(u===0&&D&&typeof D!=="function"&&D.error)u=1;this._exit(u,"commander.help","(outputHelp)")}addHelpText(D,u){let F=["beforeAll","before","after","afterAll"];if(!F.includes(D))throw Error(`Unexpected value for position to addHelpText.
22
+ Expecting one of '${F.join("', '")}'`);let E=`${D}Help`;return this.on(E,(C)=>{let B;if(typeof u==="function")B=u({error:C.error,command:C.command});else B=u;if(B)C.write(`${B}
23
+ `)}),this}_outputHelpIfRequested(D){let u=this._getHelpOption();if(u&&D.find((E)=>u.is(E)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function Ju(D){return D.map((u)=>{if(!u.startsWith("--inspect"))return u;let F,E="127.0.0.1",C="9229",B;if((B=u.match(/^(--inspect(-brk)?)$/))!==null)F=B[1];else if((B=u.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(F=B[1],/^\d+$/.test(B[3]))C=B[3];else E=B[3];else if((B=u.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)F=B[1],E=B[3],C=B[4];if(F&&C!=="0")return`${F}=${E}:${parseInt(C)+1}`;return u})}RF.Command=TD});var Uu=I((NF)=>{var{Argument:Gu}=o(),{Command:wD}=Xu(),{CommanderError:MF,InvalidArgumentError:Yu}=x(),{Help:IF}=RD(),{Option:Au}=jD();NF.program=new wD;NF.createCommand=(D)=>new wD(D);NF.createOption=(D,u)=>new Au(D,u);NF.createArgument=(D,u)=>new Gu(D,u);NF.Command=wD;NF.Option=Au;NF.Argument=Gu;NF.Help=IF;NF.CommanderError=MF;NF.InvalidArgumentError=Yu;NF.InvalidOptionArgumentError=Yu});var gu=I((E3,Z2)=>{Z2.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},dwarfFortress:{interval:80,frames:[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}});var gD=I((C3,lu)=>{var BD=Object.assign({},gu()),mu=Object.keys(BD);Object.defineProperty(BD,"random",{get(){let D=Math.floor(Math.random()*mu.length),u=mu[D];return BD[u]}});lu.exports=BD});var E0=I((N3,F0)=>{F0.exports=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}});var Hu=t(Uu(),1),{program:H8,createCommand:W8,createArgument:L8,createOption:V8,CommanderError:K8,InvalidArgumentError:R8,InvalidOptionArgumentError:j8,Command:Wu,Argument:M8,Option:I8,Help:N8}=Hu.default;import $D from"node:process";var Lu=(D=0)=>(u)=>`\x1B[${u+D}m`,Vu=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,Ku=(D=0)=>(u,F,E)=>`\x1B[${38+D};2;${u};${F};${E}m`,A={modifier:{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]},color:{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],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},w8=Object.keys(A.modifier),hF=Object.keys(A.color),gF=Object.keys(A.bgColor),k8=[...hF,...gF];function mF(){let D=new Map;for(let[u,F]of Object.entries(A)){for(let[E,C]of Object.entries(F))A[E]={open:`\x1B[${C[0]}m`,close:`\x1B[${C[1]}m`},F[E]=A[E],D.set(C[0],C[1]);Object.defineProperty(A,u,{value:F,enumerable:!1})}return Object.defineProperty(A,"codes",{value:D,enumerable:!1}),A.color.close="\x1B[39m",A.bgColor.close="\x1B[49m",A.color.ansi=Lu(),A.color.ansi256=Vu(),A.color.ansi16m=Ku(),A.bgColor.ansi=Lu(10),A.bgColor.ansi256=Vu(10),A.bgColor.ansi16m=Ku(10),Object.defineProperties(A,{rgbToAnsi256:{value(u,F,E){if(u===F&&F===E){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(E/255*5)},enumerable:!1},hexToRgb:{value(u){let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[E]=F;if(E.length===3)E=[...E].map((B)=>B+B).join("");let C=Number.parseInt(E,16);return[C>>16&255,C>>8&255,C&255]},enumerable:!1},hexToAnsi256:{value:(u)=>A.rgbToAnsi256(...A.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,E,C;if(u>=232)F=((u-232)*10+8)/255,E=F,C=F;else{u-=16;let $=u%36;F=Math.floor(u/36)/5,E=Math.floor($/6)/5,C=$%6/5}let B=Math.max(F,E,C)*2;if(B===0)return 30;let _=30+(Math.round(C)<<2|Math.round(E)<<1|Math.round(F));if(B===2)_+=60;return _},enumerable:!1},rgbToAnsi:{value:(u,F,E)=>A.ansi256ToAnsi(A.rgbToAnsi256(u,F,E)),enumerable:!1},hexToAnsi:{value:(u)=>A.ansi256ToAnsi(A.hexToAnsi256(u)),enumerable:!1}}),A}var lF=mF(),j=lF;import kD from"node:process";import cF from"node:os";import Ru from"node:tty";function R(D,u=globalThis.Deno?globalThis.Deno.args:kD.argv){let F=D.startsWith("-")?"":D.length===1?"-":"--",E=u.indexOf(F+D),C=u.indexOf("--");return E!==-1&&(C===-1||E<C)}var{env:U}=kD,e;if(R("no-color")||R("no-colors")||R("color=false")||R("color=never"))e=0;else if(R("color")||R("colors")||R("color=true")||R("color=always"))e=1;function dF(){if("FORCE_COLOR"in U){if(U.FORCE_COLOR==="true")return 1;if(U.FORCE_COLOR==="false")return 0;return U.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(U.FORCE_COLOR,10),3)}}function pF(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function rF(D,{streamIsTTY:u,sniffFlags:F=!0}={}){let E=dF();if(E!==void 0)e=E;let C=F?e:E;if(C===0)return 0;if(F){if(R("color=16m")||R("color=full")||R("color=truecolor"))return 3;if(R("color=256"))return 2}if("TF_BUILD"in U&&"AGENT_NAME"in U)return 1;if(D&&!u&&C===void 0)return 0;let B=C||0;if(U.TERM==="dumb")return B;if(kD.platform==="win32"){let _=cF.release().split(".");if(Number(_[0])>=10&&Number(_[2])>=10586)return Number(_[2])>=14931?3:2;return 1}if("CI"in U){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((_)=>(_ in U)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((_)=>(_ in U))||U.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in U)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(U.TEAMCITY_VERSION)?1:0;if(U.COLORTERM==="truecolor")return 3;if(U.TERM==="xterm-kitty")return 3;if(U.TERM==="xterm-ghostty")return 3;if(U.TERM==="wezterm")return 3;if("TERM_PROGRAM"in U){let _=Number.parseInt((U.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(U.TERM_PROGRAM){case"iTerm.app":return _>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(U.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(U.TERM))return 1;if("COLORTERM"in U)return 1;return B}function ju(D,u={}){let F=rF(D,{streamIsTTY:D&&D.isTTY,...u});return pF(F)}var aF={stdout:ju({isTTY:Ru.isatty(1)}),stderr:ju({isTTY:Ru.isatty(2)})},Mu=aF;function Iu(D,u,F){let E=D.indexOf(u);if(E===-1)return D;let C=u.length,B=0,_="";do _+=D.slice(B,E)+u+F,B=E+C,E=D.indexOf(u,B);while(E!==-1);return _+=D.slice(B),_}function Nu(D,u,F,E){let C=0,B="";do{let _=D[E-1]==="\r";B+=D.slice(C,_?E-1:E)+u+(_?`\r
24
+ `:`
25
+ `)+F,C=E+1,E=D.indexOf(`
26
+ `,C)}while(E!==-1);return B+=D.slice(C),B}var{stdout:Tu,stderr:wu}=Mu,SD=Symbol("GENERATOR"),P=Symbol("STYLER"),h=Symbol("IS_EMPTY"),ku=["ansi","ansi","ansi256","ansi16m"],b=Object.create(null),sF=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let F=Tu?Tu.level:0;D.level=u.level===void 0?F:u.level};var iF=(D)=>{let u=(...F)=>F.join(" ");return sF(u,D),Object.setPrototypeOf(u,g.prototype),u};function g(D){return iF(D)}Object.setPrototypeOf(g.prototype,Function.prototype);for(let[D,u]of Object.entries(j))b[D]={get(){let F=DD(this,yD(u.open,u.close,this[P]),this[h]);return Object.defineProperty(this,D,{value:F}),F}};b.visible={get(){let D=DD(this,this[P],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var OD=(D,u,F,...E)=>{if(D==="rgb"){if(u==="ansi16m")return j[F].ansi16m(...E);if(u==="ansi256")return j[F].ansi256(j.rgbToAnsi256(...E));return j[F].ansi(j.rgbToAnsi(...E))}if(D==="hex")return OD("rgb",u,F,...j.hexToRgb(...E));return j[F][D](...E)},nF=["rgb","hex","ansi256"];for(let D of nF){b[D]={get(){let{level:F}=this;return function(...E){let C=yD(OD(D,ku[F],"color",...E),j.color.close,this[P]);return DD(this,C,this[h])}}};let u="bg"+D[0].toUpperCase()+D.slice(1);b[u]={get(){let{level:F}=this;return function(...E){let C=yD(OD(D,ku[F],"bgColor",...E),j.bgColor.close,this[P]);return DD(this,C,this[h])}}}}var tF=Object.defineProperties(()=>{},{...b,level:{enumerable:!0,get(){return this[SD].level},set(D){this[SD].level=D}}}),yD=(D,u,F)=>{let E,C;if(F===void 0)E=D,C=u;else E=F.openAll+D,C=u+F.closeAll;return{open:D,close:u,openAll:E,closeAll:C,parent:F}},DD=(D,u,F)=>{let E=(...C)=>oF(E,C.length===1?""+C[0]:C.join(" "));return Object.setPrototypeOf(E,tF),E[SD]=D,E[P]=u,E[h]=F,E},oF=(D,u)=>{if(D.level<=0||!u)return D[h]?"":u;let F=D[P];if(F===void 0)return u;let{openAll:E,closeAll:C}=F;if(u.includes("\x1B"))while(F!==void 0)u=Iu(u,F.close,F.open),F=F.parent;let B=u.indexOf(`
27
+ `);if(B!==-1)u=Nu(u,C,E,B);return E+u+C};Object.defineProperties(g.prototype,b);var eF=g(),g8=g({level:wu?wu.level:0});var J=eF;import hu from"node:process";import ED from"node:process";var D2=(D,u,F,E)=>{if(F==="length"||F==="prototype")return;if(F==="arguments"||F==="caller")return;let C=Object.getOwnPropertyDescriptor(D,F),B=Object.getOwnPropertyDescriptor(u,F);if(!u2(C,B)&&E)return;Object.defineProperty(D,F,B)},u2=function(D,u){return D===void 0||D.configurable||D.writable===u.writable&&D.enumerable===u.enumerable&&D.configurable===u.configurable&&(D.writable||D.value===u.value)},F2=(D,u)=>{let F=Object.getPrototypeOf(u);if(F===Object.getPrototypeOf(D))return;Object.setPrototypeOf(D,F)},E2=(D,u)=>`/* Wrapped ${D}*/
28
+ ${u}`,C2=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),B2=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),_2=(D,u,F)=>{let E=F===""?"":`with ${F.trim()}() `,C=E2.bind(null,E,u.toString());Object.defineProperty(C,"name",B2);let{writable:B,enumerable:_,configurable:$}=C2;Object.defineProperty(D,"toString",{value:C,writable:B,enumerable:_,configurable:$})};function PD(D,u,{ignoreNonConfigurable:F=!1}={}){let{name:E}=D;for(let C of Reflect.ownKeys(u))D2(D,u,C,F);return F2(D,u),_2(D,u,E),D}var uD=new WeakMap,Su=(D,u={})=>{if(typeof D!=="function")throw TypeError("Expected a function");let F,E=0,C=D.displayName||D.name||"<anonymous>",B=function(..._){if(uD.set(B,++E),E===1)F=D.apply(this,_),D=void 0;else if(u.throw===!0)throw Error(`Function \`${C}\` can only be called once`);return F};return PD(B,D),uD.set(B,E),B};Su.callCount=(D)=>{if(!uD.has(D))throw Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return uD.get(D)};var Ou=Su;var y=[];y.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")y.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")y.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var FD=(D)=>!!D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function",bD=Symbol.for("signal-exit emitter"),vD=globalThis,$2=Object.defineProperty.bind(Object);class yu{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(vD[bD])return vD[bD];$2(vD,bD,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,u){this.listeners[D].push(u)}removeListener(D,u){let F=this.listeners[D],E=F.indexOf(u);if(E===-1)return;if(E===0&&F.length===1)F.length=0;else F.splice(E,1)}emit(D,u,F){if(this.emitted[D])return!1;this.emitted[D]=!0;let E=!1;for(let C of this.listeners[D])E=C(u,F)===!0||E;if(D==="exit")E=this.emit("afterExit",u,F)||E;return E}}class xD{}var q2=(D)=>{return{onExit(u,F){return D.onExit(u,F)},load(){return D.load()},unload(){return D.unload()}}};class Pu extends xD{onExit(){return()=>{}}load(){}unload(){}}class bu extends xD{#_=fD.platform==="win32"?"SIGINT":"SIGHUP";#F=new yu;#D;#C;#J;#u={};#B=!1;constructor(D){super();this.#D=D,this.#u={};for(let u of y)this.#u[u]=()=>{let F=this.#D.listeners(u),{count:E}=this.#F,C=D;if(typeof C.__signal_exit_emitter__==="object"&&typeof C.__signal_exit_emitter__.count==="number")E+=C.__signal_exit_emitter__.count;if(F.length===E){this.unload();let B=this.#F.emit("exit",null,u),_=u==="SIGHUP"?this.#_:u;if(!B)D.kill(D.pid,_)}};this.#J=D.reallyExit,this.#C=D.emit}onExit(D,u){if(!FD(this.#D))return()=>{};if(this.#B===!1)this.load();let F=u?.alwaysLast?"afterExit":"exit";return this.#F.on(F,D),()=>{if(this.#F.removeListener(F,D),this.#F.listeners.exit.length===0&&this.#F.listeners.afterExit.length===0)this.unload()}}load(){if(this.#B)return;this.#B=!0,this.#F.count+=1;for(let D of y)try{let u=this.#u[D];if(u)this.#D.on(D,u)}catch(u){}this.#D.emit=(D,...u)=>{return this.#X(D,...u)},this.#D.reallyExit=(D)=>{return this.#E(D)}}unload(){if(!this.#B)return;this.#B=!1,y.forEach((D)=>{let u=this.#u[D];if(!u)throw Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,u)}catch(F){}}),this.#D.emit=this.#C,this.#D.reallyExit=this.#J,this.#F.count-=1}#E(D){if(!FD(this.#D))return 0;return this.#D.exitCode=D||0,this.#F.emit("exit",this.#D.exitCode,null),this.#J.call(this.#D,this.#D.exitCode)}#X(D,...u){let F=this.#C;if(D==="exit"&&FD(this.#D)){if(typeof u[0]==="number")this.#D.exitCode=u[0];let E=F.call(this.#D,D,...u);return this.#F.emit("exit",this.#D.exitCode,null),E}else return F.call(this.#D,D,...u)}}var fD=globalThis.process,{onExit:vu,load:a8,unload:s8}=q2(FD(fD)?new bu(fD):new Pu);var fu=ED.stderr.isTTY?ED.stderr:ED.stdout.isTTY?ED.stdout:void 0,Q2=fu?Ou(()=>{vu(()=>{fu.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},xu=Q2;var CD=!1,v={};v.show=(D=hu.stderr)=>{if(!D.isTTY)return;CD=!1,D.write("\x1B[?25h")};v.hide=(D=hu.stderr)=>{if(!D.isTTY)return;xu(),CD=!0,D.write("\x1B[?25l")};v.toggle=(D,u)=>{if(D!==void 0)CD=D;if(CD)v.show(u);else v.hide(u)};var hD=v;var c=t(gD(),1);import M from"node:process";function mD(){if(M.platform!=="win32")return M.env.TERM!=="linux";return Boolean(M.env.CI)||Boolean(M.env.WT_SESSION)||Boolean(M.env.TERMINUS_SUBLIME)||M.env.ConEmuTask==="{cmd::Cmder}"||M.env.TERM_PROGRAM==="Terminus-Sublime"||M.env.TERM_PROGRAM==="vscode"||M.env.TERM==="xterm-256color"||M.env.TERM==="alacritty"||M.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var z2={info:J.blue("ℹ"),success:J.green("✔"),warning:J.yellow("⚠"),error:J.red("✖")},J2={info:J.blue("i"),success:J.green("√"),warning:J.yellow("‼"),error:J.red("×")},X2=mD()?z2:J2,m=X2;function lD({onlyFirst:D=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",D?void 0:"g")}var G2=lD();function l(D){if(typeof D!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof D}\``);if(!D.includes("\x1B")&&!D.includes("›"))return D;return D.replace(G2,"")}var cu=161,du=1114109,pu=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],ru=12288,au=65510,su=[12288,12288,65281,65376,65504,65510];var iu=4352,nu=262141,cD=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var _D=(D,u)=>{let F=0,E=Math.floor(D.length/2)-1;while(F<=E){let C=Math.floor((F+E)/2),B=C*2;if(u<D[B])E=C-1;else if(u>D[B+1])F=C+1;else return!0}return!1};var tu=19968,[Y2,A2]=U2(cD);function U2(D){let u=D[0],F=D[1];for(let E=0;E<D.length;E+=2){let C=D[E],B=D[E+1];if(tu>=C&&tu<=B)return[C,B];if(B-C>F-u)u=C,F=B}return[u,F]}var ou=(D)=>{if(D<cu||D>du)return!1;return _D(pu,D)},eu=(D)=>{if(D<ru||D>au)return!1;return _D(su,D)};var D0=(D)=>{if(D>=Y2&&D<=A2)return!0;if(D<iu||D>nu)return!1;return _D(cD,D)};function H2(D){if(!Number.isSafeInteger(D))throw TypeError(`Expected a code point, got \`${typeof D}\`.`)}function u0(D,{ambiguousAsWide:u=!1}={}){if(H2(D),eu(D)||D0(D)||u&&ou(D))return 2;return 1}var C0=t(E0(),1),W2=new Intl.Segmenter,L2=/^\p{Default_Ignorable_Code_Point}$/u;function dD(D,u={}){if(typeof D!=="string"||D.length===0)return 0;let{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:E=!1}=u;if(!E)D=l(D);if(D.length===0)return 0;let C=0,B={ambiguousAsWide:!F};for(let{segment:_}of W2.segment(D)){let $=_.codePointAt(0);if($<=31||$>=127&&$<=159)continue;if($>=8203&&$<=8207||$===65279)continue;if($>=768&&$<=879||$>=6832&&$<=6911||$>=7616&&$<=7679||$>=8400&&$<=8447||$>=65056&&$<=65071)continue;if($>=55296&&$<=57343)continue;if($>=65024&&$<=65039)continue;if(L2.test(_))continue;if(C0.default().test(_)){C+=2;continue}C+=u0($,B)}return C}function pD({stream:D=process.stdout}={}){return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import B0 from"node:process";function rD(){let{env:D}=B0,{TERM:u,TERM_PROGRAM:F}=D;if(B0.platform!=="win32")return u!=="linux";return Boolean(D.WT_SESSION)||Boolean(D.TERMINUS_SUBLIME)||D.ConEmuTask==="{cmd::Cmder}"||F==="Terminus-Sublime"||F==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||D.TERMINAL_EMULATOR==="JetBrains-JediTerm"}import N from"node:process";var V2=3;class _0{#_=0;start(){if(this.#_++,this.#_===1)this.#F()}stop(){if(this.#_<=0)throw Error("`stop` called more times than `start`");if(this.#_--,this.#_===0)this.#D()}#F(){if(N.platform==="win32"||!N.stdin.isTTY)return;N.stdin.setRawMode(!0),N.stdin.on("data",this.#C),N.stdin.resume()}#D(){if(!N.stdin.isTTY)return;N.stdin.off("data",this.#C),N.stdin.pause(),N.stdin.setRawMode(!1)}#C(D){if(D[0]===V2)N.emit("SIGINT")}}var K2=new _0,aD=K2;var R2=t(gD(),1);class $0{#_=0;#F=!1;#D=0;#C=-1;#J=0;#u;#B;#E;#X;#Y;#Q;#Z;#z;#A;#$;#q;color;constructor(D){if(typeof D==="string")D={text:D};if(this.#u={color:"cyan",stream:$D.stderr,discardStdin:!0,hideCursor:!0,...D},this.color=this.#u.color,this.spinner=this.#u.spinner,this.#Y=this.#u.interval,this.#E=this.#u.stream,this.#Q=typeof this.#u.isEnabled==="boolean"?this.#u.isEnabled:pD({stream:this.#E}),this.#Z=typeof this.#u.isSilent==="boolean"?this.#u.isSilent:!1,this.text=this.#u.text,this.prefixText=this.#u.prefixText,this.suffixText=this.#u.suffixText,this.indent=this.#u.indent,$D.env.NODE_ENV==="test")this._stream=this.#E,this._isEnabled=this.#Q,Object.defineProperty(this,"_linesToClear",{get(){return this.#_},set(u){this.#_=u}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#C}}),Object.defineProperty(this,"_lineCount",{get(){return this.#D}})}get indent(){return this.#z}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw Error("The `indent` option must be an integer from 0 and up");this.#z=D,this.#G()}get interval(){return this.#Y??this.#B.interval??100}get spinner(){return this.#B}set spinner(D){if(this.#C=-1,this.#Y=void 0,typeof D==="object"){if(D.frames===void 0)throw Error("The given spinner must have a `frames` property");this.#B=D}else if(!rD())this.#B=c.default.line;else if(D===void 0)this.#B=c.default.dots;else if(D!=="default"&&c.default[D])this.#B=c.default[D];else throw Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#A}set text(D=""){this.#A=D,this.#G()}get prefixText(){return this.#$}set prefixText(D=""){this.#$=D,this.#G()}get suffixText(){return this.#q}set suffixText(D=""){this.#q=D,this.#G()}get isSpinning(){return this.#X!==void 0}#U(D=this.#$,u=" "){if(typeof D==="string"&&D!=="")return D+u;if(typeof D==="function")return D()+u;return""}#H(D=this.#q,u=" "){if(typeof D==="string"&&D!=="")return u+D;if(typeof D==="function")return u+D();return""}#G(){let D=this.#E.columns??80,u=this.#U(this.#$,"-"),F=this.#H(this.#q,"-"),E=" ".repeat(this.#z)+u+"--"+this.#A+"--"+F;this.#D=0;for(let C of l(E).split(`
29
+ `))this.#D+=Math.max(1,Math.ceil(dD(C,{countAnsiEscapeCodes:!0})/D))}get isEnabled(){return this.#Q&&!this.#Z}set isEnabled(D){if(typeof D!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this.#Q=D}get isSilent(){return this.#Z}set isSilent(D){if(typeof D!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this.#Z=D}frame(){let D=Date.now();if(this.#C===-1||D-this.#J>=this.interval)this.#C=++this.#C%this.#B.frames.length,this.#J=D;let{frames:u}=this.#B,F=u[this.#C];if(this.color)F=J[this.color](F);let E=typeof this.#$==="string"&&this.#$!==""?this.#$+" ":"",C=typeof this.text==="string"?" "+this.text:"",B=typeof this.#q==="string"&&this.#q!==""?" "+this.#q:"";return E+F+C+B}clear(){if(!this.#Q||!this.#E.isTTY)return this;this.#E.cursorTo(0);for(let D=0;D<this.#_;D++){if(D>0)this.#E.moveCursor(0,-1);this.#E.clearLine(1)}if(this.#z||this.lastIndent!==this.#z)this.#E.cursorTo(this.#z);return this.lastIndent=this.#z,this.#_=0,this}render(){if(this.#Z)return this;return this.clear(),this.#E.write(this.frame()),this.#_=this.#D,this}start(D){if(D)this.text=D;if(this.#Z)return this;if(!this.#Q){if(this.text)this.#E.write(`- ${this.text}
30
+ `);return this}if(this.isSpinning)return this;if(this.#u.hideCursor)hD.hide(this.#E);if(this.#u.discardStdin&&$D.stdin.isTTY)this.#F=!0,aD.start();return this.render(),this.#X=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#Q)return this;if(clearInterval(this.#X),this.#X=void 0,this.#C=0,this.clear(),this.#u.hideCursor)hD.show(this.#E);if(this.#u.discardStdin&&$D.stdin.isTTY&&this.#F)aD.stop(),this.#F=!1;return this}succeed(D){return this.stopAndPersist({symbol:m.success,text:D})}fail(D){return this.stopAndPersist({symbol:m.error,text:D})}warn(D){return this.stopAndPersist({symbol:m.warning,text:D})}info(D){return this.stopAndPersist({symbol:m.info,text:D})}stopAndPersist(D={}){if(this.#Z)return this;let u=D.prefixText??this.#$,F=this.#U(u," "),E=D.symbol??" ",C=D.text??this.text,_=typeof C==="string"?(E?" ":"")+C:"",$=D.suffixText??this.#q,q=this.#H($," "),Q=F+E+_+q+`
31
+ `;return this.stop(),this.#E.write(Q),this}}function qD(D){return new $0(D)}var q0=process.env.GITHUB_TOKEN;var d=new Map,j2=null;function M2(D){let u={Accept:"application/vnd.github.v3+json","User-Agent":"scanrepo-dev"};if(q0)u.Authorization=`Bearer ${q0}`;if(D)Object.assign(u,D);return u}async function QD(D,u={}){let F=u.etag?d.get(D):void 0,E=M2(F?{"If-None-Match":F.etag}:void 0),C=await fetch(`https://api.github.com${D}`,{headers:E}),B=C.headers.get("x-ratelimit-remaining"),_=C.headers.get("x-ratelimit-reset");if(B&&_)j2={remaining:Number(B),resetAt:Number(_)*1000};if(C.status===304&&F)return F.payload;if(!C.ok){let Q=await C.text();throw Error(`GitHub API error ${C.status}: ${Q}`)}let $=await C.json(),q=C.headers.get("etag");if(u.etag&&q){if(d.set(D,{etag:q,payload:$}),d.size>2000){let Q=d.keys().next().value;if(Q)d.delete(Q)}}return $}var Q0=/^(?:https?:\/\/)?(?:www\.)?github\.com\//i;function Z0(D){let u=D.trim().replace(/\/$/,"").replace(/\.git$/,"");if(!Q0.test(u))return null;let E=u.replace(Q0,"").match(/^([^/]+)\/([^/]+)(?:\/tree\/([^/]+)(?:\/(.+))?)?$/);if(!E)return null;return{provider:"github",owner:E[1],repo:E[2],ref:E[3]||void 0,subdir:E[4]?E[4].replace(/\/$/,""):void 0}}var z0={id:"github",repoUrl(D){let u=`https://github.com/${D.owner}/${D.repo}`;if(D.subdir&&D.ref)return`${u}/tree/${D.ref}/${D.subdir}`;if(D.ref)return`${u}/tree/${D.ref}`;return u},async fetchRepoMeta(D,u){let F=await QD(`/repos/${D}/${u}`,{etag:!0});return{owner:D,repo:u,description:F.description,stars:F.stargazers_count,forks:F.forks_count,createdAt:F.created_at,pushedAt:F.pushed_at,defaultBranch:F.default_branch,language:F.language,topics:F.topics||[],openIssues:F.open_issues_count,size:F.size,isPrivate:Boolean(F.private)}},async fetchBranchSha(D,u,F){return(await QD(`/repos/${D}/${u}/branches/${encodeURIComponent(F)}`,{etag:!0})).commit.sha},async fetchFileTree(D,u,F){let E=await QD(`/repos/${D}/${u}/git/trees/${F}?recursive=1`,{etag:!0});return{sha:E.sha,tree:E.tree.map((C)=>({path:C.path,type:C.type,sha:C.sha,size:C.size})),truncated:Boolean(E.truncated)}},async fetchFileContent(D,u,F,E){let C=await QD(`/repos/${D}/${u}/contents/${encodeURI(F)}?ref=${encodeURIComponent(E)}`);return Buffer.from(C.content,"base64").toString("utf-8")}};var J0=process.env.BITBUCKET_TOKEN,X0=process.env.BITBUCKET_USERNAME,G0=process.env.BITBUCKET_APP_PASSWORD;function A0(){if(J0)return`Bearer ${J0}`;if(X0&&G0)return`Basic ${Buffer.from(`${X0}:${G0}`).toString("base64")}`;return null}async function p(D,u){let F={Accept:"application/json","User-Agent":"scanrepo-dev",...u?.headers},E=A0();if(E)F.Authorization=E;let C=await fetch(`https://api.bitbucket.org/2.0${D}`,{...u,headers:F});if(!C.ok){let B=await C.text();throw Error(`Bitbucket API error ${C.status}: ${B}`)}return C.json()}async function I2(D){let u={Accept:"text/plain, */*","User-Agent":"scanrepo-dev"},F=A0();if(F)u.Authorization=F;let E=await fetch(`https://api.bitbucket.org/2.0${D}`,{headers:u});if(!E.ok){let C=await E.text();throw Error(`Bitbucket API error ${E.status}: ${C}`)}return E.text()}var Y0=/^(?:https?:\/\/)?(?:www\.)?bitbucket\.org\//i;function U0(D){let u=D.trim().replace(/\/$/,"").replace(/\.git$/,"");if(!Y0.test(u))return null;let E=u.replace(Y0,"").match(/^([^/]+)\/([^/]+)(?:\/src\/([^/]+)(?:\/(.+))?)?$/);if(!E)return null;return{provider:"bitbucket",owner:E[1],repo:E[2],ref:E[3]||void 0,subdir:E[4]?E[4].replace(/\/$/,""):void 0}}async function N2(D){try{let u=await p(`${D}?pagelen=1`);return typeof u.size==="number"?u.size:u.values?.length??0}catch{return 0}}async function T2(D,u){try{let F=await p(`/repositories/${D}/${u}/watchers?pagelen=1`);return typeof F.size==="number"?F.size:0}catch{return 0}}async function w2(D,u,F,E=""){let C=[],B=[E],_=!1;while(B.length>0){if(C.length>=4000){_=!0;break}let $=B.shift(),q=`/repositories/${D}/${u}/src/${encodeURIComponent(F)}/${$?`${$.split("/").map(encodeURIComponent).join("/")}/`:""}?pagelen=100`;while(q){let Q=q.startsWith("http")?q.replace("https://api.bitbucket.org/2.0",""):q,Z=await p(Q);for(let X of Z.values||[]){if(C.length>=4000){_=!0;break}if(X.type==="commit_directory")C.push({path:X.path,type:"tree"}),B.push(X.path);else if(X.type==="commit_file")C.push({path:X.path,type:"blob",size:X.size,sha:X.commit?.hash})}if(C.length>=4000){_=!0;break}q=Z.next||null}}return{items:C,truncated:_}}var H0={id:"bitbucket",repoUrl(D){let u=`https://bitbucket.org/${D.owner}/${D.repo}`;if(D.subdir&&D.ref)return`${u}/src/${D.ref}/${D.subdir}`;if(D.ref)return`${u}/src/${D.ref}`;return u},async fetchRepoMeta(D,u){let F=await p(`/repositories/${D}/${u}`),[E,C]=await Promise.all([T2(D,u),N2(`/repositories/${D}/${u}/forks`)]);return{owner:D,repo:u,description:F.description,stars:E,forks:C,createdAt:F.created_on,pushedAt:F.updated_on,defaultBranch:F.mainbranch?.name||"master",language:F.language||null,topics:[],openIssues:0,size:F.size,isPrivate:Boolean(F.is_private)}},async fetchBranchSha(D,u,F){return(await p(`/repositories/${D}/${u}/refs/branches/${encodeURIComponent(F)}`)).target.hash},async fetchFileTree(D,u,F){let{items:E,truncated:C}=await w2(D,u,F);return{sha:F,tree:E,truncated:C}},async fetchFileContent(D,u,F,E){let C=F.split("/").map(encodeURIComponent).join("/");return I2(`/repositories/${D}/${u}/src/${encodeURIComponent(E)}/${C}`)}};var k2={github:z0,bitbucket:H0};function W0(D){return k2[D]}function sD(D){return Z0(D)||U0(D)}var S2=[/package\.json$/,/\.vscode\/tasks\.json$/,/(?:vite|next|webpack|rollup|babel)\.config\.\w+$/,/next\.config\.\w+$/,/vite\.config\.\w+$/,/webpack\.config\.\w+$/],O2=["userController.js","controller.js","paymentRoute.js","authHelper.js","wallet.js","getContract.js","auth.js","profile.js","setup.js","worker.js","server.js","index.js","main.js","app.js"],y2=[/controllers?\//i,/routes?\//i,/utils?\//i,/helpers?\//i,/config\//i,/scripts?\//i,/server\//i,/backend\//i,/src\//i],L0=/\.(js|ts|jsx|tsx|mjs|cjs|mts|cts|json)$/,V0=/(?:^|\/)(node_modules|\.git|dist|build|\.next|out|coverage|__pycache__|__tests__|__fixtures__|__snapshots__|vendor|public\/charting_library)\//,K0=/(?:\.bundle\.(?:js|mjs|cjs)$|[.-]chunk\.(?:js|mjs|cjs)$|\.d\.ts$|\.snap$|\.stories\.(?:js|jsx|ts|tsx)$)/i,P2=/(?:^|\/)(dist|build|vendor|public\/|node_modules)\//,b2=/\.min\.(?:js|css|mjs|cjs)$/i,v2=120;function R0(D,u=v2,F){let E=[],C=[],B=[],_=[];for(let Z of D.tree){if(Z.type!=="blob")continue;if(F&&!Z.path.startsWith(F+"/")&&Z.path!==F)continue;if(V0.test(Z.path))continue;if(!L0.test(Z.path))continue;if(Z.size&&Z.size>200000)continue;if(K0.test(Z.path))continue;if(b2.test(Z.path)&&P2.test(Z.path))continue;let X=Z.path.split("/").pop()||"";if(S2.some((Y)=>Y.test(Z.path)))E.push(Z.path);else if(O2.some((Y)=>X===Y||X===Y.replace(".js",".ts")))C.push(Z.path);else if(y2.some((Y)=>Y.test(Z.path)))B.push(Z.path);else _.push(Z.path)}let $=[...E,...C],q=Math.max(0,u-$.length),Q=0;for(let Z of[B,_])for(let X of Z){if(Q>=q)break;$.push(X),Q++}return $}function j0(D,u){let F=[];for(let E of D.tree){if(E.type!=="blob")continue;if(u&&!E.path.startsWith(u+"/"))continue;let C=E.path.split("/").pop()||"",B=E.path;if(/\.(exe|bat|cmd|ps1)$/.test(C))F.push({filePath:B,reason:`Executable file (${C}) in repository`});if(/\.sh$/.test(C)&&!/scripts?\//i.test(B)&&!/^(install|setup|build|test|start|run|docker)\.sh$/i.test(C))F.push({filePath:B,reason:`Shell script (${C}) outside scripts directory`});if(E.size&&E.size>500000&&L0.test(B)&&!V0.test(B)&&!K0.test(B))F.push({filePath:B,reason:`Very large source file (${Math.round(E.size/1024)}KB) — could contain obfuscated payload`})}return F}function f2(D){return D.trim().toLowerCase()}function M0(D,u){return`${D}:${f2(u)}`}var x2=["github:DEX-staking-project-ultrax","github:challenge-experiment-module","github:coinpool-rental-platform1.0","github:erc20-token-dapp","github:golden-city","github:multify_staking","github:munity-game","github:real-estate-rental-platform","github:real_estate","github:real_estate_new","github:sarostech-assessment","github:trend-dev-preproduction","github:web3game","github:Peiko-Platform-MVP","github:Trading_Platform_Ultrax","github:goldencity","github:gamestakeverse","github:UltraX-DEX","github:dex-staking-platform","github:web3_nextjs","github:web3_nextjs_backend","github:web3-coin-flip-game","github:fullstack-nextjs-marketplace","github:express-server","github:Defi-Exchange-Test","github:landing-web-app","github:felina","github:ctrading","github:demo_race","github:metaverse-contract"].map((D)=>D.toLowerCase()),h2=new Set(x2),g2=["github:0x66eth","github:0xtuneTF7","github:MetaBuilderGroup76","github:SuperDev313","github:goldencity5019","github:webdev771","github:DoNotCare745","github:goldy1113","github:sebastian4098","github:eduales99","github:vadym110","github:vitalii-nesenenko","github:Hiring-Support","github:momo-token","github:pietroETH","github:trevor9312","github:saadfrhan"].map((D)=>D.toLowerCase()),m2=new Set(g2),I0=["npoint.io","pastebin.com","requestbin.net","webhook.site","pipedream.net","hookbin.com","w3capi.marketing","mglcoin.io","flickthebean.onrender.com","nvidia-release.org","nvidia-release.us","camera-drive.cloud","nvidia-drive.cloud","jz-aws.info","chainlink-api-v3.com","ip-api-test.vercel.app","vscode-config-settings.vercel.app","vscode-load-two.vercel.app","vscode-settings-bootstrap.vercel.app","vscodesettingtask.vercel.app","api-web3-auth.vercel.app","coredeal2.vercel.app"];var iD=["cdn-icon-fetch","icon-font-fetch","asset-icon-fetch","materials-icons","am-date-picker-v1","socketio-connector","is-buffer-validator","yoojae-validator","event-handle-package","array-empty-validator","react-event-dependency","auth-validator","cln-logger","node-clog","consolidate-log","consolidate-logger","events-utils","icloud-cod","execution-time-async","data-time-utils","login-time-utils","mongodb-connection-utils","mongodb-execution-utils","btc-api-node","kraken-prices","kucoin-prices","ethers-provide-bundle","flashbot-sdk-eth","sdk-ethers","gram-utilz","solana-transaction-toolkit","solana-stable-web-huks","dexscreener","solanacore","solana-login","walletcore-gen","ambar-src","blockscan-api","warbeast2000","kodiak2k","js-bomb","vite-plugin-bomb","vite-plugin-bomb-extend","js-hood","cursor-ai-fork","cursor-app-fork","react-icon-pkg","telegram-bot-start","telegram-bot-starter","commander-js","pizza-pasta","stream-combine","peacenotwar"];var l2=[{pattern:/staking[-_\s]?project[-_\s]?ultra/i,weight:2},{pattern:/trading[-_\s]?platform[-_\s]?ultra/i,weight:2},{pattern:/coinpool[-_\s]?rental/i,weight:2},{pattern:/nft[-_\s]?marketplace[-_\s]?assessment/i,weight:2},{pattern:/crypto[-_\s]?(?:trading[-_\s]?)?assessment/i,weight:2},{pattern:/blockchain[-_\s]?assess(?:ment)?/i,weight:2},{pattern:/coin[-_\s]?flip[-_\s]?game/i,weight:2},{pattern:/defi[-_\s]?exchange[-_\s]?test/i,weight:1},{pattern:/dex[-_\s]?staking[-_\s]?platform/i,weight:1},{pattern:/real[-_\s]?estate[-_\s]?rental[-_\s]?platform/i,weight:1},{pattern:/metaverse[-_\s]?contract/i,weight:1}],c2=["technical assessment","coding challenge","interview project","take-home assignment","complete this project","run npm install and start","please complete the following","assessment task","hiring challenge","developer test","pre-production test","candidate assessment","connect wallet","connect your wallet"];function d2(D,u){return h2.has(M0(D,u))}function p2(D,u){return m2.has(M0(D,u))}function nD(D,u="github"){return d2(u,D)}function N0(D,u="github"){return p2(u,D)}function T0(D){let u=0;for(let{pattern:F,weight:E}of l2)if(F.test(D))u+=E;return u}function w0(D){let u=D.toLowerCase();return c2.filter((F)=>u.includes(F))}function O0(D){let u="",F=0,E=D.length;while(F<E){let C=D[F],B=D[F+1];if(C==="/"&&B==="/"){F+=2;while(F<E&&D[F]!==`
32
+ `)F++;u+=" ";continue}if(C==="/"&&B==="*"){F+=2;while(F<E&&!(D[F]==="*"&&D[F+1]==="/"))F++;F+=2,u+=" ";continue}if(C==='"'||C==="'"||C==="`"){let _=C;u+=C,F++;while(F<E){let $=D[F];if(u+=$,$==="\\"&&F+1<E){u+=D[F+1],F+=2;continue}if(F++,$===_)break}continue}u+=C,F++}return u}function k0(D,u){if(!u.test(D))return!1;return!u.test(O0(D))}function r2(D,u){return new RegExp(`(?:^|[^.\\w$])${u}\\s*\\(`,"m").test(D)}function S0(D,u){let F=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:require\\s*\\(\\s*['"]${F}['"]|from\\s+['"]${F}['"]|import\\s*\\(\\s*['"]${F}['"])`).test(D)}function ZD(D,u,F,E=500){let C=new RegExp(u.source,u.flags.includes("g")?u.flags:u.flags+"g"),B=new RegExp(F.source,F.flags.includes("g")?F.flags:F.flags+"g"),_=[],$=[],q;while((q=C.exec(D))!==null)if(_.push(q.index),_.length>200)break;while((q=B.exec(D))!==null)if($.push(q.index),$.length>200)break;for(let Q of _)for(let Z of $)if(Math.abs(Q-Z)<=E)return!0;return!1}function a2(D){let u=D.split(".").map(Number);if(u.length!==4||u.some((C)=>isNaN(C)||C<0||C>255))return!0;let[F,E]=u;if(F===10)return!0;if(F===127)return!0;if(F===0)return!0;if(F===169&&E===254)return!0;if(F===172&&E>=16&&E<=31)return!0;if(F===192&&E===168)return!0;if(F>=224)return!0;if(F===192&&E===0&&u[2]===2)return!0;if(F===198&&E===51&&u[2]===100)return!0;if(F===203&&E===0&&u[2]===113)return!0;if(D==="8.8.8.8"||D==="8.8.4.4")return!0;if(D==="1.1.1.1"||D==="1.0.0.1")return!0;return!1}var s2=[{id:"eval-usage",category:"code-execution",severity:"critical",title:"eval() usage detected",description:"eval() executes arbitrary code and is commonly used in malware to run obfuscated payloads fetched from remote servers.",points:8,matchRegex:/(?:^|[^.\w$])eval\s*\(/m,test:(D)=>{if(!/(?:^|[^.\w$])eval\s*\(/m.test(D))return!1;if(k0(D,/(?:^|[^.\w$])eval\s*\(/m))return!1;return!0}},{id:"function-constructor",category:"code-execution",severity:"critical",title:"Function() constructor detected",description:"new Function() is equivalent to eval() and can execute arbitrary code strings.",points:5,matchRegex:/new\s+Function\s*\(/,test:(D)=>{let u=/new\s+Function\s*\(/;if(!u.test(D))return!1;if(k0(D,u))return!1;return!0}},{id:"child-process",category:"code-execution",severity:"critical",title:"child_process / exec usage",description:"Executing shell commands can be used to download and run malware, exfiltrate data, or modify system files.",points:8,matchRegex:/(?:require\s*\(\s*['"]child_process['"]\)|from\s+['"]child_process['"]|(?:^|[^.\w$])(?:exec|execSync|spawn|spawnSync|execFile|execFileSync)\s*\()/m,test:(D)=>{let u=O0(D);if(S0(u,"child_process"))return!0;if(S0(u,"node:child_process"))return!0;for(let B of["execSync","spawnSync","execFileSync","execFile"])if(r2(u,B))return!0;let F=/(?:^|[^.\w$])(?:exec|spawn)\s*\(\s*["'`]([^"'`]{2,})["'`]/m,E=u.match(F);if(!E)return!1;let C=E[1];if(/^(?:\/|\.{1,2}\/|~\/)/.test(C))return!0;if(/^(?:sh|bash|zsh|node|npm|npx|pip|python|curl|wget|rm|cp|mv|ls|cat|echo|git|docker|sudo|kill)\b/i.test(C))return!0;return!1}},{id:"vm-exec",category:"code-execution",severity:"warning",title:"VM code execution",description:"vm.runInNewContext or similar can execute arbitrary code in a sandboxed context that may be escaped.",points:4,matchRegex:/vm\.run(InNewContext|InThisContext|InContext)\s*\(/,test:(D)=>/vm\.run(InNewContext|InThisContext|InContext)\s*\(/.test(D)},{id:"fetch-eval-combo",category:"network-exfiltration",severity:"critical",title:"Remote code fetch + execution",description:"Fetching code from a remote server and executing it with eval() is the #1 pattern in LinkedIn/crypto scam malware.",points:10,test:(D)=>{let u=/(?:fetch|axios\.get|axios\.post)\s*\(/,F=/(?:^|[^.\w$])(?:eval|new\s+Function)\s*\(/m;if(!u.test(D)||!F.test(D))return!1;return ZD(D,u,F,400)}},{id:"suspicious-domains",category:"network-exfiltration",severity:"critical",title:"Known malicious / C2 domain",description:"Known domains used by Lazarus Group and other malware for hosting payloads or exfiltrating data.",points:5,test:(D)=>I0.some((u)=>D.includes(u))},{id:"byte-array-url",category:"network-exfiltration",severity:"critical",title:"Byte-array URL obfuscation",description:"URL stored as numeric byte array and decoded at runtime with TextDecoder — hides C2 addresses from grep.",points:8,matchRegex:/new\s+Uint8Array\s*\(/,test:(D)=>/new\s+Uint8Array\s*\(/.test(D)&&/TextDecoder/.test(D)},{id:"axios-eval",category:"network-exfiltration",severity:"critical",title:"axios.get() + eval(response.data)",description:"Fetches remote payload via axios and executes it — the exact pattern used in LinkedIn recruiter scam malware.",points:10,test:(D)=>{let u=/axios\.(?:get|post)\s*\(/,F=/(?:^|[^.\w$])(?:eval|new\s+Function)\s*\([^)]*(?:\.data|response)/m;if(!u.test(D)||!F.test(D))return!1;return ZD(D,u,F,400)}},{id:"hardcoded-ip",category:"network-exfiltration",severity:"warning",title:"Hardcoded IP address in network call",description:"Fetching data from hardcoded IP addresses instead of domain names is suspicious and may indicate C2 communication.",points:5,matchRegex:/https?:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/,test:(D)=>{let u=/https?:\/\/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/g,F;while((F=u.exec(D))!==null)if(!a2(F[1]))return!0;return!1}},{id:"base64-url",category:"network-exfiltration",severity:"info",title:"Base64 encoding used",description:"atob() or Buffer.from with base64. Common in legitimate code but also used to hide malicious URLs.",points:2,matchRegex:/atob\s*\(|Buffer\.from\s*\([^)]+,\s*['"]base64['"]\)/,test:(D)=>{let u=/(?:^|[^.\w$])atob\s*\(/m.test(D),F=/Buffer\.from\s*\([^)]+,\s*['"]base64['"]\)/.test(D);if(!u&&!F)return!1;let E=/(?:^|[^.\w$])(?:atob|Buffer\.from)/m,C=/(?:^|[^.\w$])(?:eval|new\s+Function|fetch|axios)/m;if(!C.test(D))return!1;return ZD(D,E,C,300)}},{id:"browser-profiles",category:"filesystem-access",severity:"critical",title:"Browser credential store access",description:"Accessing Chrome, Firefox, Edge, or Brave profile directories to steal cookies, passwords, and session tokens.",points:10,matchRegex:/AppData.*(?:Google.*Chrome|Microsoft.*Edge)|\.config\/google-chrome|Library\/Application Support\/Google\/Chrome|\.mozilla\/firefox|BraveSoftware/i,test:(D)=>/AppData.*(?:Google.*Chrome|Microsoft.*Edge)|\.config\/google-chrome|Library\/Application Support\/Google\/Chrome|\.mozilla\/firefox|BraveSoftware/i.test(D)},{id:"wallet-access",category:"filesystem-access",severity:"critical",title:"Cryptocurrency wallet directory access",description:"Accessing wallet directories to steal private keys, seed phrases, or wallet data.",points:5,matchRegex:/(?:readFile|readFileSync|createReadStream|readdirSync?|fs\.|path\.join|path\.resolve)[^;]{0,120}(?:\.ethereum|\.bitcoin|\.solana|keystore|wallet\.dat|seed\.txt|mnemonic)/i,test:(D,u)=>{if(/\.(tsx|jsx|vue|svelte)$/.test(u))return!1;let F=/readFile|readFileSync|createReadStream|readdirSync?|fs\.|path\.join|path\.resolve/i,E=/\.ethereum|\.bitcoin|\.solana|keystore|wallet\.dat|seed\.txt|mnemonic/i;if(!F.test(D)||!E.test(D))return!1;return ZD(D,F,E,300)}},{id:"ssh-creds",category:"filesystem-access",severity:"warning",title:"SSH/credential path access",description:"Accessing .ssh, .aws/credentials, or .env files to steal authentication credentials.",points:5,matchRegex:/(?:\/|path.*?)\.ssh|\.aws\/credentials|\.gnupg|id_rsa|id_ed25519/,test:(D)=>/(?:\/|path.*?)\.ssh|\.aws\/credentials|\.gnupg|id_rsa|id_ed25519/.test(D)&&!/\.gitignore|documentation|example/i.test(D)},{id:"javascript-obfuscator",category:"obfuscation",severity:"critical",title:"javascript-obfuscator output detected",description:"Code obfuscated with the javascript-obfuscator tool. The _0x variable naming and rotating string array are unique to this tool and are commonly used to hide malware from code review.",points:20,matchRegex:/\b_0x[0-9a-f]{4,6}\b/i,test:(D)=>{return(D.match(/\b_0x[0-9a-f]{4,6}\b/gi)||[]).length>=5}},{id:"hex-strings",category:"obfuscation",severity:"warning",title:"Hex-encoded string sequences",description:"Long hex-encoded strings are commonly used to hide malicious code from code review.",points:5,matchRegex:/\\x[0-9a-f]{2}(?:\\x[0-9a-f]{2}){10,}/i,test:(D)=>/\\x[0-9a-f]{2}(?:\\x[0-9a-f]{2}){10,}/i.test(D)},{id:"long-lines",category:"obfuscation",severity:"warning",title:"Extremely long lines (>1000 chars)",description:"Very long lines in source files (not minified bundles) can hide malicious code.",points:4,test:(D,u)=>{if(/\/(dist|build|vendor|min)\//i.test(u)||/\.min\./i.test(u))return!1;return D.split(`
33
+ `).some((F)=>F.length>1000)}},{id:"minified-source",category:"obfuscation",severity:"info",title:"Minified code in source directory",description:"Minified/obfuscated code in source directories (not dist/) makes code review impossible.",points:3,test:(D,u)=>{if(/\/(dist|build|vendor|node_modules)\//i.test(u))return!1;if(/\.min\./i.test(u))return!1;let F=D.split(`
34
+ `).filter((B)=>B.trim().length>0);if(F.length>10)return!1;if(D.length<500)return!1;return(D.match(/;/g)||[]).length/F.length>15}},{id:"string-concat-obfuscation",category:"obfuscation",severity:"info",title:"String concatenation obfuscation",description:"Excessive single-character string concatenation is used to hide strings from grep/search.",points:3,matchRegex:/['"][a-zA-Z]['"](\s*\+\s*['"][a-zA-Z]['"]){4,}/,test:(D)=>{let u=D.match(/['"][a-zA-Z]['"](\s*\+\s*['"][a-zA-Z]['"]){4,}/g);return u!==null&&u.length>0}},{id:"suspicious-scripts",category:"supply-chain",severity:"critical",title:"Suspicious install scripts in package.json",description:"preinstall/postinstall scripts that run shell commands, download files, or execute node code.",points:8,matchRegex:/"(?:preinstall|postinstall|preuninstall|postuninstall)"/,test:(D,u)=>{if(!/package\.json$/.test(u))return!1;try{let E=JSON.parse(D).scripts||{};return["preinstall","postinstall","preuninstall","postuninstall"].some((B)=>{let _=E[B];if(!_)return!1;return/\bcurl\b|\bwget\b|\bnode\s+-e\b|\bsh\s+-c\b|\bbash\s+-c\b|\bpowershell\b|\s>\s|\s>>\s|\s\|\s/.test(_)})}catch{return!1}}},{id:"config-payload",category:"supply-chain",severity:"critical",title:"Code execution in build config",description:"Build configuration files (vite/next/webpack config) containing eval, remote imports, or suspicious code.",points:4,matchRegex:/eval\s*\(|Function\s*\(|require\s*\(\s*['"]https?:|import\s*\(\s*['"]https?:/,test:(D,u)=>{if(!/(?:vite|next|webpack|rollup)\.config/i.test(u))return!1;return/(?:^|[^.\w$])(?:eval|new\s+Function)\s*\(|require\s*\(\s*['"]https?:|import\s*\(\s*['"]https?:/m.test(D)}},{id:"vscode-tasks-autorun",category:"supply-chain",severity:"critical",title:"VSCode tasks.json auto-run on folder open",description:"A .vscode/tasks.json with runOn: folderOpen executes commands automatically when you open the project in VSCode.",points:8,snippetFn:(D)=>{try{let F=(JSON.parse(D).tasks??[]).filter((E)=>E.runOptions?.runOn==="folderOpen");if(!F.length)return;return F.map((E)=>{let C=[E.command,...E.args??[]].filter(Boolean).join(" ")||E.script;return C?`${E.label??"task"}: ${C}`:E.label??"unnamed task"}).join(`
35
+ `).slice(0,300)}catch{return}},test:(D,u)=>{if(!/.vscode\/tasks\.json$/i.test(u))return!1;return/folderOpen/i.test(D)}},{id:"known-malicious-packages",category:"supply-chain",severity:"critical",title:"Known malicious npm package",description:"This dependency has been identified as malicious.",points:3,test:(D,u)=>{if(!/package\.json$/.test(u))return!1;try{let F=JSON.parse(D),E={...F.dependencies||{},...F.devDependencies||{},...F.peerDependencies||{},...F.optionalDependencies||{}};return iD.some((C)=>(C in E))}catch{return iD.some((F)=>D.includes(`"${F}"`))}}},{id:"nosql-injection",category:"web-vulnerabilities",severity:"warning",title:"Potential NoSQL injection",description:"User input passed directly to MongoDB query (findOne, find, updateOne) without sanitization. Attacker can inject query operators.",points:4,matchRegex:/\.(findOne|find|updateOne|deleteOne|findOneAndUpdate)\s*\(\s*\{[^}]*req\.(body|params|query)/,test:(D)=>/\.(findOne|find|updateOne|deleteOne|findOneAndUpdate)\s*\(\s*\{[^}]*req\.(body|params|query)/.test(D)},{id:"open-redirect",category:"web-vulnerabilities",severity:"warning",title:"Open redirect vulnerability",description:"res.redirect() using unsanitized user input (req.get('host'), req.query, req.body). Can redirect victims to phishing sites.",points:3,matchRegex:/res\.redirect\s*\([^)]*req\.(get|query|body|params)/,test:(D)=>/res\.redirect\s*\(\s*[`'"].*\$\{.*req\.(get|query|body|params)/.test(D)||/res\.redirect\s*\(.*req\.(query|body|params)/.test(D)},{id:"sql-injection",category:"web-vulnerabilities",severity:"warning",title:"Potential SQL injection",description:"String concatenation or template literals used in SQL queries with user input. Use parameterized queries instead.",points:4,matchRegex:/(?:query|execute)\s*\(\s*[`'"](?:SELECT|INSERT|UPDATE|DELETE)[^`'"]*(?:\$\{|['"]\s*\+).*req\.(body|params|query)/i,test:(D)=>/(?:query|execute)\s*\(\s*[`'"](?:SELECT|INSERT|UPDATE|DELETE).*\$\{.*req\.(body|params|query)/.test(D)||/(?:query|execute)\s*\(\s*['"].*['"]\s*\+\s*req\.(body|params|query)/.test(D)},{id:"xss-vulnerability",category:"web-vulnerabilities",severity:"warning",title:"Potential XSS vulnerability",description:"User input rendered directly in HTML response without escaping. Can execute arbitrary JavaScript in the victim's browser.",points:3,matchRegex:/(?:res\.send|innerHTML\s*=|\.html\s*\()[^)]*req\.(body|params|query)/,test:(D)=>/res\.send\s*\(\s*[`'"].*\$\{.*req\.(body|params|query)/.test(D)||/innerHTML\s*=\s*.*req\.(body|params|query)/.test(D)||/\.html\s*\(\s*.*req\.(body|params|query)/.test(D)},{id:"hardcoded-secret",category:"web-vulnerabilities",severity:"warning",title:"Hardcoded secret/credential",description:"API keys, passwords, or tokens hardcoded in source code. Should be in environment variables.",points:3,matchRegex:/(?:api[_-]?key|apikey|secret|password|token|auth)\s*[:=]\s*['"][A-Za-z0-9+/=_-]{20,}['"]/i,test:(D)=>/(?:api[_-]?key|apikey|secret|password|token|auth)\s*[:=]\s*['"][A-Za-z0-9+/=_-]{20,}['"]/i.test(D)&&!/(?:example|placeholder|test|mock|dummy|sample|your[_-]|xxxx|changeme)/i.test(D)},{id:"missing-auth-check",category:"web-vulnerabilities",severity:"info",title:"Missing authorization on sensitive route",description:"Admin or sensitive routes without authentication middleware. Any user can access these endpoints.",points:2,matchRegex:/router\.(get|post|put|delete)\s*\(\s*['"]\/admin/,test:(D)=>/router\.(get|post|put|delete)\s*\(\s*['"]\/admin/.test(D)&&!/auth|middleware|protect|verify|isAdmin|isAuthenticated/.test(D)},{id:"unvalidated-file-upload",category:"web-vulnerabilities",severity:"warning",title:"Unvalidated file upload",description:"File upload without type/size validation. Can be exploited for remote code execution or storage abuse.",points:3,matchRegex:/multer|upload\.(single|array|fields)/,test:(D)=>/multer|upload\.(single|array|fields)/.test(D)&&!/fileFilter|mimetype|limits/.test(D)},{id:"path-traversal",category:"web-vulnerabilities",severity:"warning",title:"Potential path traversal",description:"User input used in file system paths without sanitization. Attacker can read/write arbitrary files.",points:4,matchRegex:/(?:readFile|writeFile|createReadStream|readdir|unlink|stat|path\.(?:join|resolve))\s*\([^)]*req\.(body|params|query)/,test:(D)=>/(?:readFile|writeFile|createReadStream|readdir|unlink|stat)\s*\(.*req\.(body|params|query)/.test(D)||/path\.(?:join|resolve)\s*\(.*req\.(body|params|query)/.test(D)}];function y0(D,u){let F=[],E=new Set;for(let C of s2){if(E.has(C.id))continue;try{if(C.test(D,u)){E.add(C.id);let B=i2(D,C,u);F.push({ruleId:C.id,category:C.category,severity:C.severity,title:C.title,description:C.description,filePath:u,snippet:B,points:C.points})}}catch{}}return F}function i2(D,u,F){if(u.snippetFn)return u.snippetFn(D,F);let E=u.matchRegex;if(!E)return;let C=D.split(`
36
+ `);for(let B=0;B<C.length;B++)if(E.test(C[B])){let _=Math.max(0,B-1),$=Math.min(C.length,B+3);return C.slice(_,$).join(`
37
+ `).substring(0,300)}return}function P0(D){if(D<=10)return"safe";if(D<=30)return"low";if(D<=55)return"suspicious";if(D<=79)return"dangerous";return"malicious"}class zD extends Error{constructor(){super("Repository is private — scanrepo only works on public code.");this.name="PrivateRepoError"}}var n2={"code-execution":{name:"Code Execution",icon:"Terminal",maxScore:25},"network-exfiltration":{name:"Network & Exfiltration",icon:"Wifi",maxScore:25},"filesystem-access":{name:"File System Access",icon:"HardDrive",maxScore:20},obfuscation:{name:"Obfuscation",icon:"Eye",maxScore:15},"supply-chain":{name:"Supply Chain",icon:"Package",maxScore:15},"web-vulnerabilities":{name:"OWASP / Injection",icon:"ShieldAlert",maxScore:15}},t2=Object.fromEntries(["nvidia","google","meta","facebook","microsoft","apple","amazon","aws","vercel","vercel-labs","nextjs","remix-run","vuejs","angular","sveltejs","astro","nodejs","denoland","oven-sh","bun","docker","kubernetes","hashicorp","terraform","github","gitlab","atlassian","jetbrains","mozilla","chromium","electron","tensorflow","pytorch","huggingface","stripe","shopify","twilio","cloudflare","supabase","prisma","openai","anthropics","langchain-ai","rust-lang","golang","python","ruby","apache","linux","torvalds"].map((D)=>[`github:${D}`,!0]));function o2(D,u){return t2[`${D}:${u.toLowerCase()}`]===!0}function e2(D,u){let F=D.tree.filter((G)=>G.type==="blob"),E=u&&typeof u==="object"?u:{},C={...E.dependencies||{},...E.devDependencies||{},...E.optionalDependencies||{}},B="electron"in C||"electron-builder"in C,_=F.some((G)=>/(?:^|\/)(?:electron\/(?:main|index)\.(?:ts|js|mjs|cjs)|main\/(?:index|electron)\.(?:ts|js)|src\/main\/(?:index|electron)\.(?:ts|js)|electron-main\.(?:ts|js))$/i.test(G.path)),$=B&&_,q=typeof E.bin<"u",Q=F.some((G)=>/^bin\/[^/]+$/i.test(G.path)),Z=q||Q,X=$||F.some((G)=>/(?:^|\/)(?:tauri\.conf\.(?:json|json5|toml)|src-tauri\/)/i.test(G.path));return{isElectronApp:$,isCliTool:Z,isDesktopApp:X,isLegitContext:$||Z||X}}async function b0(D,u,F){let{owner:E,repo:C,subdir:B}=u;F("Fetching repository metadata...",10);let _=await D.fetchRepoMeta(E,C);if(_.isPrivate)throw new zD;let $=u.ref||_.defaultBranch,q={provider:D.id,owner:E,repo:C,description:_.description,stars:_.stars,forks:_.forks,createdAt:_.createdAt,pushedAt:_.pushedAt,defaultBranch:_.defaultBranch,language:_.language,topics:_.topics,openIssues:_.openIssues,size:_.size};F("Fetching file tree...",20);let Q=await D.fetchBranchSha(E,C,$),Z=await D.fetchFileTree(E,C,Q),X=Z.tree.filter((z)=>z.type==="blob").length,Y=R0(Z,void 0,B);F(`Scanning ${Y.length} files${B?` in /${B}`:""}...`,35);let G=[],L=0,S=new Map;for(let z=0;z<Y.length;z+=5){let K=Y.slice(z,z+5),VD=await Promise.all(K.map(async(T)=>{try{let O=await D.fetchFileContent(E,C,T,Q);return{path:T,content:O}}catch{return{path:T,content:null}}}));for(let{path:T,content:O}of VD){if(!O)continue;S.set(T,O),L++;let i=y0(O,T);G.push(...i)}let s=35+(z+K.length)/Math.max(1,Y.length)*40;F(`Scanning files (${Math.min(z+5,Y.length)}/${Y.length})...`,Math.round(s))}let f0=j0(Z,B);for(let z of f0)G.push({ruleId:"tree-analysis",category:"supply-chain",severity:"info",title:"Suspicious file in repo",description:z.reason,filePath:z.filePath,points:2});F("Calculating risk score...",80);let JD=new Map;for(let z of G){let K=JD.get(z.category)||[];K.push(z),JD.set(z.category,K)}let XD=Object.entries(n2).map(([z,{name:K,icon:VD,maxScore:s}])=>{let T=JD.get(z)||[],O=Math.min(T.reduce((w,n)=>w+n.points,0),s),i=new Map,Fu=T.filter((w)=>{let n=i.get(w.ruleId)||0;return i.set(w.ruleId,n+1),n<3});for(let w of Fu)if(w.snippet&&w.snippet.length>200)w.snippet=w.snippet.slice(0,200)+"...";return{id:z,name:K,icon:VD,score:O,maxScore:s,findings:Fu}}),H=Math.min(XD.reduce((z,K)=>z+K.score,0),100),tD=Array.from(S.keys()).find((z)=>/(?:^|\/)package\.json$/.test(z))||null,GD=null;if(tD)try{GD=JSON.parse(S.get(tD))}catch{GD=null}let{isElectronApp:x0,isCliTool:h0,isDesktopApp:g0,isLegitContext:YD}=e2(Z,GD),r=G.some((z)=>z.ruleId==="fetch-eval-combo"||z.ruleId==="axios-eval"||z.ruleId==="byte-array-url"),AD=G.some((z)=>z.ruleId==="suspicious-domains"),m0=G.some((z)=>z.ruleId==="nosql-injection"||z.ruleId==="sql-injection"||z.ruleId==="xss-vulnerability"||z.ruleId==="path-traversal"),UD=G.some((z)=>z.severity==="critical"&&z.ruleId!=="child-process"),l0=G.some((z)=>z.ruleId==="child-process")&&!UD;if(m0)H=Math.max(H,40);if(UD&&!YD)H=Math.max(H,70);else if(UD&&YD)H=Math.max(H,40);if(l0&&!YD)H=Math.max(H,50);if(r)H=Math.max(H,85);if(r&&AD)H=Math.max(H,90);let oD=nD(C,D.id)||(B?nD(B.split("/").pop()||"",D.id):!1),eD=N0(E,D.id);if(oD||eD)H=Math.max(H,80);let HD=T0(C),Du=(Date.now()-new Date(q.createdAt).getTime())/86400000,c0=Du<30,d0=q.stars===0&&q.forks===0;if(HD>=2||HD>=1&&(c0||d0))H=Math.max(H,55);let a=o2(D.id,E),p0=D.id==="github"&&q.stars>=1000,uu=D.id==="github"&&q.stars>=1e4,WD;if((a||uu)&&!r&&!AD){if(H>15)WD={reason:a?`${E} is a verified organization — findings likely false positives`:`${q.stars.toLocaleString()}+ stars — findings likely false positives`,cappedAt:15},H=15}else if(p0&&!r&&!AD){if(H>25)WD={reason:`${q.stars.toLocaleString()} stars — findings likely legitimate code patterns`,cappedAt:25},H=25}F("Building report...",85);let V=D8(q,Z,Du);if(uu&&!a)V.unshift({type:"info",label:`${q.stars.toLocaleString()} stars`,description:"Widely used open-source project. Findings are likely legitimate code patterns, not malware."});if(a)V.unshift({type:"info",label:"Verified organization",description:`${E} is a well-known, trusted organization. Findings are likely false positives from legitimate code patterns.`});if(eD)V.unshift({type:"danger",label:"Known scammer account",description:`The account "${E}" has been identified as a scammer distributing malware through fake job offers.`});if(oD)V.unshift({type:"danger",label:"Known malicious repository",description:"This repo name matches a known malicious project collected from LinkedIn scammers."});else if(HD>=2)V.push({type:"warning",label:"Suspicious repo name pattern",description:"This repo name matches patterns commonly used in recruiter scam projects."});if(G.some((z)=>z.ruleId==="javascript-obfuscator"))V.unshift({type:"danger",label:"Obfuscated code detected",description:"javascript-obfuscator output found — the _0x variable naming and rotating string-array anti-tamper loop are unique to this tool and are used to hide malware from code review. Inspect the flagged files before running anything."});if(X>100&&L/X<0.5)V.push({type:"warning",label:`${Math.round(L/X*100)}% file coverage`,description:`Only ${L} of ${X} files were content-scanned. Large repos may have malicious code in paths that were not fetched.`});let LD=Z.tree.find((z)=>/(?:^|\/)readme\.md$/i.test(z.path));if(LD){let z=S.get(LD.path);if(z===void 0)try{z=await D.fetchFileContent(E,C,LD.path,Q)}catch{z=void 0}if(z){let K=w0(z);if(K.length>0)V.push({type:"warning",label:"Social engineering indicators",description:`README contains recruiter scam phrases: "${K.slice(0,3).join('", "')}"`})}}if(Z.truncated)V.push({type:"warning",label:"Partial scan",description:"Repository is large enough that the file tree was truncated by the host. Some files were not enumerated."});if(F("Generating report...",90),x0)V.push({type:"info",label:"Electron app detected",description:"child_process / exec / node APIs are expected in Electron main processes."});else if(h0)V.push({type:"info",label:"CLI tool detected",description:"Shell execution is expected in CLI tooling."});else if(g0)V.push({type:"info",label:"Desktop app detected",description:"Local filesystem and shell access is expected in desktop apps."});return{repoUrl:D.repoUrl({...u,ref:$}),meta:q,ref:$,treeTruncated:Z.truncated,trustDiscount:WD,riskScore:H,riskLevel:P0(H),categories:XD,findings:XD.flatMap((z)=>z.findings),badges:V,scannedAt:new Date().toISOString(),commitSha:Q,filesScanned:L,totalRepoFiles:X,cached:!1}}function D8(D,u,F){let E=[];if(F<30)E.push({type:"warning",label:`Created ${Math.round(F)} days ago`,description:"Very new repository — scam repos are often freshly created."});if(D.stars===0&&D.forks===0)E.push({type:"info",label:"No stars or forks",description:"Repository has zero community engagement."});let C=/crypto|blockchain|web3|defi|staking|token|dapp|dex|nft/i;if(D.description&&C.test(D.description)||D.topics.some((B)=>C.test(B)))E.push({type:"info",label:"Crypto/Web3 project",description:"Crypto projects are commonly used as bait in LinkedIn recruitment scams."});return E}var u8="https://scanrepo.dev/api/publish-scan",v0={safe:J.hex("#00ff41"),low:J.hex("#66ff88"),suspicious:J.hex("#ffd000"),dangerous:J.hex("#ff6b2b"),malicious:J.hex("#ff003c")};function F8(D,u){return(v0[D]??J.white).bold(`${u}/100 ${D.toUpperCase()}`)}function E8(D,u,F=16){let E=Math.round(D/u*F);return J.green("█".repeat(E))+J.gray("░".repeat(F-E))}function C8(D,u){if(u)J.level=0;let F=v0[D.riskLevel]??J.white;if(console.log(),console.log(J.bold("Risk Score: ")+F8(D.riskLevel,D.riskScore)),console.log(J.gray("─".repeat(48))),D.trustDiscount)console.log(J.cyan(` ℹ ${D.trustDiscount.reason}`));let E=D.badges.filter((Q)=>Q.type==="danger"),C=D.badges.filter((Q)=>Q.type==="warning"),B=D.badges.filter((Q)=>Q.type==="info");for(let Q of E)console.log(J.red(` ✖ ${Q.label}`)),console.log(J.gray(` ${Q.description}`));for(let Q of C)console.log(J.yellow(` ⚠ ${Q.label}`)),console.log(J.gray(` ${Q.description}`));for(let Q of B)console.log(J.cyan(` ℹ ${Q.label}`)),console.log(J.gray(` ${Q.description}`));let _=D.categories.filter((Q)=>Q.score>0);if(_.length>0){console.log();let Q=Math.max(..._.map((Z)=>Z.name.length));for(let Z of _){let X=Z.name.padEnd(Q);console.log(` ${J.white(X)} ${E8(Z.score,Z.maxScore)} ${J.gray(`${Z.score}/${Z.maxScore}`)}`)}}let $=D.findings.slice(0,6);if($.length>0){console.log(),console.log(J.bold("Top findings:"));for(let Q of $){let Z=J.yellow(Q.ruleId.padEnd(28)),X=J.gray(Q.filePath.length>40?"…"+Q.filePath.slice(-39):Q.filePath);if(console.log(` ${Z} ${X}`),Q.snippet){let Y=Q.snippet.trim().split(`
38
+ `)[0].slice(0,80);console.log(` ${J.gray(Y)}`)}}}console.log();let q=D.meta;if(console.log(J.gray(` ${q.provider} ${q.owner}/${q.repo} · ${D.filesScanned}/${D.totalRepoFiles} files scanned · ${D.ref}`)),D.riskLevel==="dangerous"||D.riskLevel==="malicious")console.log(),console.log(F.bold(" ❌ DO NOT RUN"));console.log()}async function B8(D,u){try{if((await fetch(u8,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)})).ok)u.succeed(J.gray("Saved to scanrepo.dev"));else u.warn(J.gray("Could not save to scanrepo.dev (will still work locally)"))}catch{u.warn(J.gray("Could not reach scanrepo.dev (offline?)"))}}async function _8(){let D=new Wu;D.name("scanrepo").description("Scan a GitHub or Bitbucket repo for malware and crypto scams").version("0.1.0").argument("<url>","Repository URL (e.g. github.com/owner/repo or bitbucket.org/ws/repo)").option("--json","Output raw JSON result to stdout (progress goes to stderr)").option("--token <token>","GitHub personal access token (overrides GITHUB_TOKEN env var)").option("--no-publish","Skip saving result to scanrepo.dev").option("--no-color","Disable colored output").action(async(u,F)=>{if(F.token)process.env.GITHUB_TOKEN=F.token;if(!F.color)J.level=0;let E=sD(u);if(!E)console.error("Invalid URL. Use github.com/owner/repo or bitbucket.org/workspace/repo"),process.exit(1);let C=W0(E.provider),B=qD({text:"Starting scan...",stream:process.stderr,color:"cyan"}).start(),_;try{_=await b0(C,E,(q,Q)=>{B.text=`${q} (${Q}%)`})}catch(q){if(q instanceof zD)B.fail(q.message);else{let Q=q instanceof Error?q.message:"Scan failed";B.fail(Q)}process.exit(1)}if(B.succeed(`Scanned ${_.meta.owner}/${_.meta.repo}`),F.json)process.stdout.write(JSON.stringify(_,null,2)+`
39
+ `);else C8(_,!F.color);if(F.publish!==!1){let q=qD({text:"Saving to scanrepo.dev...",stream:process.stderr,color:"gray"}).start();await B8(_,q)}let $=_.riskLevel==="malicious"||_.riskLevel==="dangerous"?2:_.riskLevel==="suspicious"?1:0;process.exit($)}),D.parse()}_8().catch((D)=>{console.error(D instanceof Error?D.message:D),process.exit(1)});
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "scanrepo",
3
+ "version": "0.1.0",
4
+ "description": "Scan any GitHub or Bitbucket repo for malware, credential stealers, and crypto scams",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "scanrepo": "dist/cli.js"
8
+ },
9
+ "scripts": {
10
+ "build": "bun build src/index.ts --outfile dist/cli.js --target node --minify",
11
+ "dev": "bun run src/index.ts",
12
+ "typecheck": "tsc --noEmit"
13
+ },
14
+ "dependencies": {
15
+ "chalk": "^5",
16
+ "commander": "^12",
17
+ "ora": "^8"
18
+ },
19
+ "devDependencies": {
20
+ "@types/node": "^20",
21
+ "typescript": "^5"
22
+ },
23
+ "files": [
24
+ "dist/cli.js"
25
+ ],
26
+ "type": "module",
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "keywords": [
31
+ "security",
32
+ "malware",
33
+ "scanner",
34
+ "github",
35
+ "bitbucket",
36
+ "supply-chain"
37
+ ],
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/rubenmarcus/malicious-repositories"
41
+ }
42
+ }