@scheduler-systems/gal-cli 0.1.13-alpha.pr416 → 0.1.13-alpha.pr459
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.
- package/dist/index.cjs +52 -357
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
#!/usr/bin/env node
|
|
3
|
-
"use strict";var
|
|
4
|
-
`).replace(/^/gm," ".repeat(r))}let
|
|
5
|
-
`)}padWidth(e,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}wrap(e,n,o,s=40){let r=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",a=new RegExp(`[\\n][${r}]+`);if(e.match(a))return e;let u=n-o;if(u<s)return e;let l=e.slice(0,o),
|
|
3
|
+
"use strict";var xo=Object.create;var pe=Object.defineProperty;var To=Object.getOwnPropertyDescriptor;var Io=Object.getOwnPropertyNames;var Bo=Object.getPrototypeOf,Ro=Object.prototype.hasOwnProperty;var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Lo=(t,e)=>{for(var n in e)pe(t,n,{get:e[n],enumerable:!0})},Kt=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Io(e))!Ro.call(t,s)&&s!==n&&pe(t,s,{get:()=>e[s],enumerable:!(o=To(e,s))||o.enumerable});return t};var b=(t,e,n)=>(n=t!=null?xo(Bo(t)):{},Kt(e||!t||!t.__esModule?pe(n,"default",{value:t,enumerable:!0}):n,t)),No=t=>Kt(pe({},"__esModule",{value:!0}),t);var te=x(Ue=>{var ge=class extends Error{constructor(e,n,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=n,this.exitCode=e,this.nestedError=void 0}},je=class extends ge{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ue.CommanderError=ge;Ue.InvalidArgumentError=je});var Fe=x(Ve=>{var{InvalidArgumentError:$o}=te(),He=class{constructor(e,n){switch(this.description=n||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:n.concat(e)}default(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,o)=>{if(!this.argChoices.includes(n))throw new $o(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,o):n},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Po(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ve.Argument=He;Ve.humanReadableArgName=Po});var qe=x(Qt=>{var{humanReadableArgName:Go}=Fe(),Me=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let n=e.commands.filter(s=>!s._hidden),o=e._getHelpCommand();return o&&!o._hidden&&n.push(o),this.sortSubcommands&&n.sort((s,r)=>s.name().localeCompare(r.name())),n}compareOptions(e,n){let o=s=>s.short?s.short.replace(/^-/,""):s.long.replace(/^--/,"");return o(e).localeCompare(o(n))}visibleOptions(e){let n=e.options.filter(s=>!s.hidden),o=e._getHelpOption();if(o&&!o.hidden){let s=o.short&&e._findOption(o.short),r=o.long&&e._findOption(o.long);!s&&!r?n.push(o):o.long&&!r?n.push(e.createOption(o.long,o.description)):o.short&&!s&&n.push(e.createOption(o.short,o.description))}return this.sortOptions&&n.sort(this.compareOptions),n}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let n=[];for(let o=e.parent;o;o=o.parent){let s=o.options.filter(r=>!r.hidden);n.push(...s)}return this.sortOptions&&n.sort(this.compareOptions),n}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(n=>{n.description=n.description||e._argsDescription[n.name()]||""}),e.registeredArguments.find(n=>n.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(o=>Go(o)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,n){return n.visibleCommands(e).reduce((o,s)=>Math.max(o,n.subcommandTerm(s).length),0)}longestOptionTermLength(e,n){return n.visibleOptions(e).reduce((o,s)=>Math.max(o,n.optionTerm(s).length),0)}longestGlobalOptionTermLength(e,n){return n.visibleGlobalOptions(e).reduce((o,s)=>Math.max(o,n.optionTerm(s).length),0)}longestArgumentTermLength(e,n){return n.visibleArguments(e).reduce((o,s)=>Math.max(o,n.argumentTerm(s).length),0)}commandUsage(e){let n=e._name;e._aliases[0]&&(n=n+"|"+e._aliases[0]);let o="";for(let s=e.parent;s;s=s.parent)o=s.name()+" "+o;return o+n+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let n=[];return e.argChoices&&n.push(`choices: ${e.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&n.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&n.push(`env: ${e.envVar}`),n.length>0?`${e.description} (${n.join(", ")})`:e.description}argumentDescription(e){let n=[];if(e.argChoices&&n.push(`choices: ${e.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),e.defaultValue!==void 0&&n.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),n.length>0){let o=`(${n.join(", ")})`;return e.description?`${e.description} ${o}`:o}return e.description}formatHelp(e,n){let o=n.padWidth(e,n),s=n.helpWidth||80,r=2,a=2;function u(D,k){if(k){let v=`${D.padEnd(o+a)}${k}`;return n.wrap(v,s-r,o+a)}return D}function l(D){return D.join(`
|
|
4
|
+
`).replace(/^/gm," ".repeat(r))}let f=[`Usage: ${n.commandUsage(e)}`,""],c=n.commandDescription(e);c.length>0&&(f=f.concat([n.wrap(c,s,0),""]));let d=n.visibleArguments(e).map(D=>u(n.argumentTerm(D),n.argumentDescription(D)));d.length>0&&(f=f.concat(["Arguments:",l(d),""]));let h=n.visibleOptions(e).map(D=>u(n.optionTerm(D),n.optionDescription(D)));if(h.length>0&&(f=f.concat(["Options:",l(h),""])),this.showGlobalOptions){let D=n.visibleGlobalOptions(e).map(k=>u(n.optionTerm(k),n.optionDescription(k)));D.length>0&&(f=f.concat(["Global Options:",l(D),""]))}let m=n.visibleCommands(e).map(D=>u(n.subcommandTerm(D),n.subcommandDescription(D)));return m.length>0&&(f=f.concat(["Commands:",l(m),""])),f.join(`
|
|
5
|
+
`)}padWidth(e,n){return Math.max(n.longestOptionTermLength(e,n),n.longestGlobalOptionTermLength(e,n),n.longestSubcommandTermLength(e,n),n.longestArgumentTermLength(e,n))}wrap(e,n,o,s=40){let r=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",a=new RegExp(`[\\n][${r}]+`);if(e.match(a))return e;let u=n-o;if(u<s)return e;let l=e.slice(0,o),f=e.slice(o).replace(`\r
|
|
6
6
|
`,`
|
|
7
7
|
`),c=" ".repeat(o),h="\\s\u200B",m=new RegExp(`
|
|
8
|
-
|.{1,${u-1}}([${h}]|$)|[^${h}]+?([${h}]|$)`,"g"),D=
|
|
9
|
-
`?"":(
|
|
10
|
-
`)}};
|
|
8
|
+
|.{1,${u-1}}([${h}]|$)|[^${h}]+?([${h}]|$)`,"g"),D=f.match(m)||[];return l+D.map((k,v)=>k===`
|
|
9
|
+
`?"":(v>0?c:"")+k.trimEnd()).join(`
|
|
10
|
+
`)}};Qt.Help=Me});var Ye=x(Je=>{var{InvalidArgumentError:jo}=te(),We=class{constructor(e,n){this.flags=e,this.description=n||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let o=Ho(e);this.short=o.shortFlag,this.long=o.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(e,n){return this.defaultValue=e,this.defaultValueDescription=n,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let n=e;return typeof e=="string"&&(n={[e]:!0}),this.implied=Object.assign(this.implied||{},n),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,n){return n===this.defaultValue||!Array.isArray(n)?[e]:n.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(n,o)=>{if(!this.argChoices.includes(n))throw new jo(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(n,o):n},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return Uo(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ze=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(n=>{n.negate?this.negativeOptions.set(n.attributeName(),n):this.positiveOptions.set(n.attributeName(),n)}),this.negativeOptions.forEach((n,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(e,n){let o=n.attributeName();if(!this.dualOptions.has(o))return!0;let s=this.negativeOptions.get(o).presetArg,r=s!==void 0?s:!1;return n.negate===(r===e)}};function Uo(t){return t.split("-").reduce((e,n)=>e+n[0].toUpperCase()+n.slice(1))}function Ho(t){let e,n,o=t.split(/[ |,]+/);return o.length>1&&!/^[[<]/.test(o[1])&&(e=o.shift()),n=o.shift(),!e&&/^-[^-]$/.test(n)&&(e=n,n=void 0),{shortFlag:e,longFlag:n}}Je.Option=We;Je.DualOptions=ze});var Zt=x(Xt=>{function Vo(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let n=[];for(let o=0;o<=t.length;o++)n[o]=[o];for(let o=0;o<=e.length;o++)n[0][o]=o;for(let o=1;o<=e.length;o++)for(let s=1;s<=t.length;s++){let r=1;t[s-1]===e[o-1]?r=0:r=1,n[s][o]=Math.min(n[s-1][o]+1,n[s][o-1]+1,n[s-1][o-1]+r),s>1&&o>1&&t[s-1]===e[o-2]&&t[s-2]===e[o-1]&&(n[s][o]=Math.min(n[s][o],n[s-2][o-2]+1))}return n[t.length][e.length]}function Mo(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let n=t.startsWith("--");n&&(t=t.slice(2),e=e.map(a=>a.slice(2)));let o=[],s=3,r=.4;return e.forEach(a=>{if(a.length<=1)return;let u=Vo(t,a),l=Math.max(t.length,a.length);(l-u)/l>r&&(u<s?(s=u,o=[a]):u===s&&o.push(a))}),o.sort((a,u)=>a.localeCompare(u)),n&&(o=o.map(a=>`--${a}`)),o.length>1?`
|
|
11
11
|
(Did you mean one of ${o.join(", ")}?)`:o.length===1?`
|
|
12
|
-
(Did you mean ${o[0]}?)`:""}
|
|
13
|
-
- specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new
|
|
14
|
-
Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,o){this._exitCallback&&this._exitCallback(new
|
|
15
|
-
- already used by option '${n.flags}'`)}this.options.push(e)}_registerCommand(e){let n=s=>[s.name()].concat(s.aliases()),o=n(e).find(s=>this._findCommand(s));if(o){let s=n(this._findCommand(o)).join("|"),r=n(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${s}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let n=e.name(),o=e.attributeName();if(e.negate){let r=e.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(o,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(o,e.defaultValue,"default");let s=(r,a,u)=>{r==null&&e.presetArg!==void 0&&(r=e.presetArg);let l=this.getOptionValue(o);r!==null&&e.parseArg?r=this._callParseArg(e,r,l,a):r!==null&&e.variadic&&(r=e._concatValue(r,l)),r==null&&(e.negate?r=!1:e.isBoolean()||e.optional?r=!0:r=""),this.setOptionValueWithSource(o,r,u)};return this.on("option:"+n,r=>{let a=`error: option '${e.flags}' argument '${r}' is invalid.`;s(r,a,"cli")}),e.envVar&&this.on("optionEnv:"+n,r=>{let a=`error: option '${e.flags}' value '${r}' from env '${e.envVar}' is invalid.`;s(r,a,"env")}),this}_optionEx(e,n,o,s,r){if(typeof n=="object"&&n instanceof
|
|
12
|
+
(Did you mean ${o[0]}?)`:""}Xt.suggestSimilar=Mo});var sn=x(on=>{var qo=require("node:events").EventEmitter,Ke=require("node:child_process"),U=require("node:path"),Qe=require("node:fs"),A=require("node:process"),{Argument:Wo,humanReadableArgName:zo}=Fe(),{CommanderError:Xe}=te(),{Help:Jo}=qe(),{Option:en,DualOptions:Yo}=Ye(),{suggestSimilar:tn}=Zt(),Ze=class t extends qo{constructor(e){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=e||"",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:n=>A.stdout.write(n),writeErr:n=>A.stderr.write(n),getOutHelpWidth:()=>A.stdout.isTTY?A.stdout.columns:void 0,getErrHelpWidth:()=>A.stderr.isTTY?A.stderr.columns:void 0,outputError:(n,o)=>o(n)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let n=this;n;n=n.parent)e.push(n);return e}command(e,n,o){let s=n,r=o;typeof s=="object"&&s!==null&&(r=s,s=null),r=r||{};let[,a,u]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(a);return s&&(l.description(s),l._executableHandler=!0),r.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(r.noHelp||r.hidden),l._executableFile=r.executableFile||null,u&&l.arguments(u),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),s?this:l}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Jo,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,n){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
13
|
+
- specify the name in Command constructor or using .name()`);return n=n||{},n.isDefault&&(this._defaultCommandName=e._name),(n.noHelp||n.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,n){return new Wo(e,n)}argument(e,n,o,s){let r=this.createArgument(e,n);return typeof o=="function"?r.default(s).argParser(o):r.default(o),this.addArgument(r),this}arguments(e){return e.trim().split(/ +/).forEach(n=>{this.argument(n)}),this}addArgument(e){let n=this.registeredArguments.slice(-1)[0];if(n&&n.variadic)throw new Error(`only the last argument can be variadic '${n.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,n){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,o,s]=e.match(/([^ ]+) *(.*)/),r=n??"display help for command",a=this.createCommand(o);return a.helpOption(!1),s&&a.arguments(s),r&&a.description(r),this._addImplicitHelpCommand=!0,this._helpCommand=a,this}addHelpCommand(e,n){return typeof e!="object"?(this.helpCommand(e,n),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,n){let o=["preSubcommand","preAction","postAction"];if(!o.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
14
|
+
Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(n):this._lifeCycleHooks[e]=[n],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=n=>{if(n.code!=="commander.executeSubCommandAsync")throw n},this}_exit(e,n,o){this._exitCallback&&this._exitCallback(new Xe(e,n,o)),A.exit(e)}action(e){let n=o=>{let s=this.registeredArguments.length,r=o.slice(0,s);return this._storeOptionsAsProperties?r[s]=this:r[s]=this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=n,this}createOption(e,n){return new en(e,n)}_callParseArg(e,n,o,s){try{return e.parseArg(n,o)}catch(r){if(r.code==="commander.invalidArgument"){let a=`${s} ${r.message}`;this.error(a,{exitCode:r.exitCode,code:r.code})}throw r}}_registerOption(e){let n=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(n){let o=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
|
|
15
|
+
- already used by option '${n.flags}'`)}this.options.push(e)}_registerCommand(e){let n=s=>[s.name()].concat(s.aliases()),o=n(e).find(s=>this._findCommand(s));if(o){let s=n(this._findCommand(o)).join("|"),r=n(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${s}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let n=e.name(),o=e.attributeName();if(e.negate){let r=e.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(o,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(o,e.defaultValue,"default");let s=(r,a,u)=>{r==null&&e.presetArg!==void 0&&(r=e.presetArg);let l=this.getOptionValue(o);r!==null&&e.parseArg?r=this._callParseArg(e,r,l,a):r!==null&&e.variadic&&(r=e._concatValue(r,l)),r==null&&(e.negate?r=!1:e.isBoolean()||e.optional?r=!0:r=""),this.setOptionValueWithSource(o,r,u)};return this.on("option:"+n,r=>{let a=`error: option '${e.flags}' argument '${r}' is invalid.`;s(r,a,"cli")}),e.envVar&&this.on("optionEnv:"+n,r=>{let a=`error: option '${e.flags}' value '${r}' from env '${e.envVar}' is invalid.`;s(r,a,"env")}),this}_optionEx(e,n,o,s,r){if(typeof n=="object"&&n instanceof en)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(n,o);if(a.makeOptionMandatory(!!e.mandatory),typeof s=="function")a.default(r).argParser(s);else if(s instanceof RegExp){let u=s;s=(l,f)=>{let c=u.exec(l);return c?c[0]:f},a.default(r).argParser(s)}else a.default(s);return this.addOption(a)}option(e,n,o,s){return this._optionEx({},e,n,o,s)}requiredOption(e,n,o,s){return this._optionEx({mandatory:!0},e,n,o,s)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,n){return this.setOptionValueWithSource(e,n,void 0)}setOptionValueWithSource(e,n,o){return this._storeOptionsAsProperties?this[e]=n:this._optionValues[e]=n,this._optionValueSources[e]=o,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let n;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(e)!==void 0&&(n=o.getOptionValueSource(e))}),n}_prepareUserArgs(e,n){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(n=n||{},e===void 0&&n.from===void 0){A.versions?.electron&&(n.from="electron");let s=A.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(n.from="eval")}e===void 0&&(e=A.argv),this.rawArgs=e.slice();let o;switch(n.from){case void 0:case"node":this._scriptPath=e[1],o=e.slice(2);break;case"electron":A.defaultApp?(this._scriptPath=e[1],o=e.slice(2)):o=e.slice(1);break;case"user":o=e.slice(0);break;case"eval":o=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${n.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(e,n){let o=this._prepareUserArgs(e,n);return this._parseCommand([],o),this}async parseAsync(e,n){let o=this._prepareUserArgs(e,n);return await this._parseCommand([],o),this}_executeSubCommand(e,n){n=n.slice();let o=!1,s=[".js",".ts",".tsx",".mjs",".cjs"];function r(c,d){let h=U.resolve(c,d);if(Qe.existsSync(h))return h;if(s.includes(U.extname(d)))return;let m=s.find(D=>Qe.existsSync(`${h}${D}`));if(m)return`${h}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=e._executableFile||`${this._name}-${e._name}`,u=this._executableDir||"";if(this._scriptPath){let c;try{c=Qe.realpathSync(this._scriptPath)}catch{c=this._scriptPath}u=U.resolve(U.dirname(c),u)}if(u){let c=r(u,a);if(!c&&!e._executableFile&&this._scriptPath){let d=U.basename(this._scriptPath,U.extname(this._scriptPath));d!==this._name&&(c=r(u,`${d}-${e._name}`))}a=c||a}o=s.includes(U.extname(a));let l;A.platform!=="win32"?o?(n.unshift(a),n=nn(A.execArgv).concat(n),l=Ke.spawn(A.argv[0],n,{stdio:"inherit"})):l=Ke.spawn(a,n,{stdio:"inherit"}):(n.unshift(a),n=nn(A.execArgv).concat(n),l=Ke.spawn(A.execPath,n,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{A.on(d,()=>{l.killed===!1&&l.exitCode===null&&l.kill(d)})});let f=this._exitCallback;l.on("close",c=>{c=c??1,f?f(new Xe(c,"commander.executeSubCommandAsync","(close)")):A.exit(c)}),l.on("error",c=>{if(c.code==="ENOENT"){let d=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",h=`'${a}' does not exist
|
|
16
16
|
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
17
17
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
18
|
-
- ${
|
|
18
|
+
- ${d}`;throw new Error(h)}else if(c.code==="EACCES")throw new Error(`'${a}' not executable`);if(!f)A.exit(1);else{let d=new Xe(1,"commander.executeSubCommandAsync","(error)");d.nestedError=c,f(d)}}),this.runningCommand=l}_dispatchSubcommand(e,n,o){let s=this._findCommand(e);s||this.help({error:!0});let r;return r=this._chainOrCallSubCommandHook(r,s,"preSubcommand"),r=this._chainOrCall(r,()=>{if(s._executableHandler)this._executeSubCommand(s,n.concat(o));else return s._parseCommand(n,o)}),r}_dispatchHelpCommand(e){e||this.help();let n=this._findCommand(e);return n&&!n._executableHandler&&n.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,n)=>{e.required&&this.args[n]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(o,s,r)=>{let a=s;if(s!==null&&o.parseArg){let u=`error: command-argument value '${s}' is invalid for argument '${o.name()}'.`;a=this._callParseArg(o,s,r,u)}return a};this._checkNumberOfArguments();let n=[];this.registeredArguments.forEach((o,s)=>{let r=o.defaultValue;o.variadic?s<this.args.length?(r=this.args.slice(s),o.parseArg&&(r=r.reduce((a,u)=>e(o,u,a),o.defaultValue))):r===void 0&&(r=[]):s<this.args.length&&(r=this.args[s],o.parseArg&&(r=e(o,r,o.defaultValue))),n[s]=r}),this.processedArgs=n}_chainOrCall(e,n){return e&&e.then&&typeof e.then=="function"?e.then(()=>n()):n()}_chainOrCallHooks(e,n){let o=e,s=[];return this._getCommandAndAncestors().reverse().filter(r=>r._lifeCycleHooks[n]!==void 0).forEach(r=>{r._lifeCycleHooks[n].forEach(a=>{s.push({hookedCommand:r,callback:a})})}),n==="postAction"&&s.reverse(),s.forEach(r=>{o=this._chainOrCall(o,()=>r.callback(r.hookedCommand,this))}),o}_chainOrCallSubCommandHook(e,n,o){let s=e;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(r=>{s=this._chainOrCall(s,()=>r(this,n))}),s}_parseCommand(e,n){let o=this.parseOptions(n);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(o.operands),n=o.unknown,this.args=e.concat(n),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),n);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(n),this._dispatchSubcommand(this._defaultCommandName,e,n);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){s(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(r,e,n)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent&&this.parent.listenerCount(r))s(),this._processArguments(),this.parent.emit(r,e,n);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,n);this.listenerCount("command:*")?this.emit("command:*",e,n):this.commands.length?this.unknownCommand():(s(),this._processArguments())}else this.commands.length?(s(),this.help({error:!0})):(s(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(n=>n._name===e||n._aliases.includes(e))}_findOption(e){return this.options.find(n=>n.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(n=>{n.mandatory&&e.getOptionValue(n.attributeName())===void 0&&e.missingMandatoryOptionValue(n)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(o=>{let s=o.attributeName();return this.getOptionValue(s)===void 0?!1:this.getOptionValueSource(s)!=="default"});e.filter(o=>o.conflictsWith.length>0).forEach(o=>{let s=e.find(r=>o.conflictsWith.includes(r.attributeName()));s&&this._conflictingOption(o,s)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let n=[],o=[],s=n,r=e.slice();function a(l){return l.length>1&&l[0]==="-"}let u=null;for(;r.length;){let l=r.shift();if(l==="--"){s===o&&s.push(l),s.push(...r);break}if(u&&!a(l)){this.emit(`option:${u.name()}`,l);continue}if(u=null,a(l)){let f=this._findOption(l);if(f){if(f.required){let c=r.shift();c===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,c)}else if(f.optional){let c=null;r.length>0&&!a(r[0])&&(c=r.shift()),this.emit(`option:${f.name()}`,c)}else this.emit(`option:${f.name()}`);u=f.variadic?f:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let f=this._findOption(`-${l[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,l.slice(2)):(this.emit(`option:${f.name()}`),r.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let f=l.indexOf("="),c=this._findOption(l.slice(0,f));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,l.slice(f+1));continue}}if(a(l)&&(s=o),(this._enablePositionalOptions||this._passThroughOptions)&&n.length===0&&o.length===0){if(this._findCommand(l)){n.push(l),r.length>0&&o.push(...r);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){n.push(l),r.length>0&&n.push(...r);break}else if(this._defaultCommandName){o.push(l),r.length>0&&o.push(...r);break}}if(this._passThroughOptions){s.push(l),r.length>0&&s.push(...r);break}s.push(l)}return{operands:n,unknown:o}}opts(){if(this._storeOptionsAsProperties){let e={},n=this.options.length;for(let o=0;o<n;o++){let s=this.options[o].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,n)=>Object.assign(e,n.opts()),{})}error(e,n){this._outputConfiguration.outputError(`${e}
|
|
19
19
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
20
20
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
21
|
-
`),this.outputHelp({error:!0}));let o=n||{},s=o.exitCode||1,r=o.code||"commander.error";this._exit(s,r,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in
|
|
22
|
-
`),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(e);if(o){let s=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(o=>
|
|
21
|
+
`),this.outputHelp({error:!0}));let o=n||{},s=o.exitCode||1,r=o.code||"commander.error";this._exit(s,r,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in A.env){let n=e.attributeName();(this.getOptionValue(n)===void 0||["default","config","env"].includes(this.getOptionValueSource(n)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,A.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Yo(this.options),n=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&n(o.attributeName())&&e.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(s=>!n(s)).forEach(s=>{this.setOptionValueWithSource(s,o.implied[s],"implied")})})}missingArgument(e){let n=`error: missing required argument '${e}'`;this.error(n,{code:"commander.missingArgument"})}optionMissingArgument(e){let n=`error: option '${e.flags}' argument missing`;this.error(n,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let n=`error: required option '${e.flags}' not specified`;this.error(n,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,n){let o=a=>{let u=a.attributeName(),l=this.getOptionValue(u),f=this.options.find(d=>d.negate&&u===d.attributeName()),c=this.options.find(d=>!d.negate&&u===d.attributeName());return f&&(f.presetArg===void 0&&l===!1||f.presetArg!==void 0&&l===f.presetArg)?f:c||a},s=a=>{let u=o(a),l=u.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},r=`error: ${s(e)} cannot be used with ${s(n)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let n="";if(e.startsWith("--")&&this._showSuggestionAfterError){let s=[],r=this;do{let a=r.createHelp().visibleOptions(r).filter(u=>u.long).map(u=>u.long);s=s.concat(a),r=r.parent}while(r&&!r._enablePositionalOptions);n=tn(e,s)}let o=`error: unknown option '${e}'${n}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let n=this.registeredArguments.length,o=n===1?"":"s",r=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${n} argument${o} but got ${e.length}.`;this.error(r,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],n="";if(this._showSuggestionAfterError){let s=[];this.createHelp().visibleCommands(this).forEach(r=>{s.push(r.name()),r.alias()&&s.push(r.alias())}),n=tn(e,s)}let o=`error: unknown command '${e}'${n}`;this.error(o,{code:"commander.unknownCommand"})}version(e,n,o){if(e===void 0)return this._version;this._version=e,n=n||"-V, --version",o=o||"output the version number";let s=this.createOption(n,o);return this._versionOptionName=s.attributeName(),this._registerOption(s),this.on("option:"+s.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
22
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,n){return e===void 0&&n===void 0?this._description:(this._description=e,n&&(this._argsDescription=n),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let n=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(n=this.commands[this.commands.length-1]),e===n._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(e);if(o){let s=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return n._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(n=>this.alias(n)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let n=this.registeredArguments.map(o=>zo(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?n:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=U.basename(e,U.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let n=this.createHelp();return n.helpWidth===void 0&&(n.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),n.formatHelp(this,n)}_getHelpContext(e){e=e||{};let n={error:!!e.error},o;return n.error?o=s=>this._outputConfiguration.writeErr(s):o=s=>this._outputConfiguration.writeOut(s),n.write=e.write||o,n.command=this,n}outputHelp(e){let n;typeof e=="function"&&(n=e,e=void 0);let o=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(r=>r.emit("beforeAllHelp",o)),this.emit("beforeHelp",o);let s=this.helpInformation(o);if(n&&(s=n(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",o),this._getCommandAndAncestors().forEach(r=>r.emit("afterAllHelp",o))}helpOption(e,n){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",n=n??"display help for command",this._helpOption=this.createOption(e,n),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let n=A.exitCode||0;n===0&&e&&typeof e!="function"&&e.error&&(n=1),this._exit(n,"commander.help","(outputHelp)")}addHelpText(e,n){let o=["beforeAll","before","after","afterAll"];if(!o.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
23
23
|
Expecting one of '${o.join("', '")}'`);let s=`${e}Help`;return this.on(s,r=>{let a;typeof n=="function"?a=n({error:r.error,command:r.command}):a=n,a&&r.write(`${a}
|
|
24
|
-
`)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(s=>n.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function
|
|
25
|
-
`);let o;for(;(o=
|
|
26
|
-
`),r=r.replace(/\\r/g,"\r")),e[s]=r}return e}function is(t){t=t||{};let e=Fn(t);t.path=e;let n=b.configDotenv(t);if(!n.parsed){let a=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw a.code="MISSING_DATA",a}let o=gn(t).split(","),s=o.length,r;for(let a=0;a<s;a++)try{let u=o[a].trim(),l=us(n,u);r=b.decrypt(l.ciphertext,l.key);break}catch(u){if(a+1>=s)throw u}return b.parse(r)}function as(t){console.log(`[dotenv@${rt}][WARN] ${t}`)}function se(t){console.log(`[dotenv@${rt}][DEBUG] ${t}`)}function pn(t){console.log(`[dotenv@${rt}] ${t}`)}function gn(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function us(t,e){let n;try{n=new URL(e)}catch(u){if(u.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw u}let o=n.password;if(!o){let u=new Error("INVALID_DOTENV_KEY: Missing key part");throw u.code="INVALID_DOTENV_KEY",u}let s=n.searchParams.get("environment");if(!s){let u=new Error("INVALID_DOTENV_KEY: Missing environment part");throw u.code="INVALID_DOTENV_KEY",u}let r=`DOTENV_VAULT_${s.toUpperCase()}`,a=t.parsed[r];if(!a){let u=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${r} in your .env.vault file.`);throw u.code="NOT_FOUND_DOTENV_ENVIRONMENT",u}return{ciphertext:a,key:o}}function Fn(t){let e=null;if(t&&t.path&&t.path.length>0)if(Array.isArray(t.path))for(let n of t.path)st.existsSync(n)&&(e=n.endsWith(".vault")?n:`${n}.vault`);else e=t.path.endsWith(".vault")?t.path:`${t.path}.vault`;else e=_e.resolve(process.cwd(),".env.vault");return st.existsSync(e)?e:null}function Dn(t){return t[0]==="~"?_e.join(ts.homedir(),t.slice(1)):t}function ls(t){let e=!!(t&&t.debug),n=t&&"quiet"in t?t.quiet:!0;(e||!n)&&pn("Loading env from encrypted .env.vault");let o=b._parseVault(t),s=process.env;return t&&t.processEnv!=null&&(s=t.processEnv),b.populate(s,o,t),{parsed:o}}function cs(t){let e=_e.resolve(process.cwd(),".env"),n="utf8",o=!!(t&&t.debug),s=t&&"quiet"in t?t.quiet:!0;t&&t.encoding?n=t.encoding:o&&se("No encoding is specified. UTF-8 is used by default");let r=[e];if(t&&t.path)if(!Array.isArray(t.path))r=[Dn(t.path)];else{r=[];for(let d of t.path)r.push(Dn(d))}let a,u={};for(let d of r)try{let c=b.parse(st.readFileSync(d,{encoding:n}));b.populate(u,c,t)}catch(c){o&&se(`Failed to load ${d} ${c.message}`),a=c}let l=process.env;if(t&&t.processEnv!=null&&(l=t.processEnv),b.populate(l,u,t),o||!s){let d=Object.keys(u).length,c=[];for(let f of r)try{let h=_e.relative(process.cwd(),f);c.push(h)}catch(h){o&&se(`Failed to load ${f} ${h.message}`),a=h}pn(`injecting env (${d}) from ${c.join(",")}`)}return a?{parsed:u,error:a}:{parsed:u}}function ds(t){if(gn(t).length===0)return b.configDotenv(t);let e=Fn(t);return e?b._configVault(t):(as(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),b.configDotenv(t))}function fs(t,e){let n=Buffer.from(e.slice(-64),"hex"),o=Buffer.from(t,"base64"),s=o.subarray(0,12),r=o.subarray(-16);o=o.subarray(12,-16);try{let a=ns.createDecipheriv("aes-256-gcm",n,s);return a.setAuthTag(r),`${a.update(o)}${a.final()}`}catch(a){let u=a instanceof RangeError,l=a.message==="Invalid key length",d=a.message==="Unsupported state or unable to authenticate data";if(u||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(d){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw a}}function hs(t,e,n={}){let o=!!(n&&n.debug),s=!!(n&&n.override);if(typeof e!="object"){let r=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw r.code="OBJECT_REQUIRED",r}for(let r of Object.keys(e))Object.prototype.hasOwnProperty.call(t,r)?(s===!0&&(t[r]=e[r]),o&&se(s===!0?`"${r}" is already defined and WAS overwritten`:`"${r}" is already defined and was NOT overwritten`)):t[r]=e[r]}var b={configDotenv:cs,_configVault:ls,_parseVault:is,config:ds,decrypt:fs,parse:rs,populate:hs};H.exports.configDotenv=b.configDotenv;H.exports._configVault=b._configVault;H.exports._parseVault=b._parseVault;H.exports.config=b.config;H.exports.decrypt=b.decrypt;H.exports.parse=b.parse;H.exports.populate=b.populate;H.exports=b});var Zn=I((Mi,Ms)=>{Ms.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var It=I((Hi,to)=>{"use strict";var Ne=Object.assign({},Zn()),eo=Object.keys(Ne);Object.defineProperty(Ne,"random",{get(){let t=Math.floor(Math.random()*eo.length),e=eo[t];return Ne[e]}});to.exports=Ne});var ao=I((ta,io)=>{io.exports=()=>/[#*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 fo=I((ya,er)=>{er.exports={name:"@scheduler-systems/gal-cli",version:"0.1.13-alpha.pr416",description:"GAL CLI - Command-line tool for managing AI agent configurations across your organization",license:"UNLICENSED",private:!1,type:"module",main:"./dist/index.cjs",bin:{gal:"./dist/index.cjs"},files:["dist/index.cjs","scripts/postinstall.cjs","scripts/preuninstall.cjs","README.md","LICENSE"],scripts:{postinstall:"node scripts/postinstall.cjs",preuninstall:"node scripts/preuninstall.cjs",dev:"tsx watch src/index.ts",build:`rm -rf dist && esbuild src/index.ts --bundle --platform=node --target=node18 --outfile=dist/index.cjs --format=cjs --define:__CLI_VERSION__=\\"$(node -p "require('./package.json').version")-local+$(git rev-parse --short HEAD)\\" --define:__DEFAULT_API_URL__=\\"http://localhost:3000\\" && chmod +x dist/index.cjs`,"build:publish":`rm -rf dist && esbuild src/index.ts --bundle --platform=node --target=node18 --minify --outfile=dist/index.cjs --format=cjs --define:__CLI_VERSION__=\\"$(node -p "require('./package.json').version")\\" --define:__DEFAULT_API_URL__=\\"\${DEFAULT_API_URL:-https://api.gal.run}\\" && { printf '%s\\n' '#!/usr/bin/env node'; cat dist/index.cjs; } > dist/temp.cjs && mv dist/temp.cjs dist/index.cjs && chmod +x dist/index.cjs`,start:"node dist/index.js",test:"vitest run --pool=forks","test:watch":"vitest","test:unit":"vitest run --pool=forks tests/unit/","test:e2e":"vitest run --pool=forks tests/e2e/","test:mutation":"stryker run","test:mutation:incremental":"stryker run --incremental","test:coverage":"vitest run --coverage","type-check":"tsc --noEmit",prepublishOnly:"npm run build:publish",clean:"rm -rf dist"},keywords:["gal","governance","ai","agent","cli","configuration","claude","cursor","windsurf","gemini","codex"],author:"Scheduler Systems",repository:{type:"git",url:"https://github.com/Scheduler-Systems/gal.git",directory:"apps/cli"},bugs:{url:"https://github.com/Scheduler-Systems/gal/issues"},homepage:"https://github.com/Scheduler-Systems/gal#readme",engines:{node:">=18.0.0"},dependencies:{"@anthropic-ai/sdk":"^0.32.1","@e2b/code-interpreter":"^1.0.4","@octokit/rest":"^21.0.2",chalk:"^5.4.1",commander:"^12.1.0",dotenv:"^16.4.7",openai:"^4.77.3",ora:"^8.1.1"},devDependencies:{"@eslint/js":"^9.39.1","@gal/types":"workspace:*","@stryker-mutator/core":"^9.4.0","@stryker-mutator/typescript-checker":"^9.4.0","@stryker-mutator/vitest-runner":"^9.4.0","@types/node":"^22.10.2","@vitest/coverage-v8":"^4.0.16",esbuild:"^0.24.0",eslint:"^9.39.2","eslint-plugin-security":"^3.0.1","eslint-plugin-sonarjs":"^3.0.5","fast-check":"^4.5.3",globals:"^16.5.0","node-pty":"^1.0.0",tsx:"^4.19.2",typescript:"^5.7.2","typescript-eslint":"^8.46.4",vitest:"^4.0.16"}}});var Rr={};Po(Rr,{DEFAULT_API_URL:()=>ee});module.exports=$o(Rr);var hn=A(fn(),1),{program:Vr,createCommand:qr,createArgument:Wr,createOption:Jr,CommanderError:zr,InvalidArgumentError:Yr,InvalidOptionArgumentError:Kr,Command:L,Argument:Qr,Option:Xr,Help:Zr}=hn.default;var wo=A(Cn(),1),So=A(require("https"),1),q=require("fs"),zt=require("path"),ko=require("os");var yn=(t=0)=>e=>`\x1B[${e+t}m`,En=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,_n=(t=0)=>(e,n,o)=>`\x1B[${38+t};2;${e};${n};${o}m`,y={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]}},oi=Object.keys(y.modifier),ms=Object.keys(y.color),Ds=Object.keys(y.bgColor),si=[...ms,...Ds];function ps(){let t=new Map;for(let[e,n]of Object.entries(y)){for(let[o,s]of Object.entries(n))y[o]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[o]=y[o],t.set(s[0],s[1]);Object.defineProperty(y,e,{value:n,enumerable:!1})}return Object.defineProperty(y,"codes",{value:t,enumerable:!1}),y.color.close="\x1B[39m",y.bgColor.close="\x1B[49m",y.color.ansi=yn(),y.color.ansi256=En(),y.color.ansi16m=_n(),y.bgColor.ansi=yn(10),y.bgColor.ansi256=En(10),y.bgColor.ansi16m=_n(10),Object.defineProperties(y,{rgbToAnsi256:{value(e,n,o){return e===n&&n===o?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(e){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[o]=n;o.length===3&&(o=[...o].map(r=>r+r).join(""));let s=Number.parseInt(o,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:e=>y.rgbToAnsi256(...y.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,o,s;if(e>=232)n=((e-232)*10+8)/255,o=n,s=n;else{e-=16;let u=e%36;n=Math.floor(e/36)/5,o=Math.floor(u/6)/5,s=u%6/5}let r=Math.max(n,o,s)*2;if(r===0)return 30;let a=30+(Math.round(s)<<2|Math.round(o)<<1|Math.round(n));return r===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,n,o)=>y.ansi256ToAnsi(y.rgbToAnsi256(e,n,o)),enumerable:!1},hexToAnsi:{value:e=>y.ansi256ToAnsi(y.hexToAnsi256(e)),enumerable:!1}}),y}var gs=ps(),P=gs;var Ae=A(require("node:process"),1),An=A(require("node:os"),1),it=A(require("node:tty"),1);function R(t,e=globalThis.Deno?globalThis.Deno.args:Ae.default.argv){let n=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(n+t),s=e.indexOf("--");return o!==-1&&(s===-1||o<s)}var{env:E}=Ae.default,ve;R("no-color")||R("no-colors")||R("color=false")||R("color=never")?ve=0:(R("color")||R("colors")||R("color=true")||R("color=always"))&&(ve=1);function Fs(){if("FORCE_COLOR"in E)return E.FORCE_COLOR==="true"?1:E.FORCE_COLOR==="false"?0:E.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(E.FORCE_COLOR,10),3)}function Cs(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function ys(t,{streamIsTTY:e,sniffFlags:n=!0}={}){let o=Fs();o!==void 0&&(ve=o);let s=n?ve:o;if(s===0)return 0;if(n){if(R("color=16m")||R("color=full")||R("color=truecolor"))return 3;if(R("color=256"))return 2}if("TF_BUILD"in E&&"AGENT_NAME"in E)return 1;if(t&&!e&&s===void 0)return 0;let r=s||0;if(E.TERM==="dumb")return r;if(Ae.default.platform==="win32"){let a=An.default.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in E)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in E)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in E)||E.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in E)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(E.TEAMCITY_VERSION)?1:0;if(E.COLORTERM==="truecolor"||E.TERM==="xterm-kitty"||E.TERM==="xterm-ghostty"||E.TERM==="wezterm")return 3;if("TERM_PROGRAM"in E){let a=Number.parseInt((E.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(E.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(E.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(E.TERM)||"COLORTERM"in E?1:r}function vn(t,e={}){let n=ys(t,{streamIsTTY:t&&t.isTTY,...e});return Cs(n)}var Es={stdout:vn({isTTY:it.default.isatty(1)}),stderr:vn({isTTY:it.default.isatty(2)})},bn=Es;function wn(t,e,n){let o=t.indexOf(e);if(o===-1)return t;let s=e.length,r=0,a="";do a+=t.slice(r,o)+e+n,r=o+s,o=t.indexOf(e,r);while(o!==-1);return a+=t.slice(r),a}function Sn(t,e,n,o){let s=0,r="";do{let a=t[o-1]==="\r";r+=t.slice(s,a?o-1:o)+e+(a?`\r
|
|
24
|
+
`)}),this}_outputHelpIfRequested(e){let n=this._getHelpOption();n&&e.find(s=>n.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function nn(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let n,o="127.0.0.1",s="9229",r;return(r=e.match(/^(--inspect(-brk)?)$/))!==null?n=r[1]:(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(n=r[1],/^\d+$/.test(r[3])?s=r[3]:o=r[3]):(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(n=r[1],o=r[3],s=r[4]),n&&s!=="0"?`${n}=${o}:${parseInt(s)+1}`:e})}on.Command=Ze});var ln=x(T=>{var{Argument:rn}=Fe(),{Command:et}=sn(),{CommanderError:Ko,InvalidArgumentError:an}=te(),{Help:Qo}=qe(),{Option:un}=Ye();T.program=new et;T.createCommand=t=>new et(t);T.createOption=(t,e)=>new un(t,e);T.createArgument=(t,e)=>new rn(t,e);T.Command=et;T.Option=un;T.Argument=rn;T.Help=Qo;T.CommanderError=Ko;T.InvalidArgumentError=an;T.InvalidOptionArgumentError=an});var fn=x((ei,Xo)=>{Xo.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var pn=x((ti,H)=>{var tt=require("fs"),Ce=require("path"),Zo=require("os"),es=require("crypto"),ts=fn(),nt=ts.version,ns=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function os(t){let e={},n=t.toString();n=n.replace(/\r\n?/mg,`
|
|
25
|
+
`);let o;for(;(o=ns.exec(n))!=null;){let s=o[1],r=o[2]||"";r=r.trim();let a=r[0];r=r.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),a==='"'&&(r=r.replace(/\\n/g,`
|
|
26
|
+
`),r=r.replace(/\\r/g,"\r")),e[s]=r}return e}function ss(t){t=t||{};let e=mn(t);t.path=e;let n=w.configDotenv(t);if(!n.parsed){let a=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw a.code="MISSING_DATA",a}let o=Dn(t).split(","),s=o.length,r;for(let a=0;a<s;a++)try{let u=o[a].trim(),l=is(n,u);r=w.decrypt(l.ciphertext,l.key);break}catch(u){if(a+1>=s)throw u}return w.parse(r)}function rs(t){console.log(`[dotenv@${nt}][WARN] ${t}`)}function ne(t){console.log(`[dotenv@${nt}][DEBUG] ${t}`)}function hn(t){console.log(`[dotenv@${nt}] ${t}`)}function Dn(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function is(t,e){let n;try{n=new URL(e)}catch(u){if(u.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw u}let o=n.password;if(!o){let u=new Error("INVALID_DOTENV_KEY: Missing key part");throw u.code="INVALID_DOTENV_KEY",u}let s=n.searchParams.get("environment");if(!s){let u=new Error("INVALID_DOTENV_KEY: Missing environment part");throw u.code="INVALID_DOTENV_KEY",u}let r=`DOTENV_VAULT_${s.toUpperCase()}`,a=t.parsed[r];if(!a){let u=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${r} in your .env.vault file.`);throw u.code="NOT_FOUND_DOTENV_ENVIRONMENT",u}return{ciphertext:a,key:o}}function mn(t){let e=null;if(t&&t.path&&t.path.length>0)if(Array.isArray(t.path))for(let n of t.path)tt.existsSync(n)&&(e=n.endsWith(".vault")?n:`${n}.vault`);else e=t.path.endsWith(".vault")?t.path:`${t.path}.vault`;else e=Ce.resolve(process.cwd(),".env.vault");return tt.existsSync(e)?e:null}function dn(t){return t[0]==="~"?Ce.join(Zo.homedir(),t.slice(1)):t}function as(t){let e=!!(t&&t.debug),n=t&&"quiet"in t?t.quiet:!0;(e||!n)&&hn("Loading env from encrypted .env.vault");let o=w._parseVault(t),s=process.env;return t&&t.processEnv!=null&&(s=t.processEnv),w.populate(s,o,t),{parsed:o}}function us(t){let e=Ce.resolve(process.cwd(),".env"),n="utf8",o=!!(t&&t.debug),s=t&&"quiet"in t?t.quiet:!0;t&&t.encoding?n=t.encoding:o&&ne("No encoding is specified. UTF-8 is used by default");let r=[e];if(t&&t.path)if(!Array.isArray(t.path))r=[dn(t.path)];else{r=[];for(let f of t.path)r.push(dn(f))}let a,u={};for(let f of r)try{let c=w.parse(tt.readFileSync(f,{encoding:n}));w.populate(u,c,t)}catch(c){o&&ne(`Failed to load ${f} ${c.message}`),a=c}let l=process.env;if(t&&t.processEnv!=null&&(l=t.processEnv),w.populate(l,u,t),o||!s){let f=Object.keys(u).length,c=[];for(let d of r)try{let h=Ce.relative(process.cwd(),d);c.push(h)}catch(h){o&&ne(`Failed to load ${d} ${h.message}`),a=h}hn(`injecting env (${f}) from ${c.join(",")}`)}return a?{parsed:u,error:a}:{parsed:u}}function ls(t){if(Dn(t).length===0)return w.configDotenv(t);let e=mn(t);return e?w._configVault(t):(rs(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),w.configDotenv(t))}function cs(t,e){let n=Buffer.from(e.slice(-64),"hex"),o=Buffer.from(t,"base64"),s=o.subarray(0,12),r=o.subarray(-16);o=o.subarray(12,-16);try{let a=es.createDecipheriv("aes-256-gcm",n,s);return a.setAuthTag(r),`${a.update(o)}${a.final()}`}catch(a){let u=a instanceof RangeError,l=a.message==="Invalid key length",f=a.message==="Unsupported state or unable to authenticate data";if(u||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(f){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw a}}function fs(t,e,n={}){let o=!!(n&&n.debug),s=!!(n&&n.override);if(typeof e!="object"){let r=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw r.code="OBJECT_REQUIRED",r}for(let r of Object.keys(e))Object.prototype.hasOwnProperty.call(t,r)?(s===!0&&(t[r]=e[r]),o&&ne(s===!0?`"${r}" is already defined and WAS overwritten`:`"${r}" is already defined and was NOT overwritten`)):t[r]=e[r]}var w={configDotenv:us,_configVault:as,_parseVault:ss,config:ls,decrypt:cs,parse:os,populate:fs};H.exports.configDotenv=w.configDotenv;H.exports._configVault=w._configVault;H.exports._parseVault=w._parseVault;H.exports.config=w.config;H.exports.decrypt=w.decrypt;H.exports.parse=w.parse;H.exports.populate=w.populate;H.exports=w});var Qn=x((Ui,Hs)=>{Hs.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var Ot=x((Hi,Zn)=>{"use strict";var Be=Object.assign({},Qn()),Xn=Object.keys(Be);Object.defineProperty(Be,"random",{get(){let t=Math.floor(Math.random()*Xn.length),e=Xn[t];return Be[e]}});Zn.exports=Be});var ro=x((ea,so)=>{so.exports=()=>/[#*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 lo=x((Ca,er)=>{er.exports={name:"@scheduler-systems/gal-cli",version:"0.1.13-alpha.pr459",description:"GAL CLI - Command-line tool for managing AI agent configurations across your organization",license:"UNLICENSED",private:!1,type:"module",main:"./dist/index.cjs",bin:{gal:"./dist/index.cjs"},files:["dist/index.cjs","scripts/postinstall.cjs","scripts/preuninstall.cjs","README.md","LICENSE"],scripts:{postinstall:"node scripts/postinstall.cjs",preuninstall:"node scripts/preuninstall.cjs",dev:"tsx watch src/index.ts",build:`rm -rf dist && esbuild src/index.ts --bundle --platform=node --target=node18 --outfile=dist/index.cjs --format=cjs --define:__CLI_VERSION__=\\"$(node -p "require('./package.json').version")-local+$(git rev-parse --short HEAD)\\" --define:__DEFAULT_API_URL__=\\"http://localhost:3000\\" && chmod +x dist/index.cjs`,"build:publish":`rm -rf dist && esbuild src/index.ts --bundle --platform=node --target=node18 --minify --outfile=dist/index.cjs --format=cjs --define:__CLI_VERSION__=\\"$(node -p "require('./package.json').version")\\" --define:__DEFAULT_API_URL__=\\"\${DEFAULT_API_URL:-https://api.gal.run}\\" && { printf '%s\\n' '#!/usr/bin/env node'; cat dist/index.cjs; } > dist/temp.cjs && mv dist/temp.cjs dist/index.cjs && chmod +x dist/index.cjs`,start:"node dist/index.js",test:"vitest run --pool=forks","test:watch":"vitest","test:unit":"vitest run --pool=forks tests/unit/","test:e2e":"vitest run --pool=forks tests/e2e/","test:mutation":"stryker run","test:mutation:incremental":"stryker run --incremental","test:coverage":"vitest run --coverage","type-check":"tsc --noEmit",prepublishOnly:"npm run build:publish",clean:"rm -rf dist"},keywords:["gal","governance","ai","agent","cli","configuration","claude","cursor","windsurf","gemini","codex"],author:"Scheduler Systems",repository:{type:"git",url:"https://github.com/Scheduler-Systems/gal.git",directory:"apps/cli"},bugs:{url:"https://github.com/Scheduler-Systems/gal/issues"},homepage:"https://github.com/Scheduler-Systems/gal#readme",engines:{node:">=18.0.0"},dependencies:{"@anthropic-ai/sdk":"^0.32.1","@e2b/code-interpreter":"^1.0.4","@octokit/rest":"^21.0.2",chalk:"^5.4.1",commander:"^12.1.0",dotenv:"^16.4.7",openai:"^4.77.3",ora:"^8.1.1"},devDependencies:{"@eslint/js":"^9.39.1","@gal/types":"workspace:*","@stryker-mutator/core":"^9.4.0","@stryker-mutator/typescript-checker":"^9.4.0","@stryker-mutator/vitest-runner":"^9.4.0","@types/node":"^22.10.2","@vitest/coverage-v8":"^4.0.16",esbuild:"^0.24.0",eslint:"^9.39.2","eslint-plugin-security":"^3.0.1","eslint-plugin-sonarjs":"^3.0.5","fast-check":"^4.5.3",globals:"^16.5.0","node-pty":"^1.0.0",tsx:"^4.19.2",typescript:"^5.7.2","typescript-eslint":"^8.46.4",vitest:"^4.0.16"}}});var Rr={};Lo(Rr,{DEFAULT_API_URL:()=>X});module.exports=No(Rr);var cn=b(ln(),1),{program:Vr,createCommand:Mr,createArgument:qr,createOption:Wr,CommanderError:zr,InvalidArgumentError:Jr,InvalidOptionArgumentError:Yr,Command:I,Argument:Kr,Option:Qr,Help:Xr}=cn.default;var Ao=b(pn(),1),bo=b(require("https"),1),M=require("fs"),qt=require("path"),wo=require("os");var gn=(t=0)=>e=>`\x1B[${e+t}m`,Fn=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Cn=(t=0)=>(e,n,o)=>`\x1B[${38+t};2;${e};${n};${o}m`,C={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]}},ni=Object.keys(C.modifier),ds=Object.keys(C.color),hs=Object.keys(C.bgColor),oi=[...ds,...hs];function Ds(){let t=new Map;for(let[e,n]of Object.entries(C)){for(let[o,s]of Object.entries(n))C[o]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[o]=C[o],t.set(s[0],s[1]);Object.defineProperty(C,e,{value:n,enumerable:!1})}return Object.defineProperty(C,"codes",{value:t,enumerable:!1}),C.color.close="\x1B[39m",C.bgColor.close="\x1B[49m",C.color.ansi=gn(),C.color.ansi256=Fn(),C.color.ansi16m=Cn(),C.bgColor.ansi=gn(10),C.bgColor.ansi256=Fn(10),C.bgColor.ansi16m=Cn(10),Object.defineProperties(C,{rgbToAnsi256:{value(e,n,o){return e===n&&n===o?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(e){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[o]=n;o.length===3&&(o=[...o].map(r=>r+r).join(""));let s=Number.parseInt(o,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:e=>C.rgbToAnsi256(...C.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,o,s;if(e>=232)n=((e-232)*10+8)/255,o=n,s=n;else{e-=16;let u=e%36;n=Math.floor(e/36)/5,o=Math.floor(u/6)/5,s=u%6/5}let r=Math.max(n,o,s)*2;if(r===0)return 30;let a=30+(Math.round(s)<<2|Math.round(o)<<1|Math.round(n));return r===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,n,o)=>C.ansi256ToAnsi(C.rgbToAnsi256(e,n,o)),enumerable:!1},hexToAnsi:{value:e=>C.ansi256ToAnsi(C.hexToAnsi256(e)),enumerable:!1}}),C}var ms=Ds(),N=ms;var Ee=b(require("node:process"),1),En=b(require("node:os"),1),ot=b(require("node:tty"),1);function B(t,e=globalThis.Deno?globalThis.Deno.args:Ee.default.argv){let n=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(n+t),s=e.indexOf("--");return o!==-1&&(s===-1||o<s)}var{env:y}=Ee.default,ye;B("no-color")||B("no-colors")||B("color=false")||B("color=never")?ye=0:(B("color")||B("colors")||B("color=true")||B("color=always"))&&(ye=1);function ps(){if("FORCE_COLOR"in y)return y.FORCE_COLOR==="true"?1:y.FORCE_COLOR==="false"?0:y.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(y.FORCE_COLOR,10),3)}function gs(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Fs(t,{streamIsTTY:e,sniffFlags:n=!0}={}){let o=ps();o!==void 0&&(ye=o);let s=n?ye:o;if(s===0)return 0;if(n){if(B("color=16m")||B("color=full")||B("color=truecolor"))return 3;if(B("color=256"))return 2}if("TF_BUILD"in y&&"AGENT_NAME"in y)return 1;if(t&&!e&&s===void 0)return 0;let r=s||0;if(y.TERM==="dumb")return r;if(Ee.default.platform==="win32"){let a=En.default.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in y)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in y)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in y)||y.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in y)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(y.TEAMCITY_VERSION)?1:0;if(y.COLORTERM==="truecolor"||y.TERM==="xterm-kitty"||y.TERM==="xterm-ghostty"||y.TERM==="wezterm")return 3;if("TERM_PROGRAM"in y){let a=Number.parseInt((y.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(y.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(y.TERM)||"COLORTERM"in y?1:r}function yn(t,e={}){let n=Fs(t,{streamIsTTY:t&&t.isTTY,...e});return gs(n)}var Cs={stdout:yn({isTTY:ot.default.isatty(1)}),stderr:yn({isTTY:ot.default.isatty(2)})},_n=Cs;function vn(t,e,n){let o=t.indexOf(e);if(o===-1)return t;let s=e.length,r=0,a="";do a+=t.slice(r,o)+e+n,r=o+s,o=t.indexOf(e,r);while(o!==-1);return a+=t.slice(r),a}function An(t,e,n,o){let s=0,r="";do{let a=t[o-1]==="\r";r+=t.slice(s,a?o-1:o)+e+(a?`\r
|
|
27
27
|
`:`
|
|
28
28
|
`)+n,s=o+1,o=t.indexOf(`
|
|
29
|
-
`,s)}while(o!==-1);return r+=t.slice(s),r}var{stdout:
|
|
30
|
-
`);return r!==-1&&(e=Sn(e,s,o,r)),o+e+s};Object.defineProperties(ie.prototype,Q);var Ss=ie(),di=ie({level:On?On.level:0});var i=Ss;var qn=require("crypto");var $=require("fs"),In=require("os"),X=require("path"),Bn=require("url"),Os={},ct=(0,X.join)((0,In.homedir)(),".gal"),we=(0,X.join)(ct,"config.json"),ks={development:"http://localhost:3000",staging:"https://gal-api-wug5dzqj2a-uc.a.run.app",production:"https://api.gal.run"};function Tn(){let t=process.env.GAL_ENV?.toLowerCase();if(t==="development"||t==="dev"||t==="local")return"development";if(t==="staging"||t==="stg"||t==="beta")return"staging";if(t==="production"||t==="prod")return"production";if(process.argv[1]?.includes("tsx")||process.argv[1]?.includes("ts-node")||process.argv[1]?.endsWith(".ts")||process.env.npm_lifecycle_event==="dev"||process.env.NODE_ENV==="development")return"development";try{let n="0.1.13-alpha.pr416";if(n&&(n.includes("-beta")||n.includes("-rc")||n.includes("-alpha")))return"staging";if(!n||n==="0.0.0-dev"){let o=(0,Bn.fileURLToPath)(Os.url),s=(0,X.dirname)(o),r=(0,X.join)(s,"..","package.json");if((0,$.existsSync)(r)){let u=JSON.parse((0,$.readFileSync)(r,"utf-8")).version||"";if(u.includes("-beta")||u.includes("-rc")||u.includes("-alpha"))return"staging"}}}catch{}return"production"}var C=class{static getEnvironment(){return Tn()}static load(){let e=Tn(),n=ks[e];if(!(0,$.existsSync)(we))return{apiUrl:n};try{let o=(0,$.readFileSync)(we,"utf-8"),s=JSON.parse(o);return s.apiUrl||(s.apiUrl=n),e!=="development"&&s.apiUrl.includes("localhost")&&(s.apiUrl=n),s}catch(o){return console.error("Error loading config:",o),{apiUrl:n}}}static save(e){(0,$.existsSync)(ct)||(0,$.mkdirSync)(ct,{recursive:!0}),(0,$.writeFileSync)(we,JSON.stringify(e,null,2),"utf-8")}static set(e,n){let o=this.load();o[e]=n,this.save(o)}static get(e){return this.load()[e]}static getConfigPath(){return we}};var U=require("fs"),ft=require("path"),Ln=require("os"),Rn=require("crypto"),dt=(0,ft.join)((0,Ln.homedir)(),".gal"),Se=(0,ft.join)(dt,"installation-id");function Nn(){try{if((0,U.existsSync)(Se)){let e=(0,U.readFileSync)(Se,"utf-8").trim();if(e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e))return e}}catch{}let t=(0,Rn.randomUUID)();try{(0,U.existsSync)(dt)||(0,U.mkdirSync)(dt,{recursive:!0}),(0,U.writeFileSync)(Se,t,"utf-8")}catch{}return t}function Pn(){return!(0,U.existsSync)(Se)}var x=require("fs"),xe=require("path"),Gn=require("os"),ke=(0,xe.join)((0,Gn.homedir)(),".gal"),ae=(0,xe.join)(ke,"telemetry-queue.json"),ht=(0,xe.join)(ke,"telemetry-pending-events.json"),$n=100,xs=7,Ts=xs*24*60*60*1e3,Oe=class{queue=[];flushCallback=null;constructor(){this.loadOfflineQueue(),this.loadPendingEvents()}setFlushCallback(e){this.flushCallback=e}async addEvent(e){let n={...e,queuedAt:Date.now()};this.queue.push(n),this.queue.length>=$n&&await this.flush()}async flush(){if(this.queue.length===0)return;if(!this.flushCallback){this.saveOfflineQueue();return}if(this.pruneExpiredEvents(),this.queue.length===0)return;let e=this.queue.slice(0,$n),n=e.map(({queuedAt:o,...s})=>s);try{await this.flushCallback(n)?(this.queue=this.queue.slice(e.length),this.queue.length>0?this.saveOfflineQueue():this.clearOfflineQueue()):this.saveOfflineQueue()}catch{this.saveOfflineQueue()}}getQueueLength(){return this.queue.length}loadOfflineQueue(){try{if((0,x.existsSync)(ae)){let e=(0,x.readFileSync)(ae,"utf-8"),n=JSON.parse(e);Array.isArray(n)&&(this.queue=n,this.pruneExpiredEvents())}}catch{}}loadPendingEvents(){try{if((0,x.existsSync)(ht)){let e=(0,x.readFileSync)(ht,"utf-8"),n=JSON.parse(e);if(Array.isArray(n))for(let o of n)o.queuedAt||(o.queuedAt=Date.now()),this.queue.push(o);(0,x.writeFileSync)(ht,"[]","utf-8")}}catch{}}saveOfflineQueue(){try{(0,x.existsSync)(ke)||(0,x.mkdirSync)(ke,{recursive:!0}),(0,x.writeFileSync)(ae,JSON.stringify(this.queue),"utf-8")}catch{}}clearOfflineQueue(){try{(0,x.existsSync)(ae)&&(0,x.writeFileSync)(ae,"[]","utf-8")}catch{}}pruneExpiredEvents(){let e=Date.now();this.queue=this.queue.filter(n=>e-n.queuedAt<Ts)}};var Te=class{baseUrl;constructor(e){this.baseUrl=e}async sendEvents(e){if(e.length===0)return!0;try{let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),s=await fetch(`${this.baseUrl}/telemetry/events`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({events:e}),signal:n.signal});return clearTimeout(o),s.ok?(await s.json()).accepted===!0:s.status===202}catch{return!1}}async sendFeedback(e,n){try{let o=new AbortController,s=setTimeout(()=>o.abort(),5e3),r={"Content-Type":"application/json"};n&&(r.Authorization=`Bearer ${n}`);let a=await fetch(`${this.baseUrl}/telemetry/feedback`,{method:"POST",headers:r,body:JSON.stringify(e),signal:o.signal});return clearTimeout(s),a.ok?(await a.json()).accepted===!0:a.status===202}catch{return!1}}setBaseUrl(e){this.baseUrl=e}};var mt=A(require("readline"),1);var jn=0;function Dt(){jn++}async function ue(t,e){if(!Ft()||!process.stdin.isTTY||!process.stdout.isTTY||!Un("error"))return;let n=mt.createInterface({input:process.stdin,output:process.stdout}),o=s=>new Promise(r=>{n.question(s,r)});try{console.log(),console.log(i.yellow("\u2501".repeat(50))),console.log(i.yellow(" Help us improve GAL CLI")),console.log(i.yellow("\u2501".repeat(50))),console.log();let s=await o(i.dim("Would you like to report this error? (y/N): "));if(s.toLowerCase()!=="y"&&s.toLowerCase()!=="yes"){n.close();return}let r=await o(i.dim("Any additional context? (press Enter to skip): "));n.close(),await gt(1,r||`Error in ${t}: ${e.message}`,{command:t,errorType:e.name,errorMessage:e.message.substring(0,200)})&&console.log(i.green("\u2713 Thanks for your feedback!")),Mn("error")}catch{n.close()}}async function pt(){if(!Ft()||!process.stdin.isTTY||!process.stdout.isTTY||jn<10||!Un("session"))return;let t=mt.createInterface({input:process.stdin,output:process.stdout}),e=n=>new Promise(o=>{t.question(n,o)});try{console.log(),console.log(i.blue("\u2501".repeat(50))),console.log(i.blue(" Quick feedback (1 question)")),console.log(i.blue("\u2501".repeat(50))),console.log();let n=await e(i.dim("How would you rate GAL CLI? (1-5, or press Enter to skip): "));if(!n){t.close();return}let o=parseInt(n,10);if(isNaN(o)||o<1||o>5){console.log(i.dim("Invalid rating, skipping...")),t.close();return}let s;o<=3&&(s=await e(i.dim("What could we improve? (press Enter to skip): "))),t.close(),await gt(o,s||void 0,{command:"session_feedback"})&&console.log(i.green("\u2713 Thanks for your feedback!")),Mn("session")}catch{t.close()}}function Un(t){try{let e=C.load(),n=Date.now(),o=24*60*60*1e3,s=7*o;if(t==="error"){let r=e.lastErrorFeedback||0;return n-r>o}else{let r=e.lastSessionFeedback||0;return n-r>s}}catch{return!0}}function Mn(t){try{let e=t==="error"?"lastErrorFeedback":"lastSessionFeedback";C.set(e,Date.now())}catch{}}var Hn="0.1.13-alpha.pr416",W=null,Vn=!1;function yt(){let t=process.env.GAL_TELEMETRY?.toLowerCase();if(t==="false"||t==="0"||t==="no"||t==="off")return!0;try{if(C.load().telemetry===!1)return!0}catch{}return!1}var Ct=class{queue;client;installationId;exitHandlersRegistered=!1;constructor(e){this.installationId=Nn(),this.queue=new Oe,this.client=new Te(e),this.queue.setFlushCallback(n=>this.client.sendEvents(n)),this.registerExitHandlers()}async trackEvent(e,n){let o={id:(0,qn.randomUUID)(),installationId:this.installationId,timestamp:new Date().toISOString(),eventType:e,payload:{...n,cliVersion:Hn,platform:process.platform,nodeVersion:process.version}};await this.queue.addEvent(o)}async flush(){await this.queue.flush()}async sendFeedback(e,n,o){let s={installationId:this.installationId,rating:e,comment:n,context:{...o,cliVersion:Hn,platform:process.platform}},r=C.load();return this.client.sendFeedback(s,r.authToken)}registerExitHandlers(){if(this.exitHandlersRegistered)return;let e=async()=>{await this.flush()};process.on("beforeExit",e),process.on("SIGINT",async()=>{await e(),process.exit(130)}),process.on("SIGTERM",async()=>{await e(),process.exit(143)}),this.exitHandlersRegistered=!0}};function Wn(){if(Vn||(Vn=!0,yt()))return;let e=C.load().apiUrl||"https://api.gal.run";W=new Ct(e)}function Jn(){if(!(yt()||C.load().telemetryNoticeShown)){if(!Pn()){C.set("telemetryNoticeShown","true");return}console.log(i.blue("\u2501".repeat(60))),console.log(i.blue.bold(" GAL CLI Telemetry")),console.log(i.blue("\u2501".repeat(60))),console.log(),console.log(" GAL collects anonymous usage data to improve the CLI."),console.log(" This helps us diagnose issues and understand which"),console.log(" features are most valuable to developers."),console.log(),console.log(i.dim(" No personal information or code is collected.")),console.log(),console.log(" To opt out:"),console.log(i.cyan(" gal config set telemetry false")),console.log(" Or set environment variable:"),console.log(i.cyan(" export GAL_TELEMETRY=false")),console.log(),console.log(i.blue("\u2501".repeat(60))),console.log(),C.set("telemetryNoticeShown","true")}}function Et(t,e){W&&W.trackEvent("auth_login",{success:t,errorType:e?e.name:void 0})}function _t(t,e,n){W&&W.trackEvent("sync_pull",{filesTracked:t,success:e,syncAgeHours:n})}async function gt(t,e,n){return W?W.sendFeedback(t,e,n):!1}function Ft(){return!yt()&&W!==null}var fe=A(require("node:process"),1);var xt=A(require("node:process"),1);var le=A(require("node:process"),1);var Is=(t,e,n,o)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let s=Object.getOwnPropertyDescriptor(t,n),r=Object.getOwnPropertyDescriptor(e,n);!Bs(s,r)&&o||Object.defineProperty(t,n,r)},Bs=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},Ls=(t,e)=>{let n=Object.getPrototypeOf(e);n!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,n)},Rs=(t,e)=>`/* Wrapped ${t}*/
|
|
31
|
-
${e}`,Ns=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Ps=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),$s=(t,e,n)=>{let o=n===""?"":`with ${n.trim()}() `,s=Rs.bind(null,o,e.toString());Object.defineProperty(s,"name",Ps);let{writable:r,enumerable:a,configurable:u}=Ns;Object.defineProperty(t,"toString",{value:s,writable:r,enumerable:a,configurable:u})};function vt(t,e,{ignoreNonConfigurable:n=!1}={}){let{name:o}=t;for(let s of Reflect.ownKeys(e))Is(t,e,s,n);return Ls(t,e),$s(t,e,o),t}var Ie=new WeakMap,zn=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let n,o=0,s=t.displayName||t.name||"<anonymous>",r=function(...a){if(Ie.set(r,++o),o===1)n=t.apply(this,a),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return n};return vt(r,t),Ie.set(r,o),r};zn.callCount=t=>{if(!Ie.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Ie.get(t)};var Yn=zn;var J=[];J.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&J.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&J.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Be=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",At=Symbol.for("signal-exit emitter"),bt=globalThis,Gs=Object.defineProperty.bind(Object),wt=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(bt[At])return bt[At];Gs(bt,At,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,n){this.listeners[e].push(n)}removeListener(e,n){let o=this.listeners[e],s=o.indexOf(n);s!==-1&&(s===0&&o.length===1?o.length=0:o.splice(s,1))}emit(e,n,o){if(this.emitted[e])return!1;this.emitted[e]=!0;let s=!1;for(let r of this.listeners[e])s=r(n,o)===!0||s;return e==="exit"&&(s=this.emit("afterExit",n,o)||s),s}},Le=class{},js=t=>({onExit(e,n){return t.onExit(e,n)},load(){return t.load()},unload(){return t.unload()}}),St=class extends Le{onExit(){return()=>{}}load(){}unload(){}},kt=class extends Le{#i=Ot.platform==="win32"?"SIGINT":"SIGHUP";#n=new wt;#e;#s;#f;#t={};#r=!1;constructor(e){super(),this.#e=e,this.#t={};for(let n of J)this.#t[n]=()=>{let o=this.#e.listeners(n),{count:s}=this.#n,r=e;if(typeof r.__signal_exit_emitter__=="object"&&typeof r.__signal_exit_emitter__.count=="number"&&(s+=r.__signal_exit_emitter__.count),o.length===s){this.unload();let a=this.#n.emit("exit",null,n),u=n==="SIGHUP"?this.#i:n;a||e.kill(e.pid,u)}};this.#f=e.reallyExit,this.#s=e.emit}onExit(e,n){if(!Be(this.#e))return()=>{};this.#r===!1&&this.load();let o=n?.alwaysLast?"afterExit":"exit";return this.#n.on(o,e),()=>{this.#n.removeListener(o,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#r){this.#r=!0,this.#n.count+=1;for(let e of J)try{let n=this.#t[e];n&&this.#e.on(e,n)}catch{}this.#e.emit=(e,...n)=>this.#h(e,...n),this.#e.reallyExit=e=>this.#o(e)}}unload(){this.#r&&(this.#r=!1,J.forEach(e=>{let n=this.#t[e];if(!n)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,n)}catch{}}),this.#e.emit=this.#s,this.#e.reallyExit=this.#f,this.#n.count-=1)}#o(e){return Be(this.#e)?(this.#e.exitCode=e||0,this.#n.emit("exit",this.#e.exitCode,null),this.#f.call(this.#e,this.#e.exitCode)):0}#h(e,...n){let o=this.#s;if(e==="exit"&&Be(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let s=o.call(this.#e,e,...n);return this.#n.emit("exit",this.#e.exitCode,null),s}else return o.call(this.#e,e,...n)}},Ot=globalThis.process,{onExit:Kn,load:Li,unload:Ri}=js(Be(Ot)?new kt(Ot):new St);var Qn=le.default.stderr.isTTY?le.default.stderr:le.default.stdout.isTTY?le.default.stdout:void 0,Us=Qn?Yn(()=>{Kn(()=>{Qn.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Xn=Us;var Re=!1,Z={};Z.show=(t=xt.default.stderr)=>{t.isTTY&&(Re=!1,t.write("\x1B[?25h"))};Z.hide=(t=xt.default.stderr)=>{t.isTTY&&(Xn(),Re=!0,t.write("\x1B[?25l"))};Z.toggle=(t,e)=>{t!==void 0&&(Re=t),Re?Z.show(e):Z.hide(e)};var Tt=Z;var he=A(It(),1);var N=A(require("node:process"),1);function Bt(){return N.default.platform!=="win32"?N.default.env.TERM!=="linux":!!N.default.env.CI||!!N.default.env.WT_SESSION||!!N.default.env.TERMINUS_SUBLIME||N.default.env.ConEmuTask==="{cmd::Cmder}"||N.default.env.TERM_PROGRAM==="Terminus-Sublime"||N.default.env.TERM_PROGRAM==="vscode"||N.default.env.TERM==="xterm-256color"||N.default.env.TERM==="alacritty"||N.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Hs={info:i.blue("\u2139"),success:i.green("\u2714"),warning:i.yellow("\u26A0"),error:i.red("\u2716")},Vs={info:i.blue("i"),success:i.green("\u221A"),warning:i.yellow("\u203C"),error:i.red("\xD7")},qs=Bt()?Hs:Vs,ce=qs;function Lt({onlyFirst:t=!1}={}){let s="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(s,t?void 0:"g")}var Ws=Lt();function de(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Ws,"")}function no(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function oo(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function so(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function Js(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function ro(t,{ambiguousAsWide:e=!1}={}){return Js(t),oo(t)||so(t)||e&&no(t)?2:1}var uo=A(ao(),1),zs=new Intl.Segmenter,Ys=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Rt(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:o=!1}=e;if(o||(t=de(t)),t.length===0)return 0;let s=0,r={ambiguousAsWide:!n};for(let{segment:a}of zs.segment(t)){let u=a.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!Ys.test(a)){if((0,uo.default)().test(a)){s+=2;continue}s+=ro(u,r)}}return s}function Nt({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Pt=A(require("node:process"),1);function $t(){let{env:t}=Pt.default,{TERM:e,TERM_PROGRAM:n}=t;return Pt.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var G=A(require("node:process"),1),Ks=3,Gt=class{#i=0;start(){this.#i++,this.#i===1&&this.#n()}stop(){if(this.#i<=0)throw new Error("`stop` called more times than `start`");this.#i--,this.#i===0&&this.#e()}#n(){G.default.platform==="win32"||!G.default.stdin.isTTY||(G.default.stdin.setRawMode(!0),G.default.stdin.on("data",this.#s),G.default.stdin.resume())}#e(){G.default.stdin.isTTY&&(G.default.stdin.off("data",this.#s),G.default.stdin.pause(),G.default.stdin.setRawMode(!1))}#s(e){e[0]===Ks&&G.default.emit("SIGINT")}},Qs=new Gt,jt=Qs;var Xs=A(It(),1),Ut=class{#i=0;#n=!1;#e=0;#s=-1;#f=0;#t;#r;#o;#h;#D;#l;#c;#d;#p;#a;#u;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:fe.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#D=this.#t.interval,this.#o=this.#t.stream,this.#l=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Nt({stream:this.#o}),this.#c=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,fe.default.env.NODE_ENV==="test"&&(this._stream=this.#o,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#i},set(n){this.#i=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#s}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=e,this.#m()}get interval(){return this.#D??this.#r.interval??100}get spinner(){return this.#r}set spinner(e){if(this.#s=-1,this.#D=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#r=e}else if(!$t())this.#r=he.default.line;else if(e===void 0)this.#r=he.default.dots;else if(e!=="default"&&he.default[e])this.#r=he.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#p}set text(e=""){this.#p=e,this.#m()}get prefixText(){return this.#a}set prefixText(e=""){this.#a=e,this.#m()}get suffixText(){return this.#u}set suffixText(e=""){this.#u=e,this.#m()}get isSpinning(){return this.#h!==void 0}#g(e=this.#a,n=" "){return typeof e=="string"&&e!==""?e+n:typeof e=="function"?e()+n:""}#F(e=this.#u,n=" "){return typeof e=="string"&&e!==""?n+e:typeof e=="function"?n+e():""}#m(){let e=this.#o.columns??80,n=this.#g(this.#a,"-"),o=this.#F(this.#u,"-"),s=" ".repeat(this.#d)+n+"--"+this.#p+"--"+o;this.#e=0;for(let r of de(s).split(`
|
|
32
|
-
`))this.#e+=Math.max(1,Math.ceil(
|
|
33
|
-
`),this)}stop(){return this.#l?(clearInterval(this.#h),this.#h=void 0,this.#s=0,this.clear(),this.#t.hideCursor&&
|
|
34
|
-
`;return this.stop(),this.#o.write(c),this}};function
|
|
29
|
+
`,s)}while(o!==-1);return r+=t.slice(s),r}var{stdout:bn,stderr:wn}=_n,st=Symbol("GENERATOR"),J=Symbol("STYLER"),oe=Symbol("IS_EMPTY"),Sn=["ansi","ansi","ansi256","ansi16m"],Y=Object.create(null),ys=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=bn?bn.level:0;t.level=e.level===void 0?n:e.level};var Es=t=>{let e=(...n)=>n.join(" ");return ys(e,t),Object.setPrototypeOf(e,se.prototype),e};function se(t){return Es(t)}Object.setPrototypeOf(se.prototype,Function.prototype);for(let[t,e]of Object.entries(N))Y[t]={get(){let n=_e(this,it(e.open,e.close,this[J]),this[oe]);return Object.defineProperty(this,t,{value:n}),n}};Y.visible={get(){let t=_e(this,this[J],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var rt=(t,e,n,...o)=>t==="rgb"?e==="ansi16m"?N[n].ansi16m(...o):e==="ansi256"?N[n].ansi256(N.rgbToAnsi256(...o)):N[n].ansi(N.rgbToAnsi(...o)):t==="hex"?rt("rgb",e,n,...N.hexToRgb(...o)):N[n][t](...o),_s=["rgb","hex","ansi256"];for(let t of _s){Y[t]={get(){let{level:n}=this;return function(...o){let s=it(rt(t,Sn[n],"color",...o),N.color.close,this[J]);return _e(this,s,this[oe])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Y[e]={get(){let{level:n}=this;return function(...o){let s=it(rt(t,Sn[n],"bgColor",...o),N.bgColor.close,this[J]);return _e(this,s,this[oe])}}}}var vs=Object.defineProperties(()=>{},{...Y,level:{enumerable:!0,get(){return this[st].level},set(t){this[st].level=t}}}),it=(t,e,n)=>{let o,s;return n===void 0?(o=t,s=e):(o=n.openAll+t,s=e+n.closeAll),{open:t,close:e,openAll:o,closeAll:s,parent:n}},_e=(t,e,n)=>{let o=(...s)=>As(o,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(o,vs),o[st]=t,o[J]=e,o[oe]=n,o},As=(t,e)=>{if(t.level<=0||!e)return t[oe]?"":e;let n=t[J];if(n===void 0)return e;let{openAll:o,closeAll:s}=n;if(e.includes("\x1B"))for(;n!==void 0;)e=vn(e,n.close,n.open),n=n.parent;let r=e.indexOf(`
|
|
30
|
+
`);return r!==-1&&(e=An(e,s,o,r)),o+e+s};Object.defineProperties(se.prototype,Y);var bs=se(),ci=se({level:wn?wn.level:0});var i=bs;var Un=require("crypto"),Hn=b(require("os"),1);var $=require("fs"),On=require("os"),K=require("path"),xn=require("url"),Ss={},at=(0,K.join)((0,On.homedir)(),".gal"),ve=(0,K.join)(at,"config.json"),ws={development:"http://localhost:3000",staging:"https://gal-api-wug5dzqj2a-uc.a.run.app",production:"https://api.gal.run"};function kn(){let t=process.env.GAL_ENV?.toLowerCase();if(t==="development"||t==="dev"||t==="local")return"development";if(t==="staging"||t==="stg"||t==="beta")return"staging";if(t==="production"||t==="prod")return"production";if(process.argv[1]?.includes("tsx")||process.argv[1]?.includes("ts-node")||process.argv[1]?.endsWith(".ts")||process.env.npm_lifecycle_event==="dev"||process.env.NODE_ENV==="development")return"development";try{let n="0.1.13-alpha.pr459";if(n&&(n.includes("-beta")||n.includes("-rc")||n.includes("-alpha")))return"staging";if(!n||n==="0.0.0-dev"){let o=(0,xn.fileURLToPath)(Ss.url),s=(0,K.dirname)(o),r=(0,K.join)(s,"..","package.json");if((0,$.existsSync)(r)){let u=JSON.parse((0,$.readFileSync)(r,"utf-8")).version||"";if(u.includes("-beta")||u.includes("-rc")||u.includes("-alpha"))return"staging"}}}catch{}return"production"}var F=class{static getEnvironment(){return kn()}static load(){let e=kn(),n=ws[e];if(!(0,$.existsSync)(ve))return{apiUrl:n};try{let o=(0,$.readFileSync)(ve,"utf-8"),s=JSON.parse(o);return s.apiUrl||(s.apiUrl=n),e!=="development"&&s.apiUrl.includes("localhost")&&(s.apiUrl=n),s}catch(o){return console.error("Error loading config:",o),{apiUrl:n}}}static save(e){(0,$.existsSync)(at)||(0,$.mkdirSync)(at,{recursive:!0}),(0,$.writeFileSync)(ve,JSON.stringify(e,null,2),"utf-8")}static set(e,n){let o=this.load();o[e]=n,this.save(o)}static get(e){return this.load()[e]}static getConfigPath(){return ve}};var j=require("fs"),lt=require("path"),Tn=require("os"),In=require("crypto"),ut=(0,lt.join)((0,Tn.homedir)(),".gal"),Ae=(0,lt.join)(ut,"installation-id");function Bn(){try{if((0,j.existsSync)(Ae)){let e=(0,j.readFileSync)(Ae,"utf-8").trim();if(e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e))return e}}catch{}let t=(0,In.randomUUID)();try{(0,j.existsSync)(ut)||(0,j.mkdirSync)(ut,{recursive:!0}),(0,j.writeFileSync)(Ae,t,"utf-8")}catch{}return t}function Rn(){return!(0,j.existsSync)(Ae)}var O=require("fs"),Se=require("path"),Nn=require("os"),be=(0,Se.join)((0,Nn.homedir)(),".gal"),re=(0,Se.join)(be,"telemetry-queue.json"),ct=(0,Se.join)(be,"telemetry-pending-events.json"),Ln=100,ks=7,Os=ks*24*60*60*1e3,we=class{queue=[];flushCallback=null;constructor(){this.loadOfflineQueue(),this.loadPendingEvents()}setFlushCallback(e){this.flushCallback=e}async addEvent(e){let n={event:e,queuedAt:Date.now()};this.queue.push(n),this.queue.length>=Ln&&await this.flush()}async flush(){if(this.queue.length===0)return;if(!this.flushCallback){this.saveOfflineQueue();return}if(this.pruneExpiredEvents(),this.queue.length===0)return;let e=this.queue.slice(0,Ln),n=e.map(o=>o.event);try{await this.flushCallback(n)?(this.queue=this.queue.slice(e.length),this.queue.length>0?this.saveOfflineQueue():this.clearOfflineQueue()):this.saveOfflineQueue()}catch{this.saveOfflineQueue()}}getQueueLength(){return this.queue.length}loadOfflineQueue(){try{if((0,O.existsSync)(re)){let e=(0,O.readFileSync)(re,"utf-8"),n=JSON.parse(e);Array.isArray(n)&&(this.queue=n.map(o=>"event"in o&&"queuedAt"in o?o:{event:this.upgradeOldEvent(o),queuedAt:o.queuedAt||Date.now()}),this.pruneExpiredEvents())}}catch{}}upgradeOldEvent(e){let n=e.payload||{};return{id:e.id||"",timestamp:e.timestamp||new Date().toISOString(),severity:n.success===!1?"ERROR":"INFO",resource:{"service.name":"gal-cli","service.version":n.cliVersion||"unknown","host.os":n.platform||"linux","host.arch":"x64","process.runtime.version":n.nodeVersion},eventType:e.eventType||"cli_command",attributes:{command:n.command??null,success:n.success??null,error_type:n.errorType??null,duration_ms:n.durationMs??null,notification_type:n.notificationType??null,rate_limit_hit:n.rateLimitHit??null,sync_age_hours:n.syncAgeHours??null,files_synced:n.filesTracked??null},installationId:e.installationId||""}}loadPendingEvents(){try{if((0,O.existsSync)(ct)){let e=(0,O.readFileSync)(ct,"utf-8"),n=JSON.parse(e);if(Array.isArray(n))for(let o of n){let s,r;"event"in o?(s=o.event,r=o.queuedAt||Date.now()):(s=this.upgradeOldEvent(o),r=o.queuedAt||Date.now()),this.queue.push({event:s,queuedAt:r})}(0,O.writeFileSync)(ct,"[]","utf-8")}}catch{}}saveOfflineQueue(){try{(0,O.existsSync)(be)||(0,O.mkdirSync)(be,{recursive:!0}),(0,O.writeFileSync)(re,JSON.stringify(this.queue),"utf-8")}catch{}}clearOfflineQueue(){try{(0,O.existsSync)(re)&&(0,O.writeFileSync)(re,"[]","utf-8")}catch{}}pruneExpiredEvents(){let e=Date.now();this.queue=this.queue.filter(n=>e-n.queuedAt<Os)}};var xs="v2",ke=class{baseUrl;constructor(e){this.baseUrl=e}async sendEvents(e){if(e.length===0)return!0;try{let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),s=await fetch(`${this.baseUrl}/telemetry/events`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({events:e,schemaVersion:xs}),signal:n.signal});return clearTimeout(o),s.ok?(await s.json()).accepted===!0:s.status===202}catch{return!1}}async sendFeedback(e,n){try{let o=new AbortController,s=setTimeout(()=>o.abort(),5e3),r={"Content-Type":"application/json"};n&&(r.Authorization=`Bearer ${n}`);let a=await fetch(`${this.baseUrl}/telemetry/feedback`,{method:"POST",headers:r,body:JSON.stringify(e),signal:o.signal});return clearTimeout(s),a.ok?(await a.json()).accepted===!0:a.status===202}catch{return!1}}setBaseUrl(e){this.baseUrl=e}};var ft=b(require("readline"),1);var $n=0;function dt(){$n++}async function ie(t,e){if(!mt()||!process.stdin.isTTY||!process.stdout.isTTY||!Pn("error"))return;let n=ft.createInterface({input:process.stdin,output:process.stdout}),o=s=>new Promise(r=>{n.question(s,r)});try{console.log(),console.log(i.yellow("\u2501".repeat(50))),console.log(i.yellow(" Help us improve GAL CLI")),console.log(i.yellow("\u2501".repeat(50))),console.log();let s=await o(i.dim("Would you like to report this error? (y/N): "));if(s.toLowerCase()!=="y"&&s.toLowerCase()!=="yes"){n.close();return}let r=await o(i.dim("Any additional context? (press Enter to skip): "));n.close(),await Dt(1,r||`Error in ${t}: ${e.message}`,{command:t,errorType:e.name,errorMessage:e.message.substring(0,200)})&&console.log(i.green("\u2713 Thanks for your feedback!")),Gn("error")}catch{n.close()}}async function ht(){if(!mt()||!process.stdin.isTTY||!process.stdout.isTTY||$n<10||!Pn("session"))return;let t=ft.createInterface({input:process.stdin,output:process.stdout}),e=n=>new Promise(o=>{t.question(n,o)});try{console.log(),console.log(i.blue("\u2501".repeat(50))),console.log(i.blue(" Quick feedback (1 question)")),console.log(i.blue("\u2501".repeat(50))),console.log();let n=await e(i.dim("How would you rate GAL CLI? (1-5, or press Enter to skip): "));if(!n){t.close();return}let o=parseInt(n,10);if(isNaN(o)||o<1||o>5){console.log(i.dim("Invalid rating, skipping...")),t.close();return}let s;o<=3&&(s=await e(i.dim("What could we improve? (press Enter to skip): "))),t.close(),await Dt(o,s||void 0,{command:"session_feedback"})&&console.log(i.green("\u2713 Thanks for your feedback!")),Gn("session")}catch{t.close()}}function Pn(t){try{let e=F.load(),n=Date.now(),o=24*60*60*1e3,s=7*o;if(t==="error"){let r=e.lastErrorFeedback||0;return n-r>o}else{let r=e.lastSessionFeedback||0;return n-r>s}}catch{return!0}}function Gn(t){try{let e=t==="error"?"lastErrorFeedback":"lastSessionFeedback";F.set(e,Date.now())}catch{}}var Vn="0.1.13-alpha.pr459",q=null,jn=!1;function gt(){let t=process.env.GAL_TELEMETRY?.toLowerCase();if(t==="false"||t==="0"||t==="no"||t==="off")return!0;try{if(F.load().telemetry===!1)return!0}catch{}return!1}function Ts(){return{"service.name":"gal-cli","service.version":Vn,"host.os":process.platform,"host.arch":Hn.default.arch(),"process.runtime.version":process.version}}var pt=class{queue;client;installationId;resource;exitHandlersRegistered=!1;constructor(e){this.installationId=Bn(),this.resource=Ts(),this.queue=new we,this.client=new ke(e),this.queue.setFlushCallback(n=>this.client.sendEvents(n)),this.registerExitHandlers()}async trackEvent(e,n,o="INFO"){let s={id:(0,Un.randomUUID)(),timestamp:new Date().toISOString(),severity:o,resource:this.resource,eventType:e,attributes:n,installationId:this.installationId};await this.queue.addEvent(s)}async flush(){await this.queue.flush()}async sendFeedback(e,n,o){let s={installationId:this.installationId,rating:e,comment:n,context:{...o,cliVersion:Vn,platform:process.platform}},r=F.load();return this.client.sendFeedback(s,r.authToken)}registerExitHandlers(){if(this.exitHandlersRegistered)return;let e=async()=>{await this.flush()};process.on("beforeExit",e),process.on("SIGINT",async()=>{await e(),process.exit(130)}),process.on("SIGTERM",async()=>{await e(),process.exit(143)}),this.exitHandlersRegistered=!0}};function Mn(){if(jn||(jn=!0,gt()))return;let e=F.load().apiUrl||"https://api.gal.run";q=new pt(e)}function qn(){if(!(gt()||F.load().telemetryNoticeShown)){if(!Rn()){F.set("telemetryNoticeShown","true");return}console.log(i.blue("\u2501".repeat(60))),console.log(i.blue.bold(" GAL CLI Telemetry")),console.log(i.blue("\u2501".repeat(60))),console.log(),console.log(" GAL collects anonymous usage data to improve the CLI."),console.log(" This helps us diagnose issues and understand which"),console.log(" features are most valuable to developers."),console.log(),console.log(i.dim(" No personal information or code is collected.")),console.log(),console.log(" To opt out:"),console.log(i.cyan(" gal config set telemetry false")),console.log(" Or set environment variable:"),console.log(i.cyan(" export GAL_TELEMETRY=false")),console.log(),console.log(i.blue("\u2501".repeat(60))),console.log(),F.set("telemetryNoticeShown","true")}}function Ft(t,e){q&&q.trackEvent("auth_login",{success:t,error_type:e?e.name:null,auth_method:"github_oauth"},t?"INFO":"ERROR")}function Ct(t,e,n,o){q&&q.trackEvent("sync_pull",{files_synced:t,success:e,sync_age_hours:n??null,config_version:o??null},e?"INFO":"ERROR")}async function Dt(t,e,n){return q?q.sendFeedback(t,e,n):!1}function mt(){return!gt()&&q!==null}var ce=b(require("node:process"),1);var St=b(require("node:process"),1);var ae=b(require("node:process"),1);var Is=(t,e,n,o)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let s=Object.getOwnPropertyDescriptor(t,n),r=Object.getOwnPropertyDescriptor(e,n);!Bs(s,r)&&o||Object.defineProperty(t,n,r)},Bs=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},Rs=(t,e)=>{let n=Object.getPrototypeOf(e);n!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,n)},Ls=(t,e)=>`/* Wrapped ${t}*/
|
|
31
|
+
${e}`,Ns=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),$s=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ps=(t,e,n)=>{let o=n===""?"":`with ${n.trim()}() `,s=Ls.bind(null,o,e.toString());Object.defineProperty(s,"name",$s);let{writable:r,enumerable:a,configurable:u}=Ns;Object.defineProperty(t,"toString",{value:s,writable:r,enumerable:a,configurable:u})};function yt(t,e,{ignoreNonConfigurable:n=!1}={}){let{name:o}=t;for(let s of Reflect.ownKeys(e))Is(t,e,s,n);return Rs(t,e),Ps(t,e,o),t}var Oe=new WeakMap,Wn=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let n,o=0,s=t.displayName||t.name||"<anonymous>",r=function(...a){if(Oe.set(r,++o),o===1)n=t.apply(this,a),t=void 0;else if(e.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return n};return yt(r,t),Oe.set(r,o),r};Wn.callCount=t=>{if(!Oe.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Oe.get(t)};var zn=Wn;var W=[];W.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&W.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&W.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var xe=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",Et=Symbol.for("signal-exit emitter"),_t=globalThis,Gs=Object.defineProperty.bind(Object),vt=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(_t[Et])return _t[Et];Gs(_t,Et,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,n){this.listeners[e].push(n)}removeListener(e,n){let o=this.listeners[e],s=o.indexOf(n);s!==-1&&(s===0&&o.length===1?o.length=0:o.splice(s,1))}emit(e,n,o){if(this.emitted[e])return!1;this.emitted[e]=!0;let s=!1;for(let r of this.listeners[e])s=r(n,o)===!0||s;return e==="exit"&&(s=this.emit("afterExit",n,o)||s),s}},Te=class{},js=t=>({onExit(e,n){return t.onExit(e,n)},load(){return t.load()},unload(){return t.unload()}}),At=class extends Te{onExit(){return()=>{}}load(){}unload(){}},bt=class extends Te{#i=wt.platform==="win32"?"SIGINT":"SIGHUP";#n=new vt;#e;#s;#d;#t={};#r=!1;constructor(e){super(),this.#e=e,this.#t={};for(let n of W)this.#t[n]=()=>{let o=this.#e.listeners(n),{count:s}=this.#n,r=e;if(typeof r.__signal_exit_emitter__=="object"&&typeof r.__signal_exit_emitter__.count=="number"&&(s+=r.__signal_exit_emitter__.count),o.length===s){this.unload();let a=this.#n.emit("exit",null,n),u=n==="SIGHUP"?this.#i:n;a||e.kill(e.pid,u)}};this.#d=e.reallyExit,this.#s=e.emit}onExit(e,n){if(!xe(this.#e))return()=>{};this.#r===!1&&this.load();let o=n?.alwaysLast?"afterExit":"exit";return this.#n.on(o,e),()=>{this.#n.removeListener(o,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#r){this.#r=!0,this.#n.count+=1;for(let e of W)try{let n=this.#t[e];n&&this.#e.on(e,n)}catch{}this.#e.emit=(e,...n)=>this.#h(e,...n),this.#e.reallyExit=e=>this.#o(e)}}unload(){this.#r&&(this.#r=!1,W.forEach(e=>{let n=this.#t[e];if(!n)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,n)}catch{}}),this.#e.emit=this.#s,this.#e.reallyExit=this.#d,this.#n.count-=1)}#o(e){return xe(this.#e)?(this.#e.exitCode=e||0,this.#n.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#h(e,...n){let o=this.#s;if(e==="exit"&&xe(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let s=o.call(this.#e,e,...n);return this.#n.emit("exit",this.#e.exitCode,null),s}else return o.call(this.#e,e,...n)}},wt=globalThis.process,{onExit:Jn,load:Bi,unload:Ri}=js(xe(wt)?new bt(wt):new At);var Yn=ae.default.stderr.isTTY?ae.default.stderr:ae.default.stdout.isTTY?ae.default.stdout:void 0,Us=Yn?zn(()=>{Jn(()=>{Yn.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Kn=Us;var Ie=!1,Q={};Q.show=(t=St.default.stderr)=>{t.isTTY&&(Ie=!1,t.write("\x1B[?25h"))};Q.hide=(t=St.default.stderr)=>{t.isTTY&&(Kn(),Ie=!0,t.write("\x1B[?25l"))};Q.toggle=(t,e)=>{t!==void 0&&(Ie=t),Ie?Q.show(e):Q.hide(e)};var kt=Q;var fe=b(Ot(),1);var R=b(require("node:process"),1);function xt(){return R.default.platform!=="win32"?R.default.env.TERM!=="linux":!!R.default.env.CI||!!R.default.env.WT_SESSION||!!R.default.env.TERMINUS_SUBLIME||R.default.env.ConEmuTask==="{cmd::Cmder}"||R.default.env.TERM_PROGRAM==="Terminus-Sublime"||R.default.env.TERM_PROGRAM==="vscode"||R.default.env.TERM==="xterm-256color"||R.default.env.TERM==="alacritty"||R.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Vs={info:i.blue("\u2139"),success:i.green("\u2714"),warning:i.yellow("\u26A0"),error:i.red("\u2716")},Ms={info:i.blue("i"),success:i.green("\u221A"),warning:i.yellow("\u203C"),error:i.red("\xD7")},qs=xt()?Vs:Ms,ue=qs;function Tt({onlyFirst:t=!1}={}){let s="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(s,t?void 0:"g")}var Ws=Tt();function le(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Ws,"")}function eo(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function to(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function no(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function zs(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function oo(t,{ambiguousAsWide:e=!1}={}){return zs(t),to(t)||no(t)||e&&eo(t)?2:1}var io=b(ro(),1),Js=new Intl.Segmenter,Ys=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function It(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:o=!1}=e;if(o||(t=le(t)),t.length===0)return 0;let s=0,r={ambiguousAsWide:!n};for(let{segment:a}of Js.segment(t)){let u=a.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!Ys.test(a)){if((0,io.default)().test(a)){s+=2;continue}s+=oo(u,r)}}return s}function Bt({stream:t=process.stdout}={}){return!!(t&&t.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Rt=b(require("node:process"),1);function Lt(){let{env:t}=Rt.default,{TERM:e,TERM_PROGRAM:n}=t;return Rt.default.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var P=b(require("node:process"),1),Ks=3,Nt=class{#i=0;start(){this.#i++,this.#i===1&&this.#n()}stop(){if(this.#i<=0)throw new Error("`stop` called more times than `start`");this.#i--,this.#i===0&&this.#e()}#n(){P.default.platform==="win32"||!P.default.stdin.isTTY||(P.default.stdin.setRawMode(!0),P.default.stdin.on("data",this.#s),P.default.stdin.resume())}#e(){P.default.stdin.isTTY&&(P.default.stdin.off("data",this.#s),P.default.stdin.pause(),P.default.stdin.setRawMode(!1))}#s(e){e[0]===Ks&&P.default.emit("SIGINT")}},Qs=new Nt,$t=Qs;var Xs=b(Ot(),1),Pt=class{#i=0;#n=!1;#e=0;#s=-1;#d=0;#t;#r;#o;#h;#m;#l;#c;#f;#p;#a;#u;color;constructor(e){typeof e=="string"&&(e={text:e}),this.#t={color:"cyan",stream:ce.default.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#m=this.#t.interval,this.#o=this.#t.stream,this.#l=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:Bt({stream:this.#o}),this.#c=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,ce.default.env.NODE_ENV==="test"&&(this._stream=this.#o,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#i},set(n){this.#i=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#s}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#f}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#f=e,this.#D()}get interval(){return this.#m??this.#r.interval??100}get spinner(){return this.#r}set spinner(e){if(this.#s=-1,this.#m=void 0,typeof e=="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#r=e}else if(!Lt())this.#r=fe.default.line;else if(e===void 0)this.#r=fe.default.dots;else if(e!=="default"&&fe.default[e])this.#r=fe.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#p}set text(e=""){this.#p=e,this.#D()}get prefixText(){return this.#a}set prefixText(e=""){this.#a=e,this.#D()}get suffixText(){return this.#u}set suffixText(e=""){this.#u=e,this.#D()}get isSpinning(){return this.#h!==void 0}#g(e=this.#a,n=" "){return typeof e=="string"&&e!==""?e+n:typeof e=="function"?e()+n:""}#F(e=this.#u,n=" "){return typeof e=="string"&&e!==""?n+e:typeof e=="function"?n+e():""}#D(){let e=this.#o.columns??80,n=this.#g(this.#a,"-"),o=this.#F(this.#u,"-"),s=" ".repeat(this.#f)+n+"--"+this.#p+"--"+o;this.#e=0;for(let r of le(s).split(`
|
|
32
|
+
`))this.#e+=Math.max(1,Math.ceil(It(r,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#l&&!this.#c}set isEnabled(e){if(typeof e!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#l=e}get isSilent(){return this.#c}set isSilent(e){if(typeof e!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=e}frame(){let e=Date.now();(this.#s===-1||e-this.#d>=this.interval)&&(this.#s=++this.#s%this.#r.frames.length,this.#d=e);let{frames:n}=this.#r,o=n[this.#s];this.color&&(o=i[this.color](o));let s=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",r=typeof this.text=="string"?" "+this.text:"",a=typeof this.#u=="string"&&this.#u!==""?" "+this.#u:"";return s+o+r+a}clear(){if(!this.#l||!this.#o.isTTY)return this;this.#o.cursorTo(0);for(let e=0;e<this.#i;e++)e>0&&this.#o.moveCursor(0,-1),this.#o.clearLine(1);return(this.#f||this.lastIndent!==this.#f)&&this.#o.cursorTo(this.#f),this.lastIndent=this.#f,this.#i=0,this}render(){return this.#c?this:(this.clear(),this.#o.write(this.frame()),this.#i=this.#e,this)}start(e){return e&&(this.text=e),this.#c?this:this.#l?this.isSpinning?this:(this.#t.hideCursor&&kt.hide(this.#o),this.#t.discardStdin&&ce.default.stdin.isTTY&&(this.#n=!0,$t.start()),this.render(),this.#h=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#o.write(`- ${this.text}
|
|
33
|
+
`),this)}stop(){return this.#l?(clearInterval(this.#h),this.#h=void 0,this.#s=0,this.clear(),this.#t.hideCursor&&kt.show(this.#o),this.#t.discardStdin&&ce.default.stdin.isTTY&&this.#n&&($t.stop(),this.#n=!1),this):this}succeed(e){return this.stopAndPersist({symbol:ue.success,text:e})}fail(e){return this.stopAndPersist({symbol:ue.error,text:e})}warn(e){return this.stopAndPersist({symbol:ue.warning,text:e})}info(e){return this.stopAndPersist({symbol:ue.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let n=e.prefixText??this.#a,o=this.#g(n," "),s=e.symbol??" ",r=e.text??this.text,u=typeof r=="string"?(s?" ":"")+r:"",l=e.suffixText??this.#u,f=this.#F(l," "),c=o+s+u+f+`
|
|
34
|
+
`;return this.stop(),this.#o.write(c),this}};function L(t){return new Pt(t)}var co=require("http"),Re=require("child_process");var G=class{config;constructor(e){this.config=e}async getCurrentUser(){return(await(await this.fetch("/auth/me")).json()).user}async listOrganizations(){return(await(await this.fetch("/organizations")).json()).organizations}async getOrganization(e){return(await(await this.fetch(`/organizations/${e}`)).json()).organization}async scanOrganization(e){return await(await this.fetch(`/scan/${e}`,{method:"POST"})).json()}async downloadConfigs(e,n){let o=new URLSearchParams;n&&o.set("platform",n);let s=`/organizations/${e}/configs${o.toString()?"?"+o.toString():""}`;return(await(await this.fetch(s)).json()).configs.map(u=>({fileName:u.fileName,content:u.content,platform:u.platform,type:u.category,repoName:u.repoName}))}async testConnection(){try{let n=await(await this.fetch("/health")).json();return n.status==="ok"&&n.service==="gal-api"}catch{return!1}}async getPolicy(e){try{return(await(await this.fetch(`/policies/${e}`)).json()).policy}catch{return null}}async getOrgPolicy(e){try{return(await(await this.fetch(`/organizations/${e}/policy`)).json()).policy}catch{return null}}async fleetRegister(e,n){return await(await this.fetch(`/organizations/${e}/fleet/register`,{method:"POST",body:JSON.stringify(n)})).json()}async fleetHeartbeat(e){return await(await this.fetch("/fleet/heartbeat",{method:"POST",body:JSON.stringify(e)})).json()}async fleetStatus(e){return await(await this.fetch(`/fleet/developers/${e}/status`)).json()}async fleetList(e,n="all"){let o=new URLSearchParams;n!=="all"&&o.set("status",n);let s=`/organizations/${e}/fleet${o.toString()?"?"+o.toString():""}`;return await(await this.fetch(s)).json()}async fleetReport(e){return await(await this.fetch(`/organizations/${e}/fleet/report`)).json()}async fleetUnenroll(e){await this.fetch(`/fleet/developers/${e}`,{method:"DELETE"})}async getApprovedConfig(e,n){try{return await(await this.fetch(`/organizations/${e}/approved-config?platform=${n}`)).json()}catch(o){if(o.message?.includes("404"))return{approved:!1};throw o}}async getHookSettings(e){try{return await(await this.fetch(`/organizations/${e}/hook-settings`)).json()}catch{return{globalIntervalMinutes:10,intervals:{}}}}async validateInvite(e){return await(await this.fetch(`/invites/${encodeURIComponent(e)}/validate`)).json()}async useInvite(e,n){return await(await this.fetch(`/invites/${encodeURIComponent(e)}/use`,{method:"POST",body:JSON.stringify(n)})).json()}async reportDeveloperStatus(e,n){return await(await this.fetch(`/organizations/${encodeURIComponent(e)}/developer-status`,{method:"POST",body:JSON.stringify(n)})).json()}async fetch(e,n={}){if(!this.config.apiUrl)throw new Error("API URL not configured. Run: gal config set apiUrl <url>");let o=`${this.config.apiUrl}${e}`,s={"Content-Type":"application/json",...n.headers};this.config.authToken?s.Authorization=`Bearer ${this.config.authToken}`:this.config.apiKey&&(s.Authorization=`Bearer ${this.config.apiKey}`);let r=await fetch(o,{...n,headers:s});if(!r.ok){let a=`API request failed: ${r.status} ${r.statusText}`;try{let u=await r.json();u&&u.error&&(a=u.error)}catch{}throw new Error(a)}return r}};var Gt=require("os"),S=require("fs"),V=require("path");var Zs=process.env.GAL_API_URL||"http://localhost:3000";var ga=60*60*1e3;function ao(t,e){return`#!/usr/bin/env node
|
|
35
35
|
/**
|
|
36
36
|
* GAL Config Sync Hook for Claude Code (SessionStart only)
|
|
37
37
|
*
|
|
@@ -180,7 +180,7 @@ if (state.syncedFiles && state.syncedFiles.length > 0) {
|
|
|
180
180
|
|
|
181
181
|
// All good - show synced status with friendly reminder
|
|
182
182
|
showMessage(\`\u2705 GAL: You're good to go! Synced with \${state.organization}'s approved config (v\${state.version || 'latest'}).\`);
|
|
183
|
-
`}function
|
|
183
|
+
`}function uo(t,e=Zs){return`#!/usr/bin/env node
|
|
184
184
|
/**
|
|
185
185
|
* GAL Config Enforcement Hook for Cursor IDE (beforeShellExecution)
|
|
186
186
|
* Blocks git commit/push when config is out of sync with org's approved version.
|
|
@@ -368,18 +368,18 @@ function main(hookInput) {
|
|
|
368
368
|
// All good - allow the git command
|
|
369
369
|
allow();
|
|
370
370
|
}
|
|
371
|
-
`}var
|
|
371
|
+
`}var Le=9876,fo="/callback";function tr(t){let e=process.platform;try{e==="darwin"?(0,Re.execSync)(`open "${t}"`):e==="win32"?(0,Re.execSync)(`start "" "${t}"`):(0,Re.execSync)(`xdg-open "${t}"`)}catch{console.log(i.yellow(`
|
|
372
372
|
Could not open browser. Please visit:
|
|
373
373
|
${t}
|
|
374
|
-
`))}}function nr(t,e){let n=(0,V.join)((0,
|
|
374
|
+
`))}}function nr(t,e){let n=(0,V.join)((0,Gt.homedir)(),".claude"),o=(0,V.join)(n,"hooks"),s=(0,V.join)(o,"gal-sync-reminder.js"),r=(0,V.join)(n,"settings.json");try{(0,S.existsSync)(o)||(0,S.mkdirSync)(o,{recursive:!0});let a=ao(t,e);(0,S.writeFileSync)(s,a,"utf-8"),(0,S.chmodSync)(s,"755");let u={};if((0,S.existsSync)(r))try{u=JSON.parse((0,S.readFileSync)(r,"utf-8"))}catch{}u.hooks||(u.hooks={}),u.hooks.SessionStart||(u.hooks.SessionStart=[]),u.hooks.UserPromptSubmit&&(u.hooks.UserPromptSubmit=u.hooks.UserPromptSubmit.filter(c=>c.hooks?(c.hooks=c.hooks.filter(d=>!d.command?.includes("gal-")&&!d.command?.includes("/gal/")),c.hooks.length>0):!0),u.hooks.UserPromptSubmit.length===0&&delete u.hooks.UserPromptSubmit);let l=`node ${s}`;return u.hooks.SessionStart.some(c=>c.hooks?.some(d=>d.command===l))||(u.hooks.SessionStart.push({hooks:[{type:"command",command:l}]}),(0,S.writeFileSync)(r,JSON.stringify(u,null,2),"utf-8")),!0}catch{return!1}}function or(t,e){let n=(0,V.join)((0,Gt.homedir)(),".cursor"),o=(0,V.join)(n,"hooks"),s=(0,V.join)(o,"gal-shell-enforcement.js"),r=(0,V.join)(n,"hooks.json");try{(0,S.existsSync)(o)||(0,S.mkdirSync)(o,{recursive:!0});let a=uo(t,e);(0,S.writeFileSync)(s,a,"utf-8"),(0,S.chmodSync)(s,"755");let u={version:1,hooks:{}};if((0,S.existsSync)(r))try{u=JSON.parse((0,S.readFileSync)(r,"utf-8")),u.hooks||(u.hooks={})}catch{u={version:1,hooks:{}}}u.hooks.beforeShellExecution||(u.hooks.beforeShellExecution=[]);let l=`node ${s}`;return u.hooks.beforeShellExecution.some(c=>c.command===l)||(u.hooks.beforeShellExecution.push({command:l}),(0,S.writeFileSync)(r,JSON.stringify(u,null,2),"utf-8")),!0}catch{return!1}}function sr(t=12e4){return new Promise((e,n)=>{let o=(0,co.createServer)((r,a)=>{let u=new URL(r.url||"",`http://localhost:${Le}`);if(u.pathname===fo){let l=u.searchParams.get("token"),f=u.searchParams.get("error"),c=u.searchParams.get("user");if(f){a.writeHead(200,{"Content-Type":"text/html"}),a.end(`
|
|
375
375
|
<html>
|
|
376
376
|
<body style="font-family: system-ui; padding: 40px; text-align: center;">
|
|
377
377
|
<h1 style="color: #dc2626;">\u274C Authentication Failed</h1>
|
|
378
|
-
<p>${
|
|
378
|
+
<p>${f}</p>
|
|
379
379
|
<p>You can close this window.</p>
|
|
380
380
|
</body>
|
|
381
381
|
</html>
|
|
382
|
-
`),o.close(),n(new Error(
|
|
382
|
+
`),o.close(),n(new Error(f));return}if(l){a.writeHead(200,{"Content-Type":"text/html"}),a.end(`
|
|
383
383
|
<html>
|
|
384
384
|
<body style="font-family: system-ui; padding: 40px; text-align: center;">
|
|
385
385
|
<h1 style="color: #00FF41;">\u2705 Authentication Successful</h1>
|
|
@@ -387,31 +387,31 @@ ${t}
|
|
|
387
387
|
<p>You can close this window and return to the terminal.</p>
|
|
388
388
|
</body>
|
|
389
389
|
</html>
|
|
390
|
-
`),o.close();let
|
|
390
|
+
`),o.close();let d=null;if(c)try{d=JSON.parse(decodeURIComponent(c))}catch{}e({token:l,user:d});return}a.writeHead(400,{"Content-Type":"text/plain"}),a.end("Missing token");return}a.writeHead(404,{"Content-Type":"text/plain"}),a.end("Not found")});o.listen(Le,()=>{});let s=setTimeout(()=>{o.close(),n(new Error("Authentication timed out. Please try again."))},t);o.on("close",()=>{clearTimeout(s)}),o.on("error",r=>{r.code==="EADDRINUSE"?n(new Error(`Port ${Le} is in use. Close other GAL auth processes and try again.`)):n(r)})})}function ho(){let t=new I("auth").description("Manage GitHub authentication");return t.command("login").description("Authenticate with GitHub OAuth").action(async()=>{console.log(i.blue(`
|
|
391
391
|
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`)),console.log(i.blue(" GAL CLI - GitHub Authentication")),console.log(i.blue(`\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
392
|
-
`));let e=
|
|
393
|
-
`));return}catch{}}let o=
|
|
392
|
+
`));let e=F.load(),n=e.apiUrl||process.env.GAL_API_URL||(()=>{throw new Error("API URL not configured. This should never happen.")})();if(e.authToken){let s=new G(e);try{let r=await s.getCurrentUser();console.log(i.yellow(`Already logged in as ${i.bold(r.login)}`)),console.log(i.dim(`Use "gal auth logout" first to switch accounts.
|
|
393
|
+
`));return}catch{}}let o=L("Starting authentication...").start();try{let s=`http://localhost:${Le}${fo}`,r=`${n}/auth/github?redirect=${encodeURIComponent(s)}&source=cli&force_select=true`;o.text="Opening browser for GitHub authentication...";let a=sr();tr(r),o.text="Waiting for authentication (check your browser)...";let{token:u,user:l}=await a;o.succeed(i.green("Authentication successful!")),Ft(!0),e.authToken=u,l?(e.defaultOrg=l.organizations?.[0]||void 0,console.log(i.blue(`
|
|
394
394
|
Logged in as:`)),console.log(` User: ${i.bold(l.login)}`),console.log(` Name: ${l.name||i.dim("(not set)")}`),console.log(` Email: ${l.email||i.dim("(not set)")}`),l.organizations?.length&&(console.log(` Organizations: ${l.organizations.join(", ")}`),console.log(` Default org: ${i.bold(e.defaultOrg)}`))):console.log(i.dim(`
|
|
395
|
-
User details not available.`));let
|
|
395
|
+
User details not available.`));let f=e.defaultOrg||"your-organization",c=nr(f,n),d=or(f,n);if((c||d)&&(console.log(i.dim(" \u2713 Sync reminder hooks installed:")),c&&console.log(i.dim(" - Claude Code (~/.claude/hooks/)")),d&&console.log(i.dim(" - Cursor IDE (~/.cursor/hooks/)"))),F.save(e),e.defaultOrg)try{let h=new G(e),m=await Promise.resolve().then(()=>b(lo(),1));await h.reportDeveloperStatus(e.defaultOrg,{cliInstalled:!0,cliVersion:m.version,authenticated:!0,authExpiresAt:new Date(Date.now()+7*24*60*60*1e3).toISOString()})}catch{console.log(i.dim(" \u26A0 Could not report status to dashboard"))}console.log(i.green(`
|
|
396
396
|
\u2713 Credentials saved!
|
|
397
397
|
`)),console.log("Next steps:"),console.log(` ${i.cyan("gal sync --pull")} - Pull org-approved config`),console.log(` ${i.cyan("gal auth status")} - Check auth status
|
|
398
|
-
`)}catch(s){o.fail(i.red("Authentication failed"));let r=s instanceof Error?s:new Error(String(s));
|
|
398
|
+
`)}catch(s){o.fail(i.red("Authentication failed"));let r=s instanceof Error?s:new Error(String(s));Ft(!1,r),console.error(i.red(r.message)),await ie("auth login",r),process.exit(1)}}),t.command("status").description("Show current authentication status").option("--json","Output as JSON (for extension/script integration)").action(async e=>{let n=F.load();if(e.json){if(!n.authToken){console.log(JSON.stringify({authenticated:!1,expired:!1,user:null,organizations:[]}));return}try{let r=await new G(n).getCurrentUser();console.log(JSON.stringify({authenticated:!0,expired:!1,user:r.login,email:r.email,name:r.name,organizations:r.organizations||[],defaultOrg:n.defaultOrg,apiUrl:n.apiUrl||X}))}catch{console.log(JSON.stringify({authenticated:!1,expired:!0,user:null,organizations:[]}))}return}if(!n.authToken){console.log(i.yellow(`
|
|
399
399
|
Not authenticated.`)),console.log(i.dim(`Run: gal auth login
|
|
400
|
-
`));return}let o=
|
|
400
|
+
`));return}let o=L("Checking authentication...").start();try{let r=await new G(n).getCurrentUser();o.stop(),console.log(i.green(`
|
|
401
401
|
\u2713 Authenticated
|
|
402
402
|
`)),console.log(` User: ${i.bold(r.login)}`),console.log(` Name: ${r.name||i.dim("(not set)")}`),console.log(` Email: ${r.email||i.dim("(not set)")}`),r.organizations?.length&&console.log(` Organizations: ${r.organizations.join(", ")}`),n.defaultOrg&&console.log(` Default org: ${i.bold(n.defaultOrg)}`),console.log(` API: ${n.apiUrl}`),console.log()}catch{o.fail(i.red("Token invalid or expired")),console.log(i.dim(`Run: gal auth login
|
|
403
|
-
`))}}),t.command("logout").description("Clear saved credentials").action(()=>{let e=
|
|
403
|
+
`))}}),t.command("logout").description("Clear saved credentials").action(()=>{let e=F.load();if(!e.authToken){console.log(i.yellow(`
|
|
404
404
|
Not logged in.
|
|
405
|
-
`));return}delete e.authToken,delete e.defaultOrg,
|
|
405
|
+
`));return}delete e.authToken,delete e.defaultOrg,F.save(e),console.log(i.green(`
|
|
406
406
|
\u2713 Logged out successfully.
|
|
407
|
-
`))}),t}var p=require("fs"),
|
|
407
|
+
`))}),t}var p=require("fs"),_=require("path"),mo=require("crypto"),po="1.0.0",rr=`---
|
|
408
408
|
description: "GAL CLI awareness for syncing org-approved configs"
|
|
409
409
|
alwaysApply: true
|
|
410
410
|
---
|
|
411
411
|
|
|
412
412
|
# GAL CLI
|
|
413
413
|
|
|
414
|
-
<!-- GAL_CURSOR_RULES_VERSION = "${
|
|
414
|
+
<!-- GAL_CURSOR_RULES_VERSION = "${po}" -->
|
|
415
415
|
|
|
416
416
|
The \`gal\` CLI is available for managing org-approved AI agent configurations.
|
|
417
417
|
|
|
@@ -424,356 +424,51 @@ The \`gal\` CLI is available for managing org-approved AI agent configurations.
|
|
|
424
424
|
- **Confirmation Required**: Always ask the user before running any \`gal\` command
|
|
425
425
|
- **Self-Discovery**: If unsure about syntax, run \`gal --help\` or \`gal <command> --help\` first
|
|
426
426
|
- **Sync Notifications**: When configs need updating, ask: "Do you want me to sync gal now?"
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
## Organization Standards
|
|
430
|
-
All Claude Code usage must follow these guidelines.
|
|
431
|
-
|
|
432
|
-
## Security Requirements
|
|
433
|
-
- NEVER expose API keys, tokens, or secrets
|
|
434
|
-
- ALWAYS validate user inputs
|
|
435
|
-
- NEVER bypass security controls
|
|
436
|
-
- Log all significant actions
|
|
437
|
-
|
|
438
|
-
## Code Quality
|
|
439
|
-
- Write tests for business logic (TDD required)
|
|
440
|
-
- Follow team style guides
|
|
441
|
-
- Document complex logic
|
|
442
|
-
- Keep functions small and focused
|
|
443
|
-
|
|
444
|
-
## Approved Permissions
|
|
445
|
-
- File read: All source files
|
|
446
|
-
- File write: src/, tests/ directories only
|
|
447
|
-
- Bash: Allowed with restrictions
|
|
448
|
-
- Network: Internal APIs only
|
|
449
|
-
`,settings:{model:"claude-sonnet-4-20250514",maxTokens:8192,permissions:{allowBash:!0,allowRead:["**/*"],allowWrite:["src/**/*","tests/**/*","docs/**/*"],denyWrite:["node_modules/**",".env*","secrets/**","*.key","*.pem"]}},commands:[{name:"approve-pr",content:`---
|
|
450
|
-
name: approve-pr
|
|
451
|
-
description: Smart PR approval with complexity-based tiered review (auto-scales from quick to ultra-strict)
|
|
452
|
-
---
|
|
453
|
-
|
|
454
|
-
# Approve PR Command - Scheduler-Systems Ltd Standard
|
|
455
|
-
|
|
456
|
-
**This command enforces our strict PR reviewing process. Every developer MUST use this command before approving any PR.**
|
|
457
|
-
|
|
458
|
-
## Complexity-Based Tiered Review
|
|
459
|
-
|
|
460
|
-
The review depth auto-scales based on PR size and risk:
|
|
461
|
-
|
|
462
|
-
| Tier | Files Changed | Lines Changed | Review Time | Checks |
|
|
463
|
-
|------|---------------|---------------|-------------|--------|
|
|
464
|
-
| **Quick** | 1-3 files | < 50 lines | 2-5 min | Lint, types, basic security |
|
|
465
|
-
| **Standard** | 4-10 files | 50-200 lines | 10-20 min | + Test coverage, architecture review |
|
|
466
|
-
| **Thorough** | 11-25 files | 200-500 lines | 30-60 min | + Performance analysis, dependency audit |
|
|
467
|
-
| **Ultra-Strict** | 25+ files | 500+ lines | 1-2 hours | + Full security audit, load testing plan |
|
|
468
|
-
|
|
469
|
-
## Mandatory Checklist
|
|
470
|
-
|
|
471
|
-
Before approving ANY PR, verify:
|
|
472
|
-
|
|
473
|
-
### Code Quality
|
|
474
|
-
- [ ] All linting errors resolved
|
|
475
|
-
- [ ] TypeScript strict mode passes
|
|
476
|
-
- [ ] No \`any\` types without justification
|
|
477
|
-
- [ ] Functions are small and focused (< 50 lines)
|
|
478
|
-
- [ ] DRY principle followed
|
|
479
|
-
|
|
480
|
-
### Security
|
|
481
|
-
- [ ] No hardcoded secrets or API keys
|
|
482
|
-
- [ ] Input validation on all user data
|
|
483
|
-
- [ ] SQL injection protection (parameterized queries)
|
|
484
|
-
- [ ] XSS prevention (output encoding)
|
|
485
|
-
- [ ] CSRF tokens on state-changing requests
|
|
486
|
-
|
|
487
|
-
### Testing
|
|
488
|
-
- [ ] Unit tests for new business logic
|
|
489
|
-
- [ ] Integration tests for API changes
|
|
490
|
-
- [ ] E2E tests for user-facing features
|
|
491
|
-
- [ ] Test coverage >= 80% for changed files
|
|
492
|
-
- [ ] No skipped tests without justification
|
|
493
|
-
|
|
494
|
-
### Documentation
|
|
495
|
-
- [ ] Public APIs documented
|
|
496
|
-
- [ ] Complex logic has comments
|
|
497
|
-
- [ ] CHANGELOG updated for user-facing changes
|
|
498
|
-
- [ ] Breaking changes noted in PR description
|
|
499
|
-
|
|
500
|
-
## Usage
|
|
501
|
-
|
|
502
|
-
\`\`\`bash
|
|
503
|
-
# Review current PR
|
|
504
|
-
/approve-pr
|
|
505
|
-
|
|
506
|
-
# Review specific PR
|
|
507
|
-
/approve-pr 123
|
|
508
|
-
|
|
509
|
-
# Force ultra-strict review (for critical paths)
|
|
510
|
-
/approve-pr --strict
|
|
511
|
-
\`\`\`
|
|
512
|
-
|
|
513
|
-
## Enforcement
|
|
514
|
-
|
|
515
|
-
- PRs without this review will be rejected by CI
|
|
516
|
-
- Security violations = automatic PR rejection
|
|
517
|
-
- Test failures = automatic PR rejection
|
|
518
|
-
- Two approvals required for production deployments
|
|
519
|
-
`},{name:"ci-auto-fix",content:`---
|
|
520
|
-
name: ci-auto-fix
|
|
521
|
-
description: Automated CI workflow fix iteration cycle
|
|
522
|
-
---
|
|
523
|
-
|
|
524
|
-
# CI Auto-Fix Command
|
|
525
|
-
|
|
526
|
-
Automatically fix failing CI workflows:
|
|
527
|
-
1. Analyze workflow failure logs
|
|
528
|
-
2. Identify root cause
|
|
529
|
-
3. Apply targeted fixes
|
|
530
|
-
4. Re-run affected workflows
|
|
531
|
-
5. Verify success
|
|
532
|
-
`}],hooks:[{name:"sync-reminder",event:"SessionStart",content:`#!/usr/bin/env node
|
|
533
|
-
/**
|
|
534
|
-
* GAL Sync Reminder Hook
|
|
535
|
-
* Reminds developers to sync config if out of date
|
|
536
|
-
*/
|
|
537
|
-
const fs = require('fs');
|
|
538
|
-
const path = require('path');
|
|
539
|
-
|
|
540
|
-
const galDir = path.join(process.cwd(), '.gal');
|
|
541
|
-
const syncStatePath = path.join(galDir, 'sync-state.json');
|
|
542
|
-
|
|
543
|
-
if (fs.existsSync(syncStatePath)) {
|
|
544
|
-
const state = JSON.parse(fs.readFileSync(syncStatePath, 'utf-8'));
|
|
545
|
-
const lastSync = new Date(state.lastSyncTimestamp);
|
|
546
|
-
const hoursSinceSync = (Date.now() - lastSync.getTime()) / (1000 * 60 * 60);
|
|
547
|
-
|
|
548
|
-
if (hoursSinceSync > 24) {
|
|
549
|
-
console.log('\\n\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557');
|
|
550
|
-
console.log('\u2551 GAL SYNC REMINDER \u2551');
|
|
551
|
-
console.log('\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563');
|
|
552
|
-
console.log('\u2551 Config last synced ' + Math.floor(hoursSinceSync) + ' hours ago. \u2551');
|
|
553
|
-
console.log('\u2551 Run: gal sync --pull \u2551');
|
|
554
|
-
console.log('\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\\n');
|
|
555
|
-
}
|
|
556
|
-
} else {
|
|
557
|
-
console.log('\\n\u26A0\uFE0F GAL not initialized. Run "gal sync --pull" to sync org config.\\n');
|
|
558
|
-
}
|
|
559
|
-
`},{name:"security-check",event:"PreToolUse",content:`#!/usr/bin/env node
|
|
560
|
-
/**
|
|
561
|
-
* GAL Security Check Hook
|
|
562
|
-
* Blocks dangerous operations and logs for compliance
|
|
563
|
-
*/
|
|
564
|
-
const input = JSON.parse(require('fs').readFileSync(0, 'utf-8'));
|
|
565
|
-
const tool = input.tool_name;
|
|
566
|
-
const toolInput = input.tool_input || {};
|
|
567
|
-
|
|
568
|
-
// Block writing to sensitive files
|
|
569
|
-
if (tool === 'Write' || tool === 'Edit') {
|
|
570
|
-
const filePath = toolInput.file_path || toolInput.path || '';
|
|
571
|
-
const blockedPatterns = ['.env', 'secrets/', '*.key', '*.pem', 'credentials'];
|
|
572
|
-
|
|
573
|
-
for (const pattern of blockedPatterns) {
|
|
574
|
-
if (filePath.includes(pattern.replace('*', ''))) {
|
|
575
|
-
console.log(JSON.stringify({
|
|
576
|
-
decision: 'block',
|
|
577
|
-
reason: 'GAL Security Policy: Cannot write to sensitive files (' + pattern + ')'
|
|
578
|
-
}));
|
|
579
|
-
process.exit(0);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
// Allow the operation
|
|
585
|
-
console.log(JSON.stringify({ decision: 'allow' }));
|
|
586
|
-
`},{name:"dangerous-commands",event:"PreToolUse",content:`#!/usr/bin/env node
|
|
587
|
-
/**
|
|
588
|
-
* GAL Dangerous Commands Hook
|
|
589
|
-
* Scheduler-Systems Ltd Critical Security Hook
|
|
590
|
-
*
|
|
591
|
-
* This hook is approved org-wide and deployed to every project.
|
|
592
|
-
* It blocks potentially destructive operations that could:
|
|
593
|
-
* - Delete critical infrastructure
|
|
594
|
-
* - Expose sensitive data
|
|
595
|
-
* - Bypass security controls
|
|
596
|
-
* - Affect production systems
|
|
597
|
-
*/
|
|
598
|
-
const input = JSON.parse(require('fs').readFileSync(0, 'utf-8'));
|
|
599
|
-
const tool = input.tool_name;
|
|
600
|
-
const toolInput = input.tool_input || {};
|
|
601
|
-
|
|
602
|
-
// Dangerous bash commands that are ALWAYS blocked
|
|
603
|
-
const DANGEROUS_COMMANDS = [
|
|
604
|
-
'rm -rf /',
|
|
605
|
-
'rm -rf /*',
|
|
606
|
-
'rm -rf ~',
|
|
607
|
-
'rm -rf $HOME',
|
|
608
|
-
'dd if=/dev/zero',
|
|
609
|
-
'mkfs.',
|
|
610
|
-
':(){:|:&};:', // Fork bomb
|
|
611
|
-
'chmod -R 777',
|
|
612
|
-
'chmod 777',
|
|
613
|
-
'curl | sh',
|
|
614
|
-
'curl | bash',
|
|
615
|
-
'wget | sh',
|
|
616
|
-
'wget | bash',
|
|
617
|
-
'> /dev/sda',
|
|
618
|
-
'mv /* ',
|
|
619
|
-
'dd of=/dev/',
|
|
620
|
-
'format c:',
|
|
621
|
-
'--no-preserve-root',
|
|
622
|
-
];
|
|
623
|
-
|
|
624
|
-
// Git commands that need extra confirmation
|
|
625
|
-
const DANGEROUS_GIT = [
|
|
626
|
-
'git push --force',
|
|
627
|
-
'git push -f ',
|
|
628
|
-
'git reset --hard',
|
|
629
|
-
'git clean -fdx',
|
|
630
|
-
'git checkout .', // Without specific file
|
|
631
|
-
'git stash drop',
|
|
632
|
-
'git branch -D',
|
|
633
|
-
'git rebase -i', // Interactive rebase can rewrite history
|
|
634
|
-
];
|
|
635
|
-
|
|
636
|
-
// Production-affecting commands
|
|
637
|
-
const PRODUCTION_COMMANDS = [
|
|
638
|
-
'firebase deploy',
|
|
639
|
-
'gcloud run deploy',
|
|
640
|
-
'kubectl delete',
|
|
641
|
-
'kubectl apply',
|
|
642
|
-
'terraform destroy',
|
|
643
|
-
'terraform apply',
|
|
644
|
-
'aws s3 rm',
|
|
645
|
-
'aws ec2 terminate',
|
|
646
|
-
'docker rm -f',
|
|
647
|
-
'docker system prune',
|
|
648
|
-
'npm publish',
|
|
649
|
-
'gh release create',
|
|
650
|
-
];
|
|
651
|
-
|
|
652
|
-
if (tool === 'Bash') {
|
|
653
|
-
const command = toolInput.command || '';
|
|
654
|
-
const cmdLower = command.toLowerCase();
|
|
655
|
-
|
|
656
|
-
// Check for always-blocked dangerous commands
|
|
657
|
-
for (const dangerous of DANGEROUS_COMMANDS) {
|
|
658
|
-
if (cmdLower.includes(dangerous.toLowerCase())) {
|
|
659
|
-
console.log(JSON.stringify({
|
|
660
|
-
decision: 'block',
|
|
661
|
-
reason: \`\u{1F6D1} GAL SECURITY BLOCK: Dangerous command detected!
|
|
662
|
-
|
|
663
|
-
Command: \${command}
|
|
664
|
-
Blocked pattern: \${dangerous}
|
|
665
|
-
|
|
666
|
-
This command is blocked org-wide by Scheduler-Systems Ltd security policy.
|
|
667
|
-
Contact security@scheduler-systems.com if you believe this is an error.\`
|
|
668
|
-
}));
|
|
669
|
-
process.exit(0);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
// Check for dangerous git commands (warn but don't block for now)
|
|
674
|
-
for (const gitCmd of DANGEROUS_GIT) {
|
|
675
|
-
if (cmdLower.includes(gitCmd.toLowerCase())) {
|
|
676
|
-
console.log(JSON.stringify({
|
|
677
|
-
decision: 'block',
|
|
678
|
-
reason: \`\u26A0\uFE0F GAL SECURITY WARNING: Potentially dangerous git operation!
|
|
679
|
-
|
|
680
|
-
Command: \${command}
|
|
681
|
-
Pattern: \${gitCmd}
|
|
682
|
-
|
|
683
|
-
This git command can cause data loss or rewrite history.
|
|
684
|
-
If you need to run this command, use the terminal directly.
|
|
685
|
-
All destructive git operations are logged for audit.\`
|
|
686
|
-
}));
|
|
687
|
-
process.exit(0);
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
// Check for production-affecting commands
|
|
692
|
-
for (const prodCmd of PRODUCTION_COMMANDS) {
|
|
693
|
-
if (cmdLower.includes(prodCmd.toLowerCase())) {
|
|
694
|
-
// Check if we're in a production context
|
|
695
|
-
const isProduction = process.env.NODE_ENV === 'production' ||
|
|
696
|
-
process.env.ENV === 'production' ||
|
|
697
|
-
command.includes('--prod') ||
|
|
698
|
-
command.includes('production');
|
|
699
|
-
|
|
700
|
-
if (isProduction) {
|
|
701
|
-
console.log(JSON.stringify({
|
|
702
|
-
decision: 'block',
|
|
703
|
-
reason: \`\u{1F6A8} GAL PRODUCTION GUARD: Production deployment detected!
|
|
704
|
-
|
|
705
|
-
Command: \${command}
|
|
706
|
-
Pattern: \${prodCmd}
|
|
707
|
-
|
|
708
|
-
Production deployments MUST go through CI/CD pipeline.
|
|
709
|
-
Direct production commands are blocked by org policy.
|
|
710
|
-
|
|
711
|
-
Use the approved deployment workflow:
|
|
712
|
-
1. Create PR with changes
|
|
713
|
-
2. Get /approve-pr review
|
|
714
|
-
3. Merge to trigger deployment\`
|
|
715
|
-
}));
|
|
716
|
-
process.exit(0);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
// Allow the operation
|
|
723
|
-
console.log(JSON.stringify({ decision: 'allow' }));
|
|
724
|
-
`}]};function ir(t){let e=(0,g.join)(t,".cursor","rules","gal-cli"),n=(0,g.join)(e,"RULE.md");try{if((0,p.existsSync)(n)){let s=(0,p.readFileSync)(n,"utf-8").match(/GAL_CURSOR_RULES_VERSION = "([^"]+)"/);if(s&&s[1]===Fo)return!0}return(0,p.existsSync)(e)||(0,p.mkdirSync)(e,{recursive:!0}),(0,p.writeFileSync)(n,rr,"utf-8"),!0}catch{return!1}}function ar(t,e,n,o,s=[],r,a){let u=(0,g.join)(process.cwd(),".gal"),l=(0,g.join)(u,"sync-state.json");(0,p.existsSync)(u)||(0,p.mkdirSync)(u,{recursive:!0});let d={lastSyncTimestamp:new Date().toISOString(),lastSyncHash:e,approvedConfigHash:n,lastCheckTimestamp:new Date().toISOString(),organization:t,version:o,syncedFiles:s.length>0?s:void 0,policyName:r||void 0,hookSettings:a};(0,p.writeFileSync)(l,JSON.stringify(d,null,2),"utf-8")}function ur(t){return(0,go.createHash)("sha256").update(t).digest("hex").substring(0,16)}function lr(){let t=(0,g.join)(process.cwd(),".gal","sync-state.json");if(!(0,p.existsSync)(t))return null;try{let e=(0,p.readFileSync)(t,"utf-8");return JSON.parse(e)}catch{return null}}function po(t){let e=t.match(/^---\s*\n([\s\S]*?)\n---/);if(!e)return{};let n=e[1],o={},s=n.match(/description:\s*(.+)/);s&&(o.description=s[1].trim().replace(/^["']|["']$/g,""));let r=n.match(/allowed-tools:\s*\[([^\]]+)\]/);return r&&(o.allowedTools=r[1].split(",").map(a=>a.trim())),o}function cr(t){return t==="settings.json"||t.endsWith("/settings.json")?"settings":t.startsWith("rules/")||t.includes("/rules/")?"rules":t.startsWith("commands/")||t.includes("/commands/")?"commands":t.startsWith("hooks/")||t.includes("/hooks/")?"hooks":t.startsWith("agents/")||t.includes("/agents/")?"agents":t===".mcp.json"||t.endsWith(".mcp.json")?"mcp":"unknown"}function dr(t){let e=t.split("/");return e[e.length-1].replace(/\.(md|json|js|py|sh)$/,"")}function fr(t,e,n,o){let s={};for(let f of t)s[f.type]||(s[f.type]=[]),s[f.type].push(f);let r={commands:{label:"Slash Commands",icon:"/"},settings:{label:"Settings",icon:"\u2699"},rules:{label:"Rules",icon:"\u{1F4CB}"},hooks:{label:"Hooks",icon:"\u{1FA9D}"},agents:{label:"Agents",icon:"\u{1F916}"},mcp:{label:"MCP Config",icon:"\u{1F50C}"},unknown:{label:"Other",icon:"\u{1F4C4}"}};console.log(i.dim(`
|
|
427
|
+
`;function ir(t){let e=(0,_.join)(t,".cursor","rules","gal-cli"),n=(0,_.join)(e,"RULE.md");try{if((0,p.existsSync)(n)){let s=(0,p.readFileSync)(n,"utf-8").match(/GAL_CURSOR_RULES_VERSION = "([^"]+)"/);if(s&&s[1]===po)return!0}return(0,p.existsSync)(e)||(0,p.mkdirSync)(e,{recursive:!0}),(0,p.writeFileSync)(n,rr,"utf-8"),!0}catch{return!1}}function ar(t,e,n,o,s=[],r,a){let u=(0,_.join)(process.cwd(),".gal"),l=(0,_.join)(u,"sync-state.json");(0,p.existsSync)(u)||(0,p.mkdirSync)(u,{recursive:!0});let f={lastSyncTimestamp:new Date().toISOString(),lastSyncHash:e,approvedConfigHash:n,lastCheckTimestamp:new Date().toISOString(),organization:t,version:o,syncedFiles:s.length>0?s:void 0,policyName:r||void 0,hookSettings:a};(0,p.writeFileSync)(l,JSON.stringify(f,null,2),"utf-8")}function ur(t){return(0,mo.createHash)("sha256").update(t).digest("hex").substring(0,16)}function lr(){let t=(0,_.join)(process.cwd(),".gal","sync-state.json");if(!(0,p.existsSync)(t))return null;try{let e=(0,p.readFileSync)(t,"utf-8");return JSON.parse(e)}catch{return null}}function Do(t){let e=t.match(/^---\s*\n([\s\S]*?)\n---/);if(!e)return{};let n=e[1],o={},s=n.match(/description:\s*(.+)/);s&&(o.description=s[1].trim().replace(/^["']|["']$/g,""));let r=n.match(/allowed-tools:\s*\[([^\]]+)\]/);return r&&(o.allowedTools=r[1].split(",").map(a=>a.trim())),o}function cr(t){return t==="settings.json"||t.endsWith("/settings.json")?"settings":t.startsWith("rules/")||t.includes("/rules/")?"rules":t.startsWith("commands/")||t.includes("/commands/")?"commands":t.startsWith("hooks/")||t.includes("/hooks/")?"hooks":t.startsWith("agents/")||t.includes("/agents/")?"agents":t===".mcp.json"||t.endsWith(".mcp.json")?"mcp":"unknown"}function fr(t){let e=t.split("/");return e[e.length-1].replace(/\.(md|json|js|py|sh)$/,"")}function dr(t,e,n,o){let s={};for(let d of t)s[d.type]||(s[d.type]=[]),s[d.type].push(d);let r={commands:{label:"Slash Commands",icon:"/"},settings:{label:"Settings",icon:"\u2699"},rules:{label:"Rules",icon:"\u{1F4CB}"},hooks:{label:"Hooks",icon:"\u{1FA9D}"},agents:{label:"Agents",icon:"\u{1F916}"},mcp:{label:"MCP Config",icon:"\u{1F50C}"},unknown:{label:"Other",icon:"\u{1F4C4}"}};console.log(i.dim(`
|
|
725
428
|
// Synced from org approved config:
|
|
726
|
-
`));for(let[
|
|
429
|
+
`));for(let[d,h]of Object.entries(s)){let{label:m}=r[d]||{label:d,icon:"\u{1F4C4}"};if(d==="commands")for(let D of h)console.log(i.green(` /${D.name}`)),D.description&&console.log(i.white(` ${D.description}`)),D.allowedTools&&D.allowedTools.length>0&&console.log(i.dim(" Allowed tools: ")+i.cyan(D.allowedTools.join(", "))),console.log();else if(d==="settings")console.log(i.green(" \u2699 Settings")),console.log(i.white(" Organization-approved configuration")),console.log();else if(d==="agents")for(let D of h)console.log(i.green(` \u{1F916} ${D.name}`)),D.description&&console.log(i.white(` ${D.description}`)),console.log();else if(d==="rules"){console.log(i.green(` \u{1F4CB} Rules (${h.length})`));for(let D of h)console.log(i.dim(` \u2192 ${D.name}.md`));console.log()}else if(d==="hooks"){console.log(i.green(` \u{1FA9D} Hooks (${h.length})`));for(let D of h)console.log(i.dim(` \u2192 ${D.path}`));console.log()}else if(d==="mcp")console.log(i.green(" \u{1F50C} MCP Configuration")),console.log(i.white(" Model Context Protocol servers")),console.log();else{console.log(i.green(` \u{1F4C4} ${m} (${h.length})`));for(let D of h)console.log(i.dim(` \u2192 ${D.path}`));console.log()}}console.log(i.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));let a=t.length,u=s.commands?.length||0,l=o?` \u2022 Policy: ${i.cyan(o)}`:"",f=[];u>0&&f.push(`${u} command${u>1?"s":""}`),s.rules?.length&&f.push(`${s.rules.length} rule${s.rules.length>1?"s":""}`),s.settings?.length&&f.push("settings"),s.agents?.length&&f.push(`${s.agents.length} agent${s.agents.length>1?"s":""}`),s.hooks?.length&&f.push(`${s.hooks.length} hook${s.hooks.length>1?"s":""}`),s.mcp?.length&&f.push("MCP config");let c=f.length>0?f.join(", "):`${a} file${a>1?"s":""}`;console.log(i.green("[GAL] ")+i.white(`${c} synced from ${e} v${n}`)+l)}function go(){let t=new I("sync").description("Sync local configs with CISO-approved organization standard");return t.command("status").description("Check current sync status (for extension integration)").option("--json","Output as JSON").action(async n=>{let o=lr();if(n.json){if(!o){console.log(JSON.stringify({synced:!1,neverSynced:!0,upToDate:!1,lastSync:null,organization:null,hash:null}));return}let r=o.lastSyncHash===o.approvedConfigHash;console.log(JSON.stringify({synced:!0,neverSynced:!1,upToDate:r,outdated:!r,lastSync:o.lastSyncTimestamp,lastCheck:o.lastCheckTimestamp,organization:o.organization,version:o.version,hash:o.lastSyncHash,approvedHash:o.approvedConfigHash,syncedFiles:o.syncedFiles||[]}));return}if(!o){console.log(i.yellow(`
|
|
727
430
|
Never synced.`)),console.log(i.dim(`Run: gal sync --pull
|
|
728
431
|
`));return}o.lastSyncHash===o.approvedConfigHash?console.log(i.green(`
|
|
729
432
|
\u2713 Config is up to date
|
|
730
433
|
`)):(console.log(i.yellow(`
|
|
731
434
|
\u26A0 Config may be outdated
|
|
732
435
|
`)),console.log(i.dim(`Run: gal sync --pull to update
|
|
733
|
-
`))),console.log(` Organization: ${i.bold(o.organization)}`),console.log(` Version: ${o.version}`),console.log(` Last sync: ${new Date(o.lastSyncTimestamp).toLocaleString()}`),o.syncedFiles&&o.syncedFiles.length>0&&console.log(` Synced files: ${o.syncedFiles.length}`),console.log()}),t.argument("[orgName]","Organization name (uses default if not specified)").option("-d, --directory <path>","Local config directory",process.cwd()).option("-p, --platform <platform>","Filter by platform (claude, cursor, etc.)").option("--pull","Download CISO-approved config to local directory").option("--check","Check if local files match approved config (for hooks)").option("--output-json","Output as JSON").
|
|
734
|
-
[DEMO MODE] Would sync with Scheduler-Systems Ltd approved config`)),console.log(i.dim("Use --pull to write demo config files")));return}let r=C.load();!r.authToken&&!r.apiKey&&(console.error(i.red("\u2716 Not authenticated. Run: gal auth login")),process.exit(1));let a=n||r.defaultOrg;a||(console.error(i.red("Error: No organization specified and no default set")),console.log(i.dim("Usage: gal sync <orgName>")),console.log(i.dim(" or: gal config set defaultOrg <orgName>")),process.exit(1));let u=r.apiUrl||process.env.GAL_API_URL;u||(console.error(i.red("Error: API URL not configured")),process.exit(1));let l=new j({...r,apiUrl:u});if(o.pull){await pr(l,a,o.directory,o.platform,u);return}if(o.check){await gr(l,a,o.directory,o.platform);return}let d=T(`Comparing configs for ${a}...`).start(),c;try{c=await l.getOrganization(a)}catch(m){d.fail(i.red(`Failed to fetch organization ${a}`)),console.error(i.dim(m.message)),process.exit(1)}let f=hr(o.directory,o.platform);d.stop();let h=mr(f,c);if(o.outputJson){console.log(JSON.stringify(h,null,2));return}Dr(a,h)}catch(s){let r=s instanceof Error?s:new Error(String(s));console.error(i.red("Error:"),r.message),await ue("sync",r),process.exit(1)}}),t}function hr(t,e){let n=["claude","cursor","gemini","codex","windsurf"],o=[];for(let s of n){if(e&&s!==e)continue;let r=Ht(s),a=(0,g.join)(t,r);if(!(0,p.existsSync)(a))continue;let u=[],l=(0,g.join)(a,"settings.json");(0,p.existsSync)(l)&&u.push({path:l,type:"settings",content:(0,p.readFileSync)(l,"utf-8")});let d=(0,g.join)(a,"rules");if((0,p.existsSync)(d)){let c=(0,p.readdirSync)(d).filter(f=>f.endsWith(".md")||f.endsWith(".mdc"));for(let f of c){let h=(0,g.join)(d,f);u.push({path:h,type:"rule",content:(0,p.readFileSync)(h,"utf-8")})}}if(s==="cursor"){let c=(0,g.join)(t,".cursorrules");(0,p.existsSync)(c)&&u.push({path:c,type:"rule",content:(0,p.readFileSync)(c,"utf-8")})}if(s==="claude"){let c=(0,g.join)(a,"commands");if((0,p.existsSync)(c)){let h=(0,p.readdirSync)(c).filter(m=>m.endsWith(".md"));for(let m of h){let D=(0,g.join)(c,m);u.push({path:D,type:"command",content:(0,p.readFileSync)(D,"utf-8")})}}let f=(0,g.join)(a,"hooks");if((0,p.existsSync)(f)){let h=(0,p.readdirSync)(f).filter(m=>m.endsWith(".py")||m.endsWith(".sh"));for(let m of h){let D=(0,g.join)(f,m);u.push({path:D,type:"hook",content:(0,p.readFileSync)(D,"utf-8")})}}}u.length>0&&o.push({platform:s,directory:a,files:u})}return o}function Ht(t){return{claude:".claude",cursor:".cursor",gemini:".gemini",codex:".codex",windsurf:".windsurf"}[t]}function mr(t,e){let n={platforms:{},summary:{localOnly:0,remoteOnly:0,inSync:0,total:0}},o=t.find(a=>a.platform==="claude"),s=e.totalCommands+e.totalHooks+(e.settings.versions>0?1:0),r={hasLocal:!!o,hasRemote:s>0,localCount:o?.files.length||0,remoteCount:s};return o&&s===0?(r.status="local-only",n.summary.localOnly+=o.files.length):!o&&s>0?(r.status="remote-only",n.summary.remoteOnly+=s):o&&s>0&&(r.status="exists-both",n.summary.inSync+=o.files.length),n.platforms.claude=r,n.summary.total=Math.max(r.localCount,r.remoteCount),n}function Dr(t,e){console.log(i.blue(`
|
|
436
|
+
`))),console.log(` Organization: ${i.bold(o.organization)}`),console.log(` Version: ${o.version}`),console.log(` Last sync: ${new Date(o.lastSyncTimestamp).toLocaleString()}`),o.syncedFiles&&o.syncedFiles.length>0&&console.log(` Synced files: ${o.syncedFiles.length}`),console.log()}),t.argument("[orgName]","Organization name (uses default if not specified)").option("-d, --directory <path>","Local config directory",process.cwd()).option("-p, --platform <platform>","Filter by platform (claude, cursor, etc.)").option("--pull","Download CISO-approved config to local directory").option("--check","Check if local files match approved config (for hooks)").option("--output-json","Output as JSON").action(async(n,o)=>{try{let s=F.load();!s.authToken&&!s.apiKey&&(console.error(i.red("\u2716 Not authenticated. Run: gal auth login")),process.exit(1));let r=n||s.defaultOrg;r||(console.error(i.red("Error: No organization specified and no default set")),console.log(i.dim("Usage: gal sync <orgName>")),console.log(i.dim(" or: gal config set defaultOrg <orgName>")),process.exit(1));let a=s.apiUrl||process.env.GAL_API_URL;a||(console.error(i.red("Error: API URL not configured")),process.exit(1));let u=new G({...s,apiUrl:a});if(o.pull){await pr(u,r,o.directory,o.platform,a);return}if(o.check){await gr(u,r,o.directory,o.platform);return}let l=L(`Comparing configs for ${r}...`).start(),f;try{f=await u.getOrganization(r)}catch(h){l.fail(i.red(`Failed to fetch organization ${r}`)),console.error(i.dim(h.message)),process.exit(1)}let c=hr(o.directory,o.platform);l.stop();let d=Dr(c,f);if(o.outputJson){console.log(JSON.stringify(d,null,2));return}mr(r,d)}catch(s){let r=s instanceof Error?s:new Error(String(s));console.error(i.red("Error:"),r.message),await ie("sync",r),process.exit(1)}}),t}function hr(t,e){let n=["claude","cursor","gemini","codex","windsurf"],o=[];for(let s of n){if(e&&s!==e)continue;let r=jt(s),a=(0,_.join)(t,r);if(!(0,p.existsSync)(a))continue;let u=[],l=(0,_.join)(a,"settings.json");(0,p.existsSync)(l)&&u.push({path:l,type:"settings",content:(0,p.readFileSync)(l,"utf-8")});let f=(0,_.join)(a,"rules");if((0,p.existsSync)(f)){let c=(0,p.readdirSync)(f).filter(d=>d.endsWith(".md")||d.endsWith(".mdc"));for(let d of c){let h=(0,_.join)(f,d);u.push({path:h,type:"rule",content:(0,p.readFileSync)(h,"utf-8")})}}if(s==="cursor"){let c=(0,_.join)(t,".cursorrules");(0,p.existsSync)(c)&&u.push({path:c,type:"rule",content:(0,p.readFileSync)(c,"utf-8")})}if(s==="claude"){let c=(0,_.join)(a,"commands");if((0,p.existsSync)(c)){let h=(0,p.readdirSync)(c).filter(m=>m.endsWith(".md"));for(let m of h){let D=(0,_.join)(c,m);u.push({path:D,type:"command",content:(0,p.readFileSync)(D,"utf-8")})}}let d=(0,_.join)(a,"hooks");if((0,p.existsSync)(d)){let h=(0,p.readdirSync)(d).filter(m=>m.endsWith(".py")||m.endsWith(".sh"));for(let m of h){let D=(0,_.join)(d,m);u.push({path:D,type:"hook",content:(0,p.readFileSync)(D,"utf-8")})}}}u.length>0&&o.push({platform:s,directory:a,files:u})}return o}function jt(t){return{claude:".claude",cursor:".cursor",gemini:".gemini",codex:".codex",windsurf:".windsurf"}[t]}function Dr(t,e){let n={platforms:{},summary:{localOnly:0,remoteOnly:0,inSync:0,total:0}},o=t.find(a=>a.platform==="claude"),s=e.totalCommands+e.totalHooks+(e.settings.versions>0?1:0),r={hasLocal:!!o,hasRemote:s>0,localCount:o?.files.length||0,remoteCount:s};return o&&s===0?(r.status="local-only",n.summary.localOnly+=o.files.length):!o&&s>0?(r.status="remote-only",n.summary.remoteOnly+=s):o&&s>0&&(r.status="exists-both",n.summary.inSync+=o.files.length),n.platforms.claude=r,n.summary.total=Math.max(r.localCount,r.remoteCount),n}function mr(t,e){console.log(i.blue(`
|
|
735
437
|
Sync Status for ${t}:
|
|
736
438
|
`));for(let[n,o]of Object.entries(e.platforms)){let s=o;console.log(i.bold(n.toUpperCase())),s.status==="local-only"?(console.log(i.yellow(" \u26A0 Local only:"),`${s.localCount} configs`),console.log(i.dim(" These configs exist locally but not in GAL"))):s.status==="remote-only"?(console.log(i.cyan(" \u2193 Remote only:"),`${s.remoteCount} configs`),console.log(i.dim(" These configs exist in GAL but not locally"))):s.status==="exists-both"&&(console.log(i.green(" \u2713 Exists in both:"),`Local: ${s.localCount}, Remote: ${s.remoteCount}`),s.localCount!==s.remoteCount&&console.log(i.dim(" File counts differ - manual review needed"))),console.log()}console.log(i.bold("Summary:")),console.log(i.gray(" Total configs:"),e.summary.total),console.log(i.yellow(" Local only:"),e.summary.localOnly),console.log(i.cyan(" Remote only:"),e.summary.remoteOnly),e.summary.localOnly>0&&console.log(i.dim(`
|
|
737
439
|
\u{1F4A1} Tip: Local-only configs are not tracked by GAL. Consider pushing them to your repo.`)),e.summary.remoteOnly>0&&console.log(i.dim(`
|
|
738
440
|
\u{1F4A1} Tip: Use "gal sync --pull" to download CISO-approved configs.`))}async function pr(t,e,n,o,s){let r=o?[o]:["claude","cursor","gemini","codex","windsurf"];console.log(i.blue(`
|
|
739
441
|
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`)),console.log(i.blue(" GAL Config Sync - Convenience Package")),console.log(i.blue(`\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
740
|
-
`));let a
|
|
741
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`)),console.log(i.green(" \u2713 Sync complete! Your configs match org standard.")),console.log(i.green("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550"));let
|
|
742
|
-
[GAL] ${
|
|
442
|
+
`));let a;try{a=await t.getHookSettings(e),console.log(i.dim(` Fetched hook settings (interval: ${a.globalIntervalMinutes||10} min)`))}catch{a={globalIntervalMinutes:10,intervals:{}}}let u=!1,l="",f="",c="",d="",h=[],m=[];for(let D of r){let k=L(`Checking ${D} approved config...`).start();try{let v=await t.getApprovedConfig(e,D);if(!v.approved){k.info(i.dim(`${D}: No approved config set by CISO`));continue}if(u=!0,k.succeed(i.green(`${D}: Found approved config v${v.version}`)),v.configContent){let Wt=jt(D),De=(0,_.join)(n,Wt);(0,p.existsSync)(De)||(0,p.mkdirSync)(De,{recursive:!0});let zt=ur(v.configContent);l=zt,f=zt,c=v.version||"1",d=v.policyName||"";try{let $e=JSON.parse(v.configContent);for(let[Z,ee]of Object.entries($e)){let Jt=(0,_.join)(De,Z),Yt=(0,_.dirname)(Jt);(0,p.existsSync)(Yt)||(0,p.mkdirSync)(Yt,{recursive:!0}),(0,p.writeFileSync)(Jt,ee);let So=(0,_.join)(Wt,Z);h.push(So);let Pe=cr(Z),ko=fr(Z),me={path:Z,type:Pe,name:ko};if(Pe==="commands"&&typeof ee=="string"){let{description:Ge,allowedTools:Oo}=Do(ee);me.description=Ge,me.allowedTools=Oo}if(Pe==="agents"&&typeof ee=="string"){let{description:Ge}=Do(ee);me.description=Ge}m.push(me)}}catch{let $e=(0,_.join)(De,"approved-config.json");(0,p.writeFileSync)($e,v.configContent),m.push({path:"approved-config.json",type:"unknown",name:"approved-config"})}}else console.log(i.yellow(" \u26A0 Config approved but content not stored")),console.log(i.dim(` Hash: ${v.hash}`)),console.log(i.dim(` Approved by: ${v.approvedBy} on ${v.approvedAt}`)),f=v.hash||"",c=v.version||"1",d=v.policyName||""}catch(v){k.fail(i.red(`${D}: Failed to fetch - ${v.message}`))}}if(u){ar(e,l,f,c,h,d,a),m.length>0?dr(m,e,c,d):h.length>0&&(console.log(i.dim(" Sync state saved to .gal/sync-state.json")),console.log(i.dim(` Tracking ${h.length} synced file(s)`))),a&&console.log(i.dim(` Hook reminder interval: ${a.globalIntervalMinutes||10} minutes`)),(!o||o==="cursor")&&ir(n)&&(console.log(i.dim(" GAL CLI rules installed to .cursor/rules/gal-cli/")),h.push(".cursor/rules/gal-cli/RULE.md")),Ct(h.length,!0);try{await t.reportDeveloperStatus(e,{lastSyncAt:new Date().toISOString(),syncedConfigVersion:c,syncStatus:"synced"})}catch{}console.log(i.green(`
|
|
443
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`)),console.log(i.green(" \u2713 Sync complete! Your configs match org standard.")),console.log(i.green("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550"));let D=d?` \u2022 Policy: ${i.cyan(d)}`:"";console.log(i.blue(`
|
|
444
|
+
[GAL] ${h.length} org configs loaded${D}
|
|
743
445
|
`)),console.log(i.yellow(`\u26A0\uFE0F RESTART Claude Code/Cursor for changes to take effect.
|
|
744
446
|
`))}else{console.log(i.yellow(`
|
|
745
447
|
\u26A0 No CISO-approved configs found for this organization.`)),console.log(i.dim(" Ask your admin to approve configs on the GAL dashboard.")),console.log(i.dim(` Dashboard: https://app.gal.run/approved-config
|
|
746
|
-
`)),
|
|
747
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`)),console.log(i.blue(" GAL Config Sync - DEMO MODE")),console.log(i.blue(`\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
748
|
-
`)),console.log(i.yellow(` [DEMO] Using Scheduler-Systems Ltd approved config
|
|
749
|
-
`));let n=T("Syncing approved config...").start(),o=[],s=(0,g.join)(e,".claude");(0,p.existsSync)(s)||(0,p.mkdirSync)(s,{recursive:!0});let r=(0,g.join)(e,"CLAUDE.md");(0,p.writeFileSync)(r,z.claudeMd),o.push("CLAUDE.md"),console.log(i.dim(" \u2192 Written: CLAUDE.md"));let a=(0,g.join)(s,"settings.json");(0,p.writeFileSync)(a,JSON.stringify(z.settings,null,2)),o.push(".claude/settings.json"),console.log(i.dim(" \u2192 Written: .claude/settings.json"));let u=(0,g.join)(s,"commands");(0,p.existsSync)(u)||(0,p.mkdirSync)(u,{recursive:!0});for(let f of z.commands){let h=(0,g.join)(u,`${f.name}.md`);(0,p.writeFileSync)(h,f.content),o.push(`.claude/commands/${f.name}.md`),console.log(i.dim(` \u2192 Written: .claude/commands/${f.name}.md`))}let l=(0,g.join)(s,"hooks");(0,p.existsSync)(l)||(0,p.mkdirSync)(l,{recursive:!0});for(let f of z.hooks){let h=(0,g.join)(l,`${f.name}.js`);(0,p.writeFileSync)(h,f.content),(0,p.chmodSync)(h,"755"),o.push(`.claude/hooks/${f.name}.js`),console.log(i.dim(` \u2192 Written: .claude/hooks/${f.name}.js (${f.event})`))}n.succeed(i.green(`Synced ${o.length} files from Scheduler-Systems Ltd approved config`));let d=(0,g.join)(e,".gal");(0,p.existsSync)(d)||(0,p.mkdirSync)(d,{recursive:!0});let c={lastSyncTimestamp:new Date().toISOString(),lastSyncHash:z.hash,approvedConfigHash:z.hash,lastCheckTimestamp:new Date().toISOString(),organization:t,version:z.version,syncedFiles:o,demoMode:!0};(0,p.writeFileSync)((0,g.join)(d,"sync-state.json"),JSON.stringify(c,null,2)),console.log(i.dim(" Sync state saved to .gal/sync-state.json")),console.log(i.green(`
|
|
750
|
-
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`)),console.log(i.green(" \u2713 Demo sync complete!")),console.log(i.green("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550")),console.log(i.cyan(`
|
|
751
|
-
Synced files:`));for(let f of o)console.log(i.dim(` \u2022 ${f}`));console.log(i.yellow(`
|
|
752
|
-
\u26A0\uFE0F RESTART Claude Code for new slash commands and hooks to work.
|
|
753
|
-
`))}function yo(){let t=new L("config");return t.description("Manage GAL CLI configuration").action(()=>{let e=C.load(),n=C.getEnvironment(),s={development:i.yellow,staging:i.cyan,production:i.green}[n]||i.white;console.log(i.blue("Current Configuration:")),console.log(i.gray(" Environment:"),s(n)),console.log(i.gray(" Config file:"),C.getConfigPath()),console.log(i.gray(" API URL:"),e.apiUrl||i.dim("(not set)")),console.log(i.gray(" API Key:"),e.apiKey?i.green("(set)"):i.dim("(not set)")),console.log(i.gray(" Default Org:"),e.defaultOrg||i.dim("(not set)")),console.log(i.gray(" Telemetry:"),e.telemetry===!1?i.red("disabled"):i.green("enabled")),console.log(""),console.log(i.dim(" Tip: Set GAL_ENV=dev|staging|prod to override environment")),console.log(i.dim(" Tip: gal config set telemetry false to disable telemetry"))}),t.command("set").description("Set a configuration value").argument("<key>","Configuration key (apiUrl, apiKey, defaultOrg, telemetry)").argument("<value>","Configuration value").action((e,n)=>{let o=["apiUrl","apiKey","defaultOrg","telemetry"];o.includes(e)||(console.error(i.red(`Invalid key: ${e}. Valid keys: ${o.join(", ")}`)),process.exit(1));let s=n;if(e==="telemetry"){let a=n.toLowerCase();a==="true"||a==="1"||a==="yes"||a==="on"?s=!0:a==="false"||a==="0"||a==="no"||a==="off"?s=!1:(console.error(i.red("Invalid value for telemetry. Use: true/false, yes/no, 1/0, on/off")),process.exit(1))}C.set(e,s);let r=e==="apiKey"?"***":String(s);console.log(i.green(`\u2713 Set ${e} = ${r}`))}),t.command("get").description("Get a configuration value").argument("<key>","Configuration key").action(e=>{let n=C.get(e);console.log(n===void 0?i.dim(`${e} is not set`):e==="apiKey"?"***":n)}),t.command("test").description("Test connection to GAL API").action(async()=>{let e=T("Testing API connection...").start();try{let n=C.load();n.apiUrl||(e.fail(i.red("API URL not configured")),console.log(i.dim("Run: gal config set apiUrl <url>")),process.exit(1)),await new j(n).testConnection()?e.succeed(i.green(`Connected to GAL API at ${n.apiUrl}`)):(e.fail(i.red(`Failed to connect to ${n.apiUrl}`)),process.exit(1))}catch(n){e.fail(i.red("Connection test failed")),console.error(i.dim(n.message)),process.exit(1)}}),t.command("path").description("Show config file path").action(()=>{console.log(C.getConfigPath())}),t}var F=require("fs"),_=require("path"),Vt=require("os"),_o=require("readline");async function Cr(t){let e=(0,_o.createInterface)({input:process.stdin,output:process.stdout});return new Promise(n=>{e.question(`${t} (y/N): `,o=>{e.close(),n(o.toLowerCase()==="y"||o.toLowerCase()==="yes")})})}function qt(t){if(!(0,F.existsSync)(t))return!1;try{let e=(0,F.readFileSync)(t,"utf-8");return["GAL Config","GAL CLI","GAL Governance","Generated by GAL","gal sync","gal check","Governance Agentic Layer","CISO-approved","gal-sync-reminder","gal-config-hook","gal-safety-hook"].some(o=>e.includes(o))}catch{return!1}}function yr(t){if(!(0,F.existsSync)(t))return!1;try{let e=(0,F.readFileSync)(t,"utf-8");return e.includes("CURRENT_VERSION =")||e.includes("const CURRENT_VERSION")}catch{return!1}}function Eo(t){return yr(t)?"npm":qt(t)?"org-sync":"unknown"}function Er(t){let e=[],n=(0,_.join)((0,Vt.homedir)(),".claude"),o=(0,_.join)(n,"hooks"),s=(0,_.join)(n,"status_lines"),r=t?.includeNpmInstalled??!0;if((0,F.existsSync)(o)){let c=(0,F.readdirSync)(o);for(let f of c)if(f.startsWith("gal-")){let h=(0,_.join)(o,f),m=Eo(h);if(!r&&m==="npm")continue;e.push({path:h,type:"file",reason:`GAL hook file (${m==="npm"?"npm-installed":m==="org-sync"?"org-synced":"unknown source"})`,isGalOwned:!0,source:m})}}if((0,F.existsSync)(s)){let c=(0,F.readdirSync)(s);for(let f of c)if(f.startsWith("gal-")){let h=(0,_.join)(s,f),m=Eo(h);if(!r&&m==="npm")continue;e.push({path:h,type:"file",reason:`GAL status line script (${m==="npm"?"npm-installed":m==="org-sync"?"org-synced":"unknown source"})`,isGalOwned:!0,source:m})}}let a=(0,_.join)(n,"settings.json");if((0,F.existsSync)(a))try{let c=JSON.parse((0,F.readFileSync)(a,"utf-8"));c.hooks?.SessionStart&&c.hooks.SessionStart.some(h=>h.hooks?.some(m=>m.command?.includes("gal-")||m.command?.includes("/gal/")))&&e.push({path:a,type:"hook-entry",reason:"GAL hook entries in SessionStart",isGalOwned:!1}),c.hooks?.UserPromptSubmit&&c.hooks.UserPromptSubmit.some(h=>h.hooks?.some(m=>m.command?.includes("gal-")||m.command?.includes("/gal/")))&&e.push({path:a,type:"hook-entry",reason:"GAL hook entries in UserPromptSubmit",isGalOwned:!1,source:"unknown"}),c.statusLine?.command?.includes("gal-")&&e.push({path:a,type:"statusline-entry",reason:"GAL status line entry in settings",isGalOwned:!1})}catch{}let u=(0,_.join)((0,Vt.homedir)(),".cursor"),l=(0,_.join)(u,"hooks");if((0,F.existsSync)(l)){let c=(0,F.readdirSync)(l);for(let f of c)f.startsWith("gal-")&&e.push({path:(0,_.join)(l,f),type:"file",reason:"GAL hook file for Cursor IDE",isGalOwned:!0})}let d=(0,_.join)(u,"hooks.json");if((0,F.existsSync)(d))try{let c=JSON.parse((0,F.readFileSync)(d,"utf-8")),f=["beforeShellExecution","beforeSubmitPrompt"];for(let h of f)if(c.hooks?.[h]&&c.hooks[h].some(D=>D.command?.includes("gal-")||D.command?.includes("/gal/"))){e.push({path:d,type:"hook-entry",reason:`GAL hook entries in Cursor hooks.json (${h})`,isGalOwned:!1});break}}catch{}return e}function _r(t){let e=[],n=(0,_.join)(t,".gal");(0,F.existsSync)(n)&&e.push({path:n,type:"directory",reason:"GAL state directory",isGalOwned:!0});let o=(0,_.join)(t,"gal.config.json");(0,F.existsSync)(o)&&e.push({path:o,type:"file",reason:"GAL configuration file",isGalOwned:!0});let s=[(0,_.join)(t,".git","hooks","pre-commit"),(0,_.join)(t,".husky","pre-commit")];for(let a of s)(0,F.existsSync)(a)&&qt(a)&&e.push({path:a,type:"file",reason:"GAL-generated git hook",isGalOwned:!0});let r=[{path:(0,_.join)(t,"CLAUDE.md"),reason:"GAL-generated CLAUDE.md"},{path:(0,_.join)(t,".claude","settings.json"),reason:"GAL-generated settings"},{path:(0,_.join)(t,".claude","commands","review.md"),reason:"GAL-generated command"},{path:(0,_.join)(t,".claude","commands","check.md"),reason:"GAL-generated command"},{path:(0,_.join)(t,".github","workflows","ci.yml"),reason:"GAL-generated workflow"},{path:(0,_.join)(t,".github","workflows","pr-governance.yml"),reason:"GAL-generated workflow"},{path:(0,_.join)(t,".gitleaks.toml"),reason:"GAL-generated security config"},{path:(0,_.join)(t,"SECURITY.md"),reason:"GAL-generated security docs"},{path:(0,_.join)(t,".env.example"),reason:"GAL-generated env template"}];for(let{path:a,reason:u}of r)(0,F.existsSync)(a)&&qt(a)&&e.push({path:a,type:"file",reason:u,isGalOwned:!0});return e}function vr(t){try{let e=JSON.parse((0,F.readFileSync)(t,"utf-8"));return e.statusLine?.command?.includes("gal-")?(delete e.statusLine,(0,F.writeFileSync)(t,JSON.stringify(e,null,2)),!0):!1}catch{return!1}}function Ar(t){try{let e=JSON.parse((0,F.readFileSync)(t,"utf-8")),n=!1;for(let o of["SessionStart","UserPromptSubmit"]){if(!e.hooks?.[o])continue;let s=e.hooks[o].length;e.hooks[o]=e.hooks[o].filter(r=>r.hooks?(r.hooks=r.hooks.filter(a=>!a.command?.includes("gal-")&&!a.command?.includes("/gal/")),r.hooks.length>0):!0),e.hooks[o].length===0&&delete e.hooks[o],e.hooks[o]?.length!==s&&(n=!0)}return Object.keys(e.hooks||{}).length===0&&delete e.hooks,n?((0,F.writeFileSync)(t,JSON.stringify(e,null,2)),!0):!1}catch{return!1}}function br(t){try{let e=JSON.parse((0,F.readFileSync)(t,"utf-8"));if(!e.hooks)return!1;let n=!1,o=["beforeShellExecution","beforeSubmitPrompt"];for(let s of o)if(e.hooks[s]){let r=e.hooks[s].length;e.hooks[s]=e.hooks[s].filter(a=>!a.command?.includes("gal-")&&!a.command?.includes("/gal/")),e.hooks[s].length===0&&delete e.hooks[s],e.hooks[s]?.length!==r&&(n=!0)}return Object.keys(e.hooks).length===0&&delete e.hooks,n?((0,F.writeFileSync)(t,JSON.stringify(e,null,2)),!0):!1}catch{return!1}}function wr(t,e){let n={removed:[],skipped:[],errors:[]};for(let o of t){if(e){n.removed.push(o.path);continue}try{o.type==="hook-entry"?(o.path.includes(".cursor")&&o.path.endsWith("hooks.json")?br(o.path):Ar(o.path))?n.removed.push(`${o.path} (GAL hooks removed)`):n.skipped.push(`${o.path} (no GAL hooks found)`):o.type==="statusline-entry"?vr(o.path)?n.removed.push(`${o.path} (GAL statusLine removed)`):n.skipped.push(`${o.path} (no GAL statusLine found)`):o.type==="directory"?((0,F.rmSync)(o.path,{recursive:!0,force:!0}),n.removed.push(o.path)):((0,F.unlinkSync)(o.path),n.removed.push(o.path))}catch(s){n.errors.push(`${o.path}: ${s instanceof Error?s.message:String(s)}`)}}return n}function vo(){let t=new L("uninstall");return t.description("Remove GAL-installed files and configurations").option("-d, --directory <path>","Project directory",process.cwd()).option("--user-only","Only remove org-synced configs from ~/.claude/ (preserves npm-installed CLI hooks)").option("--project-only","Only remove project-level configs").option("--dry-run","Show what would be removed without actually removing").option("-y, --yes","Skip confirmation prompt").action(async e=>{console.log(i.blue(`
|
|
448
|
+
`)),Ct(0,!1);try{await t.reportDeveloperStatus(e,{syncStatus:"never_synced"})}catch{}}}async function gr(t,e,n,o){let s=o?[o]:["claude"],r={inSync:!0,missingFiles:[],expectedFiles:[]};for(let a of s)try{let u=await t.getApprovedConfig(e,a);if(!u.approved||!u.configContent)continue;r.approvedHash=u.hash;try{let l=JSON.parse(u.configContent),f=jt(a);for(let c of Object.keys(l)){let d=(0,_.join)(f,c),h=(0,_.join)(n,d);r.expectedFiles.push(d),(0,p.existsSync)(h)||(r.missingFiles.push(d),r.inSync=!1)}}catch{}}catch{}console.log(JSON.stringify(r))}function Fo(){let t=new I("config");return t.description("Manage GAL CLI configuration").action(()=>{let e=F.load(),n=F.getEnvironment(),s={development:i.yellow,staging:i.cyan,production:i.green}[n]||i.white;console.log(i.blue("Current Configuration:")),console.log(i.gray(" Environment:"),s(n)),console.log(i.gray(" Config file:"),F.getConfigPath()),console.log(i.gray(" API URL:"),e.apiUrl||i.dim("(not set)")),console.log(i.gray(" API Key:"),e.apiKey?i.green("(set)"):i.dim("(not set)")),console.log(i.gray(" Default Org:"),e.defaultOrg||i.dim("(not set)")),console.log(i.gray(" Telemetry:"),e.telemetry===!1?i.red("disabled"):i.green("enabled")),console.log(""),console.log(i.dim(" Tip: Set GAL_ENV=dev|staging|prod to override environment")),console.log(i.dim(" Tip: gal config set telemetry false to disable telemetry"))}),t.command("set").description("Set a configuration value").argument("<key>","Configuration key (apiUrl, apiKey, defaultOrg, telemetry)").argument("<value>","Configuration value").action((e,n)=>{let o=["apiUrl","apiKey","defaultOrg","telemetry"];o.includes(e)||(console.error(i.red(`Invalid key: ${e}. Valid keys: ${o.join(", ")}`)),process.exit(1));let s=n;if(e==="telemetry"){let a=n.toLowerCase();a==="true"||a==="1"||a==="yes"||a==="on"?s=!0:a==="false"||a==="0"||a==="no"||a==="off"?s=!1:(console.error(i.red("Invalid value for telemetry. Use: true/false, yes/no, 1/0, on/off")),process.exit(1))}F.set(e,s);let r=e==="apiKey"?"***":String(s);console.log(i.green(`\u2713 Set ${e} = ${r}`))}),t.command("get").description("Get a configuration value").argument("<key>","Configuration key").action(e=>{let n=F.get(e);console.log(n===void 0?i.dim(`${e} is not set`):e==="apiKey"?"***":n)}),t.command("test").description("Test connection to GAL API").action(async()=>{let e=L("Testing API connection...").start();try{let n=F.load();n.apiUrl||(e.fail(i.red("API URL not configured")),console.log(i.dim("Run: gal config set apiUrl <url>")),process.exit(1)),await new G(n).testConnection()?e.succeed(i.green(`Connected to GAL API at ${n.apiUrl}`)):(e.fail(i.red(`Failed to connect to ${n.apiUrl}`)),process.exit(1))}catch(n){e.fail(i.red("Connection test failed")),console.error(i.dim(n.message)),process.exit(1)}}),t.command("path").description("Show config file path").action(()=>{console.log(F.getConfigPath())}),t}var g=require("fs"),E=require("path"),Ut=require("os"),yo=require("readline");async function Fr(t){let e=(0,yo.createInterface)({input:process.stdin,output:process.stdout});return new Promise(n=>{e.question(`${t} (y/N): `,o=>{e.close(),n(o.toLowerCase()==="y"||o.toLowerCase()==="yes")})})}function Ht(t){if(!(0,g.existsSync)(t))return!1;try{let e=(0,g.readFileSync)(t,"utf-8");return["GAL Config","GAL CLI","GAL Governance","Generated by GAL","gal sync","gal check","Governance Agentic Layer","CISO-approved","gal-sync-reminder","gal-config-hook","gal-safety-hook"].some(o=>e.includes(o))}catch{return!1}}function Cr(t){if(!(0,g.existsSync)(t))return!1;try{let e=(0,g.readFileSync)(t,"utf-8");return e.includes("CURRENT_VERSION =")||e.includes("const CURRENT_VERSION")}catch{return!1}}function Co(t){return Cr(t)?"npm":Ht(t)?"org-sync":"unknown"}function yr(t){let e=[],n=(0,E.join)((0,Ut.homedir)(),".claude"),o=(0,E.join)(n,"hooks"),s=(0,E.join)(n,"status_lines"),r=t?.includeNpmInstalled??!0;if((0,g.existsSync)(o)){let c=(0,g.readdirSync)(o);for(let d of c)if(d.startsWith("gal-")){let h=(0,E.join)(o,d),m=Co(h);if(!r&&m==="npm")continue;e.push({path:h,type:"file",reason:`GAL hook file (${m==="npm"?"npm-installed":m==="org-sync"?"org-synced":"unknown source"})`,isGalOwned:!0,source:m})}}if((0,g.existsSync)(s)){let c=(0,g.readdirSync)(s);for(let d of c)if(d.startsWith("gal-")){let h=(0,E.join)(s,d),m=Co(h);if(!r&&m==="npm")continue;e.push({path:h,type:"file",reason:`GAL status line script (${m==="npm"?"npm-installed":m==="org-sync"?"org-synced":"unknown source"})`,isGalOwned:!0,source:m})}}let a=(0,E.join)(n,"settings.json");if((0,g.existsSync)(a))try{let c=JSON.parse((0,g.readFileSync)(a,"utf-8"));c.hooks?.SessionStart&&c.hooks.SessionStart.some(h=>h.hooks?.some(m=>m.command?.includes("gal-")||m.command?.includes("/gal/")))&&e.push({path:a,type:"hook-entry",reason:"GAL hook entries in SessionStart",isGalOwned:!1}),c.hooks?.UserPromptSubmit&&c.hooks.UserPromptSubmit.some(h=>h.hooks?.some(m=>m.command?.includes("gal-")||m.command?.includes("/gal/")))&&e.push({path:a,type:"hook-entry",reason:"GAL hook entries in UserPromptSubmit",isGalOwned:!1,source:"unknown"}),c.statusLine?.command?.includes("gal-")&&e.push({path:a,type:"statusline-entry",reason:"GAL status line entry in settings",isGalOwned:!1})}catch{}let u=(0,E.join)((0,Ut.homedir)(),".cursor"),l=(0,E.join)(u,"hooks");if((0,g.existsSync)(l)){let c=(0,g.readdirSync)(l);for(let d of c)d.startsWith("gal-")&&e.push({path:(0,E.join)(l,d),type:"file",reason:"GAL hook file for Cursor IDE",isGalOwned:!0})}let f=(0,E.join)(u,"hooks.json");if((0,g.existsSync)(f))try{let c=JSON.parse((0,g.readFileSync)(f,"utf-8")),d=["beforeShellExecution","beforeSubmitPrompt"];for(let h of d)if(c.hooks?.[h]&&c.hooks[h].some(D=>D.command?.includes("gal-")||D.command?.includes("/gal/"))){e.push({path:f,type:"hook-entry",reason:`GAL hook entries in Cursor hooks.json (${h})`,isGalOwned:!1});break}}catch{}return e}function Er(t){let e=[],n=(0,E.join)(t,".gal");(0,g.existsSync)(n)&&e.push({path:n,type:"directory",reason:"GAL state directory",isGalOwned:!0});let o=(0,E.join)(t,"gal.config.json");(0,g.existsSync)(o)&&e.push({path:o,type:"file",reason:"GAL configuration file",isGalOwned:!0});let s=[(0,E.join)(t,".git","hooks","pre-commit"),(0,E.join)(t,".husky","pre-commit")];for(let a of s)(0,g.existsSync)(a)&&Ht(a)&&e.push({path:a,type:"file",reason:"GAL-generated git hook",isGalOwned:!0});let r=[{path:(0,E.join)(t,"CLAUDE.md"),reason:"GAL-generated CLAUDE.md"},{path:(0,E.join)(t,".claude","settings.json"),reason:"GAL-generated settings"},{path:(0,E.join)(t,".claude","commands","review.md"),reason:"GAL-generated command"},{path:(0,E.join)(t,".claude","commands","check.md"),reason:"GAL-generated command"},{path:(0,E.join)(t,".github","workflows","ci.yml"),reason:"GAL-generated workflow"},{path:(0,E.join)(t,".github","workflows","pr-governance.yml"),reason:"GAL-generated workflow"},{path:(0,E.join)(t,".gitleaks.toml"),reason:"GAL-generated security config"},{path:(0,E.join)(t,"SECURITY.md"),reason:"GAL-generated security docs"},{path:(0,E.join)(t,".env.example"),reason:"GAL-generated env template"}];for(let{path:a,reason:u}of r)(0,g.existsSync)(a)&&Ht(a)&&e.push({path:a,type:"file",reason:u,isGalOwned:!0});return e}function _r(t){try{let e=JSON.parse((0,g.readFileSync)(t,"utf-8"));return e.statusLine?.command?.includes("gal-")?(delete e.statusLine,(0,g.writeFileSync)(t,JSON.stringify(e,null,2)),!0):!1}catch{return!1}}function vr(t){try{let e=JSON.parse((0,g.readFileSync)(t,"utf-8")),n=!1;for(let o of["SessionStart","UserPromptSubmit"]){if(!e.hooks?.[o])continue;let s=e.hooks[o].length;e.hooks[o]=e.hooks[o].filter(r=>r.hooks?(r.hooks=r.hooks.filter(a=>!a.command?.includes("gal-")&&!a.command?.includes("/gal/")),r.hooks.length>0):!0),e.hooks[o].length===0&&delete e.hooks[o],e.hooks[o]?.length!==s&&(n=!0)}return Object.keys(e.hooks||{}).length===0&&delete e.hooks,n?((0,g.writeFileSync)(t,JSON.stringify(e,null,2)),!0):!1}catch{return!1}}function Ar(t){try{let e=JSON.parse((0,g.readFileSync)(t,"utf-8"));if(!e.hooks)return!1;let n=!1,o=["beforeShellExecution","beforeSubmitPrompt"];for(let s of o)if(e.hooks[s]){let r=e.hooks[s].length;e.hooks[s]=e.hooks[s].filter(a=>!a.command?.includes("gal-")&&!a.command?.includes("/gal/")),e.hooks[s].length===0&&delete e.hooks[s],e.hooks[s]?.length!==r&&(n=!0)}return Object.keys(e.hooks).length===0&&delete e.hooks,n?((0,g.writeFileSync)(t,JSON.stringify(e,null,2)),!0):!1}catch{return!1}}function br(t,e){let n={removed:[],skipped:[],errors:[]};for(let o of t){if(e){n.removed.push(o.path);continue}try{o.type==="hook-entry"?(o.path.includes(".cursor")&&o.path.endsWith("hooks.json")?Ar(o.path):vr(o.path))?n.removed.push(`${o.path} (GAL hooks removed)`):n.skipped.push(`${o.path} (no GAL hooks found)`):o.type==="statusline-entry"?_r(o.path)?n.removed.push(`${o.path} (GAL statusLine removed)`):n.skipped.push(`${o.path} (no GAL statusLine found)`):o.type==="directory"?((0,g.rmSync)(o.path,{recursive:!0,force:!0}),n.removed.push(o.path)):((0,g.unlinkSync)(o.path),n.removed.push(o.path))}catch(s){n.errors.push(`${o.path}: ${s instanceof Error?s.message:String(s)}`)}}return n}function Eo(){let t=new I("uninstall");return t.description("Remove GAL-installed files and configurations").option("-d, --directory <path>","Project directory",process.cwd()).option("--user-only","Only remove org-synced configs from ~/.claude/ (preserves npm-installed CLI hooks)").option("--project-only","Only remove project-level configs").option("--dry-run","Show what would be removed without actually removing").option("-y, --yes","Skip confirmation prompt").action(async e=>{console.log(i.blue(`
|
|
754
449
|
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`)),console.log(i.blue(" GAL Uninstall")),console.log(i.blue(`\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
755
|
-
`));let n=e.projectOnly?[]:
|
|
450
|
+
`));let n=e.projectOnly?[]:yr({includeNpmInstalled:!e.userOnly}),o=e.userOnly?[]:Er(e.directory),s=[...n,...o];if(s.length===0){console.log(i.yellow("No GAL-installed files found.")),e.userOnly&&(console.log(i.dim(`
|
|
756
451
|
Note: --user-only preserves npm-installed CLI hooks (e.g., gal-sync-reminder.js)`)),console.log(i.dim("To remove CLI hooks, uninstall the npm package: npm uninstall -g @scheduler-systems/gal-cli"))),console.log(i.dim(`
|
|
757
452
|
Nothing to uninstall.`));return}if(console.log(i.bold(`The following GAL-installed items were detected:
|
|
758
453
|
`)),e.userOnly&&(console.log(i.cyan("Mode: User-level org-synced configs only")),console.log(i.dim(` (npm-installed CLI hooks will be preserved)
|
|
759
|
-
`))),n.length>0){console.log(i.cyan("User-level (Claude Code & Cursor IDE):"));for(let a of n){let u=a.type==="directory"?"\u{1F4C1}":a.type==="hook-entry"?"\u{1F527}":a.type==="statusline-entry"?"\u{1F4CA}":"\u{1F4C4}";console.log(` ${u} ${i.dim(a.path)}`),console.log(` ${i.dim(a.reason)}`)}console.log()}if(o.length>0){console.log(i.cyan("Project-level:"));for(let a of o){let u=a.type==="directory"?"\u{1F4C1}":"\u{1F4C4}",l=a.path.replace(e.directory,".");console.log(` ${u} ${i.dim(l)}`),console.log(` ${i.dim(a.reason)}`)}console.log()}if(e.dryRun){console.log(i.yellow("DRY RUN - No files were removed."));return}if(!e.yes&&(console.log(i.yellow("\u26A0\uFE0F This action cannot be undone.")),!await
|
|
454
|
+
`))),n.length>0){console.log(i.cyan("User-level (Claude Code & Cursor IDE):"));for(let a of n){let u=a.type==="directory"?"\u{1F4C1}":a.type==="hook-entry"?"\u{1F527}":a.type==="statusline-entry"?"\u{1F4CA}":"\u{1F4C4}";console.log(` ${u} ${i.dim(a.path)}`),console.log(` ${i.dim(a.reason)}`)}console.log()}if(o.length>0){console.log(i.cyan("Project-level:"));for(let a of o){let u=a.type==="directory"?"\u{1F4C1}":"\u{1F4C4}",l=a.path.replace(e.directory,".");console.log(` ${u} ${i.dim(l)}`),console.log(` ${i.dim(a.reason)}`)}console.log()}if(e.dryRun){console.log(i.yellow("DRY RUN - No files were removed."));return}if(!e.yes&&(console.log(i.yellow("\u26A0\uFE0F This action cannot be undone.")),!await Fr(`
|
|
760
455
|
Proceed with uninstallation?`))){console.log(i.dim(`
|
|
761
456
|
Uninstall cancelled.`));return}console.log(i.dim(`
|
|
762
|
-
Removing files...`));let r=
|
|
457
|
+
Removing files...`));let r=br(s,!1);if(console.log(),r.removed.length>0){console.log(i.green(`\u2713 Removed ${r.removed.length} item(s):`));for(let a of r.removed)console.log(i.dim(` - ${a}`))}if(r.skipped.length>0){console.log(i.yellow(`
|
|
763
458
|
\u26A0 Skipped ${r.skipped.length} item(s):`));for(let a of r.skipped)console.log(i.dim(` - ${a}`))}if(r.errors.length>0){console.log(i.red(`
|
|
764
459
|
\u2717 Failed to remove ${r.errors.length} item(s):`));for(let a of r.errors)console.log(i.dim(` - ${a}`))}console.log(i.blue(`
|
|
765
460
|
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`)),console.log(i.blue(" GAL has been uninstalled.")),console.log(i.blue(`\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
766
461
|
`)),console.log(i.dim("To reinstall, run: gal sync --pull")),console.log(i.dim(`To completely remove the CLI: npm uninstall -g @scheduler-systems/gal-cli
|
|
767
|
-
`))}),t}var
|
|
462
|
+
`))}),t}var de=b(require("fs/promises"),1),he=b(require("path"),1);function vo(){let t=new I("workflow").description("Test workflow configurations (commands and hooks) in E2B sandbox");return t.command("test").description("Test a workflow file in sandbox before deployment").argument("<file>","Path to command (.md) or hook (.json) file").option("-p, --platform <platform>","Platform: claude, cursor, gemini, codex, windsurf","claude").option("--type <type>","Type: command or hook (auto-detected if not specified)").option("--test-cases <cases>","Comma-separated test cases to run").option("--max-iterations <n>","Maximum improvement iterations (default: 3)","3").option("-o, --org <org>","Organization name").option("--json","Output results as JSON",!1).action(async(e,n)=>{let o=process.env.GAL_API_URL||X;try{let s=L(`Reading ${e}...`).start(),r=he.default.resolve(e),a=await de.default.readFile(r,"utf-8"),u=he.default.basename(e),l=n.type;l||(u.endsWith(".md")?l="command":u.includes("hook")||u.endsWith(".json")||u.endsWith(".py")||u.endsWith(".js")?l="hook":(s.fail(i.red("Could not auto-detect type. Please specify --type (command or hook)")),process.exit(1))),s.text="Uploading to sandbox...";let f=n.org||await _o(o);f||(s.fail(i.red("No organization found. Please connect GitHub via dashboard or use --org flag")),process.exit(1));let c=n.testCases?.split(",").map(D=>D.trim()).filter(D=>D)||[];s.text=`Testing ${u} in sandbox...`;let d=await fetch(`${o}/organizations/${f}/workflow-test`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileName:u,type:l,platform:n.platform,content:a,testCases:c,maxIterations:parseInt(n.maxIterations,10)})});if(!d.ok){let D=await d.text();s.fail(i.red("Test failed")),console.error(i.red(D)),process.exit(1)}let m=(await d.json()).result;s.stop(),n.json?console.log(JSON.stringify(m,null,2)):wr(m),m.recommendation==="reject"&&process.exit(1)}catch(s){console.error(i.red(`Error: ${s instanceof Error?s.message:String(s)}`)),process.exit(1)}}),t.command("test-batch").description("Test multiple workflow files in batch").argument("<directory>","Directory containing workflow files").option("-p, --platform <platform>","Platform: claude, cursor, gemini, codex, windsurf","claude").option("-o, --org <org>","Organization name").option("--report <path>","Save detailed report to file").action(async(e,n)=>{let o=process.env.GAL_API_URL||X,s=L("Scanning directory...").start();try{let r=n.org||await _o(o);r||(s.fail(i.red("No organization found. Please connect GitHub via dashboard or use --org flag")),process.exit(1));let a=he.default.resolve(e),l=(await de.default.readdir(a)).filter(m=>m.endsWith(".md")||m.includes("hook")&&(m.endsWith(".json")||m.endsWith(".py")||m.endsWith(".js")));l.length===0&&(s.fail(i.yellow("No workflow files found")),process.exit(0)),s.text=`Found ${l.length} workflow files. Preparing batch test...`;let f=[];for(let m of l){let D=he.default.join(a,m),k=await de.default.readFile(D,"utf-8"),v=m.endsWith(".md")?"command":"hook";f.push({fileName:m,type:v,platform:n.platform,content:k,testCases:[],maxIterations:3})}s.text=`Testing ${f.length} workflows in sandbox...`;let c=await fetch(`${o}/organizations/${r}/workflow-test/batch`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({requests:f})});if(!c.ok){let m=await c.text();s.fail(i.red("Batch test failed")),console.error(i.red(m)),process.exit(1)}let h=(await c.json()).report;s.stop(),console.log(i.green(`
|
|
768
463
|
=== Batch Test Results ===
|
|
769
464
|
`)),console.log(`Total Tests: ${i.bold(h.totalTests)}`),console.log(`Passed: ${i.green(h.passedTests)}`),console.log(`Average Score: ${i.yellow(h.averageScore+"%")}`),console.log(`
|
|
770
|
-
Recommendations:`),console.log(` Approve: ${i.green(h.summary.byRecommendation.approve)}`),console.log(` Needs Revision: ${i.yellow(h.summary.byRecommendation.revise)}`),console.log(` Reject: ${i.red(h.summary.byRecommendation.reject)}`),n.report&&(await
|
|
771
|
-
Detailed report saved to: ${n.report}`))),h.passedTests<h.totalTests&&process.exit(1)}catch(r){s.fail(i.red("Batch test failed")),console.error(i.red(`Error: ${r instanceof Error?r.message:String(r)}`)),process.exit(1)}}),t}async function
|
|
465
|
+
Recommendations:`),console.log(` Approve: ${i.green(h.summary.byRecommendation.approve)}`),console.log(` Needs Revision: ${i.yellow(h.summary.byRecommendation.revise)}`),console.log(` Reject: ${i.red(h.summary.byRecommendation.reject)}`),n.report&&(await de.default.writeFile(n.report,JSON.stringify(h,null,2)),console.log(i.gray(`
|
|
466
|
+
Detailed report saved to: ${n.report}`))),h.passedTests<h.totalTests&&process.exit(1)}catch(r){s.fail(i.red("Batch test failed")),console.error(i.red(`Error: ${r instanceof Error?r.message:String(r)}`)),process.exit(1)}}),t}async function _o(t){try{let e=await fetch(`${t}/organizations`,{credentials:"include"});if(!e.ok)return null;let n=await e.json();return n.length>0?n[0].name:null}catch{return null}}function wr(t){console.log(i.green(`
|
|
772
467
|
=== Test Results ===
|
|
773
468
|
`)),console.log(`File: ${i.bold(t.fileName)}`),console.log(`Type: ${i.cyan(t.type)}`),console.log(`Platform: ${i.cyan(t.platform)}`),console.log(`Iterations: ${t.iterations.length}`),console.log(`Execution: ${t.executionTimeMs}ms`),console.log();let e=t.finalScore>=80?i.green:t.finalScore>=60?i.yellow:i.red;console.log(`Final Score: ${e(t.finalScore+"/100")}`);let n=t.recommendation==="approve"?i.green:t.recommendation==="revise"?i.yellow:i.red;console.log(`Recommendation: ${n(t.recommendation.toUpperCase())}`),console.log(),t.error&&(console.log(i.red("Error:")),console.log(i.red(" "+t.error)),console.log());let o=t.iterations[t.iterations.length-1];o&&(console.log(i.blue(`=== LLM Evaluation ===
|
|
774
469
|
`)),console.log(o.evaluation.reasoning),console.log(),o.evaluation.issues.length>0&&(console.log(i.yellow(`Issues Found:
|
|
775
470
|
`)),o.evaluation.issues.forEach((s,r)=>{let a=s.severity==="critical"||s.severity==="high"?i.red:s.severity==="medium"?i.yellow:i.blue;console.log(` ${r+1}. [${a(s.severity.toUpperCase())}] ${s.message}`)}),console.log()),o.evaluation.suggestedImprovements.length>0&&(console.log(i.cyan(`Suggested Improvements:
|
|
776
|
-
`)),o.evaluation.suggestedImprovements.forEach((s,r)=>{console.log(` ${r+1}. ${s}`)}),console.log())),t.recommendation==="approve"?console.log(i.green("\u2713 This workflow is ready for deployment!")):t.recommendation==="revise"?console.log(i.yellow("\u26A0 This workflow needs improvements before deployment.")):console.log(i.red("\u2717 This workflow should be rejected. See issues above.")),console.log()}var
|
|
471
|
+
`)),o.evaluation.suggestedImprovements.forEach((s,r)=>{console.log(` ${r+1}. ${s}`)}),console.log())),t.recommendation==="approve"?console.log(i.green("\u2713 This workflow is ready for deployment!")):t.recommendation==="revise"?console.log(i.yellow("\u26A0 This workflow needs improvements before deployment.")):console.log(i.red("\u2717 This workflow should be rejected. See issues above.")),console.log()}var Ne="0.1.13-alpha.pr459",X="https://api.gal.run",Vt=(0,qt.join)((0,wo.homedir)(),".gal"),Mt=(0,qt.join)(Vt,"update-cache.json"),Sr=24*60*60*1e3;function kr(t,e){let n=t.replace(/^v/,"").split(".").map(Number),o=e.replace(/^v/,"").split(".").map(Number);for(let s=0;s<3;s++){if((n[s]||0)<(o[s]||0))return-1;if((n[s]||0)>(o[s]||0))return 1}return 0}function Or(){try{if((0,M.existsSync)(Mt))return JSON.parse((0,M.readFileSync)(Mt,"utf-8"))}catch{}return null}function xr(t){try{(0,M.existsSync)(Vt)||(0,M.mkdirSync)(Vt,{recursive:!0}),(0,M.writeFileSync)(Mt,JSON.stringify(t))}catch{}}function Tr(t,e){let n=["",i.bgYellow.black(" UPDATE AVAILABLE "),"",` ${i.dim(t)} \u2192 ${i.green(e)}`,"",` Run: ${i.cyan("npm update -g @scheduler-systems/gal-cli")}`,""].join(`
|
|
777
472
|
`),s=i.yellow("\u2500".repeat(50));console.log(`
|
|
778
473
|
`+s),console.log(n),console.log(s+`
|
|
779
|
-
`)}function
|
|
474
|
+
`)}function Ir(t){return/-(alpha|beta|pr|rc|dev)/i.test(t)}function Br(){if(Ir(Ne))return;let t=Or(),e=!t||Date.now()-t.lastCheck>Sr;if(t?.latestVersion&&kr(Ne,t.latestVersion)<0&&process.on("exit",()=>{Tr(Ne,t.latestVersion)}),e){let n=bo.default.get("https://registry.npmjs.org/@scheduler-systems/gal-cli/latest",{timeout:3e3},o=>{let s="";o.on("data",r=>s+=r),o.on("end",()=>{try{let r=JSON.parse(s);xr({lastCheck:Date.now(),latestVersion:r.version})}catch{}})});n.on("error",()=>{}),n.on("timeout",()=>n.destroy());try{typeof n.unref=="function"&&n.unref()}catch{}}}Br();qn();Mn();dt();process.on("beforeExit",async()=>{await ht()});Ao.default.config();var z=new I;z.name("gal").description("GAL - Governance Agentic Layer CLI").version(Ne);z.addCommand(ho());z.addCommand(go());z.addCommand(Fo());z.addCommand(Eo());z.addCommand(vo());z.parse();0&&(module.exports={DEFAULT_API_URL});
|